UNPKG

@mantine/dates

Version:

Calendars, date and time pickers based on Mantine components

46 lines (45 loc) 1.72 kB
"use client"; import PickerControl_module_default from "./PickerControl.module.mjs"; import { jsx } from "react/jsx-runtime"; import { UnstyledButton, createVarsResolver, factory, getFontSize, getSize, useProps, useStyles } from "@mantine/core"; //#region packages/@mantine/dates/src/components/PickerControl/PickerControl.tsx const varsResolver = createVarsResolver((_, { size }) => ({ pickerControl: { "--dpc-fz": getFontSize(size), "--dpc-size": getSize(size, "dpc-size") } })); const PickerControl = factory((_props) => { const props = useProps("PickerControl", null, _props); const { classNames, className, style, styles, unstyled, vars, firstInRange, lastInRange, inRange, __staticSelector, selected, disabled, fullWidth, attributes, ...others } = props; return /* @__PURE__ */ jsx(UnstyledButton, { ...useStyles({ name: __staticSelector || "PickerControl", classes: PickerControl_module_default, props, className, style, classNames, styles, unstyled, attributes, vars, varsResolver, rootSelector: "pickerControl" })("pickerControl"), unstyled, "data-picker-control": true, "data-full-width": fullWidth || void 0, "data-selected": selected && !disabled || void 0, "data-disabled": disabled || void 0, "data-in-range": inRange && !disabled && !selected || void 0, "data-first-in-range": firstInRange && !disabled || void 0, "data-last-in-range": lastInRange && !disabled || void 0, disabled, ...others }); }); PickerControl.classes = PickerControl_module_default; PickerControl.varsResolver = varsResolver; PickerControl.displayName = "@mantine/dates/PickerControl"; //#endregion export { PickerControl }; //# sourceMappingURL=PickerControl.mjs.map