@fuf-stack/uniform 1.28.1 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +6 -0
  2. package/dist/Checkboxes/index.d.mts +57 -10
  3. package/dist/Checkboxes/index.d.mts.map +1 -1
  4. package/dist/Checkboxes/index.mjs +8 -3
  5. package/dist/Checkboxes/index.mjs.map +1 -1
  6. package/dist/DatePicker/index.d.mts +129 -1120
  7. package/dist/DatePicker/index.d.mts.map +1 -1
  8. package/dist/DatePicker/index.mjs +38 -32
  9. package/dist/DatePicker/index.mjs.map +1 -1
  10. package/dist/FieldArray/index.mjs +2 -2
  11. package/dist/FieldCard/index.mjs +1 -1
  12. package/dist/FieldReset/index.d.mts +415 -0
  13. package/dist/FieldReset/index.d.mts.map +1 -0
  14. package/dist/FieldReset/index.mjs +241 -0
  15. package/dist/FieldReset/index.mjs.map +1 -0
  16. package/dist/Form/index.d.mts +2 -2
  17. package/dist/Form/index.mjs +2 -2
  18. package/dist/Form/index.mjs.map +1 -1
  19. package/dist/{FormContext-BnNJYZOo.d.mts → FormContext-Dvt3MiKq.d.mts} +3 -3
  20. package/dist/{FormContext-BnNJYZOo.d.mts.map → FormContext-Dvt3MiKq.d.mts.map} +1 -1
  21. package/dist/Input/index.d.mts +63 -452
  22. package/dist/Input/index.d.mts.map +1 -1
  23. package/dist/Input/index.mjs +20 -15
  24. package/dist/Input/index.mjs.map +1 -1
  25. package/dist/RadioBoxes/index.d.mts +163 -894
  26. package/dist/RadioBoxes/index.d.mts.map +1 -1
  27. package/dist/RadioBoxes/index.mjs +27 -20
  28. package/dist/RadioBoxes/index.mjs.map +1 -1
  29. package/dist/RadioTabs/index.d.mts +93 -43
  30. package/dist/RadioTabs/index.d.mts.map +1 -1
  31. package/dist/RadioTabs/index.mjs +8 -5
  32. package/dist/RadioTabs/index.mjs.map +1 -1
  33. package/dist/Radios/index.d.mts +122 -1027
  34. package/dist/Radios/index.d.mts.map +1 -1
  35. package/dist/Radios/index.mjs +22 -18
  36. package/dist/Radios/index.mjs.map +1 -1
  37. package/dist/Select/index.d.mts +440 -3028
  38. package/dist/Select/index.d.mts.map +1 -1
  39. package/dist/Select/index.mjs +79 -45
  40. package/dist/Select/index.mjs.map +1 -1
  41. package/dist/Slider/index.d.mts +162 -1325
  42. package/dist/Slider/index.d.mts.map +1 -1
  43. package/dist/Slider/index.mjs +41 -28
  44. package/dist/Slider/index.mjs.map +1 -1
  45. package/dist/Switch/index.d.mts +125 -944
  46. package/dist/Switch/index.d.mts.map +1 -1
  47. package/dist/Switch/index.mjs +18 -14
  48. package/dist/Switch/index.mjs.map +1 -1
  49. package/dist/SwitchBox/index.d.mts +140 -99
  50. package/dist/SwitchBox/index.d.mts.map +1 -1
  51. package/dist/SwitchBox/index.mjs +9 -6
  52. package/dist/SwitchBox/index.mjs.map +1 -1
  53. package/dist/TextArea/index.d.mts +63 -452
  54. package/dist/TextArea/index.d.mts.map +1 -1
  55. package/dist/TextArea/index.mjs +17 -13
  56. package/dist/TextArea/index.mjs.map +1 -1
  57. package/dist/Time/index.d.mts +82 -729
  58. package/dist/Time/index.d.mts.map +1 -1
  59. package/dist/Time/index.mjs +22 -18
  60. package/dist/Time/index.mjs.map +1 -1
  61. package/dist/hooks/useFormContext/index.d.mts +1 -1
  62. package/dist/hooks/useUniformField/index.d.mts +1 -1
  63. package/dist/hooks/useUniformField/index.mjs +5 -1
  64. package/dist/hooks/useUniformField/index.mjs.map +1 -1
  65. package/dist/hooks/useUniformFieldArray/index.d.mts +1 -1
  66. package/dist/{index-DaiTW5Bl.d.mts → index-DsB0_365.d.mts} +9 -2
  67. package/dist/index-DsB0_365.d.mts.map +1 -0
  68. package/dist/{useFormContext-BhPzFXwF.d.mts → useFormContext-BSSUZ0Md.d.mts} +2 -2
  69. package/dist/{useFormContext-BhPzFXwF.d.mts.map → useFormContext-BSSUZ0Md.d.mts.map} +1 -1
  70. package/package.json +5 -4
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4C1B,eAAe,eAAe;KAC9B,YAAY,mBAAmB;UAEnB,wBAAwB;;EAEvC;;EAEA,YAAY;;EAEZ;;EAEA;;;;;;EAMA;;EAEA,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;EAEA;;;;;;;EAOA;;;;;cAMI,eAAc,WAAA,YAAA,WAAA,cAAA,UAAA,UAAA,MAAA,UAAA,WAAA,aAAA,qBAWjB,oCAAe,IAAA"}
@@ -94,45 +94,48 @@ const dateValueToUtcIsoString = (value, timeZone) => {
94
94
  return null;
95
95
  };
