@fuf-stack/uniform 1.28.0 → 2.0.0-next.1
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/README.md +6 -35
- package/dist/Checkboxes/index.d.mts +192 -263
- package/dist/Checkboxes/index.d.mts.map +1 -1
- package/dist/Checkboxes/index.mjs +294 -90
- package/dist/Checkboxes/index.mjs.map +1 -1
- package/dist/DatePicker/index.d.mts +1278 -496
- package/dist/DatePicker/index.d.mts.map +1 -1
- package/dist/DatePicker/index.mjs +403 -83
- package/dist/DatePicker/index.mjs.map +1 -1
- package/dist/FieldArray/index.d.mts +105 -98
- package/dist/FieldArray/index.d.mts.map +1 -1
- package/dist/FieldArray/index.mjs +344 -195
- package/dist/FieldArray/index.mjs.map +1 -1
- package/dist/FieldCard/index.d.mts +37 -35
- package/dist/FieldCard/index.d.mts.map +1 -1
- package/dist/FieldCard/index.mjs +187 -128
- package/dist/FieldCard/index.mjs.map +1 -1
- package/dist/{FieldCopyTestIdButton-9xTF-DBW.mjs → FieldCopyTestIdButton-DV0tkdh2.mjs} +4 -2
- package/dist/FieldCopyTestIdButton-DV0tkdh2.mjs.map +1 -0
- package/dist/FieldDescription-C4l0HKGL.mjs +36 -0
- package/dist/FieldDescription-C4l0HKGL.mjs.map +1 -0
- package/dist/FieldLabel-DKzqkuY1.mjs +125 -0
- package/dist/FieldLabel-DKzqkuY1.mjs.map +1 -0
- package/dist/FieldLayout-BLW5S-Jm.mjs +46 -0
- package/dist/FieldLayout-BLW5S-Jm.mjs.map +1 -0
- package/dist/FieldValidationError-DgkCL3cC.mjs +77 -0
- package/dist/FieldValidationError-DgkCL3cC.mjs.map +1 -0
- package/dist/Form/index.d.mts +12 -12
- package/dist/Form/index.d.mts.map +1 -1
- package/dist/Form/index.mjs +9 -7
- package/dist/Form/index.mjs.map +1 -1
- package/dist/{FormContext-CB7Glm02.mjs → FormContext-CHctWFAP.mjs} +51 -8
- package/dist/FormContext-CHctWFAP.mjs.map +1 -0
- package/dist/FormContext-CsFiNvuJ.d.mts.map +1 -1
- package/dist/Grid/index.mjs +1 -2
- package/dist/{Grid-CTs-Rb9G.mjs → Grid-DfcZeuib.mjs} +4 -2
- package/dist/Grid-DfcZeuib.mjs.map +1 -0
- package/dist/Input/index.d.mts +638 -394
- package/dist/Input/index.d.mts.map +1 -1
- package/dist/Input/index.mjs +414 -165
- package/dist/Input/index.mjs.map +1 -1
- package/dist/RadioBoxes/index.d.mts +1588 -125
- package/dist/RadioBoxes/index.d.mts.map +1 -1
- package/dist/RadioBoxes/index.mjs +159 -114
- package/dist/RadioBoxes/index.mjs.map +1 -1
- package/dist/RadioTabs/index.d.mts +300 -81
- package/dist/RadioTabs/index.d.mts.map +1 -1
- package/dist/RadioTabs/index.mjs +277 -86
- package/dist/RadioTabs/index.mjs.map +1 -1
- package/dist/Radios/index.d.mts +1354 -109
- package/dist/Radios/index.d.mts.map +1 -1
- package/dist/Radios/index.mjs +105 -54
- package/dist/Radios/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +554 -3009
- package/dist/Select/index.d.mts.map +1 -1
- package/dist/Select/index.mjs +319 -177
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Slider/index.d.mts +416 -1328
- package/dist/Slider/index.d.mts.map +1 -1
- package/dist/Slider/index.mjs +276 -94
- package/dist/Slider/index.mjs.map +1 -1
- package/dist/SubmitButton/index.d.mts.map +1 -1
- package/dist/SubmitButton/index.mjs +4 -1
- package/dist/SubmitButton/index.mjs.map +1 -1
- package/dist/Switch/index.d.mts +2 -1248
- package/dist/Switch/index.mjs +167 -68
- package/dist/Switch/index.mjs.map +1 -1
- package/dist/Switch-CvPO8IF9.d.mts +601 -0
- package/dist/Switch-CvPO8IF9.d.mts.map +1 -0
- package/dist/SwitchBox/index.d.mts +135 -39
- package/dist/SwitchBox/index.d.mts.map +1 -1
- package/dist/SwitchBox/index.mjs +142 -87
- package/dist/SwitchBox/index.mjs.map +1 -1
- package/dist/TextArea/index.d.mts +295 -411
- package/dist/TextArea/index.d.mts.map +1 -1
- package/dist/TextArea/index.mjs +200 -48
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Time/index.d.mts +1170 -601
- package/dist/Time/index.d.mts.map +1 -1
- package/dist/Time/index.mjs +162 -74
- package/dist/Time/index.mjs.map +1 -1
- package/dist/helpers/index.d.mts +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/index.mjs.map +1 -1
- package/dist/hooks/useClientValidation/index.mjs +1 -1
- package/dist/hooks/useController/index.d.mts +31 -3
- package/dist/hooks/useController/index.d.mts.map +1 -0
- package/dist/hooks/useController/index.mjs +1 -2
- package/dist/hooks/useFormContext/index.d.mts +65 -3
- package/dist/hooks/useFormContext/index.d.mts.map +1 -0
- package/dist/hooks/useFormContext/index.mjs +1 -2
- package/dist/hooks/useInputValueDebounce/index.d.mts +11 -5
- package/dist/hooks/useInputValueDebounce/index.d.mts.map +1 -1
- package/dist/hooks/useInputValueDebounce/index.mjs +27 -5
- package/dist/hooks/useInputValueDebounce/index.mjs.map +1 -1
- package/dist/hooks/useInputValueTransform/index.d.mts +1 -2
- package/dist/hooks/useInputValueTransform/index.mjs +1 -2
- package/dist/hooks/useWatchFormReset/index.mjs +1 -1
- package/dist/hooks/useWatchUserChange/index.d.mts +2 -2
- package/dist/hooks/useWatchUserChange/index.d.mts.map +1 -1
- package/dist/hooks/useWatchUserChange/index.mjs +1 -1
- package/dist/hooks/useWatchUserChange/index.mjs.map +1 -1
- package/dist/{useInputValueTransform-LOaEim7k.d.mts → index-BS8IoBOn.d.mts} +3 -3
- package/dist/index-BS8IoBOn.d.mts.map +1 -0
- package/dist/partials/FieldCopyTestIdButton/index.mjs +1 -2
- package/dist/partials/FieldValidationError/index.d.mts +637 -3
- package/dist/partials/FieldValidationError/index.d.mts.map +1 -1
- package/dist/partials/FieldValidationError/index.mjs +1 -2
- package/dist/radioControlVariants-Cm6WufWo.mjs +188 -0
- package/dist/radioControlVariants-Cm6WufWo.mjs.map +1 -0
- package/dist/switchVariants-BaQw2DA7.mjs +67 -0
- package/dist/switchVariants-BaQw2DA7.mjs.map +1 -0
- package/dist/timeVariants-B9HDfNYt.mjs +58 -0
- package/dist/timeVariants-B9HDfNYt.mjs.map +1 -0
- package/dist/{useController-BBSbeKbn.mjs → useController-BCFeZbBZ.mjs} +2 -2
- package/dist/{useController-BBSbeKbn.mjs.map → useController-BCFeZbBZ.mjs.map} +1 -1
- package/dist/{useFormContext-DNb_B8LQ.mjs → useFormContext-BPjJjNnM.mjs} +2 -2
- package/dist/{useFormContext-DNb_B8LQ.mjs.map → useFormContext-BPjJjNnM.mjs.map} +1 -1
- package/dist/{useInputValueTransform-DJ5zkqSy.mjs → useInputValueTransform-Mw8YEOXT.mjs} +2 -2
- package/dist/{useInputValueTransform-DJ5zkqSy.mjs.map → useInputValueTransform-Mw8YEOXT.mjs.map} +1 -1
- package/package.json +17 -29
- package/dist/FieldCopyTestIdButton-9xTF-DBW.mjs.map +0 -1
- package/dist/FieldValidationError-ByRoIxaM.mjs +0 -50
- package/dist/FieldValidationError-ByRoIxaM.mjs.map +0 -1
- package/dist/FormContext-CB7Glm02.mjs.map +0 -1
- package/dist/Grid-CTs-Rb9G.mjs.map +0 -1
- package/dist/Switch/index.d.mts.map +0 -1
- package/dist/hooks/useInput/index.d.mts +0 -2
- package/dist/hooks/useInput/index.mjs +0 -7
- package/dist/hooks/useInput/index.mjs.map +0 -1
- package/dist/hooks/useUniformField/index.d.mts +0 -100
- package/dist/hooks/useUniformField/index.d.mts.map +0 -1
- package/dist/hooks/useUniformField/index.mjs +0 -139
- package/dist/hooks/useUniformField/index.mjs.map +0 -1
- package/dist/hooks/useUniformFieldArray/index.d.mts +0 -73
- package/dist/hooks/useUniformFieldArray/index.d.mts.map +0 -1
- package/dist/hooks/useUniformFieldArray/index.mjs +0 -101
- package/dist/hooks/useUniformFieldArray/index.mjs.map +0 -1
- package/dist/index-CAdGtKE_.d.mts +0 -1
- package/dist/index-CaxrMD1A.d.mts +0 -1
- package/dist/index-CwJo1b4Z.d.mts +0 -1
- package/dist/useController-DcK2YHbw.d.mts +0 -32
- package/dist/useController-DcK2YHbw.d.mts.map +0 -1
- package/dist/useFormContext-BegmYvGA.d.mts +0 -66
- package/dist/useFormContext-BegmYvGA.d.mts.map +0 -1
- package/dist/useInput-C0aJaAGe.mjs +0 -2
- package/dist/useInput-ClpHDPdr.d.mts +0 -2
- package/dist/useInputValueTransform-LOaEim7k.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/Select/SelectComponents.tsx","../../src/Select/Select.tsx","../../src/Select/index.ts"],"sourcesContent":["import { components } from 'react-select';\n\nimport { slugify } from '@fuf-stack/pixel-utils';\n\n/** Mirrors the select test id onto the underlying react-select input element. */\nexport const InputComponent: typeof components.Input = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}`;\n return <components.Input data-testid={testId} {...props} />;\n};\n\n/** Wraps the control root to expose a stable `*_select` test id hook. */\nexport const ControlComponent: typeof components.Control = (props) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select`;\n return (\n <div data-testid={testId}>\n <components.Control {...props} />\n </div>\n );\n};\n\n/** Adds deterministic option test ids and forwards disabled state semantics. */\nexport const OptionComponent: typeof components.Option = (props) => {\n const { isDisabled } = props;\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select_option_${slugify(String(props?.data?.testId ?? props?.data?.value), { replaceDots: true })}`;\n return (\n <div aria-disabled={isDisabled ? true : undefined} data-testid={testId}>\n <components.Option {...props} />\n </div>\n );\n};\n\n/** Wraps the dropdown indicator with a predictable test id for automation. */\nexport const DropdownIndicatorComponent: typeof components.DropdownIndicator = (\n props,\n) => {\n // @ts-expect-error data-testid is not a default prop\n const testId = props?.selectProps['data-testid'] as string;\n return (\n <div data-testid={`${testId}_select_dropdown`}>\n <components.DropdownIndicator {...props} />\n </div>\n );\n};\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\nimport type { MultiValue, Props, SingleValue } from 'react-select';\nimport type { InputValueTransform } from '../hooks/useInputValueTransform';\n\nimport { useState } from 'react';\nimport ReactSelect from 'react-select';\n\nimport { useSelect } from '@heroui/select';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { createOptionValueConverter, isValueEmpty } from '../helpers';\nimport { useFormContext } from '../hooks/useFormContext';\nimport { useUniformField } from '../hooks/useUniformField';\nimport {\n ControlComponent,\n DropdownIndicatorComponent,\n InputComponent,\n OptionComponent,\n} from './SelectComponents';\n\nexport const selectVariants = tv({\n slots: {\n base: [\n // Enables group-data selectors used by child slots.\n 'group',\n // Make field wrappers align with other form controls.\n 'flex w-full flex-col',\n // Keep label/control vertical rhythm consistent.\n 'gap-y-1.5',\n // Preserve existing text flow for select content.\n 'leading-normal',\n ],\n clearIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800',\n control:\n 'duration-150! min-h-10 rounded-lg border-2 border-default-200 bg-content1 transition-background hover:border-default-400 group-data-[invalid=true]:border-danger group-data-[invalid=true]:hover:border-danger motion-reduce:transition-none',\n control_focused: 'border-focus',\n crossIcon: '',\n downChevron: '',\n dropdownIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-black',\n group: '',\n groupHeading: 'mb-1 ml-3 mt-2 text-sm text-foreground-500',\n indicatorsContainer: 'gap-1 p-1',\n indicatorSeparator: 'bg-default-300',\n input: 'py-0.5 pl-1',\n // see HeroUI styles for group-data condition,\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'pointer-events-auto inline-flex cursor-default text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger',\n loadingIndicator: '',\n loadingMessage: 'rounded-sm p-2 text-foreground-500',\n menu: 'mt-2 rounded-xl border border-default-200 bg-content1 p-1 shadow-lg',\n menuList: '',\n // ensure menu has same z-index as modal so it is visible when rendered in modal\n // see: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/modal.ts (see z-50)\n menuPortal: 'z-50!',\n multiValue: 'h-6 items-center gap-1.5 rounded bg-default-100 pl-2 pr-1',\n multiValueContainer: '',\n multiValueLabel: 'py-0 leading-5',\n multiValueRemove:\n 'flex h-5 w-5 items-center justify-center rounded text-default-500 hover:cursor-pointer hover:border-default-300 hover:text-default-800',\n noOptionsMessage: 'rounded-sm p-2 text-foreground-500',\n option: 'rounded px-3 py-2 hover:cursor-pointer',\n option_disabled:\n 'cursor-not-allowed! hover:cursor-not-allowed! opacity-disabled',\n option_focused: 'bg-default-100 active:bg-default-200',\n option_selected: 'bg-default-300',\n placeholder: 'ml-1 py-0.5 pl-1 text-sm text-foreground-500',\n selectContainer: '',\n singleValue: 'ml-1! leading-7!',\n valueContainer: 'gap-1 p-1',\n },\n});\n\nexport interface SelectOption {\n /** set option to disabled state */\n disabled?: boolean;\n /**\n * True when option was auto-generated because the value wasn't found in options.\n * Use in renderOptionLabel to render a component that fetches the real label.\n */\n isFallback?: boolean;\n /** option label */\n label?: ReactNode;\n /** option value */\n value: string | number;\n}\n\ntype VariantProps = TVProps<typeof selectVariants>;\ntype ClassName = TVClassName<typeof selectVariants>;\n\nexport interface SelectProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName; // string;\n /** Determine if the */\n clearable?: boolean;\n /** Set the select to disabled state. */\n disabled?: boolean;\n /** Force menu open for debugging or visual testing. */\n debugMenuOpen?: boolean;\n /** Filter Select Options */\n filterOption?:\n | undefined\n | ((option?: SelectOption, inputValue?: string) => boolean);\n /** The value of the search input */\n inputValue?: string;\n /** Label that should be associated with the select. */\n label?: ReactNode;\n /** Set the select to a loading state. */\n loading?: boolean;\n /** switch between single and multi select mode. */\n multiSelect?: boolean;\n /** The name for the Select component, used by react-hook-form */\n name: string;\n /** Placeholder that is displayed when nothing is selected */\n placeholder?: string;\n /** Handle change events on the input */\n onInputChange?: Props['onInputChange'];\n /** The options for the Select component */\n options: SelectOption[];\n /** Render custom content when no options match the current search input. */\n renderEmptyOptions?: Props['noOptionsMessage'];\n /** Format the label of the option */\n renderOptionLabel?: undefined | Props['formatOptionLabel'];\n /**\n * Fallback option(s) for async selects when value isn't in current options.\n * Use when the selected value may not be in the options list (e.g., after\n * search results change). Used only if value not found in options.\n * For single select: pass the option object or undefined\n * For multi-select: pass an array of option objects\n */\n selectedOptionFallback?: SelectOption | SelectOption[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Allows disentangled display and form values for a field. */\n transform?: InputValueTransform;\n}\n\n/** Select component based on [HeroUI Select](https://www.heroui.com//docs/components/select) and [React-Select](https://react-select.com/home) */\nconst Select = ({\n className = undefined,\n clearable = true,\n debugMenuOpen = false,\n filterOption = undefined,\n inputValue = undefined,\n loading = false,\n multiSelect = false,\n name,\n onInputChange = undefined,\n options,\n placeholder = undefined,\n renderEmptyOptions = undefined,\n renderOptionLabel = undefined,\n selectedOptionFallback = undefined,\n ...uniformFieldProps\n}: SelectProps) => {\n const {\n ariaLabel,\n disabled,\n errorMessage,\n field: { onBlur, onChange, ref, value },\n getErrorMessageProps,\n getHelperWrapperProps,\n getLabelProps,\n invalid,\n label,\n required,\n testId,\n } = useUniformField({\n // Multi-select values are arrays and can produce nested RHF error shapes.\n isArrayValue: multiSelect,\n name,\n ...uniformFieldProps,\n });\n\n // Get getFieldState to check isTouched in onChange callback\n const { getFieldState } = useFormContext();\n\n // Track if the select is focused\n const [isFocused, setIsFocused] = useState(false);\n\n // Create converter to preserve number types for option values\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n // classNames from slots\n const variants = selectVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // React-select classNames configuration\n const reactSelectClassNames = {\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n input: () => {\n return classNames.input;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\n },\n menu: () => {\n return classNames.menu;\n },\n menuList: () => {\n return classNames.menuList;\n },\n menuPortal: () => {\n return classNames.menuPortal;\n },\n multiValue: () => {\n return classNames.multiValue;\n },\n multiValueLabel: () => {\n return cn(`${getValueProps().className}`, classNames.multiValueLabel);\n },\n multiValueRemove: () => {\n return classNames.multiValueRemove;\n },\n noOptionsMessage: () => {\n return classNames.noOptionsMessage;\n },\n option: ({\n isDisabled: optionIsDisabled,\n isFocused: optionIsFocused,\n isSelected: optionIsSelected,\n }: {\n isDisabled: boolean;\n isFocused: boolean;\n isSelected: boolean;\n }) => {\n return cn(classNames.option, {\n [classNames.option_disabled]: optionIsDisabled,\n [classNames.option_focused]: optionIsFocused,\n [classNames.option_selected]: optionIsSelected,\n });\n },\n placeholder: () => {\n return classNames.placeholder;\n },\n singleValue: () => {\n return cn(classNames.singleValue, `${getValueProps().className}`);\n },\n valueContainer: () => {\n return classNames.valueContainer;\n },\n };\n\n const { getBaseProps, getTriggerProps, getValueProps } = useSelect({\n children: [],\n classNames,\n errorMessage,\n isDisabled: disabled,\n isInvalid: invalid,\n isLoading: loading,\n isRequired: required,\n label,\n labelPlacement: 'outside',\n });\n\n // react-select expects `isDisabled`, while our option contract uses `disabled`.\n const reactSelectOptions = options.map((option) => {\n return {\n ...option,\n isDisabled: option.disabled,\n };\n });\n\n // Compute selected option(s) for react-select\n //\n // Priority for finding options:\n // 1. Look in current options list\n // 2. Use selectedOptionFallback prop (for async selects with pre-fetched data)\n // 3. Create fallback with value as label\n //\n // Handles edge cases:\n // - Compares as strings to support both string and number values\n // - Returns null for empty single-select (required by react-select to clear)\n // - Creates fallback options when value exists but isn't in options list\n // (common with async selects where options change after selection)\n const reactSelectValue = (() => {\n // Helper to find option by value\n const findOption = (v: string | number): SelectOption => {\n // First, look in options list\n const inOptions = options.find((option) => {\n return String(option.value) === String(v);\n });\n if (inOptions) {\n return inOptions;\n }\n\n // Second, look in selectedOptionFallback prop (for async selects)\n if (selectedOptionFallback) {\n if (Array.isArray(selectedOptionFallback)) {\n const inSelected = selectedOptionFallback.find((option) => {\n return String(option.value) === String(v);\n });\n if (inSelected) {\n return inSelected;\n }\n } else if (String(selectedOptionFallback.value) === String(v)) {\n return selectedOptionFallback;\n }\n }\n\n // Fallback: create option with value as label, marked as fallback\n return { isFallback: true, label: String(v), value: v };\n };\n\n if (multiSelect) {\n if (!Array.isArray(value) || isValueEmpty(value)) {\n return [];\n }\n return value.map((v) => {\n return findOption(v);\n });\n }\n\n // Single select - use isValueEmpty to handle marker strings (__NULL__, etc.)\n if (isValueEmpty(value)) {\n return null;\n }\n return findOption(value);\n })();\n\n // Handle selection change\n const handleChange = (\n option: MultiValue<SelectOption> | SingleValue<SelectOption>,\n ) => {\n if (multiSelect) {\n onChange(\n (option as SelectOption[])?.map((_option) => {\n return convertToOriginalType(_option.value);\n }),\n );\n } else {\n const newValue = (option as SelectOption)?.value;\n // Pass null explicitly when clearing (not undefined)\n onChange(newValue != null ? convertToOriginalType(newValue) : null);\n }\n\n // Mark field as touched immediately when a selection is made if not already touched\n // This ensures validation errors show right away (isTouched becomes true)\n // For Select components, selecting an option is a complete user action\n // (unlike text inputs where typing is ongoing), so we mark as touched immediately\n const { isTouched: currentIsTouched } = getFieldState(name, testId);\n if (!currentIsTouched) {\n // Defer blur/touched notification until after the onChange value commit.\n // This prevents \"one render cycle behind\" validation states where blur\n // validation runs against the previous value.\n queueMicrotask(() => {\n onBlur();\n });\n }\n };\n\n // Handle blur event\n const handleBlur = () => {\n setIsFocused(false);\n onBlur();\n };\n\n // Handle focus event\n const handleFocus = () => {\n setIsFocused(true);\n };\n\n return (\n <div\n {...getBaseProps()}\n className={cn(classNames.base)}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-required={required}\n data-testid={`${testId}_wrapper`}\n >\n {label ? (\n <label\n className={classNames.label}\n data-slot=\"label\"\n htmlFor={`react-select-${name}-input`}\n id={getLabelProps().id}\n >\n {label}\n {required ? (\n <span aria-hidden className=\"ml-0.5 text-danger\">\n *\n </span>\n ) : null}\n </label>\n ) : null}\n <ReactSelect\n ref={ref}\n aria-errormessage=\"\"\n aria-invalid={invalid}\n aria-label={ariaLabel}\n // set aria-labelledby to the label id so that the select is accessible\n aria-labelledby={\n label\n ? getTriggerProps()['aria-labelledby']?.split(' ')[1]\n : undefined\n }\n classNames={reactSelectClassNames}\n components={{\n Control: ControlComponent,\n DropdownIndicator: DropdownIndicatorComponent,\n Input: InputComponent,\n Option: OptionComponent,\n }}\n // Does not affect the testId of the select, but is needed to pass it to sub-components\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputValue={inputValue}\n instanceId={name}\n isClearable={clearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n menuIsOpen={debugMenuOpen ? true : undefined}\n // set menuPosition to fixed so that menu can be rendered\n // inside Card / Modal components, menuShouldBlockScroll\n // prevents container scroll when menu is open\n menuPosition=\"fixed\"\n menuShouldBlockScroll\n name={name}\n noOptionsMessage={renderEmptyOptions}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n onInputChange={onInputChange}\n options={reactSelectOptions}\n placeholder={placeholder}\n unstyled\n value={reactSelectValue}\n />\n {invalid ? (\n <div {...getHelperWrapperProps()}>\n <div {...getErrorMessageProps()}>{errorMessage}</div>\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Select;\n","import Select from './Select';\n\nexport type { SelectProps, SelectOption } from './Select';\n\nexport { selectVariants } from './Select';\n\nexport default Select;\n"],"mappings":";;;;;;;;;;AAKA,MAAa,kBAA2C,UAAU;CAGhE,MAAM,SAAS,GAAG,MAAM,YAAY;CACpC,OAAO,oBAAC,WAAW,OAAZ;EAAkB,eAAa;EAAQ,GAAI;CAAQ,CAAA;AAC5D;;AAGA,MAAa,oBAA+C,UAAU;CAGpE,MAAM,SAAS,GAAG,MAAM,YAAY,eAAe;CACnD,OACE,oBAAC,OAAD;EAAK,eAAa;EAChB,UAAA,oBAAC,WAAW,SAAZ,EAAoB,GAAI,MAAQ,CAAA;CAC7B,CAAA;AAET;;AAGA,MAAa,mBAA6C,UAAU;CAClE,MAAM,EAAE,eAAe;CAGvB,MAAM,SAAS,GAAG,MAAM,YAAY,eAAe,iBAAiB,QAAQ,OAAO,OAAO,MAAM,UAAU,OAAO,MAAM,KAAK,GAAG,EAAE,aAAa,KAAK,CAAC;CACpJ,OACE,oBAAC,OAAD;EAAK,iBAAe,aAAa,OAAO,KAAA;EAAW,eAAa;EAC9D,UAAA,oBAAC,WAAW,QAAZ,EAAmB,GAAI,MAAQ,CAAA;CAC5B,CAAA;AAET;;AAGA,MAAa,8BACX,UACG;CAEH,MAAM,SAAS,OAAO,YAAY;CAClC,OACE,oBAAC,OAAD;EAAK,eAAa,GAAG,OAAO;EAC1B,UAAA,oBAAC,WAAW,mBAAZ,EAA8B,GAAI,MAAQ,CAAA;CACvC,CAAA;AAET;;;AC1BA,MAAa,iBAAiB,GAAG,EAC/B,OAAO;CACL,MAAM;EAEJ;EAEA;EAEA;EAEA;CACF;CACA,gBACE;CACF,SACE;CACF,iBAAiB;CACjB,WAAW;CACX,aAAa;CACb,mBACE;CACF,OAAO;CACP,cAAc;CACd,qBAAqB;CACrB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B,gBAAc;IACd,cAAY;IAEZ,mBACE,QACI,gBAAgB,CAAC,CAAC,kBAAkB,EAAE,MAAM,GAAG,CAAC,CAAC,KACjD,KAAA;IAEN,YAAY;IACZ,YAAY;KACV,SAAS;KACT,mBAAmB;KACnB,OAAO;KACP,QAAQ;IACV;IAEA,eAAa;IACC;IACd,mBAAmB;IACP;IACZ,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,WAAW;IACX,SAAS;IACT,YAAY,gBAAgB,OAAO,KAAA;IAInC,cAAa;IACb,uBAAA;IACM;IACN,kBAAkB;IAClB,QAAQ;IACR,UAAU;IACV,SAAS;IACM;IACf,SAAS;IACI;IACb,UAAA;IACA,OAAO;GACR,CAAA;GACA,UACC,oBAAC,OAAD;IAAK,GAAI,sBAAsB;IAC7B,UAAA,oBAAC,OAAD;KAAK,GAAI,qBAAqB;KAAI,UAAA;IAAkB,CAAA;GACjD,CAAA,IACH;EACD;;AAET;;;AC5cA,IAAA,iBAAe"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/Select/selectVariants.ts","../../src/Select/helpers/getSelectClassNames.ts","../../src/Select/helpers/resolveSelectValue.ts","../../src/Select/subcomponents/SelectContext.ts","../../src/Select/subcomponents/SelectCrossIcon.tsx","../../src/Select/subcomponents/SelectClearIndicator.tsx","../../src/Select/subcomponents/SelectDownChevron.tsx","../../src/Select/subcomponents/SelectDropdownIndicator.tsx","../../src/Select/subcomponents/SelectInput.tsx","../../src/Select/subcomponents/SelectInputControl.tsx","../../src/Select/subcomponents/SelectMultiValueContainer.tsx","../../src/Select/subcomponents/SelectMultiValueRemove.tsx","../../src/Select/subcomponents/SelectOption.tsx","../../src/Select/subcomponents/SelectCombobox.tsx","../../src/Select/subcomponents/SelectControl.tsx","../../src/Select/Select.tsx","../../src/Select/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nexport const selectVariants = tv({\n slots: {\n base: [\n // Enables group-data selectors used by child slots.\n 'group',\n // Make field wrappers align with other form controls.\n 'flex w-full flex-col',\n // Keep label/control vertical rhythm consistent.\n 'gap-y-1.5',\n // Preserve existing text flow for select content.\n 'leading-normal',\n ],\n clearIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800',\n control: [\n // control surface and transition\n 'duration-150! min-h-10 rounded-lg border-2 border-default-200 bg-content1 transition-background',\n // hover and validation borders\n 'hover:border-default-400 group-data-[invalid=true]:border-danger group-data-[invalid=true]:hover:border-danger',\n // reduced motion\n 'motion-reduce:transition-none',\n ],\n control_focused: 'border-focus',\n crossIcon: '',\n description: 'text-foreground-500 text-tiny',\n downChevron: '',\n dropdownIndicator:\n 'rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-black',\n errorMessage: 'text-danger text-tiny',\n group: '',\n groupHeading: 'mb-1 ml-3 mt-2 text-sm text-foreground-500',\n helperWrapper: 'relative flex flex-col gap-1.5 p-0',\n indicatorSeparator: 'bg-default-300',\n indicatorsContainer: 'gap-1 p-1',\n input: 'py-0.5 pl-1',\n label: [\n // label interaction and typography\n 'pointer-events-auto inline-flex cursor-default text-sm text-foreground subpixel-antialiased',\n // validation color\n 'group-data-[invalid=true]:!text-danger',\n ],\n loadingIndicator: '',\n loadingMessage: 'rounded-sm p-2 text-foreground-500',\n menu: 'mt-2 rounded-xl border border-default-200 bg-content1 p-1 shadow-lg',\n menuList: '',\n // ensure menu has same z-index as modal so it is visible when rendered in modal\n menuPortal: 'z-50!',\n multiValue: 'h-6 items-center gap-1.5 rounded bg-default-100 pl-2 pr-1',\n multiValueContainer: '',\n multiValueLabel: 'py-0 leading-5',\n multiValueRemove: [\n // remove button layout and appearance\n 'flex h-5 w-5 items-center justify-center rounded text-default-500',\n // hover feedback\n 'hover:cursor-pointer hover:border-default-300 hover:text-default-800',\n ],\n noOptionsMessage: 'rounded-sm p-2 text-foreground-500',\n option: 'rounded px-3 py-2 hover:cursor-pointer',\n option_disabled:\n 'cursor-not-allowed! hover:cursor-not-allowed! opacity-disabled',\n option_focused: 'bg-default-100 active:bg-default-200',\n option_selected: 'bg-default-300',\n placeholder: 'ml-1 py-0.5 pl-1 text-sm text-foreground-500',\n selectContainer: '',\n selectedValue: 'w-full truncate text-start font-normal text-small',\n singleValue: 'ml-1! leading-7!',\n valueContainer: 'gap-1 p-1',\n },\n variants: {\n disabled: { true: { base: 'pointer-events-none opacity-disabled' } },\n invalid: { true: { selectedValue: 'text-danger!' } },\n },\n});\n\nexport type VariantProps = TVProps<typeof selectVariants>;\n\nexport type ClassName = TVClassName<typeof selectVariants>;\n\nexport type SelectClassNames = Record<\n keyof ReturnType<typeof selectVariants>,\n string\n>;\n","import type { useStyling } from '@fuf-stack/pixels/StylingProvider';\nimport type { SelectClassNames } from '../selectVariants';\n\n/** Maps resolved Uniform slots to React Select's class callbacks */\nconst getSelectClassNames = (\n classNames: SelectClassNames,\n cn: ReturnType<typeof useStyling>['cn'],\n isFocused: boolean,\n invalid: boolean,\n) => {\n // React-select classNames configuration\n return {\n container: () => {\n return classNames.selectContainer;\n },\n group: () => {\n return classNames.group;\n },\n clearIndicator: () => {\n return classNames.clearIndicator;\n },\n control: () => {\n return cn(classNames.control, {\n [classNames.control_focused]: isFocused && !invalid,\n });\n },\n dropdownIndicator: () => {\n return classNames.dropdownIndicator;\n },\n groupHeading: () => {\n return classNames.groupHeading;\n },\n indicatorSeparator: () => {\n return classNames.indicatorSeparator;\n },\n indicatorsContainer: () => {\n return classNames.indicatorsContainer;\n },\n input: () => {\n return classNames.input;\n },\n loadingIndicator: () => {\n return classNames.loadingIndicator;\n },\n loadingMessage: () => {\n return classNames.loadingMessage;\n },\n menu: () => {\n return classNames.menu;\n },\n menuList: () => {\n return classNames.menuList;\n },\n menuPortal: () => {\n return classNames.menuPortal;\n },\n multiValue: () => {\n return classNames.multiValue;\n },\n multiValueLabel: () => {\n return cn(classNames.selectedValue, classNames.multiValueLabel);\n },\n multiValueRemove: () => {\n return classNames.multiValueRemove;\n },\n noOptionsMessage: () => {\n return classNames.noOptionsMessage;\n },\n option: ({\n isDisabled: optionIsDisabled,\n isFocused: optionIsFocused,\n isSelected: optionIsSelected,\n }: {\n isDisabled: boolean;\n isFocused: boolean;\n isSelected: boolean;\n }) => {\n return cn(classNames.option, {\n [classNames.option_disabled]: optionIsDisabled,\n [classNames.option_focused]: optionIsFocused,\n [classNames.option_selected]: optionIsSelected,\n });\n },\n placeholder: () => {\n return classNames.placeholder;\n },\n singleValue: () => {\n return cn(classNames.selectedValue, classNames.singleValue);\n },\n valueContainer: () => {\n return classNames.valueContainer;\n },\n };\n};\n\nexport default getSelectClassNames;\n","import type { SelectOption } from '../Select';\n\nimport { isValueEmpty } from '../../helpers';\n\n/** Finds selected options, preserving fallback labels for asynchronous searches */\nconst resolveSelectValue = (\n value: unknown,\n options: SelectOption[],\n multiSelect: boolean,\n selectedOptionFallback: SelectOption | SelectOption[] | undefined,\n) => {\n // Helper to find option by value\n const findOption = (v: string | number): SelectOption => {\n // First, look in options list\n const inOptions = options.find((option) => {\n return String(option.value) === String(v);\n });\n if (inOptions) {\n return inOptions;\n }\n\n // Second, look in selectedOptionFallback prop (for async selects)\n if (selectedOptionFallback) {\n if (Array.isArray(selectedOptionFallback)) {\n const inSelected = selectedOptionFallback.find((option) => {\n return String(option.value) === String(v);\n });\n if (inSelected) {\n return inSelected;\n }\n } else if (String(selectedOptionFallback.value) === String(v)) {\n return selectedOptionFallback;\n }\n }\n\n // Fallback: create option with value as label, marked as fallback\n return { isFallback: true, label: String(v), value: v };\n };\n\n if (multiSelect) {\n if (!Array.isArray(value) || isValueEmpty(value)) {\n return [];\n }\n return value.map((v) => {\n return findOption(v);\n });\n }\n\n // Single select - use isValueEmpty to handle marker strings (__NULL__, etc.)\n if (isValueEmpty(value)) {\n return null;\n }\n return findOption(value as string | number);\n};\n\nexport default resolveSelectValue;\n","import type { HTMLAttributes } from 'react';\n\nimport { createContext } from 'react';\n\n/** Resolved slot classes shared with the select's engine adapters */\nexport const SelectSlotContext = createContext<Record<string, string>>({});\n\n/** Native input associations supplied by the field binding */\nexport const SelectControlContext = createContext<\n HTMLAttributes<HTMLInputElement>\n>({});\n","import { useContext } from 'react';\nimport { components } from 'react-select';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { SelectSlotContext } from './SelectContext';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectCrossIconProps = Parameters<typeof components.CrossIcon>[0];\n\n/** Bind the declared icon/container slots to React Select's corresponding elements. */\nconst SelectCrossIcon = (props: SelectCrossIconProps) => {\n const { className } = props;\n const slots = useContext(SelectSlotContext);\n const { cn } = useStyling();\n return (\n <components.CrossIcon\n {...props}\n className={cn(className, slots.crossIcon)}\n />\n );\n};\n\nexport default SelectCrossIcon;\n","import { components } from 'react-select';\n\nimport SelectCrossIcon from './SelectCrossIcon';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectClearIndicatorProps = Parameters<\n typeof components.ClearIndicator\n>[0];\n\nconst SelectClearIndicator = (props: SelectClearIndicatorProps) => {\n return (\n <components.ClearIndicator {...props}>\n <SelectCrossIcon />\n </components.ClearIndicator>\n );\n};\n\nexport default SelectClearIndicator;\n","import { useContext } from 'react';\nimport { components } from 'react-select';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { SelectSlotContext } from './SelectContext';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectDownChevronProps = Parameters<typeof components.DownChevron>[0];\n\nconst SelectDownChevron = (props: SelectDownChevronProps) => {\n const { className } = props;\n const slots = useContext(SelectSlotContext);\n const { cn } = useStyling();\n return (\n <components.DownChevron\n {...props}\n className={cn(className, slots.downChevron)}\n />\n );\n};\n\nexport default SelectDownChevron;\n","import { components } from 'react-select';\n\nimport SelectDownChevron from './SelectDownChevron';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectDropdownIndicatorProps = Parameters<\n typeof components.DropdownIndicator\n>[0];\n\n/** Wraps the dropdown indicator with a predictable test id for automation. */\nconst SelectDropdownIndicator = (props: SelectDropdownIndicatorProps) => {\n // @ts-expect-error data-testid is not a default prop\n const testId = props?.selectProps['data-testid'] as string;\n return (\n <div data-testid={`${testId}_select_dropdown`}>\n <components.DropdownIndicator {...props}>\n <SelectDownChevron />\n </components.DropdownIndicator>\n </div>\n );\n};\n\nexport default SelectDropdownIndicator;\n","import { useContext } from 'react';\nimport { components } from 'react-select';\n\nimport { SelectControlContext } from './SelectContext';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectInputProps = Parameters<typeof components.Input>[0];\n\n/** Mirrors the select test id onto the underlying react-select input element. */\nconst SelectInput = (props: SelectInputProps) => {\n const associations = useContext(SelectControlContext);\n\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}`;\n\n const { 'aria-describedby': engineDescription } = props;\n const describedBy =\n [engineDescription, associations['aria-describedby']]\n .filter(Boolean)\n .join(' ') || undefined;\n return (\n <components.Input\n {...props}\n {...associations}\n aria-describedby={describedBy}\n data-testid={testId}\n />\n );\n};\n\nexport default SelectInput;\n","import { components } from 'react-select';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectInputControlProps = Parameters<typeof components.Control>[0];\n\n/** Wraps the control root to expose a stable `*_select` test id hook. */\nconst SelectInputControl = (props: SelectInputControlProps) => {\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select`;\n\n return (\n <div data-testid={testId}>\n <components.Control {...props} />\n </div>\n );\n};\n\nexport default SelectInputControl;\n","import { useContext } from 'react';\nimport { components } from 'react-select';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { SelectSlotContext } from './SelectContext';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectMultiValueContainerProps = Parameters<\n typeof components.MultiValueContainer\n>[0];\n\nconst SelectMultiValueContainer = (props: SelectMultiValueContainerProps) => {\n const slots = useContext(SelectSlotContext);\n const { cn } = useStyling();\n\n const { innerProps } = props;\n return (\n <components.MultiValueContainer\n {...props}\n innerProps={{\n ...innerProps,\n className: cn(innerProps.className, slots.multiValueContainer),\n }}\n />\n );\n};\n\nexport default SelectMultiValueContainer;\n","import { components } from 'react-select';\n\nimport SelectCrossIcon from './SelectCrossIcon';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectMultiValueRemoveProps = Parameters<\n typeof components.MultiValueRemove\n>[0];\n\nconst SelectMultiValueRemove = (props: SelectMultiValueRemoveProps) => {\n return (\n <components.MultiValueRemove {...props}>\n <SelectCrossIcon size={14} />\n </components.MultiValueRemove>\n );\n};\n\nexport default SelectMultiValueRemove;\n","import { components } from 'react-select';\n\nimport { slugify } from '@fuf-stack/pixel-utils';\n\n/** Props inherited from the corresponding React Select adapter */\ntype SelectOptionProps = Parameters<typeof components.Option>[0];\n\n/** Adds deterministic option test ids and forwards disabled state semantics. */\nconst SelectOption = (props: SelectOptionProps) => {\n const { isDisabled } = props;\n\n // @ts-expect-error data-testid is not a default prop\n // eslint-disable-next-line react/destructuring-assignment\n const testId = `${props.selectProps['data-testid']}_select_option_${slugify(String(props?.data?.testId ?? props?.data?.value), { replaceDots: true })}`;\n return (\n <div aria-disabled={isDisabled ? true : undefined} data-testid={testId}>\n <components.Option {...props} />\n </div>\n );\n};\n\nexport default SelectOption;\n","import type { UniformField } from '../../hooks/useUniformField/types';\nimport type { SelectOption as SelectOptionData, SelectProps } from '../Select';\nimport type { SelectClassNames } from '../selectVariants';\n\nimport { useState } from 'react';\nimport ReactSelect from 'react-select';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { createOptionValueConverter } from '../../helpers';\nimport { getFieldControlProps } from '../../helpers/fieldProps/fieldProps';\nimport getSelectClassNames from '../helpers/getSelectClassNames';\nimport resolveSelectValue from '../helpers/resolveSelectValue';\nimport SelectClearIndicator from './SelectClearIndicator';\nimport { SelectControlContext, SelectSlotContext } from './SelectContext';\nimport SelectDownChevron from './SelectDownChevron';\nimport SelectDropdownIndicator from './SelectDropdownIndicator';\nimport SelectInput from './SelectInput';\nimport SelectInputControl from './SelectInputControl';\nimport SelectMultiValueContainer from './SelectMultiValueContainer';\nimport SelectMultiValueRemove from './SelectMultiValueRemove';\nimport SelectOption from './SelectOption';\n\nconst selectComponents = {\n Control: SelectInputControl,\n ClearIndicator: SelectClearIndicator,\n MultiValueRemove: SelectMultiValueRemove,\n DownChevron: SelectDownChevron,\n MultiValueContainer: SelectMultiValueContainer,\n DropdownIndicator: SelectDropdownIndicator,\n Input: SelectInput,\n Option: SelectOption,\n};\n\ninterface SelectComboboxProps extends Omit<\n SelectProps,\n keyof UniformField | 'className' | 'transform'\n> {\n /** CSS class name */\n className: SelectClassNames;\n /** Bound field values, interactions and metadata */\n field: UniformField;\n /** Reads the current touched state after a selection commits */\n getIsTouched: () => boolean;\n}\n\n/**\n * Searchable option engine with value conversion, menu slots and touched timing\n *\n * @see https://react-select.com/components\n */\nconst SelectCombobox = ({\n className: classNames,\n clearable,\n debugMenuOpen,\n field,\n filterOption,\n getIsTouched,\n inputValue,\n loading,\n multiSelect = false,\n onInputChange,\n options,\n placeholder,\n renderEmptyOptions,\n renderOptionLabel,\n selectedOptionFallback,\n}: SelectComboboxProps) => {\n const styling = useStyling();\n const [isFocused, setIsFocused] = useState(false);\n\n const {\n disabled,\n ids,\n invalid,\n name,\n onBlur,\n onChange: onValueChange,\n ref: inputRef,\n testId,\n value,\n } = field;\n const controlProps = getFieldControlProps(field);\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n const reactSelectClassNames = getSelectClassNames(\n classNames,\n styling.cn,\n isFocused,\n invalid,\n );\n\n // adapt option disabled state for react-select\n const reactSelectOptions = options.map((option) => {\n return {\n ...option,\n isDisabled: option.disabled,\n };\n });\n\n const reactSelectValue = resolveSelectValue(\n value,\n options,\n multiSelect,\n selectedOptionFallback,\n );\n\n // convert React Select options into the original value types\n const handleChange = (option: unknown) => {\n if (multiSelect) {\n onValueChange(\n (option as SelectOptionData[])?.map((selectedOption) => {\n return convertToOriginalType(selectedOption.value);\n }),\n );\n } else {\n const nextValue = (option as SelectOptionData)?.value;\n\n // an empty single selection is stored as null\n onValueChange(\n nextValue != null ? convertToOriginalType(nextValue) : null,\n );\n }\n\n // defer the first touched update so validation reads the committed selection\n if (!getIsTouched()) {\n queueMicrotask(() => {\n onBlur();\n });\n }\n };\n\n // update focus state and notify the field on blur\n const handleBlur = () => {\n setIsFocused(false);\n onBlur();\n };\n\n // track focus for the control styles\n const handleFocus = () => {\n setIsFocused(true);\n };\n\n return (\n <SelectControlContext.Provider value={controlProps}>\n <SelectSlotContext.Provider value={classNames}>\n <ReactSelect<unknown, boolean>\n ref={inputRef}\n aria-errormessage=\"\"\n aria-invalid={invalid}\n aria-label={controlProps['aria-label']}\n aria-labelledby={controlProps['aria-labelledby']}\n classNames={reactSelectClassNames}\n components={selectComponents}\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputId={ids.control}\n inputValue={inputValue}\n instanceId={ids.control}\n isClearable={clearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n menuIsOpen={debugMenuOpen ? true : undefined}\n // set menuPosition to fixed so that menu can be rendered\n // inside Card / Modal components, menuShouldBlockScroll\n // prevents container scroll when menu is open\n menuPosition=\"fixed\"\n menuShouldBlockScroll\n name={name}\n noOptionsMessage={renderEmptyOptions}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n onInputChange={onInputChange}\n options={reactSelectOptions}\n placeholder={placeholder}\n unstyled\n value={reactSelectValue}\n />\n </SelectSlotContext.Provider>\n </SelectControlContext.Provider>\n );\n};\n\nexport default SelectCombobox;\n","import type { UniformField } from '../../hooks/useUniformField/types';\nimport type { SelectProps } from '../Select';\n\nimport { useStyling } from '@fuf-stack/pixels/StylingProvider';\n\nimport { getFieldDataAttributes } from '../../helpers/fieldProps/fieldProps';\nimport FieldLayout from '../../partials/FieldLayout/FieldLayout';\nimport { selectVariants } from '../selectVariants';\nimport SelectCombobox from './SelectCombobox';\n\ninterface SelectControlProps extends Omit<\n SelectProps,\n keyof UniformField | 'transform'\n> {\n /** Bound field values, interactions and metadata */\n field: UniformField;\n /** Reads the current touched state after a selection commits */\n getIsTouched: () => boolean;\n}\n\n/** Searchable selection field layout and styling around the option engine */\nconst SelectControl = ({ className, field, ...props }: SelectControlProps) => {\n const styling = useStyling();\n\n const {\n description,\n disabled,\n errorMessage,\n ids,\n invalid,\n label,\n required,\n testId,\n } = field;\n\n // classNames from slots\n const variants = styling.resolve(selectVariants, { disabled, invalid });\n const classNames = styling.variantsToClassNames(variants, className, 'base');\n\n return (\n <FieldLayout\n baseProps={{\n ...getFieldDataAttributes(field),\n 'data-component': 'select',\n 'data-testid': `${testId}_wrapper`,\n }}\n className={classNames}\n description={description}\n errorMessage={errorMessage}\n ids={ids}\n invalid={invalid}\n label={label}\n required={required}\n >\n <SelectCombobox {...props} className={classNames} field={field} />\n </FieldLayout>\n );\n};\n\nexport default SelectControl;\n","import type { ReactNode } from 'react';\nimport type { Props } from 'react-select';\nimport type { InputValueTransform } from '../hooks/useInputValueTransform';\nimport type { ClassName } from './selectVariants';\n\nimport { useFormContext } from '../hooks/useFormContext';\nimport useUniformField from '../hooks/useUniformField/useUniformField';\nimport SelectControl from './subcomponents/SelectControl';\n\nexport { selectVariants } from './selectVariants';\n\nexport interface SelectOption {\n /** Disables the field */\n disabled?: boolean;\n /**\n * True when option was auto-generated because the value wasn't found in options.\n * Use in renderOptionLabel to render a component that fetches the real label.\n */\n isFallback?: boolean;\n /** Field label */\n label?: ReactNode;\n /** option value */\n value: string | number;\n}\n\nexport interface SelectProps {\n /** Custom accessible name */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** Determine if the */\n clearable?: boolean;\n /** Force menu open for debugging or visual testing. */\n debugMenuOpen?: boolean;\n // string;\n /** Help text associated with the field */\n description?: ReactNode;\n /** Disables the field */\n disabled?: boolean;\n /** Filter Select Options */\n filterOption?:\n undefined | ((option?: SelectOption, inputValue?: string) => boolean);\n /** The value of the search input */\n inputValue?: string;\n /** Field label */\n label?: ReactNode;\n /** Set the select to a loading state. */\n loading?: boolean;\n /** switch between single and multi select mode. */\n multiSelect?: boolean;\n /** Field name */\n name: string;\n /** Handle change events on the input */\n onInputChange?: Props['onInputChange'];\n /** Available options */\n options: SelectOption[];\n /** Placeholder text */\n placeholder?: string;\n /** Render custom content when no options match the current search input. */\n renderEmptyOptions?: Props['noOptionsMessage'];\n /** Format the label of the option */\n renderOptionLabel?: undefined | Props['formatOptionLabel'];\n /**\n * Fallback option(s) for async selects when value isn't in current options.\n * Use when the selected value may not be in the options list (e.g., after\n * search results change). Used only if value not found in options.\n * For single select: pass the option object or undefined\n * For multi-select: pass an array of option objects\n */\n selectedOptionFallback?: SelectOption | SelectOption[];\n /** HTML data-testid attribute for e2e tests */\n testId?: string;\n /** Allows disentangled display and form values for a field. */\n transform?: InputValueTransform;\n}\n\n/** Form selection field with searchable single or multiple options */\nconst Select = ({\n className = undefined,\n clearable = true,\n debugMenuOpen = false,\n filterOption = undefined,\n inputValue = undefined,\n loading = false,\n multiSelect = false,\n name,\n onInputChange = undefined,\n options,\n placeholder = undefined,\n renderEmptyOptions = undefined,\n renderOptionLabel = undefined,\n selectedOptionFallback = undefined,\n ...uniformFieldProps\n}: SelectProps) => {\n const { getFieldState } = useFormContext();\n const { field } = useUniformField({\n ...uniformFieldProps,\n isArrayValue: multiSelect,\n name,\n });\n\n const getIsTouched = () => {\n return getFieldState(name, field.testId).isTouched;\n };\n\n return (\n <SelectControl\n className={className}\n clearable={clearable}\n debugMenuOpen={debugMenuOpen}\n field={field}\n filterOption={filterOption}\n getIsTouched={getIsTouched}\n inputValue={inputValue}\n loading={loading}\n multiSelect={multiSelect}\n onInputChange={onInputChange}\n options={options}\n placeholder={placeholder}\n renderEmptyOptions={renderEmptyOptions}\n renderOptionLabel={renderOptionLabel}\n selectedOptionFallback={selectedOptionFallback}\n />\n );\n};\n\nexport default Select;\n","import Select from './Select';\n\nexport type { SelectProps, SelectOption } from './Select';\n\nexport { selectVariants } from './Select';\n\nexport default Select;\n"],"mappings":";;;;;;;;;;;AAIA,MAAa,iBAAiB,GAAG;CAC/B,OAAO;EACL,MAAM;GAEJ;GAEA;GAEA;GAEA;EACF;EACA,gBACE;EACF,SAAS;GAEP;GAEA;GAEA;EACF;EACA,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,aAAa;EACb,mBACE;EACF,cAAc;EACd,OAAO;EACP,cAAc;EACd,eAAe;EACf,oBAAoB;EACpB,qBAAqB;EACrB,OAAO;EACP,OAAO,CAEL,+FAEA,wCACF;EACA,kBAAkB;EAClB,gBAAgB;EAChB,MAAM;EACN,UAAU;EAEV,YAAY;EACZ,YAAY;EACZ,qBAAqB;EACrB,iBAAiB;EACjB,kBAAkB,CAEhB,qEAEA,sEACF;EACA,kBAAkB;EAClB,QAAQ;EACR,iBACE;EACF,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EACb,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,gBAAgB;CAClB;CACA,UAAU;EACR,UAAU,EAAE,MAAM,EAAE,MAAM,uCAAuC,EAAE;EACnE,SAAS,EAAE,MAAM,EAAE,eAAe,eAAe,EAAE;CACrD;AACF,CAAC;;;;ACxED,MAAM,uBACJ,YACA,IACA,WACA,YACG;CAEH,OAAO;EACL,iBAAiB;GACf,OAAO,WAAW;EACpB;EACA,aAAa;GACX,OAAO,WAAW;EACpB;EACA,sBAAsB;GACpB,OAAO,WAAW;EACpB;EACA,eAAe;GACb,OAAO,GAAG,WAAW,SAAS,GAC3B,WAAW,kBAAkB,aAAa,CAAC,QAC9C,CAAC;EACH;EACA,yBAAyB;GACvB,OAAO,WAAW;EACpB;EACA,oBAAoB;GAClB,OAAO,WAAW;EACpB;EACA,0BAA0B;GACxB,OA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