@traefik-labs/faency 13.7.2 → 13.9.0

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 (60) hide show
  1. package/dist/components/Accordion/Accordion.vanilla.cjs +86 -0
  2. package/dist/components/Accordion/Accordion.vanilla.cjs.map +1 -0
  3. package/dist/components/Accordion/Accordion.vanilla.css.cjs +59 -0
  4. package/dist/components/Accordion/Accordion.vanilla.css.cjs.map +1 -0
  5. package/dist/components/Accordion/Accordion.vanilla.css.js +51 -0
  6. package/dist/components/Accordion/Accordion.vanilla.css.js.map +1 -0
  7. package/dist/components/Accordion/Accordion.vanilla.js +79 -0
  8. package/dist/components/Accordion/Accordion.vanilla.js.map +1 -0
  9. package/dist/components/Checkbox/Checkbox.vanilla.cjs +49 -0
  10. package/dist/components/Checkbox/Checkbox.vanilla.cjs.map +1 -0
  11. package/dist/components/Checkbox/Checkbox.vanilla.css.cjs +21 -0
  12. package/dist/components/Checkbox/Checkbox.vanilla.css.cjs.map +1 -0
  13. package/dist/components/Checkbox/Checkbox.vanilla.css.js +18 -0
  14. package/dist/components/Checkbox/Checkbox.vanilla.css.js.map +1 -0
  15. package/dist/components/Checkbox/Checkbox.vanilla.js +46 -0
  16. package/dist/components/Checkbox/Checkbox.vanilla.js.map +1 -0
  17. package/dist/components/Field/FieldContext.cjs +1 -1
  18. package/dist/components/Field/FieldContext.cjs.map +1 -1
  19. package/dist/components/Field/FieldContext.js +1 -1
  20. package/dist/components/Field/FieldContext.js.map +1 -1
  21. package/dist/components/Radio/Radio.vanilla.cjs +50 -0
  22. package/dist/components/Radio/Radio.vanilla.cjs.map +1 -0
  23. package/dist/components/Radio/Radio.vanilla.css.cjs +19 -0
  24. package/dist/components/Radio/Radio.vanilla.css.cjs.map +1 -0
  25. package/dist/components/Radio/Radio.vanilla.css.js +17 -0
  26. package/dist/components/Radio/Radio.vanilla.css.js.map +1 -0
  27. package/dist/components/Radio/Radio.vanilla.js +46 -0
  28. package/dist/components/Radio/Radio.vanilla.js.map +1 -0
  29. package/dist/components/RadioAccordion/RadioAccordion.vanilla.cjs +44 -0
  30. package/dist/components/RadioAccordion/RadioAccordion.vanilla.cjs.map +1 -0
  31. package/dist/components/RadioAccordion/RadioAccordion.vanilla.css.cjs +11 -0
  32. package/dist/components/RadioAccordion/RadioAccordion.vanilla.css.cjs.map +1 -0
  33. package/dist/components/RadioAccordion/RadioAccordion.vanilla.css.js +9 -0
  34. package/dist/components/RadioAccordion/RadioAccordion.vanilla.css.js.map +1 -0
  35. package/dist/components/RadioAccordion/RadioAccordion.vanilla.js +39 -0
  36. package/dist/components/RadioAccordion/RadioAccordion.vanilla.js.map +1 -0
  37. package/dist/components/Select/Select.vanilla.cjs +136 -0
  38. package/dist/components/Select/Select.vanilla.cjs.map +1 -0
  39. package/dist/components/Select/Select.vanilla.css.cjs +69 -0
  40. package/dist/components/Select/Select.vanilla.css.cjs.map +1 -0
  41. package/dist/components/Select/Select.vanilla.css.js +58 -0
  42. package/dist/components/Select/Select.vanilla.css.js.map +1 -0
  43. package/dist/components/Select/Select.vanilla.js +129 -0
  44. package/dist/components/Select/Select.vanilla.js.map +1 -0
  45. package/dist/components/Switch/Switch.vanilla.cjs +70 -0
  46. package/dist/components/Switch/Switch.vanilla.cjs.map +1 -0
  47. package/dist/components/Switch/Switch.vanilla.css.cjs +17 -0
  48. package/dist/components/Switch/Switch.vanilla.css.cjs.map +1 -0
  49. package/dist/components/Switch/Switch.vanilla.css.js +17 -0
  50. package/dist/components/Switch/Switch.vanilla.css.js.map +1 -0
  51. package/dist/components/Switch/Switch.vanilla.js +68 -0
  52. package/dist/components/Switch/Switch.vanilla.js.map +1 -0
  53. package/dist/faency.css +3683 -2541
  54. package/dist/index.cjs +23 -0
  55. package/dist/index.d.cts +355 -0
  56. package/dist/index.d.ts +355 -0
  57. package/dist/index.js +7 -1
  58. package/dist/styles/tokens.css.cjs +170 -133
  59. package/dist/styles/tokens.css.js +170 -133
  60. package/package.json +11 -10
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.js","names":[],"sources":["../../../components/Field/FieldContext.ts"],"sourcesContent":["import React from 'react';\n\nimport { warnOnce } from '../../utils/warnOnce';\n\ntype MessageSize = '0' | '1' | '2' | '3';\n\ntype FieldControlState = { id?: string; disabled: boolean; invalid: boolean; labelable: boolean };\n\nexport type FieldContextValue = {\n controlId?: string;\n labelId?: string;\n descriptionId?: string;\n errorId?: string;\n hintId?: string;\n messageSize: MessageSize;\n invalid: boolean;\n disabled: boolean;\n registerControl: (key: string, state: FieldControlState | null) => void;\n};\n\nexport const FieldContext = React.createContext<FieldContextValue | null>(null);\n\nexport const useFieldContext = () => React.useContext(FieldContext);\n\nexport type FieldControlOptions = {\n id?: string;\n invalid?: boolean;\n disabled?: boolean;\n 'aria-describedby'?: string;\n 'aria-invalid'?: React.AriaAttributes['aria-invalid'];\n /** Set to false when the control is not a labelable element, such as a radio group. */\n labelable?: boolean;\n};\n\nexport type FieldLabelVariant = 'invalid' | 'subtle' | 'contrast' | 'default';\n\nexport type FieldLabelProps = {\n variant: FieldLabelVariant;\n htmlFor?: string;\n id: string;\n};\n\nexport type FieldBaseProps = {\n id?: string;\n label?: React.ReactNode | ((props: FieldLabelProps) => React.ReactNode);\n /** Text under the label, for what the field is for. */\n hint?: React.ReactNode;\n description?: React.ReactNode;\n error?: React.ReactNode;\n invalid?: boolean;\n disabled?: boolean;\n announceError?: boolean;\n /** `start` puts the label and the hint in a column before the control, and wraps under it when space is short. */\n labelPosition?: 'top' | 'start' | 'end';\n /** The text size of the hint, the description and the error. A Field inside another Field takes its size. */\n messageSize?: MessageSize;\n /**\n * For a field of more than one control: the field becomes a group named by the label and described by\n * the hint, the description and the error. Give each control its own name, and its own error with an inner Field.\n */\n group?: boolean;\n children?: React.ReactNode;\n};\n\nconst hasContent = (node: React.ReactNode) =>\n node !== undefined && node !== null && node !== false && node !== '';\n\nconst noop = () => {};\n\nconst MULTIPLE_CONTROLS_WARNING =\n 'Field: more than one control is in this Field, and its label points to one of them only. Use group, or one Field per control.';\n\nexport const useFieldRoot = ({\n id,\n label,\n hint,\n description,\n error,\n invalid,\n disabled,\n messageSize,\n group = false,\n}: FieldBaseProps) => {\n const outerContext = useFieldContext();\n const generatedId = React.useId();\n const hasLabel = typeof label === 'function' || hasContent(label);\n const hasHint = hasContent(hint);\n const resolvedMessageSize = messageSize ?? outerContext?.messageSize ?? '0';\n const hasDescription = hasContent(description);\n const hasError = hasContent(error);\n const isInvalid = Boolean(invalid) || hasError;\n const isDisabled = Boolean(disabled) || Boolean(outerContext?.disabled);\n\n const [control, setControl] = React.useState<FieldControlState | null>(null);\n const controlsRef = React.useRef(new Map<string, FieldControlState>());\n const registerControl = React.useCallback((key: string, state: FieldControlState | null) => {\n const controls = controlsRef.current;\n if (state) {\n controls.set(key, state);\n } else {\n controls.delete(key);\n }\n if (controls.size > 1) {\n warnOnce(MULTIPLE_CONTROLS_WARNING);\n }\n const next = controls.values().next().value ?? null;\n setControl((prev) =>\n prev?.id === next?.id &&\n prev?.disabled === next?.disabled &&\n prev?.invalid === next?.invalid &&\n prev?.labelable === next?.labelable\n ? prev\n : next,\n );\n }, []);\n const controlId = control?.id ?? id ?? (hasLabel ? `${generatedId}-control` : undefined);\n // The label points to a control only once one is there, so it never points to a missing id.\n const labelFor = group\n ? undefined\n : control\n ? control.labelable === false\n ? undefined\n : controlId\n : id;\n\n const [hasFocus, setHasFocus] = React.useState(false);\n const onFocus = React.useCallback(() => setHasFocus(true), []);\n const onBlur = React.useCallback(() => setHasFocus(false), []);\n\n const labelVariant: FieldLabelVariant = React.useMemo(() => {\n if (isDisabled || control?.disabled) {\n return 'subtle';\n }\n if (isInvalid || control?.invalid) {\n return 'invalid';\n }\n if (hasFocus) {\n return 'contrast';\n }\n return 'default';\n }, [isDisabled, isInvalid, hasFocus, control?.disabled, control?.invalid]);\n\n const ownContext: FieldContextValue = React.useMemo(\n () => ({\n controlId,\n labelId: hasLabel ? `${generatedId}-label` : undefined,\n descriptionId: hasDescription ? `${generatedId}-description` : undefined,\n errorId: hasError ? `${generatedId}-error` : undefined,\n hintId: hasHint ? `${generatedId}-hint` : undefined,\n messageSize: resolvedMessageSize,\n invalid: isInvalid,\n disabled: isDisabled,\n registerControl,\n }),\n [\n controlId,\n generatedId,\n hasLabel,\n hasDescription,\n hasError,\n hasHint,\n resolvedMessageSize,\n isInvalid,\n isDisabled,\n registerControl,\n ],\n );\n\n // The controls of a group get only its disabled state: the group itself carries the name and the messages.\n const groupContext: FieldContextValue = React.useMemo(\n () => ({\n messageSize: resolvedMessageSize,\n invalid: false,\n disabled: isDisabled,\n registerControl: noop,\n }),\n [resolvedMessageSize, isDisabled],\n );\n\n const groupProps = group\n ? {\n role: 'group',\n 'aria-labelledby': ownContext.labelId,\n 'aria-describedby':\n [ownContext.errorId, ownContext.descriptionId, ownContext.hintId]\n .filter(Boolean)\n .join(' ') || undefined,\n }\n : {};\n\n // A Field with no label, hint, description or error inside another Field keeps the outer one.\n const context = group\n ? groupContext\n : outerContext && !hasLabel && !hasHint && !hasDescription && !hasError\n ? outerContext\n : ownContext;\n\n return {\n context,\n ids: ownContext,\n groupProps,\n messageSize: resolvedMessageSize,\n labelFor,\n labelVariant,\n hasLabel,\n hasHint,\n hasDescription,\n hasError,\n onFocus,\n onBlur,\n };\n};\n\n/**\n * Gives a form control the id, `aria-describedby`, `aria-invalid` and `disabled` of the `Field` around it,\n * and gives its own id, `disabled` and invalid state to that `Field`.\n * Outside a `Field`, it only sets `aria-invalid` from `invalid`.\n */\nexport const useFieldControl = ({\n id,\n invalid,\n disabled,\n 'aria-describedby': describedBy,\n 'aria-invalid': ariaInvalid,\n labelable = true,\n}: FieldControlOptions) => {\n const field = useFieldContext();\n const registrationId = React.useId();\n const ownInvalid = Boolean(invalid || ariaInvalid === true || ariaInvalid === 'true');\n const isInvalid = ownInvalid || Boolean(field?.invalid);\n const registerControl = field?.registerControl;\n\n React.useEffect(() => {\n if (!registerControl) {\n return undefined;\n }\n registerControl(registrationId, {\n id,\n disabled: Boolean(disabled),\n invalid: ownInvalid,\n labelable,\n });\n return () => registerControl(registrationId, null);\n }, [registerControl, registrationId, id, disabled, ownInvalid, labelable]);\n const describedByIds =\n [field?.errorId, field?.descriptionId, field?.hintId, describedBy].filter(Boolean).join(' ') ||\n undefined;\n\n return {\n id: id ?? field?.controlId,\n labelId: field?.labelId,\n invalid: isInvalid,\n disabled: disabled || field?.disabled || undefined,\n 'aria-describedby': describedByIds,\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n };\n};\n\nconst ANNOUNCE_DELAY = 1000;\n\n/**\n * Returns the text of the error, after the text of the label when there is one, once it has not\n * changed for a short time, so that a screen reader reads it after the echo of the typed text.\n */\nexport const useAnnouncedError = (enabled: boolean, errorId?: string, labelId?: string) => {\n const [announcedError, setAnnouncedError] = React.useState<string | null>(null);\n const lastTextRef = React.useRef<string | null | undefined>(undefined);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>();\n\n // Compares the rendered text, so that a new JSX error with the same text does not restart the delay.\n React.useEffect(() => {\n const text =\n (enabled && errorId && document.getElementById(errorId)?.textContent?.trim()) || null;\n if (text === lastTextRef.current) {\n return;\n }\n lastTextRef.current = text;\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => {\n const fieldName = labelId\n ? document.getElementById(labelId)?.textContent?.trim()\n : undefined;\n setAnnouncedError(text !== null && fieldName ? `${fieldName}: ${text}` : text);\n },\n text === null ? 0 : ANNOUNCE_DELAY,\n );\n });\n\n React.useEffect(\n () => () => {\n clearTimeout(timeoutRef.current);\n lastTextRef.current = undefined;\n },\n [],\n );\n\n return announcedError;\n};\n"],"mappings":";;;AAoBA,IAAa,eAAe,MAAM,cAAwC,IAAI;AAE9E,IAAa,wBAAwB,MAAM,WAAW,YAAY;AA0ClE,IAAM,cAAc,SAClB,SAAS,KAAA,KAAa,SAAS,QAAQ,SAAS,SAAS,SAAS;AAEpE,IAAM,aAAa,CAAC;A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CACH;CAEA,OAAO;AACT"}
1
+ {"version":3,"file":"FieldContext.js","names":[],"sources":["../../../components/Field/FieldContext.ts"],"sourcesContent":["import React from 'react';\n\nimport { warnOnce } from '../../utils/warnOnce';\n\ntype MessageSize = '0' | '1' | '2' | '3';\n\ntype FieldControlState = { id?: string; disabled: boolean; invalid: boolean; labelable: boolean };\n\nexport type FieldContextValue = {\n controlId?: string;\n labelId?: string;\n descriptionId?: string;\n errorId?: string;\n hintId?: string;\n messageSize: MessageSize;\n invalid: boolean;\n disabled: boolean;\n registerControl: (key: string, state: FieldControlState | null) => void;\n};\n\nexport const FieldContext = React.createContext<FieldContextValue | null>(null);\n\nexport const useFieldContext = () => React.useContext(FieldContext);\n\nexport type FieldControlOptions = {\n id?: string;\n invalid?: boolean;\n disabled?: boolean;\n 'aria-describedby'?: string;\n 'aria-invalid'?: React.AriaAttributes['aria-invalid'];\n /** Set to false when the control is not a labelable element, such as a radio group. */\n labelable?: boolean;\n};\n\nexport type FieldLabelVariant = 'invalid' | 'subtle' | 'contrast' | 'default';\n\nexport type FieldLabelProps = {\n variant: FieldLabelVariant;\n htmlFor?: string;\n id: string;\n};\n\nexport type FieldBaseProps = {\n id?: string;\n label?: React.ReactNode | ((props: FieldLabelProps) => React.ReactNode);\n /** Text under the label, for what the field is for. */\n hint?: React.ReactNode;\n description?: React.ReactNode;\n error?: React.ReactNode;\n invalid?: boolean;\n disabled?: boolean;\n announceError?: boolean;\n /** `start` puts the label and the hint in a column before the control, and wraps under it when space is short. */\n labelPosition?: 'top' | 'start' | 'end';\n /** The text size of the hint, the description and the error. A Field inside another Field takes its size. */\n messageSize?: MessageSize;\n /**\n * For a field of more than one control: the field becomes a group named by the label and described by\n * the hint, the description and the error. Give each control its own name, and its own error with an inner Field.\n */\n group?: boolean;\n children?: React.ReactNode;\n};\n\nconst hasContent = (node: React.ReactNode) =>\n node !== undefined && node !== null && node !== false && node !== '';\n\nconst noop = () => {};\n\nconst MULTIPLE_CONTROLS_WARNING =\n 'Field: more than one control is in this Field, and its label points to one of them only. Use group, or one Field per control.';\n\nexport const useFieldRoot = ({\n id,\n label,\n hint,\n description,\n error,\n invalid,\n disabled,\n messageSize,\n group = false,\n}: FieldBaseProps) => {\n const outerContext = useFieldContext();\n const generatedId = React.useId();\n const hasLabel = typeof label === 'function' || hasContent(label);\n const hasHint = hasContent(hint);\n const resolvedMessageSize = messageSize ?? outerContext?.messageSize ?? '0';\n const hasDescription = hasContent(description);\n const hasError = hasContent(error);\n const isInvalid = Boolean(invalid) || hasError;\n const isDisabled = Boolean(disabled) || Boolean(outerContext?.disabled);\n\n const [control, setControl] = React.useState<FieldControlState | null>(null);\n const controlsRef = React.useRef(new Map<string, FieldControlState>());\n const registerControl = React.useCallback((key: string, state: FieldControlState | null) => {\n const controls = controlsRef.current;\n if (state) {\n controls.set(key, state);\n } else {\n controls.delete(key);\n }\n if (controls.size > 1) {\n warnOnce(MULTIPLE_CONTROLS_WARNING);\n }\n const next = controls.values().next().value ?? null;\n setControl((prev) =>\n prev?.id === next?.id &&\n prev?.disabled === next?.disabled &&\n prev?.invalid === next?.invalid &&\n prev?.labelable === next?.labelable\n ? prev\n : next,\n );\n }, []);\n const controlId = control?.id ?? id ?? (hasLabel ? `${generatedId}-control` : undefined);\n // The label points to a control only once one is there, so it never points to a missing id.\n const labelFor = group\n ? undefined\n : control\n ? control.labelable === false\n ? undefined\n : controlId\n : id;\n\n const [hasFocus, setHasFocus] = React.useState(false);\n const onFocus = React.useCallback(() => setHasFocus(true), []);\n const onBlur = React.useCallback(() => setHasFocus(false), []);\n\n const labelVariant: FieldLabelVariant = React.useMemo(() => {\n if (isDisabled || control?.disabled) {\n return 'subtle';\n }\n if (isInvalid || control?.invalid) {\n return 'invalid';\n }\n if (hasFocus) {\n return 'contrast';\n }\n return 'default';\n }, [isDisabled, isInvalid, hasFocus, control?.disabled, control?.invalid]);\n\n const ownContext: FieldContextValue = React.useMemo(\n () => ({\n controlId,\n labelId: hasLabel ? `${generatedId}-label` : undefined,\n descriptionId: hasDescription ? `${generatedId}-description` : undefined,\n errorId: hasError ? `${generatedId}-error` : undefined,\n hintId: hasHint ? `${generatedId}-hint` : undefined,\n messageSize: resolvedMessageSize,\n invalid: isInvalid,\n disabled: isDisabled,\n registerControl,\n }),\n [\n controlId,\n generatedId,\n hasLabel,\n hasDescription,\n hasError,\n hasHint,\n resolvedMessageSize,\n isInvalid,\n isDisabled,\n registerControl,\n ],\n );\n\n // The controls of a group get only its disabled state: the group itself carries the name and the messages.\n const groupContext: FieldContextValue = React.useMemo(\n () => ({\n messageSize: resolvedMessageSize,\n invalid: false,\n disabled: isDisabled,\n registerControl: noop,\n }),\n [resolvedMessageSize, isDisabled],\n );\n\n const groupProps = group\n ? {\n role: 'group',\n 'aria-labelledby': ownContext.labelId,\n 'aria-describedby':\n [ownContext.errorId, ownContext.descriptionId, ownContext.hintId]\n .filter(Boolean)\n .join(' ') || undefined,\n }\n : {};\n\n // A Field with no label, hint, description or error inside another Field keeps the outer one.\n const context = group\n ? groupContext\n : outerContext && !hasLabel && !hasHint && !hasDescription && !hasError\n ? outerContext\n : ownContext;\n\n return {\n context,\n ids: ownContext,\n groupProps,\n messageSize: resolvedMessageSize,\n labelFor,\n labelVariant,\n hasLabel,\n hasHint,\n hasDescription,\n hasError,\n onFocus,\n onBlur,\n };\n};\n\n/**\n * Gives a form control the id, `aria-describedby`, `aria-invalid` and `disabled` of the `Field` around it,\n * and gives its own id, `disabled` and invalid state to that `Field`.\n * Outside a `Field`, it only sets `aria-invalid` from `invalid`.\n */\nexport const useFieldControl = ({\n id,\n invalid,\n disabled,\n 'aria-describedby': describedBy,\n 'aria-invalid': ariaInvalid,\n labelable = true,\n}: FieldControlOptions) => {\n const field = useFieldContext();\n const registrationId = React.useId();\n const ownInvalid = Boolean(invalid || ariaInvalid === true || ariaInvalid === 'true');\n const isInvalid = ownInvalid || Boolean(field?.invalid);\n const registerControl = field?.registerControl;\n\n React.useEffect(() => {\n if (!registerControl) {\n return undefined;\n }\n registerControl(registrationId, {\n id,\n disabled: Boolean(disabled),\n invalid: ownInvalid,\n labelable,\n });\n return () => registerControl(registrationId, null);\n }, [registerControl, registrationId, id, disabled, ownInvalid, labelable]);\n const describedByIds =\n [field?.errorId, field?.descriptionId, field?.hintId, describedBy].filter(Boolean).join(' ') ||\n undefined;\n\n return {\n id: id ?? field?.controlId,\n labelId: field?.labelId,\n invalid: isInvalid,\n disabled: disabled || field?.disabled || undefined,\n 'aria-describedby': describedByIds,\n 'aria-invalid': isInvalid ? true : ariaInvalid,\n };\n};\n\nconst ANNOUNCE_DELAY = 1000;\n\n/**\n * Returns the text of the error, after the text of the label when there is one, once it has not\n * changed for a short time, so that a screen reader reads it after the echo of the typed text.\n */\nexport const useAnnouncedError = (enabled: boolean, errorId?: string, labelId?: string) => {\n const [announcedError, setAnnouncedError] = React.useState<string | null>(null);\n const lastTextRef = React.useRef<string | null | undefined>(null);\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout>>();\n\n // Compares the rendered text, so that a new JSX error with the same text does not restart the delay.\n React.useEffect(() => {\n const text =\n (enabled && errorId && document.getElementById(errorId)?.textContent?.trim()) || null;\n if (text === lastTextRef.current) {\n return;\n }\n lastTextRef.current = text;\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(\n () => {\n const fieldName = labelId\n ? document.getElementById(labelId)?.textContent?.trim()\n : undefined;\n setAnnouncedError(text !== null && fieldName ? `${fieldName}: ${text}` : text);\n },\n text === null ? 0 : ANNOUNCE_DELAY,\n );\n });\n\n React.useEffect(\n () => () => {\n clearTimeout(timeoutRef.current);\n lastTextRef.current = undefined;\n },\n [],\n );\n\n return announcedError;\n};\n"],"mappings":";;;AAoBA,IAAa,eAAe,MAAM,cAAwC,IAAI;AAE9E,IAAa,wBAAwB,MAAM,WAAW,YAAY;AA0ClE,IAAM,cAAc,SAClB,SAAS,KAAA,KAAa,SAAS,QAAQ,SAAS,SAAS,SAAS;AAEpE,IAAM,aAAa,CAAC;AAE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A,OAAO;AACT"}
@@ -0,0 +1,50 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_cx = require("../../styles/cx.cjs");
3
+ const require_recipeVariants = require("../../styles/recipeVariants.cjs");
4
+ const require_useInlineStyle = require("../../styles/useInlineStyle.cjs");
5
+ const require_FieldContext = require("../Field/FieldContext.cjs");
6
+ const require_Radio_vanilla_css = require("./Radio.vanilla.css.cjs");
7
+ let react = require("react");
8
+ react = require_runtime.__toESM(react, 1);
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _radix_ui_react_radio_group = require("@radix-ui/react-radio-group");
11
+ _radix_ui_react_radio_group = require_runtime.__toESM(_radix_ui_react_radio_group, 1);
12
+ // components/Radio/Radio.vanilla.tsx
13
+ var radioClass = require_recipeVariants.withVariantKeys(require_Radio_vanilla_css.radioRecipe);
14
+ var RadioGroupVanilla = react.default.forwardRef(({ id, disabled, className, css, style, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-labelledby": ariaLabelledBy, ...props }, forwardedRef) => {
15
+ const control = require_FieldContext.useFieldControl({
16
+ id,
17
+ disabled,
18
+ "aria-describedby": ariaDescribedBy,
19
+ "aria-invalid": ariaInvalid,
20
+ labelable: false
21
+ });
22
+ const mergedStyles = require_useInlineStyle.useInlineStyle(css, style);
23
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Root, {
24
+ ...props,
25
+ id: control.id,
26
+ disabled: control.disabled,
27
+ "aria-labelledby": ariaLabelledBy ?? control.labelId,
28
+ "aria-describedby": control["aria-describedby"],
29
+ "aria-invalid": control["aria-invalid"],
30
+ className: require_cx.cx(require_Radio_vanilla_css.radioGroup, className),
31
+ style: mergedStyles,
32
+ ref: forwardedRef
33
+ });
34
+ });
35
+ RadioGroupVanilla.displayName = "RadioGroupVanilla";
36
+ var RadioVanilla = react.default.forwardRef(({ size, className, css, style, ...props }, forwardedRef) => {
37
+ const mergedStyles = require_useInlineStyle.useInlineStyle(css, style);
38
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Item, {
39
+ ...props,
40
+ className: require_cx.cx(radioClass({ size }), className),
41
+ style: mergedStyles,
42
+ ref: forwardedRef,
43
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Indicator, { className: require_Radio_vanilla_css.radioIndicator })
44
+ });
45
+ });
46
+ RadioVanilla.displayName = "RadioVanilla";
47
+ exports.RadioGroupVanilla = RadioGroupVanilla;
48
+ exports.RadioVanilla = RadioVanilla;
49
+
50
+ //# sourceMappingURL=Radio.vanilla.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.vanilla.cjs","names":["withVariantKeys","radioRecipe","React","useFieldControl","useInlineStyle","RadioGroupPrimitive","cx","radioGroup","radioIndicator"],"sources":["../../../components/Radio/Radio.vanilla.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport React from 'react';\n\nimport { CSSProps } from '@/styles/cssProps';\nimport { cx } from '@/styles/cx';\nimport { RecipeVariantProps, withVariantKeys } from '@/styles/recipeVariants';\nimport { useInlineStyle } from '@/styles/useInlineStyle';\n\nimport { useFieldControl } from '@/components/Field/FieldContext';\n\nimport { radioGroup, radioIndicator, radioRecipe } from './Radio.vanilla.css';\n\nconst radioClass = withVariantKeys(radioRecipe);\n\ntype RadioRecipeVariants = RecipeVariantProps<typeof radioRecipe>;\n\nexport type RadioGroupVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>,\n 'asChild'\n> &\n CSSProps;\n\nexport const RadioGroupVanilla = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n RadioGroupVanillaProps\n>(\n (\n {\n id,\n disabled,\n className,\n css,\n style,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n forwardedRef,\n ) => {\n const control = useFieldControl({\n id,\n disabled,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n labelable: false,\n });\n\n const mergedStyles = useInlineStyle(css, style);\n\n return (\n <RadioGroupPrimitive.Root\n {...props}\n id={control.id}\n disabled={control.disabled}\n aria-labelledby={ariaLabelledBy ?? control.labelId}\n aria-describedby={control['aria-describedby']}\n aria-invalid={control['aria-invalid']}\n className={cx(radioGroup, className)}\n style={mergedStyles}\n ref={forwardedRef}\n />\n );\n },\n);\n\nRadioGroupVanilla.displayName = 'RadioGroupVanilla';\n\nexport interface RadioVanillaOwnProps extends CSSProps {\n size?: RadioRecipeVariants['size'];\n}\n\nexport type RadioVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n 'asChild'\n> &\n RadioVanillaOwnProps;\n\nexport const RadioVanilla = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioVanillaProps\n>(({ size, className, css, style, ...props }, forwardedRef) => {\n const mergedStyles = useInlineStyle(css, style);\n\n return (\n <RadioGroupPrimitive.Item\n {...props}\n className={cx(radioClass({ size }), className)}\n style={mergedStyles}\n ref={forwardedRef}\n >\n <RadioGroupPrimitive.Indicator className={radioIndicator} />\n </RadioGroupPrimitive.Item>\n );\n});\n\nRadioVanilla.displayName = 'RadioVanilla';\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,aAAaA,uBAAAA,gBAAgBC,0BAAAA,WAAW;AAU9C,IAAa,oBAAoBC,MAAAA,QAAM,YAKnC,EACE,IACA,UACA,WACA,KACA,OACA,oBAAoB,iBACpB,gBAAgB,aAChB,mBAAmB,gBACnB,GAAG,SAEL,iBACG;CACH,MAAM,UAAUC,qBAAAA,gBAAgB;EAC9B;EACA;EACA,oBAAoB;EACpB,gBAAgB;EAChB,WAAW;CACb,CAAC;CAED,MAAM,eAAeC,uBAAAA,eAAe,KAAK,KAAK;CAE9C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,4BAAoB,MAArB;EACE,GAAI;EACJ,IAAI,QAAQ;EACZ,UAAU,QAAQ;EAClB,mBAAiB,kBAAkB,QAAQ;EAC3C,oBAAkB,QAAQ;EAC1B,gBAAc,QAAQ;EACtB,WAAWC,WAAAA,GAAGC,0BAAAA,YAAY,SAAS;EACnC,OAAO;EACP,KAAK;CACN,CAAA;AAEL,CACF;AAEA,kBAAkB,cAAc;AAYhC,IAAa,eAAeL,MAAAA,QAAM,YAG/B,EAAE,MAAM,WAAW,KAAK,OAAO,GAAG,SAAS,iBAAiB;CAC7D,MAAM,eAAeE,uBAAAA,eAAe,KAAK,KAAK;CAE9C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,4BAAoB,MAArB;EACE,GAAI;EACJ,WAAWC,WAAAA,GAAG,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS;EAC7C,OAAO;EACP,KAAK;EAEL,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAoB,WAArB,EAA+B,WAAWG,0BAAAA,eAAiB,CAAA;CACnC,CAAA;AAE9B,CAAC;AAED,aAAa,cAAc"}
@@ -0,0 +1,19 @@
1
+ ;/* empty css */
2
+ let _vanilla_extract_recipes_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
3
+ // components/Radio/Radio.vanilla.css.ts
4
+ var radioGroup = "_1f23zkp0";
5
+ var radioIndicator = "_1f23zkp1";
6
+ var radioRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
7
+ defaultClassName: "_1f23zkp4 _1f23zkp2",
8
+ variantClassNames: { size: {
9
+ "1": "_1f23zkp5",
10
+ "2": "_1f23zkp6 _1f23zkp3"
11
+ } },
12
+ defaultVariants: { size: "1" },
13
+ compoundVariants: []
14
+ });
15
+ exports.radioGroup = radioGroup;
16
+ exports.radioIndicator = radioIndicator;
17
+ exports.radioRecipe = radioRecipe;
18
+
19
+ //# sourceMappingURL=Radio.vanilla.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.vanilla.css.cjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /* empty css */
2
+ import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ // components/Radio/Radio.vanilla.css.ts
4
+ var radioGroup = "_1f23zkp0";
5
+ var radioIndicator = "_1f23zkp1";
6
+ var radioRecipe = createRuntimeFn({
7
+ defaultClassName: "_1f23zkp4 _1f23zkp2",
8
+ variantClassNames: { size: {
9
+ "1": "_1f23zkp5",
10
+ "2": "_1f23zkp6 _1f23zkp3"
11
+ } },
12
+ defaultVariants: { size: "1" },
13
+ compoundVariants: []
14
+ });
15
+ export { radioGroup, radioIndicator, radioRecipe };
16
+
17
+ //# sourceMappingURL=Radio.vanilla.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.vanilla.css.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,46 @@
1
+ import { cx } from "../../styles/cx.js";
2
+ import { withVariantKeys } from "../../styles/recipeVariants.js";
3
+ import { useInlineStyle } from "../../styles/useInlineStyle.js";
4
+ import { useFieldControl } from "../Field/FieldContext.js";
5
+ import { radioGroup, radioIndicator, radioRecipe } from "./Radio.vanilla.css.js";
6
+ import React from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
9
+ // components/Radio/Radio.vanilla.tsx
10
+ var radioClass = withVariantKeys(radioRecipe);
11
+ var RadioGroupVanilla = React.forwardRef(({ id, disabled, className, css, style, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-labelledby": ariaLabelledBy, ...props }, forwardedRef) => {
12
+ const control = useFieldControl({
13
+ id,
14
+ disabled,
15
+ "aria-describedby": ariaDescribedBy,
16
+ "aria-invalid": ariaInvalid,
17
+ labelable: false
18
+ });
19
+ const mergedStyles = useInlineStyle(css, style);
20
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, {
21
+ ...props,
22
+ id: control.id,
23
+ disabled: control.disabled,
24
+ "aria-labelledby": ariaLabelledBy ?? control.labelId,
25
+ "aria-describedby": control["aria-describedby"],
26
+ "aria-invalid": control["aria-invalid"],
27
+ className: cx(radioGroup, className),
28
+ style: mergedStyles,
29
+ ref: forwardedRef
30
+ });
31
+ });
32
+ RadioGroupVanilla.displayName = "RadioGroupVanilla";
33
+ var RadioVanilla = React.forwardRef(({ size, className, css, style, ...props }, forwardedRef) => {
34
+ const mergedStyles = useInlineStyle(css, style);
35
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Item, {
36
+ ...props,
37
+ className: cx(radioClass({ size }), className),
38
+ style: mergedStyles,
39
+ ref: forwardedRef,
40
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: radioIndicator })
41
+ });
42
+ });
43
+ RadioVanilla.displayName = "RadioVanilla";
44
+ export { RadioGroupVanilla, RadioVanilla };
45
+
46
+ //# sourceMappingURL=Radio.vanilla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.vanilla.js","names":[],"sources":["../../../components/Radio/Radio.vanilla.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport React from 'react';\n\nimport { CSSProps } from '@/styles/cssProps';\nimport { cx } from '@/styles/cx';\nimport { RecipeVariantProps, withVariantKeys } from '@/styles/recipeVariants';\nimport { useInlineStyle } from '@/styles/useInlineStyle';\n\nimport { useFieldControl } from '@/components/Field/FieldContext';\n\nimport { radioGroup, radioIndicator, radioRecipe } from './Radio.vanilla.css';\n\nconst radioClass = withVariantKeys(radioRecipe);\n\ntype RadioRecipeVariants = RecipeVariantProps<typeof radioRecipe>;\n\nexport type RadioGroupVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>,\n 'asChild'\n> &\n CSSProps;\n\nexport const RadioGroupVanilla = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n RadioGroupVanillaProps\n>(\n (\n {\n id,\n disabled,\n className,\n css,\n style,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n forwardedRef,\n ) => {\n const control = useFieldControl({\n id,\n disabled,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n labelable: false,\n });\n\n const mergedStyles = useInlineStyle(css, style);\n\n return (\n <RadioGroupPrimitive.Root\n {...props}\n id={control.id}\n disabled={control.disabled}\n aria-labelledby={ariaLabelledBy ?? control.labelId}\n aria-describedby={control['aria-describedby']}\n aria-invalid={control['aria-invalid']}\n className={cx(radioGroup, className)}\n style={mergedStyles}\n ref={forwardedRef}\n />\n );\n },\n);\n\nRadioGroupVanilla.displayName = 'RadioGroupVanilla';\n\nexport interface RadioVanillaOwnProps extends CSSProps {\n size?: RadioRecipeVariants['size'];\n}\n\nexport type RadioVanillaProps = Omit<\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n 'asChild'\n> &\n RadioVanillaOwnProps;\n\nexport const RadioVanilla = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n RadioVanillaProps\n>(({ size, className, css, style, ...props }, forwardedRef) => {\n const mergedStyles = useInlineStyle(css, style);\n\n return (\n <RadioGroupPrimitive.Item\n {...props}\n className={cx(radioClass({ size }), className)}\n style={mergedStyles}\n ref={forwardedRef}\n >\n <RadioGroupPrimitive.Indicator className={radioIndicator} />\n </RadioGroupPrimitive.Item>\n );\n});\n\nRadioVanilla.displayName = 'RadioVanilla';\n"],"mappings":";;;;;;;;;AAYA,IAAM,aAAa,gBAAgB,WAAW;AAU9C,IAAa,oBAAoB,MAAM,YAKnC,EACE,IACA,UACA,WACA,KACA,OACA,oBAAoB,iBACpB,gBAAgB,aAChB,mBAAmB,gBACnB,GAAG,SAEL,iBACG;CACH,MAAM,UAAU,gBAAgB;EAC9B;EACA;EACA,oBAAoB;EACpB,gBAAgB;EAChB,WAAW;CACb,CAAC;CAED,MAAM,eAAe,eAAe,KAAK,KAAK;CAE9C,OACE,oBAAC,oBAAoB,MAArB;EACE,GAAI;EACJ,IAAI,QAAQ;EACZ,UAAU,QAAQ;EAClB,mBAAiB,kBAAkB,QAAQ;EAC3C,oBAAkB,QAAQ;EAC1B,gBAAc,QAAQ;EACtB,WAAW,GAAG,YAAY,SAAS;EACnC,OAAO;EACP,KAAK;CACN,CAAA;AAEL,CACF;AAEA,kBAAkB,cAAc;AAYhC,IAAa,eAAe,MAAM,YAG/B,EAAE,MAAM,WAAW,KAAK,OAAO,GAAG,SAAS,iBAAiB;CAC7D,MAAM,eAAe,eAAe,KAAK,KAAK;CAE9C,OACE,oBAAC,oBAAoB,MAArB;EACE,GAAI;EACJ,WAAW,GAAG,WAAW,EAAE,KAAK,CAAC,GAAG,SAAS;EAC7C,OAAO;EACP,KAAK;EAEL,UAAA,oBAAC,oBAAoB,WAArB,EAA+B,WAAW,eAAiB,CAAA;CACnC,CAAA;AAE9B,CAAC;AAED,aAAa,cAAc"}
@@ -0,0 +1,44 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_cx = require("../../styles/cx.cjs");
3
+ const require_Accordion_vanilla = require("../Accordion/Accordion.vanilla.cjs");
4
+ const require_Radio_vanilla_css = require("../Radio/Radio.vanilla.css.cjs");
5
+ const require_RadioAccordion_vanilla_css = require("./RadioAccordion.vanilla.css.cjs");
6
+ let react = require("react");
7
+ react = require_runtime.__toESM(react, 1);
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ // components/RadioAccordion/RadioAccordion.vanilla.tsx
10
+ var RadioAccordionRootVanilla = react.default.forwardRef((props, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion_vanilla.AccordionRootVanilla, {
11
+ ...props,
12
+ type: "single",
13
+ collapsible: false,
14
+ ref: forwardedRef
15
+ }));
16
+ RadioAccordionRootVanilla.displayName = "RadioAccordionRootVanilla";
17
+ var RadioAccordionItemVanilla = react.default.forwardRef(({ className, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion_vanilla.AccordionItemVanilla, {
18
+ ...props,
19
+ className: require_cx.cx(require_RadioAccordion_vanilla_css.radioAccordionItem, className),
20
+ ref: forwardedRef
21
+ }));
22
+ RadioAccordionItemVanilla.displayName = "RadioAccordionItemVanilla";
23
+ var RadioAccordionTriggerVanilla = react.default.forwardRef(({ children, className, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Accordion_vanilla.AccordionTriggerBaseVanilla, {
24
+ ...props,
25
+ className: require_cx.cx(require_RadioAccordion_vanilla_css.radioAccordionTrigger, className),
26
+ ref: forwardedRef,
27
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
28
+ className: require_RadioAccordion_vanilla_css.radioAccordionRadio,
29
+ "aria-hidden": true,
30
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: require_Radio_vanilla_css.radioIndicator })
31
+ }), children]
32
+ }));
33
+ RadioAccordionTriggerVanilla.displayName = "RadioAccordionTriggerVanilla";
34
+ var RadioAccordionContentVanilla = react.default.forwardRef((props, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion_vanilla.AccordionContentVanilla, {
35
+ ...props,
36
+ ref: forwardedRef
37
+ }));
38
+ RadioAccordionContentVanilla.displayName = "RadioAccordionContentVanilla";
39
+ exports.RadioAccordionContentVanilla = RadioAccordionContentVanilla;
40
+ exports.RadioAccordionItemVanilla = RadioAccordionItemVanilla;
41
+ exports.RadioAccordionRootVanilla = RadioAccordionRootVanilla;
42
+ exports.RadioAccordionTriggerVanilla = RadioAccordionTriggerVanilla;
43
+
44
+ //# sourceMappingURL=RadioAccordion.vanilla.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioAccordion.vanilla.cjs","names":["React","AccordionRootVanilla","AccordionItemVanilla","cx","radioAccordionItem","AccordionTriggerBaseVanilla","radioAccordionTrigger","radioAccordionRadio","radioIndicator","AccordionContentVanilla"],"sources":["../../../components/RadioAccordion/RadioAccordion.vanilla.tsx"],"sourcesContent":["import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport React from 'react';\n\nimport { cx } from '@/styles/cx';\n\nimport {\n AccordionContentVanilla,\n AccordionContentVanillaProps,\n AccordionItemVanilla,\n AccordionItemVanillaProps,\n AccordionRootVanilla,\n AccordionTriggerBaseVanilla,\n AccordionTriggerBaseVanillaProps,\n} from '@/components/Accordion/Accordion.vanilla';\nimport { radioIndicator } from '@/components/Radio/Radio.vanilla.css';\n\nimport {\n radioAccordionItem,\n radioAccordionRadio,\n radioAccordionTrigger,\n} from './RadioAccordion.vanilla.css';\n\nexport type RadioAccordionRootVanillaProps = Omit<\n Extract<React.ComponentProps<typeof AccordionRootVanilla>, { type: 'single' }>,\n 'type' | 'collapsible' | 'ref'\n>;\n\nexport const RadioAccordionRootVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionRootVanilla>,\n RadioAccordionRootVanillaProps\n>((props, forwardedRef) => (\n <AccordionRootVanilla {...props} type=\"single\" collapsible={false} ref={forwardedRef} />\n));\n\nRadioAccordionRootVanilla.displayName = 'RadioAccordionRootVanilla';\n\nexport type RadioAccordionItemVanillaProps = AccordionItemVanillaProps;\n\nexport const RadioAccordionItemVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionItemVanilla>,\n RadioAccordionItemVanillaProps\n>(({ className, ...props }, forwardedRef) => (\n <AccordionItemVanilla\n {...props}\n className={cx(radioAccordionItem, className)}\n ref={forwardedRef}\n />\n));\n\nRadioAccordionItemVanilla.displayName = 'RadioAccordionItemVanilla';\n\nexport type RadioAccordionTriggerVanillaProps = AccordionTriggerBaseVanillaProps;\n\nexport const RadioAccordionTriggerVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n RadioAccordionTriggerVanillaProps\n>(({ children, className, ...props }, forwardedRef) => (\n <AccordionTriggerBaseVanilla\n {...props}\n className={cx(radioAccordionTrigger, className)}\n ref={forwardedRef}\n >\n <div className={radioAccordionRadio} aria-hidden>\n <div className={radioIndicator} />\n </div>\n {children}\n </AccordionTriggerBaseVanilla>\n));\n\nRadioAccordionTriggerVanilla.displayName = 'RadioAccordionTriggerVanilla';\n\nexport type RadioAccordionContentVanillaProps = AccordionContentVanillaProps;\n\nexport const RadioAccordionContentVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionContentVanilla>,\n RadioAccordionContentVanillaProps\n>((props, forwardedRef) => <AccordionContentVanilla {...props} ref={forwardedRef} />);\n\nRadioAccordionContentVanilla.displayName = 'RadioAccordionContentVanilla';\n"],"mappings":";;;;;;;;;AA2BA,IAAa,4BAA4BA,MAAAA,QAAM,YAG5C,OAAO,iBACR,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,sBAAD;CAAsB,GAAI;CAAO,MAAK;CAAS,aAAa;CAAO,KAAK;AAAe,CAAA,CACxF;AAED,0BAA0B,cAAc;AAIxC,IAAa,4BAA4BD,MAAAA,QAAM,YAG5C,EAAE,WAAW,GAAG,SAAS,iBAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACE,0BAAAA,sBAAD;CACE,GAAI;CACJ,WAAWC,WAAAA,GAAGC,mCAAAA,oBAAoB,SAAS;CAC3C,KAAK;AACN,CAAA,CACF;AAED,0BAA0B,cAAc;AAIxC,IAAa,+BAA+BJ,MAAAA,QAAM,YAG/C,EAAE,UAAU,WAAW,GAAG,SAAS,iBACpC,iBAAA,GAAA,kBAAA,KAAA,CAACK,0BAAAA,6BAAD;CACE,GAAI;CACJ,WAAWF,WAAAA,GAAGG,mCAAAA,uBAAuB,SAAS;CAC9C,KAAK;CAHP,UAAA,CAKE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAWC,mCAAAA;EAAqB,eAAA;EACnC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EAAK,WAAWC,0BAAAA,eAAiB,CAAA;CAC9B,CAAA,GACJ,QAC0B;AAC9B,CAAA,CAAA;AAED,6BAA6B,cAAc;AAI3C,IAAa,+BAA+BR,MAAAA,QAAM,YAG/C,OAAO,iBAAiB,iBAAA,GAAA,kBAAA,IAAA,CAACS,0BAAAA,yBAAD;CAAyB,GAAI;CAAO,KAAK;AAAe,CAAA,CAAC;AAEpF,6BAA6B,cAAc"}
@@ -0,0 +1,11 @@
1
+ ;/* empty css */
2
+ ;/* empty css */
3
+ // components/RadioAccordion/RadioAccordion.vanilla.css.ts
4
+ var radioAccordionItem = "_1bpuyf90";
5
+ var radioAccordionTrigger = "_1bpuyf91";
6
+ var radioAccordionRadio = "_1bpuyf92";
7
+ exports.radioAccordionItem = radioAccordionItem;
8
+ exports.radioAccordionRadio = radioAccordionRadio;
9
+ exports.radioAccordionTrigger = radioAccordionTrigger;
10
+
11
+ //# sourceMappingURL=RadioAccordion.vanilla.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioAccordion.vanilla.css.cjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ // components/RadioAccordion/RadioAccordion.vanilla.css.ts
4
+ var radioAccordionItem = "_1bpuyf90";
5
+ var radioAccordionTrigger = "_1bpuyf91";
6
+ var radioAccordionRadio = "_1bpuyf92";
7
+ export { radioAccordionItem, radioAccordionRadio, radioAccordionTrigger };
8
+
9
+ //# sourceMappingURL=RadioAccordion.vanilla.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioAccordion.vanilla.css.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ import { cx } from "../../styles/cx.js";
2
+ import { AccordionContentVanilla, AccordionItemVanilla, AccordionRootVanilla, AccordionTriggerBaseVanilla } from "../Accordion/Accordion.vanilla.js";
3
+ import { radioIndicator } from "../Radio/Radio.vanilla.css.js";
4
+ import { radioAccordionItem, radioAccordionRadio, radioAccordionTrigger } from "./RadioAccordion.vanilla.css.js";
5
+ import React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ // components/RadioAccordion/RadioAccordion.vanilla.tsx
8
+ var RadioAccordionRootVanilla = React.forwardRef((props, forwardedRef) => /* @__PURE__ */ jsx(AccordionRootVanilla, {
9
+ ...props,
10
+ type: "single",
11
+ collapsible: false,
12
+ ref: forwardedRef
13
+ }));
14
+ RadioAccordionRootVanilla.displayName = "RadioAccordionRootVanilla";
15
+ var RadioAccordionItemVanilla = React.forwardRef(({ className, ...props }, forwardedRef) => /* @__PURE__ */ jsx(AccordionItemVanilla, {
16
+ ...props,
17
+ className: cx(radioAccordionItem, className),
18
+ ref: forwardedRef
19
+ }));
20
+ RadioAccordionItemVanilla.displayName = "RadioAccordionItemVanilla";
21
+ var RadioAccordionTriggerVanilla = React.forwardRef(({ children, className, ...props }, forwardedRef) => /* @__PURE__ */ jsxs(AccordionTriggerBaseVanilla, {
22
+ ...props,
23
+ className: cx(radioAccordionTrigger, className),
24
+ ref: forwardedRef,
25
+ children: [/* @__PURE__ */ jsx("div", {
26
+ className: radioAccordionRadio,
27
+ "aria-hidden": true,
28
+ children: /* @__PURE__ */ jsx("div", { className: radioIndicator })
29
+ }), children]
30
+ }));
31
+ RadioAccordionTriggerVanilla.displayName = "RadioAccordionTriggerVanilla";
32
+ var RadioAccordionContentVanilla = React.forwardRef((props, forwardedRef) => /* @__PURE__ */ jsx(AccordionContentVanilla, {
33
+ ...props,
34
+ ref: forwardedRef
35
+ }));
36
+ RadioAccordionContentVanilla.displayName = "RadioAccordionContentVanilla";
37
+ export { RadioAccordionContentVanilla, RadioAccordionItemVanilla, RadioAccordionRootVanilla, RadioAccordionTriggerVanilla };
38
+
39
+ //# sourceMappingURL=RadioAccordion.vanilla.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioAccordion.vanilla.js","names":[],"sources":["../../../components/RadioAccordion/RadioAccordion.vanilla.tsx"],"sourcesContent":["import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport React from 'react';\n\nimport { cx } from '@/styles/cx';\n\nimport {\n AccordionContentVanilla,\n AccordionContentVanillaProps,\n AccordionItemVanilla,\n AccordionItemVanillaProps,\n AccordionRootVanilla,\n AccordionTriggerBaseVanilla,\n AccordionTriggerBaseVanillaProps,\n} from '@/components/Accordion/Accordion.vanilla';\nimport { radioIndicator } from '@/components/Radio/Radio.vanilla.css';\n\nimport {\n radioAccordionItem,\n radioAccordionRadio,\n radioAccordionTrigger,\n} from './RadioAccordion.vanilla.css';\n\nexport type RadioAccordionRootVanillaProps = Omit<\n Extract<React.ComponentProps<typeof AccordionRootVanilla>, { type: 'single' }>,\n 'type' | 'collapsible' | 'ref'\n>;\n\nexport const RadioAccordionRootVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionRootVanilla>,\n RadioAccordionRootVanillaProps\n>((props, forwardedRef) => (\n <AccordionRootVanilla {...props} type=\"single\" collapsible={false} ref={forwardedRef} />\n));\n\nRadioAccordionRootVanilla.displayName = 'RadioAccordionRootVanilla';\n\nexport type RadioAccordionItemVanillaProps = AccordionItemVanillaProps;\n\nexport const RadioAccordionItemVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionItemVanilla>,\n RadioAccordionItemVanillaProps\n>(({ className, ...props }, forwardedRef) => (\n <AccordionItemVanilla\n {...props}\n className={cx(radioAccordionItem, className)}\n ref={forwardedRef}\n />\n));\n\nRadioAccordionItemVanilla.displayName = 'RadioAccordionItemVanilla';\n\nexport type RadioAccordionTriggerVanillaProps = AccordionTriggerBaseVanillaProps;\n\nexport const RadioAccordionTriggerVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n RadioAccordionTriggerVanillaProps\n>(({ children, className, ...props }, forwardedRef) => (\n <AccordionTriggerBaseVanilla\n {...props}\n className={cx(radioAccordionTrigger, className)}\n ref={forwardedRef}\n >\n <div className={radioAccordionRadio} aria-hidden>\n <div className={radioIndicator} />\n </div>\n {children}\n </AccordionTriggerBaseVanilla>\n));\n\nRadioAccordionTriggerVanilla.displayName = 'RadioAccordionTriggerVanilla';\n\nexport type RadioAccordionContentVanillaProps = AccordionContentVanillaProps;\n\nexport const RadioAccordionContentVanilla = React.forwardRef<\n React.ElementRef<typeof AccordionContentVanilla>,\n RadioAccordionContentVanillaProps\n>((props, forwardedRef) => <AccordionContentVanilla {...props} ref={forwardedRef} />);\n\nRadioAccordionContentVanilla.displayName = 'RadioAccordionContentVanilla';\n"],"mappings":";;;;;;;AA2BA,IAAa,4BAA4B,MAAM,YAG5C,OAAO,iBACR,oBAAC,sBAAD;CAAsB,GAAI;CAAO,MAAK;CAAS,aAAa;CAAO,KAAK;AAAe,CAAA,CACxF;AAED,0BAA0B,cAAc;AAIxC,IAAa,4BAA4B,MAAM,YAG5C,EAAE,WAAW,GAAG,SAAS,iBAC1B,oBAAC,sBAAD;CACE,GAAI;CACJ,WAAW,GAAG,oBAAoB,SAAS;CAC3C,KAAK;AACN,CAAA,CACF;AAED,0BAA0B,cAAc;AAIxC,IAAa,+BAA+B,MAAM,YAG/C,EAAE,UAAU,WAAW,GAAG,SAAS,iBACpC,qBAAC,6BAAD;CACE,GAAI;CACJ,WAAW,GAAG,uBAAuB,SAAS;CAC9C,KAAK;CAHP,UAAA,CAKE,oBAAC,OAAD;EAAK,WAAW;EAAqB,eAAA;EACnC,UAAA,oBAAC,OAAD,EAAK,WAAW,eAAiB,CAAA;CAC9B,CAAA,GACJ,QAC0B;AAC9B,CAAA,CAAA;AAED,6BAA6B,cAAc;AAI3C,IAAa,+BAA+B,MAAM,YAG/C,OAAO,iBAAiB,oBAAC,yBAAD;CAAyB,GAAI;CAAO,KAAK;AAAe,CAAA,CAAC;AAEpF,6BAA6B,cAAc"}
@@ -0,0 +1,136 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_cx = require("../../styles/cx.cjs");
3
+ const require_useInlineStyle = require("../../styles/useInlineStyle.cjs");
4
+ const require_FieldContext = require("../Field/FieldContext.cjs");
5
+ const require_Select_vanilla_css = require("./Select.vanilla.css.cjs");
6
+ let _radix_ui_react_icons = require("@radix-ui/react-icons");
7
+ let react = require("react");
8
+ react = require_runtime.__toESM(react, 1);
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ let _radix_ui_react_select = require("@radix-ui/react-select");
11
+ _radix_ui_react_select = require_runtime.__toESM(_radix_ui_react_select, 1);
12
+ // components/Select/Select.vanilla.tsx
13
+ var SelectSizeContext = react.default.createContext("medium");
14
+ var SelectVanilla = react.default.forwardRef(({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, name, form, required, autoComplete, disabled, dir, placeholder, size = "medium", variant, state, id, css, className, style, children, onBlur, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }, forwardedRef) => {
15
+ const contentRef = react.default.useRef(null);
16
+ const control = require_FieldContext.useFieldControl({
17
+ id,
18
+ disabled,
19
+ invalid: state === "invalid",
20
+ "aria-describedby": ariaDescribedBy,
21
+ "aria-invalid": ariaInvalid
22
+ });
23
+ const inlineStyle = require_useInlineStyle.useInlineStyle(css, style);
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectSizeContext.Provider, {
25
+ value: size,
26
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Root, {
27
+ value,
28
+ defaultValue,
29
+ onValueChange,
30
+ open,
31
+ defaultOpen,
32
+ onOpenChange,
33
+ name,
34
+ form,
35
+ required,
36
+ autoComplete,
37
+ disabled: control.disabled,
38
+ dir,
39
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Trigger, {
40
+ ref: forwardedRef,
41
+ id: control.id,
42
+ "aria-describedby": control["aria-describedby"],
43
+ "aria-invalid": control["aria-invalid"],
44
+ className: require_cx.cx(require_Select_vanilla_css.selectTriggerRecipe({
45
+ size,
46
+ variant,
47
+ state: control.invalid ? "invalid" : state
48
+ }), className),
49
+ style: inlineStyle,
50
+ onBlur: (event) => {
51
+ if (!contentRef.current?.contains(event.relatedTarget)) onBlur?.(event);
52
+ },
53
+ ...props,
54
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
55
+ className: require_Select_vanilla_css.selectValue,
56
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Value, { placeholder })
57
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Icon, {
58
+ className: require_Select_vanilla_css.selectIcon,
59
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.CaretSortIcon, {})
60
+ })]
61
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Content, {
62
+ ref: contentRef,
63
+ className: require_Select_vanilla_css.selectContent,
64
+ position: "popper",
65
+ sideOffset: 4,
66
+ collisionPadding: 8,
67
+ children: [
68
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollUpButton, {
69
+ className: require_Select_vanilla_css.selectScrollButton,
70
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.ChevronUpIcon, {})
71
+ }),
72
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Viewport, {
73
+ className: require_Select_vanilla_css.selectViewport,
74
+ children
75
+ }),
76
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollDownButton, {
77
+ className: require_Select_vanilla_css.selectScrollButton,
78
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.ChevronDownIcon, {})
79
+ })
80
+ ]
81
+ }) })]
82
+ })
83
+ });
84
+ });
85
+ SelectVanilla.displayName = "SelectVanilla";
86
+ var SelectItemVanilla = react.default.forwardRef(({ description, children, css, className, style, ...props }, forwardedRef) => {
87
+ const size = react.default.useContext(SelectSizeContext);
88
+ const inlineStyle = require_useInlineStyle.useInlineStyle(css, style);
89
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Item, {
90
+ ref: forwardedRef,
91
+ className: require_cx.cx(require_Select_vanilla_css.selectItemRecipe({ size }), className),
92
+ style: inlineStyle,
93
+ ...props,
94
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
95
+ className: require_Select_vanilla_css.selectItemContent,
96
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ItemText, { children }), description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
97
+ className: require_Select_vanilla_css.selectItemDescriptionRecipe({ size }),
98
+ children: description
99
+ })]
100
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
101
+ className: require_Select_vanilla_css.selectItemIndicator,
102
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.CheckIcon, {}) })
103
+ })]
104
+ });
105
+ });
106
+ SelectItemVanilla.displayName = "SelectItemVanilla";
107
+ var SelectGroupVanilla = react.default.forwardRef(({ css, style, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Group, {
108
+ ref: forwardedRef,
109
+ style: require_useInlineStyle.useInlineStyle(css, style),
110
+ ...props
111
+ }));
112
+ SelectGroupVanilla.displayName = "SelectGroupVanilla";
113
+ var SelectLabelVanilla = react.default.forwardRef(({ css, className, style, ...props }, forwardedRef) => {
114
+ const size = react.default.useContext(SelectSizeContext);
115
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Label, {
116
+ ref: forwardedRef,
117
+ className: require_cx.cx(require_Select_vanilla_css.selectLabelRecipe({ size }), className),
118
+ style: require_useInlineStyle.useInlineStyle(css, style),
119
+ ...props
120
+ });
121
+ });
122
+ SelectLabelVanilla.displayName = "SelectLabelVanilla";
123
+ var SelectSeparatorVanilla = react.default.forwardRef(({ css, className, style, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Separator, {
124
+ ref: forwardedRef,
125
+ className: require_cx.cx(require_Select_vanilla_css.selectSeparator, className),
126
+ style: require_useInlineStyle.useInlineStyle(css, style),
127
+ ...props
128
+ }));
129
+ SelectSeparatorVanilla.displayName = "SelectSeparatorVanilla";
130
+ exports.SelectGroupVanilla = SelectGroupVanilla;
131
+ exports.SelectItemVanilla = SelectItemVanilla;
132
+ exports.SelectLabelVanilla = SelectLabelVanilla;
133
+ exports.SelectSeparatorVanilla = SelectSeparatorVanilla;
134
+ exports.SelectVanilla = SelectVanilla;
135
+
136
+ //# sourceMappingURL=Select.vanilla.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.vanilla.cjs","names":["React","useFieldControl","useInlineStyle","SelectPrimitive","cx","selectTriggerRecipe","selectValue","selectIcon","CaretSortIcon","selectContent","selectScrollButton","ChevronUpIcon","selectViewport","ChevronDownIcon","selectItemRecipe","selectItemContent","selectItemDescriptionRecipe","selectItemIndicator","CheckIcon","selectLabelRecipe","selectSeparator"],"sources":["../../../components/Select/Select.vanilla.tsx"],"sourcesContent":["import { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport React from 'react';\n\nimport { CSSProps } from '@/styles/cssProps';\nimport { cx } from '@/styles/cx';\nimport type { RecipeVariantProps } from '@/styles/recipeVariants';\nimport { useInlineStyle } from '@/styles/useInlineStyle';\n\nimport { useFieldControl } from '@/components/Field/FieldContext';\n\nimport {\n selectContent,\n selectIcon,\n selectItemContent,\n selectItemDescriptionRecipe,\n selectItemIndicator,\n selectItemRecipe,\n selectLabelRecipe,\n selectScrollButton,\n selectSeparator,\n selectTriggerRecipe,\n selectValue,\n selectViewport,\n} from './Select.vanilla.css';\n\ntype SelectTriggerVariants = RecipeVariantProps<typeof selectTriggerRecipe>;\ntype SelectSize = NonNullable<SelectTriggerVariants['size']>;\n\nconst SelectSizeContext = React.createContext<SelectSize>('medium');\n\ntype SelectRootProps = Omit<\n SelectPrimitive.SelectProps,\n 'children' | 'autoComplete' | 'onValueChange'\n>;\n\nexport type SelectVanillaProps = Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n keyof SelectRootProps | 'children' | 'type' | 'onChange'\n> &\n SelectRootProps &\n CSSProps & {\n onValueChange?: (value: string) => void;\n placeholder?: React.ReactNode;\n autoComplete?: string;\n size?: SelectTriggerVariants['size'];\n variant?: SelectTriggerVariants['variant'];\n state?: SelectTriggerVariants['state'];\n children?: React.ReactNode;\n };\n\nexport const SelectVanilla = React.forwardRef<HTMLButtonElement, SelectVanillaProps>(\n (\n {\n value,\n defaultValue,\n onValueChange,\n open,\n defaultOpen,\n onOpenChange,\n name,\n form,\n required,\n autoComplete,\n disabled,\n dir,\n placeholder,\n size = 'medium',\n variant,\n state,\n id,\n css,\n className,\n style,\n children,\n onBlur,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n ...props\n },\n forwardedRef,\n ) => {\n const contentRef = React.useRef<HTMLDivElement>(null);\n const control = useFieldControl({\n id,\n disabled,\n invalid: state === 'invalid',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n });\n const inlineStyle = useInlineStyle(css, style);\n\n return (\n <SelectSizeContext.Provider value={size}>\n <SelectPrimitive.Root\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n name={name}\n form={form}\n required={required}\n autoComplete={autoComplete}\n disabled={control.disabled}\n dir={dir}\n >\n <SelectPrimitive.Trigger\n ref={forwardedRef}\n id={control.id}\n aria-describedby={control['aria-describedby']}\n aria-invalid={control['aria-invalid']}\n className={cx(\n selectTriggerRecipe({\n size,\n variant,\n state: control.invalid ? 'invalid' : state,\n }),\n className,\n )}\n style={inlineStyle}\n onBlur={(event) => {\n // Focus moving into the open list is not leaving the field.\n if (!contentRef.current?.contains(event.relatedTarget)) onBlur?.(event);\n }}\n {...props}\n >\n {/* Radix drops the className of Value. */}\n <span className={selectValue}>\n <SelectPrimitive.Value placeholder={placeholder} />\n </span>\n <SelectPrimitive.Icon className={selectIcon}>\n <CaretSortIcon />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={contentRef}\n className={selectContent}\n position=\"popper\"\n sideOffset={4}\n collisionPadding={8}\n >\n <SelectPrimitive.ScrollUpButton className={selectScrollButton}>\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n <SelectPrimitive.Viewport className={selectViewport}>\n {children}\n </SelectPrimitive.Viewport>\n <SelectPrimitive.ScrollDownButton className={selectScrollButton}>\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n </SelectPrimitive.Root>\n </SelectSizeContext.Provider>\n );\n },\n);\n\nSelectVanilla.displayName = 'SelectVanilla';\n\nexport type SelectItemVanillaProps = Omit<SelectPrimitive.SelectItemProps, 'asChild'> &\n CSSProps & {\n /** A second line under the item, shown in the list only. */\n description?: React.ReactNode;\n };\n\nexport const SelectItemVanilla = React.forwardRef<HTMLDivElement, SelectItemVanillaProps>(\n ({ description, children, css, className, style, ...props }, forwardedRef) => {\n const size = React.useContext(SelectSizeContext);\n const inlineStyle = useInlineStyle(css, style);\n\n return (\n <SelectPrimitive.Item\n ref={forwardedRef}\n className={cx(selectItemRecipe({ size }), className)}\n style={inlineStyle}\n {...props}\n >\n <span className={selectItemContent}>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n {description != null && (\n <span className={selectItemDescriptionRecipe({ size })}>{description}</span>\n )}\n </span>\n <span className={selectItemIndicator}>\n <SelectPrimitive.ItemIndicator>\n <CheckIcon />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n },\n);\n\nSelectItemVanilla.displayName = 'SelectItemVanilla';\n\nexport type SelectGroupVanillaProps = Omit<SelectPrimitive.SelectGroupProps, 'asChild'> & CSSProps;\n\nexport const SelectGroupVanilla = React.forwardRef<HTMLDivElement, SelectGroupVanillaProps>(\n ({ css, style, ...props }, forwardedRef) => (\n <SelectPrimitive.Group ref={forwardedRef} style={useInlineStyle(css, style)} {...props} />\n ),\n);\n\nSelectGroupVanilla.displayName = 'SelectGroupVanilla';\n\nexport type SelectLabelVanillaProps = Omit<SelectPrimitive.SelectLabelProps, 'asChild'> & CSSProps;\n\nexport const SelectLabelVanilla = React.forwardRef<HTMLDivElement, SelectLabelVanillaProps>(\n ({ css, className, style, ...props }, forwardedRef) => {\n const size = React.useContext(SelectSizeContext);\n\n return (\n <SelectPrimitive.Label\n ref={forwardedRef}\n className={cx(selectLabelRecipe({ size }), className)}\n style={useInlineStyle(css, style)}\n {...props}\n />\n );\n },\n);\n\nSelectLabelVanilla.displayName = 'SelectLabelVanilla';\n\nexport type SelectSeparatorVanillaProps = Omit<SelectPrimitive.SelectSeparatorProps, 'asChild'> &\n CSSProps;\n\nexport const SelectSeparatorVanilla = React.forwardRef<HTMLDivElement, SelectSeparatorVanillaProps>(\n ({ css, className, style, ...props }, forwardedRef) => (\n <SelectPrimitive.Separator\n ref={forwardedRef}\n className={cx(selectSeparator, className)}\n style={useInlineStyle(css, style)}\n {...props}\n />\n ),\n);\n\nSelectSeparatorVanilla.displayName = 'SelectSeparatorVanilla';\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAM,oBAAoBA,MAAAA,QAAM,cAA0B,QAAQ;AAsBlE,IAAa,gBAAgBA,MAAAA,QAAM,YAE/B,EACE,OACA,cACA,eACA,MACA,aACA,cACA,MACA,MACA,UACA,cACA,UACA,KACA,aACA,OAAO,UACP,SACA,OACA,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"}
@@ -0,0 +1,69 @@
1
+ ;/* empty css */
2
+ let _vanilla_extract_recipes_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
3
+ // components/Select/Select.vanilla.css.ts
4
+ var selectTriggerRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
5
+ defaultClassName: "_12b0twh0",
6
+ variantClassNames: {
7
+ size: {
8
+ small: "_12b0twh1",
9
+ medium: "_12b0twh2",
10
+ large: "_12b0twh3"
11
+ },
12
+ variant: { ghost: "_12b0twh4" },
13
+ state: { invalid: "_12b0twh5" }
14
+ },
15
+ defaultVariants: { size: "medium" },
16
+ compoundVariants: []
17
+ });
18
+ var selectValue = "_12b0twh6";
19
+ var selectIcon = "_12b0twh7";
20
+ var selectContent = "_12b0twh8";
21
+ var selectViewport = "_12b0twh9";
22
+ var selectScrollButton = "_12b0twha";
23
+ var selectItemRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
24
+ defaultClassName: "_12b0twhb",
25
+ variantClassNames: { size: {
26
+ small: "_12b0twhc",
27
+ medium: "_12b0twhd",
28
+ large: "_12b0twhe"
29
+ } },
30
+ defaultVariants: { size: "medium" },
31
+ compoundVariants: []
32
+ });
33
+ var selectItemContent = "_12b0twhf";
34
+ var selectItemDescriptionRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
35
+ defaultClassName: "_12b0twhg",
36
+ variantClassNames: { size: {
37
+ small: "_12b0twhh",
38
+ medium: "_12b0twhi",
39
+ large: "_12b0twhj"
40
+ } },
41
+ defaultVariants: { size: "medium" },
42
+ compoundVariants: []
43
+ });
44
+ var selectItemIndicator = "_12b0twhk";
45
+ var selectLabelRecipe = (0, _vanilla_extract_recipes_createRuntimeFn.createRuntimeFn)({
46
+ defaultClassName: "_12b0twhl",
47
+ variantClassNames: { size: {
48
+ small: "_12b0twhm",
49
+ medium: "_12b0twhn",
50
+ large: "_12b0twho"
51
+ } },
52
+ defaultVariants: { size: "medium" },
53
+ compoundVariants: []
54
+ });
55
+ var selectSeparator = "_12b0twhp";
56
+ exports.selectContent = selectContent;
57
+ exports.selectIcon = selectIcon;
58
+ exports.selectItemContent = selectItemContent;
59
+ exports.selectItemDescriptionRecipe = selectItemDescriptionRecipe;
60
+ exports.selectItemIndicator = selectItemIndicator;
61
+ exports.selectItemRecipe = selectItemRecipe;
62
+ exports.selectLabelRecipe = selectLabelRecipe;
63
+ exports.selectScrollButton = selectScrollButton;
64
+ exports.selectSeparator = selectSeparator;
65
+ exports.selectTriggerRecipe = selectTriggerRecipe;
66
+ exports.selectValue = selectValue;
67
+ exports.selectViewport = selectViewport;
68
+
69
+ //# sourceMappingURL=Select.vanilla.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.vanilla.css.cjs","names":[],"sources":[],"mappings":""}