96
96
  // src/DatePicker/DatePicker.tsx
97
- const datePickerVariants = tv({ slots: {
98
- /** wrapper around the whole date picker */
99
- base: "",
100
- /** helper wrapper for error/description */
101
- helperWrapper: ["p-0"],
102
- /** the calendar element */
103
- calendar: "",
104
- /** the calendar's content element */
105
- calendarContent: "",
106
- /**
107
- * inner wrapper (HeroUI inputWrapper slot)
108
- *
109
- * NOTE: Unlike HeroUI Input, the DatePicker does not expose a
110
- * `data-focus` indicator on the group, so the focus border has to be
111
- * driven by the native `focus-within` state of the segment inputs.
112
- */
113
- inputWrapper: "bg-content1 focus-within:border-focus",
114
- /** field label */
115
- label: "cursor-default",
116
- /** the calendar popover element */
117
- popoverContent: "",
118
- /** selector button element */
119
- selectorButton: "",
120
- /** selector icon element */
121
- selectorIcon: "",
122
- /** the time-input component element */
123
- timeInput: "",
124
- /** the time-input component's label element */
125
- timeInputLabel: ""
126
- } });
97
+ const datePickerVariants = tv({
98
+ slots: {
99
+ /** wrapper around the whole date picker */
100
+ base: "",
101
+ /** helper wrapper for error/description */
102
+ helperWrapper: ["p-0"],
103
+ /** the calendar element */
104
+ calendar: "",
105
+ /** the calendar's content element */
106
+ calendarContent: "",
107
+ /**
108
+ * inner wrapper (HeroUI inputWrapper slot)
109
+ *
110
+ * NOTE: Unlike HeroUI Input, the DatePicker does not expose a
111
+ * `data-focus` indicator on the group, so the focus border has to be
112
+ * driven by the native `focus-within` state of the segment inputs.
113
+ */
114
+ inputWrapper: "bg-content1 focus-within:border-focus",
115
+ /** field label */
116
+ label: "cursor-default",
117
+ /** the calendar popover element */
118
+ popoverContent: "",
119
+ /** selector button element */
120
+ selectorButton: "",
121
+ /** selector icon element */
122
+ selectorIcon: "",
123
+ /** the time-input component element */
124
+ timeInput: "",
125
+ /** the time-input component's label element */
126
+ timeInputLabel: ""
127
+ },
128
+ variants: { readOnly: { true: { base: "**:cursor-not-allowed cursor-not-allowed opacity-disabled" } } }
129
+ });
127
130
  /**
128
131
  * DatePicker component based on [HeroUI DatePicker](https://v2.heroui.com/docs/components/date-picker)
129
132
  */
