@commercetools/nimbus 0.0.0-canary-20250929125459 → 0.0.0-canary-20250930095152

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.
Files changed (64) hide show
  1. package/dist/chunks/data-table-BFGyPJvT.cjs.js +2 -0
  2. package/dist/chunks/{data-table-BBgNLX1F.cjs.js.map → data-table-BFGyPJvT.cjs.js.map} +1 -1
  3. package/dist/chunks/{data-table-D3e1Jwo7.es.js → data-table-CommJV1y.es.js} +883 -872
  4. package/dist/chunks/{data-table-D3e1Jwo7.es.js.map → data-table-CommJV1y.es.js.map} +1 -1
  5. package/dist/chunks/form-field-C6lWjdck.cjs.js +11 -0
  6. package/dist/chunks/form-field-C6lWjdck.cjs.js.map +1 -0
  7. package/dist/chunks/form-field-bP4SYMaC.es.js +319 -0
  8. package/dist/chunks/form-field-bP4SYMaC.es.js.map +1 -0
  9. package/dist/chunks/make-element-focusable-BDByS8Na.cjs.js +2 -0
  10. package/dist/chunks/make-element-focusable-BDByS8Na.cjs.js.map +1 -0
  11. package/dist/chunks/make-element-focusable-BamCHW5U.es.js +25 -0
  12. package/dist/chunks/make-element-focusable-BamCHW5U.es.js.map +1 -0
  13. package/dist/chunks/{money-input-B2X3PtKX.es.js → money-input-BN_yFB_R.es.js} +3 -3
  14. package/dist/chunks/{money-input-B2X3PtKX.es.js.map → money-input-BN_yFB_R.es.js.map} +1 -1
  15. package/dist/chunks/{money-input-BFhtaiLG.cjs.js → money-input-BPrFeUBJ.cjs.js} +2 -2
  16. package/dist/chunks/{money-input-BFhtaiLG.cjs.js.map → money-input-BPrFeUBJ.cjs.js.map} +1 -1
  17. package/dist/chunks/{pagination-Dis-nnBy.cjs.js → pagination-0rlXyI2R.cjs.js} +2 -2
  18. package/dist/chunks/{pagination-Dis-nnBy.cjs.js.map → pagination-0rlXyI2R.cjs.js.map} +1 -1
  19. package/dist/chunks/{pagination-ZXOMcPAB.es.js → pagination-C4dyNajw.es.js} +2 -2
  20. package/dist/chunks/{pagination-ZXOMcPAB.es.js.map → pagination-C4dyNajw.es.js.map} +1 -1
  21. package/dist/chunks/{rich-text-input-3MgAtZuL.cjs.js → rich-text-input-DbpI_805.cjs.js} +12 -12
  22. package/dist/chunks/{rich-text-input-3MgAtZuL.cjs.js.map → rich-text-input-DbpI_805.cjs.js.map} +1 -1
  23. package/dist/chunks/{rich-text-input-C8bdPxGb.es.js → rich-text-input-DynX9BO2.es.js} +658 -655
  24. package/dist/chunks/{rich-text-input-C8bdPxGb.es.js.map → rich-text-input-DynX9BO2.es.js.map} +1 -1
  25. package/dist/chunks/select-5dgbT8AN.cjs.js +2 -0
  26. package/dist/chunks/{select-C1SC1XAp.cjs.js.map → select-5dgbT8AN.cjs.js.map} +1 -1
  27. package/dist/chunks/select-CwavXa9Y.es.js +580 -0
  28. package/dist/chunks/{select-DpHmAHrs.es.js.map → select-CwavXa9Y.es.js.map} +1 -1
  29. package/dist/components/components.cjs +1 -1
  30. package/dist/components/components.es.js +7 -7
  31. package/dist/components/data-table.cjs +1 -1
  32. package/dist/components/data-table.es.js +1 -1
  33. package/dist/components/form-field.cjs +1 -1
  34. package/dist/components/form-field.es.js +1 -1
  35. package/dist/components/money-input.cjs +1 -1
  36. package/dist/components/money-input.es.js +1 -1
  37. package/dist/components/pagination.cjs +1 -1
  38. package/dist/components/pagination.es.js +1 -1
  39. package/dist/components/rich-text-input.cjs +1 -1
  40. package/dist/components/rich-text-input.es.js +1 -1
  41. package/dist/components/select.cjs +1 -1
  42. package/dist/components/select.es.js +1 -1
  43. package/dist/components/tooltip.cjs +1 -1
  44. package/dist/components/tooltip.es.js +1 -1
  45. package/dist/components.d.ts +76 -21
  46. package/dist/data-table.d.ts +45 -14
  47. package/dist/form-field.d.ts +7 -4
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.ts +74 -19
  50. package/dist/index.es.js +8 -8
  51. package/dist/select.d.ts +12 -4
  52. package/dist/tooltip.d.ts +13 -6
  53. package/package.json +5 -5
  54. package/dist/chunks/data-table-BBgNLX1F.cjs.js +0 -2
  55. package/dist/chunks/form-field-D2DlhLF_.cjs.js +0 -11
  56. package/dist/chunks/form-field-D2DlhLF_.cjs.js.map +0 -1
  57. package/dist/chunks/form-field-DY3B_1tq.es.js +0 -310
  58. package/dist/chunks/form-field-DY3B_1tq.es.js.map +0 -1
  59. package/dist/chunks/make-element-focusable-C4ZHUSEU.es.js +0 -22
  60. package/dist/chunks/make-element-focusable-C4ZHUSEU.es.js.map +0 -1
  61. package/dist/chunks/make-element-focusable-bPAMXt4D.cjs.js +0 -2
  62. package/dist/chunks/make-element-focusable-bPAMXt4D.cjs.js.map +0 -1
  63. package/dist/chunks/select-C1SC1XAp.cjs.js +0 -2
  64. package/dist/chunks/select-DpHmAHrs.es.js +0 -579
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-field-DY3B_1tq.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.recipe.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.slots\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n\nconst columnLayout = `\n\"label\"\n\"input\"\n\"description\"\n\"error\"\n`;\nconst rowLayout = `\n\"label input\"\n\"label description\"\n\"label error\"\n`;\n\n/**\n * Recipe configuration for the FormField component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const formFieldRecipe = defineSlotRecipe({\n slots: [\"root\", \"label\", \"input\", \"description\", \"error\", \"popover\"],\n // Unique class name prefix for the component\n className: \"nimbus-ui-form-field\",\n\n base: {\n root: {\n \"--grid-gap\": \"spacing.100\",\n\n display: \"grid\",\n width: \"auto\",\n },\n label: {\n gridArea: \"label\",\n fontWeight: \"500\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n input: {\n gridArea: \"input\",\n },\n description: {\n gridArea: \"description\",\n color: \"neutral.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n },\n error: {\n gridArea: \"error\",\n color: \"critical.11\",\n fontSize: \"var(--form-field-font-size)\",\n lineHeight: \"var(--form-field-line-height)\",\n display: \"flex\",\n gap: \"100\",\n },\n popover: {\n \"--scrollbar-color\": \"colors.neutral.8\",\n \"--scrollbar-bg\": \"colors.neutral.3\",\n bg: \"neutral.1\",\n maxWidth: \"xl\",\n borderRadius: \"200\",\n boxShadow: \"6\",\n border: \"solid-25\",\n borderColor: \"neutral.8\",\n maxHeight: \"40svh\",\n overflow: \"auto\",\n scrollbarWidth: \"thin\",\n scrollbarColor: \"var(--scrollbar-color) var(--scrollbar-bg)\",\n focusRing: \"outside\",\n },\n },\n\n variants: {\n size: {\n md: {\n root: {\n \"--form-field-font-size\": \"fontSizes.350\",\n \"--form-field-line-height\": \"lineHeights.500\",\n },\n },\n sm: {\n root: {\n \"--form-field-font-size\": \"fontSizes.300\",\n \"--form-field-line-height\": \"lineHeights.450\",\n },\n },\n },\n direction: {\n column: {\n root: {\n gridTemplateAreas: columnLayout,\n },\n input: {\n mt: \"var(--grid-gap)\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n row: {\n root: {\n gridTemplateAreas: rowLayout,\n gridTemplateColumns: \"auto 1fr\",\n gridColumnGap: \"200\",\n },\n description: {\n mt: \"var(--grid-gap)\",\n },\n error: {\n mt: \"var(--grid-gap)\",\n },\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n direction: \"column\",\n size: \"md\",\n },\n});\n","/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { formFieldRecipe } from \"./form-field.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: formFieldRecipe,\n});\n\n// Root slot\nexport interface FormFieldRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof formFieldRecipe> & UnstyledProp\n > {}\n\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport interface FormFieldLabelSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport interface FormFieldInputSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport interface FormFieldDescriptionSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport interface FormFieldErrorSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport interface FormFieldPopoverSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n forwardRef,\n isValidElement,\n useEffect,\n useState,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField } from \"react-aria\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n (\n { isInvalid, isRequired, isDisabled, isReadOnly, children, ...props },\n ref\n ) => {\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = {\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n useFieldArgs.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n useFieldArgs[\"aria-label\"] = \"empty-label\";\n useFieldArgs[\"aria-labelledby\"] = \"empty-label\";\n }\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = {\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n\n return (\n <FormFieldContext.Provider value={{ context, setContext }}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"middle\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n }\n);\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.slots\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","columnLayout","rowLayout","formFieldRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardRef","isInvalid","isRequired","isDisabled","isReadOnly","children","props","ref","context","setContext","useState","useFieldArgs","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GCpCKC,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA,GAMfC,IAAY;AAAA;AAAA;AAAA;AAAA,GAULC,IAAkB,gBAAAC,EAAiB;AAAA,EAC9C,OAAO,CAAC,QAAQ,SAAS,SAAS,eAAe,SAAS,SAAS;AAAA;AAAA,EAEnE,WAAW;AAAA,EAEX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,cAAc;AAAA,MAEd,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,IAET,OAAO;AAAA,MACL,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,IAAA;AAAA,IAEd,OAAO;AAAA,MACL,UAAU;AAAA,IAAA;AAAA,IAEZ,aAAa;AAAA,MACX,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,IAAA;AAAA,IAEd,OAAO;AAAA,MACL,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,KAAK;AAAA,IAAA;AAAA,IAEP,SAAS;AAAA,MACP,qBAAqB;AAAA,MACrB,kBAAkB;AAAA,MAClB,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,cAAc;AAAA,MACd,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,WAAW;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AAA,EACnC,UAAAjC;AAAA,EACA,GAAGkC;AACL,MAAqC;AACnC,QAAM,EAAE,YAAA9B,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,aAAab;AAAA,MACb,sBAAAkC;AAAA,IAAA,EACA;AAAA,EACJ,GAAG,CAAClC,GAAUI,CAAU,CAAC,GAElB;AACT,GCfa+B,IAAiB,CAAC;AAAA,EAC7B,UAAAnC;AAAA,EACA,GAAGoC;AACL,MAA+B;AAC7B,QAAM,EAAE,YAAAhC,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,OAAOb;AAAA,MACP,gBAAAoC;AAAA,IAAA,EACA;AAAA,EACJ,GAAG,CAACpC,GAAUI,CAAU,CAAC,GAElB;AACT,GCTaiC,IAAmB,CAAC,EAAE,UAAArC,QAAsC;AACvE,QAAM,EAAE,YAAAI,EAAA,IAAe0B,EAAWnD,CAAgB;AAElD,SAAAiC,EAAU,MAAM;AACd,IAAAR,EAAW,CAACS,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAMb;AAAA,IAAA,EACN;AAAA,EACJ,GAAG,CAACA,GAAUI,CAAU,CAAC,GAElB;AACT,GCdakC,KAAY;AAAA,EACvB,MAAM5C;AAAA,EACN,OAAOkC;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
@@ -1,22 +0,0 @@
1
- import { forwardRef as c, useRef as l, isValidElement as a, cloneElement as m } from "react";
2
- import { mergeRefs as n } from "@chakra-ui/react";
3
- import { $ as s } from "./useObjectRef-CaJ5pgjX.es.js";
4
- import { $ as i } from "./mergeProps-B_9syxhT.es.js";
5
- import { $ } from "./useFocusable-CrsD8ZcF.es.js";
6
- const d = /* @__PURE__ */ c(function(e, f) {
7
- const r = l(null), o = s(n(r, f)), { focusableProps: t } = $(e, o);
8
- if (a(e.children))
9
- return m(
10
- e.children,
11
- i(
12
- t,
13
- e.children.props,
14
- { ref: o }
15
- )
16
- );
17
- });
18
- d.displayName = "MakeElementFocusable";
19
- export {
20
- d as M
21
- };
22
- //# sourceMappingURL=make-element-focusable-C4ZHUSEU.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"make-element-focusable-C4ZHUSEU.es.js","sources":["../../src/components/tooltip/make-element-focusable.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n useRef,\n type PropsWithChildren,\n isValidElement,\n} from \"react\";\nimport {\n mergeProps,\n useObjectRef,\n useFocusable,\n type FocusableOptions,\n} from \"react-aria\";\n\nimport { mergeRefs } from \"@chakra-ui/react\";\n\n/**\n * MakeElementFocusable\n * ============================================================\n * A helper component that adds props from `react-aria`s `useFocusable` hook\n * to its child so that it can be used as a trigger element for a `Tooltip`\n *\n * Caveats:\n * - Using non-interactive elements as tooltip triggers is against ARIA best-practices,\n * it is your responsibility to ensure that the underlying trigger element handles\n * focus and hover interactions correctly for keyboard-only users\n *\n * Features:\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLElement' attributes (including aria- & data-attributes)\n *\n * Further Context:\n * - [React Aria Components Tooltip Documentation](https://react-spectrum.adobe.com/react-aria/Tooltip.html)\n * - [React Aria Components Issue re:Tooltip with custom trigger](https://github.com/adobe/react-spectrum/issues/5733#issuecomment-1918691983)\n * - [ARIA Tooltip Pattern](https://www.w3.org/TR/wai-aria-1.2/#tooltip)\n */\nexport const MakeElementFocusable = forwardRef<\n HTMLElement,\n PropsWithChildren<FocusableOptions<HTMLElement>>\n>(function MakeElementFocusable(props, forwardedRef) {\n const localRef = useRef<HTMLElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const { focusableProps } = useFocusable(props, ref);\n if (isValidElement(props.children)) {\n return cloneElement(\n props.children,\n mergeProps(\n focusableProps,\n props.children.props as PropsWithChildren<\n FocusableOptions<HTMLElement>\n >,\n { ref: ref }\n )\n );\n }\n});\nMakeElementFocusable.displayName = \"MakeElementFocusable\";\n"],"names":["MakeElementFocusable","forwardRef","props","forwardedRef","localRef","useRef","ref","useObjectRef","mergeRefs","focusableProps","useFocusable","isValidElement","cloneElement","mergeProps"],"mappings":";;;;;AAoCO,MAAMA,IAAuB,gBAAAC,EAGlC,SAA8BC,GAAOC,GAAc;AACnD,QAAMC,IAAWC,EAAoB,IAAI,GACnCC,IAAMC,EAAaC,EAAUJ,GAAUD,CAAY,CAAC,GACpD,EAAE,gBAAAM,EAAA,IAAmBC,EAAaR,GAAOI,CAAG;AAClD,MAAIK,EAAeT,EAAM,QAAQ;AAC/B,WAAOU;AAAA,MACLV,EAAM;AAAA,MACNW;AAAAA,QACEJ;AAAA,QACAP,EAAM,SAAS;AAAA,QAGf,EAAE,KAAAI,EAAA;AAAA,MAAS;AAAA,IACb;AAGN,CAAC;AACDN,EAAqB,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("react"),o=require("@chakra-ui/react"),f=require("./useObjectRef-dXOJdONs.cjs.js"),a=require("./mergeProps-BA5Cwf5w.cjs.js"),u=require("./useFocusable-DCgmQxS1.cjs.js"),t=c.forwardRef(function(e,n){const s=c.useRef(null),r=f.$df56164dff5785e2$export$4338b53315abf666(o.mergeRefs(s,n)),{focusableProps:l}=u.$f645667febf57a63$export$4c014de7c8940b4c(e,r);if(c.isValidElement(e.children))return c.cloneElement(e.children,a.$3ef42575df84b30b$export$9d1611c77c2fe928(l,e.children.props,{ref:r}))});t.displayName="MakeElementFocusable";exports.MakeElementFocusable=t;
2
- //# sourceMappingURL=make-element-focusable-bPAMXt4D.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"make-element-focusable-bPAMXt4D.cjs.js","sources":["../../src/components/tooltip/make-element-focusable.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n useRef,\n type PropsWithChildren,\n isValidElement,\n} from \"react\";\nimport {\n mergeProps,\n useObjectRef,\n useFocusable,\n type FocusableOptions,\n} from \"react-aria\";\n\nimport { mergeRefs } from \"@chakra-ui/react\";\n\n/**\n * MakeElementFocusable\n * ============================================================\n * A helper component that adds props from `react-aria`s `useFocusable` hook\n * to its child so that it can be used as a trigger element for a `Tooltip`\n *\n * Caveats:\n * - Using non-interactive elements as tooltip triggers is against ARIA best-practices,\n * it is your responsibility to ensure that the underlying trigger element handles\n * focus and hover interactions correctly for keyboard-only users\n *\n * Features:\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLElement' attributes (including aria- & data-attributes)\n *\n * Further Context:\n * - [React Aria Components Tooltip Documentation](https://react-spectrum.adobe.com/react-aria/Tooltip.html)\n * - [React Aria Components Issue re:Tooltip with custom trigger](https://github.com/adobe/react-spectrum/issues/5733#issuecomment-1918691983)\n * - [ARIA Tooltip Pattern](https://www.w3.org/TR/wai-aria-1.2/#tooltip)\n */\nexport const MakeElementFocusable = forwardRef<\n HTMLElement,\n PropsWithChildren<FocusableOptions<HTMLElement>>\n>(function MakeElementFocusable(props, forwardedRef) {\n const localRef = useRef<HTMLElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const { focusableProps } = useFocusable(props, ref);\n if (isValidElement(props.children)) {\n return cloneElement(\n props.children,\n mergeProps(\n focusableProps,\n props.children.props as PropsWithChildren<\n FocusableOptions<HTMLElement>\n >,\n { ref: ref }\n )\n );\n }\n});\nMakeElementFocusable.displayName = \"MakeElementFocusable\";\n"],"names":["MakeElementFocusable","forwardRef","props","forwardedRef","localRef","useRef","ref","useObjectRef","mergeRefs","focusableProps","useFocusable","isValidElement","cloneElement","mergeProps"],"mappings":"sMAoCaA,EAAuBC,EAAAA,WAGlC,SAA8BC,EAAOC,EAAc,CACnD,MAAMC,EAAWC,EAAAA,OAAoB,IAAI,EACnCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUD,CAAY,CAAC,EACpD,CAAE,eAAAM,CAAA,EAAmBC,4CAAaR,EAAOI,CAAG,EAClD,GAAIK,EAAAA,eAAeT,EAAM,QAAQ,EAC/B,OAAOU,EAAAA,aACLV,EAAM,SACNW,EAAAA,0CACEJ,EACAP,EAAM,SAAS,MAGf,CAAE,IAAAI,CAAA,CAAS,CACb,CAGN,CAAC,EACDN,EAAqB,YAAc"}
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("react/jsx-runtime"),i=require("react"),T=require("@chakra-ui/react/styled-system"),z=require("@commercetools/nimbus-icons"),Y=require("./box-CWni3A32.cjs.js"),L=require("./Button-BtJHe9xY.cjs.js"),B=require("./Dialog-32GmWneq.cjs.js"),h=require("./utils-BHdR5Nww.cjs.js"),se=require("./FieldError-DyGFfqST.cjs.js"),de=require("./Form-BuOomA4T.cjs.js"),ce=require("./intlStrings-ClBuC6xN.cjs.js"),_=require("./Label-BgrYyYXn.cjs.js"),j=require("./ListBox-DW2g6DgQ.cjs.js"),N=require("./Text-BWSfeB9p.cjs.js"),ee=require("./Separator-DQ53Zxpp.cjs.js"),F=require("./mergeProps-BA5Cwf5w.cjs.js"),G=require("./filterDOMProps-WUskt27c.cjs.js"),te=require("./OverlayArrow-CYjyBtg8.cjs.js"),ue=require("./useLocalizedStringFormatter-sB0mFYtL.cjs.js"),le=require("./useFormValidation-BEaCuNx1.cjs.js"),fe=require("./useSingleSelectListState-BjYKH0pH.cjs.js"),be=require("./useFocusRing-CzFer4bD.cjs.js"),Z=require("./SelectionManager-CZSEfn4s.cjs.js"),$e=require("./useFocusVisible-Co0C61s7.cjs.js"),pe=require("./useCollator-YVJAe1GI.cjs.js"),ve=require("./useField-DmqO9k7a.cjs.js"),xe=require("./useFormReset--wPlnEOl.cjs.js"),me=require("./VisuallyHidden-Bv_AJXZ7.cjs.js"),oe=require("./index-DX8-EG6B.cjs.js"),he=require("./icon-button-0GLW7WtL.cjs.js"),ie=require("react-intl"),re=require("./extractStyleProps-CgqRiEwd.cjs.js"),V=require("@chakra-ui/react/flex"),ye=require("./Header-C0mOQKWH.cjs.js"),H=new WeakMap;function Se(e,t,n){let{keyboardDelegate:r,isDisabled:l,isRequired:d,name:u,form:a,validationBehavior:c="aria"}=e,p=pe.$325a3faab7a68acd$export$a16aca283550c30d({usage:"search",sensitivity:"base"}),o=i.useMemo(()=>r||new Z.$2a25aae57d74318e$export$a05409b8bb224a5a(t.collection,t.disabledKeys,n,p),[r,t.collection,t.disabledKeys,p,n]),{menuTriggerProps:v,menuProps:$}=B.$168583247155ddda$export$dc9c12ed27dd1b49({isDisabled:l,type:"listbox"},t,n),f=b=>{switch(b.key){case"ArrowLeft":{var S,g;b.preventDefault();let D=t.selectedKey!=null?(S=o.getKeyAbove)===null||S===void 0?void 0:S.call(o,t.selectedKey):(g=o.getFirstKey)===null||g===void 0?void 0:g.call(o);D&&t.setSelectedKey(D);break}case"ArrowRight":{var M,k;b.preventDefault();let D=t.selectedKey!=null?(M=o.getKeyBelow)===null||M===void 0?void 0:M.call(o,t.selectedKey):(k=o.getFirstKey)===null||k===void 0?void 0:k.call(o);D&&t.setSelectedKey(D);break}}},{typeSelectProps:x}=Z.$fb3050f43d946246$export$e32c88dfddc6e1d8({keyboardDelegate:o,selectionManager:t.selectionManager,onTypeSelect(b){t.setSelectedKey(b)}}),{isInvalid:R,validationErrors:C,validationDetails:K}=t.displayValidation,{labelProps:O,fieldProps:q,descriptionProps:y,errorMessageProps:w}=ve.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,labelElementType:"span",isInvalid:R,errorMessage:e.errorMessage||C});x.onKeyDown=x.onKeyDownCapture,delete x.onKeyDownCapture;let E=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0}),m=F.$3ef42575df84b30b$export$9d1611c77c2fe928(x,v,q),I=F.$bdb11010cef70236$export$f680877a34711e37();return H.set(t,{isDisabled:l,isRequired:d,name:u,form:a,validationBehavior:c}),{labelProps:{...O,onClick:()=>{if(!e.isDisabled){var b;(b=n.current)===null||b===void 0||b.focus(),$e.$507fabe10e71c6fb$export$8397ddfc504fdb9a("keyboard")}}},triggerProps:F.$3ef42575df84b30b$export$9d1611c77c2fe928(E,{...m,isDisabled:l,onKeyDown:F.$ff5963eb1fccf552$export$e08e3b67e392101e(m.onKeyDown,f,e.onKeyDown),onKeyUp:e.onKeyUp,"aria-labelledby":[I,m["aria-labelledby"],m["aria-label"]&&!m["aria-labelledby"]?m.id:null].filter(Boolean).join(" "),onFocus(b){t.isFocused||(e.onFocus&&e.onFocus(b),e.onFocusChange&&e.onFocusChange(!0),t.setFocused(!0))},onBlur(b){t.isOpen||(e.onBlur&&e.onBlur(b),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))}}),valueProps:{id:I},menuProps:{...$,autoFocus:t.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:b=>{b.currentTarget.contains(b.relatedTarget)||(e.onBlur&&e.onBlur(b),e.onFocusChange&&e.onFocusChange(!1),t.setFocused(!1))},"aria-labelledby":[q["aria-labelledby"],m["aria-label"]&&!q["aria-labelledby"]?m.id:null].filter(Boolean).join(" ")},descriptionProps:y,errorMessageProps:w,isInvalid:R,validationErrors:C,validationDetails:K,hiddenSelectProps:{isDisabled:l,name:u,label:e.label,state:t,triggerRef:n,form:a}}}function ge(e,t,n){let r=H.get(t)||{},{autoComplete:l,name:d=r.name,form:u=r.form,isDisabled:a=r.isDisabled}=e,{validationBehavior:c,isRequired:p}=r,{visuallyHiddenProps:o}=me.$5c3e21d68f1c4674$export$a966af930f325cab({style:{position:"fixed",top:0,left:0}});xe.$99facab73266f662$export$5add1d006293d136(e.selectRef,t.defaultSelectedKey,t.setSelectedKey),le.$e93e671b31057976$export$b8473d3665f3a75a({validationBehavior:c,focus:()=>{var f;return(f=n.current)===null||f===void 0?void 0:f.focus()}},t,e.selectRef);let v=i.useCallback(f=>t.setSelectedKey(f.currentTarget.value),[t.setSelectedKey]);var $;return{containerProps:{...o,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:l,disabled:a,required:c==="native"&&p,name:d,form:u,value:($=t.selectedKey)!==null&&$!==void 0?$:"",onChange:v,onInput:v}}}function Pe(e){let{state:t,triggerRef:n,label:r,name:l,form:d,isDisabled:u}=e,a=i.useRef(null),c=i.useRef(null),{containerProps:p,selectProps:o}=ge({...e,selectRef:t.collection.size<=300?a:c},t,n);if(t.collection.size<=300)return i.createElement("div",{...p,"data-testid":"hidden-select-container"},i.createElement("label",null,r,i.createElement("select",{...o,ref:a},i.createElement("option",null),[...t.collection.getKeys()].map($=>{let f=t.collection.getItem($);if(f&&f.type==="item")return i.createElement("option",{key:f.key,value:f.key},f.textValue)}))));if(l){let $=H.get(t)||{},{validationBehavior:f}=$;var v;let x={type:"hidden",autoComplete:o.autoComplete,name:l,form:d,disabled:u,value:(v=t.selectedKey)!==null&&v!==void 0?v:""};return f==="native"?i.createElement("input",{...x,ref:c,style:{display:"none"},type:"text",required:o.required,onChange:()=>{}}):i.createElement("input",{...x,ref:c})}return null}function Re(e){let t=te.$fc909762b330b746$export$61c6a8c84e605fb6(e),[n,r]=i.useState(null),l=fe.$a0d645289fe9b86b$export$e7f05e985daf4b5f({...e,onSelectionChange:o=>{e.onSelectionChange!=null&&e.onSelectionChange(o),t.close(),d.commitValidation()}}),d=le.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:l.selectedKey}),[u,a]=i.useState(!1),[c]=i.useState(l.selectedKey);var p;return{...d,...l,...t,defaultSelectedKey:(p=e.defaultSelectedKey)!==null&&p!==void 0?p:c,focusStrategy:n,open(o=null){l.collection.size!==0&&(r(o),t.open())},toggle(o=null){l.collection.size!==0&&(r(o),t.toggle())},isFocused:u,setFocused:a}}function Ce(e){return e&&e.__esModule?e.default:e}const W=i.createContext(null),A=i.createContext(null),qe=i.forwardRef(function(t,n){[t,n]=h.$64fa3d84918910a7$export$29f1550f4b0d4415(t,n,W);let{children:r,isDisabled:l=!1,isInvalid:d=!1,isRequired:u=!1}=t,a=i.useMemo(()=>typeof r=="function"?r({isOpen:!1,isDisabled:l,isInvalid:d,isRequired:u,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):r,[r,l,d,u]);return i.createElement(ee.$e1995378a142960e$export$bf788dd355e3a401,{content:a},c=>i.createElement(Fe,{props:t,collection:c,selectRef:n}))}),De=[_.$01b77f81d0f07f68$export$75b6ee27786ba447,L.$d2b4bc8c273e7be6$export$24d547caef80ccd1,N.$514c0188e459b4c0$export$9afb8bc826b033ea];function Fe({props:e,selectRef:t,collection:n}){let{validationBehavior:r}=h.$64fa3d84918910a7$export$fabf2dc03a41866e(de.$d3e0e05bdfcf66bd$export$c24727297075ec6a)||{};var l,d;let u=(d=(l=e.validationBehavior)!==null&&l!==void 0?l:r)!==null&&d!==void 0?d:"native",a=Re({...e,collection:n,children:void 0,validationBehavior:u}),{isFocusVisible:c,focusProps:p}=be.$f7dceffc5ad7768b$export$4e328f61c538687f({within:!0}),o=i.useRef(null),[v,$]=h.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:f,triggerProps:x,valueProps:R,menuProps:C,descriptionProps:K,errorMessageProps:O,hiddenSelectProps:q,...y}=Se({...h.$64fa3d84918910a7$export$ef03459518577ad4(e),label:$,validationBehavior:u},a,o),[w,E]=i.useState(null),m=i.useCallback(()=>{o.current&&E(o.current.offsetWidth+"px")},[o]);te.$9daab02d461809db$export$683480f191c0e3ea({ref:o,onResize:m});let I=i.useMemo(()=>({isOpen:a.isOpen,isFocused:a.isFocused,isFocusVisible:c,isDisabled:e.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:e.isRequired||!1}),[a.isOpen,a.isFocused,c,e.isDisabled,y.isInvalid,e.isRequired]),b=h.$64fa3d84918910a7$export$4d86445c2cf5e3({...e,values:I,defaultClassName:"react-aria-Select"}),S=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{global:!0});delete S.id;let g=i.useRef(null);return i.createElement(h.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[W,e],[A,a],[ae,R],[_.$01b77f81d0f07f68$export$75b6ee27786ba447,{...f,ref:v,elementType:"span"}],[L.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...x,ref:o,isPressed:a.isOpen,autoFocus:e.autoFocus}],[B.$de32f1b87079253c$export$d2f961adcb0afbe,a],[B.$07b14b47974efb58$export$9b9a0cd73afb7ca4,{trigger:"Select",triggerRef:o,scrollRef:g,placement:"bottom start",style:{"--trigger-width":w},"aria-labelledby":C["aria-labelledby"],clearContexts:De}],[j.$eed445e0843c11d0$export$7ff8f37d2d81a48d,{...C,ref:g}],[j.$eed445e0843c11d0$export$7c5906fe4f1f2af2,a],[N.$514c0188e459b4c0$export$9afb8bc826b033ea,{slots:{description:K,errorMessage:O}}],[se.$ee014567cb39d3f0$export$ff05c3ac10437e03,y]]},i.createElement("div",{...F.$3ef42575df84b30b$export$9d1611c77c2fe928(S,b,p),ref:t,slot:e.slot||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":c||void 0,"data-open":a.isOpen||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":y.isInvalid||void 0,"data-required":e.isRequired||void 0},b.children,i.createElement(Pe,{...q,autoComplete:e.autoComplete})))}const ae=i.createContext(null),Be=i.forwardRef(function(t,n){var r,l;[t,n]=h.$64fa3d84918910a7$export$29f1550f4b0d4415(t,n,ae);let d=i.useContext(A),{placeholder:u}=h.$64fa3d84918910a7$export$fabf2dc03a41866e(W),a=d.selectedKey!=null?d.collection.getItem(d.selectedKey):null,c=a?.props.children;typeof c=="function"&&(c=c({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"}));let p=ue.$fca6afa0e843324b$export$f12b703ca79dfbb1(Ce(ce.$df39c1238ae2b5f3$exports),"react-aria-components");var o,v,$;let f=h.$64fa3d84918910a7$export$4d86445c2cf5e3({...t,defaultChildren:(o=c??u)!==null&&o!==void 0?o:p.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:(v=(r=d.selectedItem)===null||r===void 0?void 0:r.value)!==null&&v!==void 0?v:null,selectedText:($=(l=d.selectedItem)===null||l===void 0?void 0:l.textValue)!==null&&$!==void 0?$:null,isPlaceholder:!a}}),x=G.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(t,{global:!0});return i.createElement("span",{ref:n,...x,...f,"data-placeholder":!a||void 0},i.createElement(N.$514c0188e459b4c0$export$9afb8bc826b033ea.Provider,{value:void 0},f.children))}),{withProvider:je,withContext:P}=T.createSlotRecipeContext({recipe:oe.selectSlotRecipe}),Ie=je("div","root"),Ke=P("div","leadingElement"),Oe=P("button","trigger"),we=P("span","triggerLabel"),Ee=P("div","options"),Me=P("div","option"),ke=P("div","optionGroup"),Ve=ie.defineMessages({clearSelection:{id:"Nimbus.Select.clearSelection",description:"aria-label for select clear button",defaultMessage:"Clear selection"}}),ne=()=>{const e=i.useContext(A),t=ie.useIntl();if(!e?.selectedKey)return null;const n=()=>{e?.setSelectedKey(null)};return s.jsx(B.$f1ab8c75478c6f73$export$cf75428e0b9ed1ea,{children:s.jsx(he.IconButton,{pointerEvents:"all",size:"2xs",variant:"ghost","aria-label":t.formatMessage(Ve.clearSelection),"aria-labelledby":"",onPress:n,children:s.jsx(z.Close,{})})})};ne.displayName="Select.ClearButton";const U=i.forwardRef(({children:e,leadingElement:t,isLoading:n,isDisabled:r,isClearable:l=!0,...d},u)=>{const a=T.useSlotRecipe({recipe:oe.selectSlotRecipe}),[c,p]=a.splitVariantProps(d),[o,v]=re.extractStyleProps(p),$={...v,isDisabled:n||r};return s.jsx(Ie,{asChild:!0,ref:u,...c,...o,children:s.jsxs(qe,{...$,children:[s.jsxs(T.chakra.div,{position:"relative",children:[s.jsx(Oe,{zIndex:0,asChild:!0,children:s.jsxs(L.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{children:[t&&s.jsx(Ke,{asChild:!0,children:t}),s.jsx(we,{asChild:!0,children:s.jsx(Be,{})})]})}),s.jsxs(V.Flex,{position:"absolute",top:"0",bottom:"0",zIndex:1,right:"400",pointerEvents:"none",children:[l&&s.jsx(V.Flex,{width:"600",my:"auto",children:s.jsx(ne,{})}),s.jsx(V.Flex,{my:"auto",w:"600",h:"600",pointerEvents:"none",children:s.jsx(Y.Box,{color:"neutral.9",asChild:!0,m:"auto",w:"400",h:"400",children:n?s.jsx(Y.Box,{asChild:!0,animation:"spin",animationDuration:"slowest",children:s.jsx(z.Loop,{})}):s.jsx(z.KeyboardArrowDown,{})})})]})]}),s.jsx(B.$07b14b47974efb58$export$5b6b19405a83ff9d,{children:e})]})})});U.displayName="Select.Root";const X=e=>{const{ref:t,...n}=e,[r,l]=re.extractStyleProps(n);return s.jsx(Ee,{asChild:!0,...r,children:s.jsx(j.$eed445e0843c11d0$export$41f133550aa26f48,{ref:t,...l})})};X.displayName="Select.Options";const J=({ref:e,...t})=>s.jsx(Me,{asChild:!0,ref:e,children:s.jsx(j.$eed445e0843c11d0$export$a11e76429ed99b4,{...t})});J.displayName="Select.Option";const Q=e=>{const{ref:t,label:n,items:r,children:l,...d}=e;if(r&&typeof l!="function")throw new Error('SelectOptionGroup: When "items" is provided, "children" must be a function');return s.jsxs(j.$eed445e0843c11d0$export$dca12b0bb56e4fc,{ref:t,...d,children:[s.jsx(ke,{asChild:!0,children:s.jsx(ye.$72a5793c14baf454$export$8b251419efc915eb,{children:n})}),r?s.jsx(ee.$e1995378a142960e$export$fb8073518f34e6ec,{items:r,children:u=>typeof l=="function"?l(u):null}):l]})};Q.displayName="Select.OptionGroup";const Te={Root:U,Options:X,Option:J,OptionGroup:Q};exports.Select=Te;exports.SelectOption=J;exports.SelectOptionGroup=Q;exports.SelectOptions=X;exports.SelectRoot=U;
2
- //# sourceMappingURL=select-C1SC1XAp.cjs.js.map