@televet/kibble-ui 4.0.0-beta.46 → 4.0.0-beta.47

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.
@@ -1 +1 @@
1
- {"version":3,"file":"select.component-D3FwGf7W.js","sources":["../../node_modules/@ark-ui/react/dist/components/collection.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-content.js","../../node_modules/@ark-ui/react/dist/components/select/select-control.js","../../node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-item.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-text.js","../../node_modules/@ark-ui/react/dist/components/select/select-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js","../../node_modules/@ark-ui/react/dist/components/select/use-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-root.js","../../node_modules/@ark-ui/react/dist/components/select/select-root-provider.js","../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/select/select.js","../../src/components/Select/components/SelectItemContent/selectItemContent.component.tsx","../../src/components/Select/components/SelectTrigger/selectTrigger.component.tsx","../../src/components/Select/select.component.tsx"],"sourcesContent":["import { ListCollection, filePathToTree, TreeCollection } from '@zag-js/collection';\n\nconst createListCollection = (options) => new ListCollection(options);\nconst createTreeCollection = (options) => new TreeCollection(options);\nconst createFileTreeCollection = (paths) => filePathToTree(paths);\n\nexport { createFileTreeCollection, createListCollection, createTreeCollection };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectProvider, useSelectContext] = createContext({\n name: \"SelectContext\",\n hookName: \"useSelectContext\",\n providerName: \"<SelectProvider />\"\n});\n\nexport { SelectProvider, useSelectContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectClearTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getClearTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectClearTrigger.displayName = \"SelectClearTrigger\";\n\nexport { SelectClearTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectContent = forwardRef((props, ref) => {\n const select = useSelectContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(select.getContentProps(), presence.getPresenceProps(), props);\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });\n});\nSelectContent.displayName = \"SelectContent\";\n\nexport { SelectContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectControl = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectControl.displayName = \"SelectControl\";\n\nexport { SelectControl };\n","'use client';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectHiddenSelect = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getHiddenSelectProps(), props);\n const isValueEmpty = select.value.length === 0;\n const field = useFieldContext();\n return /* @__PURE__ */ jsxs(ark.select, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref, children: [\n isValueEmpty && /* @__PURE__ */ jsx(\"option\", { value: \"\" }),\n select.collection.items.map((item, index) => /* @__PURE__ */ jsx(\n \"option\",\n {\n value: select.collection.getItemValue(item) ?? \"\",\n disabled: select.collection.getItemDisabled(item),\n children: select.collection.stringifyItem(item)\n },\n index\n ))\n ] });\n});\nSelectHiddenSelect.displayName = \"SelectHiddenSelect\";\n\nexport { SelectHiddenSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectIndicator.displayName = \"SelectIndicator\";\n\nexport { SelectIndicator };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemProvider, useSelectItemContext] = createContext({\n name: \"SelectItemContext\",\n hookName: \"useSelectItemContext\",\n providerName: \"<SelectItemProvider />\"\n});\n\nexport { SelectItemProvider, useSelectItemContext };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({\n name: \"SelectItemPropsContext\",\n hookName: \"useSelectItemPropsContext\",\n providerName: \"<SelectItemPropsProvider />\"\n});\n\nexport { SelectItemPropsProvider, useSelectItemPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemProvider } from './use-select-item-context.js';\nimport { SelectItemPropsProvider } from './use-select-item-props-context.js';\n\nconst SelectItem = forwardRef((props, ref) => {\n const [itemProps, localProps] = createSplitProps()(props, [\"item\", \"persistFocus\"]);\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemProps(itemProps), localProps);\n const itemState = select.getItemState(itemProps);\n return /* @__PURE__ */ jsx(SelectItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(SelectItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nSelectItem.displayName = \"SelectItem\";\n\nexport { SelectItem };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemGroupPropsProvider, useSelectItemGroupPropsContext] = createContext({\n name: \"SelectItemGroupPropsContext\",\n hookName: \"useSelectItemGroupPropsContext\",\n providerName: \"<SelectItemGroupPropsProvider />\"\n});\n\nexport { SelectItemGroupPropsProvider, useSelectItemGroupPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useId } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemGroupPropsProvider } from './use-select-item-group-props.js';\n\nconst SelectItemGroup = forwardRef((props, ref) => {\n const id = useId();\n const [_itemGroupProps, localProps] = createSplitProps()(props, [\"id\"]);\n const itemGroupProps = { id, ..._itemGroupProps };\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemGroupProps(itemGroupProps), localProps);\n return /* @__PURE__ */ jsx(SelectItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nSelectItemGroup.displayName = \"SelectItemGroup\";\n\nexport { SelectItemGroup };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemGroupPropsContext } from './use-select-item-group-props.js';\n\nconst SelectItemGroupLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemGroupProps = useSelectItemGroupPropsContext();\n const mergedProps = mergeProps(select.getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\";\n\nexport { SelectItemGroupLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemIndicatorProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemIndicator.displayName = \"SelectItemIndicator\";\n\nexport { SelectItemIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemText = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemTextProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSelectItemText.displayName = \"SelectItemText\";\n\nexport { SelectItemText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nSelectLabel.displayName = \"SelectLabel\";\n\nexport { SelectLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectPositioner = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getPositionerProps(), props);\n const presence = usePresenceContext();\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectPositioner.displayName = \"SelectPositioner\";\n\nexport { SelectPositioner };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as select from '@zag-js/select';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSelect = (props) => {\n const id = useId();\n const { dir } = useLocaleContext();\n const { getRootNode } = useEnvironmentContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenSelect: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(select.machine, machineProps);\n return select.connect(service, normalizeProps);\n};\n\nexport { useSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useSelect } from './use-select.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [useSelectProps, localProps] = createSplitProps()(selectProps, [\n \"closeOnSelect\",\n \"collection\",\n \"composite\",\n \"defaultHighlightedValue\",\n \"defaultOpen\",\n \"defaultValue\",\n \"deselectable\",\n \"disabled\",\n \"form\",\n \"highlightedValue\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"loopFocus\",\n \"multiple\",\n \"name\",\n \"onFocusOutside\",\n \"onHighlightChange\",\n \"onInteractOutside\",\n \"onOpenChange\",\n \"onPointerDownOutside\",\n \"onValueChange\",\n \"open\",\n \"positioning\",\n \"readOnly\",\n \"required\",\n \"scrollToIndexFn\",\n \"value\"\n ]);\n const select = useSelect(useSelectProps);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRoot = forwardRef(SelectImpl);\n\nexport { SelectRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [{ value: select }, localProps] = createSplitProps()(selectProps, [\"value\"]);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRootProvider = forwardRef(SelectImpl);\n\nexport { SelectRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport { SelectTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectValueText = forwardRef((props, ref) => {\n const { children, placeholder, ...localprops } = props;\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getValueTextProps(), localprops);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || select.valueAsString || placeholder });\n});\nSelectValueText.displayName = \"SelectValueText\";\n\nexport { SelectValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Select } from '@ark-ui/react/select';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon, CheckIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSelectStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"select\" });\nconst SelectRootProvider = withProvider(Select.RootProvider, \"root\", {\n forwardAsChild: true\n});\nconst SelectRoot = withProvider(\n Select.Root,\n \"root\",\n {\n forwardAsChild: true,\n defaultProps: { positioning: { sameWidth: true } }\n }\n);\nconst SelectPropsProvider = PropsProvider;\nconst SelectTrigger = withContext(\n Select.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst SelectPositioner = withContext(Select.Positioner, \"positioner\", { forwardAsChild: true });\nconst SelectContent = withContext(\n Select.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst SelectValueText = withContext(Select.ValueText, \"valueText\", { forwardAsChild: true });\nconst SelectClearTrigger = withContext(Select.ClearTrigger, \"clearTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, { boxSize: \"1em\" }) }\n});\nconst SelectItemGroup = withContext(Select.ItemGroup, \"itemGroup\", { forwardAsChild: true });\nconst SelectItemGroupLabel = withContext(Select.ItemGroupLabel, \"itemGroupLabel\", { forwardAsChild: true });\nconst SelectItem = withContext(\n Select.Item,\n \"item\",\n { forwardAsChild: true }\n);\nconst SelectItemText = withContext(\n Select.ItemText,\n \"itemText\",\n { forwardAsChild: true }\n);\nconst SelectItemIndicator = withContext(Select.ItemIndicator, \"itemIndicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(CheckIcon, {})\n }\n});\nconst SelectIndicatorGroup = withContext(\"div\", \"indicatorGroup\");\nconst SelectIndicator = withContext(Select.Indicator, \"indicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(ChevronDownIcon, {})\n }\n});\nconst SelectControl = withContext(\n Select.Control,\n \"control\",\n { forwardAsChild: true }\n);\nconst SelectLabel = withContext(\n Select.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SelectContext = Select.Context;\nconst SelectHiddenSelect = Select.HiddenSelect;\nconst SelectItemContext = Select.ItemContext;\n\nexport { SelectClearTrigger, SelectContent, SelectContext, SelectControl, SelectHiddenSelect, SelectIndicator, SelectIndicatorGroup, SelectItem, SelectItemContext, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectPropsProvider, SelectRoot, SelectRootProvider, SelectTrigger, SelectValueText, useSelectStyles };\n","import React from \"react\";\nimport { Text } from \"components/Text/text.component\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectItemContentProps {\n item: SelectOption;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectItemContent = ({\n item,\n onContrast,\n shouldTruncateText,\n size,\n}: SelectItemContentProps): React.JSX.Element => {\n return (\n <>\n {item.leftElement}\n {typeof item.label === \"string\" ? (\n <Text\n size={size}\n truncated={shouldTruncateText}\n variant={item.variant || (onContrast ? \"onContrast\" : \"default\")}\n >\n {item.label}\n </Text>\n ) : (\n item.label\n )}\n </>\n );\n};\n","import React, { useMemo } from \"react\";\nimport { Select as CSelect, useSelectContext } from \"@chakra-ui/react/select\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { SelectItemContent } from \"../SelectItemContent/selectItemContent.component\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectTriggerProps {\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectTrigger = ({\n placeholder = \"\",\n placeholderElement,\n ...rest\n}: SelectTriggerProps): React.JSX.Element => {\n const select = useSelectContext();\n const selectedItem = useMemo(() => {\n const items = select.selectedItems as SelectOption[];\n return items[0];\n }, [select]);\n\n return (\n <CSelect.Trigger>\n {!selectedItem && placeholderElement}\n <CSelect.ValueText placeholder={placeholder}>\n {selectedItem && <SelectItemContent item={selectedItem} {...rest} />}\n </CSelect.ValueText>\n </CSelect.Trigger>\n );\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Select as CSelect } from \"@chakra-ui/react/select\";\nimport { Portal } from \"@chakra-ui/react/portal\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { createListCollection } from \"@chakra-ui/react/collection\";\nimport { Icon } from \"components/Icon/icon.component\";\nimport { Button } from \"components/Button/button.component\";\nimport { Text } from \"components/Text/text.component\";\nimport { Spinner } from \"components/Spinner/spinner.component\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { SelectOption } from \"./select.types\";\nimport { SelectItemContent } from \"./components/SelectItemContent/selectItemContent.component\";\nimport { SelectTrigger } from \"./components/SelectTrigger/selectTrigger.component\";\nimport { useModalContentRef } from \"components/Modal/context/modal.context\";\n\nexport interface SelectProps\n extends Omit<CSelect.RootProps, \"collection\" | \"multiple\">,\n WithFormControlProps {\n clearable?: boolean;\n emptyPlaceholder?: string;\n loading?: boolean;\n options: SelectOption[];\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n selectRef?: ForwardedRef<HTMLSelectElement>;\n shouldTruncateText?: boolean;\n size?: FormControlSize;\n}\n\nconst Select = withFormControl(\n ({\n clearable,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n placeholderElement,\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\n const { contentRef: modalContentRef } = useModalContentRef();\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n const collection = useMemo(() => {\n return createListCollection({\n items: options ?? [],\n itemToString: (option) =>\n typeof option.label === \"string\"\n ? option.label\n : option.valueText || \"\",\n itemToValue: (option) => option.value,\n });\n }, [options]);\n\n console.log(modalContentRef);\n\n return (\n <CSelect.Root\n className=\"Select\"\n data-testid=\"kibble-select\"\n collection={collection}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSelect.HiddenSelect ref={selectRef} />\n <CSelect.Control>\n <SelectTrigger\n placeholder={placeholder}\n placeholderElement={placeholderElement}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n <CSelect.IndicatorGroup>\n {clearable && (\n <CSelect.ClearTrigger asChild>\n <Button\n iconName=\"close\"\n onContrast={onContrast}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n variant=\"ghostNeutral\"\n />\n </CSelect.ClearTrigger>\n )}\n <Icon\n name=\"chevronDown\"\n size={size}\n variant={onContrast ? \"onContrast\" : \"default\"}\n />\n </CSelect.IndicatorGroup>\n </CSelect.Control>\n <Portal container={modalContentRef || undefined}>\n <CSelect.Positioner>\n <CSelect.Content>\n {loading ? (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Spinner\n variant={onContrast ? \"brandOnContrast\" : \"brand\"}\n size={size}\n />\n </Flex>\n ) : (\n <>\n {collection.items.length ? (\n collection.items.map((item) => (\n <CSelect.Item item={item} key={item.value}>\n <SelectItemContent\n item={item}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n </CSelect.Item>\n ))\n ) : (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Text\n size=\"sm\"\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n >\n {emptyPlaceholder}\n </Text>\n </Flex>\n )}\n </>\n )}\n </CSelect.Content>\n </CSelect.Positioner>\n </Portal>\n </CSelect.Root>\n );\n }\n);\n\nconst WrappedSelect = React.forwardRef(\n (props: SelectProps, ref: ForwardedRef<HTMLSelectElement>) => (\n <Select selectRef={ref} {...props} />\n )\n);\n\nWrappedSelect.displayName = \"Select\";\n\nexport { WrappedSelect as Select };\n"],"names":["createListCollection","options","ListCollection","SelectProvider","useSelectContext","createContext","SelectClearTrigger","forwardRef","props","ref","select","mergedProps","mergeProps","jsx","ark","SelectContent","presence","usePresenceContext","composeRefs","SelectControl","SelectHiddenSelect","isValueEmpty","field","useFieldContext","jsxs","item","index","SelectIndicator","SelectItemProvider","useSelectItemContext","SelectItemPropsProvider","useSelectItemPropsContext","SelectItem","itemProps","localProps","createSplitProps","itemState","SelectItemGroupPropsProvider","useSelectItemGroupPropsContext","SelectItemGroup","id","useId","_itemGroupProps","itemGroupProps","SelectItemGroupLabel","SelectItemIndicator","SelectItemText","SelectLabel","SelectPositioner","useSelect","dir","useLocaleContext","getRootNode","useEnvironmentContext","machineProps","service","useMachine","select.machine","select.connect","normalizeProps","SelectImpl","presenceProps","selectProps","splitPresenceProps","useSelectProps","usePresence","PresenceProvider","SelectRoot","SelectRootProvider","SelectTrigger","SelectValueText","children","placeholder","localprops","withProvider","withContext","createSlotRecipeContext","Select.RootProvider","Select.Root","Select.Trigger","Select.Positioner","Select.Content","Select.ValueText","Select.ClearTrigger","CloseIcon","Select.ItemGroup","Select.ItemGroupLabel","Select.Item","Select.ItemText","Select.ItemIndicator","CheckIcon","SelectIndicatorGroup","Select.Indicator","ChevronDownIcon","Select.Control","Select.Label","Select.HiddenSelect","SelectItemContent","onContrast","shouldTruncateText","size","Fragment","Text","placeholderElement","rest","selectedItem","useMemo","CSelect.Trigger","CSelect.ValueText","Select","withFormControl","clearable","emptyPlaceholder","loading","selectRef","modalContentRef","useModalContentRef","_computedVariant","collection","option","CSelect.Root","CSelect.HiddenSelect","CSelect.Control","CSelect.IndicatorGroup","CSelect.ClearTrigger","Button","Icon","Portal","CSelect.Positioner","CSelect.Content","Flex","Spinner","CSelect.Item","WrappedSelect","React"],"mappings":"gpBAEMA,EAAwBC,GAAY,IAAIC,EAAAA,eAAeD,CAAO,ECC9D,CAACE,EAAgBC,CAAgB,EAAIC,gBAAc,CACvD,KAAM,gBACN,SAAU,mBACV,aAAc,oBAChB,CAAC,ECAKC,EAAqBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACpD,MAAMC,EAASN,EAAkB,EAC3BO,EAAcC,EAAU,WAACF,EAAO,qBAAoB,EAAIF,CAAK,EACnE,OAAuBK,EAAAA,kBAAAA,IAAIC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AEMqB,EAAgBC,EAAM,QAAA,WAC1B,CAAC9H,EAAoBC,IACnBI,wBAACgG,IAAO,UAAWpG,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6H,EAAc,YAAc","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
1
+ {"version":3,"file":"select.component-9-2Fo505.js","sources":["../../node_modules/@ark-ui/react/dist/components/collection.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-clear-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-content.js","../../node_modules/@ark-ui/react/dist/components/select/select-control.js","../../node_modules/@ark-ui/react/dist/components/select/select-hidden-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-context.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-props-context.js","../../node_modules/@ark-ui/react/dist/components/select/select-item.js","../../node_modules/@ark-ui/react/dist/components/select/use-select-item-group-props.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-group-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-indicator.js","../../node_modules/@ark-ui/react/dist/components/select/select-item-text.js","../../node_modules/@ark-ui/react/dist/components/select/select-label.js","../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js","../../node_modules/@ark-ui/react/dist/components/select/use-select.js","../../node_modules/@ark-ui/react/dist/components/select/select-root.js","../../node_modules/@ark-ui/react/dist/components/select/select-root-provider.js","../../node_modules/@ark-ui/react/dist/components/select/select-trigger.js","../../node_modules/@ark-ui/react/dist/components/select/select-value-text.js","../../node_modules/@chakra-ui/react/dist/esm/components/select/select.js","../../src/components/Select/components/SelectItemContent/selectItemContent.component.tsx","../../src/components/Select/components/SelectTrigger/selectTrigger.component.tsx","../../src/components/Select/select.component.tsx"],"sourcesContent":["import { ListCollection, filePathToTree, TreeCollection } from '@zag-js/collection';\n\nconst createListCollection = (options) => new ListCollection(options);\nconst createTreeCollection = (options) => new TreeCollection(options);\nconst createFileTreeCollection = (paths) => filePathToTree(paths);\n\nexport { createFileTreeCollection, createListCollection, createTreeCollection };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectProvider, useSelectContext] = createContext({\n name: \"SelectContext\",\n hookName: \"useSelectContext\",\n providerName: \"<SelectProvider />\"\n});\n\nexport { SelectProvider, useSelectContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectClearTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getClearTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectClearTrigger.displayName = \"SelectClearTrigger\";\n\nexport { SelectClearTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectContent = forwardRef((props, ref) => {\n const select = useSelectContext();\n const presence = usePresenceContext();\n const mergedProps = mergeProps(select.getContentProps(), presence.getPresenceProps(), props);\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) });\n});\nSelectContent.displayName = \"SelectContent\";\n\nexport { SelectContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectControl = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectControl.displayName = \"SelectControl\";\n\nexport { SelectControl };\n","'use client';\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useFieldContext } from '../field/use-field-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectHiddenSelect = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getHiddenSelectProps(), props);\n const isValueEmpty = select.value.length === 0;\n const field = useFieldContext();\n return /* @__PURE__ */ jsxs(ark.select, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref, children: [\n isValueEmpty && /* @__PURE__ */ jsx(\"option\", { value: \"\" }),\n select.collection.items.map((item, index) => /* @__PURE__ */ jsx(\n \"option\",\n {\n value: select.collection.getItemValue(item) ?? \"\",\n disabled: select.collection.getItemDisabled(item),\n children: select.collection.stringifyItem(item)\n },\n index\n ))\n ] });\n});\nSelectHiddenSelect.displayName = \"SelectHiddenSelect\";\n\nexport { SelectHiddenSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectIndicator.displayName = \"SelectIndicator\";\n\nexport { SelectIndicator };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemProvider, useSelectItemContext] = createContext({\n name: \"SelectItemContext\",\n hookName: \"useSelectItemContext\",\n providerName: \"<SelectItemProvider />\"\n});\n\nexport { SelectItemProvider, useSelectItemContext };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({\n name: \"SelectItemPropsContext\",\n hookName: \"useSelectItemPropsContext\",\n providerName: \"<SelectItemPropsProvider />\"\n});\n\nexport { SelectItemPropsProvider, useSelectItemPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemProvider } from './use-select-item-context.js';\nimport { SelectItemPropsProvider } from './use-select-item-props-context.js';\n\nconst SelectItem = forwardRef((props, ref) => {\n const [itemProps, localProps] = createSplitProps()(props, [\"item\", \"persistFocus\"]);\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemProps(itemProps), localProps);\n const itemState = select.getItemState(itemProps);\n return /* @__PURE__ */ jsx(SelectItemPropsProvider, { value: itemProps, children: /* @__PURE__ */ jsx(SelectItemProvider, { value: itemState, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nSelectItem.displayName = \"SelectItem\";\n\nexport { SelectItem };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SelectItemGroupPropsProvider, useSelectItemGroupPropsContext] = createContext({\n name: \"SelectItemGroupPropsContext\",\n hookName: \"useSelectItemGroupPropsContext\",\n providerName: \"<SelectItemGroupPropsProvider />\"\n});\n\nexport { SelectItemGroupPropsProvider, useSelectItemGroupPropsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef, useId } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { SelectItemGroupPropsProvider } from './use-select-item-group-props.js';\n\nconst SelectItemGroup = forwardRef((props, ref) => {\n const id = useId();\n const [_itemGroupProps, localProps] = createSplitProps()(props, [\"id\"]);\n const itemGroupProps = { id, ..._itemGroupProps };\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getItemGroupProps(itemGroupProps), localProps);\n return /* @__PURE__ */ jsx(SelectItemGroupPropsProvider, { value: itemGroupProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) });\n});\nSelectItemGroup.displayName = \"SelectItemGroup\";\n\nexport { SelectItemGroup };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemGroupPropsContext } from './use-select-item-group-props.js';\n\nconst SelectItemGroupLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemGroupProps = useSelectItemGroupPropsContext();\n const mergedProps = mergeProps(select.getItemGroupLabelProps({ htmlFor: itemGroupProps.id }), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemGroupLabel.displayName = \"SelectItemGroupLabel\";\n\nexport { SelectItemGroupLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemIndicator = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemIndicatorProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectItemIndicator.displayName = \"SelectItemIndicator\";\n\nexport { SelectItemIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\nimport { useSelectItemPropsContext } from './use-select-item-props-context.js';\n\nconst SelectItemText = forwardRef((props, ref) => {\n const select = useSelectContext();\n const itemProps = useSelectItemPropsContext();\n const mergedProps = mergeProps(select.getItemTextProps(itemProps), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSelectItemText.displayName = \"SelectItemText\";\n\nexport { SelectItemText };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectLabel = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref });\n});\nSelectLabel.displayName = \"SelectLabel\";\n\nexport { SelectLabel };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { usePresenceContext } from '../presence/use-presence-context.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectPositioner = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getPositionerProps(), props);\n const presence = usePresenceContext();\n if (presence.unmounted) {\n return null;\n }\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nSelectPositioner.displayName = \"SelectPositioner\";\n\nexport { SelectPositioner };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as select from '@zag-js/select';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\nimport { useFieldContext } from '../field/use-field-context.js';\n\nconst useSelect = (props) => {\n const id = useId();\n const { dir } = useLocaleContext();\n const { getRootNode } = useEnvironmentContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenSelect: field?.ids.control\n },\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(select.machine, machineProps);\n return select.connect(service, normalizeProps);\n};\n\nexport { useSelect };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useSelect } from './use-select.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [useSelectProps, localProps] = createSplitProps()(selectProps, [\n \"closeOnSelect\",\n \"collection\",\n \"composite\",\n \"defaultHighlightedValue\",\n \"defaultOpen\",\n \"defaultValue\",\n \"deselectable\",\n \"disabled\",\n \"form\",\n \"highlightedValue\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"loopFocus\",\n \"multiple\",\n \"name\",\n \"onFocusOutside\",\n \"onHighlightChange\",\n \"onInteractOutside\",\n \"onOpenChange\",\n \"onPointerDownOutside\",\n \"onValueChange\",\n \"open\",\n \"positioning\",\n \"readOnly\",\n \"required\",\n \"scrollToIndexFn\",\n \"value\"\n ]);\n const select = useSelect(useSelectProps);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRoot = forwardRef(SelectImpl);\n\nexport { SelectRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { splitPresenceProps } from '../presence/split-presence-props.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { SelectProvider } from './use-select-context.js';\n\nconst SelectImpl = (props, ref) => {\n const [presenceProps, selectProps] = splitPresenceProps(props);\n const [{ value: select }, localProps] = createSplitProps()(selectProps, [\"value\"]);\n const presence = usePresence(mergeProps({ present: select.open }, presenceProps));\n const mergedProps = mergeProps(select.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SelectProvider, { value: select, children: /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n};\nconst SelectRootProvider = forwardRef(SelectImpl);\n\nexport { SelectRootProvider };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectTrigger = forwardRef((props, ref) => {\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getTriggerProps(), props);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport { SelectTrigger };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useSelectContext } from './use-select-context.js';\n\nconst SelectValueText = forwardRef((props, ref) => {\n const { children, placeholder, ...localprops } = props;\n const select = useSelectContext();\n const mergedProps = mergeProps(select.getValueTextProps(), localprops);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: children || select.valueAsString || placeholder });\n});\nSelectValueText.displayName = \"SelectValueText\";\n\nexport { SelectValueText };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Select } from '@ark-ui/react/select';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { CloseIcon, CheckIcon, ChevronDownIcon } from '../icons.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSelectStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"select\" });\nconst SelectRootProvider = withProvider(Select.RootProvider, \"root\", {\n forwardAsChild: true\n});\nconst SelectRoot = withProvider(\n Select.Root,\n \"root\",\n {\n forwardAsChild: true,\n defaultProps: { positioning: { sameWidth: true } }\n }\n);\nconst SelectPropsProvider = PropsProvider;\nconst SelectTrigger = withContext(\n Select.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst SelectPositioner = withContext(Select.Positioner, \"positioner\", { forwardAsChild: true });\nconst SelectContent = withContext(\n Select.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst SelectValueText = withContext(Select.ValueText, \"valueText\", { forwardAsChild: true });\nconst SelectClearTrigger = withContext(Select.ClearTrigger, \"clearTrigger\", {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(CloseIcon, { boxSize: \"1em\" }) }\n});\nconst SelectItemGroup = withContext(Select.ItemGroup, \"itemGroup\", { forwardAsChild: true });\nconst SelectItemGroupLabel = withContext(Select.ItemGroupLabel, \"itemGroupLabel\", { forwardAsChild: true });\nconst SelectItem = withContext(\n Select.Item,\n \"item\",\n { forwardAsChild: true }\n);\nconst SelectItemText = withContext(\n Select.ItemText,\n \"itemText\",\n { forwardAsChild: true }\n);\nconst SelectItemIndicator = withContext(Select.ItemIndicator, \"itemIndicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(CheckIcon, {})\n }\n});\nconst SelectIndicatorGroup = withContext(\"div\", \"indicatorGroup\");\nconst SelectIndicator = withContext(Select.Indicator, \"indicator\", {\n forwardAsChild: true,\n defaultProps: {\n children: /* @__PURE__ */ jsx(ChevronDownIcon, {})\n }\n});\nconst SelectControl = withContext(\n Select.Control,\n \"control\",\n { forwardAsChild: true }\n);\nconst SelectLabel = withContext(\n Select.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SelectContext = Select.Context;\nconst SelectHiddenSelect = Select.HiddenSelect;\nconst SelectItemContext = Select.ItemContext;\n\nexport { SelectClearTrigger, SelectContent, SelectContext, SelectControl, SelectHiddenSelect, SelectIndicator, SelectIndicatorGroup, SelectItem, SelectItemContext, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectPropsProvider, SelectRoot, SelectRootProvider, SelectTrigger, SelectValueText, useSelectStyles };\n","import React from \"react\";\nimport { Text } from \"components/Text/text.component\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectItemContentProps {\n item: SelectOption;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectItemContent = ({\n item,\n onContrast,\n shouldTruncateText,\n size,\n}: SelectItemContentProps): React.JSX.Element => {\n return (\n <>\n {item.leftElement}\n {typeof item.label === \"string\" ? (\n <Text\n size={size}\n truncated={shouldTruncateText}\n variant={item.variant || (onContrast ? \"onContrast\" : \"default\")}\n >\n {item.label}\n </Text>\n ) : (\n item.label\n )}\n </>\n );\n};\n","import React, { useMemo } from \"react\";\nimport { Select as CSelect, useSelectContext } from \"@chakra-ui/react/select\";\nimport { SelectOption } from \"components/Select/select.types\";\nimport { SelectItemContent } from \"../SelectItemContent/selectItemContent.component\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\ninterface SelectTriggerProps {\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n onContrast: boolean;\n shouldTruncateText: boolean;\n size: FormControlSize;\n}\n\nexport const SelectTrigger = ({\n placeholder = \"\",\n placeholderElement,\n ...rest\n}: SelectTriggerProps): React.JSX.Element => {\n const select = useSelectContext();\n const selectedItem = useMemo(() => {\n const items = select.selectedItems as SelectOption[];\n return items[0];\n }, [select]);\n\n return (\n <CSelect.Trigger>\n {!selectedItem && placeholderElement}\n <CSelect.ValueText placeholder={placeholder}>\n {selectedItem && <SelectItemContent item={selectedItem} {...rest} />}\n </CSelect.ValueText>\n </CSelect.Trigger>\n );\n};\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Select as CSelect } from \"@chakra-ui/react/select\";\nimport { Portal } from \"@chakra-ui/react/portal\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\nimport { createListCollection } from \"@chakra-ui/react/collection\";\nimport { Icon } from \"components/Icon/icon.component\";\nimport { Button } from \"components/Button/button.component\";\nimport { Text } from \"components/Text/text.component\";\nimport { Spinner } from \"components/Spinner/spinner.component\";\nimport { Flex } from \"@chakra-ui/react/flex\";\nimport { SelectOption } from \"./select.types\";\nimport { SelectItemContent } from \"./components/SelectItemContent/selectItemContent.component\";\nimport { SelectTrigger } from \"./components/SelectTrigger/selectTrigger.component\";\nimport { useModalContentRef } from \"components/Modal/context/modal.context\";\n\nexport interface SelectProps\n extends Omit<CSelect.RootProps, \"collection\" | \"multiple\">,\n WithFormControlProps {\n clearable?: boolean;\n emptyPlaceholder?: string;\n loading?: boolean;\n options: SelectOption[];\n placeholder?: string;\n placeholderElement?: React.ReactNode;\n selectRef?: ForwardedRef<HTMLSelectElement>;\n shouldTruncateText?: boolean;\n size?: FormControlSize;\n}\n\nconst Select = withFormControl(\n ({\n clearable,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n placeholderElement,\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\n const { contentRef: modalContentRef } = useModalContentRef();\n const _computedVariant = onContrast ? \"onContrast\" : \"default\";\n const collection = useMemo(() => {\n return createListCollection({\n items: options ?? [],\n itemToString: (option) =>\n typeof option.label === \"string\"\n ? option.label\n : option.valueText || \"\",\n itemToValue: (option) => option.value,\n });\n }, [options]);\n\n return (\n <CSelect.Root\n className=\"Select\"\n data-testid=\"kibble-select\"\n collection={collection}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSelect.HiddenSelect ref={selectRef} />\n <CSelect.Control>\n <SelectTrigger\n placeholder={placeholder}\n placeholderElement={placeholderElement}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n <CSelect.IndicatorGroup>\n {clearable && (\n <CSelect.ClearTrigger asChild>\n <Button\n iconName=\"close\"\n onContrast={onContrast}\n size={size === \"lg\" ? \"sm\" : \"xs\"}\n variant=\"ghostNeutral\"\n />\n </CSelect.ClearTrigger>\n )}\n <Icon\n name=\"chevronDown\"\n size={size}\n variant={onContrast ? \"onContrast\" : \"default\"}\n />\n </CSelect.IndicatorGroup>\n </CSelect.Control>\n <Portal container={modalContentRef || undefined}>\n <CSelect.Positioner>\n <CSelect.Content>\n {loading ? (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Spinner\n variant={onContrast ? \"brandOnContrast\" : \"brand\"}\n size={size}\n />\n </Flex>\n ) : (\n <>\n {collection.items.length ? (\n collection.items.map((item) => (\n <CSelect.Item item={item} key={item.value}>\n <SelectItemContent\n item={item}\n onContrast={!!onContrast}\n shouldTruncateText={!!shouldTruncateText}\n size={size}\n />\n </CSelect.Item>\n ))\n ) : (\n <Flex w=\"100%\" justifyContent=\"center\" py={3}>\n <Text\n size=\"sm\"\n variant={onContrast ? \"subtleOnContrast\" : \"subtle\"}\n >\n {emptyPlaceholder}\n </Text>\n </Flex>\n )}\n </>\n )}\n </CSelect.Content>\n </CSelect.Positioner>\n </Portal>\n </CSelect.Root>\n );\n },\n);\n\nconst WrappedSelect = React.forwardRef(\n (props: SelectProps, ref: ForwardedRef<HTMLSelectElement>) => (\n <Select selectRef={ref} {...props} />\n ),\n);\n\nWrappedSelect.displayName = \"Select\";\n\nexport { WrappedSelect as Select };\n"],"names":["createListCollection","options","ListCollection","SelectProvider","useSelectContext","createContext","SelectClearTrigger","forwardRef","props","ref","select","mergedProps","mergeProps","jsx","ark","SelectContent","presence","usePresenceContext","composeRefs","SelectControl","SelectHiddenSelect","isValueEmpty","field","useFieldContext","jsxs","item","index","SelectIndicator","SelectItemProvider","useSelectItemContext","SelectItemPropsProvider","useSelectItemPropsContext","SelectItem","itemProps","localProps","createSplitProps","itemState","SelectItemGroupPropsProvider","useSelectItemGroupPropsContext","SelectItemGroup","id","useId","_itemGroupProps","itemGroupProps","SelectItemGroupLabel","SelectItemIndicator","SelectItemText","SelectLabel","SelectPositioner","useSelect","dir","useLocaleContext","getRootNode","useEnvironmentContext","machineProps","service","useMachine","select.machine","select.connect","normalizeProps","SelectImpl","presenceProps","selectProps","splitPresenceProps","useSelectProps","usePresence","PresenceProvider","SelectRoot","SelectRootProvider","SelectTrigger","SelectValueText","children","placeholder","localprops","withProvider","withContext","createSlotRecipeContext","Select.RootProvider","Select.Root","Select.Trigger","Select.Positioner","Select.Content","Select.ValueText","Select.ClearTrigger","CloseIcon","Select.ItemGroup","Select.ItemGroupLabel","Select.Item","Select.ItemText","Select.ItemIndicator","CheckIcon","SelectIndicatorGroup","Select.Indicator","ChevronDownIcon","Select.Control","Select.Label","Select.HiddenSelect","SelectItemContent","onContrast","shouldTruncateText","size","Fragment","Text","placeholderElement","rest","selectedItem","useMemo","CSelect.Trigger","CSelect.ValueText","Select","withFormControl","clearable","emptyPlaceholder","loading","selectRef","modalContentRef","useModalContentRef","_computedVariant","collection","option","CSelect.Root","CSelect.HiddenSelect","CSelect.Control","CSelect.IndicatorGroup","CSelect.ClearTrigger","Button","Icon","Portal","CSelect.Positioner","CSelect.Content","Flex","Spinner","CSelect.Item","WrappedSelect","React"],"mappings":"gpBAEMA,EAAwBC,GAAY,IAAIC,EAAAA,eAAeD,CAAO,ECC9D,CAACE,EAAgBC,CAAgB,EAAIC,gBAAc,CACvD,KAAM,gBACN,SAAU,mBACV,aAAc,oBAChB,CAAC,ECAKC,EAAqBC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACpD,MAAMC,EAASN,EAAkB,EAC3BO,EAAcC,EAAU,WAACF,EAAO,qBAAoB,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,CAAA,CACF,CAAA,CAGN,EAEMqB,EAAgBC,EAAM,QAAA,WAC1B,CAAC9H,EAAoBC,IACnBI,wBAACgG,IAAO,UAAWpG,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA6H,EAAc,YAAc","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]}
@@ -1,39 +1,39 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import X, { forwardRef as a, useId as j, useMemo as I } from "react";
2
+ import X, { forwardRef as a, useId as v, useMemo as j } from "react";
3
3
  import { w as Y } from "./withFormControl-Vf_flDYv.js";
4
4
  import { I as Z } from "./icon.component-BmcWaysM.js";
5
5
  import { B as z } from "./button.component-BWlRjD5a.js";
6
- import { W as b } from "./text.component-D3E0SdX1.js";
6
+ import { W as I } from "./text.component-D3E0SdX1.js";
7
7
  import { S as ee } from "./spinner.component-DCSsW51J.js";
8
- import { a as g, f as d, u as y, h as te, b as h, j as oe, i as re, k as se, n as ne, s as N, l as w, m as T, P as le } from "./use-locale-context-zakBNK5b.js";
8
+ import { a as g, f as d, u as b, h as te, b as h, j as oe, i as re, k as se, n as ne, s as y, l as N, m as w, P as le } from "./use-locale-context-zakBNK5b.js";
9
9
  import { c as ce } from "./create-slot-recipe-context-DJkLYvCT.js";
10
10
  import { C as ie, b as ae, c as de } from "./icons-grAfs3Oz.js";
11
- import { u as G } from "./use-field-context-B8ygn96q.js";
11
+ import { u as T } from "./use-field-context-B8ygn96q.js";
12
12
  import { U as i } from "./index-DLvqBeH6.js";
13
13
  import { L as pe, m as me, c as ue } from "./index-Dn2nvQ5m.js";
14
14
  import { u as xe } from "./tooltip.component-DYBYGsfe.js";
15
- import { F as v } from "./flex-C2d2LH-K.js";
16
- const Pe = (o) => new pe(o), [A, p] = g({
15
+ import { F as C } from "./flex-C2d2LH-K.js";
16
+ const Pe = (o) => new pe(o), [G, p] = g({
17
17
  name: "SelectContext",
18
18
  hookName: "useSelectContext",
19
19
  providerName: "<SelectProvider />"
20
- }), R = a((o, s) => {
20
+ }), A = a((o, s) => {
21
21
  const r = p(), t = i(r.getClearTriggerProps(), o);
22
22
  return /* @__PURE__ */ e.jsx(d.button, { ...t, ref: s });
23
23
  });
24
- R.displayName = "SelectClearTrigger";
25
- const V = a((o, s) => {
26
- const r = p(), t = y(), n = i(r.getContentProps(), t.getPresenceProps(), o);
24
+ A.displayName = "SelectClearTrigger";
25
+ const R = a((o, s) => {
26
+ const r = p(), t = b(), n = i(r.getContentProps(), t.getPresenceProps(), o);
27
27
  return t.unmounted ? null : /* @__PURE__ */ e.jsx(d.div, { ...n, ref: te(t.ref, s) });
28
28
  });
29
- V.displayName = "SelectContent";
30
- const F = a((o, s) => {
29
+ R.displayName = "SelectContent";
30
+ const V = a((o, s) => {
31
31
  const r = p(), t = i(r.getControlProps(), o);
32
32
  return /* @__PURE__ */ e.jsx(d.div, { ...t, ref: s });
33
33
  });
34
- F.displayName = "SelectControl";
35
- const L = a((o, s) => {
36
- const r = p(), t = i(r.getHiddenSelectProps(), o), n = r.value.length === 0, c = G();
34
+ V.displayName = "SelectControl";
35
+ const F = a((o, s) => {
36
+ const r = p(), t = i(r.getHiddenSelectProps(), o), n = r.value.length === 0, c = T();
37
37
  return /* @__PURE__ */ e.jsxs(d.select, { "aria-describedby": c?.ariaDescribedby, ...t, ref: s, children: [
38
38
  n && /* @__PURE__ */ e.jsx("option", { value: "" }),
39
39
  r.collection.items.map((l, u) => /* @__PURE__ */ e.jsx(
@@ -47,61 +47,61 @@ const L = a((o, s) => {
47
47
  ))
48
48
  ] });
49
49
  });
50
- L.displayName = "SelectHiddenSelect";
51
- const O = a((o, s) => {
50
+ F.displayName = "SelectHiddenSelect";
51
+ const L = a((o, s) => {
52
52
  const r = p(), t = i(r.getIndicatorProps(), o);
53
53
  return /* @__PURE__ */ e.jsx(d.div, { ...t, ref: s });
54
54
  });
55
- O.displayName = "SelectIndicator";
55
+ L.displayName = "SelectIndicator";
56
56
  const [Se, ze] = g({
57
57
  name: "SelectItemContext",
58
58
  hookName: "useSelectItemContext",
59
59
  providerName: "<SelectItemProvider />"
60
- }), [ge, $] = g({
60
+ }), [ge, O] = g({
61
61
  name: "SelectItemPropsContext",
62
62
  hookName: "useSelectItemPropsContext",
63
63
  providerName: "<SelectItemPropsProvider />"
64
- }), k = a((o, s) => {
64
+ }), $ = a((o, s) => {
65
65
  const [r, t] = h()(o, ["item", "persistFocus"]), n = p(), c = i(n.getItemProps(r), t), l = n.getItemState(r);
66
66
  return /* @__PURE__ */ e.jsx(ge, { value: r, children: /* @__PURE__ */ e.jsx(Se, { value: l, children: /* @__PURE__ */ e.jsx(d.div, { ...c, ref: s }) }) });
67
67
  });
68
- k.displayName = "SelectItem";
68
+ $.displayName = "SelectItem";
69
69
  const [he, fe] = g({
70
70
  name: "SelectItemGroupPropsContext",
71
71
  hookName: "useSelectItemGroupPropsContext",
72
72
  providerName: "<SelectItemGroupPropsProvider />"
73
- }), H = a((o, s) => {
74
- const r = j(), [t, n] = h()(o, ["id"]), c = { id: r, ...t }, l = p(), u = i(l.getItemGroupProps(c), n);
73
+ }), k = a((o, s) => {
74
+ const r = v(), [t, n] = h()(o, ["id"]), c = { id: r, ...t }, l = p(), u = i(l.getItemGroupProps(c), n);
75
75
  return /* @__PURE__ */ e.jsx(he, { value: c, children: /* @__PURE__ */ e.jsx(d.div, { ...u, ref: s }) });
76
76
  });
77
- H.displayName = "SelectItemGroup";
78
- const D = a((o, s) => {
77
+ k.displayName = "SelectItemGroup";
78
+ const H = a((o, s) => {
79
79
  const r = p(), t = fe(), n = i(r.getItemGroupLabelProps({ htmlFor: t.id }), o);
80
80
  return /* @__PURE__ */ e.jsx(d.div, { ...n, ref: s });
81
81
  });
82
- D.displayName = "SelectItemGroupLabel";
83
- const W = a((o, s) => {
84
- const r = p(), t = $(), n = i(r.getItemIndicatorProps(t), o);
82
+ H.displayName = "SelectItemGroupLabel";
83
+ const D = a((o, s) => {
84
+ const r = p(), t = O(), n = i(r.getItemIndicatorProps(t), o);
85
85
  return /* @__PURE__ */ e.jsx(d.div, { ...n, ref: s });
86
86
  });
87
- W.displayName = "SelectItemIndicator";
88
- const E = a((o, s) => {
89
- const r = p(), t = $(), n = i(r.getItemTextProps(t), o);
87
+ D.displayName = "SelectItemIndicator";
88
+ const W = a((o, s) => {
89
+ const r = p(), t = O(), n = i(r.getItemTextProps(t), o);
90
90
  return /* @__PURE__ */ e.jsx(d.span, { ...n, ref: s });
91
91
  });
92
- E.displayName = "SelectItemText";
93
- const _ = a((o, s) => {
92
+ W.displayName = "SelectItemText";
93
+ const E = a((o, s) => {
94
94
  const r = p(), t = i(r.getLabelProps(), o);
95
95
  return /* @__PURE__ */ e.jsx(d.label, { ...t, ref: s });
96
96
  });
97
- _.displayName = "SelectLabel";
98
- const q = a((o, s) => {
97
+ E.displayName = "SelectLabel";
98
+ const _ = a((o, s) => {
99
99
  const r = p(), t = i(r.getPositionerProps(), o);
100
- return y().unmounted ? null : /* @__PURE__ */ e.jsx(d.div, { ...t, ref: s });
100
+ return b().unmounted ? null : /* @__PURE__ */ e.jsx(d.div, { ...t, ref: s });
101
101
  });
102
- q.displayName = "SelectPositioner";
102
+ _.displayName = "SelectPositioner";
103
103
  const Ce = (o) => {
104
- const s = j(), { dir: r } = oe(), { getRootNode: t } = re(), n = G(), c = {
104
+ const s = v(), { dir: r } = oe(), { getRootNode: t } = re(), n = T(), c = {
105
105
  id: s,
106
106
  ids: {
107
107
  label: n?.ids.label,
@@ -117,7 +117,7 @@ const Ce = (o) => {
117
117
  }, l = se(me, c);
118
118
  return ue(l, ne);
119
119
  }, ve = (o, s) => {
120
- const [r, t] = N(o), [n, c] = h()(t, [
120
+ const [r, t] = y(o), [n, c] = h()(t, [
121
121
  "closeOnSelect",
122
122
  "collection",
123
123
  "composite",
@@ -146,29 +146,29 @@ const Ce = (o) => {
146
146
  "required",
147
147
  "scrollToIndexFn",
148
148
  "value"
149
- ]), l = Ce(n), u = w(i({ present: l.open }, r)), S = i(l.getRootProps(), c);
150
- return /* @__PURE__ */ e.jsx(A, { value: l, children: /* @__PURE__ */ e.jsx(T, { value: u, children: /* @__PURE__ */ e.jsx(d.div, { ...S, ref: s }) }) });
149
+ ]), l = Ce(n), u = N(i({ present: l.open }, r)), S = i(l.getRootProps(), c);
150
+ return /* @__PURE__ */ e.jsx(G, { value: l, children: /* @__PURE__ */ e.jsx(w, { value: u, children: /* @__PURE__ */ e.jsx(d.div, { ...S, ref: s }) }) });
151
151
  }, je = a(ve), Ie = (o, s) => {
152
- const [r, t] = N(o), [{ value: n }, c] = h()(t, ["value"]), l = w(i({ present: n.open }, r)), u = i(n.getRootProps(), c);
153
- return /* @__PURE__ */ e.jsx(A, { value: n, children: /* @__PURE__ */ e.jsx(T, { value: l, children: /* @__PURE__ */ e.jsx(d.div, { ...u, ref: s }) }) });
154
- }, be = a(Ie), M = a((o, s) => {
152
+ const [r, t] = y(o), [{ value: n }, c] = h()(t, ["value"]), l = N(i({ present: n.open }, r)), u = i(n.getRootProps(), c);
153
+ return /* @__PURE__ */ e.jsx(G, { value: n, children: /* @__PURE__ */ e.jsx(w, { value: l, children: /* @__PURE__ */ e.jsx(d.div, { ...u, ref: s }) }) });
154
+ }, be = a(Ie), q = a((o, s) => {
155
155
  const r = p(), t = i(r.getTriggerProps(), o);
156
156
  return /* @__PURE__ */ e.jsx(d.button, { ...t, ref: s });
157
157
  });
158
- M.displayName = "SelectTrigger";
159
- const B = a((o, s) => {
158
+ q.displayName = "SelectTrigger";
159
+ const M = a((o, s) => {
160
160
  const { children: r, placeholder: t, ...n } = o, c = p(), l = i(c.getValueTextProps(), n);
161
161
  return /* @__PURE__ */ e.jsx(d.span, { ...l, ref: s, children: r || c.valueAsString || t });
162
162
  });
163
- B.displayName = "SelectValueText";
163
+ M.displayName = "SelectValueText";
164
164
  const {
165
- withProvider: U,
165
+ withProvider: B,
166
166
  withContext: m
167
167
  } = ce({ key: "select" });
168
- U(be, "root", {
168
+ B(be, "root", {
169
169
  forwardAsChild: !0
170
170
  });
171
- const ye = U(
171
+ const ye = B(
172
172
  je,
173
173
  "root",
174
174
  {
@@ -176,53 +176,53 @@ const ye = U(
176
176
  defaultProps: { positioning: { sameWidth: !0 } }
177
177
  }
178
178
  ), Ne = m(
179
- M,
179
+ q,
180
180
  "trigger",
181
181
  { forwardAsChild: !0 }
182
- ), we = m(q, "positioner", { forwardAsChild: !0 }), Te = m(
183
- V,
182
+ ), we = m(_, "positioner", { forwardAsChild: !0 }), Te = m(
183
+ R,
184
184
  "content",
185
185
  { forwardAsChild: !0 }
186
- ), Ge = m(B, "valueText", { forwardAsChild: !0 }), Ae = m(R, "clearTrigger", {
186
+ ), Ge = m(M, "valueText", { forwardAsChild: !0 }), Ae = m(A, "clearTrigger", {
187
187
  forwardAsChild: !0,
188
188
  defaultProps: { children: /* @__PURE__ */ e.jsx(ie, { boxSize: "1em" }) }
189
189
  });
190
- m(H, "itemGroup", { forwardAsChild: !0 });
191
- m(D, "itemGroupLabel", { forwardAsChild: !0 });
190
+ m(k, "itemGroup", { forwardAsChild: !0 });
191
+ m(H, "itemGroupLabel", { forwardAsChild: !0 });
192
192
  const Re = m(
193
- k,
193
+ $,
194
194
  "item",
195
195
  { forwardAsChild: !0 }
196
196
  );
197
197
  m(
198
- E,
198
+ W,
199
199
  "itemText",
200
200
  { forwardAsChild: !0 }
201
201
  );
202
- m(W, "itemIndicator", {
202
+ m(D, "itemIndicator", {
203
203
  forwardAsChild: !0,
204
204
  defaultProps: {
205
205
  children: /* @__PURE__ */ e.jsx(ae, {})
206
206
  }
207
207
  });
208
208
  const Ve = m("div", "indicatorGroup");
209
- m(O, "indicator", {
209
+ m(L, "indicator", {
210
210
  forwardAsChild: !0,
211
211
  defaultProps: {
212
212
  children: /* @__PURE__ */ e.jsx(de, {})
213
213
  }
214
214
  });
215
215
  const Fe = m(
216
- F,
216
+ V,
217
217
  "control",
218
218
  { forwardAsChild: !0 }
219
219
  );
220
220
  m(
221
- _,
221
+ E,
222
222
  "label",
223
223
  { forwardAsChild: !0 }
224
224
  );
225
- const Le = L, J = ({
225
+ const Le = F, U = ({
226
226
  item: o,
227
227
  onContrast: s,
228
228
  shouldTruncateText: r,
@@ -230,7 +230,7 @@ const Le = L, J = ({
230
230
  }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
231
231
  o.leftElement,
232
232
  typeof o.label == "string" ? /* @__PURE__ */ e.jsx(
233
- b,
233
+ I,
234
234
  {
235
235
  size: t,
236
236
  truncated: r,
@@ -243,10 +243,10 @@ const Le = L, J = ({
243
243
  placeholderElement: s,
244
244
  ...r
245
245
  }) => {
246
- const t = p(), n = I(() => t.selectedItems[0], [t]);
246
+ const t = p(), n = j(() => t.selectedItems[0], [t]);
247
247
  return /* @__PURE__ */ e.jsxs(Ne, { children: [
248
248
  !n && s,
249
- /* @__PURE__ */ e.jsx(Ge, { placeholder: o, children: n && /* @__PURE__ */ e.jsx(J, { item: n, ...r }) })
249
+ /* @__PURE__ */ e.jsx(Ge, { placeholder: o, children: n && /* @__PURE__ */ e.jsx(U, { item: n, ...r }) })
250
250
  ] });
251
251
  }, $e = Y(
252
252
  ({
@@ -260,14 +260,14 @@ const Le = L, J = ({
260
260
  selectRef: u,
261
261
  shouldTruncateText: S,
262
262
  size: P = "md",
263
- ...K
263
+ ...J
264
264
  }) => {
265
- const { contentRef: C } = xe(), Q = t ? "onContrast" : "default", f = I(() => Pe({
265
+ const { contentRef: K } = xe(), Q = t ? "onContrast" : "default", f = j(() => Pe({
266
266
  items: n ?? [],
267
267
  itemToString: (x) => typeof x.label == "string" ? x.label : x.valueText || "",
268
268
  itemToValue: (x) => x.value
269
269
  }), [n]);
270
- return console.log(C), /* @__PURE__ */ e.jsxs(
270
+ return /* @__PURE__ */ e.jsxs(
271
271
  ye,
272
272
  {
273
273
  className: "Select",
@@ -275,7 +275,7 @@ const Le = L, J = ({
275
275
  collection: f,
276
276
  size: P,
277
277
  variant: Q,
278
- ...K,
278
+ ...J,
279
279
  children: [
280
280
  /* @__PURE__ */ e.jsx(Le, { ref: u }),
281
281
  /* @__PURE__ */ e.jsxs(Fe, { children: [
@@ -309,22 +309,22 @@ const Le = L, J = ({
309
309
  )
310
310
  ] })
311
311
  ] }),
312
- /* @__PURE__ */ e.jsx(le, { container: C || void 0, children: /* @__PURE__ */ e.jsx(we, { children: /* @__PURE__ */ e.jsx(Te, { children: r ? /* @__PURE__ */ e.jsx(v, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
312
+ /* @__PURE__ */ e.jsx(le, { container: K || void 0, children: /* @__PURE__ */ e.jsx(we, { children: /* @__PURE__ */ e.jsx(Te, { children: r ? /* @__PURE__ */ e.jsx(C, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
313
313
  ee,
314
314
  {
315
315
  variant: t ? "brandOnContrast" : "brand",
316
316
  size: P
317
317
  }
318
318
  ) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: f.items.length ? f.items.map((x) => /* @__PURE__ */ e.jsx(Re, { item: x, children: /* @__PURE__ */ e.jsx(
319
- J,
319
+ U,
320
320
  {
321
321
  item: x,
322
322
  onContrast: !!t,
323
323
  shouldTruncateText: !!S,
324
324
  size: P
325
325
  }
326
- ) }, x.value)) : /* @__PURE__ */ e.jsx(v, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
327
- b,
326
+ ) }, x.value)) : /* @__PURE__ */ e.jsx(C, { w: "100%", justifyContent: "center", py: 3, children: /* @__PURE__ */ e.jsx(
327
+ I,
328
328
  {
329
329
  size: "sm",
330
330
  variant: t ? "subtleOnContrast" : "subtle",
@@ -342,4 +342,4 @@ ke.displayName = "Select";
342
342
  export {
343
343
  ke as W
344
344
  };
345
- //# sourceMappingURL=select.component-DC_tM1JD.js.map
345
+ //# sourceMappingURL=select.component-C4Kx68wP.js.map