130
133
  const DatePicker$1 = ({ className: _className = void 0, hourCycle = 24, hideTimeZone = false, maxValue = void 0, minValue = void 0, name, timeZone = void 0, valueType = "string", withTime = false, ...uniformFieldProps }) => {
131
- const { ariaLabel, disabled, errorMessage, field: { onBlur, onChange, ref, value }, invalid, label, required, testId } = useUniformField({
134
+ const { ariaLabel, disabled, errorMessage, field: { onBlur, onChange, ref, value }, invalid, label, readOnly, required, testId } = useUniformField({
132
135
  name,
133
136
  ...uniformFieldProps
134
137
  });
135
- const variants = datePickerVariants();
138
+ const variants = datePickerVariants({ readOnly });
136
139
  const classNames = variantsToClassNames(variants, _className, "base");
137
140
  const resolvedTimeZone = resolveDatePickerTimeZone(withTime, timeZone);
138
141
  const parsedValue = parseDateValue(value, withTime ? resolvedTimeZone : timeZone);
@@ -140,6 +143,7 @@ const DatePicker$1 = ({ className: _className = void 0, hourCycle = 24, hideTime
140
143
  const parsedMinValue = parseDateValue(minValue, withTime ? resolvedTimeZone : timeZone);
141
144
  const parsedMaxValue = parseDateValue(maxValue, withTime ? resolvedTimeZone : timeZone);
142
145
  const handleChange = (nextValue) => {
146
+ if (readOnly) return;
143
147
  if (nextValue == null) {
144
148
  onChange(null);
145
149
  return;
@@ -174,6 +178,7 @@ const DatePicker$1 = ({ className: _className = void 0, hourCycle = 24, hideTime
174
178
  id: testId,
175
179
  isDisabled: disabled,
176
180
  isInvalid: invalid,
181
+ isReadOnly: readOnly,
177
182
  isRequired: required,
178
183
  label,
179
184
  labelPlacement: "outside",
@@ -184,6 +189,7 @@ const DatePicker$1 = ({ className: _className = void 0, hourCycle = 24, hideTime
184
189
  onChange: handleChange,
185
190
  placeholderValue,
186
191
  radius: "sm",
192
+ timeInputProps: { isReadOnly: readOnly },
187
193
  value: parsedValue,
188
194
  variant: "bordered"
189
195
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["DatePicker","HeroDatePicker","DatePicker"],"sources":["../../src/DatePicker/dateHelpers.ts","../../src/DatePicker/DatePicker.tsx","../../src/DatePicker/index.ts"],"sourcesContent":["import type { DatePicker as HeroDatePicker } from '@heroui/date-picker';\nimport type { ComponentProps } from 'react';\n\nimport {\n getLocalTimeZone,\n now,\n parseAbsolute,\n parseAbsoluteToLocal,\n parseDate,\n parseDateTime,\n parseZonedDateTime,\n} from '@internationalized/date';\n\n/** Value type accepted by the HeroUI DatePicker */\nexport type DatePickerValue = ComponentProps<typeof HeroDatePicker>['value'];\n\n/** Cast unknown input to the DatePicker value union type. */\nconst asDatePickerValue = (value: unknown): DatePickerValue => {\n return value as DatePickerValue;\n};\n\n/** Check whether a value already looks like an @internationalized/date object. */\nconst isDateValueLike = (value: unknown): value is object => {\n return !!value && typeof value === 'object' && 'calendar' in value;\n};\n\n/** True for ISO datetime strings that do not yet include timezone information. */\nconst isNaiveDateTimeString = (value: string): boolean => {\n return /^\\d{4}-\\d{2}-\\d{2}T/.test(value) && !hasExplicitTimeZone(value);\n};\n\n/** True when an input already carries timezone/offset information. */\nconst hasExplicitTimeZone = (value: string): boolean => {\n if (value.includes('[') && value.includes(']')) {\n return true;\n }\n\n return /(?:[zZ]|[+-]\\d{2}:\\d{2})$/.test(value);\n};\n\n/** Safely run a parser and return `null` on parsing errors. */\nconst tryParse = (parser: () => unknown): DatePickerValue => {\n try {\n return asDatePickerValue(parser());\n } catch {\n return null;\n }\n};\n\n/**\n * Parse a form value into a HeroUI DatePicker compatible `DateValue`.\n *\n * Accepts existing `DateValue` objects, native `Date` instances, and ISO-like\n * strings (date, date-time, zoned, and absolute). Returns `null` when the value\n * is empty or cannot be parsed.\n */\nexport const parseDateValue = (\n value: unknown,\n timeZone?: string,\n): DatePickerValue => {\n if (value == null || value === '') {\n return null;\n }\n\n if (isDateValueLike(value)) {\n return asDatePickerValue(value);\n }\n\n if (value instanceof Date) {\n return asDatePickerValue(\n timeZone\n ? parseAbsolute(value.toISOString(), timeZone)\n : parseAbsoluteToLocal(value.toISOString()),\n );\n }\n\n if (typeof value !== 'string') {\n return null;\n }\n\n const normalizedValue = value.trim();\n if (normalizedValue === '') {\n return null;\n }\n\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(normalizedValue)) {\n return tryParse(() => {\n return parseDate(normalizedValue);\n });\n }\n\n const parsers: (() => unknown)[] = [\n ...(timeZone && isNaiveDateTimeString(normalizedValue)\n ? [\n () => {\n return parseZonedDateTime(`${normalizedValue}[${timeZone}]`);\n },\n ]\n : []),\n () => {\n return timeZone\n ? parseAbsolute(normalizedValue, timeZone)\n : parseAbsoluteToLocal(normalizedValue);\n },\n () => {\n return parseZonedDateTime(normalizedValue);\n },\n () => {\n return parseDateTime(normalizedValue);\n },\n () => {\n return parseDate(normalizedValue);\n },\n ];\n\n return (\n parsers\n .map((parser) => {\n return tryParse(parser);\n })\n .find((parsedValue) => {\n return parsedValue != null;\n }) ?? null\n );\n};\n\n/** Resolve the timezone used by the DatePicker when time fields are enabled. */\nexport const resolveDatePickerTimeZone = (\n withTime: boolean,\n timeZone?: string,\n): string | undefined => {\n if (!withTime) {\n return timeZone;\n }\n\n return timeZone ?? getLocalTimeZone();\n};\n\n/** Build the default placeholder value for time-enabled pickers. */\nexport const getDatePickerPlaceholderValue = (\n withTime: boolean,\n timeZone?: string,\n): DatePickerValue => {\n const resolvedTimeZone = resolveDatePickerTimeZone(withTime, timeZone);\n if (!resolvedTimeZone || !withTime) {\n return undefined;\n }\n\n return asDatePickerValue(now(resolvedTimeZone));\n};\n\n/**\n * Convert a date value into a UTC ISO string.\n *\n * `CalendarDate` and `CalendarDateTime` values are interpreted in the provided\n * timezone. `ZonedDateTime` values use their own timezone and offset.\n */\nexport const dateValueToUtcIsoString = (\n value: DatePickerValue,\n timeZone: string,\n): string | null => {\n if (value == null) {\n return null;\n }\n\n const maybeWithAbsoluteString = value as { toAbsoluteString?: () => string };\n if (typeof maybeWithAbsoluteString.toAbsoluteString === 'function') {\n return maybeWithAbsoluteString.toAbsoluteString();\n }\n\n const maybeWithToDate = value as { toDate?: (zone: string) => Date };\n if (typeof maybeWithToDate.toDate === 'function') {\n return maybeWithToDate.toDate(timeZone).toISOString();\n }\n\n return null;\n};\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { DatePickerProps as HeroDatePickerProps } from '@heroui/date-picker';\nimport type { ReactNode } from 'react';\nimport type { DatePickerValue } from './dateHelpers';\n\nimport { DatePicker as HeroDatePicker } from '@heroui/date-picker';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\nimport {\n dateValueToUtcIsoString,\n getDatePickerPlaceholderValue,\n parseDateValue,\n resolveDatePickerTimeZone,\n} from './dateHelpers';\n\nexport const datePickerVariants = tv({\n slots: {\n /** wrapper around the whole date picker */\n base: '',\n /** helper wrapper for error/description */\n helperWrapper: [\n // set padding to 0 for error message exit animation\n 'p-0',\n ],\n /** the calendar element */\n calendar: '',\n /** the calendar's content element */\n calendarContent: '',\n /**\n * inner wrapper (HeroUI inputWrapper slot)\n *\n * NOTE: Unlike HeroUI Input, the DatePicker does not expose a\n * `data-focus` indicator on the group, so the focus border has to be\n * driven by the native `focus-within` state of the segment inputs.\n */\n inputWrapper: 'bg-content1 focus-within:border-focus',\n /** field label */\n label: 'cursor-default',\n /** the calendar popover element */\n popoverContent: '',\n /** selector button element */\n selectorButton: '',\n /** selector icon element */\n selectorIcon: '',\n /** the time-input component element */\n timeInput: '',\n /** the time-input component's label element */\n timeInputLabel: '',\n },\n});\n\ntype VariantProps = TVProps<typeof datePickerVariants>;\ntype ClassName = TVClassName<typeof datePickerVariants>;\n\nexport interface DatePickerProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** date picker is disabled */\n disabled?: boolean;\n /** hide timezone abbreviation for zoned values */\n hideTimeZone?: boolean;\n /**\n * Optional hour cycle override.\n *\n * When omitted, the picker uses the user's locale default (12-hour or 24-hour).\n */\n hourCycle?: 12 | 24;\n /** form field label */\n label?: ReactNode;\n /** latest selectable value as ISO string */\n maxValue?: string;\n /** earliest selectable value as ISO string */\n minValue?: string;\n /** form field name */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /**\n * Optional advanced override for the display/interpretation timezone.\n *\n * When omitted, the picker uses the current user's local timezone while\n * `withTime` is enabled.\n */\n timeZone?: string;\n /** value format stored in form state (`string` stores UTC ISO values) */\n valueType?: 'dateValue' | 'string';\n /**\n * Enables date-time mode.\n *\n * - `false` (default): date-only input (`day` granularity)\n * - `true`: includes time segments (`minute` granularity)\n */\n withTime?: boolean;\n}\n\n/**\n * DatePicker component based on [HeroUI DatePicker](https://v2.heroui.com/docs/components/date-picker)\n */\nconst DatePicker = ({\n className: _className = undefined,\n hourCycle = 24,\n hideTimeZone = false,\n maxValue = undefined,\n minValue = undefined,\n name,\n timeZone = undefined,\n valueType = 'string',\n withTime = false,\n ...uniformFieldProps\n}: DatePickerProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref, value },\n invalid,\n label,\n required,\n testId,\n } = useUniformField({ name, ...uniformFieldProps });\n\n // classNames from slots\n const variants = datePickerVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n const resolvedTimeZone = resolveDatePickerTimeZone(withTime, timeZone);\n\n // Normalize incoming form value into HeroUI's DateValue shape so the field can\n // render consistently from UTC strings, local strings, Date instances, or DateValue objects.\n const parsedValue = parseDateValue(\n value,\n withTime ? resolvedTimeZone : timeZone,\n );\n\n // Build the default placeholder value for time-enabled pickers.\n const placeholderValue = getDatePickerPlaceholderValue(withTime, timeZone);\n\n // Parse ISO boundary strings into HeroUI DateValue objects.\n const parsedMinValue = parseDateValue(\n minValue,\n withTime ? resolvedTimeZone : timeZone,\n ) as unknown as HeroDatePickerProps['minValue'];\n const parsedMaxValue = parseDateValue(\n maxValue,\n withTime ? resolvedTimeZone : timeZone,\n ) as unknown as HeroDatePickerProps['maxValue'];\n\n // Normalize DatePicker output into the configured storage format before writing to form state.\n const handleChange = (nextValue: DatePickerValue) => {\n if (nextValue == null) {\n onChange(null);\n return;\n }\n\n if (valueType === 'dateValue') {\n onChange(nextValue);\n return;\n }\n\n // String mode always stores UTC ISO values so form state is timezone-neutral\n // and comparable across users/locales.\n onChange(\n dateValueToUtcIsoString(nextValue, resolvedTimeZone ?? 'UTC') ??\n String(nextValue),\n );\n };\n\n return (\n <HeroDatePicker\n ref={ref}\n aria-label={label ? undefined : ariaLabel}\n classNames={{\n base: classNames.base,\n calendar: classNames.calendar,\n calendarContent: classNames.calendarContent,\n helperWrapper: classNames.helperWrapper,\n inputWrapper: classNames.inputWrapper,\n label: classNames.label,\n popoverContent: classNames.popoverContent,\n selectorButton: classNames.selectorButton,\n selectorIcon: classNames.selectorIcon,\n timeInput: classNames.timeInput,\n timeInputLabel: classNames.timeInputLabel,\n }}\n data-testid={testId}\n errorMessage={errorMessage}\n granularity={withTime ? 'minute' : 'day'}\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n id={testId}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label}\n labelPlacement=\"outside\"\n maxValue={parsedMaxValue}\n minValue={parsedMinValue}\n name={name}\n onBlur={onBlur}\n onChange={handleChange}\n placeholderValue={placeholderValue}\n radius=\"sm\"\n value={parsedValue}\n variant=\"bordered\"\n />\n );\n};\n\nexport default DatePicker;\n","import DatePicker from './DatePicker';\n\nexport type { DatePickerProps } from './DatePicker';\n\nexport { datePickerVariants } from './DatePicker';\n\nexport default DatePicker;\n"],"mappings":";;;;;;;AAiBA,MAAM,qBAAqB,UAAoC;CAC7D,OAAO;AACT;;AAGA,MAAM,mBAAmB,UAAoC;CAC3D,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,cAAc;AAC/D;;AAGA,MAAM,yBAAyB,UAA2B;CACxD,OAAO,sBAAsB,KAAK,KAAK,KAAK,CAAC,oBAAoB,KAAK;AACxE;;AAGA,MAAM,uBAAuB,UAA2B;CACtD,IAAI,MAAM,SAAS,GAAG,KAAK,MAAM,SAAS,GAAG,GAC3C,OAAO;CAGT,OAAO,4BAA4B,KAAK,KAAK;AAC/C;;AAGA,MAAM,YAAY,WAA2C;CAC3D,IAAI;EACF,OAAO,kBAAkB,OAAO,CAAC;CACnC,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;AASA,MAAa,kBACX,OACA,aACoB;CACpB,IAAI,SAAS,QAAQ,UAAU,IAC7B,OAAO;CAGT,IAAI,gBAAgB,KAAK,GACvB,OAAO,kBAAkB,KAAK;CAGhC,IAAI,iBAAiB,MACnB,OAAO,kBACL,WACI,cAAc,MAAM,YAA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GAC3B,gBAAgB,WAAW;GAC3B,cAAc,WAAW;GACzB,WAAW,WAAW;GACtB,gBAAgB,WAAW;EAC7B;EACA,eAAa;EACC;EACd,aAAa,WAAW,WAAW;EACrB;EACH;EACX,IAAI;EACJ,YAAY;EACZ,WAAW;EACX,YAAY;EACL;EACP,gBAAe;EACf,UAAU;EACV,UAAU;EACJ;EACE;EACR,UAAU;EACQ;EAClB,QAAO;EACP,OAAO;EACP,SAAQ;CACT,CAAA;AAEL;;AC3MA,IAAA,qBAAeC"}
1
+ {"version":3,"file":"index.mjs","names":["DatePicker","HeroDatePicker","DatePicker"],"sources":["../../src/DatePicker/dateHelpers.ts","../../src/DatePicker/DatePicker.tsx","../../src/DatePicker/index.ts"],"sourcesContent":["import type { DatePicker as HeroDatePicker } from '@heroui/date-picker';\nimport type { ComponentProps } from 'react';\n\nimport {\n getLocalTimeZone,\n now,\n parseAbsolute,\n parseAbsoluteToLocal,\n parseDate,\n parseDateTime,\n parseZonedDateTime,\n} from '@internationalized/date';\n\n/** Value type accepted by the HeroUI DatePicker */\nexport type DatePickerValue = ComponentProps<typeof HeroDatePicker>['value'];\n\n/** Cast unknown input to the DatePicker value union type. */\nconst asDatePickerValue = (value: unknown): DatePickerValue => {\n return value as DatePickerValue;\n};\n\n/** Check whether a value already looks like an @internationalized/date object. */\nconst isDateValueLike = (value: unknown): value is object => {\n return !!value && typeof value === 'object' && 'calendar' in value;\n};\n\n/** True for ISO datetime strings that do not yet include timezone information. */\nconst isNaiveDateTimeString = (value: string): boolean => {\n return /^\\d{4}-\\d{2}-\\d{2}T/.test(value) && !hasExplicitTimeZone(value);\n};\n\n/** True when an input already carries timezone/offset information. */\nconst hasExplicitTimeZone = (value: string): boolean => {\n if (value.includes('[') && value.includes(']')) {\n return true;\n }\n\n return /(?:[zZ]|[+-]\\d{2}:\\d{2})$/.test(value);\n};\n\n/** Safely run a parser and return `null` on parsing errors. */\nconst tryParse = (parser: () => unknown): DatePickerValue => {\n try {\n return asDatePickerValue(parser());\n } catch {\n return null;\n }\n};\n\n/**\n * Parse a form value into a HeroUI DatePicker compatible `DateValue`.\n *\n * Accepts existing `DateValue` objects, native `Date` instances, and ISO-like\n * strings (date, date-time, zoned, and absolute). Returns `null` when the value\n * is empty or cannot be parsed.\n */\nexport const parseDateValue = (\n value: unknown,\n timeZone?: string,\n): DatePickerValue => {\n if (value == null || value === '') {\n return null;\n }\n\n if (isDateValueLike(value)) {\n return asDatePickerValue(value);\n }\n\n if (value instanceof Date) {\n return asDatePickerValue(\n timeZone\n ? parseAbsolute(value.toISOString(), timeZone)\n : parseAbsoluteToLocal(value.toISOString()),\n );\n }\n\n if (typeof value !== 'string') {\n return null;\n }\n\n const normalizedValue = value.trim();\n if (normalizedValue === '') {\n return null;\n }\n\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(normalizedValue)) {\n return tryParse(() => {\n return parseDate(normalizedValue);\n });\n }\n\n const parsers: (() => unknown)[] = [\n ...(timeZone && isNaiveDateTimeString(normalizedValue)\n ? [\n () => {\n return parseZonedDateTime(`${normalizedValue}[${timeZone}]`);\n },\n ]\n : []),\n () => {\n return timeZone\n ? parseAbsolute(normalizedValue, timeZone)\n : parseAbsoluteToLocal(normalizedValue);\n },\n () => {\n return parseZonedDateTime(normalizedValue);\n },\n () => {\n return parseDateTime(normalizedValue);\n },\n () => {\n return parseDate(normalizedValue);\n },\n ];\n\n return (\n parsers\n .map((parser) => {\n return tryParse(parser);\n })\n .find((parsedValue) => {\n return parsedValue != null;\n }) ?? null\n );\n};\n\n/** Resolve the timezone used by the DatePicker when time fields are enabled. */\nexport const resolveDatePickerTimeZone = (\n withTime: boolean,\n timeZone?: string,\n): string | undefined => {\n if (!withTime) {\n return timeZone;\n }\n\n return timeZone ?? getLocalTimeZone();\n};\n\n/** Build the default placeholder value for time-enabled pickers. */\nexport const getDatePickerPlaceholderValue = (\n withTime: boolean,\n timeZone?: string,\n): DatePickerValue => {\n const resolvedTimeZone = resolveDatePickerTimeZone(withTime, timeZone);\n if (!resolvedTimeZone || !withTime) {\n return undefined;\n }\n\n return asDatePickerValue(now(resolvedTimeZone));\n};\n\n/**\n * Convert a date value into a UTC ISO string.\n *\n * `CalendarDate` and `CalendarDateTime` values are interpreted in the provided\n * timezone. `ZonedDateTime` values use their own timezone and offset.\n */\nexport const dateValueToUtcIsoString = (\n value: DatePickerValue,\n timeZone: string,\n): string | null => {\n if (value == null) {\n return null;\n }\n\n const maybeWithAbsoluteString = value as { toAbsoluteString?: () => string };\n if (typeof maybeWithAbsoluteString.toAbsoluteString === 'function') {\n return maybeWithAbsoluteString.toAbsoluteString();\n }\n\n const maybeWithToDate = value as { toDate?: (zone: string) => Date };\n if (typeof maybeWithToDate.toDate === 'function') {\n return maybeWithToDate.toDate(timeZone).toISOString();\n }\n\n return null;\n};\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { DatePickerProps as HeroDatePickerProps } from '@heroui/date-picker';\nimport type { ReactNode } from 'react';\nimport type { DatePickerValue } from './dateHelpers';\n\nimport { DatePicker as HeroDatePicker } from '@heroui/date-picker';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../hooks/useUniformField';\nimport {\n dateValueToUtcIsoString,\n getDatePickerPlaceholderValue,\n parseDateValue,\n resolveDatePickerTimeZone,\n} from './dateHelpers';\n\nexport const datePickerVariants = tv({\n slots: {\n /** wrapper around the whole date picker */\n base: '',\n /** helper wrapper for error/description */\n helperWrapper: [\n // set padding to 0 for error message exit animation\n 'p-0',\n ],\n /** the calendar element */\n calendar: '',\n /** the calendar's content element */\n calendarContent: '',\n /**\n * inner wrapper (HeroUI inputWrapper slot)\n *\n * NOTE: Unlike HeroUI Input, the DatePicker does not expose a\n * `data-focus` indicator on the group, so the focus border has to be\n * driven by the native `focus-within` state of the segment inputs.\n */\n inputWrapper: 'bg-content1 focus-within:border-focus',\n /** field label */\n label: 'cursor-default',\n /** the calendar popover element */\n popoverContent: '',\n /** selector button element */\n selectorButton: '',\n /** selector icon element */\n selectorIcon: '',\n /** the time-input component element */\n timeInput: '',\n /** the time-input component's label element */\n timeInputLabel: '',\n },\n variants: {\n readOnly: {\n true: {\n // Inner controls set their own cursors, so override every descendant.\n base: '**:cursor-not-allowed cursor-not-allowed opacity-disabled',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof datePickerVariants>;\ntype ClassName = TVClassName<typeof datePickerVariants>;\n\nexport interface DatePickerProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** date picker is disabled */\n disabled?: boolean;\n /** hide timezone abbreviation for zoned values */\n hideTimeZone?: boolean;\n /**\n * Optional hour cycle override.\n *\n * When omitted, the picker uses the user's locale default (12-hour or 24-hour).\n */\n hourCycle?: 12 | 24;\n /** form field label */\n label?: ReactNode;\n /** latest selectable value as ISO string */\n maxValue?: string;\n /** earliest selectable value as ISO string */\n minValue?: string;\n /** form field name */\n name: string;\n /** Prevents changes while keeping the date picker focusable and its value in validation and submission */\n readOnly?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /**\n * Optional advanced override for the display/interpretation timezone.\n *\n * When omitted, the picker uses the current user's local timezone while\n * `withTime` is enabled.\n */\n timeZone?: string;\n /** value format stored in form state (`string` stores UTC ISO values) */\n valueType?: 'dateValue' | 'string';\n /**\n * Enables date-time mode.\n *\n * - `false` (default): date-only input (`day` granularity)\n * - `true`: includes time segments (`minute` granularity)\n */\n withTime?: boolean;\n}\n\n/**\n * DatePicker component based on [HeroUI DatePicker](https://v2.heroui.com/docs/components/date-picker)\n */\nconst DatePicker = ({\n className: _className = undefined,\n hourCycle = 24,\n hideTimeZone = false,\n maxValue = undefined,\n minValue = undefined,\n name,\n timeZone = undefined,\n valueType = 'string',\n withTime = false,\n ...uniformFieldProps\n}: DatePickerProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref, value },\n invalid,\n label,\n readOnly,\n required,\n testId,\n } = useUniformField({ name, ...uniformFieldProps });\n\n // classNames from slots\n const variants = datePickerVariants({ readOnly });\n const classNames = variantsToClassNames(variants, _className, 'base');\n const resolvedTimeZone = resolveDatePickerTimeZone(withTime, timeZone);\n\n // Normalize incoming form value into HeroUI's DateValue shape so the field can\n // render consistently from UTC strings, local strings, Date instances, or DateValue objects.\n const parsedValue = parseDateValue(\n value,\n withTime ? resolvedTimeZone : timeZone,\n );\n\n // Build the default placeholder value for time-enabled pickers.\n const placeholderValue = getDatePickerPlaceholderValue(withTime, timeZone);\n\n // Parse ISO boundary strings into HeroUI DateValue objects.\n const parsedMinValue = parseDateValue(\n minValue,\n withTime ? resolvedTimeZone : timeZone,\n ) as unknown as HeroDatePickerProps['minValue'];\n const parsedMaxValue = parseDateValue(\n maxValue,\n withTime ? resolvedTimeZone : timeZone,\n ) as unknown as HeroDatePickerProps['maxValue'];\n\n // Normalize DatePicker output into the configured storage format before writing to form state.\n const handleChange = (nextValue: DatePickerValue) => {\n // read-only values ignore edits, e.g. from a calendar popover that was\n // already open when the field became read-only\n if (readOnly) {\n return;\n }\n\n if (nextValue == null) {\n onChange(null);\n return;\n }\n\n if (valueType === 'dateValue') {\n onChange(nextValue);\n return;\n }\n\n // String mode always stores UTC ISO values so form state is timezone-neutral\n // and comparable across users/locales.\n onChange(\n dateValueToUtcIsoString(nextValue, resolvedTimeZone ?? 'UTC') ??\n String(nextValue),\n );\n };\n\n return (\n <HeroDatePicker\n ref={ref}\n aria-label={label ? undefined : ariaLabel}\n classNames={{\n base: classNames.base,\n calendar: classNames.calendar,\n calendarContent: classNames.calendarContent,\n helperWrapper: classNames.helperWrapper,\n inputWrapper: classNames.inputWrapper,\n label: classNames.label,\n popoverContent: classNames.popoverContent,\n selectorButton: classNames.selectorButton,\n selectorIcon: classNames.selectorIcon,\n timeInput: classNames.timeInput,\n timeInputLabel: classNames.timeInputLabel,\n }}\n data-testid={testId}\n errorMessage={errorMessage}\n granularity={withTime ? 'minute' : 'day'}\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n id={testId}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n label={label}\n labelPlacement=\"outside\"\n maxValue={parsedMaxValue}\n minValue={parsedMinValue}\n name={name}\n onBlur={onBlur}\n onChange={handleChange}\n placeholderValue={placeholderValue}\n radius=\"sm\"\n // HeroUI does not forward isReadOnly to the popover's time input\n timeInputProps={{ isReadOnly: readOnly }}\n value={parsedValue}\n variant=\"bordered\"\n />\n );\n};\n\nexport default DatePicker;\n","import DatePicker from './DatePicker';\n\nexport type { DatePickerProps } from './DatePicker';\n\nexport { datePickerVariants } from './DatePicker';\n\nexport default DatePicker;\n"],"mappings":";;;;;;;AAiBA,MAAM,qBAAqB,UAAoC;CAC7D,OAAO;AACT;;AAGA,MAAM,mBAAmB,UAAoC;CAC3D,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,cAAc;AAC/D;;AAGA,MAAM,yBAAyB,UAA2B;CACxD,OAAO,sBAAsB,KAAK,KAAK,KAAK,CAAC,oBAAoB,KAAK;AACxE;;AAGA,MAAM,uBAAuB,UAA2B;CACtD,IAAI,MAAM,SAAS,GAAG,KAAK,MAAM,SAAS,GAAG,GAC3C,OAAO;CAGT,OAAO,4BAA4B,KAAK,KAAK;AAC/C;;AAGA,MAAM,YAAY,WAA2C;CAC3D,IAAI;EACF,OAAO,kBAAkB,OAAO,CAAC;CACnC,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;AASA,MAAa,kBACX,OACA,aACoB;CACpB,IAAI,SAAS,QAAQ,UAAU,IAC7B,OAAO;CAGT,IAAI,gBAAgB,KAAK,GACvB,OAAO,kBAAkB,KAAK;CAGhC,IAAI,iBAAiB,MACnB,OAAO,kBACL,WACI,cAAc,MAAM,YAAY,GAAG,QAAQ,IAC3C,qBAAqB,MAAM,YAAY,CAAC,CAC9C;CAGF,IAAI,OAAO,UAAU,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;GAClB,gBAAgB,WAAW;GAC3B,gBAAgB,WAAW;GAC3B,cAAc,WAAW;GACzB,WAAW,WAAW;GACtB,gBAAgB,WAAW;EAC7B;EACA,eAAa;EACC;EACd,aAAa,WAAW,WAAW;EACrB;EACH;EACX,IAAI;EACJ,YAAY;EACZ,WAAW;EACX,YAAY;EACZ,YAAY;EACL;EACP,gBAAe;EACf,UAAU;EACV,UAAU;EACJ;EACE;EACR,UAAU;EACQ;EAClB,QAAO;EAEP,gBAAgB,EAAE,YAAY,SAAS;EACvC,OAAO;EACP,SAAQ;CACT,CAAA;AAEL;;AC/NA,IAAA,qBAAeC"}
@@ -1,8 +1,8 @@
1
1
  import { flatArrayKey } from "../helpers/index.mjs";
2
- import { n as FieldValidationError } from "../FieldValidationError-BcUV0r1I.mjs";
3
- import { useUniformField } from "../hooks/useUniformField/index.mjs";
4
2
  import { useUniformFieldArray } from "../hooks/useUniformFieldArray/index.mjs";
5
3
  import { t as Grid_default } from "../Grid-Us2JFczS.mjs";
4
+ import { useUniformField } from "../hooks/useUniformField/index.mjs";
5
+ import { n as FieldValidationError } from "../FieldValidationError-BcUV0r1I.mjs";
6
6
  import { cn, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
7
7
  import { useState } from "react";
8
8
  import { Button, Menu } from "@fuf-stack/pixels";
@@ -1,6 +1,6 @@
1
- import { n as FieldValidationError } from "../FieldValidationError-BcUV0r1I.mjs";
2
1
  import { n as useFormContext, t as checkFieldIsRequired } from "../useFormContext-BEjPBdzb.mjs";
3
2
  import { useUniformField } from "../hooks/useUniformField/index.mjs";
3
+ import { n as FieldValidationError } from "../FieldValidationError-BcUV0r1I.mjs";
4
4
  import { cn, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
5
5
  import { useDebounce } from "@fuf-stack/pixels";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";