@fuf-stack/uniform 2.0.0-next.3 → 2.0.0-next.4
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/Checkboxes/index.d.mts +58 -58
- package/dist/Checkboxes/index.d.mts.map +1 -1
- package/dist/Checkboxes/index.mjs +10 -8
- package/dist/Checkboxes/index.mjs.map +1 -1
- package/dist/DatePicker/index.d.mts +46 -109
- package/dist/DatePicker/index.d.mts.map +1 -1
- package/dist/DatePicker/index.mjs +15 -23
- package/dist/DatePicker/index.mjs.map +1 -1
- package/dist/FieldArray/index.mjs +9 -7
- package/dist/FieldArray/index.mjs.map +1 -1
- package/dist/FieldCard/index.mjs +5 -8
- package/dist/FieldCard/index.mjs.map +1 -1
- package/dist/FieldHelper-B1DWl7eu.mjs +38 -0
- package/dist/FieldHelper-B1DWl7eu.mjs.map +1 -0
- package/dist/FieldLabel-DMTqq0Jj.mjs +29 -0
- package/dist/FieldLabel-DMTqq0Jj.mjs.map +1 -0
- package/dist/{FieldLayout-DcvQU0zN.mjs → FieldLayout-C9MEBZAC.mjs} +10 -17
- package/dist/FieldLayout-C9MEBZAC.mjs.map +1 -0
- package/dist/{FieldValidationError-iAayfTEw.mjs → FieldValidationError-BuLvuRyi.mjs} +3 -3
- package/dist/FieldValidationError-BuLvuRyi.mjs.map +1 -0
- package/dist/Input/index.d.mts +596 -431
- package/dist/Input/index.d.mts.map +1 -1
- package/dist/Input/index.mjs +7 -10
- package/dist/Input/index.mjs.map +1 -1
- package/dist/RadioBoxes/index.d.mts +79 -63
- package/dist/RadioBoxes/index.d.mts.map +1 -1
- package/dist/RadioBoxes/index.mjs +5 -13
- package/dist/RadioBoxes/index.mjs.map +1 -1
- package/dist/RadioTabs/index.d.mts +572 -317
- package/dist/RadioTabs/index.d.mts.map +1 -1
- package/dist/RadioTabs/index.mjs +11 -11
- package/dist/RadioTabs/index.mjs.map +1 -1
- package/dist/Radios/index.d.mts +44 -41
- package/dist/Radios/index.d.mts.map +1 -1
- package/dist/Radios/index.mjs +5 -13
- package/dist/Radios/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +791 -599
- package/dist/Select/index.d.mts.map +1 -1
- package/dist/Select/index.mjs +7 -8
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Slider/index.d.mts +664 -354
- package/dist/Slider/index.d.mts.map +1 -1
- package/dist/Slider/index.mjs +18 -26
- package/dist/Slider/index.mjs.map +1 -1
- package/dist/Switch/index.d.mts +1 -1
- package/dist/Switch/index.mjs +12 -17
- package/dist/Switch/index.mjs.map +1 -1
- package/dist/Switch-aBYStBoY.d.mts +990 -0
- package/dist/{Switch-Db2dpGz7.d.mts.map → Switch-aBYStBoY.d.mts.map} +1 -1
- package/dist/SwitchBox/index.d.mts +593 -231
- package/dist/SwitchBox/index.d.mts.map +1 -1
- package/dist/SwitchBox/index.mjs +14 -18
- package/dist/SwitchBox/index.mjs.map +1 -1
- package/dist/TextArea/index.d.mts +553 -216
- package/dist/TextArea/index.d.mts.map +1 -1
- package/dist/TextArea/index.mjs +7 -10
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Time/index.d.mts +45 -45
- package/dist/Time/index.d.mts.map +1 -1
- package/dist/Time/index.mjs +17 -22
- package/dist/Time/index.mjs.map +1 -1
- package/dist/fieldHelperVariants-ClP8taiS.mjs +20 -0
- package/dist/fieldHelperVariants-ClP8taiS.mjs.map +1 -0
- package/dist/fieldLabelVariants-C4ZqECec.mjs +13 -0
- package/dist/fieldLabelVariants-C4ZqECec.mjs.map +1 -0
- package/dist/{FieldDescription-X_0s1Lhu.mjs → fieldProps-DWfz2jSO.mjs} +2 -13
- package/dist/fieldProps-DWfz2jSO.mjs.map +1 -0
- package/dist/{Switch-Db2dpGz7.d.mts → partials/FieldHelper/index.d.mts} +309 -408
- package/dist/partials/FieldHelper/index.d.mts.map +1 -0
- package/dist/partials/FieldHelper/index.mjs +7 -0
- package/dist/partials/FieldHelper/index.mjs.map +1 -0
- package/dist/partials/FieldLabel/index.d.mts +160 -0
- package/dist/partials/FieldLabel/index.d.mts.map +1 -0
- package/dist/partials/FieldLabel/index.mjs +7 -0
- package/dist/partials/FieldLabel/index.mjs.map +1 -0
- package/dist/partials/FieldValidationError/index.d.mts +2 -2
- package/dist/partials/FieldValidationError/index.mjs +1 -1
- package/dist/{radioControlVariants-BYRfaD6y.mjs → radioControlVariants-CbtG5U4_.mjs} +10 -6
- package/dist/radioControlVariants-CbtG5U4_.mjs.map +1 -0
- package/dist/{switchVariants-D16b2VaT.mjs → switchVariants-0Xa7TQYg.mjs} +5 -8
- package/dist/switchVariants-0Xa7TQYg.mjs.map +1 -0
- package/dist/{timeVariants-CtXyNKmW.mjs → timeVariants-Bkt4iwXx.mjs} +12 -10
- package/dist/timeVariants-Bkt4iwXx.mjs.map +1 -0
- package/dist/{FieldLabel-DrNWJIVh.mjs → useUniformField-TTNPTsVn.mjs} +3 -28
- package/dist/useUniformField-TTNPTsVn.mjs.map +1 -0
- package/package.json +4 -2
- package/dist/FieldDescription-X_0s1Lhu.mjs.map +0 -1
- package/dist/FieldLabel-DrNWJIVh.mjs.map +0 -1
- package/dist/FieldLayout-DcvQU0zN.mjs.map +0 -1
- package/dist/FieldValidationError-iAayfTEw.mjs.map +0 -1
- package/dist/radioControlVariants-BYRfaD6y.mjs.map +0 -1
- package/dist/switchVariants-D16b2VaT.mjs.map +0 -1
- package/dist/timeVariants-CtXyNKmW.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/Select/selectVariants.ts","../../src/Select/Select.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/Select/selectVariants.ts","../../src/Select/Select.tsx"],"mappings":";;;;qBAOa,kBAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ext } from "../useFormContext-piqnN2L-.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as FieldLayout } from "../FieldLayout-
|
|
2
|
+
import { t as useUniformField } from "../useUniformField-TTNPTsVn.mjs";
|
|
3
|
+
import { n as getFieldDataAttributes, t as getFieldControlProps } from "../fieldProps-DWfz2jSO.mjs";
|
|
4
|
+
import { t as FieldLayout } from "../FieldLayout-C9MEBZAC.mjs";
|
|
5
|
+
import { t as fieldHelperVariants } from "../fieldHelperVariants-ClP8taiS.mjs";
|
|
6
|
+
import { t as fieldLabelVariants } from "../fieldLabelVariants-C4ZqECec.mjs";
|
|
5
7
|
import { createOptionValueConverter, isValueEmpty } from "../helpers/index.mjs";
|
|
6
8
|
import { createContext, useContext, useMemo, useState } from "react";
|
|
7
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -10,11 +12,11 @@ import { useStyling } from "@fuf-stack/pixels/StylingProvider";
|
|
|
10
12
|
import ReactSelect, { components } from "react-select";
|
|
11
13
|
// src/Select/selectVariants.ts
|
|
12
14
|
const selectVariants = tv({
|
|
15
|
+
extend: fieldHelperVariants,
|
|
13
16
|
slots: {
|
|
14
17
|
base: [
|
|
15
18
|
"group",
|
|
16
19
|
"flex w-full flex-col",
|
|
17
|
-
"gap-y-1.5",
|
|
18
20
|
"leading-normal"
|
|
19
21
|
],
|
|
20
22
|
clearIndicator: "rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-foreground-800",
|
|
@@ -25,17 +27,14 @@ const selectVariants = tv({
|
|
|
25
27
|
],
|
|
26
28
|
control_focused: "border-focus",
|
|
27
29
|
crossIcon: "",
|
|
28
|
-
description: "text-foreground-500 text-tiny",
|
|
29
30
|
downChevron: "",
|
|
30
31
|
dropdownIndicator: "rounded-md p-1 text-foreground-500 hover:cursor-pointer hover:bg-default-200 hover:text-black",
|
|
31
|
-
errorMessage: "text-danger text-tiny",
|
|
32
32
|
group: "",
|
|
33
33
|
groupHeading: "mb-1 ml-3 mt-2 text-sm text-foreground-500",
|
|
34
|
-
helperWrapper: "relative flex flex-col gap-1.5 p-0",
|
|
35
34
|
indicatorSeparator: "bg-default-300",
|
|
36
35
|
indicatorsContainer: "gap-1 p-1",
|
|
37
36
|
input: "py-0.5 pl-1",
|
|
38
|
-
label: ["pointer-events-auto inline-flex
|
|
37
|
+
label: [fieldLabelVariants.base, "pointer-events-auto inline-flex"],
|
|
39
38
|
loadingIndicator: "",
|
|
40
39
|
loadingMessage: "rounded-sm p-2 text-foreground-500",
|
|
41
40
|
menu: "mt-2 rounded-xl border border-default-200 bg-content1 p-1 shadow-lg",
|
|
@@ -1 +1 @@
|
|
|
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: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n // drop hover feedback on the locked control and its actions\n clearIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n control: 'hover:border-default-200',\n dropdownIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n },\n },\n invalid: { true: { selectedValue: 'text-danger!' } },\n readOnly: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n // drop hover feedback on the locked control and its actions\n clearIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n control: 'hover:border-default-200',\n dropdownIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n },\n },\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 { useMemo, 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\n/** Hides React Select actions that would change a read-only selection */\nconst HiddenSelectAction = () => {\n return null;\n};\n\nconst readOnlySelectComponents = {\n ...selectComponents,\n MultiValueRemove: HiddenSelectAction,\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 readOnly,\n ref: inputRef,\n testId,\n value,\n } = field;\n const controlProps = getFieldControlProps(field);\n\n // react-select has no read-only mode, the input announces the state while\n // the menu, search, clearing and value removal are blocked below\n const inputAssociations = useMemo(() => {\n return { ...controlProps, 'aria-readonly': readOnly || undefined };\n }, [controlProps, readOnly]);\n\n // read-only selections are never cleared\n const isClearable = !!clearable && !readOnly;\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 (readOnly) {\n return;\n }\n\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 // read-only selects never open their menu\n let menuIsOpen: boolean | undefined;\n if (readOnly) {\n menuIsOpen = false;\n } else if (debugMenuOpen) {\n menuIsOpen = true;\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={inputAssociations}>\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 backspaceRemovesValue={!readOnly}\n classNames={reactSelectClassNames}\n components={readOnly ? readOnlySelectComponents : selectComponents}\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputId={ids.control}\n // a pending search hides the selected value, read-only selects show it\n inputValue={readOnly ? '' : inputValue}\n instanceId={ids.control}\n isClearable={isClearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n isSearchable={!readOnly}\n menuIsOpen={menuIsOpen}\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 readOnly,\n required,\n testId,\n } = field;\n\n // classNames from slots\n const variants = styling.resolve(selectVariants, {\n disabled,\n invalid,\n readOnly,\n });\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 /** Prevents changes while keeping the selection in validation and submission */\n readOnly?: boolean;\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,OA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CAED,MAAM,qBAAqB;EACzB,OAAO,cAAc,MAAM,MAAM,MAAM,CAAC,CAAC;CAC3C;CAEA,OACE,oBAAC,eAAD;EACa;EACA;EACI;EACR;EACO;EACA;EACF;EACH;EACI;EACE;EACN;EACI;EACO;EACD;EACK;CACzB,CAAA;AAEL;;ACxHA,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\nimport { fieldHelperVariants } from '../partials/FieldHelper/fieldHelperVariants';\nimport { fieldLabelVariants } from '../partials/FieldLabel/fieldLabelVariants';\n\nexport const selectVariants = tv({\n extend: fieldHelperVariants,\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 // 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 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 indicatorSeparator: 'bg-default-300',\n indicatorsContainer: 'gap-1 p-1',\n input: 'py-0.5 pl-1',\n label: [fieldLabelVariants.base, 'pointer-events-auto inline-flex'],\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: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n // drop hover feedback on the locked control and its actions\n clearIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n control: 'hover:border-default-200',\n dropdownIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n },\n },\n invalid: { true: { selectedValue: 'text-danger!' } },\n readOnly: {\n true: {\n // inner controls set their own cursors, override every descendant\n base: 'cursor-not-allowed opacity-disabled **:cursor-not-allowed',\n // drop hover feedback on the locked control and its actions\n clearIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n control: 'hover:border-default-200',\n dropdownIndicator:\n 'hover:cursor-not-allowed hover:bg-transparent hover:text-foreground-500',\n },\n },\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 { useMemo, 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\n/** Hides React Select actions that would change a read-only selection */\nconst HiddenSelectAction = () => {\n return null;\n};\n\nconst readOnlySelectComponents = {\n ...selectComponents,\n MultiValueRemove: HiddenSelectAction,\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 readOnly,\n ref: inputRef,\n testId,\n value,\n } = field;\n const controlProps = getFieldControlProps(field);\n\n // react-select has no read-only mode, the input announces the state while\n // the menu, search, clearing and value removal are blocked below\n const inputAssociations = useMemo(() => {\n return { ...controlProps, 'aria-readonly': readOnly || undefined };\n }, [controlProps, readOnly]);\n\n // read-only selections are never cleared\n const isClearable = !!clearable && !readOnly;\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 (readOnly) {\n return;\n }\n\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 // read-only selects never open their menu\n let menuIsOpen: boolean | undefined;\n if (readOnly) {\n menuIsOpen = false;\n } else if (debugMenuOpen) {\n menuIsOpen = true;\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={inputAssociations}>\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 backspaceRemovesValue={!readOnly}\n classNames={reactSelectClassNames}\n components={readOnly ? readOnlySelectComponents : selectComponents}\n data-testid={testId}\n filterOption={filterOption}\n formatOptionLabel={renderOptionLabel}\n inputId={ids.control}\n // a pending search hides the selected value, read-only selects show it\n inputValue={readOnly ? '' : inputValue}\n instanceId={ids.control}\n isClearable={isClearable}\n isDisabled={disabled}\n isLoading={loading}\n isMulti={multiSelect}\n isSearchable={!readOnly}\n menuIsOpen={menuIsOpen}\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 readOnly,\n required,\n testId,\n } = field;\n\n // classNames from slots\n const variants = styling.resolve(selectVariants, {\n disabled,\n invalid,\n readOnly,\n });\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 /** Prevents changes while keeping the selection in validation and submission */\n readOnly?: boolean;\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":";;;;;;;;;;;;;AAOA,MAAa,iBAAiB,GAAG;CAC/B,QAAQ;CACR,OAAO;EACL,MAAM;GAEJ;GAEA;GAEA;EACF;EACA,gBACE;EACF,SAAS;GAEP;GAEA;GAEA;EACF;EACA,iBAAiB;EACjB,WAAW;EACX,aAAa;EACb,mBACE;EACF,OAAO;EACP,cAAc;EACd,oBAAoB;EACpB,qBAAqB;EACrB,OAAO;EACP,OAAO,CAAC,mBAAmB,MAAM,iCAAiC;EAClE,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,iBAA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