@new-black/lyra 1.29.0-next.1 → 1.29.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.
- package/dist/components/inputs/date-picker/date-picker.d.ts +40 -2
- package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-range-picker.d.ts +40 -2
- package/dist/components/inputs/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts +40 -2
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +40 -2
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/shared/input-footer.d.ts +14 -1
- package/dist/components/inputs/shared/input-footer.d.ts.map +1 -1
- package/dist/components/inputs/shared/styles.d.ts +45 -0
- package/dist/components/inputs/shared/styles.d.ts.map +1 -1
- package/dist/components/inputs/tag-input/tag-input.d.ts +40 -2
- package/dist/components/inputs/tag-input/tag-input.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +41 -3
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field-area/text-field-area.d.ts +39 -1
- package/dist/components/inputs/text-field-area/text-field-area.d.ts.map +1 -1
- package/dist/components/inputs/text-field-area/text-field-area.types.d.ts +2 -2
- package/dist/components/inputs/text-field-area/text-field-area.types.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +40 -2
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/lists/shared-list-item.d.ts +6 -6
- package/dist/components/svg-icon/svg-icon.d.ts +1 -1
- package/dist/components/text/text.d.ts +7 -0
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/text/text.styles.d.ts +7 -0
- package/dist/components/text/text.styles.d.ts.map +1 -1
- package/dist/index.css +2 -0
- package/dist/lyra.css +1 -1
- package/dist/lyra1133.cjs.map +1 -1
- package/dist/lyra1134.js.map +1 -1
- package/dist/lyra1135.cjs +1 -1
- package/dist/lyra1135.cjs.map +1 -1
- package/dist/lyra1136.js +36 -33
- package/dist/lyra1136.js.map +1 -1
- package/dist/lyra1137.cjs.map +1 -1
- package/dist/lyra1138.js.map +1 -1
- package/dist/lyra757.cjs +1 -1
- package/dist/lyra757.cjs.map +1 -1
- package/dist/lyra758.js +1 -0
- package/dist/lyra758.js.map +1 -1
- package/dist/lyra790.cjs +1 -1
- package/dist/lyra790.cjs.map +1 -1
- package/dist/lyra791.js +8 -0
- package/dist/lyra791.js.map +1 -1
- package/dist/lyra792.cjs +1 -1
- package/dist/lyra792.cjs.map +1 -1
- package/dist/lyra793.js +28 -18
- package/dist/lyra793.js.map +1 -1
- package/dist/lyra808.cjs.map +1 -1
- package/dist/lyra809.js.map +1 -1
- package/dist/lyra813.cjs.map +1 -1
- package/dist/lyra814.js.map +1 -1
- package/dist/lyra822.cjs.map +1 -1
- package/dist/lyra823.js.map +1 -1
- package/dist/lyra824.cjs +1 -1
- package/dist/lyra824.cjs.map +1 -1
- package/dist/lyra825.js +27 -24
- package/dist/lyra825.js.map +1 -1
- package/dist/lyra831.cjs.map +1 -1
- package/dist/lyra832.js.map +1 -1
- package/package.json +1 -1
package/dist/lyra814.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra814.js","names":["useContextProps","DateRangePickerContext","useLocale","AriaDateRangePicker","_Fragment","RangeCalendar","RangeCalendarStateContext","DateRangePickerStateContext","AriaButton","CalendarGrid","DateFormatter","getLocalTimeZone","Group","DateInput","DateSegment","CalendarGridBody","CalendarCell","$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7","$ad063034c8620db8$export$aa8b41735afcabd2","$12a3c853105e5a70$export$ad991b66133851cf","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$7705c033048f6da7$export$353f5b6fc5456de1","$6f9a1820b787aac7$export$5d847498420df57b","$6f9a1820b787aac7$export$5bd780d491cfc46c","$6f9a1820b787aac7$export$e11f8ba65d857bff","$6f9a1820b787aac7$export$a4f5c8b89d277a8d","$6f9a1820b787aac7$export$5e0fc348c00f87a0","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$5400c097f4765e59$export$7edc06cf1783b30f","$5400c097f4765e59$export$336ab7fa954c4b5f","$e539d00f123fdfd8$export$17334619f3ac2224","$e539d00f123fdfd8$export$8282edba42ee28a","$e539d00f123fdfd8$export$80d7ae1f804790be","Fragment$1","toLocalizedDatePlaceholder","dateFormatter","part","_DateRangePicker","props","ref","internalValue","setInternalValue","useState","value","defaultValue","isControlled","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","handleChange","useCallback","newValue","startYearComplete","endYearComplete","onChange","sharedInputStyles","startSlot","controlledProps","isDayGranularity","granularity","resolvedPresets","hidePresets","resolveDateRangePresets","additionalPresets","presets","disabledPresetIds","isDateUnavailable","locale","maxValue","minValue","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","renderProps","jsx","DateRangePickerButtonInput","DateRangePickerSegmentInputs","e","state","isDisabled","disableClearLogic","Popover","PopoverCalendarGrid","DateRangePickerPresetPanel","outerEndSlot","datePickerHeaderStyles","context","useContext","dateRangePickerState","hasCompleteSelection","previousSelectionCompleteRef","useRef","autoCloseOnCompleteSelection","getNextMonth","month","getPreviousMonth","onStartMonthChange","visibleRange","newMonth","newFocusedDate","focusedDate","focusNextPage","focusPreviousPage","setFocusedDate","onStartYearChange","onEndMonthChange","onEndYearChange","presetPanel","Separator","buttons","SvgIcon","MonthPicker","anchorDate","YearPicker","DatePickerCalendarGridHeader","DateRangePickerCalendarGridBody","DateRangePicker","fixedForwardRef","useDictionary","dateRangePickerStyles","formatTriggerDate","timeZone","date","singleDatePlaceholder","emptyRangePlaceholder","triggerButtonRef","triggerLabel","InputHeader","inputField","isFocusWithin","isInvalid","errorMessage","triggerButton","triggerText","Tooltip","clear","buttonExcludedFromTabOrder","setValue","InputFooter","dictionary","getPresetLabel","preset","isPresetSelected","presetList","presetButton","onPresetSelect","setOpen","segmentStyles","dateFieldStyles","calendarButtonRef","input","segment","button","isFocusVisible","dataPickerCalendarGridStyles","rangeBodyCell"],"sources":["../src/components/inputs/date-picker/date-range-picker.tsx"],"sourcesContent":["import {\n ElementRef,\n ForwardedRef,\n KeyboardEventHandler,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button as AriaButton,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n DateInput,\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerContext,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateRangePickerStateContext,\n DateSegment,\n DateValue,\n Group,\n RangeCalendar,\n RangeCalendarStateContext,\n useContextProps,\n useLocale,\n} from \"react-aria-components\";\n\nimport { DateFormatter, getLocalTimeZone } from \"@internationalized/date\";\nimport { RangeValue } from \"@react-types/shared\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { Popover } from \"../../overlays\";\nimport { Separator } from \"../../separator\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nimport {\n dataPickerCalendarGridStyles,\n dateFieldStyles,\n datePickerHeaderStyles,\n dateRangePickerStyles,\n} from \"./date-picker.styles\";\nimport {\n DateRangePresetDescriptor,\n ResolvedDateRangePreset,\n resolveDateRangePresets,\n} from \"./date-range-presets\";\nimport { DatePickerCalendarGridHeader, MonthPicker, YearPicker } from \"./shared\";\n\nexport type DateRangePickerProps<T extends DateValue> = Omit<\n AriaDateRangePickerProps<T>,\n \"className\"\n> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasStartSlot\" | \"hasEndSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n className?: string;\n startSlot?: JSX.Element;\n disableClearLogic?: boolean;\n hidePresets?: boolean;\n additionalPresets?: DateRangePresetDescriptor[];\n disabledPresetIds?: string[];\n /**\n * Legacy full override.\n * Prefer `additionalPresets` + `disabledPresetIds`.\n */\n presets?: DateRangePresetDescriptor[];\n onPresetSelect?: (presetId: string, range: RangeValue<DateValue>) => void;\n };\n\nexport type { DateRangePresetDescriptor, DateValue };\n\nconst toLocalizedDatePlaceholder = (dateFormatter: DateFormatter) => {\n return dateFormatter\n .formatToParts(new Date(2006, 0, 2))\n .map((part) => {\n switch (part.type) {\n case \"day\":\n return \"dd\";\n case \"month\":\n return \"mm\";\n case \"year\":\n return \"yyyy\";\n default:\n return part.value;\n }\n })\n .join(\"\");\n};\n\nconst _DateRangePicker = <T extends DateValue>(\n {\n className,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth = true,\n granularity = \"day\",\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n hidePresets,\n additionalPresets,\n disabledPresetIds,\n label,\n onPresetSelect,\n outerEndSlot,\n outerStartSlot,\n presets,\n startSlot,\n ...props\n }: DateRangePickerProps<T>,\n ref: ForwardedRef<ElementRef<typeof AriaDateRangePicker>>,\n) => {\n [props, ref] = useContextProps(props, ref, DateRangePickerContext);\n const { defaultValue, isDateUnavailable, isInvalid, isRequired, maxValue, minValue, onChange, value } =\n props;\n const { locale } = useLocale();\n\n const [internalValue, setInternalValue] = useState(value || defaultValue || null);\n\n // Sync internal value with external value prop and handle resets\n // Only run this effect when we're in controlled mode (value prop is explicitly passed)\n const isControlled = \"value\" in props;\n\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n setInternalValue(value || null);\n }, [value, isControlled]);\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n // Handle changes - update internal state only in uncontrolled mode, conditionally call external onChange\n const handleChange = useCallback(\n (newValue: Parameters<NonNullable<typeof onChange>>[0]) => {\n // AriaDateRangePicker passes MappedDateValue<T> which TypeScript can't reconcile with T\n // This single assertion is unavoidable due to the library's type design\n setInternalValue(newValue as typeof internalValue);\n\n // Check if both years are complete (4 digits each)\n const startYearComplete = !newValue?.start || newValue.start.year.toString().length === 4;\n const endYearComplete = !newValue?.end || newValue.end.year.toString().length === 4;\n\n // Only fire external onChange callback if newValue is null or both years are complete\n if (!newValue || (startYearComplete && endYearComplete)) {\n onChange?.(newValue);\n }\n },\n [onChange],\n );\n\n const { outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n const controlledProps = isControlled ? { value: internalValue, onChange: handleChange } : {};\n const isDayGranularity = granularity === \"day\";\n\n const resolvedPresets = useMemo(\n () =>\n isDayGranularity && !hidePresets\n ? resolveDateRangePresets({\n additionalDescriptors: additionalPresets,\n descriptors: presets,\n disabledPresetIds,\n isDateUnavailable: isDateUnavailable as ((date: DateValue) => boolean) | undefined,\n locale,\n maxValue: maxValue as DateValue | undefined,\n minValue: minValue as DateValue | undefined,\n })\n : [],\n [\n additionalPresets,\n disabledPresetIds,\n hidePresets,\n isDateUnavailable,\n isDayGranularity,\n locale,\n maxValue,\n minValue,\n presets,\n ],\n );\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaDateRangePicker\n {...props}\n {...controlledProps}\n granularity={granularity}\n className={(renderProps) =>\n wrapper({\n className,\n isDisabled: renderProps.isDisabled,\n })\n }\n isInvalid={isInvalid}\n ref={ref}\n >\n {({ isDisabled, state }) => (\n <>\n {isDayGranularity ? (\n <DateRangePickerButtonInput\n description={description}\n fullWidth={fullWidth}\n errorMessage={errorMessage}\n hideHintLabel={hideHintLabel}\n hideInputFooter={hideInputFooter}\n hideInputHeader={hideInputHeader}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n customHint={props.customHint}\n startSlot={startSlot}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" &&\n state.value?.end &&\n state.value?.start &&\n !isDisabled &&\n !disableClearLogic\n ) {\n e.preventDefault();\n state.setValue(null);\n }\n }}\n disableClearLogic={disableClearLogic}\n />\n ) : (\n <DateRangePickerSegmentInputs\n description={description}\n fullWidth={fullWidth}\n errorMessage={errorMessage}\n hideHintLabel={hideHintLabel}\n hideInputFooter={hideInputFooter}\n hideInputHeader={hideInputHeader}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n customHint={props.customHint}\n startSlot={startSlot}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" &&\n state.value?.end &&\n state.value?.start &&\n !isDisabled &&\n !disableClearLogic\n ) {\n e.preventDefault();\n state.setValue(null);\n }\n }}\n disableClearLogic={disableClearLogic}\n />\n )}\n\n <Popover disablePadding className=\"group\">\n <RangeCalendar visibleDuration={{ months: 2 }} pageBehavior=\"single\">\n <PopoverCalendarGrid\n autoCloseOnCompleteSelection={isDayGranularity}\n presetPanel={\n resolvedPresets.length ? (\n <DateRangePickerPresetPanel\n isDisabled={isDisabled}\n presets={resolvedPresets}\n onPresetSelect={onPresetSelect}\n />\n ) : null\n }\n />\n </RangeCalendar>\n </Popover>\n </>\n )}\n </AriaDateRangePicker>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\ntype PopoverCalendarGridProps = {\n presetPanel?: ReactNode;\n autoCloseOnCompleteSelection?: boolean;\n};\n\nconst PopoverCalendarGrid = ({\n autoCloseOnCompleteSelection,\n presetPanel,\n}: PopoverCalendarGridProps) => {\n const { buttons } = datePickerHeaderStyles();\n\n const context = useContext(RangeCalendarStateContext);\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"RangeCalendarStateContext is not provided.\");\n }\n\n if (!dateRangePickerState) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const {\n anchorDate,\n focusedDate,\n focusNextPage,\n focusPreviousPage,\n setFocusedDate,\n visibleRange,\n } = context;\n\n const hasCompleteSelection = !!dateRangePickerState.value?.start && !!dateRangePickerState.value?.end;\n const previousSelectionCompleteRef = useRef(hasCompleteSelection);\n\n useEffect(() => {\n if (\n autoCloseOnCompleteSelection &&\n dateRangePickerState.isOpen &&\n hasCompleteSelection &&\n !previousSelectionCompleteRef.current\n ) {\n dateRangePickerState.setOpen(false);\n }\n\n previousSelectionCompleteRef.current = hasCompleteSelection;\n }, [autoCloseOnCompleteSelection, dateRangePickerState, hasCompleteSelection]);\n\n const getNextMonth = (month: number) => (month === 12 ? 1 : month + 1);\n const getPreviousMonth = (month: number) => (month === 1 ? 12 : month - 1);\n\n /**\n * Visible range logic from react-aria\n * - when setting a focused date before the current start range, the focused date is set to the end of the visible range\n * - when setting a focused date after the current end range, the focused date is set to the start of the visible range\n */\n const onStartMonthChange = useCallback(\n (value: number) => {\n if (value === visibleRange.start.month - 1) {\n focusPreviousPage();\n } else if (value === visibleRange.start.month + 1) {\n focusNextPage();\n } else {\n // when going in the past we need to make sure the focused date is in the next month so the visible range starts where we want\n const newMonth = value < visibleRange.start.month ? getNextMonth(value) : value;\n const newFocusedDate = visibleRange.start.copy().set({\n month: newMonth,\n day: focusedDate.day,\n });\n setFocusedDate(newFocusedDate);\n }\n },\n [focusNextPage, focusPreviousPage, focusedDate.day, setFocusedDate, visibleRange.start],\n );\n\n const onStartYearChange = useCallback(\n (value: number): void => {\n // handle Dec-Jan visible range separately\n if (visibleRange.start.year !== visibleRange.end.year) {\n // when going in the past the focused date should be in January so the visible range starts where we want\n if (value < visibleRange.start.year) {\n const newFocusedDate = visibleRange.start.copy().set({\n year: value + 1,\n day: focusedDate.day,\n month: 1,\n });\n\n setFocusedDate(newFocusedDate);\n }\n // when going in the future the focused date should be in December so the visible range starts where we want\n if (value > visibleRange.start.year) {\n const newFocusedDate = visibleRange.start.copy().set({\n year: value,\n day: focusedDate.day,\n month: 12,\n });\n\n setFocusedDate(newFocusedDate);\n }\n } else {\n // when going in the past we need to make sure the focused date is in the next month so the visible range starts where we want\n const newMonth =\n value < visibleRange.start.year\n ? getNextMonth(visibleRange.start.month)\n : visibleRange.start.month;\n const newFocusedDate = visibleRange.start.copy().set({\n year: value,\n day: focusedDate.day,\n month: newMonth,\n });\n\n setFocusedDate(newFocusedDate);\n }\n },\n [focusedDate.day, setFocusedDate, visibleRange.end.year, visibleRange.start],\n );\n\n const onEndMonthChange = useCallback(\n (value: number): void => {\n if (value === visibleRange.end.month - 1) {\n focusPreviousPage();\n } else if (value === visibleRange.end.month + 1) {\n focusNextPage();\n } else {\n // when going in the future we need to make sure the focused date is in the previous month so the visible range starts where we want\n const newMonth = value > visibleRange.end.month ? getPreviousMonth(value) : value;\n const newFocusedDate = visibleRange.end.copy().set({\n month: newMonth,\n day: focusedDate.day,\n });\n setFocusedDate(newFocusedDate);\n }\n },\n [focusNextPage, focusPreviousPage, focusedDate.day, setFocusedDate, visibleRange.end],\n );\n\n const onEndYearChange = useCallback(\n (value: number): void => {\n // handle Dec-Jan visible range separately\n if (visibleRange.start.year !== visibleRange.end.year) {\n // when going in the past the focused date should be in January so the visible range starts where we want\n if (value < visibleRange.end.year) {\n const newFocusedDate = visibleRange.end.copy().set({\n year: value,\n day: focusedDate.day,\n month: 1,\n });\n\n setFocusedDate(newFocusedDate);\n }\n if (value > visibleRange.end.year) {\n // when going in the future the focused date should be in December so the visible range starts where we want\n const newFocusedDate = visibleRange.end.copy().set({\n year: value - 1,\n day: focusedDate.day,\n month: 12,\n });\n\n setFocusedDate(newFocusedDate);\n }\n } else {\n // when going in the future we need to make sure the focused date is in the previous month so the visible range starts where we want\n const newMonth =\n value > visibleRange.end.year\n ? getPreviousMonth(visibleRange.end.month)\n : visibleRange.end.month;\n const newFocusedDate = visibleRange.end.copy().set({\n year: value,\n day: focusedDate.day,\n month: newMonth,\n });\n\n setFocusedDate(newFocusedDate);\n }\n },\n [focusedDate.day, setFocusedDate, visibleRange.end, visibleRange.start.year],\n );\n\n return (\n <div className=\"flex flex-col gap-3 p-3 lg:flex-row\">\n {presetPanel ? (\n <>\n <div className=\"lg:w-52\">{presetPanel}</div>\n <Separator orientation=\"vertical\" className=\"hidden h-[unset] self-stretch lg:block\" />\n <Separator className=\"lg:hidden\" />\n </>\n ) : null}\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex justify-between gap-1\">\n <AriaButton slot=\"previous\" className={buttons()}>\n <SvgIcon name=\"chevron-left\" />\n </AriaButton>\n <div className=\"flex gap-1\">\n <MonthPicker\n value={visibleRange.start.month}\n isDisabled={!!anchorDate}\n onChange={onStartMonthChange}\n />\n <YearPicker\n value={visibleRange.start.year}\n isDisabled={!!anchorDate}\n onChange={onStartYearChange}\n />\n </div>\n <div className=\"w-6\" />\n </div>\n <CalendarGrid className=\"w-full text-center\">\n <DatePickerCalendarGridHeader />\n <DateRangePickerCalendarGridBody />\n </CalendarGrid>\n </div>\n\n <Separator orientation=\"vertical\" className=\"hidden h-[unset] self-stretch sm:block\" />\n <Separator className=\"sm:hidden\" />\n\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex justify-between gap-1\">\n <div className=\"w-6\" />\n <div className=\"flex gap-1\">\n <MonthPicker\n value={visibleRange.end.month}\n isDisabled={!!anchorDate}\n onChange={onEndMonthChange}\n />\n <YearPicker\n value={visibleRange.end.year}\n isDisabled={!!anchorDate}\n onChange={onEndYearChange}\n />\n </div>\n <AriaButton slot=\"next\" className={buttons()}>\n <SvgIcon name=\"chevron-right\" />\n </AriaButton>\n </div>\n <CalendarGrid className=\"w-full text-center\" offset={{ months: 1 }}>\n <DatePickerCalendarGridHeader />\n <DateRangePickerCalendarGridBody />\n </CalendarGrid>\n </div>\n </div>\n </div>\n );\n};\n\nexport const DateRangePicker = fixedForwardRef(_DateRangePicker);\n//@ts-ignore\nDateRangePicker.displayName = \"DateRangePicker\";\n\ntype DateRangePickerInputProps = VariantProps<typeof sharedInputStyles> &\n InputHeaderProps &\n InputFooterProps & {\n startSlot?: JSX.Element;\n onKeyDown?: KeyboardEventHandler<HTMLElement>;\n disableClearLogic?: boolean;\n };\n\nconst DateRangePickerButtonInput = ({\n customHint,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n isDisabled,\n isRequired,\n label,\n onKeyDown,\n startSlot,\n}: DateRangePickerInputProps) => {\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { buttonExcludedFromTabOrder, inputField } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n isInputOnly: false,\n });\n\n const { clear } = useDictionary();\n const { locale } = useLocale();\n\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setValue, value } = context;\n const { triggerButton, triggerText } = dateRangePickerStyles();\n\n const dateFormatter = useMemo(\n () =>\n new DateFormatter(locale, {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n }),\n [locale],\n );\n const formatTriggerDate = useCallback(\n (date: DateValue) => {\n const timeZone = \"timeZone\" in date ? date.timeZone : getLocalTimeZone();\n return dateFormatter.format(date.toDate(timeZone));\n },\n [dateFormatter],\n );\n const singleDatePlaceholder = useMemo(\n () => toLocalizedDatePlaceholder(dateFormatter),\n [dateFormatter],\n );\n const emptyRangePlaceholder = useMemo(\n () => `${singleDatePlaceholder} - ${singleDatePlaceholder}`,\n [singleDatePlaceholder],\n );\n\n const triggerButtonRef = useRef<HTMLButtonElement | null>(null);\n\n const triggerLabel = useMemo(() => {\n if (!value?.start && !value?.end) {\n return emptyRangePlaceholder;\n }\n\n const startText = value?.start ? formatTriggerDate(value.start) : singleDatePlaceholder;\n const endText = value?.end ? formatTriggerDate(value.end) : singleDatePlaceholder;\n\n return `${startText} - ${endText}`;\n }, [emptyRangePlaceholder, formatTriggerDate, singleDatePlaceholder, value?.end, value?.start]);\n\n return (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n hideHintLabel={hideHintLabel}\n isRequired={isRequired}\n customHint={customHint}\n />\n ) : null}\n\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n inputField({\n isDisabled,\n isFocused: isFocusWithin,\n isHovered,\n isInvalid: isInvalid || !!errorMessage,\n className: \"min-h-8\",\n })\n }\n onKeyDown={onKeyDown}\n >\n {startSlot}\n <div className=\"hidden\" aria-hidden=\"true\">\n <DateInput slot=\"start\">\n {(segment) => <DateSegment segment={segment} className=\"hidden\" />}\n </DateInput>\n <DateInput slot=\"end\">\n {(segment) => <DateSegment segment={segment} className=\"hidden\" />}\n </DateInput>\n </div>\n\n <AriaButton\n ref={triggerButtonRef}\n isDisabled={isDisabled}\n className={triggerButton()}\n data-testid=\"date-range-picker-trigger\"\n >\n <span className={triggerText({ hasValue: !!value?.start || !!value?.end })}>{triggerLabel}</span>\n <SvgIcon name=\"calendar\" />\n </AriaButton>\n\n {!isDisabled && value?.end && value?.start && !disableClearLogic ? (\n <Tooltip tooltip={clear}>\n <AriaButton\n slot={null}\n excludeFromTabOrder\n className={buttonExcludedFromTabOrder()}\n onPress={() => {\n setValue(null);\n triggerButtonRef.current?.focus();\n }}\n >\n <SvgIcon name=\"clear\" />\n </AriaButton>\n </Tooltip>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n );\n};\n\ntype DateRangePickerPresetPanelProps = {\n isDisabled?: boolean;\n presets: ResolvedDateRangePreset[];\n onPresetSelect?: (presetId: string, range: RangeValue<DateValue>) => void;\n};\n\nconst DateRangePickerPresetPanel = ({\n isDisabled,\n onPresetSelect,\n presets,\n}: DateRangePickerPresetPanelProps) => {\n const dictionary = useDictionary();\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setOpen, setValue, value } = context;\n const { presetButton, presetList } = dateRangePickerStyles();\n\n const getPresetLabel = useCallback(\n (preset: ResolvedDateRangePreset) => {\n if (preset.descriptor.label) {\n return preset.descriptor.label;\n }\n\n switch (preset.descriptor.kind) {\n case \"today\":\n return dictionary.dateRangePresetToday;\n case \"yesterday\":\n return dictionary.dateRangePresetYesterday;\n case \"tomorrow\":\n return dictionary.dateRangePresetTomorrow;\n case \"lastDays\":\n return dictionary.dateRangePresetLastDays(preset.descriptor.days);\n case \"nextDays\":\n return dictionary.dateRangePresetNextDays(preset.descriptor.days);\n case \"thisWeek\":\n return dictionary.dateRangePresetThisWeek;\n case \"lastWeek\":\n return dictionary.dateRangePresetLastWeek;\n case \"nextWeek\":\n return dictionary.dateRangePresetNextWeek;\n case \"thisMonth\":\n return dictionary.dateRangePresetThisMonth;\n case \"lastMonth\":\n return dictionary.dateRangePresetLastMonth;\n case \"nextMonth\":\n return dictionary.dateRangePresetNextMonth;\n case \"thisQuarter\":\n return dictionary.dateRangePresetThisQuarter;\n case \"lastQuarter\":\n return dictionary.dateRangePresetLastQuarter;\n case \"nextQuarter\":\n return dictionary.dateRangePresetNextQuarter;\n case \"thisYear\":\n return dictionary.dateRangePresetThisYear;\n case \"lastYear\":\n return dictionary.dateRangePresetLastYear;\n case \"nextYear\":\n return dictionary.dateRangePresetNextYear;\n default:\n return \"\";\n }\n },\n [dictionary],\n );\n\n const isPresetSelected = useCallback(\n (preset: ResolvedDateRangePreset) => {\n if (!value?.start || !value.end) {\n return false;\n }\n\n return value.start.compare(preset.range.start) === 0 && value.end.compare(preset.range.end) === 0;\n },\n [value?.end, value?.start],\n );\n\n return (\n <div className={presetList()} data-testid=\"date-range-preset-list\">\n {presets.map((preset) => (\n <AriaButton\n key={preset.descriptor.id}\n slot={null}\n isDisabled={isDisabled}\n data-testid={`date-range-preset-${preset.descriptor.id}`}\n className={presetButton({ isPresetSelected: isPresetSelected(preset) })}\n onPress={() => {\n setValue(preset.range as Parameters<typeof setValue>[0]);\n onPresetSelect?.(preset.descriptor.id, preset.range);\n setOpen(false);\n }}\n >\n {getPresetLabel(preset)}\n </AriaButton>\n ))}\n </div>\n );\n};\n\nconst DateRangePickerSegmentInputs = ({\n customHint,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n isDisabled,\n isRequired,\n label,\n onKeyDown,\n startSlot,\n}: DateRangePickerInputProps) => {\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, segment: segmentStyles } = dateFieldStyles();\n const { button, buttonExcludedFromTabOrder, inputField } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n isInputOnly: false,\n });\n\n const { clear } = useDictionary();\n\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setValue, value } = context;\n\n const calendarButtonRef = useRef<HTMLButtonElement | null>(null);\n\n return (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n hideHintLabel={hideHintLabel}\n isRequired={isRequired}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n inputField({\n isDisabled,\n isFocused: isFocusWithin,\n isHovered,\n isInvalid: isInvalid || !!errorMessage,\n className: \"min-h-8\",\n })\n }\n onKeyDown={onKeyDown}\n >\n {startSlot}\n <DateInput className={input()} slot=\"start\">\n {(segment) => (\n <DateSegment\n className={({ isFocused }) => {\n return segmentStyles({\n isFocused,\n isDisabled,\n // consider literals (separators between segments) to have a value when a full date is entered\n hasValue: segment.type === \"literal\" ? !!value?.start : !segment.isPlaceholder,\n });\n }}\n segment={segment}\n />\n )}\n </DateInput>\n\n <span\n aria-hidden=\"true\"\n className={\n !!value?.start && !!value.end && !isDisabled ? \"text-primary\" : \"text-tertiary\"\n }\n >\n – \n </span>\n\n <DateInput className={input()} slot=\"end\">\n {(segment) => (\n <DateSegment\n className={({ isFocused }) => {\n return segmentStyles({\n isFocused,\n isDisabled,\n // consider literals (separators between segments) to have a value when a full date is entered\n hasValue: segment.type === \"literal\" ? !!value?.end : !segment.isPlaceholder,\n });\n }}\n segment={segment}\n />\n )}\n </DateInput>\n\n {/* We reverse the order so we can go back to the date input by pressing the left arrow when the calendar button is focused. \n Otherwise the clear button would be focused instead and it would move the focus back to the calendar button */}\n <div className=\"ms-auto flex flex-row-reverse gap-2\">\n <AriaButton\n isDisabled={isDisabled}\n className={({ isDisabled, isFocusVisible, isHovered }) =>\n button({ isDisabled, isFocused: isFocusVisible, isHovered })\n }\n ref={calendarButtonRef}\n >\n <SvgIcon name=\"calendar\" />\n </AriaButton>\n\n {!isDisabled && value?.end && value?.start && !disableClearLogic ? (\n <Tooltip tooltip={clear}>\n <AriaButton\n slot={null}\n onFocus={(e) => {\n e.preventDefault();\n // when filling in a full value in the input this button gets focus automatically, we move focus the calendar button instead\n calendarButtonRef?.current?.focus();\n }}\n excludeFromTabOrder\n className={buttonExcludedFromTabOrder()}\n onPress={() => {\n setValue(null);\n // focus the calendar button after clearing the value\n // this way the user can easily open the calendar again\n // plus focusing another element afterwards makes sure that the focus is moved\n // https://n6k.atlassian.net/browse/OPTR-31779\n calendarButtonRef.current?.focus();\n }}\n >\n <SvgIcon name=\"clear\" />\n </AriaButton>\n </Tooltip>\n ) : null}\n </div>\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n );\n};\n\nconst DateRangePickerCalendarGridBody = () => {\n const { rangeBodyCell } = dataPickerCalendarGridStyles();\n\n return (\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n date={date}\n className={({\n isDisabled,\n isFocusVisible,\n isHovered,\n isOutsideMonth,\n isPressed,\n isSelected,\n isSelectionEnd,\n isSelectionStart,\n isUnavailable,\n }) =>\n rangeBodyCell({\n isSelected,\n isSelectionStart,\n isSelectionEnd,\n isFocusVisible,\n isHovered,\n isUnavailable,\n isDisabled,\n isOutsideMonth,\n isPressed,\n })\n }\n />\n )}\n </CalendarGridBody>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,IAAMkC,KAA8B,MAC3BC,EACJ,cAAc,IAAI,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,CACnC,KAAK,MAAS;CACb,QAAQC,EAAK,MAAb;EACE,KAAK,OACH,OAAO;EACT,KAAK,SACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,SACE,OAAOA,EAAK;CAChB;AACF,CAAC,CAAC,CACD,KAAK,EAAE,GAGNC,KACJ,EACE,cACA,gBACA,sBACA,iBACA,eAAY,IACZ,iBAAc,OACd,kBACA,oBACA,oBACA,gBACA,sBACA,sBACA,UACA,mBACA,iBACA,mBACA,YACA,cACA,GAAGC,KAEL,MACG;CACH,CAACA,GAAOC,KAAOvC,EAAgBsC,GAAOC,GAAKtC,CAAsB;CACjE,IAAM,EAAE,iBAAc,sBAAmB,cAAW,eAAY,aAAU,aAAU,aAAU,aAC5FqC,GACI,EAAE,cAAWpC,EAAU,GAEvB,CAACsC,GAAeC,KAAoBC,EAASC,KAASC,KAAgB,IAAI,GAI1EC,IAAe,WAAWP;CAEhC,QAAgB;EACd,AAAKO,KAILJ,EAAiBE,KAAS,IAAI;CAChC,GAAG,CAACA,GAAOE,CAAY,CAAC;CAExB,IAAMC,IAAiBC,QACfC,EAAwB;EAAE;EAAe;EAAiB;CAAM,CAAC,GACvE;EAACC;EAAeC;E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SAAS,MAAM;OACpC;OACA,qBAAA;OACA,WAAWb,EAA2B;OACtC,eAAe;QAMb,AALAC,EAAS,IAAI,GAKbY,EAAkB,SAAS,MAAM;OACnC;OAEA,UAAA,kBAACvC,GAAD,EAAS,MAAK,QAAS,CAAA;MACb,CAAA;KACL,CAAA,IACP,IACD;;GACA;;EAEP,kBAAC4B,GAAD;GACe;GACC;GACG;EAClB,CAAA;CACD,EAAA,CAAA;AAEN,GAEMvB,UAAwC;CAC5C,IAAM,EAAE,qBAAkBuC,EAA6B;CAEvD,OACE,kBAAC/I,GAAD,EAAA,WACI,MACA,kBAACC,GAAD;EACQ;EACN,YAAY,EACV,eACA,mBACA,cACA,mBACA,cACA,eACA,mBACA,qBACA,uBAEA+I,EAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;CAEJ,CAAA,EAEa,CAAA;AAEtB"}
|
|
1
|
+
{"version":3,"file":"lyra814.js","names":["useContextProps","DateRangePickerContext","useLocale","AriaDateRangePicker","_Fragment","RangeCalendar","RangeCalendarStateContext","DateRangePickerStateContext","AriaButton","CalendarGrid","DateFormatter","getLocalTimeZone","Group","DateInput","DateSegment","CalendarGridBody","CalendarCell","$2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7","$ad063034c8620db8$export$aa8b41735afcabd2","$12a3c853105e5a70$export$ad991b66133851cf","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$7705c033048f6da7$export$353f5b6fc5456de1","$6f9a1820b787aac7$export$5d847498420df57b","$6f9a1820b787aac7$export$5bd780d491cfc46c","$6f9a1820b787aac7$export$e11f8ba65d857bff","$6f9a1820b787aac7$export$a4f5c8b89d277a8d","$6f9a1820b787aac7$export$5e0fc348c00f87a0","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$5400c097f4765e59$export$7edc06cf1783b30f","$5400c097f4765e59$export$336ab7fa954c4b5f","$e539d00f123fdfd8$export$17334619f3ac2224","$e539d00f123fdfd8$export$8282edba42ee28a","$e539d00f123fdfd8$export$80d7ae1f804790be","Fragment$1","toLocalizedDatePlaceholder","dateFormatter","part","_DateRangePicker","props","ref","internalValue","setInternalValue","useState","value","defaultValue","isControlled","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","handleChange","useCallback","newValue","startYearComplete","endYearComplete","onChange","sharedInputStyles","startSlot","controlledProps","isDayGranularity","granularity","resolvedPresets","hidePresets","resolveDateRangePresets","additionalPresets","presets","disabledPresetIds","isDateUnavailable","locale","maxValue","minValue","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","renderProps","jsx","DateRangePickerButtonInput","DateRangePickerSegmentInputs","e","state","isDisabled","disableClearLogic","Popover","PopoverCalendarGrid","DateRangePickerPresetPanel","outerEndSlot","datePickerHeaderStyles","context","useContext","dateRangePickerState","hasCompleteSelection","previousSelectionCompleteRef","useRef","autoCloseOnCompleteSelection","getNextMonth","month","getPreviousMonth","onStartMonthChange","visibleRange","newMonth","newFocusedDate","focusedDate","focusNextPage","focusPreviousPage","setFocusedDate","onStartYearChange","onEndMonthChange","onEndYearChange","presetPanel","Separator","buttons","SvgIcon","MonthPicker","anchorDate","YearPicker","DatePickerCalendarGridHeader","DateRangePickerCalendarGridBody","DateRangePicker","fixedForwardRef","useDictionary","dateRangePickerStyles","formatTriggerDate","timeZone","date","singleDatePlaceholder","emptyRangePlaceholder","triggerButtonRef","triggerLabel","InputHeader","inputField","isFocusWithin","isInvalid","errorMessage","triggerButton","triggerText","Tooltip","clear","buttonExcludedFromTabOrder","setValue","InputFooter","dictionary","getPresetLabel","preset","isPresetSelected","presetList","presetButton","onPresetSelect","setOpen","segmentStyles","dateFieldStyles","calendarButtonRef","input","segment","button","isFocusVisible","dataPickerCalendarGridStyles","rangeBodyCell"],"sources":["../src/components/inputs/date-picker/date-range-picker.tsx"],"sourcesContent":["import {\n ElementRef,\n ForwardedRef,\n KeyboardEventHandler,\n ReactNode,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button as AriaButton,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n DateInput,\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerContext,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateRangePickerStateContext,\n DateSegment,\n DateValue,\n Group,\n RangeCalendar,\n RangeCalendarStateContext,\n useContextProps,\n useLocale,\n} from \"react-aria-components\";\n\nimport { DateFormatter, getLocalTimeZone } from \"@internationalized/date\";\nimport { RangeValue } from \"@react-types/shared\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { Popover } from \"../../overlays\";\nimport { Separator } from \"../../separator\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nimport {\n dataPickerCalendarGridStyles,\n dateFieldStyles,\n datePickerHeaderStyles,\n dateRangePickerStyles,\n} from \"./date-picker.styles\";\nimport {\n DateRangePresetDescriptor,\n ResolvedDateRangePreset,\n resolveDateRangePresets,\n} from \"./date-range-presets\";\nimport { DatePickerCalendarGridHeader, MonthPicker, YearPicker } from \"./shared\";\n\nexport type DateRangePickerProps<T extends DateValue> = Omit<\n AriaDateRangePickerProps<T>,\n \"className\"\n> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasStartSlot\" | \"hasEndSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n className?: string;\n startSlot?: JSX.Element;\n disableClearLogic?: boolean;\n hidePresets?: boolean;\n additionalPresets?: DateRangePresetDescriptor[];\n disabledPresetIds?: string[];\n /**\n * Legacy full override.\n * Prefer `additionalPresets` + `disabledPresetIds`.\n */\n presets?: DateRangePresetDescriptor[];\n onPresetSelect?: (presetId: string, range: RangeValue<DateValue>) => void;\n };\n\nexport type { DateRangePresetDescriptor, DateValue };\n\nconst toLocalizedDatePlaceholder = (dateFormatter: DateFormatter) => {\n return dateFormatter\n .formatToParts(new Date(2006, 0, 2))\n .map((part) => {\n switch (part.type) {\n case \"day\":\n return \"dd\";\n case \"month\":\n return \"mm\";\n case \"year\":\n return \"yyyy\";\n default:\n return part.value;\n }\n })\n .join(\"\");\n};\n\nconst _DateRangePicker = <T extends DateValue>(\n {\n className,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth = true,\n granularity = \"day\",\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n hidePresets,\n additionalPresets,\n disabledPresetIds,\n label,\n onPresetSelect,\n outerEndSlot,\n outerStartSlot,\n presets,\n startSlot,\n ...props\n }: DateRangePickerProps<T>,\n ref: ForwardedRef<ElementRef<typeof AriaDateRangePicker>>,\n) => {\n [props, ref] = useContextProps(props, ref, DateRangePickerContext);\n const { defaultValue, isDateUnavailable, isInvalid, isRequired, maxValue, minValue, onChange, value } =\n props;\n const { locale } = useLocale();\n\n const [internalValue, setInternalValue] = useState(value || defaultValue || null);\n\n // Sync internal value with external value prop and handle resets\n // Only run this effect when we're in controlled mode (value prop is explicitly passed)\n const isControlled = \"value\" in props;\n\n useEffect(() => {\n if (!isControlled) {\n return;\n }\n\n setInternalValue(value || null);\n }, [value, isControlled]);\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n // Handle changes - update internal state only in uncontrolled mode, conditionally call external onChange\n const handleChange = useCallback(\n (newValue: Parameters<NonNullable<typeof onChange>>[0]) => {\n // AriaDateRangePicker passes MappedDateValue<T> which TypeScript can't reconcile with T\n // This single assertion is unavoidable due to the library's type design\n setInternalValue(newValue as typeof internalValue);\n\n // Check if both years are complete (4 digits each)\n const startYearComplete = !newValue?.start || newValue.start.year.toString().length === 4;\n const endYearComplete = !newValue?.end || newValue.end.year.toString().length === 4;\n\n // Only fire external onChange callback if newValue is null or both years are complete\n if (!newValue || (startYearComplete && endYearComplete)) {\n onChange?.(newValue);\n }\n },\n [onChange],\n );\n\n const { outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n const controlledProps = isControlled ? { value: internalValue, onChange: handleChange } : {};\n const isDayGranularity = granularity === \"day\";\n\n const resolvedPresets = useMemo(\n () =>\n isDayGranularity && !hidePresets\n ? resolveDateRangePresets({\n additionalDescriptors: additionalPresets,\n descriptors: presets,\n disabledPresetIds,\n isDateUnavailable: isDateUnavailable as ((date: DateValue) => boolean) | undefined,\n locale,\n maxValue: maxValue as DateValue | undefined,\n minValue: minValue as DateValue | undefined,\n })\n : [],\n [\n additionalPresets,\n disabledPresetIds,\n hidePresets,\n isDateUnavailable,\n isDayGranularity,\n locale,\n maxValue,\n minValue,\n presets,\n ],\n );\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaDateRangePicker\n {...props}\n {...controlledProps}\n granularity={granularity}\n className={(renderProps) =>\n wrapper({\n className,\n isDisabled: renderProps.isDisabled,\n })\n }\n isInvalid={isInvalid}\n ref={ref}\n >\n {({ isDisabled, state }) => (\n <>\n {isDayGranularity ? (\n <DateRangePickerButtonInput\n description={description}\n fullWidth={fullWidth}\n errorMessage={errorMessage}\n hideHintLabel={hideHintLabel}\n hideInputFooter={hideInputFooter}\n hideInputHeader={hideInputHeader}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n customHint={props.customHint}\n startSlot={startSlot}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" &&\n state.value?.end &&\n state.value?.start &&\n !isDisabled &&\n !disableClearLogic\n ) {\n e.preventDefault();\n state.setValue(null);\n }\n }}\n disableClearLogic={disableClearLogic}\n />\n ) : (\n <DateRangePickerSegmentInputs\n description={description}\n fullWidth={fullWidth}\n errorMessage={errorMessage}\n hideHintLabel={hideHintLabel}\n hideInputFooter={hideInputFooter}\n hideInputHeader={hideInputHeader}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n customHint={props.customHint}\n startSlot={startSlot}\n onKeyDown={(e) => {\n if (\n e.key === \"Escape\" &&\n state.value?.end &&\n state.value?.start &&\n !isDisabled &&\n !disableClearLogic\n ) {\n e.preventDefault();\n state.setValue(null);\n }\n }}\n disableClearLogic={disableClearLogic}\n />\n )}\n\n <Popover disablePadding className=\"group\">\n <RangeCalendar visibleDuration={{ months: 2 }} pageBehavior=\"single\">\n <PopoverCalendarGrid\n autoCloseOnCompleteSelection={isDayGranularity}\n presetPanel={\n resolvedPresets.length ? (\n <DateRangePickerPresetPanel\n isDisabled={isDisabled}\n presets={resolvedPresets}\n onPresetSelect={onPresetSelect}\n />\n ) : null\n }\n />\n </RangeCalendar>\n </Popover>\n </>\n )}\n </AriaDateRangePicker>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\ntype PopoverCalendarGridProps = {\n presetPanel?: ReactNode;\n autoCloseOnCompleteSelection?: boolean;\n};\n\nconst PopoverCalendarGrid = ({\n autoCloseOnCompleteSelection,\n presetPanel,\n}: PopoverCalendarGridProps) => {\n const { buttons } = datePickerHeaderStyles();\n\n const context = useContext(RangeCalendarStateContext);\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"RangeCalendarStateContext is not provided.\");\n }\n\n if (!dateRangePickerState) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const {\n anchorDate,\n focusedDate,\n focusNextPage,\n focusPreviousPage,\n setFocusedDate,\n visibleRange,\n } = context;\n\n const hasCompleteSelection = !!dateRangePickerState.value?.start && !!dateRangePickerState.value?.end;\n const previousSelectionCompleteRef = useRef(hasCompleteSelection);\n\n useEffect(() => {\n if (\n autoCloseOnCompleteSelection &&\n dateRangePickerState.isOpen &&\n hasCompleteSelection &&\n !previousSelectionCompleteRef.current\n ) {\n dateRangePickerState.setOpen(false);\n }\n\n previousSelectionCompleteRef.current = hasCompleteSelection;\n }, [autoCloseOnCompleteSelection, dateRangePickerState, hasCompleteSelection]);\n\n const getNextMonth = (month: number) => (month === 12 ? 1 : month + 1);\n const getPreviousMonth = (month: number) => (month === 1 ? 12 : month - 1);\n\n /**\n * Visible range logic from react-aria\n * - when setting a focused date before the current start range, the focused date is set to the end of the visible range\n * - when setting a focused date after the current end range, the focused date is set to the start of the visible range\n */\n const onStartMonthChange = useCallback(\n (value: number) => {\n if (value === visibleRange.start.month - 1) {\n focusPreviousPage();\n } else if (value === visibleRange.start.month + 1) {\n focusNextPage();\n } else {\n // when going in the past we need to make sure the focused date is in the next month so the visible range starts where we want\n const newMonth = value < visibleRange.start.month ? getNextMonth(value) : value;\n const newFocusedDate = visibleRange.start.copy().set({\n month: newMonth,\n day: focusedDate.day,\n });\n setFocusedDate(newFocusedDate);\n }\n },\n [focusNextPage, focusPreviousPage, focusedDate.day, setFocusedDate, visibleRange.start],\n );\n\n const onStartYearChange = useCallback(\n (value: number): void => {\n // handle Dec-Jan visible range separately\n if (visibleRange.start.year !== visibleRange.end.year) {\n // when going in the past the focused date should be in January so the visible range starts where we want\n if (value < visibleRange.start.year) {\n const newFocusedDate = visibleRange.start.copy().set({\n year: value + 1,\n day: focusedDate.day,\n month: 1,\n });\n\n setFocusedDate(newFocusedDate);\n }\n // when going in the future the focused date should be in December so the visible range starts where we want\n if (value > visibleRange.start.year) {\n const newFocusedDate = visibleRange.start.copy().set({\n year: value,\n day: focusedDate.day,\n month: 12,\n });\n\n setFocusedDate(newFocusedDate);\n }\n } else {\n // when going in the past we need to make sure the focused date is in the next month so the visible range starts where we want\n const newMonth =\n value < visibleRange.start.year\n ? getNextMonth(visibleRange.start.month)\n : visibleRange.start.month;\n const newFocusedDate = visibleRange.start.copy().set({\n year: value,\n day: focusedDate.day,\n month: newMonth,\n });\n\n setFocusedDate(newFocusedDate);\n }\n },\n [focusedDate.day, setFocusedDate, visibleRange.end.year, visibleRange.start],\n );\n\n const onEndMonthChange = useCallback(\n (value: number): void => {\n if (value === visibleRange.end.month - 1) {\n focusPreviousPage();\n } else if (value === visibleRange.end.month + 1) {\n focusNextPage();\n } else {\n // when going in the future we need to make sure the focused date is in the previous month so the visible range starts where we want\n const newMonth = value > visibleRange.end.month ? getPreviousMonth(value) : value;\n const newFocusedDate = visibleRange.end.copy().set({\n month: newMonth,\n day: focusedDate.day,\n });\n setFocusedDate(newFocusedDate);\n }\n },\n [focusNextPage, focusPreviousPage, focusedDate.day, setFocusedDate, visibleRange.end],\n );\n\n const onEndYearChange = useCallback(\n (value: number): void => {\n // handle Dec-Jan visible range separately\n if (visibleRange.start.year !== visibleRange.end.year) {\n // when going in the past the focused date should be in January so the visible range starts where we want\n if (value < visibleRange.end.year) {\n const newFocusedDate = visibleRange.end.copy().set({\n year: value,\n day: focusedDate.day,\n month: 1,\n });\n\n setFocusedDate(newFocusedDate);\n }\n if (value > visibleRange.end.year) {\n // when going in the future the focused date should be in December so the visible range starts where we want\n const newFocusedDate = visibleRange.end.copy().set({\n year: value - 1,\n day: focusedDate.day,\n month: 12,\n });\n\n setFocusedDate(newFocusedDate);\n }\n } else {\n // when going in the future we need to make sure the focused date is in the previous month so the visible range starts where we want\n const newMonth =\n value > visibleRange.end.year\n ? getPreviousMonth(visibleRange.end.month)\n : visibleRange.end.month;\n const newFocusedDate = visibleRange.end.copy().set({\n year: value,\n day: focusedDate.day,\n month: newMonth,\n });\n\n setFocusedDate(newFocusedDate);\n }\n },\n [focusedDate.day, setFocusedDate, visibleRange.end, visibleRange.start.year],\n );\n\n return (\n <div className=\"flex flex-col gap-3 p-3 lg:flex-row\">\n {presetPanel ? (\n <>\n <div className=\"lg:w-52\">{presetPanel}</div>\n <Separator orientation=\"vertical\" className=\"hidden h-[unset] self-stretch lg:block\" />\n <Separator className=\"lg:hidden\" />\n </>\n ) : null}\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex justify-between gap-1\">\n <AriaButton slot=\"previous\" className={buttons()}>\n <SvgIcon name=\"chevron-left\" />\n </AriaButton>\n <div className=\"flex gap-1\">\n <MonthPicker\n value={visibleRange.start.month}\n isDisabled={!!anchorDate}\n onChange={onStartMonthChange}\n />\n <YearPicker\n value={visibleRange.start.year}\n isDisabled={!!anchorDate}\n onChange={onStartYearChange}\n />\n </div>\n <div className=\"w-6\" />\n </div>\n <CalendarGrid className=\"w-full text-center\">\n <DatePickerCalendarGridHeader />\n <DateRangePickerCalendarGridBody />\n </CalendarGrid>\n </div>\n\n <Separator orientation=\"vertical\" className=\"hidden h-[unset] self-stretch sm:block\" />\n <Separator className=\"sm:hidden\" />\n\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex justify-between gap-1\">\n <div className=\"w-6\" />\n <div className=\"flex gap-1\">\n <MonthPicker\n value={visibleRange.end.month}\n isDisabled={!!anchorDate}\n onChange={onEndMonthChange}\n />\n <YearPicker\n value={visibleRange.end.year}\n isDisabled={!!anchorDate}\n onChange={onEndYearChange}\n />\n </div>\n <AriaButton slot=\"next\" className={buttons()}>\n <SvgIcon name=\"chevron-right\" />\n </AriaButton>\n </div>\n <CalendarGrid className=\"w-full text-center\" offset={{ months: 1 }}>\n <DatePickerCalendarGridHeader />\n <DateRangePickerCalendarGridBody />\n </CalendarGrid>\n </div>\n </div>\n </div>\n );\n};\n\nexport const DateRangePicker = fixedForwardRef(_DateRangePicker);\n//@ts-ignore\nDateRangePicker.displayName = \"DateRangePicker\";\n\ntype DateRangePickerInputProps = VariantProps<typeof sharedInputStyles> &\n InputHeaderProps &\n InputFooterProps & {\n startSlot?: JSX.Element;\n onKeyDown?: KeyboardEventHandler<HTMLElement>;\n disableClearLogic?: boolean;\n };\n\nconst DateRangePickerButtonInput = ({\n customHint,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n isDisabled,\n isRequired,\n label,\n onKeyDown,\n startSlot,\n}: DateRangePickerInputProps) => {\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { buttonExcludedFromTabOrder, inputField } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n isInputOnly: false,\n });\n\n const { clear } = useDictionary();\n const { locale } = useLocale();\n\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setValue, value } = context;\n const { triggerButton, triggerText } = dateRangePickerStyles();\n\n const dateFormatter = useMemo(\n () =>\n new DateFormatter(locale, {\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n }),\n [locale],\n );\n const formatTriggerDate = useCallback(\n (date: DateValue) => {\n const timeZone = \"timeZone\" in date ? date.timeZone : getLocalTimeZone();\n return dateFormatter.format(date.toDate(timeZone));\n },\n [dateFormatter],\n );\n const singleDatePlaceholder = useMemo(\n () => toLocalizedDatePlaceholder(dateFormatter),\n [dateFormatter],\n );\n const emptyRangePlaceholder = useMemo(\n () => `${singleDatePlaceholder} - ${singleDatePlaceholder}`,\n [singleDatePlaceholder],\n );\n\n const triggerButtonRef = useRef<HTMLButtonElement | null>(null);\n\n const triggerLabel = useMemo(() => {\n if (!value?.start && !value?.end) {\n return emptyRangePlaceholder;\n }\n\n const startText = value?.start ? formatTriggerDate(value.start) : singleDatePlaceholder;\n const endText = value?.end ? formatTriggerDate(value.end) : singleDatePlaceholder;\n\n return `${startText} - ${endText}`;\n }, [emptyRangePlaceholder, formatTriggerDate, singleDatePlaceholder, value?.end, value?.start]);\n\n return (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n hideHintLabel={hideHintLabel}\n isRequired={isRequired}\n customHint={customHint}\n />\n ) : null}\n\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n inputField({\n isDisabled,\n isFocused: isFocusWithin,\n isHovered,\n isInvalid: isInvalid || !!errorMessage,\n className: \"min-h-8\",\n })\n }\n onKeyDown={onKeyDown}\n >\n {startSlot}\n <div className=\"hidden\" aria-hidden=\"true\">\n <DateInput slot=\"start\">\n {(segment) => <DateSegment segment={segment} className=\"hidden\" />}\n </DateInput>\n <DateInput slot=\"end\">\n {(segment) => <DateSegment segment={segment} className=\"hidden\" />}\n </DateInput>\n </div>\n\n <AriaButton\n ref={triggerButtonRef}\n isDisabled={isDisabled}\n className={triggerButton()}\n data-testid=\"date-range-picker-trigger\"\n >\n <span className={triggerText({ hasValue: !!value?.start || !!value?.end })}>{triggerLabel}</span>\n <SvgIcon name=\"calendar\" />\n </AriaButton>\n\n {!isDisabled && value?.end && value?.start && !disableClearLogic ? (\n <Tooltip tooltip={clear}>\n <AriaButton\n slot={null}\n excludeFromTabOrder\n className={buttonExcludedFromTabOrder()}\n onPress={() => {\n setValue(null);\n triggerButtonRef.current?.focus();\n }}\n >\n <SvgIcon name=\"clear\" />\n </AriaButton>\n </Tooltip>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n );\n};\n\ntype DateRangePickerPresetPanelProps = {\n isDisabled?: boolean;\n presets: ResolvedDateRangePreset[];\n onPresetSelect?: (presetId: string, range: RangeValue<DateValue>) => void;\n};\n\nconst DateRangePickerPresetPanel = ({\n isDisabled,\n onPresetSelect,\n presets,\n}: DateRangePickerPresetPanelProps) => {\n const dictionary = useDictionary();\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setOpen, setValue, value } = context;\n const { presetButton, presetList } = dateRangePickerStyles();\n\n const getPresetLabel = useCallback(\n (preset: ResolvedDateRangePreset) => {\n if (preset.descriptor.label) {\n return preset.descriptor.label;\n }\n\n switch (preset.descriptor.kind) {\n case \"today\":\n return dictionary.dateRangePresetToday;\n case \"yesterday\":\n return dictionary.dateRangePresetYesterday;\n case \"tomorrow\":\n return dictionary.dateRangePresetTomorrow;\n case \"lastDays\":\n return dictionary.dateRangePresetLastDays(preset.descriptor.days);\n case \"nextDays\":\n return dictionary.dateRangePresetNextDays(preset.descriptor.days);\n case \"thisWeek\":\n return dictionary.dateRangePresetThisWeek;\n case \"lastWeek\":\n return dictionary.dateRangePresetLastWeek;\n case \"nextWeek\":\n return dictionary.dateRangePresetNextWeek;\n case \"thisMonth\":\n return dictionary.dateRangePresetThisMonth;\n case \"lastMonth\":\n return dictionary.dateRangePresetLastMonth;\n case \"nextMonth\":\n return dictionary.dateRangePresetNextMonth;\n case \"thisQuarter\":\n return dictionary.dateRangePresetThisQuarter;\n case \"lastQuarter\":\n return dictionary.dateRangePresetLastQuarter;\n case \"nextQuarter\":\n return dictionary.dateRangePresetNextQuarter;\n case \"thisYear\":\n return dictionary.dateRangePresetThisYear;\n case \"lastYear\":\n return dictionary.dateRangePresetLastYear;\n case \"nextYear\":\n return dictionary.dateRangePresetNextYear;\n default:\n return \"\";\n }\n },\n [dictionary],\n );\n\n const isPresetSelected = useCallback(\n (preset: ResolvedDateRangePreset) => {\n if (!value?.start || !value.end) {\n return false;\n }\n\n return value.start.compare(preset.range.start) === 0 && value.end.compare(preset.range.end) === 0;\n },\n [value?.end, value?.start],\n );\n\n return (\n <div className={presetList()} data-testid=\"date-range-preset-list\">\n {presets.map((preset) => (\n <AriaButton\n key={preset.descriptor.id}\n slot={null}\n isDisabled={isDisabled}\n data-testid={`date-range-preset-${preset.descriptor.id}`}\n className={presetButton({ isPresetSelected: isPresetSelected(preset) })}\n onPress={() => {\n setValue(preset.range as Parameters<typeof setValue>[0]);\n onPresetSelect?.(preset.descriptor.id, preset.range);\n setOpen(false);\n }}\n >\n {getPresetLabel(preset)}\n </AriaButton>\n ))}\n </div>\n );\n};\n\nconst DateRangePickerSegmentInputs = ({\n customHint,\n description,\n disableClearLogic,\n errorMessage,\n fullWidth,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n isDisabled,\n isRequired,\n label,\n onKeyDown,\n startSlot,\n}: DateRangePickerInputProps) => {\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, segment: segmentStyles } = dateFieldStyles();\n const { button, buttonExcludedFromTabOrder, inputField } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n isInputOnly: false,\n });\n\n const { clear } = useDictionary();\n\n const context = useContext(DateRangePickerStateContext);\n\n if (!context) {\n throw new Error(\"DateRangePickerStateContext is not provided.\");\n }\n\n const { setValue, value } = context;\n\n const calendarButtonRef = useRef<HTMLButtonElement | null>(null);\n\n return (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n hideHintLabel={hideHintLabel}\n isRequired={isRequired}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n inputField({\n isDisabled,\n isFocused: isFocusWithin,\n isHovered,\n isInvalid: isInvalid || !!errorMessage,\n className: \"min-h-8\",\n })\n }\n onKeyDown={onKeyDown}\n >\n {startSlot}\n <DateInput className={input()} slot=\"start\">\n {(segment) => (\n <DateSegment\n className={({ isFocused }) => {\n return segmentStyles({\n isFocused,\n isDisabled,\n // consider literals (separators between segments) to have a value when a full date is entered\n hasValue: segment.type === \"literal\" ? !!value?.start : !segment.isPlaceholder,\n });\n }}\n segment={segment}\n />\n )}\n </DateInput>\n\n <span\n aria-hidden=\"true\"\n className={\n !!value?.start && !!value.end && !isDisabled ? \"text-primary\" : \"text-tertiary\"\n }\n >\n – \n </span>\n\n <DateInput className={input()} slot=\"end\">\n {(segment) => (\n <DateSegment\n className={({ isFocused }) => {\n return segmentStyles({\n isFocused,\n isDisabled,\n // consider literals (separators between segments) to have a value when a full date is entered\n hasValue: segment.type === \"literal\" ? !!value?.end : !segment.isPlaceholder,\n });\n }}\n segment={segment}\n />\n )}\n </DateInput>\n\n {/* We reverse the order so we can go back to the date input by pressing the left arrow when the calendar button is focused. \n Otherwise the clear button would be focused instead and it would move the focus back to the calendar button */}\n <div className=\"ms-auto flex flex-row-reverse gap-2\">\n <AriaButton\n isDisabled={isDisabled}\n className={({ isDisabled, isFocusVisible, isHovered }) =>\n button({ isDisabled, isFocused: isFocusVisible, isHovered })\n }\n ref={calendarButtonRef}\n >\n <SvgIcon name=\"calendar\" />\n </AriaButton>\n\n {!isDisabled && value?.end && value?.start && !disableClearLogic ? (\n <Tooltip tooltip={clear}>\n <AriaButton\n slot={null}\n onFocus={(e) => {\n e.preventDefault();\n // when filling in a full value in the input this button gets focus automatically, we move focus the calendar button instead\n calendarButtonRef?.current?.focus();\n }}\n excludeFromTabOrder\n className={buttonExcludedFromTabOrder()}\n onPress={() => {\n setValue(null);\n // focus the calendar button after clearing the value\n // this way the user can easily open the calendar again\n // plus focusing another element afterwards makes sure that the focus is moved\n // https://n6k.atlassian.net/browse/OPTR-31779\n calendarButtonRef.current?.focus();\n }}\n >\n <SvgIcon name=\"clear\" />\n </AriaButton>\n </Tooltip>\n ) : null}\n </div>\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n );\n};\n\nconst DateRangePickerCalendarGridBody = () => {\n const { rangeBodyCell } = dataPickerCalendarGridStyles();\n\n return (\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n date={date}\n className={({\n isDisabled,\n isFocusVisible,\n isHovered,\n isOutsideMonth,\n isPressed,\n isSelected,\n isSelectionEnd,\n isSelectionStart,\n isUnavailable,\n }) =>\n rangeBodyCell({\n isSelected,\n isSelectionStart,\n isSelectionEnd,\n isFocusVisible,\n isHovered,\n isUnavailable,\n isDisabled,\n isOutsideMonth,\n isPressed,\n })\n }\n />\n )}\n </CalendarGridBody>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,IAAMkC,KAA8B,MAC3BC,EACJ,cAAc,IAAI,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,CACnC,KAAK,MAAS;CACb,QAAQC,EAAK,MAAb;EACE,KAAK,OACH,OAAO;EACT,KAAK,SACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,SACE,OAAOA,EAAK;CAChB;AACF,CAAC,CAAC,CACD,KAAK,EAAE,GAGNC,KACJ,EACE,cACA,gBACA,sBACA,iBACA,eAAY,IACZ,iBAAc,OACd,kBACA,oBACA,oBACA,gBACA,sBACA,sBACA,UACA,mBACA,iBACA,mBACA,YACA,cACA,GAAGC,KAEL,MACG;CACH,CAACA,GAAOC,KAAOvC,EAAgBsC,GAAOC,GAAKtC,CAAsB;CACjE,IAAM,EAAE,iBAAc,sBAAmB,cAAW,eAAY,aAAU,aAAU,aAAU,aAC5FqC,GACI,EAAE,cAAWpC,EAAU,GAEvB,CAACsC,GAAeC,KAAoBC,EAASC,KAASC,KAAgB,IAAI,GAI1EC,IAAe,WAAWP;CAEhC,QAAgB;EACd,AAAKO,KAILJ,EAAiBE,KAAS,IAAI;CAChC,GAAG,CAACA,GAAOE,CAAY,CAAC;CAExB,IAAMC,IAAiBC,QACfC,EAAwB;EAAE;EAAe;EAAiB;CAAM,CAAC,GACvE;EAACC;EAAeC;EAAiBC;CAAK,CACxC,GAGMC,KAAeC,GAClB,MAA0D;EAGzD,EAAiBC,CAAgC;EAGjD,IAAMC,IAAoB,CAACD,GAAU,SAASA,EAAS,MAAM,KAAK,SAAS,CAAC,CAAC,WAAW,GAClFE,IAAkB,CAACF,GAAU,OAAOA,EAAS,IAAI,KAAK,SAAS,CAAC,CAAC,WAAW;EAGlF,CAAI,CAACA,KAAa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AA;CACD,EAAA,CAAA;AAEN,GAEMvB,UAAwC;CAC5C,IAAM,EAAE,qBAAkBuC,EAA6B;CAEvD,OACE,kBAAC/I,GAAD,EAAA,WACI,MACA,kBAACC,GAAD;EACQ;EACN,YAAY,EACV,eACA,mBACA,cACA,mBACA,cACA,eACA,mBACA,qBACA,uBAEA+I,EAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;CAEJ,CAAA,EAEa,CAAA;AAEtB"}
|
package/dist/lyra822.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra822.cjs","names":["useDictionary","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaNumberField","_Fragment","InputHeader","Group","twMerge","Input","clsx","Tooltip","Button","SvgIcon","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_bundle_mjs","require_Button","require_Group","require_Input","require_NumberField","require_dictionary_provider","require_svg_icon","require_tooltip","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","NumberField","props","decrement","increment","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","hideStepper","isRequired","decrementAriaLabel","incrementAriaLabel","outerEndSlot"],"sources":["../src/components/inputs/number-field/number-field.tsx"],"sourcesContent":["import { ForwardedRef, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n NumberField as AriaNumberField,\n NumberFieldProps as AriaNumberFieldProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type NumberFieldProps = Omit<AriaNumberFieldProps, \"value\"> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n name?: string;\n value?: number | null;\n onChange?: (value: number | null) => void;\n className?: string;\n placeholder?: string;\n hideStepper?: boolean;\n startSlot?: JSX.Element;\n };\n\nconst _NumberField = (\n {\n className,\n customHint,\n description,\n errorMessage,\n hideHintLabel = false,\n hideInputFooter = false,\n hideInputHeader = false,\n hideStepper = false,\n isWheelDisabled = true,\n label,\n onChange,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n value,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { decrement, increment } = useDictionary();\n const {\n decrementAriaLabel = decrement,\n fullWidth,\n incrementAriaLabel = increment,\n isInvalid,\n isReadOnly,\n isRequired,\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaNumberField\n className={wrapper({ className })}\n isInvalid={isInvalid}\n isWheelDisabled={isWheelDisabled}\n // Added type casting to make sure we can support null values\n value={value as AriaNumberFieldProps[\"value\"]}\n onChange={onChange as AriaNumberFieldProps[\"onChange\"]}\n {...props}\n ref={ref}\n >\n {({ isDisabled }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n twMerge(\n inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n }),\n )\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !hideStepper && \"pe-1\"),\n })}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n style={{ fontFamily: \"var(--input-font-family)\" }}\n onKeyDown={(e) => {\n // Prevents the user from typing a decimal point if the number field is an integer\n if (\n props.formatOptions?.maximumFractionDigits === 0 &&\n [\",\", \".\"].includes(e.key)\n ) {\n e.preventDefault();\n }\n }}\n />\n {!hideStepper && !isDisabled && !isReadOnly ? (\n <div className=\"flex items-center gap-2\">\n <Tooltip tooltip={decrementAriaLabel}>\n <Button\n slot=\"decrement\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"minus\" />\n </Button>\n </Tooltip>\n <Tooltip tooltip={incrementAriaLabel}>\n <Button\n slot=\"increment\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"plus\" />\n </Button>\n </Tooltip>\n </div>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaNumberField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const NumberField = fixedForwardRef(_NumberField);\n"],"mappings":"A,khBAoLA,IAAagC,EAAcjB,EAAAA,iBAtIzB,CACE,YACA,aACA,cACA,eACA,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GA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K,CAAC,CAAC8B,GAAa,OAAQ,CAACY,GAAe,MAAM,CAC/D,CAAC,EACD,SAAUC,EACV,SAAUN,EACV,SAAUC,EACV,MAAO,CAAE,WAAY,0BAA2B,EAChD,UAAY,GAAM,CAGdf,EAAM,eAAe,wBAA0B,GAC/C,CAAC,IAAK,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,GAEzB,EAAE,eAAe,CAErB,CACD,CAAA,EACA,CAACmB,GAAe,CAACL,GAAc,CAACC,GAC/B,EAAAjB,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,0BAAf,SAAA,EACE,EAAAA,EAAA,IAAA,CAACpB,EAAAA,QAAD,CAAS,QAAS2C,EAChB,UAAA,EAAAvB,EAAA,IAAA,CAACnB,EAAAA,OAAD,CACE,KAAK,YACL,oBAAA,GACA,UAAU,iFAEV,UAAA,EAAAmB,EAAA,IAAA,CAAClB,EAAAA,QAAD,CAAS,KAAK,OAAS,CAAA,CACjB,CAAA,CACD,CAAA,GACT,EAAAkB,EAAA,IAAA,CAACpB,EAAAA,QAAD,CAAS,QAAS4C,EAChB,UAAA,EAAAxB,EAAA,IAAA,CAACnB,EAAAA,OAAD,CACE,KAAK,YACL,oBAAA,GACA,UAAU,iFAEV,UAAA,EAAAmB,EAAA,IAAA,CAAClB,EAAAA,QAAD,CAAS,KAAK,MAAQ,CAAA,CAChB,CAAA,CACD,CAAA,CACN,CACH,CAAA,EAAA,IACC,C,IAEP,EAAAkB,EAAA,IAAA,CAACjB,EAAAA,YAAD,CACe,cACC,eACG,iBAClB,CAAA,CACD,CAAA,CAAA,CAEW,CAAA,EAChB0C,GAAe,EAAAzB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWY,EAAU,EAAI,SAAAa,CAAkB,CAAA,EAAI,IACjE,C,EAET,CAEuD,E"}
|
|
1
|
+
{"version":3,"file":"lyra822.cjs","names":["useDictionary","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaNumberField","_Fragment","InputHeader","Group","twMerge","Input","clsx","Tooltip","Button","SvgIcon","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_bundle_mjs","require_Button","require_Group","require_Input","require_NumberField","require_dictionary_provider","require_svg_icon","require_tooltip","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","NumberField","props","decrement","increment","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","hideStepper","isRequired","decrementAriaLabel","incrementAriaLabel","outerEndSlot"],"sources":["../src/components/inputs/number-field/number-field.tsx"],"sourcesContent":["import { ForwardedRef, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n NumberField as AriaNumberField,\n NumberFieldProps as AriaNumberFieldProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type NumberFieldProps = Omit<AriaNumberFieldProps, \"value\"> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n name?: string;\n value?: number | null;\n onChange?: (value: number | null) => void;\n className?: string;\n placeholder?: string;\n hideStepper?: boolean;\n startSlot?: JSX.Element;\n };\n\nconst _NumberField = (\n {\n className,\n customHint,\n description,\n errorMessage,\n hideHintLabel = false,\n hideInputFooter = false,\n hideInputHeader = false,\n hideStepper = false,\n isWheelDisabled = true,\n label,\n onChange,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n value,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { decrement, increment } = useDictionary();\n const {\n decrementAriaLabel = decrement,\n fullWidth,\n incrementAriaLabel = increment,\n isInvalid,\n isReadOnly,\n isRequired,\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaNumberField\n className={wrapper({ className })}\n isInvalid={isInvalid}\n isWheelDisabled={isWheelDisabled}\n // Added type casting to make sure we can support null values\n value={value as AriaNumberFieldProps[\"value\"]}\n onChange={onChange as AriaNumberFieldProps[\"onChange\"]}\n {...props}\n ref={ref}\n >\n {({ isDisabled }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n twMerge(\n inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n }),\n )\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !hideStepper && \"pe-1\"),\n })}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n style={{ fontFamily: \"var(--input-font-family)\" }}\n onKeyDown={(e) => {\n // Prevents the user from typing a decimal point if the number field is an integer\n if (\n props.formatOptions?.maximumFractionDigits === 0 &&\n [\",\", \".\"].includes(e.key)\n ) {\n e.preventDefault();\n }\n }}\n />\n {!hideStepper && !isDisabled && !isReadOnly ? (\n <div className=\"flex items-center gap-2\">\n <Tooltip tooltip={decrementAriaLabel}>\n <Button\n slot=\"decrement\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"minus\" />\n </Button>\n </Tooltip>\n <Tooltip tooltip={incrementAriaLabel}>\n <Button\n slot=\"increment\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"plus\" />\n </Button>\n </Tooltip>\n </div>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaNumberField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const NumberField = fixedForwardRef(_NumberField);\n"],"mappings":"A,khBAoLA,IAAagC,EAAcjB,EAAAA,iBAtIzB,CACE,YACA,aACA,cACA,eACA,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,kBAAkB,GAClB,QACA,WACA,eACA,iBACA,YACA,QACA,GAAGkB,GAEL,IACG,CACH,GAAM,CAAE,YAAW,aAAcjC,EAAAA,cAAc,EACzC,CACJ,qBAAqBkC,EACrB,YACA,qBAAqBC,EACrB,YACA,aACA,cACEF,EAEEG,GAAA,EAAiBnC,EAAAA,QAAAA,KACfC,EAAAA,wBAAwB,CAAE,gBAAe,kBAAiB,OAAM,CAAC,EACvE,CAACmC,EAAeC,EAAiBC,CAAK,CACxC,EAEM,CAAE,QAAO,aAAY,YAAW,oBAAmB,WAAYpC,EAAAA,kBAAkB,CACrF,YACA,aAAc,CAAC,CAACqC,EAChB,WAAY,GACZ,iBACA,SAAU,CAAC,CAACD,C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,CAACnB,EAAAA,OAAD,CACE,KAAK,YACL,oBAAA,GACA,UAAU,iFAEV,UAAA,EAAAmB,EAAA,IAAA,CAAClB,EAAAA,QAAD,CAAS,KAAK,OAAS,CAAA,CACjB,CAAA,CACD,CAAA,GACT,EAAAkB,EAAA,IAAA,CAACpB,EAAAA,QAAD,CAAS,QAAS4C,EAChB,UAAA,EAAAxB,EAAA,IAAA,CAACnB,EAAAA,OAAD,CACE,KAAK,YACL,oBAAA,GACA,UAAU,iFAEV,UAAA,EAAAmB,EAAA,IAAA,CAAClB,EAAAA,QAAD,CAAS,KAAK,MAAQ,CAAA,CAChB,CAAA,CACD,CAAA,CACN,CACH,CAAA,EAAA,IACC,C,IAEP,EAAAkB,EAAA,IAAA,CAACjB,EAAAA,YAAD,CACe,cACC,eACG,iBAClB,CAAA,CACD,CAAA,CAAA,CAEW,CAAA,EAChB0C,GAAe,EAAAzB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWY,EAAU,EAAI,SAAAa,CAAkB,CAAA,EAAI,IACjE,C,EAET,CAEuD,E"}
|
package/dist/lyra823.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra823.js","names":["AriaNumberField","_Fragment","Group","Input","Button","$7705c033048f6da7$export$353f5b6fc5456de1","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$41fb335299a4a39e$export$f5b8910cec6cf069","$10076bcc592bc574$export$63c5fa0b2fdccd2e","Fragment$1","NumberField","fixedForwardRef","props","useDictionary","decrement","increment","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","sharedInputStyles","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","InputHeader","twMerge","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","clsx","hideStepper","isRequired","Tooltip","decrementAriaLabel","SvgIcon","incrementAriaLabel","InputFooter","outerEndSlot"],"sources":["../src/components/inputs/number-field/number-field.tsx"],"sourcesContent":["import { ForwardedRef, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n NumberField as AriaNumberField,\n NumberFieldProps as AriaNumberFieldProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type NumberFieldProps = Omit<AriaNumberFieldProps, \"value\"> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n name?: string;\n value?: number | null;\n onChange?: (value: number | null) => void;\n className?: string;\n placeholder?: string;\n hideStepper?: boolean;\n startSlot?: JSX.Element;\n };\n\nconst _NumberField = (\n {\n className,\n customHint,\n description,\n errorMessage,\n hideHintLabel = false,\n hideInputFooter = false,\n hideInputHeader = false,\n hideStepper = false,\n isWheelDisabled = true,\n label,\n onChange,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n value,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { decrement, increment } = useDictionary();\n const {\n decrementAriaLabel = decrement,\n fullWidth,\n incrementAriaLabel = increment,\n isInvalid,\n isReadOnly,\n isRequired,\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaNumberField\n className={wrapper({ className })}\n isInvalid={isInvalid}\n isWheelDisabled={isWheelDisabled}\n // Added type casting to make sure we can support null values\n value={value as AriaNumberFieldProps[\"value\"]}\n onChange={onChange as AriaNumberFieldProps[\"onChange\"]}\n {...props}\n ref={ref}\n >\n {({ isDisabled }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n twMerge(\n inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n }),\n )\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !hideStepper && \"pe-1\"),\n })}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n style={{ fontFamily: \"var(--input-font-family)\" }}\n onKeyDown={(e) => {\n // Prevents the user from typing a decimal point if the number field is an integer\n if (\n props.formatOptions?.maximumFractionDigits === 0 &&\n [\",\", \".\"].includes(e.key)\n ) {\n e.preventDefault();\n }\n }}\n />\n {!hideStepper && !isDisabled && !isReadOnly ? (\n <div className=\"flex items-center gap-2\">\n <Tooltip tooltip={decrementAriaLabel}>\n <Button\n slot=\"decrement\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"minus\" />\n </Button>\n </Tooltip>\n <Tooltip tooltip={incrementAriaLabel}>\n <Button\n slot=\"increment\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"plus\" />\n </Button>\n </Tooltip>\n </div>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaNumberField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const NumberField = fixedForwardRef(_NumberField);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoLA,IAAaU,IAAcC,GAtIzB,EACE,cACA,eACA,gBACA,iBACA,mBAAgB,IAChB,qBAAkB,IAClB,qBAAkB,IAClB,iBAAc,IACd,qBAAkB,IAClB,UACA,aACA,iBACA,mBACA,cACA,UACA,GAAGC,KAEL,MACG;CACH,IAAM,EAAE,cAAW,iBAAcC,EAAc,GACzC,EACJ,wBAAqBC,GACrB,cACA,wBAAqBC,GACrB,cACA,eACA,kBACEH,GAEEI,IAAiBC,QACfC,EAAwB;EAAE;EAAe;EAAiB;CAAM,CAAC,GACvE;EAACC;EAAeC;EAAiBC;CAAK,CACxC,GAEM,EAAE,UAAO,eAAY,cAAW,sBAAmB,eAAYC,EAAkB;EACrF;EACA,cAAc,CAAC,CAACC;EAChB,YAAY;EACZ;EACA,UAAU,CAAC,CAACF;CACd,CAAC;CAED,OACE,kBAAC,OAAD;EAAK,WAAWG,EAAkB;EAAlC,UAAA;GACGC,IAAiB,kBAAC,OAAD;IAAK,WAAWC,EAAU;IAAI,UAAAD;GAAoB,CAAA,IAAI;GACxE,kBAACzB,GAAD;IACE,WAAW2B,EAAQ,EAAE,aAAU,CAAC;IACrB;IACM;IAEV;IACG;IACV,GAAIf;IACC;IAEH,WAAA,EAAE,oBACF,kBAAAX,GAAA,EAAA,UAAA;KACGe,IACC,kBAACY,GAAD;MACS;MACK;MACG;MACH;KACb,CAAA,IACC;KACJ,kBAAC1B,GAAD;MACE,YAAY,EAAE,eAAY,kBAAe,cAAW,mBAClD2B,EACEC,EAAW;OACT,WAAWC;OACA;OACX,YAAYC,KAAcC;OAC1B,WAAWC,KAAa,CAAC,CAACC;MAC5B,CAAC,CACH;MATJ,UAAA;OAYGZ;OACD,kBAACpB,GAAD;QACE,WAAWiC,EAAM,EACf,WAAWC,EAAK,CAAC,CAACd,KAAa,QAAQ,CAACe,KAAe,MAAM,EAC/D,CAAC;QACD,UAAUC;QACV,UAAUP;QACV,UAAUC;QACV,OAAO,EAAE,YAAY,2BAA2B;QAChD,YAAY,MAAM;SAEhB,AACErB,EAAM,eAAe,0BAA0B,KAC/C,CAAC,KAAK,GAAG,CAAC,CAAC,SAAS,EAAE,GAAG,KAEzB,EAAE,eAAe;QAErB;OACD,CAAA;OACA,CAAC0B,KAAe,CAACN,KAAc,CAACC,IAC/B,kBAAC,OAAD;QAAK,WAAU;QAAf,UAAA,CACE,kBAACO,GAAD;SAAS,SAASC;SAChB,UAAA,kBAACrC,GAAD;UACE,MAAK;UACL,qBAAA;UACA,WAAU;UAEV,UAAA,kBAACsC,GAAD,EAAS,MAAK,QAAS,CAAA;SACjB,CAAA;QACD,CAAA,GACT,kBAACF,GAAD;SAAS,SAASG;SAChB,UAAA,kBAACvC,GAAD;UACE,MAAK;UACL,qBAAA;UACA,WAAU;UAEV,UAAA,kBAACsC,GAAD,EAAS,MAAK,OAAQ,CAAA;SAChB,CAAA;QACD,CAAA,CACN;OACH,CAAA,IAAA;MACC;;KAEP,kBAACE,GAAD;MACe;MACC;MACG;KAClB,CAAA;IACD,EAAA,CAAA;GAEW,CAAA;GAChBC,IAAe,kBAAC,OAAD;IAAK,WAAWnB,EAAU;IAAI,UAAAmB;GAAkB,CAAA,IAAI;EACjE;;AAET,CAEuD"}
|
|
1
|
+
{"version":3,"file":"lyra823.js","names":["AriaNumberField","_Fragment","Group","Input","Button","$7705c033048f6da7$export$353f5b6fc5456de1","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$41fb335299a4a39e$export$f5b8910cec6cf069","$10076bcc592bc574$export$63c5fa0b2fdccd2e","Fragment$1","NumberField","fixedForwardRef","props","useDictionary","decrement","increment","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","sharedInputStyles","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","InputHeader","twMerge","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","clsx","hideStepper","isRequired","Tooltip","decrementAriaLabel","SvgIcon","incrementAriaLabel","InputFooter","outerEndSlot"],"sources":["../src/components/inputs/number-field/number-field.tsx"],"sourcesContent":["import { ForwardedRef, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n NumberField as AriaNumberField,\n NumberFieldProps as AriaNumberFieldProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type NumberFieldProps = Omit<AriaNumberFieldProps, \"value\"> &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputOuterSlotsProps &\n InputFooterProps & {\n name?: string;\n value?: number | null;\n onChange?: (value: number | null) => void;\n className?: string;\n placeholder?: string;\n hideStepper?: boolean;\n startSlot?: JSX.Element;\n };\n\nconst _NumberField = (\n {\n className,\n customHint,\n description,\n errorMessage,\n hideHintLabel = false,\n hideInputFooter = false,\n hideInputHeader = false,\n hideStepper = false,\n isWheelDisabled = true,\n label,\n onChange,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n value,\n ...props\n }: NumberFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { decrement, increment } = useDictionary();\n const {\n decrementAriaLabel = decrement,\n fullWidth,\n incrementAriaLabel = increment,\n isInvalid,\n isReadOnly,\n isRequired,\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaNumberField\n className={wrapper({ className })}\n isInvalid={isInvalid}\n isWheelDisabled={isWheelDisabled}\n // Added type casting to make sure we can support null values\n value={value as AriaNumberFieldProps[\"value\"]}\n onChange={onChange as AriaNumberFieldProps[\"onChange\"]}\n {...props}\n ref={ref}\n >\n {({ isDisabled }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isDisabled, isFocusWithin, isHovered, isInvalid }) =>\n twMerge(\n inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n }),\n )\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !hideStepper && \"pe-1\"),\n })}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n style={{ fontFamily: \"var(--input-font-family)\" }}\n onKeyDown={(e) => {\n // Prevents the user from typing a decimal point if the number field is an integer\n if (\n props.formatOptions?.maximumFractionDigits === 0 &&\n [\",\", \".\"].includes(e.key)\n ) {\n e.preventDefault();\n }\n }}\n />\n {!hideStepper && !isDisabled && !isReadOnly ? (\n <div className=\"flex items-center gap-2\">\n <Tooltip tooltip={decrementAriaLabel}>\n <Button\n slot=\"decrement\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"minus\" />\n </Button>\n </Tooltip>\n <Tooltip tooltip={incrementAriaLabel}>\n <Button\n slot=\"increment\"\n excludeFromTabOrder\n className=\"outline-hidden text-primary disabled:text-tertiary disabled:cursor-not-allowed\"\n >\n <SvgIcon name=\"plus\" />\n </Button>\n </Tooltip>\n </div>\n ) : null}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaNumberField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const NumberField = fixedForwardRef(_NumberField);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoLA,IAAaU,IAAcC,GAtIzB,EACE,cACA,eACA,gBACA,iBACA,mBAAgB,IAChB,qBAAkB,IAClB,qBAAkB,IAClB,iBAAc,IACd,qBAAkB,IAClB,UACA,aACA,iBACA,mBACA,cACA,UACA,GAAGC,KAEL,MACG;CACH,IAAM,EAAE,cAAW,iBAAcC,EAAc,GACzC,EACJ,wBAAqBC,GACrB,cACA,wBAAqBC,GACrB,cACA,eACA,kBACEH,GAEEI,IAAiBC,QACfC,EAAwB;EAAE;EAAe;EAAiB;CAAM,CAAC,GACvE;EAACC;EAAeC;EAAiBC;CAAK,CACxC,GAEM,EAAE,UAAO,eAAY,cAAW,sBAAmB,eAAYC,EAAkB;EACrF;EACA,cAAc,CAAC,CAACC;EAChB,YAAY;EACZ;EACA,UAAU,CAAC,CAACF;CACd,CAAC;CAED,OACE,kBAAC,OAAD;EAAK,WAAWG,EAAkB;EAAlC,UAAA;GACGC,IAAiB,kBAAC,OAAD;IAAK,WAAWC,EAAU;IAAI,UAAAD;GAAoB,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EW,CAAA;GAChBC,IAAe,kBAAC,OAAD;IAAK,WAAWnB,EAAU;IAAI,UAAAmB;GAAkB,CAAA,IAAI;EACjE;;AAET,CAEuD"}
|
package/dist/lyra824.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./lyra26.cjs"),t=require("./lyra583.cjs"),n=require("./lyra603.cjs"),r=require("./lyra621.cjs"),i=require("./lyra622.cjs"),a=require("./lyra745.cjs"),o=require("./lyra790.cjs"),s=require("./lyra791.cjs"),c=require("./lyra792.cjs");require("./lyra793.cjs");const l=require("./lyra805.cjs");let u=require("react"),d=require("react/jsx-runtime");var f=({customHint:t,description:f,endSlot:p,fullWidth:m=!0,hideHintLabel:h,hideInputFooter:g,hideInputHeader:_,inputRef:v,label:y,outerEndSlot:b,outerStartSlot:x,startSlot:S,...
|
|
1
|
+
const e=require("./lyra26.cjs"),t=require("./lyra583.cjs"),n=require("./lyra603.cjs"),r=require("./lyra621.cjs"),i=require("./lyra622.cjs"),a=require("./lyra745.cjs"),o=require("./lyra790.cjs"),s=require("./lyra791.cjs"),c=require("./lyra792.cjs");require("./lyra793.cjs");const l=require("./lyra805.cjs");let u=require("react"),d=require("react/jsx-runtime");var f=({customHint:t,description:f,endSlot:p,fullWidth:m=!0,hideHintLabel:h,hideInputFooter:g,hideInputHeader:_,inputRef:v,label:y,outerEndSlot:b,outerStartSlot:x,startSlot:S,warningMessage:C,...w},T)=>{[w,T]=n.useContextProps(w,T,a.TextFieldContext);let{className:E,errorMessage:D,isDisabled:O=!1,isInvalid:k,isReadOnly:A,isRequired:j,...M}=w,N=(0,u.useMemo)(()=>l.shouldRenderInputHeader({hideHintLabel:h,hideInputHeader:_,label:y}),[h,_,y]),{input:P,inputField:F,outerSlot:I,outerSlotsWrapper:L,wrapper:R}=o.sharedInputStyles({fullWidth:m,hasStartSlot:!!S,hasEndSlot:!!p,hasInputHeader:N,hasLabel:!!y});return(0,d.jsxs)(`div`,{className:L(),children:[x?(0,d.jsx)(`div`,{className:I(),children:x}):null,(0,d.jsx)(a.TextField,{className:R({className:E}),isDisabled:O,isRequired:j,isInvalid:k,isReadOnly:A,...M,ref:T,children:({isDisabled:n,isInvalid:a})=>(0,d.jsxs)(d.Fragment,{children:[N?(0,d.jsx)(s.InputHeader,{label:y,isRequired:j,hideHintLabel:h,customHint:t}):null,(0,d.jsxs)(r.Group,{className:({isFocusWithin:e,isHovered:t})=>F({isFocused:e,isHovered:t,isDisabled:n||A,isInvalid:a||!!D,isWarning:!!C&&!a&&!D}),children:[S,(0,d.jsx)(i.Input,{className:P({className:e.clsx(!!S&&`ps-1`,!!p&&`pe-1`)}),ref:v,required:j,disabled:n,readOnly:A}),p]}),(0,d.jsx)(c.InputFooter,{description:f,errorMessage:D,warningMessage:C,isInvalid:a,hideInputFooter:g})]})}),b?(0,d.jsx)(`div`,{className:I(),children:b}):null]})};f.displayName=`TextField`;var p=t.fixedForwardRef(f);exports.TextField=p;
|
package/dist/lyra824.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra824.cjs","names":["useContextProps","TextFieldContext","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaTextField","_Fragment","InputHeader","Group","Input","clsx","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_utils","require_Group","require_Input","require_TextField","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","_TextField","props","ref","textFieldprops","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","endSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","inputRef","isRequired","outerEndSlot","TextField"],"sources":["../src/components/inputs/text-field/text-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Group,\n Input,\n TextField as AriaTextField,\n TextFieldContext,\n TextFieldProps as AriaTextFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type TextFieldProps = AriaTextFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputOuterSlotsProps & {\n className?: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _TextField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n inputRef,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isReadOnly,\n isRequired,\n ...textFieldprops\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: !!endSlot,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaTextField\n className={wrapper({ className })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n {...textFieldprops}\n ref={ref}\n >\n {({ isDisabled, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) => {\n return inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n });\n }}\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n />\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaTextField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\n_TextField.displayName = \"TextField\";\n\nexport const TextField = fixedForwardRef(_TextField);\n"],"mappings":"A,
|
|
1
|
+
{"version":3,"file":"lyra824.cjs","names":["useContextProps","TextFieldContext","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaTextField","_Fragment","InputHeader","Group","Input","clsx","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_utils","require_Group","require_Input","require_TextField","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","_TextField","props","ref","textFieldprops","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","endSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","warningMessage","input","inputRef","isRequired","outerEndSlot","TextField"],"sources":["../src/components/inputs/text-field/text-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Group,\n Input,\n TextField as AriaTextField,\n TextFieldContext,\n TextFieldProps as AriaTextFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n InputWarningProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type TextFieldProps = AriaTextFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputWarningProps &\n InputOuterSlotsProps & {\n className?: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _TextField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n inputRef,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n warningMessage,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isReadOnly,\n isRequired,\n ...textFieldprops\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: !!endSlot,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaTextField\n className={wrapper({ className })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n {...textFieldprops}\n ref={ref}\n >\n {({ isDisabled, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) => {\n return inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n isWarning: !!warningMessage && !isInvalid && !errorMessage,\n });\n }}\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n />\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n warningMessage={warningMessage}\n isInvalid={isInvalid}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaTextField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\n_TextField.displayName = \"TextField\";\n\nexport const TextField = fixedForwardRef(_TextField);\n"],"mappings":"A,wWA0CA,IAAMyB,GACJ,CACE,aACA,cACA,UACA,YAAY,GACZ,gBACA,kBACA,kBACA,WACA,QACA,eACA,iBACA,YACA,iBACA,GAAGC,GAEL,IACG,CACH,CAACA,EAAOC,GAAO3B,EAAAA,gBAAgB0B,EAAOC,EAAK1B,EAAAA,gBAAgB,EAC3D,GAAM,CACJ,YACA,eACA,aAAa,GACb,YACA,aACA,aACA,GAAG2B,GACDF,EAEEG,GAAA,EAAiB3B,EAAAA,QAAAA,KACfC,EAAAA,wBAAwB,CAAE,gBAAe,kBAAiB,OAAM,CAAC,EACvE,CAAC2B,EAAeC,EAAiBC,CAAK,CACxC,EAEM,CAAE,QAAO,aAAY,YAAW,oBAAmB,WAAY5B,EAAAA,kBAAkB,CACrF,YACA,aAAc,CAAC,CAAC6B,EAChB,WAAY,CAAC,CAACC,EACd,iBACA,SAAU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CAAU,E"}
|
package/dist/lyra825.js
CHANGED
|
@@ -12,9 +12,9 @@ import { shouldRenderInputHeader as u } from "./lyra806.js";
|
|
|
12
12
|
import { useMemo as d } from "react";
|
|
13
13
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
14
|
// src/components/inputs/text-field/text-field.tsx
|
|
15
|
-
var h = ({ customHint: t, description: h, endSlot: g, fullWidth: _ = !0, hideHintLabel: v, hideInputFooter: y, hideInputHeader: b, inputRef: x, label: S, outerEndSlot: C, outerStartSlot: w, startSlot: T,
|
|
16
|
-
[
|
|
17
|
-
let { className:
|
|
15
|
+
var h = ({ customHint: t, description: h, endSlot: g, fullWidth: _ = !0, hideHintLabel: v, hideInputFooter: y, hideInputHeader: b, inputRef: x, label: S, outerEndSlot: C, outerStartSlot: w, startSlot: T, warningMessage: E, ...D }, O) => {
|
|
16
|
+
[D, O] = n(D, O, o);
|
|
17
|
+
let { className: k, errorMessage: A, isDisabled: j = !1, isInvalid: M, isReadOnly: N, isRequired: P, ...F } = D, I = d(() => u({
|
|
18
18
|
hideHintLabel: v,
|
|
19
19
|
hideInputHeader: b,
|
|
20
20
|
label: S
|
|
@@ -22,63 +22,66 @@ var h = ({ customHint: t, description: h, endSlot: g, fullWidth: _ = !0, hideHin
|
|
|
22
22
|
v,
|
|
23
23
|
b,
|
|
24
24
|
S
|
|
25
|
-
]), { input:
|
|
25
|
+
]), { input: L, inputField: R, outerSlot: z, outerSlotsWrapper: B, wrapper: V } = s({
|
|
26
26
|
fullWidth: _,
|
|
27
27
|
hasStartSlot: !!T,
|
|
28
28
|
hasEndSlot: !!g,
|
|
29
|
-
hasInputHeader:
|
|
29
|
+
hasInputHeader: I,
|
|
30
30
|
hasLabel: !!S
|
|
31
31
|
});
|
|
32
32
|
return /* @__PURE__ */ m("div", {
|
|
33
|
-
className:
|
|
33
|
+
className: B(),
|
|
34
34
|
children: [
|
|
35
35
|
w ? /* @__PURE__ */ p("div", {
|
|
36
|
-
className:
|
|
36
|
+
className: z(),
|
|
37
37
|
children: w
|
|
38
38
|
}) : null,
|
|
39
39
|
/* @__PURE__ */ p(a, {
|
|
40
|
-
className:
|
|
41
|
-
isDisabled:
|
|
42
|
-
isRequired:
|
|
43
|
-
isInvalid:
|
|
44
|
-
isReadOnly:
|
|
45
|
-
...
|
|
46
|
-
ref:
|
|
40
|
+
className: V({ className: k }),
|
|
41
|
+
isDisabled: j,
|
|
42
|
+
isRequired: P,
|
|
43
|
+
isInvalid: M,
|
|
44
|
+
isReadOnly: N,
|
|
45
|
+
...F,
|
|
46
|
+
ref: O,
|
|
47
47
|
children: ({ isDisabled: n, isInvalid: a }) => /* @__PURE__ */ m(f, { children: [
|
|
48
|
-
|
|
48
|
+
I ? /* @__PURE__ */ p(c, {
|
|
49
49
|
label: S,
|
|
50
|
-
isRequired:
|
|
50
|
+
isRequired: P,
|
|
51
51
|
hideHintLabel: v,
|
|
52
52
|
customHint: t
|
|
53
53
|
}) : null,
|
|
54
54
|
/* @__PURE__ */ m(r, {
|
|
55
|
-
className: ({ isFocusWithin: e, isHovered: t }) =>
|
|
55
|
+
className: ({ isFocusWithin: e, isHovered: t }) => R({
|
|
56
56
|
isFocused: e,
|
|
57
57
|
isHovered: t,
|
|
58
|
-
isDisabled: n ||
|
|
59
|
-
isInvalid: a || !!
|
|
58
|
+
isDisabled: n || N,
|
|
59
|
+
isInvalid: a || !!A,
|
|
60
|
+
isWarning: !!E && !a && !A
|
|
60
61
|
}),
|
|
61
62
|
children: [
|
|
62
63
|
T,
|
|
63
64
|
/* @__PURE__ */ p(i, {
|
|
64
|
-
className:
|
|
65
|
+
className: L({ className: e(!!T && "ps-1", !!g && "pe-1") }),
|
|
65
66
|
ref: x,
|
|
66
|
-
required:
|
|
67
|
+
required: P,
|
|
67
68
|
disabled: n,
|
|
68
|
-
readOnly:
|
|
69
|
+
readOnly: N
|
|
69
70
|
}),
|
|
70
71
|
g
|
|
71
72
|
]
|
|
72
73
|
}),
|
|
73
74
|
/* @__PURE__ */ p(l, {
|
|
74
75
|
description: h,
|
|
75
|
-
errorMessage:
|
|
76
|
+
errorMessage: A,
|
|
77
|
+
warningMessage: E,
|
|
78
|
+
isInvalid: a,
|
|
76
79
|
hideInputFooter: y
|
|
77
80
|
})
|
|
78
81
|
] })
|
|
79
82
|
}),
|
|
80
83
|
C ? /* @__PURE__ */ p("div", {
|
|
81
|
-
className:
|
|
84
|
+
className: z(),
|
|
82
85
|
children: C
|
|
83
86
|
}) : null
|
|
84
87
|
]
|
package/dist/lyra825.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra825.js","names":["useContextProps","TextFieldContext","AriaTextField","_Fragment","Group","Input","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$41fb335299a4a39e$export$f5b8910cec6cf069","$b8dcdc58eeae0d40$export$2c73285ae9390cec","$b8dcdc58eeae0d40$export$2129e27b3ef0d483","Fragment$1","_TextField","props","ref","textFieldprops","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","sharedInputStyles","startSlot","endSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","InputHeader","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","input","clsx","inputRef","isRequired","InputFooter","outerEndSlot","TextField","fixedForwardRef"],"sources":["../src/components/inputs/text-field/text-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Group,\n Input,\n TextField as AriaTextField,\n TextFieldContext,\n TextFieldProps as AriaTextFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type TextFieldProps = AriaTextFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputOuterSlotsProps & {\n className?: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _TextField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n inputRef,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isReadOnly,\n isRequired,\n ...textFieldprops\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: !!endSlot,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaTextField\n className={wrapper({ className })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n {...textFieldprops}\n ref={ref}\n >\n {({ isDisabled, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) => {\n return inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n });\n }}\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n />\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaTextField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\n_TextField.displayName = \"TextField\";\n\nexport const TextField = fixedForwardRef(_TextField);\n"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"lyra825.js","names":["useContextProps","TextFieldContext","AriaTextField","_Fragment","Group","Input","$7230ffa83bc0c2cf$export$29f1550f4b0d4415","$3a442827418ebe87$export$eb2fcfdbd7ba97d4","$41fb335299a4a39e$export$f5b8910cec6cf069","$b8dcdc58eeae0d40$export$2c73285ae9390cec","$b8dcdc58eeae0d40$export$2129e27b3ef0d483","Fragment$1","_TextField","props","ref","textFieldprops","hasInputHeader","useMemo","shouldRenderInputHeader","hideHintLabel","hideInputHeader","label","sharedInputStyles","startSlot","endSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","InputHeader","inputField","isFocusWithin","isDisabled","isReadOnly","isInvalid","errorMessage","warningMessage","input","clsx","inputRef","isRequired","InputFooter","outerEndSlot","TextField","fixedForwardRef"],"sources":["../src/components/inputs/text-field/text-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Group,\n Input,\n TextField as AriaTextField,\n TextFieldContext,\n TextFieldProps as AriaTextFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport {\n InputFooter,\n InputFooterProps,\n InputHeader,\n InputHeaderProps,\n InputWarningProps,\n sharedInputStyles,\n} from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type TextFieldProps = AriaTextFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputWarningProps &\n InputOuterSlotsProps & {\n className?: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _TextField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter,\n hideInputHeader,\n inputRef,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n warningMessage,\n ...props\n }: TextFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, TextFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isReadOnly,\n isRequired,\n ...textFieldprops\n } = props;\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { input, inputField, outerSlot, outerSlotsWrapper, wrapper } = sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: !!endSlot,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaTextField\n className={wrapper({ className })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n isReadOnly={isReadOnly}\n {...textFieldprops}\n ref={ref}\n >\n {({ isDisabled, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n label={label}\n isRequired={isRequired}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) => {\n return inputField({\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled: isDisabled || isReadOnly,\n isInvalid: isInvalid || !!errorMessage,\n isWarning: !!warningMessage && !isInvalid && !errorMessage,\n });\n }}\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n readOnly={isReadOnly}\n />\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n warningMessage={warningMessage}\n isInvalid={isInvalid}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaTextField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\n_TextField.displayName = \"TextField\";\n\nexport const TextField = fixedForwardRef(_TextField);\n"],"mappings":";;;;;;;;;;;;;;AA0CA,IAAMY,KACJ,EACE,eACA,gBACA,YACA,eAAY,IACZ,kBACA,oBACA,oBACA,aACA,UACA,iBACA,mBACA,cACA,mBACA,GAAGC,KAEL,MACG;CACH,CAACA,GAAOC,KAAOd,EAAgBa,GAAOC,GAAKb,CAAgB;CAC3D,IAAM,EACJ,cACA,iBACA,gBAAa,IACb,cACA,eACA,eACA,GAAGc,MACDF,GAEEG,IAAiBC,QACfC,EAAwB;EAAE;EAAe;EAAiB;CAAM,CAAC,GACvE;EAACC;EAAeC;EAAiBC;CAAK,CACxC,GAEM,EAAE,UAAO,eAAY,cAAW,sBAAmB,eAAYC,EAAkB;EACrF;EACA,cAAc,CAAC,CAACC;EAChB,YAAY,CAAC,CAACC;EACd;EACA,UAAU,CAAC,CAACH;CACd,CAAC;CAED,OACE,kBAAC,OAAD;EAAK,WAAWI,EAAkB;EAAlC,UAAA;GACGC,IAAiB,kBAAC,OAAD;IAAK,WAAWC,EAAU;IAAI,UAAAD;GAAoB,CAAA,IAAI;GACxE,kBAACxB,GAAD;IACE,WAAW0B,EAAQ,EAAE,aAAU,CAAC;IACpB;IACA;IACD;IACC;IACZ,GAAIb;IACC;IAEH,WAAA,EAAE,eAAY,mBACd,kBAAAZ,GAAA,EAAA,UAAA;KACGa,IACC,kBAACa,GAAD;MACS;MACK;MACG;MACH;KACb,CAAA,IACC;KACJ,kBAACzB,GAAD;MACE,YAAY,EAAE,kBAAe,mBACpB0B,EAAW;OAChB,WAAWC;OACA;OACX,YAAYC,KAAcC;OAC1B,WAAWC,KAAa,CAAC,CAACC;OAC1B,WAAW,CAAC,CAACC,KAAkB,CAACF,KAAa,CAACC;MAChD,CAAC;MARL,UAAA;OAWGZ;OACD,kBAAClB,GAAD;QACE,WAAWgC,EAAM,EACf,WAAWC,EAAK,CAAC,CAACf,KAAa,QAAQ,CAAC,CAACC,KAAW,MAAM,EAC5D,CAAC;QACD,KAAKe;QACL,UAAUC;QACV,UAAUR;QACV,UAAUC;OACX,CAAA;OACAT;MACI;;KAEP,kBAACiB,GAAD;MACe;MACC;MACE;MACL;MACM;KAClB,CAAA;IACD,EAAA,CAAA;GAES,CAAA;GACdC,IAAe,kBAAC,OAAD;IAAK,WAAWf,EAAU;IAAI,UAAAe;GAAkB,CAAA,IAAI;EACjE;;AAET;AAEA,EAAW,cAAc;AAEzB,IAAaC,IAAYC,EAAgBhC,CAAU"}
|
package/dist/lyra831.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lyra831.cjs","names":["useContextProps","SearchFieldContext","useDictionary","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaSearchField","_Fragment","InputHeader","Group","Input","clsx","Tooltip","Button","SvgIcon","Spinner","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_utils","require_Button","require_Group","require_Input","require_SearchField","require_dictionary_provider","require_svg_icon","require_spinner","require_tooltip","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","SearchField","props","ref","textFieldProps","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isInvalid","errorMessage","isEmpty","endSlot","input","inputRef","isRequired","isDisabled","isLoading","clear","buttonExcludedFromTabOrder","outerEndSlot"],"sources":["../src/components/inputs/search-field/search-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n SearchField as AriaSearchField,\n SearchFieldContext,\n SearchFieldProps as AriaSearchFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { Spinner } from \"../../spinner\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport { InputHeader, InputHeaderProps, sharedInputStyles } from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputFooter, InputFooterProps } from \"../shared/input-footer\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type SearchFieldProps = AriaSearchFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputOuterSlotsProps & {\n label: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n isLoading?: boolean;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _SearchField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter = false,\n hideInputHeader = false,\n inputRef,\n isLoading,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n ...props\n }: SearchFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, SearchFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isRequired,\n ...textFieldProps\n } = props;\n const { clear } = useDictionary();\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { buttonExcludedFromTabOrder, input, inputField, outerSlot, outerSlotsWrapper, wrapper } =\n sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaSearchField\n className={wrapper({\n className,\n })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n aria-label={hideInputHeader ? label : undefined}\n {...textFieldProps}\n ref={ref}\n >\n {({ isDisabled, isEmpty, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n isRequired={isRequired}\n label={label}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) =>\n inputField({\n fullWidth,\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled,\n isInvalid: isInvalid || !!errorMessage,\n hasEndSlot: !isEmpty || !!endSlot,\n })\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n />\n {!isEmpty && !isLoading && !isDisabled ? (\n <Tooltip tooltip={clear}>\n <Button excludeFromTabOrder className={buttonExcludedFromTabOrder()}>\n <SvgIcon name=\"clear\" />\n </Button>\n </Tooltip>\n ) : null}\n {isLoading ? <Spinner size=\"small\" /> : null}\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaSearchField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const SearchField = fixedForwardRef(_SearchField);\n"],"mappings":"A,4kBA0JA,IAAamC,EAAclB,EAAAA,iBAhHzB,CACE,aACA,cACA,UACA,YAAY,GACZ,gBACA,kBAAkB,GAClB,kBAAkB,GAClB,WACA,YACA,QACA,eACA,iBACA,YACA,GAAGmB,GAEL,IACG,CACH,CAACA,EAAOC,GAAOrC,EAAAA,gBAAgBoC,EAAOC,EAAKpC,EAAAA,kBAAkB,EAC7D,GAAM,CACJ,YACA,eACA,aAAa,GACb,YACA,aACA,GAAGqC,GACDF,EACE,CAAE,SAAUlC,EAAAA,cAAc,EAE1BqC,GAAA,EAAiBpC,EAAAA,QAAAA,KACfC,EAAAA,wBAAwB,CAAE,gBAAe,kBAAiB,OAAM,CAAC,EACvE,CAACoC,EAAeC,EAAiBC,CAAK,CACxC,EAEM,CAAE,6BAA4B,QAAO,aAAY,YAAW,oBAAmB,WACnFrC,EAAAA,kBAAkB,CAChB,YACA,aAAc,CAAC,CAACsC,EAChB,WAAY,GACZ,iBACA,SAAU,CAAC,CAACD,CACd,CAAC,EAEH,OACE,EAAAR,EAAA,KAAA,CAAC,MAAD,CAAK,UAAWU,EAAkB,EAAlC,SAAA,CACGC,GAAiB,EAAAX,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWY,EAAU,EAAI,SAAAD,CAAoB,CAAA,EAAI,MACxE,EAAAX,EAAA,IAAA,CAAC5B,EAAAA,YAAD,CACE,UAAWyC,EAAQ,CACjB,WACF,CAAC,EACW,aACA,aACD,YACX,aAAYN,EAAkBC,EAAQ,IAAA,GACtC,GAAIJ,EACC,MAEH,UAAA,CAAE,aAAY,UAAS,gBACvB,EAAAJ,EAAA,KAAA,CAAA3B,EAAAA,SAAA,CAAA,SAAA,CACGgC,GACC,EAAAL,EAAA,IAAA,CAAC1B,EAAAA,YAAD,CACc,aACL,QACQ,gBACH,YACb,CAAA,EACC,MACJ,EAAA0B,EAAA,KAAA,CAACzB,EAAAA,MAAD,CACE,WAAY,CAAE,gBAAe,eAC3BuC,EAAW,CACT,YACA,UAAWC,EACA,YACX,aACA,UAAWC,GAAa,CAAC,CAACC,EAC1B,WAAY,CAACC,GAAW,CAAC,CAACC,CAC5B,CAAC,EATL,SAAA,CAYGV,GACD,EAAAT,EAAA,IAAA,CAACxB,EAAAA,MAAD,CACE,UAAW4C,EAAM,CACf,UAAW3C,EAAAA,KAAK,CAAC,CAACgC,GAAa,OAAQ,CAAC,CAACU,GAAW,MAAM,CAC5D,CAAC,EACD,IAAKE,EACL,SAAUC,EACV,SAAUC,CACX,CAAA,EACA,CAACL,GAAW,CAACM,GAAa,CAACD,GAC1B,EAAAvB,EAAA,IAAA,CAACtB,EAAAA,QAAD,CAAS,QAAS+C,EAChB,UAAA,EAAAzB,EAAA,IAAA,CAACrB,EAAAA,OAAD,CAAQ,oBAAA,GAAoB,UAAW+C,EAA2B,EAChE,UAAA,EAAA1B,EAAA,IAAA,CAACpB,EAAAA,QAAD,CAAS,KAAK,OAAS,CAAA,CACjB,CAAA,CACD,CAAA,EACP,KACH4C,GAAY,EAAAxB,EAAA,IAAA,CAACnB,EAAAA,QAAD,CAAS,KAAK,OAAS,CAAA,EAAI,KACvCsC,CACI,C,IAEP,EAAAnB,EAAA,IAAA,CAAClB,EAAAA,YAAD,CACe,cACC,eACG,iBAClB,CAAA,CACD,CAAA,CAAA,CAEW,CAAA,EAChB6C,GAAe,EAAA3B,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWY,EAAU,EAAI,SAAAe,CAAkB,CAAA,EAAI,IACjE,C,EAET,CAEuD,E"}
|
|
1
|
+
{"version":3,"file":"lyra831.cjs","names":["useContextProps","SearchFieldContext","useDictionary","useMemo","shouldRenderInputHeader","sharedInputStyles","AriaSearchField","_Fragment","InputHeader","Group","Input","clsx","Tooltip","Button","SvgIcon","Spinner","InputFooter","fixedForwardRef","require_clsx","require_helpers","require_utils","require_Button","require_Group","require_Input","require_SearchField","require_dictionary_provider","require_svg_icon","require_spinner","require_tooltip","require_styles","require_input_header","require_input_footer","require_helpers$1","react","react_jsx_runtime","SearchField","props","ref","textFieldProps","hasInputHeader","hideHintLabel","hideInputHeader","label","startSlot","outerSlotsWrapper","outerStartSlot","outerSlot","wrapper","inputField","isFocusWithin","isInvalid","errorMessage","isEmpty","endSlot","input","inputRef","isRequired","isDisabled","isLoading","clear","buttonExcludedFromTabOrder","outerEndSlot"],"sources":["../src/components/inputs/search-field/search-field.tsx"],"sourcesContent":["import { ForwardedRef, RefObject, useMemo } from \"react\";\nimport type { JSX } from \"react\";\nimport {\n Button,\n Group,\n Input,\n SearchField as AriaSearchField,\n SearchFieldContext,\n SearchFieldProps as AriaSearchFieldProps,\n useContextProps,\n} from \"react-aria-components\";\n\nimport clsx from \"clsx\";\nimport { VariantProps } from \"tailwind-variants\";\n\nimport { fixedForwardRef } from \"../../../utils/helpers\";\nimport { useDictionary } from \"../../../utils/providers/dictionary-provider\";\nimport { Spinner } from \"../../spinner\";\nimport { SvgIcon } from \"../../svg-icon\";\nimport { Tooltip } from \"../../tooltip\";\nimport { InputHeader, InputHeaderProps, sharedInputStyles } from \"../shared\";\nimport { shouldRenderInputHeader } from \"../shared/helpers\";\nimport { InputFooter, InputFooterProps } from \"../shared/input-footer\";\nimport { InputOuterSlotsProps } from \"../shared/types\";\n\nexport type SearchFieldProps = AriaSearchFieldProps &\n Omit<\n VariantProps<typeof sharedInputStyles>,\n \"hasEndSlot\" | \"hasStartSlot\" | \"hasInputHeader\" | \"hasLabel\" | \"isInputOnly\" | \"isWarning\"\n > &\n InputHeaderProps &\n InputFooterProps &\n InputOuterSlotsProps & {\n label: string;\n startSlot?: JSX.Element;\n endSlot?: JSX.Element;\n placeholder?: string;\n isLoading?: boolean;\n inputRef?: RefObject<HTMLInputElement | null>;\n };\n\nconst _SearchField = (\n {\n customHint,\n description,\n endSlot,\n fullWidth = true,\n hideHintLabel,\n hideInputFooter = false,\n hideInputHeader = false,\n inputRef,\n isLoading,\n label,\n outerEndSlot,\n outerStartSlot,\n startSlot,\n ...props\n }: SearchFieldProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n [props, ref] = useContextProps(props, ref, SearchFieldContext);\n const {\n className,\n errorMessage,\n isDisabled = false,\n isInvalid,\n isRequired,\n ...textFieldProps\n } = props;\n const { clear } = useDictionary();\n\n const hasInputHeader = useMemo(\n () => shouldRenderInputHeader({ hideHintLabel, hideInputHeader, label }),\n [hideHintLabel, hideInputHeader, label],\n );\n\n const { buttonExcludedFromTabOrder, input, inputField, outerSlot, outerSlotsWrapper, wrapper } =\n sharedInputStyles({\n fullWidth,\n hasStartSlot: !!startSlot,\n hasEndSlot: true,\n hasInputHeader,\n hasLabel: !!label,\n });\n\n return (\n <div className={outerSlotsWrapper()}>\n {outerStartSlot ? <div className={outerSlot()}>{outerStartSlot}</div> : null}\n <AriaSearchField\n className={wrapper({\n className,\n })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isInvalid={isInvalid}\n aria-label={hideInputHeader ? label : undefined}\n {...textFieldProps}\n ref={ref}\n >\n {({ isDisabled, isEmpty, isInvalid }) => (\n <>\n {hasInputHeader ? (\n <InputHeader\n isRequired={isRequired}\n label={label}\n hideHintLabel={hideHintLabel}\n customHint={customHint}\n />\n ) : null}\n <Group\n className={({ isFocusWithin, isHovered }) =>\n inputField({\n fullWidth,\n isFocused: isFocusWithin,\n isHovered: isHovered,\n isDisabled,\n isInvalid: isInvalid || !!errorMessage,\n hasEndSlot: !isEmpty || !!endSlot,\n })\n }\n >\n {startSlot}\n <Input\n className={input({\n className: clsx(!!startSlot && \"ps-1\", !!endSlot && \"pe-1\"),\n })}\n ref={inputRef}\n required={isRequired}\n disabled={isDisabled}\n />\n {!isEmpty && !isLoading && !isDisabled ? (\n <Tooltip tooltip={clear}>\n <Button excludeFromTabOrder className={buttonExcludedFromTabOrder()}>\n <SvgIcon name=\"clear\" />\n </Button>\n </Tooltip>\n ) : null}\n {isLoading ? <Spinner size=\"small\" /> : null}\n {endSlot}\n </Group>\n\n <InputFooter\n description={description}\n errorMessage={errorMessage}\n hideInputFooter={hideInputFooter}\n />\n </>\n )}\n </AriaSearchField>\n {outerEndSlot ? <div className={outerSlot()}>{outerEndSlot}</div> : null}\n </div>\n );\n};\n\nexport const SearchField = fixedForwardRef(_SearchField);\n"],"mappings":"A,4kBA0JA,IAAamC,EAAclB,EAAAA,iBAhHzB,CACE,aACA,cACA,UACA,YAAY,GACZ,gBACA,kBAAkB,GAClB,kBAAkB,GAClB,WACA,YACA,QACA,eACA,iBACA,YACA,GAAGmB,GAEL,IACG,CACH,CAACA,EAAOC,GAAOrC,EAAAA,gBAAgBoC,EAAOC,EAAKpC,EAAAA,kBAAkB,EAC7D,GAAM,CACJ,YACA,eACA,aAAa,GACb,YACA,aACA,GAAGqC,GACDF,EACE,CAAE,SAAUlC,EAAAA,cAAc,EAE1BqC,GAAA,EAAiBpC,EAAAA,QAAAA,KACfC,EAAAA,wBAAwB,CAAE,gBAAe,kBAAiB,OAAM,CAAC,EACvE,CAACoC,EAAeC,EAAiBC,CAAK,CACxC,EAEM,CAAE,6BAA4B,QAAO,aAAY,YAAW,oBAAmB,WACnFrC,EAAAA,kBAAkB,CAChB,YACA,aAAc,CAAC,CAACsC,EAChB,WAAY,GACZ,iBACA,SAAU,CAAC,CAACD,CACd,CAAC,EAEH,OACE,EAAAR,EAAA,KAAA,CAAC,MAAD,CAAK,UAAWU,EAAkB,EAAlC,SAAA,CACGC,GAAiB,EAAAX,EAAA,IAAA,CAAC,MAAD,CAAK,UAAWY,EAAU,EAAI,SAAAD,CAAoB,CAAA,EAAI,MACxE,EAAAX,EAAA,IAAA,CAAC5B,EAAAA,YAAD,CACE,UAAWyC,EAAQ,CACjB,WACF,CAAC,EACW,aACA,aACD,YACX,aAAYN,EAAkBC,EAAQ,IAAA,GACtC,GAAIJ,EACC,MAEH,UAAA,CAAE,aAAY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