@televet/kibble-ui 4.0.0-beta.41 → 4.0.0-beta.43
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/chunks/button.component-BWlRjD5a.js.map +1 -1
- package/dist/chunks/button.component-ytAmAAJg.js.map +1 -1
- package/dist/chunks/{buttonGroup.component-DBpnBBOa.js → buttonGroup.component-BCCxeFx_.js} +2 -2
- package/dist/chunks/{buttonGroup.component-DBpnBBOa.js.map → buttonGroup.component-BCCxeFx_.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js → buttonGroup.component-Cpwnw5G3.js} +2 -2
- package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js.map → buttonGroup.component-Cpwnw5G3.js.map} +1 -1
- package/dist/chunks/{checkbox.component-BTG2oHN_.js → checkbox.component-C8IPf20R.js} +2 -2
- package/dist/chunks/{checkbox.component-BTG2oHN_.js.map → checkbox.component-C8IPf20R.js.map} +1 -1
- package/dist/chunks/{checkbox.component-WA8Y2Cfq.js → checkbox.component-CvuE1PVR.js} +2 -2
- package/dist/chunks/{checkbox.component-WA8Y2Cfq.js.map → checkbox.component-CvuE1PVR.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DMSg9Hzt.js → checkboxGroup.component-CQEwY2Fu.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-DMSg9Hzt.js.map → checkboxGroup.component-CQEwY2Fu.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-CoUMqdnh.js → checkboxGroup.component-CaHesQT7.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-CoUMqdnh.js.map → checkboxGroup.component-CaHesQT7.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-D2k7g7wc.js → conversationCard.component-C_gj2TZd.js} +2 -2
- package/dist/chunks/{conversationCard.component-D2k7g7wc.js.map → conversationCard.component-C_gj2TZd.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CMudlOxC.js → conversationCard.component-p1vrl1L3.js} +2 -2
- package/dist/chunks/{conversationCard.component-CMudlOxC.js.map → conversationCard.component-p1vrl1L3.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CAd5ouvo.js → datePicker.component-CwQ7lbgj.js} +2 -2
- package/dist/chunks/{datePicker.component-CAd5ouvo.js.map → datePicker.component-CwQ7lbgj.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Btc-TcGV.js → datePicker.component-DLbm9VYf.js} +3 -3
- package/dist/chunks/{datePicker.component-Btc-TcGV.js.map → datePicker.component-DLbm9VYf.js.map} +1 -1
- package/dist/chunks/icon.component-4aaCABoX.js.map +1 -1
- package/dist/chunks/icon.component-BmcWaysM.js.map +1 -1
- package/dist/chunks/menu.component-D_eoL8VD.js +2 -0
- package/dist/chunks/menu.component-D_eoL8VD.js.map +1 -0
- package/dist/chunks/{menu.component-B5OYYpa8.js → menu.component-toq-fDY8.js} +188 -180
- package/dist/chunks/menu.component-toq-fDY8.js.map +1 -0
- package/dist/chunks/{modal.types-0p23sZIR.js → modal.types-BhM9guMA.js} +2 -2
- package/dist/chunks/{modal.types-0p23sZIR.js.map → modal.types-BhM9guMA.js.map} +1 -1
- package/dist/chunks/{modal.types-BGqtuJeQ.js → modal.types-Dz2IFuc7.js} +2 -1
- package/dist/chunks/{modal.types-BGqtuJeQ.js.map → modal.types-Dz2IFuc7.js.map} +1 -1
- package/dist/chunks/{pinInput.types-PLeb9Wy4.js → pinInput.types-BPnWNbwp.js} +2 -2
- package/dist/chunks/{pinInput.types-PLeb9Wy4.js.map → pinInput.types-BPnWNbwp.js.map} +1 -1
- package/dist/chunks/{pinInput.types-DDODRsaX.js → pinInput.types-GAEfMLAv.js} +2 -2
- package/dist/chunks/{pinInput.types-DDODRsaX.js.map → pinInput.types-GAEfMLAv.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-aQ5WaHHz.js → radioGroup.component-B3pl5h2h.js} +2 -2
- package/dist/chunks/{radioGroup.component-aQ5WaHHz.js.map → radioGroup.component-B3pl5h2h.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-BqJ9MJq_.js → radioGroup.component-DyE_o-Fx.js} +3 -3
- package/dist/chunks/{radioGroup.component-BqJ9MJq_.js.map → radioGroup.component-DyE_o-Fx.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-Bgh1iv_C.js → ratingDots.component-BesDpg8x.js} +2 -2
- package/dist/chunks/{ratingDots.component-Bgh1iv_C.js.map → ratingDots.component-BesDpg8x.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-3aUZ-7-n.js → ratingDots.component-C8eBoN9v.js} +2 -2
- package/dist/chunks/{ratingDots.component-3aUZ-7-n.js.map → ratingDots.component-C8eBoN9v.js.map} +1 -1
- package/dist/chunks/{select.component-C-D415HK.js → select.component-BCFraNbc.js} +2 -2
- package/dist/chunks/{select.component-C-D415HK.js.map → select.component-BCFraNbc.js.map} +1 -1
- package/dist/chunks/{select.component-CceQLD7L.js → select.component-GTm2laeB.js} +2 -2
- package/dist/chunks/{select.component-CceQLD7L.js.map → select.component-GTm2laeB.js.map} +1 -1
- package/dist/chunks/{switch.component-8Ksb8br3.js → switch.component-CSGFEF3I.js} +2 -2
- package/dist/chunks/{switch.component-8Ksb8br3.js.map → switch.component-CSGFEF3I.js.map} +1 -1
- package/dist/chunks/{switch.component-BkifDkJ0.js → switch.component-DjHknb_4.js} +2 -2
- package/dist/chunks/{switch.component-BkifDkJ0.js.map → switch.component-DjHknb_4.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-D_3b0Ebn.js → tagBlock.component-BWbEe9VL.js} +2 -2
- package/dist/chunks/{tagBlock.component-D_3b0Ebn.js.map → tagBlock.component-BWbEe9VL.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-DjIgrPCX.js → tagBlock.component-DGGkSE8s.js} +2 -2
- package/dist/chunks/{tagBlock.component-DjIgrPCX.js.map → tagBlock.component-DGGkSE8s.js.map} +1 -1
- package/dist/chunks/{textInput.component-c9ySCd-c.js → textInput.component-D2StzwsH.js} +2 -2
- package/dist/chunks/{textInput.component-c9ySCd-c.js.map → textInput.component-D2StzwsH.js.map} +1 -1
- package/dist/chunks/{textInput.component-7QTnQmYu.js → textInput.component-db5JWDOn.js} +2 -2
- package/dist/chunks/{textInput.component-7QTnQmYu.js.map → textInput.component-db5JWDOn.js.map} +1 -1
- package/dist/chunks/{textarea.component-7yXlR6OD.js → textarea.component-DvA5vzjS.js} +2 -2
- package/dist/chunks/{textarea.component-7yXlR6OD.js.map → textarea.component-DvA5vzjS.js.map} +1 -1
- package/dist/chunks/{textarea.component-Bbf7OmgY.js → textarea.component-VN5A4zVD.js} +2 -2
- package/dist/chunks/{textarea.component-Bbf7OmgY.js.map → textarea.component-VN5A4zVD.js.map} +1 -1
- package/dist/chunks/{theme.provider-DHyAAmb8.js → theme.provider-C1ydkJtd.js} +143 -146
- package/dist/chunks/{theme.provider-DHyAAmb8.js.map → theme.provider-C1ydkJtd.js.map} +1 -1
- package/dist/chunks/{theme.provider-CGOc_ofu.js → theme.provider-CUQEVC68.js} +2 -2
- package/dist/chunks/{theme.provider-CGOc_ofu.js.map → theme.provider-CUQEVC68.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CWQsy1FJ.js → timePicker.component-Cm2roPxJ.js} +2 -2
- package/dist/chunks/{timePicker.component-CWQsy1FJ.js.map → timePicker.component-Cm2roPxJ.js.map} +1 -1
- package/dist/chunks/{timePicker.component-DayAeaAE.js → timePicker.component-sttSyiVV.js} +2 -2
- package/dist/chunks/{timePicker.component-DayAeaAE.js.map → timePicker.component-sttSyiVV.js.map} +1 -1
- package/dist/chunks/{timeRange.component-kKGWfXnG.js → timeRange.component-BuLsK6ed.js} +2 -2
- package/dist/chunks/{timeRange.component-kKGWfXnG.js.map → timeRange.component-BuLsK6ed.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BMIZhDDZ.js → timeRange.component-OH7hVSwj.js} +2 -2
- package/dist/chunks/{timeRange.component-BMIZhDDZ.js.map → timeRange.component-OH7hVSwj.js.map} +1 -1
- package/dist/chunks/{withFormControl-BldbKXiV.js → withFormControl-Chelruxy.js} +55 -55
- package/dist/chunks/{withFormControl-BldbKXiV.js.map → withFormControl-Chelruxy.js.map} +1 -1
- package/dist/chunks/{withFormControl-C35JkDEH.js → withFormControl-CvsBPk94.js} +2 -2
- package/dist/chunks/{withFormControl-C35JkDEH.js.map → withFormControl-CvsBPk94.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +101 -95
- package/dist/esm/chakra/index.js.map +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/index.js +17 -17
- package/dist/esm/index.js +18 -18
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/chakra/index.d.ts +1 -1
- package/dist/types/components/Menu/components/MenuItem/menuItem.component.d.ts +3 -2
- package/dist/types/components/Menu/menu.component.d.ts +1 -1
- package/dist/types/hocs/withFormControl/withFormControl.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/menu.component-B5OYYpa8.js.map +0 -1
- package/dist/chunks/menu.component-BsPmuH77.js +0 -2
- package/dist/chunks/menu.component-BsPmuH77.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component-C-D415HK.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\";\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 placeholderElement,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\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>\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","_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":"mmBAEMA,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,EAAAA,IAAI,OAAQ,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAChE,CAAC,EACDH,EAAmB,YAAc,qBCHjC,MAAMS,EAAgBR,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC/C,MAAMC,EAASN,EAAkB,EAC3BY,EAAWC,EAAAA,mBAAoB,EAC/BN,EAAcC,EAAU,WAACF,EAAO,gBAAiB,EAAEM,EAAS,iBAAkB,EAAER,CAAK,EAC3F,OAAIQ,EAAS,UACJ,KAEcH,wBAAIC,EAAAA,IAAI,IAAK,CAAE,GAAGH,EAAa,IAAKO,EAAAA,YAAYF,EAAS,IAAKP,CAAG,CAAC,CAAE,CAC7F,CAAC,EACDM,EAAc,YAAc,gBCX5B,MAAMI,EAAgBZ,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC/C,MAAMC,EAASN,EAAkB,EAC3BO,EAAcC,EAAU,WAACF,EAAO,gBAAe,EAAIF,CAAK,EAC9D,OAAuBK,EAAAA,kBAAAA,IAAIC,EAAAA,IAAI,IAAK,CAAE,GAAGH,EAAa,IAAAF,EAAK,CAC7D,CAAC,EACDU,EAAc,YAAc,gBCJ5B,MAAMC,EAAqBb,EAAU,WAAC,CAACC,EAAOC,IAAQ,CACpD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EACtB,KAAAC,CAAA,CAL2B,CAAA,EAAA3E,EAAK,KAOpC,CACD,EAEDZ,EAAAA,kBAAAA,IAACmH,EAAAA,KAAK,CAAA,EAAE,OAAO,eAAe,SAAS,GAAI,EACzC,SAAAnH,EAAA,kBAAA,IAACyF,EAAA,YAAA,CACC,KAAK,KACL,QAASJ,EAAa,mBAAqB,SAE1C,SAAAc,CAAA,CAEL,CAAA,CAAA,CAEJ,CAAA,EAEJ,CAAA,CACF,CACF,CAAA,CAAA,CAAA,CACF,CAAA,CAGN,EAEMmB,EAAgBC,EAAM,QAAA,WAC1B,CAAC5H,EAAoBC,IACnBI,wBAACgG,IAAO,UAAWpG,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA2H,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-BCFraNbc.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\";\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 placeholderElement,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\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>\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","_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":"mmBAEMA,EAAwBC,G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EAAA,YAAA,CACC,KAAK,KACL,QAASJ,EAAa,mBAAqB,SAE1C,SAAAc,CAAA,CAEL,CAAA,CAAA,CAEJ,CAAA,EAEJ,CAAA,CACF,CACF,CAAA,CAAA,CAAA,CACF,CAAA,CAGN,EAEMmB,EAAgBC,EAAM,QAAA,WAC1B,CAAC5H,EAAoBC,IACnBI,wBAACgG,IAAO,UAAWpG,EAAM,GAAGD,CAAO,CAAA,CAEvC,EAEA2H,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,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import Q, { forwardRef as a, useId as v, useMemo as j } from "react";
|
|
3
|
-
import { w as X } from "./withFormControl-
|
|
3
|
+
import { w as X } from "./withFormControl-Chelruxy.js";
|
|
4
4
|
import { I as Y } from "./icon.component-BmcWaysM.js";
|
|
5
5
|
import { B as Z } from "./button.component-BWlRjD5a.js";
|
|
6
6
|
import { W as I } from "./text.component-DZkwd4C0.js";
|
|
@@ -341,4 +341,4 @@ Oe.displayName = "Select";
|
|
|
341
341
|
export {
|
|
342
342
|
Oe as W
|
|
343
343
|
};
|
|
344
|
-
//# sourceMappingURL=select.component-
|
|
344
|
+
//# sourceMappingURL=select.component-GTm2laeB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component-CceQLD7L.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\";\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 placeholderElement,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\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>\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","_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":";;;;;;;;;;;;;;AAEA,MAAMA,KAAuB,CAACC,MAAY,IAAIC,GAAeD,CAAO,GCC9D,CAACE,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAqBC,EAAW,CAACC,GAAOC,MAAQ;AACpD,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,qBAAoB,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,QAAQ,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAChE,CAAC;AACDH,EAAmB,cAAc;ACHjC,MAAMS,IAAgBR,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAASN,EAAkB,GAC3BY,IAAWC,EAAoB,GAC/BN,IAAcC,EAAWF,EAAO,gBAAiB,GAAEM,EAAS,iBAAkB,GAAER,CAAK;AAC3F,SAAIQ,EAAS,YACJ,OAEcH,gBAAAA,MAAIC,EAAI,KAAK,EAAE,GAAGH,GAAa,KAAKO,GAAYF,EAAS,KAAKP,CAAG,EAAC,CAAE;AAC7F,CAAC;AACDM,EAAc,cAAc;ACX5B,MAAMI,IAAgBZ,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,gBAAe,GAAIF,CAAK;AAC9D,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,KAA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,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEMmB,KAAgBC,EAAM;AAAA,EAC1B,CAAC5H,GAAoBC,MACnBI,gBAAAA,MAACgG,MAAO,WAAWpG,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA2H,GAAc,cAAc;","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-GTm2laeB.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\";\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 placeholderElement,\n emptyPlaceholder = \"No options available\",\n loading,\n onContrast,\n options,\n placeholder = \"\",\n selectRef,\n shouldTruncateText,\n size = \"md\",\n ...rest\n }: SelectProps): React.JSX.Element => {\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>\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","_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":";;;;;;;;;;;;;;AAEA,MAAMA,KAAuB,CAACC,MAAY,IAAIC,GAAeD,CAAO,GCC9D,CAACE,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAqBC,EAAW,CAACC,GAAOC,MAAQ;AACpD,QAAMC,IAASN,EAAkB,GAC3BO,IAAcC,EAAWF,EAAO,qBAAoB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,IAGGvF,gBAAAA,EAAAA,IAAAwF,EAAA,UAAA,EAAA,UAAAe,EAAW,MAAM,SAChBA,EAAW,MAAM,IAAI,CAAC3F,MACpBZ,gBAAAA,EAAAA,IAACqH,IAAA,EAAa,MAAAzG,GACZ,UAAAZ,gBAAAA,EAAA;AAAA,YAACoF;AAAA,YAAA;AAAA,cACC,MAAAxE;AAAA,cACA,YAAY,CAAC,CAACyE;AAAA,cACd,oBAAoB,CAAC,CAACC;AAAA,cACtB,MAAAC;AAAA,YAAA;AAAA,UAL2B,EAAA,GAAA3E,EAAK,KAOpC,CACD,IAEDZ,gBAAAA,EAAAA,IAACmH,GAAK,EAAA,GAAE,QAAO,gBAAe,UAAS,IAAI,GACzC,UAAAnH,gBAAAA,EAAA;AAAA,YAACyF;AAAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASJ,IAAa,qBAAqB;AAAA,cAE1C,UAAAc;AAAA,YAAA;AAAA,UAEL,EAAA,CAAA,EAEJ,CAAA,GAEJ,EAAA,CACF,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAEMmB,KAAgBC,EAAM;AAAA,EAC1B,CAAC5H,GAAoBC,MACnBI,gBAAAA,MAACgG,MAAO,WAAWpG,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA2H,GAAc,cAAc;","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,6 +1,6 @@
|
|
|
1
1
|
import { j as c } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import g, { forwardRef as n, useId as R, useMemo as N } from "react";
|
|
3
|
-
import { w as I } from "./withFormControl-
|
|
3
|
+
import { w as I } from "./withFormControl-Chelruxy.js";
|
|
4
4
|
import { d as u } from "./attr-sm10PXOd.js";
|
|
5
5
|
import { c as A } from "./create-slot-recipe-context-DJkLYvCT.js";
|
|
6
6
|
import { c as w } from "./factory-gZxMesut.js";
|
|
@@ -163,4 +163,4 @@ B.displayName = "Switch";
|
|
|
163
163
|
export {
|
|
164
164
|
B as W
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=switch.component-
|
|
166
|
+
//# sourceMappingURL=switch.component-CSGFEF3I.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.component-8Ksb8br3.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":";;;;;;;;;;AAGA,MAAM,CAACA,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAgBC,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,gBAAe,GAAIF,CAAK;AACrE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDH,EAAc,cAAc;ACJ5B,MAAMS,IAAoBR,EAAW,CAACC,GAAOC,MAAQ;AACnD,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,oBAAmB,GAAIF,CAAK,GACnEQ,IAAQC,EAAiB;AAC/B,SAAuBJ,gBAAAA,EAAG,IAACC,EAAI,OAAO,EAAE,oBAAoBE,GAAO,iBAAiB,GAAGL,GAAa,KAAAF,GAAK;AAC3G,CAAC;AACDM,EAAkB,cAAc;ACPhC,MAAMG,IAAcX,EAAW,CAACC,GAAOC,MAAQ;AAC7C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,cAAa,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDS,EAAY,cAAc;ACJ1B,MAAMC,IAAY,CAACX,MAAU;AAC3B,QAAMY,IAAKC,EAAO,GACZ,EAAE,aAAAC,EAAa,IAAGC,EAAuB,GACzC,EAAE,KAAAC,EAAK,IAAGC,EAAkB,GAC5BT,IAA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,EAC1B,CAAC9D,GAAoBC,MACnBI,gBAAAA,MAAC0C,KAAO,WAAW9C,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA6D,EAAc,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"switch.component-CSGFEF3I.js","sources":["../../node_modules/@ark-ui/react/dist/components/switch/use-switch-context.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-control.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-label.js","../../node_modules/@ark-ui/react/dist/components/switch/use-switch.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-root-provider.js","../../node_modules/@ark-ui/react/dist/components/switch/switch-thumb.js","../../node_modules/@chakra-ui/react/dist/esm/components/switch/switch.js","../../src/components/Switch/switch.component.tsx"],"sourcesContent":["'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [SwitchProvider, useSwitchContext] = createContext({\n name: \"SwitchContext\",\n hookName: \"useSwitchContext\",\n providerName: \"<SwitchProvider />\"\n});\n\nexport { SwitchProvider, useSwitchContext };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchControl = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getControlProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchControl.displayName = \"SwitchControl\";\n\nexport { SwitchControl };\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 { useFieldContext } from '../field/use-field-context.js';\nimport { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchHiddenInput = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getHiddenInputProps(), props);\n const field = useFieldContext();\n return /* @__PURE__ */ jsx(ark.input, { \"aria-describedby\": field?.ariaDescribedby, ...mergedProps, ref });\n});\nSwitchHiddenInput.displayName = \"SwitchHiddenInput\";\n\nexport { SwitchHiddenInput };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchLabel = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getLabelProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchLabel.displayName = \"SwitchLabel\";\n\nexport { SwitchLabel };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as zagSwitch from '@zag-js/switch';\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 useSwitch = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const field = useFieldContext();\n const machineProps = {\n id,\n ids: {\n label: field?.ids.label,\n hiddenInput: field?.ids.control\n },\n dir,\n disabled: field?.disabled,\n readOnly: field?.readOnly,\n invalid: field?.invalid,\n required: field?.required,\n getRootNode,\n ...props\n };\n const service = useMachine(zagSwitch.machine, machineProps);\n return zagSwitch.connect(service, normalizeProps);\n};\n\nexport { useSwitch };\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 { useSwitch } from './use-switch.js';\nimport { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRoot = forwardRef((props, ref) => {\n const [switchProps, localProps] = createSplitProps()(props, [\n \"checked\",\n \"defaultChecked\",\n \"disabled\",\n \"form\",\n \"id\",\n \"ids\",\n \"invalid\",\n \"label\",\n \"name\",\n \"onCheckedChange\",\n \"readOnly\",\n \"required\",\n \"value\"\n ]);\n const switchContext = useSwitch(switchProps);\n const mergedProps = mergeProps(switchContext.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: switchContext, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRoot.displayName = \"SwitchRoot\";\n\nexport { SwitchRoot };\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 { SwitchProvider } from './use-switch-context.js';\n\nconst SwitchRootProvider = forwardRef((props, ref) => {\n const [{ value: api }, localProps] = createSplitProps()(props, [\"value\"]);\n const mergedProps = mergeProps(api.getRootProps(), localProps);\n return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref }) });\n});\nSwitchRootProvider.displayName = \"SwitchRootProvider\";\n\nexport { SwitchRootProvider };\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 { useSwitchContext } from './use-switch-context.js';\n\nconst SwitchThumb = forwardRef((props, ref) => {\n const switchContext = useSwitchContext();\n const mergedProps = mergeProps(switchContext.getThumbProps(), props);\n return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });\n});\nSwitchThumb.displayName = \"SwitchThumb\";\n\nexport { SwitchThumb };\n","\"use strict\";\n\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { Switch, useSwitchContext } from '@ark-ui/react/switch';\nimport { forwardRef } from 'react';\nimport { dataAttr } from '../../utils/attr.js';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\nimport { chakra } from '../../styled-system/factory.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useSwitchStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"switch\" });\nconst SwitchRootProvider = withProvider(Switch.RootProvider, \"root\", { forwardAsChild: true });\nconst SwitchRoot = withProvider(\n Switch.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst SwitchPropsProvider = PropsProvider;\nconst SwitchLabel = withContext(\n Switch.Label,\n \"label\",\n { forwardAsChild: true }\n);\nconst SwitchThumb = withContext(\n Switch.Thumb,\n \"thumb\",\n { forwardAsChild: true }\n);\nconst SwitchControl = withContext(\n Switch.Control,\n \"control\",\n {\n forwardAsChild: true,\n defaultProps: { children: /* @__PURE__ */ jsx(SwitchThumb, {}) }\n }\n);\nconst SwitchIndicator = forwardRef(function SwitchIndicator2(props, ref) {\n const api = useSwitchContext();\n const styles = useSwitchStyles();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(\n chakra.span,\n {\n ref,\n \"data-checked\": dataAttr(api.checked),\n ...rest,\n css: [styles.indicator, props.css],\n children: api.checked ? children : fallback\n }\n );\n});\nconst SwitchThumbIndicator = forwardRef(function SwitchThumbIndicator2(props, ref) {\n const api = useSwitchContext();\n const { fallback, children, ...rest } = props;\n return /* @__PURE__ */ jsx(chakra.span, { ref, \"data-checked\": dataAttr(api.checked), ...rest, children: api.checked ? children : fallback });\n});\nconst SwitchContext = Switch.Context;\nconst SwitchHiddenInput = Switch.HiddenInput;\n\nexport { SwitchContext, SwitchControl, SwitchHiddenInput, SwitchIndicator, SwitchLabel, SwitchPropsProvider, SwitchRoot, SwitchRootProvider, SwitchThumb, SwitchThumbIndicator, useSwitchStyles };\n","import React, { ForwardedRef, useMemo } from \"react\";\nimport { Switch as CSwitch } from \"@chakra-ui/react/switch\";\nimport {\n withFormControl,\n WithFormControlProps,\n} from \"hocs/withFormControl/withFormControl\";\nimport { FormControlSize } from \"hocs/withFormControl/withFormControl.types\";\n\nexport interface SwitchProps\n extends WithFormControlProps,\n Omit<CSwitch.RootProps, \"label\" | \"onChange\"> {\n indeterminate?: boolean;\n switchRef?: ForwardedRef<HTMLLabelElement>;\n size?: FormControlSize;\n}\n\nconst Switch = withFormControl(\n ({\n children,\n indeterminate = false,\n onContrast,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n label,\n size = \"md\",\n switchRef,\n ...rest\n }: SwitchProps): React.JSX.Element => {\n const _computedVariant = useMemo(() => {\n if (indeterminate) {\n return onContrast ? \"indeterminateOnContrast\" : \"indeterminate\";\n } else {\n return onContrast ? \"onContrast\" : \"default\";\n }\n }, [indeterminate, onContrast]);\n\n return (\n <CSwitch.Root\n className=\"Switch\"\n data-testid=\"kibble-switch\"\n ref={switchRef}\n size={size}\n variant={_computedVariant}\n {...rest}\n >\n <CSwitch.HiddenInput\n className=\"Switch_Input\"\n data-testid=\"kibble-switch-input\"\n />\n <CSwitch.Control\n className=\"Switch_Control\"\n data-testid=\"kibble-switch-control\"\n />\n {!!children && <CSwitch.Label>{children}</CSwitch.Label>}\n </CSwitch.Root>\n );\n },\n);\n\nconst WrappedSwitch = React.forwardRef(\n (props: SwitchProps, ref: ForwardedRef<HTMLLabelElement>) => (\n <Switch switchRef={ref} {...props} />\n ),\n);\n\nWrappedSwitch.displayName = \"Switch\";\n\nexport { WrappedSwitch as Switch };\n"],"names":["SwitchProvider","useSwitchContext","createContext","SwitchControl","forwardRef","props","ref","switchContext","mergedProps","mergeProps","jsx","ark","SwitchHiddenInput","field","useFieldContext","SwitchLabel","useSwitch","id","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","service","useMachine","zagSwitch.machine","zagSwitch.connect","normalizeProps","SwitchRoot","switchProps","localProps","createSplitProps","SwitchRootProvider","api","SwitchThumb","withProvider","withContext","useSwitchStyles","createSlotRecipeContext","Switch.RootProvider","Switch.Root","Switch.Label","Switch.Thumb","Switch.Control","styles","fallback","children","rest","chakra","dataAttr","Switch.HiddenInput","Switch","withFormControl","indeterminate","onContrast","label","size","switchRef","_computedVariant","useMemo","jsxs","CSwitch.Root","CSwitch.HiddenInput","CSwitch.Control","CSwitch.Label","WrappedSwitch","React"],"mappings":";;;;;;;;;;AAGA,MAAM,CAACA,GAAgBC,CAAgB,IAAIC,EAAc;AAAA,EACvD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,cAAc;AAChB,CAAC,GCAKC,IAAgBC,EAAW,CAACC,GAAOC,MAAQ;AAC/C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,gBAAe,GAAIF,CAAK;AACrE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDH,EAAc,cAAc;ACJ5B,MAAMS,IAAoBR,EAAW,CAACC,GAAOC,MAAQ;AACnD,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,oBAAmB,GAAIF,CAAK,GACnEQ,IAAQC,EAAiB;AAC/B,SAAuBJ,gBAAAA,EAAG,IAACC,EAAI,OAAO,EAAE,oBAAoBE,GAAO,iBAAiB,GAAGL,GAAa,KAAAF,GAAK;AAC3G,CAAC;AACDM,EAAkB,cAAc;ACPhC,MAAMG,IAAcX,EAAW,CAACC,GAAOC,MAAQ;AAC7C,QAAMC,IAAgBN,EAAkB,GAClCO,IAAcC,EAAWF,EAAc,cAAa,GAAIF,CAAK;AACnE,SAAuBK,gBAAAA,EAAAA,IAAIC,EAAI,MAAM,EAAE,GAAGH,GAAa,KAAAF,GAAK;AAC9D,CAAC;AACDS,EAAY,cAAc;ACJ1B,MAAMC,IAAY,CAACX,MAAU;AAC3B,QAAMY,IAAKC,EAAO,GACZ,EAAE,aAAAC,EAAa,IAAGC,EAAuB,GACzC,EAAE,KAAAC,EAAK,IAAGC,EAAkB,GAC5BT,IAAQC,EAAiB,GACzBS,IAAe;AAAA,IACnB,IA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A,MAAC0C,KAAO,WAAW9C,GAAM,GAAGD,EAAO,CAAA;AAEvC;AAEA6D,EAAc,cAAc;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-
|
|
2
|
-
//# sourceMappingURL=switch.component-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BjDatQAs.js"),c=require("react"),y=require("./withFormControl-CvsBPk94.js"),w=require("./attr-BMs6szZx.js"),E=require("./create-slot-recipe-context-D-pJ8fgs.js"),m=require("./factory-CkTX_WOU.js"),n=require("./use-locale-context-BdqHZ8L8.js"),f=require("./use-field-context--wBJQY1R.js"),l=require("./index-CZ42b9rT.js"),x=require("./index-CX6Jo_Vb.js"),q=t=>t&&t.__esModule?t:{default:t},N=q(c),[R,u]=n.createContext({name:"SwitchContext",hookName:"useSwitchContext",providerName:"<SwitchProvider />"}),S=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getControlProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});S.displayName="SwitchControl";const j=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getHiddenInputProps(),t),o=f.useFieldContext();return i.jsxRuntimeExports.jsx(n.ark.input,{"aria-describedby":o?.ariaDescribedby,...s,ref:e})});j.displayName="SwitchHiddenInput";const C=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getLabelProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});C.displayName="SwitchLabel";const I=t=>{const e=c.useId(),{getRootNode:r}=n.useEnvironmentContext(),{dir:s}=n.useLocaleContext(),o=f.useFieldContext(),a={id:e,ids:{label:o?.ids.label,hiddenInput:o?.ids.control},dir:s,disabled:o?.disabled,readOnly:o?.readOnly,invalid:o?.invalid,required:o?.required,getRootNode:r,...t},d=n.useMachine(x.machine,a);return x.connect(d,n.normalizeProps)},b=c.forwardRef((t,e)=>{const[r,s]=n.createSplitProps()(t,["checked","defaultChecked","disabled","form","id","ids","invalid","label","name","onCheckedChange","readOnly","required","value"]),o=I(r),a=l.mergeProps(o.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:o,children:i.jsxRuntimeExports.jsx(n.ark.label,{...a,ref:e})})});b.displayName="SwitchRoot";const P=c.forwardRef((t,e)=>{const[{value:r},s]=n.createSplitProps()(t,["value"]),o=l.mergeProps(r.getRootProps(),s);return i.jsxRuntimeExports.jsx(R,{value:r,children:i.jsxRuntimeExports.jsx(n.ark.label,{...o,ref:e})})});P.displayName="SwitchRootProvider";const k=c.forwardRef((t,e)=>{const r=u(),s=l.mergeProps(r.getThumbProps(),t);return i.jsxRuntimeExports.jsx(n.ark.span,{...s,ref:e})});k.displayName="SwitchThumb";const{withProvider:g,withContext:p,useStyles:_}=E.createSlotRecipeContext({key:"switch"});g(P,"root",{forwardAsChild:!0});const A=g(b,"root",{forwardAsChild:!0}),L=p(C,"label",{forwardAsChild:!0}),$=p(k,"thumb",{forwardAsChild:!0}),F=p(S,"control",{forwardAsChild:!0,defaultProps:{children:i.jsxRuntimeExports.jsx($,{})}});c.forwardRef(function(e,r){const s=u(),o=_(),{fallback:a,children:d,...h}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...h,css:[o.indicator,e.css],children:s.checked?d:a})});c.forwardRef(function(e,r){const s=u(),{fallback:o,children:a,...d}=e;return i.jsxRuntimeExports.jsx(m.chakra.span,{ref:r,"data-checked":w.dataAttr(s.checked),...d,children:s.checked?a:o})});const T=j,H=y.withFormControl(({children:t,indeterminate:e=!1,onContrast:r,label:s,size:o="md",switchRef:a,...d})=>{const h=c.useMemo(()=>e?r?"indeterminateOnContrast":"indeterminate":r?"onContrast":"default",[e,r]);return i.jsxRuntimeExports.jsxs(A,{className:"Switch","data-testid":"kibble-switch",ref:a,size:o,variant:h,...d,children:[i.jsxRuntimeExports.jsx(T,{className:"Switch_Input","data-testid":"kibble-switch-input"}),i.jsxRuntimeExports.jsx(F,{className:"Switch_Control","data-testid":"kibble-switch-control"}),!!t&&i.jsxRuntimeExports.jsx(L,{children:t})]})}),v=N.default.forwardRef((t,e)=>i.jsxRuntimeExports.jsx(H,{switchRef:e,...t}));v.displayName="Switch";exports.WrappedSwitch=v;
|
|
2
|
+
//# sourceMappingURL=switch.component-DjHknb_4.js.map
|