@oztix/roadie-components 2.0.0 → 2.0.1

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 (44) hide show
  1. package/dist/Autocomplete.d.ts +17 -33
  2. package/dist/Autocomplete.js +1 -1
  3. package/dist/{Button-DagX1D_q.d.ts → Button-fnIVmjIB.d.ts} +2 -3
  4. package/dist/Button.d.ts +6 -6
  5. package/dist/Button.js +1 -1
  6. package/dist/Combobox.d.ts +18 -35
  7. package/dist/Combobox.js +1 -1
  8. package/dist/LinkButton.d.ts +1 -1
  9. package/dist/LinkButton.js +1 -1
  10. package/dist/RadioGroup.d.ts +4 -4
  11. package/dist/RadioGroup.js +1 -1
  12. package/dist/Select.d.ts +18 -31
  13. package/dist/Select.js +1 -1
  14. package/dist/Steps.d.ts +9 -10
  15. package/dist/Steps.js +1 -1
  16. package/dist/_chunks/{chunk-A6JSYXKN.js → chunk-3H22EQQ6.js} +2 -2
  17. package/dist/_chunks/{chunk-A6JSYXKN.js.map → chunk-3H22EQQ6.js.map} +1 -1
  18. package/dist/_chunks/chunk-BQEJDV7D.js +3 -0
  19. package/dist/_chunks/chunk-BQEJDV7D.js.map +1 -0
  20. package/dist/_chunks/{chunk-3HWPLULJ.js → chunk-NRVNUMJE.js} +2 -2
  21. package/dist/_chunks/chunk-NRVNUMJE.js.map +1 -0
  22. package/dist/_chunks/chunk-OIZX63GZ.js +2 -0
  23. package/dist/_chunks/chunk-OIZX63GZ.js.map +1 -0
  24. package/dist/_chunks/chunk-OPR5JL7N.js +3 -0
  25. package/dist/_chunks/chunk-OPR5JL7N.js.map +1 -0
  26. package/dist/_chunks/chunk-SCS7WZ6Z.js +3 -0
  27. package/dist/_chunks/chunk-SCS7WZ6Z.js.map +1 -0
  28. package/dist/_chunks/{chunk-2MBFDJ6K.js → chunk-XERFFH3S.js} +2 -2
  29. package/dist/_chunks/chunk-XERFFH3S.js.map +1 -0
  30. package/dist/_chunks/{chunk-3NU36NBL.js → chunk-XRFHVFJ5.js} +2 -2
  31. package/dist/_chunks/{chunk-3NU36NBL.js.map → chunk-XRFHVFJ5.js.map} +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/package.json +10 -5
  35. package/dist/_chunks/chunk-2MBFDJ6K.js.map +0 -1
  36. package/dist/_chunks/chunk-3HWPLULJ.js.map +0 -1
  37. package/dist/_chunks/chunk-FSO4EAAY.js +0 -3
  38. package/dist/_chunks/chunk-FSO4EAAY.js.map +0 -1
  39. package/dist/_chunks/chunk-M4FEKBLW.js +0 -2
  40. package/dist/_chunks/chunk-M4FEKBLW.js.map +0 -1
  41. package/dist/_chunks/chunk-RXMWFJ6W.js +0 -3
  42. package/dist/_chunks/chunk-RXMWFJ6W.js.map +0 -1
  43. package/dist/_chunks/chunk-Y6TDYPCZ.js +0 -3
  44. package/dist/_chunks/chunk-Y6TDYPCZ.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Select/index.tsx"],"names":["SelectContext","createContext","selectTriggerVariants","cva","intentVariants","SelectRoot","invalid","required","props","fieldContext","useFieldContext","resolvedInvalid","resolvedRequired","jsx","SelectPrimitive","SelectTrigger","className","intent","emphasis","size","use","inField","cn","SelectValue","SelectIcon","children","CaretDownIcon","SelectPortal","SelectPositioner","SelectPopup","SelectItem","content","jsxs","Fragment","SelectItemText","SelectItemIndicator","CheckIcon","SelectGroup","SelectGroupLabel","SelectLabel","showIndicator","RequiredIndicator","OptionalIndicator","SelectScrollUpArrow","CaretUpIcon","SelectScrollDownArrow","SelectHelperText","SelectErrorText","SelectContent","Select"],"mappings":"uaA2BMA,CAAAA,CAAgBC,aAAAA,CAAkC,EAAE,CAAA,CAI7CC,EAAwBC,GAAAA,CACnC,oQAAA,CACA,CACE,QAAA,CAAU,CACR,OAAQC,CAAAA,CACR,QAAA,CAAU,CACR,MAAA,CAAQ,2DAAA,CACR,OACE,sEACJ,CAAA,CACA,KAAM,CACJ,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,CAAAd,IAACe,CAAAA,CAAA,CACC,SAAAf,GAAAA,CAACgB,CAAAA,CAAA,CAAa,GAAGrB,CAAAA,CAAQ,SAAAiB,CAAAA,CAAS,CAAA,CACpC,EACF,CAEJ,CAEAuB,EAAc,WAAA,CAAc,gBAAA,KAIfC,CAAAA,CAAS,MAAA,CAAO,OAAO5C,CAAAA,CAAY,CAC9C,QAASU,CAAAA,CACT,KAAA,CAAOQ,EACP,IAAA,CAAMC,CAAAA,CACN,OAAQG,CAAAA,CACR,UAAA,CAAYC,EACZ,KAAA,CAAOC,CAAAA,CACP,QAASmB,CAAAA,CACT,IAAA,CAAMlB,EACN,QAAA,CAAUI,CAAAA,CACV,cAAeC,CAAAA,CACf,KAAA,CAAOE,EACP,UAAA,CAAYC,CAAAA,CACZ,MAAOC,CAAAA,CACP,UAAA,CAAYO,EACZ,SAAA,CAAWC,CAAAA,CACX,cAAeJ,CAAAA,CACf,eAAA,CAAiBE,CACnB,CAAC","file":"chunk-BQEJDV7D.js","sourcesContent":["'use client'\n\nimport {\n type ComponentProps,\n type RefAttributes,\n createContext,\n use\n} from 'react'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport { CaretDownIcon, CaretUpIcon, CheckIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\n\n/* ─── Context ─── */\n\ninterface SelectContextValue {\n invalid?: boolean\n required?: boolean\n}\n\nconst SelectContext = createContext<SelectContextValue>({})\n\n/* ─── Trigger variants (matches Input) ─── */\n\nexport const selectTriggerVariants = cva(\n 'inline-flex w-full items-center justify-between rounded-lg font-sans select-none cursor-pointer text-left data-[popup-open]:bg-[var(--color-accent-2)] data-[popup-open]:border-[var(--color-accent-9)] data-[popup-open]:outline-[length:var(--focus-ring-width)]',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal: 'emphasis-raised border border-normal is-interactive-field',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type SelectRootProps = SelectPrimitive.Root.Props<unknown> & {\n invalid?: boolean\n required?: boolean\n}\n\nexport function SelectRoot({ invalid, required, ...props }: SelectRootProps) {\n const fieldContext = useFieldContext()\n const resolvedInvalid = invalid ?? fieldContext.invalid\n const resolvedRequired = required ?? fieldContext.required\n\n return (\n <SelectContext\n value={{ invalid: resolvedInvalid, required: resolvedRequired }}\n >\n <SelectPrimitive.Root {...props} />\n </SelectContext>\n )\n}\n\nSelectRoot.displayName = 'Select'\n\n/* ─── Trigger ─── */\n\nexport type SelectTriggerProps = SelectPrimitive.Trigger.Props &\n RefAttributes<HTMLButtonElement> &\n VariantProps<typeof selectTriggerVariants>\n\nexport function SelectTrigger({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: SelectTriggerProps) {\n const fieldContext = useFieldContext()\n const { invalid } = use(SelectContext)\n const inField = !!fieldContext.fieldId\n\n return (\n <SelectPrimitive.Trigger\n className={cn(\n selectTriggerVariants({ intent, emphasis, size, className })\n )}\n {...(inField && {\n 'aria-labelledby': fieldContext.labelId || undefined,\n 'aria-describedby': invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined,\n 'aria-invalid': invalid || undefined,\n 'aria-required': fieldContext.required || undefined\n })}\n {...props}\n />\n )\n}\n\nSelectTrigger.displayName = 'Select.Trigger'\n\n/* ─── Value ─── */\n\nexport type SelectValueProps = SelectPrimitive.Value.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function SelectValue({ className, ...props }: SelectValueProps) {\n return (\n <SelectPrimitive.Value\n className={cn('truncate data-[placeholder]:text-subtle', className)}\n {...props}\n />\n )\n}\n\nSelectValue.displayName = 'Select.Value'\n\n/* ─── Icon ─── */\n\nexport type SelectIconProps = SelectPrimitive.Icon.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function SelectIcon({ className, children, ...props }: SelectIconProps) {\n return (\n <SelectPrimitive.Icon\n className={cn(\n 'duration-moderate ml-2 shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </SelectPrimitive.Icon>\n )\n}\n\nSelectIcon.displayName = 'Select.Icon'\n\n/* ─── Portal ─── */\n\nexport type SelectPortalProps = SelectPrimitive.Portal.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectPortal(props: SelectPortalProps) {\n return <SelectPrimitive.Portal {...props} />\n}\n\nSelectPortal.displayName = 'Select.Portal'\n\n/* ─── Positioner ─── */\n\nexport type SelectPositionerProps = SelectPrimitive.Positioner.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectPositioner({\n className,\n ...props\n}: SelectPositionerProps) {\n return (\n <SelectPrimitive.Positioner\n className={cn('z-50', className)}\n alignItemWithTrigger={false}\n {...props}\n />\n )\n}\n\nSelectPositioner.displayName = 'Select.Positioner'\n\n/* ─── Popup (dropdown content) ─── */\n\nexport type SelectPopupProps = SelectPrimitive.Popup.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectPopup({ className, ...props }: SelectPopupProps) {\n return (\n <SelectPrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nSelectPopup.displayName = 'Select.Popup'\n\n/* ─── Item ─── */\n\nexport type SelectItemProps = SelectPrimitive.Item.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectItem({ className, children, ...props }: SelectItemProps) {\n const content =\n typeof children === 'string' || typeof children === 'number' ? (\n <>\n <SelectItemText>{children}</SelectItemText>\n <SelectItemIndicator />\n </>\n ) : (\n children\n )\n\n return (\n <SelectPrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n >\n {content}\n </SelectPrimitive.Item>\n )\n}\n\nSelectItem.displayName = 'Select.Item'\n\n/* ─── ItemText ─── */\n\nexport type SelectItemTextProps = SelectPrimitive.ItemText.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function SelectItemText(props: SelectItemTextProps) {\n return <SelectPrimitive.ItemText {...props} />\n}\n\nSelectItemText.displayName = 'Select.ItemText'\n\n/* ─── ItemIndicator ─── */\n\nexport type SelectItemIndicatorProps = SelectPrimitive.ItemIndicator.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function SelectItemIndicator({\n className,\n children,\n ...props\n}: SelectItemIndicatorProps) {\n return (\n <SelectPrimitive.ItemIndicator\n className={cn('shrink-0 text-subtle', className)}\n {...props}\n >\n {children ?? <CheckIcon weight='bold' className='size-4' />}\n </SelectPrimitive.ItemIndicator>\n )\n}\n\nSelectItemIndicator.displayName = 'Select.ItemIndicator'\n\n/* ─── Group ─── */\n\nexport type SelectGroupProps = SelectPrimitive.Group.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectGroup({ className, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group className={cn('[&+&]:mt-1', className)} {...props} />\n )\n}\n\nSelectGroup.displayName = 'Select.Group'\n\n/* ─── GroupLabel ─── */\n\nexport type SelectGroupLabelProps = SelectPrimitive.GroupLabel.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectGroupLabel({\n className,\n ...props\n}: SelectGroupLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nSelectGroupLabel.displayName = 'Select.GroupLabel'\n\n/* ─── Label ─── */\n\nexport type SelectLabelProps = SelectPrimitive.Label.Props &\n RefAttributes<HTMLDivElement> & {\n showIndicator?: boolean\n }\n\nexport function SelectLabel({\n className,\n showIndicator,\n children,\n ...props\n}: SelectLabelProps) {\n const { required } = use(SelectContext)\n return (\n <SelectPrimitive.Label\n className={cn(\n 'flex items-center gap-1 text-sm font-medium text-normal',\n className\n )}\n {...props}\n >\n {children}\n {showIndicator &&\n (required ? (\n <>\n {' '}\n <RequiredIndicator />\n </>\n ) : (\n <>\n {' '}\n <OptionalIndicator />\n </>\n ))}\n </SelectPrimitive.Label>\n )\n}\n\nSelectLabel.displayName = 'Select.Label'\n\n/* ─── ScrollUpArrow ─── */\n\nexport type SelectScrollUpArrowProps = SelectPrimitive.ScrollUpArrow.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectScrollUpArrow({\n className,\n ...props\n}: SelectScrollUpArrowProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n className={cn(\n 'flex items-center justify-center py-1 text-subtle',\n className\n )}\n {...props}\n >\n <CaretUpIcon weight='bold' className='size-3' />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nSelectScrollUpArrow.displayName = 'Select.ScrollUpArrow'\n\n/* ─── ScrollDownArrow ─── */\n\nexport type SelectScrollDownArrowProps = SelectPrimitive.ScrollDownArrow.Props &\n RefAttributes<HTMLDivElement>\n\nexport function SelectScrollDownArrow({\n className,\n ...props\n}: SelectScrollDownArrowProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n className={cn(\n 'flex items-center justify-center py-1 text-subtle',\n className\n )}\n {...props}\n >\n <CaretDownIcon weight='bold' className='size-3' />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nSelectScrollDownArrow.displayName = 'Select.ScrollDownArrow'\n\n/* ─── HelperText ─── */\n\nexport interface SelectHelperTextProps extends ComponentProps<'p'> {}\n\nexport function SelectHelperText({\n className,\n ...props\n}: SelectHelperTextProps) {\n return <p className={cn('text-sm text-subtle', className)} {...props} />\n}\n\nSelectHelperText.displayName = 'Select.HelperText'\n\n/* ─── ErrorText ─── */\n\nexport interface SelectErrorTextProps extends ComponentProps<'p'> {}\n\nexport function SelectErrorText({ className, ...props }: SelectErrorTextProps) {\n const { invalid } = use(SelectContext)\n if (!invalid) return null\n return (\n <p\n role='alert'\n className={cn('text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nSelectErrorText.displayName = 'Select.ErrorText'\n\n/* ─── Content (convenience wrapper) ─── */\n\nexport interface SelectContentProps extends SelectPopupProps {}\n\nexport function SelectContent({ children, ...props }: SelectContentProps) {\n return (\n <SelectPortal>\n <SelectPositioner>\n <SelectPopup {...props}>{children}</SelectPopup>\n </SelectPositioner>\n </SelectPortal>\n )\n}\n\nSelectContent.displayName = 'Select.Content'\n\n/* ─── Compound export ─── */\n\nexport const Select = Object.assign(SelectRoot, {\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Positioner: SelectPositioner,\n Popup: SelectPopup,\n Content: SelectContent,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n Label: SelectLabel,\n HelperText: SelectHelperText,\n ErrorText: SelectErrorText,\n ScrollUpArrow: SelectScrollUpArrow,\n ScrollDownArrow: SelectScrollDownArrow\n})\n\nexport type SelectProps = SelectRootProps\nexport type { SelectTriggerProps as SelectTriggerVariantProps }\n"]}
@@ -1,2 +1,2 @@
1
- import {a}from'./chunk-4LGCF3SN.js';import {Button}from'@base-ui/react/button';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("btn is-interactive",{variants:{intent:a,emphasis:{strong:"emphasis-strong",normal:"emphasis-normal",subtle:"emphasis-subtle",subtler:"emphasis-subtler"},size:{xs:"btn-xs",sm:"btn-sm",md:"btn-md",lg:"btn-lg","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-md":"btn-icon-md","icon-lg":"btn-icon-lg"}},defaultVariants:{emphasis:"normal",size:"md"}});function u({className:o,intent:s,emphasis:i,size:e,...t}){return jsx(Button,{nativeButton:!t.render,className:cn(p({intent:s,emphasis:i,size:e,className:o})),...t})}u.displayName="Button";export{p as a,u as b};//# sourceMappingURL=chunk-3HWPLULJ.js.map
2
- //# sourceMappingURL=chunk-3HWPLULJ.js.map
1
+ import {a}from'./chunk-4LGCF3SN.js';import {Button}from'@base-ui/react/button';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("btn is-interactive",{variants:{intent:a,emphasis:{strong:"emphasis-strong",normal:"emphasis-normal",subtle:"emphasis-subtle",subtler:"emphasis-subtler"},size:{xs:"btn-xs",sm:"btn-sm",md:"btn-md",lg:"btn-lg","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-md":"btn-icon-md","icon-lg":"btn-icon-lg"}},defaultVariants:{emphasis:"normal",size:"md"}});function u({className:s,intent:i,emphasis:o,size:e,...t}){return jsx(Button,{nativeButton:!t.render,className:cn(p({intent:i,emphasis:o,size:e,className:s})),...t})}u.displayName="Button";export{p as a,u as b};//# sourceMappingURL=chunk-NRVNUMJE.js.map
2
+ //# sourceMappingURL=chunk-NRVNUMJE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Button/Button.tsx"],"names":["buttonVariants","cva","intentVariants","Button","className","intent","emphasis","size","props","jsx","ButtonPrimitive","cn"],"mappings":"wMAWO,IAAMA,CAAAA,CAAiBC,GAAAA,CAAI,oBAAA,CAAsB,CACtD,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,OAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,OAAA,CAAS,kBACX,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,SACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,QAAA,CACJ,SAAA,CAAW,aAAA,CACX,UAAW,aAAA,CACX,SAAA,CAAW,aAAA,CACX,SAAA,CAAW,aACb,CACF,EACA,eAAA,CAAiB,CACf,SAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CAAC,EAMM,SAASC,CAAAA,CAAO,CACrB,UAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAAgB,CACd,OACEC,GAAAA,CAACC,OAAA,CACC,YAAA,CAAc,CAACF,CAAAA,CAAM,MAAA,CACrB,SAAA,CAAWG,GAAGX,CAAAA,CAAe,CAAE,MAAA,CAAAK,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,KAAAC,CAAAA,CAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CAClE,GAAGI,CAAAA,CACN,CAEJ,CAEAL,CAAAA,CAAO,WAAA,CAAc,QAAA","file":"chunk-NRVNUMJE.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const buttonVariants = cva('btn is-interactive', {\n variants: {\n intent: intentVariants,\n emphasis: {\n strong: 'emphasis-strong',\n normal: 'emphasis-normal',\n subtle: 'emphasis-subtle',\n subtler: 'emphasis-subtler'\n },\n size: {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: 'btn-md',\n lg: 'btn-lg',\n 'icon-xs': 'btn-icon-xs',\n 'icon-sm': 'btn-icon-sm',\n 'icon-md': 'btn-icon-md',\n 'icon-lg': 'btn-icon-lg'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n})\n\nexport type ButtonProps = ButtonPrimitive.Props &\n RefAttributes<HTMLElement> &\n VariantProps<typeof buttonVariants>\n\nexport function Button({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n nativeButton={!props.render}\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nButton.displayName = 'Button'\n"]}
@@ -0,0 +1,2 @@
1
+ import {b}from'./chunk-NRVNUMJE.js';import {jsx}from'react/jsx-runtime';function o({size:n="icon-md",...r}){return jsx(b,{size:n,...r})}o.displayName="IconButton";export{o as a};//# sourceMappingURL=chunk-OIZX63GZ.js.map
2
+ //# sourceMappingURL=chunk-OIZX63GZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Button/IconButton.tsx"],"names":["IconButton","size","props","jsx","Button"],"mappings":"wEAQO,SAASA,CAAAA,CAAW,CAAE,IAAA,CAAAC,CAAAA,CAAO,SAAA,CAAW,GAAGC,CAAM,CAAA,CAAoB,CAC1E,OAAOC,GAAAA,CAACC,CAAAA,CAAA,CAAO,IAAA,CAAMH,CAAAA,CAAO,GAAGC,CAAAA,CAAO,CACxC,CAEAF,CAAAA,CAAW,WAAA,CAAc,YAAA","file":"chunk-OIZX63GZ.js","sourcesContent":["'use client'\n\nimport { Button, type ButtonProps } from './Button'\n\nexport type IconButtonProps = Omit<ButtonProps, 'aria-label'> & {\n 'aria-label': string\n}\n\nexport function IconButton({ size = 'icon-md', ...props }: IconButtonProps) {\n return <Button size={size} {...props} />\n}\n\nIconButton.displayName = 'IconButton'\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import {a as a$2}from'./chunk-N2HGY7W7.js';import {a as a$1}from'./chunk-4LGCF3SN.js';import {Combobox}from'@base-ui/react/combobox';import {CheckIcon,XIcon,CaretDownIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var O=Combobox.useFilter,M=cva("inline-flex w-full items-center rounded-lg font-sans",{variants:{intent:a$1,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field-group",subtle:"bg-subtle text-normal border border-transparent is-interactive-field-group"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function a(o){return jsx(Combobox.Root,{...o})}a.displayName="Combobox";function x({className:o,...t}){return jsx(Combobox.Label,{className:cn("text-sm font-medium text-normal",o),...t})}x.displayName="Combobox.Label";function l({className:o,intent:t,emphasis:i,size:p,...G}){let s=a$2(),E=!!s.fieldId;return jsx(Combobox.InputGroup,{className:cn(M({intent:t,emphasis:i,size:p,className:o})),"aria-invalid":E&&s.invalid||void 0,...G})}l.displayName="Combobox.InputGroup";function u({className:o,...t}){let i=a$2(),p=!!i.fieldId;return jsx(Combobox.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",o),...p&&{id:i.fieldId,"aria-invalid":i.invalid||void 0,"aria-required":i.required||void 0,"aria-describedby":i.invalid?i.errorTextId||void 0:i.helperTextId||void 0},...t})}u.displayName="Combobox.Input";function C({className:o,children:t,...i}){return jsx(Combobox.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",o),...i,children:t??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}C.displayName="Combobox.Trigger";function d({className:o,children:t,...i}){return jsx(Combobox.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",o),...i,children:t??jsx(XIcon,{weight:"bold",className:"size-4"})})}d.displayName="Combobox.Clear";function P(o){return jsx(Combobox.Portal,{...o})}P.displayName="Combobox.Portal";function c({className:o,...t}){return jsx(Combobox.Positioner,{className:cn("z-50",o),sideOffset:4,...t})}c.displayName="Combobox.Positioner";function f({className:o,...t}){return jsx(Combobox.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",o),...t})}f.displayName="Combobox.Popup";function y({className:o,...t}){return jsx(Combobox.List,{className:o,...t})}y.displayName="Combobox.List";function v({className:o,...t}){return jsx(Combobox.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",o),...t})}v.displayName="Combobox.Item";function I(o){return jsx(Combobox.Collection,{...o})}I.displayName="Combobox.Collection";function g({className:o,children:t,...i}){return jsx(Combobox.ItemIndicator,{className:cn("shrink-0 text-subtle",o),...i,children:t??jsx(CheckIcon,{weight:"bold",className:"size-4"})})}g.displayName="Combobox.ItemIndicator";function L({className:o,...t}){return jsx(Combobox.Group,{className:cn("[&+&]:mt-1",o),...t})}L.displayName="Combobox.Group";function N({className:o,...t}){return jsx(Combobox.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",o),...t})}N.displayName="Combobox.GroupLabel";function h({className:o,...t}){return jsx(Combobox.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",o),...t})}h.displayName="Combobox.Empty";function T({className:o,...t}){return jsx(Combobox.Status,{className:cn("sr-only",o),...t})}T.displayName="Combobox.Status";var q=Object.assign(a,{Label:x,InputGroup:l,Input:u,Trigger:C,Clear:d,Portal:P,Positioner:c,Popup:f,List:y,Item:v,Collection:I,ItemIndicator:g,Group:L,GroupLabel:N,Empty:h,Status:T});export{O as a,M as b,a as c,x as d,l as e,u as f,C as g,d as h,P as i,c as j,f as k,y as l,v as m,I as n,g as o,L as p,N as q,h as r,T as s,q as t};//# sourceMappingURL=chunk-OPR5JL7N.js.map
3
+ //# sourceMappingURL=chunk-OPR5JL7N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Combobox/index.tsx"],"names":["useFilter","ComboboxPrimitive","comboboxInputGroupVariants","cva","intentVariants","ComboboxRoot","props","jsx","ComboboxLabel","className","cn","ComboboxInputGroup","intent","emphasis","size","fieldContext","useFieldContext","inField","ComboboxInput","ComboboxTrigger","children","CaretDownIcon","ComboboxClear","XIcon","ComboboxPortal","ComboboxPositioner","ComboboxPopup","ComboboxList","ComboboxItem","ComboboxCollection","ComboboxItemIndicator","CheckIcon","ComboboxGroup","ComboboxGroupLabel","ComboboxEmpty","ComboboxStatus","Combobox"],"mappings":"gUAiBO,IAAMA,EAAYC,QAAAA,CAAkB,SAAA,CAK9BC,CAAAA,CAA6BC,GAAAA,CACxC,uDACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,IACR,QAAA,CAAU,CACR,MAAA,CACE,iEAAA,CACF,MAAA,CACE,4EACJ,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,sBAAA,CACJ,EAAA,CAAI,qBAAA,CACJ,GAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CACF,EAMO,SAASC,EAAaC,CAAAA,CAA0B,CACrD,OAAOC,GAAAA,CAACN,SAAkB,IAAA,CAAlB,CAAwB,GAAGK,CAAAA,CAAO,CAC5C,CAEAD,CAAAA,CAAa,WAAA,CAAc,UAAA,CAOpB,SAASG,CAAAA,CAAc,CAAE,SAAA,CAAAC,EAAW,GAAGH,CAAM,CAAA,CAAuB,CACzE,OACEC,GAAAA,CAACN,QAAAA,CAAkB,KAAA,CAAlB,CACC,UAAWS,EAAAA,CAAG,iCAAA,CAAmCD,CAAS,CAAA,CACzD,GAAGH,CAAAA,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,KAAA,CAAOG,CAAAA,CACP,MAAA,CAAQE,EACR,UAAA,CAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,KAAMC,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,UAAA,CAAYC,EACZ,aAAA,CAAeC,CAAAA,CACf,KAAA,CAAOE,CAAAA,CACP,WAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,MAAA,CAAQC,CACV,CAAC","file":"chunk-OPR5JL7N.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport {\n type ComboboxFilter,\n type ComboboxFilterOptions,\n Combobox as ComboboxPrimitive\n} from '@base-ui/react/combobox'\nimport { CaretDownIcon, CheckIcon, XIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\n\nexport const useFilter = ComboboxPrimitive.useFilter\nexport type { ComboboxFilter as Filter, ComboboxFilterOptions as FilterOptions }\n\n/* ─── Input group variants (matches Input/Select trigger) ─── */\n\nexport const comboboxInputGroupVariants = cva(\n 'inline-flex w-full items-center rounded-lg font-sans',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-sunken border border-subtle is-interactive-field-group',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field-group'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type ComboboxRootProps = ComboboxPrimitive.Root.Props<unknown>\n\nexport function ComboboxRoot(props: ComboboxRootProps) {\n return <ComboboxPrimitive.Root {...props} />\n}\n\nComboboxRoot.displayName = 'Combobox'\n\n/* ─── Label ─── */\n\nexport type ComboboxLabelProps = ComboboxPrimitive.Label.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.Label\n className={cn('text-sm font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nComboboxLabel.displayName = 'Combobox.Label'\n\n/* ─── InputGroup ─── */\n\nexport type ComboboxInputGroupProps = ComboboxPrimitive.InputGroup.Props &\n RefAttributes<HTMLDivElement> &\n VariantProps<typeof comboboxInputGroupVariants>\n\nexport function ComboboxInputGroup({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ComboboxInputGroupProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.InputGroup\n className={cn(\n comboboxInputGroupVariants({ intent, emphasis, size, className })\n )}\n aria-invalid={(inField && fieldContext.invalid) || undefined}\n {...props}\n />\n )\n}\n\nComboboxInputGroup.displayName = 'Combobox.InputGroup'\n\n/* ─── Input ─── */\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props &\n RefAttributes<HTMLInputElement>\n\nexport function ComboboxInput({ className, ...props }: ComboboxInputProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.Input\n className={cn(\n 'min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle',\n className\n )}\n {...(inField && {\n id: fieldContext.fieldId,\n 'aria-invalid': fieldContext.invalid || undefined,\n 'aria-required': fieldContext.required || undefined,\n 'aria-describedby': fieldContext.invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n )\n}\n\nComboboxInput.displayName = 'Combobox.Input'\n\n/* ─── Trigger ─── */\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n className={cn(\n 'duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Trigger>\n )\n}\n\nComboboxTrigger.displayName = 'Combobox.Trigger'\n\n/* ─── Clear ─── */\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function ComboboxClear({\n className,\n children,\n ...props\n}: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n className={cn(\n 'shrink-0 cursor-pointer text-subtle hover:text-normal',\n className\n )}\n {...props}\n >\n {children ?? <XIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Clear>\n )\n}\n\nComboboxClear.displayName = 'Combobox.Clear'\n\n/* ─── Portal ─── */\n\nexport type ComboboxPortalProps = ComboboxPrimitive.Portal.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPortal(props: ComboboxPortalProps) {\n return <ComboboxPrimitive.Portal {...props} />\n}\n\nComboboxPortal.displayName = 'Combobox.Portal'\n\n/* ─── Positioner ─── */\n\nexport type ComboboxPositionerProps = ComboboxPrimitive.Positioner.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPositioner({\n className,\n ...props\n}: ComboboxPositionerProps) {\n return (\n <ComboboxPrimitive.Positioner\n className={cn('z-50', className)}\n sideOffset={4}\n {...props}\n />\n )\n}\n\nComboboxPositioner.displayName = 'Combobox.Positioner'\n\n/* ─── Popup ─── */\n\nexport type ComboboxPopupProps = ComboboxPrimitive.Popup.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPopup({ className, ...props }: ComboboxPopupProps) {\n return (\n <ComboboxPrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxPopup.displayName = 'Combobox.Popup'\n\n/* ─── List ─── */\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxList({ className, ...props }: ComboboxListProps) {\n return <ComboboxPrimitive.List className={className} {...props} />\n}\n\nComboboxList.displayName = 'Combobox.List'\n\n/* ─── Item ─── */\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxItem({ className, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxItem.displayName = 'Combobox.Item'\n\n/* ─── Collection ─── */\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport function ComboboxCollection(props: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection {...props} />\n}\n\nComboboxCollection.displayName = 'Combobox.Collection'\n\n/* ─── ItemIndicator ─── */\n\nexport type ComboboxItemIndicatorProps = ComboboxPrimitive.ItemIndicator.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function ComboboxItemIndicator({\n className,\n children,\n ...props\n}: ComboboxItemIndicatorProps) {\n return (\n <ComboboxPrimitive.ItemIndicator\n className={cn('shrink-0 text-subtle', className)}\n {...props}\n >\n {children ?? <CheckIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.ItemIndicator>\n )\n}\n\nComboboxItemIndicator.displayName = 'Combobox.ItemIndicator'\n\n/* ─── Group ─── */\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return (\n <ComboboxPrimitive.Group\n className={cn('[&+&]:mt-1', className)}\n {...props}\n />\n )\n}\n\nComboboxGroup.displayName = 'Combobox.Group'\n\n/* ─── GroupLabel ─── */\n\nexport type ComboboxGroupLabelProps = ComboboxPrimitive.GroupLabel.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxGroupLabel({\n className,\n ...props\n}: ComboboxGroupLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxGroupLabel.displayName = 'Combobox.GroupLabel'\n\n/* ─── Empty ─── */\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n className={cn(\n 'text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxEmpty.displayName = 'Combobox.Empty'\n\n/* ─── Status ─── */\n\nexport type ComboboxStatusProps = ComboboxPrimitive.Status.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxStatus({ className, ...props }: ComboboxStatusProps) {\n return (\n <ComboboxPrimitive.Status className={cn('sr-only', className)} {...props} />\n )\n}\n\nComboboxStatus.displayName = 'Combobox.Status'\n\n/* ─── Compound export ─── */\n\nexport const Combobox = Object.assign(ComboboxRoot, {\n Label: ComboboxLabel,\n InputGroup: ComboboxInputGroup,\n Input: ComboboxInput,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Portal: ComboboxPortal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Collection: ComboboxCollection,\n ItemIndicator: ComboboxItemIndicator,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Empty: ComboboxEmpty,\n Status: ComboboxStatus\n})\n\nexport type ComboboxProps = ComboboxRootProps\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import {a as a$2}from'./chunk-N2HGY7W7.js';import {a as a$1}from'./chunk-4LGCF3SN.js';import {Autocomplete}from'@base-ui/react/autocomplete';import {XIcon,CaretDownIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var z=Autocomplete.useFilter,O=Autocomplete.useFilteredItems,w=cva("inline-flex w-full items-center rounded-lg font-sans",{variants:{intent:a$1,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field-group",subtle:"bg-subtle text-normal border border-transparent is-interactive-field-group"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function n(t){return jsx(Autocomplete.Root,{...t})}n.displayName="Autocomplete";function a(t){return jsx(Autocomplete.Value,{...t})}a.displayName="Autocomplete.Value";function c({className:t,intent:e,emphasis:p,size:l,...G}){let s=a$2(),T=!!s.fieldId;return jsx(Autocomplete.InputGroup,{className:cn(w({intent:e,emphasis:p,size:l,className:t})),"aria-invalid":T&&s.invalid||void 0,...G})}c.displayName="Autocomplete.InputGroup";function A({className:t,...e}){let p=a$2(),l=!!p.fieldId;return jsx(Autocomplete.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",t),...l&&{id:p.fieldId,"aria-invalid":p.invalid||void 0,"aria-required":p.required||void 0,"aria-describedby":p.invalid?p.errorTextId||void 0:p.helperTextId||void 0},...e})}A.displayName="Autocomplete.Input";function P({className:t,children:e,...p}){return jsx(Autocomplete.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",t),...p,children:e??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}P.displayName="Autocomplete.Trigger";function d({className:t,children:e,...p}){return jsx(Autocomplete.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",t),...p,children:e??jsx(XIcon,{weight:"bold",className:"size-4"})})}d.displayName="Autocomplete.Clear";function x(t){return jsx(Autocomplete.Portal,{...t})}x.displayName="Autocomplete.Portal";function f({className:t,...e}){return jsx(Autocomplete.Positioner,{className:cn("z-50",t),sideOffset:4,...e})}f.displayName="Autocomplete.Positioner";function y({className:t,...e}){return jsx(Autocomplete.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",t),...e})}y.displayName="Autocomplete.Popup";function b({className:t,...e}){return jsx(Autocomplete.List,{className:t,...e})}b.displayName="Autocomplete.List";function v({className:t,...e}){return jsx(Autocomplete.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",t),...e})}v.displayName="Autocomplete.Item";function g(t){return jsx(Autocomplete.Collection,{...t})}g.displayName="Autocomplete.Collection";function I({className:t,...e}){return jsx(Autocomplete.Group,{className:cn("[&+&]:mt-1",t),...e})}I.displayName="Autocomplete.Group";function N({className:t,...e}){return jsx(Autocomplete.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",t),...e})}N.displayName="Autocomplete.GroupLabel";function L({className:t,...e}){return jsx(Autocomplete.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",t),...e})}L.displayName="Autocomplete.Empty";function h({className:t,...e}){return jsx(Autocomplete.Status,{className:cn("sr-only",t),...e})}h.displayName="Autocomplete.Status";var k=Object.assign(n,{Value:a,InputGroup:c,Input:A,Trigger:P,Clear:d,Portal:x,Positioner:f,Popup:y,List:b,Item:v,Collection:g,Group:I,GroupLabel:N,Empty:L,Status:h});export{z as a,O as b,w as c,n as d,a as e,c as f,A as g,P as h,d as i,x as j,f as k,y as l,b as m,v as n,g as o,I as p,N as q,L as r,h as s,k as t};//# sourceMappingURL=chunk-SCS7WZ6Z.js.map
3
+ //# sourceMappingURL=chunk-SCS7WZ6Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Autocomplete/index.tsx"],"names":["useFilter","AutocompletePrimitive","useFilteredItems","autocompleteInputGroupVariants","cva","intentVariants","AutocompleteRoot","props","jsx","AutocompleteValue","AutocompleteInputGroup","className","intent","emphasis","size","fieldContext","useFieldContext","inField","cn","AutocompleteInput","AutocompleteTrigger","children","CaretDownIcon","AutocompleteClear","XIcon","AutocompletePortal","AutocompletePositioner","AutocompletePopup","AutocompleteList","AutocompleteItem","AutocompleteCollection","AutocompleteGroup","AutocompleteGroupLabel","AutocompleteEmpty","AutocompleteStatus","Autocomplete"],"mappings":"8TAiBO,IAAMA,EAAYC,YAAAA,CAAsB,SAAA,CAClCC,CAAAA,CAAmBD,YAAAA,CAAsB,gBAAA,CAQzCE,CAAAA,CAAiCC,GAAAA,CAC5C,sDAAA,CACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,GAAAA,CACR,QAAA,CAAU,CACR,MAAA,CACE,iEAAA,CACF,MAAA,CACE,4EACJ,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,sBAAA,CACJ,EAAA,CAAI,sBACJ,EAAA,CAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,KAAM,IACR,CACF,CACF,EAMO,SAASC,CAAAA,CAAiBC,CAAAA,CAA8B,CAC7D,OAAOC,GAAAA,CAACP,YAAAA,CAAsB,IAAA,CAAtB,CAA4B,GAAGM,CAAAA,CAAO,CAChD,CAEAD,CAAAA,CAAiB,WAAA,CAAc,cAAA,CAMxB,SAASG,CAAAA,CAAkBF,CAAAA,CAA+B,CAC/D,OAAOC,IAACP,YAAAA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AAA,CACP,MAAA,CAAQC,CACV,CAAC","file":"chunk-SCS7WZ6Z.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport {\n type AutocompleteFilter,\n type AutocompleteFilterOptions,\n Autocomplete as AutocompletePrimitive\n} from '@base-ui/react/autocomplete'\nimport { CaretDownIcon, XIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\n\nexport const useFilter = AutocompletePrimitive.useFilter\nexport const useFilteredItems = AutocompletePrimitive.useFilteredItems\nexport type {\n AutocompleteFilter as Filter,\n AutocompleteFilterOptions as FilterOptions\n}\n\n/* ─── Input group variants (matches Combobox/Select) ─── */\n\nexport const autocompleteInputGroupVariants = cva(\n 'inline-flex w-full items-center rounded-lg font-sans',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-sunken border border-subtle is-interactive-field-group',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field-group'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type AutocompleteRootProps = AutocompletePrimitive.Root.Props<unknown>\n\nexport function AutocompleteRoot(props: AutocompleteRootProps) {\n return <AutocompletePrimitive.Root {...props} />\n}\n\nAutocompleteRoot.displayName = 'Autocomplete'\n\n/* ─── Value ─── */\n\nexport type AutocompleteValueProps = AutocompletePrimitive.Value.Props\n\nexport function AutocompleteValue(props: AutocompleteValueProps) {\n return <AutocompletePrimitive.Value {...props} />\n}\n\nAutocompleteValue.displayName = 'Autocomplete.Value'\n\n/* ─── InputGroup ─── */\n\nexport type AutocompleteInputGroupProps =\n AutocompletePrimitive.InputGroup.Props &\n RefAttributes<HTMLDivElement> &\n VariantProps<typeof autocompleteInputGroupVariants>\n\nexport function AutocompleteInputGroup({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: AutocompleteInputGroupProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <AutocompletePrimitive.InputGroup\n className={cn(\n autocompleteInputGroupVariants({ intent, emphasis, size, className })\n )}\n aria-invalid={(inField && fieldContext.invalid) || undefined}\n {...props}\n />\n )\n}\n\nAutocompleteInputGroup.displayName = 'Autocomplete.InputGroup'\n\n/* ─── Input ─── */\n\nexport type AutocompleteInputProps = AutocompletePrimitive.Input.Props &\n RefAttributes<HTMLInputElement>\n\nexport function AutocompleteInput({\n className,\n ...props\n}: AutocompleteInputProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <AutocompletePrimitive.Input\n className={cn(\n 'min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle',\n className\n )}\n {...(inField && {\n id: fieldContext.fieldId,\n 'aria-invalid': fieldContext.invalid || undefined,\n 'aria-required': fieldContext.required || undefined,\n 'aria-describedby': fieldContext.invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n )\n}\n\nAutocompleteInput.displayName = 'Autocomplete.Input'\n\n/* ─── Trigger ─── */\n\nexport type AutocompleteTriggerProps = AutocompletePrimitive.Trigger.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function AutocompleteTrigger({\n className,\n children,\n ...props\n}: AutocompleteTriggerProps) {\n return (\n <AutocompletePrimitive.Trigger\n className={cn(\n 'duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </AutocompletePrimitive.Trigger>\n )\n}\n\nAutocompleteTrigger.displayName = 'Autocomplete.Trigger'\n\n/* ─── Clear ─── */\n\nexport type AutocompleteClearProps = AutocompletePrimitive.Clear.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function AutocompleteClear({\n className,\n children,\n ...props\n}: AutocompleteClearProps) {\n return (\n <AutocompletePrimitive.Clear\n className={cn(\n 'shrink-0 cursor-pointer text-subtle hover:text-normal',\n className\n )}\n {...props}\n >\n {children ?? <XIcon weight='bold' className='size-4' />}\n </AutocompletePrimitive.Clear>\n )\n}\n\nAutocompleteClear.displayName = 'Autocomplete.Clear'\n\n/* ─── Portal ─── */\n\nexport type AutocompletePortalProps = AutocompletePrimitive.Portal.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompletePortal(props: AutocompletePortalProps) {\n return <AutocompletePrimitive.Portal {...props} />\n}\n\nAutocompletePortal.displayName = 'Autocomplete.Portal'\n\n/* ─── Positioner ─── */\n\nexport type AutocompletePositionerProps =\n AutocompletePrimitive.Positioner.Props & RefAttributes<HTMLDivElement>\n\nexport function AutocompletePositioner({\n className,\n ...props\n}: AutocompletePositionerProps) {\n return (\n <AutocompletePrimitive.Positioner\n className={cn('z-50', className)}\n sideOffset={4}\n {...props}\n />\n )\n}\n\nAutocompletePositioner.displayName = 'Autocomplete.Positioner'\n\n/* ─── Popup ─── */\n\nexport type AutocompletePopupProps = AutocompletePrimitive.Popup.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompletePopup({\n className,\n ...props\n}: AutocompletePopupProps) {\n return (\n <AutocompletePrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompletePopup.displayName = 'Autocomplete.Popup'\n\n/* ─── List ─── */\n\nexport type AutocompleteListProps = AutocompletePrimitive.List.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteList({\n className,\n ...props\n}: AutocompleteListProps) {\n return <AutocompletePrimitive.List className={className} {...props} />\n}\n\nAutocompleteList.displayName = 'Autocomplete.List'\n\n/* ─── Item ─── */\n\nexport type AutocompleteItemProps = AutocompletePrimitive.Item.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteItem({\n className,\n ...props\n}: AutocompleteItemProps) {\n return (\n <AutocompletePrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteItem.displayName = 'Autocomplete.Item'\n\n/* ─── Collection ─── */\n\nexport type AutocompleteCollectionProps = AutocompletePrimitive.Collection.Props\n\nexport function AutocompleteCollection(props: AutocompleteCollectionProps) {\n return <AutocompletePrimitive.Collection {...props} />\n}\n\nAutocompleteCollection.displayName = 'Autocomplete.Collection'\n\n/* ─── Group ─── */\n\nexport type AutocompleteGroupProps = AutocompletePrimitive.Group.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteGroup({\n className,\n ...props\n}: AutocompleteGroupProps) {\n return (\n <AutocompletePrimitive.Group\n className={cn('[&+&]:mt-1', className)}\n {...props}\n />\n )\n}\n\nAutocompleteGroup.displayName = 'Autocomplete.Group'\n\n/* ─── GroupLabel ─── */\n\nexport type AutocompleteGroupLabelProps =\n AutocompletePrimitive.GroupLabel.Props & RefAttributes<HTMLDivElement>\n\nexport function AutocompleteGroupLabel({\n className,\n ...props\n}: AutocompleteGroupLabelProps) {\n return (\n <AutocompletePrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteGroupLabel.displayName = 'Autocomplete.GroupLabel'\n\n/* ─── Empty ─── */\n\nexport type AutocompleteEmptyProps = AutocompletePrimitive.Empty.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteEmpty({\n className,\n ...props\n}: AutocompleteEmptyProps) {\n return (\n <AutocompletePrimitive.Empty\n className={cn(\n 'text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteEmpty.displayName = 'Autocomplete.Empty'\n\n/* ─── Status ─── */\n\nexport type AutocompleteStatusProps = AutocompletePrimitive.Status.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteStatus({\n className,\n ...props\n}: AutocompleteStatusProps) {\n return (\n <AutocompletePrimitive.Status\n className={cn('sr-only', className)}\n {...props}\n />\n )\n}\n\nAutocompleteStatus.displayName = 'Autocomplete.Status'\n\n/* ─── Compound export ─── */\n\nexport const Autocomplete = Object.assign(AutocompleteRoot, {\n Value: AutocompleteValue,\n InputGroup: AutocompleteInputGroup,\n Input: AutocompleteInput,\n Trigger: AutocompleteTrigger,\n Clear: AutocompleteClear,\n Portal: AutocompletePortal,\n Positioner: AutocompletePositioner,\n Popup: AutocompletePopup,\n List: AutocompleteList,\n Item: AutocompleteItem,\n Collection: AutocompleteCollection,\n Group: AutocompleteGroup,\n GroupLabel: AutocompleteGroupLabel,\n Empty: AutocompleteEmpty,\n Status: AutocompleteStatus\n})\n\nexport type AutocompleteProps = AutocompleteRootProps\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {useRef,useEffect,useCallback}from'react';import {Steps}from'@ark-ui/react/steps';export{useSteps as a}from'@ark-ui/react/steps';import {CheckIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs}from'react/jsx-runtime';var R=cva("grid w-full gap-4",{variants:{direction:{horizontal:"",vertical:"grid-cols-[auto_1fr] gap-3"}},defaultVariants:{direction:"horizontal"}});function d({direction:t,className:e,...a}){return jsx(Steps.Root,{orientation:t==="vertical"?"vertical":"horizontal",className:cn(R({direction:t,className:e})),...a})}d.displayName="Steps";function m({className:t,...e}){return jsx(Steps.List,{className:cn("flex items-start justify-start rounded-xl bg-subtler px-4 py-3","data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2",t),...e})}m.displayName="Steps.List";function g({className:t,invalid:e,...a}){let T=Steps.Item,i=useRef(null),l=useRef(e);useEffect(()=>{if(e&&!l.current){let n=i.current?.querySelector('[data-part="trigger"]');n&&(n.classList.remove("animate-shake"),n.offsetWidth,n.classList.add("animate-shake"));}l.current=e;},[e]);let N=useCallback(n=>{let p=n.currentTarget.querySelector('[data-part="trigger"]');!p||!(p.getAttribute("tabindex")==="-1"&&p.hasAttribute("data-incomplete"))||(p.classList.remove("animate-shake"),p.offsetWidth,p.classList.add("animate-shake"));},[]);return jsx(T,{ref:i,className:cn("group/step-item flex flex-1 items-center last:flex-none","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",t),"data-invalid":e||void 0,onClick:N,...a})}g.displayName="Steps.Item";function u({className:t,...e}){return jsx(Steps.Trigger,{className:cn("group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out","data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2","data-current:intent-accent",t),...e})}u.displayName="Steps.Trigger";function f({className:t,children:e,...a}){return jsxs(Steps.Indicator,{className:cn("flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out","border-subtle bg-raised text-subtler","group-hover/step:outline-[length:var(--focus-ring-width)]","data-current:border-normal data-current:bg-subtle data-current:text-subtle","data-complete:emphasis-strong","group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...a,children:[jsx("span",{className:"group-data-complete/step:hidden group-data-invalid/step-item:!block",children:e}),jsx(CheckIcon,{weight:"bold",className:"hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden"})]})}f.displayName="Steps.Indicator";function S({className:t,...e}){return jsx(Steps.Separator,{className:cn("h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5","data-complete:bg-strong","data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5",t),...e})}S.displayName="Steps.Separator";function P({className:t,...e}){let a=Steps.Content;return jsx(a,{className:cn(t),...e})}P.displayName="Steps.Content";function v({className:t,...e}){return jsx(Steps.CompletedContent,{className:cn(t),...e})}v.displayName="Steps.CompletedContent";function x({className:t,...e}){return jsx(Steps.NextTrigger,{className:cn(t),...e})}x.displayName="Steps.NextTrigger";function y({className:t,...e}){return jsx(Steps.PrevTrigger,{className:cn(t),...e})}y.displayName="Steps.PrevTrigger";function C({className:t,...e}){return jsx(Steps.Progress,{className:cn("relative h-1 w-full overflow-hidden rounded-sm bg-subtle","after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out",t),...e})}C.displayName="Steps.Progress";function b({className:t,...e}){return jsx("span",{className:cn("hidden text-sm font-bold md:block","group-data-incomplete/step:text-subtle","group-data-current/step:text-subtle","group-data-complete/step:text-normal","group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...e})}b.displayName="Steps.TriggerText";var U=Object.assign(d,{List:m,Item:g,Trigger:u,TriggerText:b,Indicator:f,Separator:S,Content:P,CompletedContent:v,NextTrigger:x,PrevTrigger:y,Progress:C,Context:Steps.Context,ItemContext:Steps.ItemContext,RootProvider:Steps.RootProvider});export{R as b,U as c};//# sourceMappingURL=chunk-2MBFDJ6K.js.map
3
- //# sourceMappingURL=chunk-2MBFDJ6K.js.map
2
+ import {useRef,useEffect,useCallback}from'react';import {Steps}from'@ark-ui/react/steps';export{useSteps as a}from'@ark-ui/react/steps';import {CheckIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs}from'react/jsx-runtime';var R=cva("grid w-full gap-4",{variants:{direction:{horizontal:"",vertical:"grid-cols-[auto_1fr] gap-3"}},defaultVariants:{direction:"horizontal"}});function d({direction:t,className:e,...o}){return jsx(Steps.Root,{orientation:t==="vertical"?"vertical":"horizontal",className:cn(R({direction:t,className:e})),...o})}d.displayName="Steps";function m({className:t,...e}){return jsx(Steps.List,{className:cn("flex items-start justify-start rounded-xl bg-subtler px-4 py-3","data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2",t),...e})}m.displayName="Steps.List";function g({className:t,invalid:e,...o}){let N=Steps.Item,p=useRef(null),l=useRef(e);useEffect(()=>{if(e&&!l.current){let n=p.current?.querySelector('[data-part="trigger"]');n&&(n.classList.remove("animate-shake"),n.offsetWidth,n.classList.add("animate-shake"));}l.current=e;},[e]);let C=useCallback(n=>{let i=n.currentTarget.querySelector('[data-part="trigger"]');!i||!(i.getAttribute("tabindex")==="-1"&&i.hasAttribute("data-incomplete"))||(i.classList.remove("animate-shake"),i.offsetWidth,i.classList.add("animate-shake"));},[]);return jsx(N,{ref:p,className:cn("group/step-item flex flex-1 items-center last:flex-none","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",t),"data-invalid":e||void 0,onClick:C,...o})}g.displayName="Steps.Item";function u({className:t,...e}){return jsx(Steps.Trigger,{className:cn("group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out","data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2","data-current:intent-accent",t),...e})}u.displayName="Steps.Trigger";function S({className:t,children:e,...o}){return jsxs(Steps.Indicator,{className:cn("flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out","border-subtle bg-raised text-subtler","group-hover/step:outline-[length:var(--focus-ring-width)]","data-current:border-normal data-current:bg-subtle data-current:text-subtle","data-complete:emphasis-strong","group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...o,children:[jsx("span",{className:"group-data-complete/step:hidden group-data-invalid/step-item:!block",children:e}),jsx(CheckIcon,{weight:"bold",className:"hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden"})]})}S.displayName="Steps.Indicator";function f({className:t,...e}){return jsx(Steps.Separator,{className:cn("h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5","data-complete:bg-strong","data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5",t),...e})}f.displayName="Steps.Separator";function P({className:t,...e}){let o=Steps.Content;return jsx(o,{className:cn(t),...e})}P.displayName="Steps.Content";function v({className:t,...e}){return jsx(Steps.CompletedContent,{className:cn(t),...e})}v.displayName="Steps.CompletedContent";function x({className:t,...e}){return jsx(Steps.NextTrigger,{className:cn(t),...e})}x.displayName="Steps.NextTrigger";function b({className:t,...e}){return jsx(Steps.PrevTrigger,{className:cn(t),...e})}b.displayName="Steps.PrevTrigger";function T({className:t,...e}){return jsx(Steps.Progress,{className:cn("relative h-1 w-full overflow-hidden rounded-sm bg-subtle","after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out",t),...e})}T.displayName="Steps.Progress";function y({className:t,...e}){return jsx("span",{className:cn("hidden text-sm font-bold md:block","group-data-incomplete/step:text-subtle","group-data-current/step:text-subtle","group-data-complete/step:text-normal","group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...e})}y.displayName="Steps.TriggerText";var U=Object.assign(d,{List:m,Item:g,Trigger:u,TriggerText:y,Indicator:S,Separator:f,Content:P,CompletedContent:v,NextTrigger:x,PrevTrigger:b,Progress:T,Context:Steps.Context,ItemContext:Steps.ItemContext,RootProvider:Steps.RootProvider});export{R as b,U as c};//# sourceMappingURL=chunk-XERFFH3S.js.map
3
+ //# sourceMappingURL=chunk-XERFFH3S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Steps/index.tsx"],"names":["stepsVariants","cva","StepsRoot","direction","className","props","jsx","ArkSteps","cn","StepsList","StepsItem","invalid","Item","itemRef","useRef","prevInvalid","useEffect","trigger","handleClick","useCallback","e","StepsTrigger","StepsIndicator","children","jsxs","CheckIcon","StepsSeparator","StepsContent","Content","StepsCompletedContent","StepsNextTrigger","StepsPrevTrigger","StepsProgress","StepsTriggerText","Steps"],"mappings":"oTAqBO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAI,mBAAA,CAAqB,CACpD,QAAA,CAAU,CACR,SAAA,CAAW,CACT,UAAA,CAAY,EAAA,CACZ,QAAA,CAAU,4BACZ,CACF,CAAA,CACA,eAAA,CAAiB,CACf,SAAA,CAAW,YACb,CACF,CAAC,EAOD,SAASC,CAAAA,CAAU,CAAE,SAAA,CAAAC,CAAAA,CAAW,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAe,CACjE,OACEC,GAAAA,CAACC,KAAAA,CAAS,IAAA,CAAT,CACC,WAAA,CAAaJ,CAAAA,GAAc,UAAA,CAAa,UAAA,CAAa,YAAA,CACrD,SAAA,CAAWK,EAAAA,CAAGR,CAAAA,CAAc,CAAE,SAAA,CAAAG,CAAAA,CAAW,SAAA,CAAAC,CAAU,CAAC,CAAC,CAAA,CACpD,GAAGC,CAAAA,CACN,CAEJ,CAEAH,CAAAA,CAAU,WAAA,CAAc,OAAA,CAMxB,SAASO,CAAAA,CAAU,CAAE,SAAA,CAAAL,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAmB,CAC1D,OACEC,GAAAA,CAACC,KAAAA,CAAS,IAAA,CAAT,CACC,SAAA,CAAWC,EAAAA,CACT,gEAAA,CACA,wEAA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,CAAS,QAAA,CAAT,CACC,SAAA,CAAWC,EAAAA,CACT,0DAAA,CACA,0JAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAEA2B,CAAAA,CAAc,WAAA,CAAc,gBAAA,CAM5B,SAASC,CAAAA,CAAiB,CAAE,SAAA,CAAA7B,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA0B,CACxE,OACEC,GAAAA,CAAC,MAAA,CAAA,CACC,UAAWE,EAAAA,CACT,mCAAA,CACA,wCAAA,CACA,qCAAA,CACA,sCAAA,CACA,qFAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAEA4B,CAAAA,CAAiB,WAAA,CAAc,mBAAA,CAIxB,IAAMC,EAAQ,MAAA,CAAO,MAAA,CAAOhC,CAAAA,CAAW,CAC5C,IAAA,CAAMO,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,OAAA,CAASW,CAAAA,CACT,WAAA,CAAaY,CAAAA,CACb,SAAA,CAAWX,CAAAA,CACX,SAAA,CAAWI,CAAAA,CACX,QAASC,CAAAA,CACT,gBAAA,CAAkBE,CAAAA,CAClB,WAAA,CAAaC,CAAAA,CACb,WAAA,CAAaC,CAAAA,CACb,QAAA,CAAUC,EACV,OAAA,CAASzB,KAAAA,CAAS,OAAA,CAClB,WAAA,CAAaA,KAAAA,CAAS,WAAA,CACtB,YAAA,CAAcA,KAAAA,CAAS,YACzB,CAAC","file":"chunk-XERFFH3S.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, useCallback, useEffect, useRef } from 'react'\n\nimport {\n Steps as ArkSteps,\n type UseStepsProps,\n type UseStepsReturn,\n useSteps\n} from '@ark-ui/react/steps'\nimport { CheckIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── Re-exports ─── */\n\nexport { useSteps, type UseStepsProps, type UseStepsReturn }\n\n/* ─── Root variants ─── */\n\nexport const stepsVariants = cva('grid w-full gap-4', {\n variants: {\n direction: {\n horizontal: '',\n vertical: 'grid-cols-[auto_1fr] gap-3'\n }\n },\n defaultVariants: {\n direction: 'horizontal'\n }\n})\n\n/* ─── Root ─── */\n\nexport type StepsProps = Omit<ArkSteps.RootProps, 'orientation'> &\n VariantProps<typeof stepsVariants>\n\nfunction StepsRoot({ direction, className, ...props }: StepsProps) {\n return (\n <ArkSteps.Root\n orientation={direction === 'vertical' ? 'vertical' : 'horizontal'}\n className={cn(stepsVariants({ direction, className }))}\n {...props}\n />\n )\n}\n\nStepsRoot.displayName = 'Steps'\n\n/* ─── List ─── */\n\ntype StepsListProps = ArkSteps.ListProps\n\nfunction StepsList({ className, ...props }: StepsListProps) {\n return (\n <ArkSteps.List\n className={cn(\n 'flex items-start justify-start rounded-xl bg-subtler px-4 py-3',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsList.displayName = 'Steps.List'\n\n/* ─── Item ─── */\n\nexport interface StepsItemProps {\n index: number\n invalid?: boolean\n className?: string\n children?: React.ReactNode\n}\n\ninterface StepsItemInternalProps extends StepsItemProps {\n ref?: React.Ref<HTMLDivElement>\n onClick?: React.MouseEventHandler<HTMLDivElement>\n}\n\nfunction StepsItem({ className, invalid, ...props }: StepsItemProps) {\n // Ark UI's types lose `index` in the HTMLProps intersection (upstream bug).\n // Cast is safe — index is required by the Zag.js state machine at runtime.\n const Item = ArkSteps.Item as React.ComponentType<\n Omit<StepsItemInternalProps, 'invalid'>\n >\n\n const itemRef = useRef<HTMLDivElement>(null)\n const prevInvalid = useRef(invalid)\n\n useEffect(() => {\n if (invalid && !prevInvalid.current) {\n const trigger = itemRef.current?.querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (trigger) {\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }\n }\n prevInvalid.current = invalid\n }, [invalid])\n\n const handleClick = useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n const trigger = (e.currentTarget as HTMLElement).querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (!trigger) return\n // In linear mode, Ark sets tabindex=\"-1\" on non-current triggers\n // and the onClick returns early — the step doesn't change.\n // We detect this by checking tabindex and data-incomplete.\n const isLocked =\n trigger.getAttribute('tabindex') === '-1' &&\n trigger.hasAttribute('data-incomplete')\n if (!isLocked) return\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }, [])\n\n return (\n <Item\n ref={itemRef}\n className={cn(\n 'group/step-item flex flex-1 items-center last:flex-none',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n className\n )}\n data-invalid={invalid || undefined}\n onClick={handleClick}\n {...props}\n />\n )\n}\n\nStepsItem.displayName = 'Steps.Item'\n\n/* ─── Trigger ─── */\n\ntype StepsTriggerProps = ArkSteps.TriggerProps\n\nfunction StepsTrigger({ className, ...props }: StepsTriggerProps) {\n return (\n <ArkSteps.Trigger\n className={cn(\n 'group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out',\n 'data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2',\n 'data-current:intent-accent',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTrigger.displayName = 'Steps.Trigger'\n\n/* ─── Indicator ─── */\n\ntype StepsIndicatorProps = ArkSteps.IndicatorProps\n\nfunction StepsIndicator({\n className,\n children,\n ...props\n}: StepsIndicatorProps) {\n return (\n <ArkSteps.Indicator\n className={cn(\n 'flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out',\n 'border-subtle bg-raised text-subtler',\n 'group-hover/step:outline-[length:var(--focus-ring-width)]',\n 'data-current:border-normal data-current:bg-subtle data-current:text-subtle',\n 'data-complete:emphasis-strong',\n 'group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n >\n <span className='group-data-complete/step:hidden group-data-invalid/step-item:!block'>\n {children}\n </span>\n <CheckIcon\n weight='bold'\n className='hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden'\n />\n </ArkSteps.Indicator>\n )\n}\n\nStepsIndicator.displayName = 'Steps.Indicator'\n\n/* ─── Separator ─── */\n\ntype StepsSeparatorProps = ArkSteps.SeparatorProps\n\nfunction StepsSeparator({ className, ...props }: StepsSeparatorProps) {\n return (\n <ArkSteps.Separator\n className={cn(\n 'h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5',\n 'data-complete:bg-strong',\n 'data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsSeparator.displayName = 'Steps.Separator'\n\n/* ─── Content ─── */\n\ninterface StepsContentProps {\n index: number\n className?: string\n children?: React.ReactNode\n}\n\nfunction StepsContent({ className, ...props }: StepsContentProps) {\n const Content = ArkSteps.Content as React.ComponentType<StepsContentProps>\n return <Content className={cn(className)} {...props} />\n}\n\nStepsContent.displayName = 'Steps.Content'\n\n/* ─── CompletedContent ─── */\n\ntype StepsCompletedContentProps = ArkSteps.CompletedContentProps\n\nfunction StepsCompletedContent({\n className,\n ...props\n}: StepsCompletedContentProps) {\n return <ArkSteps.CompletedContent className={cn(className)} {...props} />\n}\n\nStepsCompletedContent.displayName = 'Steps.CompletedContent'\n\n/* ─── NextTrigger ─── */\n\ntype StepsNextTriggerProps = ArkSteps.NextTriggerProps\n\nfunction StepsNextTrigger({ className, ...props }: StepsNextTriggerProps) {\n return <ArkSteps.NextTrigger className={cn(className)} {...props} />\n}\n\nStepsNextTrigger.displayName = 'Steps.NextTrigger'\n\n/* ─── PrevTrigger ─── */\n\ntype StepsPrevTriggerProps = ArkSteps.PrevTriggerProps\n\nfunction StepsPrevTrigger({ className, ...props }: StepsPrevTriggerProps) {\n return <ArkSteps.PrevTrigger className={cn(className)} {...props} />\n}\n\nStepsPrevTrigger.displayName = 'Steps.PrevTrigger'\n\n/* ─── Progress ─── */\n\ntype StepsProgressProps = ArkSteps.ProgressProps\n\nfunction StepsProgress({ className, ...props }: StepsProgressProps) {\n return (\n <ArkSteps.Progress\n className={cn(\n 'relative h-1 w-full overflow-hidden rounded-sm bg-subtle',\n 'after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsProgress.displayName = 'Steps.Progress'\n\n/* ─── TriggerText ─── */\n\ntype StepsTriggerTextProps = ComponentProps<'span'>\n\nfunction StepsTriggerText({ className, ...props }: StepsTriggerTextProps) {\n return (\n <span\n className={cn(\n 'hidden text-sm font-bold md:block',\n 'group-data-incomplete/step:text-subtle',\n 'group-data-current/step:text-subtle',\n 'group-data-complete/step:text-normal',\n 'group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTriggerText.displayName = 'Steps.TriggerText'\n\n/* ─── Compound export ─── */\n\nexport const Steps = Object.assign(StepsRoot, {\n List: StepsList,\n Item: StepsItem,\n Trigger: StepsTrigger,\n TriggerText: StepsTriggerText,\n Indicator: StepsIndicator,\n Separator: StepsSeparator,\n Content: StepsContent,\n CompletedContent: StepsCompletedContent,\n NextTrigger: StepsNextTrigger,\n PrevTrigger: StepsPrevTrigger,\n Progress: StepsProgress,\n Context: ArkSteps.Context,\n ItemContext: ArkSteps.ItemContext,\n RootProvider: ArkSteps.RootProvider\n})\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {a}from'./chunk-N2HGY7W7.js';import {a as a$1,b}from'./chunk-LMV3JECI.js';import {createContext,use}from'react';import {Radio}from'@base-ui/react/radio';import {RadioGroup}from'@base-ui/react/radio-group';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var u=createContext({emphasis:"subtler",direction:"vertical"}),w=cva("flex flex-wrap",{variants:{direction:{vertical:"flex-col gap-2",horizontal:"flex-row gap-4"}},defaultVariants:{direction:"vertical"}}),k=cva("flex cursor-pointer select-none items-center",{variants:{emphasis:{subtler:"gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive",normal:"justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0"}},defaultVariants:{emphasis:"subtler"}});function G({className:r,direction:e="vertical",emphasis:t="subtler",invalid:n,required:p,...s}){let a$1=a(),d=n??a$1.invalid,N=p??a$1.required,I=!!a$1.fieldId;return jsx(u,{value:{emphasis:t,direction:e??"vertical",invalid:d,required:N},children:jsx(RadioGroup,{className:cn(w({direction:e,className:r})),...I&&{"aria-labelledby":a$1.labelId||void 0,"aria-describedby":d?a$1.errorTextId||void 0:a$1.helperTextId||void 0},...s})})}G.displayName="RadioGroup";function h({className:r,label:e,description:t,children:n,...p}){let{emphasis:s,direction:a}=use(u),d=jsx(Radio.Root,{className:cn("duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]",s!=="normal"&&"focus-visible:outline-[length:var(--focus-ring-width)]"),...p,children:jsx(Radio.Indicator,{className:"size-2.5 rounded-full bg-[var(--color-accent-9)]"})});return jsx("label",{className:cn(k({emphasis:s,className:r}),a==="horizontal"&&s==="normal"&&"flex-1"),children:s==="normal"?jsxs(Fragment,{children:[jsxs("div",{className:"grid gap-0.5",children:[jsxs("span",{className:"flex items-center gap-2",children:[n,e&&jsx("span",{className:"text-base font-medium text-normal",children:e})]}),t&&jsx("span",{className:"text-sm text-subtle",children:t})]}),d]}):jsxs(Fragment,{children:[d,n,e&&jsx("span",{className:"text-sm text-normal",children:e})]})})}h.displayName="RadioGroup.Item";function g({className:r,showIndicator:e,children:t,...n}){let{required:p}=use(u);return jsxs("label",{className:cn("flex w-full items-center gap-1 text-sm font-medium text-normal",r),...n,children:[t,e&&(p?jsxs(Fragment,{children:[" ",jsx(a$1,{})]}):jsxs(Fragment,{children:[" ",jsx(b,{})]}))]})}g.displayName="RadioGroup.Label";function P({className:r,...e}){return jsx("p",{className:cn("w-full text-sm text-subtle",r),...e})}P.displayName="RadioGroup.HelperText";function y({className:r,...e}){let{invalid:t}=use(u);return t?jsx("p",{role:"alert",className:cn("w-full text-sm text-subtle intent-danger",r),...e}):null}y.displayName="RadioGroup.ErrorText";var D=Object.assign(G,{Item:h,Label:g,HelperText:P,ErrorText:y});export{w as a,k as b,D as c};//# sourceMappingURL=chunk-3NU36NBL.js.map
3
- //# sourceMappingURL=chunk-3NU36NBL.js.map
2
+ import {a}from'./chunk-N2HGY7W7.js';import {a as a$1,b}from'./chunk-LMV3JECI.js';import {createContext,use}from'react';import {Radio}from'@base-ui/react/radio';import {RadioGroup}from'@base-ui/react/radio-group';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var c=createContext({emphasis:"subtler",direction:"vertical"}),w=cva("flex flex-wrap",{variants:{direction:{vertical:"flex-col gap-2",horizontal:"flex-row gap-4"}},defaultVariants:{direction:"vertical"}}),k=cva("flex cursor-pointer select-none items-center",{variants:{emphasis:{subtler:"gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive",normal:"justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0"}},defaultVariants:{emphasis:"subtler"}});function G({className:r,direction:e="vertical",emphasis:t="subtler",invalid:n,required:p,...s}){let a$1=a(),d=n??a$1.invalid,N=p??a$1.required,I=!!a$1.fieldId;return jsx(c,{value:{emphasis:t,direction:e??"vertical",invalid:d,required:N},children:jsx(RadioGroup,{className:cn(w({direction:e,className:r})),...I&&{"aria-labelledby":a$1.labelId||void 0,"aria-describedby":d?a$1.errorTextId||void 0:a$1.helperTextId||void 0},...s})})}G.displayName="RadioGroup";function h({className:r,label:e,description:t,children:n,...p}){let{emphasis:s,direction:a}=use(c),d=jsx(Radio.Root,{className:cn("duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]",s!=="normal"&&"focus-visible:outline-[length:var(--focus-ring-width)]"),...p,children:jsx(Radio.Indicator,{className:"size-2.5 rounded-full bg-[var(--color-accent-9)]"})});return jsx("label",{className:cn(k({emphasis:s,className:r}),a==="horizontal"&&s==="normal"&&"flex-1"),children:s==="normal"?jsxs(Fragment,{children:[jsxs("div",{className:"grid gap-0.5",children:[jsxs("span",{className:"flex items-center gap-2",children:[n,e&&jsx("span",{className:"text-base font-medium text-normal",children:e})]}),t&&jsx("span",{className:"text-sm text-subtle",children:t})]}),d]}):jsxs(Fragment,{children:[d,n,e&&jsx("span",{className:"text-sm text-normal",children:e})]})})}h.displayName="RadioGroup.Item";function g({className:r,showIndicator:e,children:t,...n}){let{required:p}=use(c);return jsxs("label",{className:cn("flex w-full items-center gap-1 text-sm font-medium text-normal",r),...n,children:[t,e&&(p?jsxs(Fragment,{children:[" ",jsx(a$1,{})]}):jsxs(Fragment,{children:[" ",jsx(b,{})]}))]})}g.displayName="RadioGroup.Label";function P({className:r,...e}){return jsx("p",{className:cn("w-full text-sm text-subtle",r),...e})}P.displayName="RadioGroup.HelperText";function y({className:r,...e}){let{invalid:t}=use(c);return t?jsx("p",{role:"alert",className:cn("w-full text-sm text-subtle intent-danger",r),...e}):null}y.displayName="RadioGroup.ErrorText";var D=Object.assign(G,{Item:h,Label:g,HelperText:P,ErrorText:y});export{w as a,k as b,D as c};//# sourceMappingURL=chunk-XRFHVFJ5.js.map
3
+ //# sourceMappingURL=chunk-XRFHVFJ5.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/RadioGroup/index.tsx"],"names":["RadioGroupContext","createContext","radioGroupVariants","cva","radioGroupItemVariants","RadioGroupRoot","className","direction","emphasis","invalid","required","props","fieldContext","useFieldContext","resolvedInvalid","resolvedRequired","inField","jsx","RadioGroupPrimitive","cn","RadioGroupItem","label","description","children","use","radio","Radio","jsxs","Fragment","RadioGroupLabel","showIndicator","RequiredIndicator","OptionalIndicator","RadioGroupHelperText","RadioGroupErrorText","RadioGroup"],"mappings":"2VA6BA,IAAMA,CAAAA,CAAoBC,cAAsC,CAC9D,QAAA,CAAU,SAAA,CACV,SAAA,CAAW,UACb,CAAC,EAIYC,CAAAA,CAAqBC,GAAAA,CAAI,gBAAA,CAAkB,CACtD,QAAA,CAAU,CACR,UAAW,CACT,QAAA,CAAU,gBAAA,CACV,UAAA,CAAY,gBACd,CACF,EACA,eAAA,CAAiB,CACf,UAAW,UACb,CACF,CAAC,CAAA,CAIYC,CAAAA,CAAyBD,GAAAA,CACpC,8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ANmB,IAQvB,CAEAuB,CAAAA,CAAoB,WAAA,CAAc,sBAAA,CAI3B,IAAMC,CAAAA,CAAa,OAAO,MAAA,CAAO9B,CAAAA,CAAgB,CACtD,IAAA,CAAMe,CAAAA,CACN,KAAA,CAAOS,EACP,UAAA,CAAYI,CAAAA,CACZ,SAAA,CAAWC,CACb,CAAC","file":"chunk-3NU36NBL.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } from 'react'\n\nimport { Radio } from '@base-ui/react/radio'\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { useFieldContext } from '../Field'\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\n\n/* ─── Types ─── */\n\ntype RadioGroupEmphasis = 'subtler' | 'normal'\n\n/* ─── Context ─── */\n\ntype RadioGroupDirection = 'vertical' | 'horizontal'\n\ninterface RadioGroupContextValue {\n emphasis: RadioGroupEmphasis\n direction: RadioGroupDirection\n invalid?: boolean\n required?: boolean\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>({\n emphasis: 'subtler',\n direction: 'vertical'\n})\n\n/* ─── Root variants ─── */\n\nexport const radioGroupVariants = cva('flex flex-wrap', {\n variants: {\n direction: {\n vertical: 'flex-col gap-2',\n horizontal: 'flex-row gap-4'\n }\n },\n defaultVariants: {\n direction: 'vertical'\n }\n})\n\n/* ─── Item variants ─── */\n\nexport const radioGroupItemVariants = cva(\n 'flex cursor-pointer select-none items-center',\n {\n variants: {\n emphasis: {\n subtler: 'gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive',\n normal:\n 'justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0'\n }\n },\n defaultVariants: {\n emphasis: 'subtler'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport interface RadioGroupRootProps\n extends ComponentProps<typeof RadioGroupPrimitive>,\n VariantProps<typeof radioGroupVariants> {\n emphasis?: RadioGroupEmphasis\n invalid?: boolean\n required?: boolean\n}\n\nfunction RadioGroupRoot({\n className,\n direction = 'vertical',\n emphasis = 'subtler',\n invalid,\n required,\n ...props\n}: RadioGroupRootProps) {\n const fieldContext = useFieldContext()\n const resolvedInvalid = invalid ?? fieldContext.invalid\n const resolvedRequired = required ?? fieldContext.required\n const inField = !!fieldContext.fieldId\n\n return (\n <RadioGroupContext\n value={{\n emphasis,\n direction: direction ?? 'vertical',\n invalid: resolvedInvalid,\n required: resolvedRequired\n }}\n >\n <RadioGroupPrimitive\n className={cn(radioGroupVariants({ direction, className }))}\n {...(inField && {\n 'aria-labelledby': fieldContext.labelId || undefined,\n 'aria-describedby': resolvedInvalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n </RadioGroupContext>\n )\n}\n\nRadioGroupRoot.displayName = 'RadioGroup'\n\n/* ─── Item ─── */\n\nexport interface RadioGroupItemProps extends ComponentProps<typeof Radio.Root> {\n label?: string\n description?: string\n}\n\nfunction RadioGroupItem({\n className,\n label,\n description,\n children,\n ...props\n}: RadioGroupItemProps) {\n const { emphasis, direction } = use(RadioGroupContext)\n\n const radio = (\n <Radio.Root\n className={cn(\n 'duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]',\n emphasis !== 'normal' &&\n 'focus-visible:outline-[length:var(--focus-ring-width)]'\n )}\n {...props}\n >\n <Radio.Indicator className='size-2.5 rounded-full bg-[var(--color-accent-9)]' />\n </Radio.Root>\n )\n\n return (\n <label\n className={cn(\n radioGroupItemVariants({ emphasis, className }),\n direction === 'horizontal' && emphasis === 'normal' && 'flex-1'\n )}\n >\n {emphasis === 'normal' ? (\n <>\n <div className='grid gap-0.5'>\n <span className='flex items-center gap-2'>\n {children}\n {label && (\n <span className='text-base font-medium text-normal'>\n {label}\n </span>\n )}\n </span>\n {description && (\n <span className='text-sm text-subtle'>{description}</span>\n )}\n </div>\n {radio}\n </>\n ) : (\n <>\n {radio}\n {children}\n {label && <span className='text-sm text-normal'>{label}</span>}\n </>\n )}\n </label>\n )\n}\n\nRadioGroupItem.displayName = 'RadioGroup.Item'\n\n/* ─── Label ─── */\n\nexport interface RadioGroupLabelProps extends ComponentProps<'label'> {\n showIndicator?: boolean\n}\n\nfunction RadioGroupLabel({\n className,\n showIndicator,\n children,\n ...props\n}: RadioGroupLabelProps) {\n const { required } = use(RadioGroupContext)\n return (\n <label\n className={cn(\n 'flex w-full items-center gap-1 text-sm font-medium text-normal',\n className\n )}\n {...props}\n >\n {children}\n {showIndicator &&\n (required ? (\n <>\n {' '}\n <RequiredIndicator />\n </>\n ) : (\n <>\n {' '}\n <OptionalIndicator />\n </>\n ))}\n </label>\n )\n}\n\nRadioGroupLabel.displayName = 'RadioGroup.Label'\n\n/* ─── Helper text ─── */\n\nexport interface RadioGroupHelperTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupHelperText({\n className,\n ...props\n}: RadioGroupHelperTextProps) {\n return (\n <p className={cn('w-full text-sm text-subtle', className)} {...props} />\n )\n}\n\nRadioGroupHelperText.displayName = 'RadioGroup.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface RadioGroupErrorTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupErrorText({\n className,\n ...props\n}: RadioGroupErrorTextProps) {\n const { invalid } = use(RadioGroupContext)\n if (!invalid) return null\n return (\n <p\n role='alert'\n className={cn('w-full text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nRadioGroupErrorText.displayName = 'RadioGroup.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const RadioGroup = Object.assign(RadioGroupRoot, {\n Item: RadioGroupItem,\n Label: RadioGroupLabel,\n HelperText: RadioGroupHelperText,\n ErrorText: RadioGroupErrorText\n})\n\nexport type RadioGroupProps = RadioGroupRootProps\n"]}
1
+ {"version":3,"sources":["../../src/components/RadioGroup/index.tsx"],"names":["RadioGroupContext","createContext","radioGroupVariants","cva","radioGroupItemVariants","RadioGroupRoot","className","direction","emphasis","invalid","required","props","fieldContext","useFieldContext","resolvedInvalid","resolvedRequired","inField","jsx","RadioGroupPrimitive","cn","RadioGroupItem","label","description","children","use","radio","Radio","jsxs","Fragment","RadioGroupLabel","showIndicator","RequiredIndicator","OptionalIndicator","RadioGroupHelperText","RadioGroupErrorText","RadioGroup"],"mappings":"2VA6BA,IAAMA,CAAAA,CAAoBC,cAAsC,CAC9D,QAAA,CAAU,SAAA,CACV,SAAA,CAAW,UACb,CAAC,EAIYC,CAAAA,CAAqBC,GAAAA,CAAI,gBAAA,CAAkB,CACtD,QAAA,CAAU,CACR,UAAW,CACT,QAAA,CAAU,gBAAA,CACV,UAAA,CAAY,gBACd,CACF,EACA,eAAA,CAAiB,CACf,UAAW,UACb,CACF,CAAC,CAAA,CAIYC,CAAAA,CAAyBD,GAAAA,CACpC,8CAAA,CACA,CACE,QAAA,CAAU,CACR,QAAA,CAAU,CACR,OAAA,CAAS,8DAAA,CACT,MAAA,CACE,6YACJ,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,SACZ,CACF,CACF,EAWA,SAASE,EAAe,CACtB,SAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CAAY,UAAA,CACZ,QAAA,CAAAC,CAAAA,CAAW,SAAA,CACX,QAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAA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AAGK,CAAAA,CAEH,UAAAY,CAAAA,CACAO,CAAAA,GACEpB,CAAAA,CACCiB,IAAAA,CAAAC,QAAAA,CAAA,CACG,cACDX,GAAAA,CAACc,GAAAA,CAAA,EAAkB,CAAA,CAAA,CACrB,CAAA,CAEAJ,IAAAA,CAAAC,SAAA,CACG,QAAA,CAAA,CAAA,GAAA,CACDX,GAAAA,CAACe,CAAAA,CAAA,EAAkB,CAAA,CAAA,CACrB,IAEN,CAEJ,CAEAH,EAAgB,WAAA,CAAc,kBAAA,CAM9B,SAASI,CAAAA,CAAqB,CAC5B,SAAA,CAAA3B,CAAAA,CACA,GAAGK,CACL,EAA8B,CAC5B,OACEM,GAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAWE,EAAAA,CAAG,6BAA8Bb,CAAS,CAAA,CAAI,GAAGK,CAAAA,CAAO,CAE1E,CAEAsB,EAAqB,WAAA,CAAc,uBAAA,CAMnC,SAASC,CAAAA,CAAoB,CAC3B,UAAA5B,CAAAA,CACA,GAAGK,CACL,CAAA,CAA6B,CAC3B,GAAM,CAAE,OAAA,CAAAF,CAAQ,CAAA,CAAIe,GAAAA,CAAIxB,CAAiB,CAAA,CACzC,OAAKS,CAAAA,CAEHQ,GAAAA,CAAC,GAAA,CAAA,CACC,IAAA,CAAK,OAAA,CACL,SAAA,CAAWE,GAAG,0CAAA,CAA4Cb,CAAS,CAAA,CAClE,GAAGK,CAAAA,CACN,CAAA,CANmB,IAQvB,CAEAuB,CAAAA,CAAoB,WAAA,CAAc,sBAAA,CAI3B,IAAMC,CAAAA,CAAa,OAAO,MAAA,CAAO9B,CAAAA,CAAgB,CACtD,IAAA,CAAMe,CAAAA,CACN,KAAA,CAAOS,EACP,UAAA,CAAYI,CAAAA,CACZ,SAAA,CAAWC,CACb,CAAC","file":"chunk-XRFHVFJ5.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } from 'react'\n\nimport { Radio } from '@base-ui/react/radio'\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { useFieldContext } from '../Field'\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\n\n/* ─── Types ─── */\n\ntype RadioGroupEmphasis = 'subtler' | 'normal'\n\n/* ─── Context ─── */\n\ntype RadioGroupDirection = 'vertical' | 'horizontal'\n\ninterface RadioGroupContextValue {\n emphasis: RadioGroupEmphasis\n direction: RadioGroupDirection\n invalid?: boolean\n required?: boolean\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>({\n emphasis: 'subtler',\n direction: 'vertical'\n})\n\n/* ─── Root variants ─── */\n\nexport const radioGroupVariants = cva('flex flex-wrap', {\n variants: {\n direction: {\n vertical: 'flex-col gap-2',\n horizontal: 'flex-row gap-4'\n }\n },\n defaultVariants: {\n direction: 'vertical'\n }\n})\n\n/* ─── Item variants ─── */\n\nexport const radioGroupItemVariants = cva(\n 'flex cursor-pointer select-none items-center',\n {\n variants: {\n emphasis: {\n subtler: 'gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive',\n normal:\n 'justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0'\n }\n },\n defaultVariants: {\n emphasis: 'subtler'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type RadioGroupRootProps = RadioGroupPrimitive.Props &\n VariantProps<typeof radioGroupVariants> & {\n emphasis?: RadioGroupEmphasis\n invalid?: boolean\n required?: boolean\n }\n\nfunction RadioGroupRoot({\n className,\n direction = 'vertical',\n emphasis = 'subtler',\n invalid,\n required,\n ...props\n}: RadioGroupRootProps) {\n const fieldContext = useFieldContext()\n const resolvedInvalid = invalid ?? fieldContext.invalid\n const resolvedRequired = required ?? fieldContext.required\n const inField = !!fieldContext.fieldId\n\n return (\n <RadioGroupContext\n value={{\n emphasis,\n direction: direction ?? 'vertical',\n invalid: resolvedInvalid,\n required: resolvedRequired\n }}\n >\n <RadioGroupPrimitive\n className={cn(radioGroupVariants({ direction, className }))}\n {...(inField && {\n 'aria-labelledby': fieldContext.labelId || undefined,\n 'aria-describedby': resolvedInvalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n </RadioGroupContext>\n )\n}\n\nRadioGroupRoot.displayName = 'RadioGroup'\n\n/* ─── Item ─── */\n\nexport type RadioGroupItemProps = Radio.Root.Props & {\n label?: string\n description?: string\n}\n\nfunction RadioGroupItem({\n className,\n label,\n description,\n children,\n ...props\n}: RadioGroupItemProps) {\n const { emphasis, direction } = use(RadioGroupContext)\n\n const radio = (\n <Radio.Root\n className={cn(\n 'duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]',\n emphasis !== 'normal' &&\n 'focus-visible:outline-[length:var(--focus-ring-width)]'\n )}\n {...props}\n >\n <Radio.Indicator className='size-2.5 rounded-full bg-[var(--color-accent-9)]' />\n </Radio.Root>\n )\n\n return (\n <label\n className={cn(\n radioGroupItemVariants({ emphasis, className }),\n direction === 'horizontal' && emphasis === 'normal' && 'flex-1'\n )}\n >\n {emphasis === 'normal' ? (\n <>\n <div className='grid gap-0.5'>\n <span className='flex items-center gap-2'>\n {children}\n {label && (\n <span className='text-base font-medium text-normal'>\n {label}\n </span>\n )}\n </span>\n {description && (\n <span className='text-sm text-subtle'>{description}</span>\n )}\n </div>\n {radio}\n </>\n ) : (\n <>\n {radio}\n {children}\n {label && <span className='text-sm text-normal'>{label}</span>}\n </>\n )}\n </label>\n )\n}\n\nRadioGroupItem.displayName = 'RadioGroup.Item'\n\n/* ─── Label ─── */\n\nexport interface RadioGroupLabelProps extends ComponentProps<'label'> {\n showIndicator?: boolean\n}\n\nfunction RadioGroupLabel({\n className,\n showIndicator,\n children,\n ...props\n}: RadioGroupLabelProps) {\n const { required } = use(RadioGroupContext)\n return (\n <label\n className={cn(\n 'flex w-full items-center gap-1 text-sm font-medium text-normal',\n className\n )}\n {...props}\n >\n {children}\n {showIndicator &&\n (required ? (\n <>\n {' '}\n <RequiredIndicator />\n </>\n ) : (\n <>\n {' '}\n <OptionalIndicator />\n </>\n ))}\n </label>\n )\n}\n\nRadioGroupLabel.displayName = 'RadioGroup.Label'\n\n/* ─── Helper text ─── */\n\nexport interface RadioGroupHelperTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupHelperText({\n className,\n ...props\n}: RadioGroupHelperTextProps) {\n return (\n <p className={cn('w-full text-sm text-subtle', className)} {...props} />\n )\n}\n\nRadioGroupHelperText.displayName = 'RadioGroup.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface RadioGroupErrorTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupErrorText({\n className,\n ...props\n}: RadioGroupErrorTextProps) {\n const { invalid } = use(RadioGroupContext)\n if (!invalid) return null\n return (\n <p\n role='alert'\n className={cn('w-full text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nRadioGroupErrorText.displayName = 'RadioGroup.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const RadioGroup = Object.assign(RadioGroupRoot, {\n Item: RadioGroupItem,\n Label: RadioGroupLabel,\n HelperText: RadioGroupHelperText,\n ErrorText: RadioGroupErrorText\n})\n\nexport type RadioGroupProps = RadioGroupRootProps\n"]}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-DagX1D_q.js';
1
+ export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-fnIVmjIB.js';
2
2
  export { IconButton, IconButtonProps } from './Button.js';
3
3
  export { LinkButton, LinkButtonProps, LinkIconButton, LinkIconButtonProps } from './LinkButton.js';
4
4
  export { Code, CodeProps, codeVariants } from './Code.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export{a as Marquee}from'./_chunks/chunk-FQNVMKKV.js';export{b as Prose,a as proseVariants}from'./_chunks/chunk-ZXR32FYA.js';export{c as RadioGroup,b as radioGroupItemVariants,a as radioGroupVariants}from'./_chunks/chunk-3NU36NBL.js';export{t as Select,a as selectTriggerVariants}from'./_chunks/chunk-RXMWFJ6W.js';export{b as Separator,a as separatorVariants}from'./_chunks/chunk-JGTZ3GCR.js';export{c as Steps,b as stepsVariants,a as useSteps}from'./_chunks/chunk-2MBFDJ6K.js';export{t as Combobox,b as comboboxInputGroupVariants,a as useFilter}from'./_chunks/chunk-FSO4EAAY.js';export{a as Fieldset}from'./_chunks/chunk-42UB7PQB.js';export{a as Highlight}from'./_chunks/chunk-JBHYUOI2.js';export{b as Mark,a as markVariants}from'./_chunks/chunk-WOU2B425.js';export{a as LinkButton,b as LinkIconButton}from'./_chunks/chunk-A6JSYXKN.js';export{b as Accordion,a as accordionVariants}from'./_chunks/chunk-MDRAL676.js';export{t as Autocomplete,c as autocompleteInputGroupVariants,b as useFilteredItems}from'./_chunks/chunk-Y6TDYPCZ.js';export{c as Field,a as useFieldContext,b as useFieldInputProps}from'./_chunks/chunk-N2HGY7W7.js';export{b as Textarea,a as textareaVariants}from'./_chunks/chunk-OIAETOZT.js';export{b as OptionalIndicator,a as RequiredIndicator}from'./_chunks/chunk-LMV3JECI.js';export{b as Input,a as inputVariants}from'./_chunks/chunk-VSKUGXQG.js';export{a as Label}from'./_chunks/chunk-IEDKSZAQ.js';export{b as Badge,a as badgeVariants}from'./_chunks/chunk-AFSDN4WI.js';export{a as Breadcrumb}from'./_chunks/chunk-EKOEXSAP.js';export{a as IconButton}from'./_chunks/chunk-M4FEKBLW.js';export{b as Button,a as buttonVariants}from'./_chunks/chunk-3HWPLULJ.js';export{b as Card,a as cardVariants}from'./_chunks/chunk-LHNOY24C.js';export{b as Code,a as codeVariants}from'./_chunks/chunk-DRVUAPKN.js';import'./_chunks/chunk-4LGCF3SN.js';import*as t from'react';import {generateAccentScale,generateNeutralScale,getOklchHue,getOklchChroma}from'@oztix/roadie-core/colors';export{getThemeScript}from'@oztix/roadie-core/theme';import {jsx}from'react/jsx-runtime';var Ae="#0091EB",A="theme",$e=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("color","oklch(0 0 0)"),$=t.createContext(void 0);async function Ee(o,y="roadie-accent-theme"){let u=await generateAccentScale(o),l=await generateNeutralScale(o),a=Math.round(await getOklchHue(o)),P=+(await getOklchChroma(o)).toFixed(4),m=u.light.map((e,p)=>`--color-accent-${p}: ${e};`).join(`
1
+ export{a as Marquee}from'./_chunks/chunk-FQNVMKKV.js';export{b as Prose,a as proseVariants}from'./_chunks/chunk-ZXR32FYA.js';export{c as RadioGroup,b as radioGroupItemVariants,a as radioGroupVariants}from'./_chunks/chunk-XRFHVFJ5.js';export{t as Select,a as selectTriggerVariants}from'./_chunks/chunk-BQEJDV7D.js';export{b as Separator,a as separatorVariants}from'./_chunks/chunk-JGTZ3GCR.js';export{c as Steps,b as stepsVariants,a as useSteps}from'./_chunks/chunk-XERFFH3S.js';export{t as Combobox,b as comboboxInputGroupVariants,a as useFilter}from'./_chunks/chunk-OPR5JL7N.js';export{a as Fieldset}from'./_chunks/chunk-42UB7PQB.js';export{a as Highlight}from'./_chunks/chunk-JBHYUOI2.js';export{b as Mark,a as markVariants}from'./_chunks/chunk-WOU2B425.js';export{a as LinkButton,b as LinkIconButton}from'./_chunks/chunk-3H22EQQ6.js';export{b as Accordion,a as accordionVariants}from'./_chunks/chunk-MDRAL676.js';export{t as Autocomplete,c as autocompleteInputGroupVariants,b as useFilteredItems}from'./_chunks/chunk-SCS7WZ6Z.js';export{c as Field,a as useFieldContext,b as useFieldInputProps}from'./_chunks/chunk-N2HGY7W7.js';export{b as Textarea,a as textareaVariants}from'./_chunks/chunk-OIAETOZT.js';export{b as OptionalIndicator,a as RequiredIndicator}from'./_chunks/chunk-LMV3JECI.js';export{b as Input,a as inputVariants}from'./_chunks/chunk-VSKUGXQG.js';export{a as Label}from'./_chunks/chunk-IEDKSZAQ.js';export{b as Badge,a as badgeVariants}from'./_chunks/chunk-AFSDN4WI.js';export{a as Breadcrumb}from'./_chunks/chunk-EKOEXSAP.js';export{a as IconButton}from'./_chunks/chunk-OIZX63GZ.js';export{b as Button,a as buttonVariants}from'./_chunks/chunk-NRVNUMJE.js';export{b as Card,a as cardVariants}from'./_chunks/chunk-LHNOY24C.js';export{b as Code,a as codeVariants}from'./_chunks/chunk-DRVUAPKN.js';import'./_chunks/chunk-4LGCF3SN.js';import*as t from'react';import {generateAccentScale,generateNeutralScale,getOklchHue,getOklchChroma}from'@oztix/roadie-core/colors';export{getThemeScript}from'@oztix/roadie-core/theme';import {jsx}from'react/jsx-runtime';var Ae="#0091EB",A="theme",$e=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("color","oklch(0 0 0)"),$=t.createContext(void 0);async function Ee(o,y="roadie-accent-theme"){let u=await generateAccentScale(o),l=await generateNeutralScale(o),a=Math.round(await getOklchHue(o)),P=+(await getOklchChroma(o)).toFixed(4),m=u.light.map((e,p)=>`--color-accent-${p}: ${e};`).join(`
2
2
  `),s=u.dark.map((e,p)=>`--color-accent-${p}: ${e};`).join(`
3
3
  `),d=l.light.map((e,p)=>`--color-neutral-${p}: ${e};`).join(`
4
4
  `),x=l.dark.map((e,p)=>`--color-neutral-${p}: ${e};`).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oztix/roadie-components",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "React components for the Roadie Design System",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,18 +29,21 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@ark-ui/react": "^5.0.0",
32
+ "@base-ui/react": "^1.0.0",
33
+ "class-variance-authority": "^0.7.1",
32
34
  "@phosphor-icons/react": "^2.0.0",
33
35
  "react": "^19.0.0",
34
36
  "react-dom": "^19.0.0"
35
37
  },
36
38
  "dependencies": {
37
- "@base-ui/react": "^1.0.0",
38
- "class-variance-authority": "^0.7.1",
39
39
  "@oztix/roadie-core": "2.0.0"
40
40
  },
41
41
  "devDependencies": {
42
+ "@arethetypeswrong/cli": "0.18.2",
42
43
  "@ark-ui/react": "5.35.0",
43
- "@phosphor-icons/react": "^2.1.10",
44
+ "@base-ui/react": "1.3.0",
45
+ "class-variance-authority": "0.7.1",
46
+ "@phosphor-icons/react": "2.1.10",
44
47
  "@size-limit/preset-small-lib": "12.0.1",
45
48
  "@testing-library/jest-dom": "6.9.1",
46
49
  "@testing-library/react": "16.3.0",
@@ -73,7 +76,9 @@
73
76
  }
74
77
  },
75
78
  "scripts": {
76
- "build": "tsup",
79
+ "build": "tsup && pnpm check:dts && pnpm check:exports",
80
+ "check:dts": "! grep -r 'ComponentProps<typeof' dist/*.d.ts dist/**/*.d.ts 2>/dev/null || (echo 'ERROR: dist .d.ts files contain ComponentProps<typeof> — use named prop types instead' && exit 1)",
81
+ "check:exports": "attw --pack . --profile esm-only",
77
82
  "build:spotillustration": "node scripts/svg-to-spot-illustration.cjs",
78
83
  "clean": "rm -rf node_modules dist",
79
84
  "dev": "tsup --watch",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Steps/index.tsx"],"names":["stepsVariants","cva","StepsRoot","direction","className","props","jsx","ArkSteps","cn","StepsList","StepsItem","invalid","Item","itemRef","useRef","prevInvalid","useEffect","trigger","handleClick","useCallback","e","StepsTrigger","StepsIndicator","children","jsxs","CheckIcon","StepsSeparator","StepsContent","Content","StepsCompletedContent","StepsNextTrigger","StepsPrevTrigger","StepsProgress","St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,CAEA4B,CAAAA,CAAiB,WAAA,CAAc,mBAAA,CAIxB,IAAMC,EAAQ,MAAA,CAAO,MAAA,CAAOhC,CAAAA,CAAW,CAC5C,IAAA,CAAMO,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,OAAA,CAASW,CAAAA,CACT,WAAA,CAAaY,CAAAA,CACb,SAAA,CAAWX,CAAAA,CACX,SAAA,CAAWI,CAAAA,CACX,QAASC,CAAAA,CACT,gBAAA,CAAkBE,CAAAA,CAClB,WAAA,CAAaC,CAAAA,CACb,WAAA,CAAaC,CAAAA,CACb,QAAA,CAAUC,EACV,OAAA,CAASzB,KAAAA,CAAS,OAAA,CAClB,WAAA,CAAaA,KAAAA,CAAS,WAAA,CACtB,YAAA,CAAcA,KAAAA,CAAS,YACzB,CAAC","file":"chunk-2MBFDJ6K.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, useCallback, useEffect, useRef } from 'react'\n\nimport {\n Steps as ArkSteps,\n type UseStepsProps,\n type UseStepsReturn,\n useSteps\n} from '@ark-ui/react/steps'\nimport { CheckIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── Re-exports ─── */\n\nexport { useSteps, type UseStepsProps, type UseStepsReturn }\n\n/* ─── Root variants ─── */\n\nexport const stepsVariants = cva('grid w-full gap-4', {\n variants: {\n direction: {\n horizontal: '',\n vertical: 'grid-cols-[auto_1fr] gap-3'\n }\n },\n defaultVariants: {\n direction: 'horizontal'\n }\n})\n\n/* ─── Root ─── */\n\nexport interface StepsProps\n extends Omit<ComponentProps<typeof ArkSteps.Root>, 'orientation'>,\n VariantProps<typeof stepsVariants> {}\n\nfunction StepsRoot({ direction, className, ...props }: StepsProps) {\n return (\n <ArkSteps.Root\n orientation={direction === 'vertical' ? 'vertical' : 'horizontal'}\n className={cn(stepsVariants({ direction, className }))}\n {...props}\n />\n )\n}\n\nStepsRoot.displayName = 'Steps'\n\n/* ─── List ─── */\n\ntype StepsListProps = ComponentProps<typeof ArkSteps.List>\n\nfunction StepsList({ className, ...props }: StepsListProps) {\n return (\n <ArkSteps.List\n className={cn(\n 'flex items-start justify-start rounded-xl bg-subtler px-4 py-3',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsList.displayName = 'Steps.List'\n\n/* ─── Item ─── */\n\nexport interface StepsItemProps {\n index: number\n invalid?: boolean\n className?: string\n children?: React.ReactNode\n}\n\ninterface StepsItemInternalProps extends StepsItemProps {\n ref?: React.Ref<HTMLDivElement>\n onClick?: React.MouseEventHandler<HTMLDivElement>\n}\n\nfunction StepsItem({ className, invalid, ...props }: StepsItemProps) {\n // Ark UI's types lose `index` in the HTMLProps intersection (upstream bug).\n // Cast is safe — index is required by the Zag.js state machine at runtime.\n const Item = ArkSteps.Item as React.ComponentType<\n Omit<StepsItemInternalProps, 'invalid'>\n >\n\n const itemRef = useRef<HTMLDivElement>(null)\n const prevInvalid = useRef(invalid)\n\n useEffect(() => {\n if (invalid && !prevInvalid.current) {\n const trigger = itemRef.current?.querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (trigger) {\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }\n }\n prevInvalid.current = invalid\n }, [invalid])\n\n const handleClick = useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n const trigger = (e.currentTarget as HTMLElement).querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (!trigger) return\n // In linear mode, Ark sets tabindex=\"-1\" on non-current triggers\n // and the onClick returns early — the step doesn't change.\n // We detect this by checking tabindex and data-incomplete.\n const isLocked =\n trigger.getAttribute('tabindex') === '-1' &&\n trigger.hasAttribute('data-incomplete')\n if (!isLocked) return\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }, [])\n\n return (\n <Item\n ref={itemRef}\n className={cn(\n 'group/step-item flex flex-1 items-center last:flex-none',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n className\n )}\n data-invalid={invalid || undefined}\n onClick={handleClick}\n {...props}\n />\n )\n}\n\nStepsItem.displayName = 'Steps.Item'\n\n/* ─── Trigger ─── */\n\ntype StepsTriggerProps = ComponentProps<typeof ArkSteps.Trigger>\n\nfunction StepsTrigger({ className, ...props }: StepsTriggerProps) {\n return (\n <ArkSteps.Trigger\n className={cn(\n 'group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out',\n 'data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2',\n 'data-current:intent-accent',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTrigger.displayName = 'Steps.Trigger'\n\n/* ─── Indicator ─── */\n\ntype StepsIndicatorProps = ComponentProps<typeof ArkSteps.Indicator>\n\nfunction StepsIndicator({\n className,\n children,\n ...props\n}: StepsIndicatorProps) {\n return (\n <ArkSteps.Indicator\n className={cn(\n 'flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out',\n 'border-subtle bg-raised text-subtler',\n 'group-hover/step:outline-[length:var(--focus-ring-width)]',\n 'data-current:border-normal data-current:bg-subtle data-current:text-subtle',\n 'data-complete:emphasis-strong',\n 'group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n >\n <span className='group-data-complete/step:hidden group-data-invalid/step-item:!block'>\n {children}\n </span>\n <CheckIcon\n weight='bold'\n className='hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden'\n />\n </ArkSteps.Indicator>\n )\n}\n\nStepsIndicator.displayName = 'Steps.Indicator'\n\n/* ─── Separator ─── */\n\ntype StepsSeparatorProps = ComponentProps<typeof ArkSteps.Separator>\n\nfunction StepsSeparator({ className, ...props }: StepsSeparatorProps) {\n return (\n <ArkSteps.Separator\n className={cn(\n 'h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5',\n 'data-complete:bg-strong',\n 'data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsSeparator.displayName = 'Steps.Separator'\n\n/* ─── Content ─── */\n\ninterface StepsContentProps {\n index: number\n className?: string\n children?: React.ReactNode\n}\n\nfunction StepsContent({ className, ...props }: StepsContentProps) {\n const Content = ArkSteps.Content as React.ComponentType<StepsContentProps>\n return <Content className={cn(className)} {...props} />\n}\n\nStepsContent.displayName = 'Steps.Content'\n\n/* ─── CompletedContent ─── */\n\ntype StepsCompletedContentProps = ComponentProps<\n typeof ArkSteps.CompletedContent\n>\n\nfunction StepsCompletedContent({\n className,\n ...props\n}: StepsCompletedContentProps) {\n return <ArkSteps.CompletedContent className={cn(className)} {...props} />\n}\n\nStepsCompletedContent.displayName = 'Steps.CompletedContent'\n\n/* ─── NextTrigger ─── */\n\ntype StepsNextTriggerProps = ComponentProps<typeof ArkSteps.NextTrigger>\n\nfunction StepsNextTrigger({ className, ...props }: StepsNextTriggerProps) {\n return <ArkSteps.NextTrigger className={cn(className)} {...props} />\n}\n\nStepsNextTrigger.displayName = 'Steps.NextTrigger'\n\n/* ─── PrevTrigger ─── */\n\ntype StepsPrevTriggerProps = ComponentProps<typeof ArkSteps.PrevTrigger>\n\nfunction StepsPrevTrigger({ className, ...props }: StepsPrevTriggerProps) {\n return <ArkSteps.PrevTrigger className={cn(className)} {...props} />\n}\n\nStepsPrevTrigger.displayName = 'Steps.PrevTrigger'\n\n/* ─── Progress ─── */\n\ntype StepsProgressProps = ComponentProps<typeof ArkSteps.Progress>\n\nfunction StepsProgress({ className, ...props }: StepsProgressProps) {\n return (\n <ArkSteps.Progress\n className={cn(\n 'relative h-1 w-full overflow-hidden rounded-sm bg-subtle',\n 'after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsProgress.displayName = 'Steps.Progress'\n\n/* ─── TriggerText ─── */\n\ntype StepsTriggerTextProps = ComponentProps<'span'>\n\nfunction StepsTriggerText({ className, ...props }: StepsTriggerTextProps) {\n return (\n <span\n className={cn(\n 'hidden text-sm font-bold md:block',\n 'group-data-incomplete/step:text-subtle',\n 'group-data-current/step:text-subtle',\n 'group-data-complete/step:text-normal',\n 'group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTriggerText.displayName = 'Steps.TriggerText'\n\n/* ─── Compound export ─── */\n\nexport const Steps = Object.assign(StepsRoot, {\n List: StepsList,\n Item: StepsItem,\n Trigger: StepsTrigger,\n TriggerText: StepsTriggerText,\n Indicator: StepsIndicator,\n Separator: StepsSeparator,\n Content: StepsContent,\n CompletedContent: StepsCompletedContent,\n NextTrigger: StepsNextTrigger,\n PrevTrigger: StepsPrevTrigger,\n Progress: StepsProgress,\n Context: ArkSteps.Context,\n ItemContext: ArkSteps.ItemContext,\n RootProvider: ArkSteps.RootProvider\n})\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Button/Button.tsx"],"names":["buttonVariants","cva","intentVariants","Button","className","intent","emphasis","size","props","jsx","ButtonPrimitive","cn"],"mappings":"wMAWO,IAAMA,CAAAA,CAAiBC,GAAAA,CAAI,oBAAA,CAAsB,CACtD,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,OAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,OAAA,CAAS,kBACX,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,SACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,QAAA,CACJ,SAAA,CAAW,aAAA,CACX,UAAW,aAAA,CACX,SAAA,CAAW,aAAA,CACX,SAAA,CAAW,aACb,CACF,EACA,eAAA,CAAiB,CACf,SAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CAAC,EAMM,SAASC,CAAAA,CAAO,CACrB,UAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAAgB,CACd,OACEC,GAAAA,CAACC,OAAA,CACC,YAAA,CAAc,CAACF,CAAAA,CAAM,MAAA,CACrB,SAAA,CAAWG,GAAGX,CAAAA,CAAe,CAAE,MAAA,CAAAK,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,KAAAC,CAAAA,CAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CAClE,GAAGI,CAAAA,CACN,CAEJ,CAEAL,CAAAA,CAAO,WAAA,CAAc,QAAA","file":"chunk-3HWPLULJ.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const buttonVariants = cva('btn is-interactive', {\n variants: {\n intent: intentVariants,\n emphasis: {\n strong: 'emphasis-strong',\n normal: 'emphasis-normal',\n subtle: 'emphasis-subtle',\n subtler: 'emphasis-subtler'\n },\n size: {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: 'btn-md',\n lg: 'btn-lg',\n 'icon-xs': 'btn-icon-xs',\n 'icon-sm': 'btn-icon-sm',\n 'icon-md': 'btn-icon-md',\n 'icon-lg': 'btn-icon-lg'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n})\n\nexport interface ButtonProps\n extends ComponentProps<typeof ButtonPrimitive>,\n VariantProps<typeof buttonVariants> {}\n\nexport function Button({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n nativeButton={!props.render}\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nButton.displayName = 'Button'\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import {a as a$2}from'./chunk-N2HGY7W7.js';import {a as a$1}from'./chunk-4LGCF3SN.js';import {Combobox}from'@base-ui/react/combobox';import {CheckIcon,XIcon,CaretDownIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var X=Combobox.useFilter,R=cva("inline-flex w-full items-center rounded-lg font-sans",{variants:{intent:a$1,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field-group",subtle:"bg-subtle text-normal border border-transparent is-interactive-field-group"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function a(o){return jsx(Combobox.Root,{...o})}a.displayName="Combobox";function x({className:o,...e}){return jsx(Combobox.Label,{className:cn("text-sm font-medium text-normal",o),...e})}x.displayName="Combobox.Label";function l({className:o,intent:e,emphasis:i,size:p,...w}){let m=a$2(),F=!!m.fieldId;return jsx(Combobox.InputGroup,{className:cn(R({intent:e,emphasis:i,size:p,className:o})),"aria-invalid":F&&m.invalid||void 0,...w})}l.displayName="Combobox.InputGroup";function C({className:o,...e}){let i=a$2(),p=!!i.fieldId;return jsx(Combobox.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",o),...p&&{id:i.fieldId,"aria-invalid":i.invalid||void 0,"aria-required":i.required||void 0,"aria-describedby":i.invalid?i.errorTextId||void 0:i.helperTextId||void 0},...e})}C.displayName="Combobox.Input";function u({className:o,children:e,...i}){return jsx(Combobox.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",o),...i,children:e??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}u.displayName="Combobox.Trigger";function d({className:o,children:e,...i}){return jsx(Combobox.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",o),...i,children:e??jsx(XIcon,{weight:"bold",className:"size-4"})})}d.displayName="Combobox.Clear";function c(o){return jsx(Combobox.Portal,{...o})}c.displayName="Combobox.Portal";function P({className:o,...e}){return jsx(Combobox.Positioner,{className:cn("z-50",o),sideOffset:4,...e})}P.displayName="Combobox.Positioner";function f({className:o,...e}){return jsx(Combobox.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",o),...e})}f.displayName="Combobox.Popup";function y({className:o,...e}){return jsx(Combobox.List,{className:o,...e})}y.displayName="Combobox.List";function I({className:o,...e}){return jsx(Combobox.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",o),...e})}I.displayName="Combobox.Item";function g(o){return jsx(Combobox.Collection,{...o})}g.displayName="Combobox.Collection";function v({className:o,children:e,...i}){return jsx(Combobox.ItemIndicator,{className:cn("shrink-0 text-subtle",o),...i,children:e??jsx(CheckIcon,{weight:"bold",className:"size-4"})})}v.displayName="Combobox.ItemIndicator";function N({className:o,...e}){return jsx(Combobox.Group,{className:cn("[&+&]:mt-1",o),...e})}N.displayName="Combobox.Group";function h({className:o,...e}){return jsx(Combobox.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",o),...e})}h.displayName="Combobox.GroupLabel";function G({className:o,...e}){return jsx(Combobox.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",o),...e})}G.displayName="Combobox.Empty";function L({className:o,...e}){return jsx(Combobox.Status,{className:cn("sr-only",o),...e})}L.displayName="Combobox.Status";var A=Object.assign(a,{Label:x,InputGroup:l,Input:C,Trigger:u,Clear:d,Portal:c,Positioner:P,Popup:f,List:y,Item:I,Collection:g,ItemIndicator:v,Group:N,GroupLabel:h,Empty:G,Status:L});export{X as a,R as b,a as c,x as d,l as e,C as f,u as g,d as h,c as i,P as j,f as k,y as l,I as m,g as n,v as o,N as p,h as q,G as r,L as s,A as t};//# sourceMappingURL=chunk-FSO4EAAY.js.map
3
- //# sourceMappingURL=chunk-FSO4EAAY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Combobox/index.tsx"],"names":["useFilter","ComboboxPrimitive","comboboxInputGroupVariants","cva","intentVariants","ComboboxRoot","props","jsx","ComboboxLabel","className","cn","ComboboxInputGroup","intent","emphasis","size","fieldContext","useFieldContext","inField","ComboboxInput","ComboboxTrigger","children","CaretDownIcon","ComboboxClear","XIcon","ComboboxPortal","ComboboxPositioner","ComboboxPopup","ComboboxList","ComboboxItem","ComboboxCollection","ComboboxItemIndicator","CheckIcon","ComboboxGroup","ComboboxGroupLabel","ComboboxEmpty","ComboboxStatus","Combobox"],"mappings":"gUAiBO,IAAMA,EAAYC,QAAAA,CAAkB,SAAA,CAK9BC,CAAAA,CAA6BC,GAAAA,CACxC,uDACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,IACR,QAAA,CAAU,CACR,MAAA,CACE,iEAAA,CACF,MAAA,CACE,4EACJ,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,sBAAA,CACJ,EAAA,CAAI,qBAAA,CACJ,GAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CACF,EAO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,CAAM,CAAA,CAAwB,CAC3E,OACEC,GAAAA,CAACN,QAAAA,CAAkB,MAAA,CAAlB,CAAyB,UAAWS,EAAAA,CAAG,SAAA,CAAWD,CAAS,CAAA,CAAI,GAAGH,CAAAA,CAAO,CAE9E,CAEA6B,CAAAA,CAAe,YAAc,iBAAA,CAItB,IAAMC,CAAAA,CAAW,MAAA,CAAO,MAAA,CAAO/B,CAAAA,CAAc,CAClD,KAAA,CAAOG,EACP,UAAA,CAAYG,CAAAA,CACZ,KAAA,CAAOO,CAAAA,CACP,QAASC,CAAAA,CACT,KAAA,CAAOG,CAAAA,CACP,MAAA,CAAQE,EACR,UAAA,CAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,KAAMC,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,UAAA,CAAYC,EACZ,aAAA,CAAeC,CAAAA,CACf,KAAA,CAAOE,CAAAA,CACP,WAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,MAAA,CAAQC,CACV,CAAC","file":"chunk-FSO4EAAY.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport {\n type ComboboxFilter,\n type ComboboxFilterOptions,\n Combobox as ComboboxPrimitive\n} from '@base-ui/react/combobox'\nimport { CaretDownIcon, CheckIcon, XIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\n\nexport const useFilter = ComboboxPrimitive.useFilter\nexport type { ComboboxFilter as Filter, ComboboxFilterOptions as FilterOptions }\n\n/* ─── Input group variants (matches Input/Select trigger) ─── */\n\nexport const comboboxInputGroupVariants = cva(\n 'inline-flex w-full items-center rounded-lg font-sans',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-sunken border border-subtle is-interactive-field-group',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field-group'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport interface ComboboxRootProps\n extends ComponentProps<typeof ComboboxPrimitive.Root> {}\n\nexport function ComboboxRoot(props: ComboboxRootProps) {\n return <ComboboxPrimitive.Root {...props} />\n}\n\nComboboxRoot.displayName = 'Combobox'\n\n/* ─── Label ─── */\n\nexport interface ComboboxLabelProps\n extends ComponentProps<typeof ComboboxPrimitive.Label> {}\n\nexport function ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.Label\n className={cn('text-sm font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nComboboxLabel.displayName = 'Combobox.Label'\n\n/* ─── InputGroup ─── */\n\nexport interface ComboboxInputGroupProps\n extends ComponentProps<typeof ComboboxPrimitive.InputGroup>,\n VariantProps<typeof comboboxInputGroupVariants> {}\n\nexport function ComboboxInputGroup({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ComboboxInputGroupProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.InputGroup\n className={cn(\n comboboxInputGroupVariants({ intent, emphasis, size, className })\n )}\n aria-invalid={(inField && fieldContext.invalid) || undefined}\n {...props}\n />\n )\n}\n\nComboboxInputGroup.displayName = 'Combobox.InputGroup'\n\n/* ─── Input ─── */\n\nexport interface ComboboxInputProps\n extends ComponentProps<typeof ComboboxPrimitive.Input> {}\n\nexport function ComboboxInput({ className, ...props }: ComboboxInputProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.Input\n className={cn(\n 'min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle',\n className\n )}\n {...(inField && {\n id: fieldContext.fieldId,\n 'aria-invalid': fieldContext.invalid || undefined,\n 'aria-required': fieldContext.required || undefined,\n 'aria-describedby': fieldContext.invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n )\n}\n\nComboboxInput.displayName = 'Combobox.Input'\n\n/* ─── Trigger ─── */\n\nexport interface ComboboxTriggerProps\n extends ComponentProps<typeof ComboboxPrimitive.Trigger> {}\n\nexport function ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n className={cn(\n 'duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Trigger>\n )\n}\n\nComboboxTrigger.displayName = 'Combobox.Trigger'\n\n/* ─── Clear ─── */\n\nexport interface ComboboxClearProps\n extends ComponentProps<typeof ComboboxPrimitive.Clear> {}\n\nexport function ComboboxClear({\n className,\n children,\n ...props\n}: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n className={cn(\n 'shrink-0 cursor-pointer text-subtle hover:text-normal',\n className\n )}\n {...props}\n >\n {children ?? <XIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Clear>\n )\n}\n\nComboboxClear.displayName = 'Combobox.Clear'\n\n/* ─── Portal ─── */\n\nexport interface ComboboxPortalProps\n extends ComponentProps<typeof ComboboxPrimitive.Portal> {}\n\nexport function ComboboxPortal(props: ComboboxPortalProps) {\n return <ComboboxPrimitive.Portal {...props} />\n}\n\nComboboxPortal.displayName = 'Combobox.Portal'\n\n/* ─── Positioner ─── */\n\nexport interface ComboboxPositionerProps\n extends ComponentProps<typeof ComboboxPrimitive.Positioner> {}\n\nexport function ComboboxPositioner({\n className,\n ...props\n}: ComboboxPositionerProps) {\n return (\n <ComboboxPrimitive.Positioner\n className={cn('z-50', className)}\n sideOffset={4}\n {...props}\n />\n )\n}\n\nComboboxPositioner.displayName = 'Combobox.Positioner'\n\n/* ─── Popup ─── */\n\nexport interface ComboboxPopupProps\n extends ComponentProps<typeof ComboboxPrimitive.Popup> {}\n\nexport function ComboboxPopup({ className, ...props }: ComboboxPopupProps) {\n return (\n <ComboboxPrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxPopup.displayName = 'Combobox.Popup'\n\n/* ─── List ─── */\n\nexport interface ComboboxListProps\n extends ComponentProps<typeof ComboboxPrimitive.List> {}\n\nexport function ComboboxList({ className, ...props }: ComboboxListProps) {\n return <ComboboxPrimitive.List className={className} {...props} />\n}\n\nComboboxList.displayName = 'Combobox.List'\n\n/* ─── Item ─── */\n\nexport interface ComboboxItemProps\n extends ComponentProps<typeof ComboboxPrimitive.Item> {}\n\nexport function ComboboxItem({ className, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxItem.displayName = 'Combobox.Item'\n\n/* ─── Collection ─── */\n\nexport interface ComboboxCollectionProps\n extends ComponentProps<typeof ComboboxPrimitive.Collection> {}\n\nexport function ComboboxCollection(props: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection {...props} />\n}\n\nComboboxCollection.displayName = 'Combobox.Collection'\n\n/* ─── ItemIndicator ─── */\n\nexport interface ComboboxItemIndicatorProps\n extends ComponentProps<typeof ComboboxPrimitive.ItemIndicator> {}\n\nexport function ComboboxItemIndicator({\n className,\n children,\n ...props\n}: ComboboxItemIndicatorProps) {\n return (\n <ComboboxPrimitive.ItemIndicator\n className={cn('shrink-0 text-subtle', className)}\n {...props}\n >\n {children ?? <CheckIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.ItemIndicator>\n )\n}\n\nComboboxItemIndicator.displayName = 'Combobox.ItemIndicator'\n\n/* ─── Group ─── */\n\nexport interface ComboboxGroupProps\n extends ComponentProps<typeof ComboboxPrimitive.Group> {}\n\nexport function ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return (\n <ComboboxPrimitive.Group\n className={cn('[&+&]:mt-1', className)}\n {...props}\n />\n )\n}\n\nComboboxGroup.displayName = 'Combobox.Group'\n\n/* ─── GroupLabel ─── */\n\nexport interface ComboboxGroupLabelProps\n extends ComponentProps<typeof ComboboxPrimitive.GroupLabel> {}\n\nexport function ComboboxGroupLabel({\n className,\n ...props\n}: ComboboxGroupLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxGroupLabel.displayName = 'Combobox.GroupLabel'\n\n/* ─── Empty ─── */\n\nexport interface ComboboxEmptyProps\n extends ComponentProps<typeof ComboboxPrimitive.Empty> {}\n\nexport function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n className={cn(\n 'text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxEmpty.displayName = 'Combobox.Empty'\n\n/* ─── Status ─── */\n\nexport interface ComboboxStatusProps\n extends ComponentProps<typeof ComboboxPrimitive.Status> {}\n\nexport function ComboboxStatus({ className, ...props }: ComboboxStatusProps) {\n return (\n <ComboboxPrimitive.Status className={cn('sr-only', className)} {...props} />\n )\n}\n\nComboboxStatus.displayName = 'Combobox.Status'\n\n/* ─── Compound export ─── */\n\nexport const Combobox = Object.assign(ComboboxRoot, {\n Label: ComboboxLabel,\n InputGroup: ComboboxInputGroup,\n Input: ComboboxInput,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Portal: ComboboxPortal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Collection: ComboboxCollection,\n ItemIndicator: ComboboxItemIndicator,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Empty: ComboboxEmpty,\n Status: ComboboxStatus\n})\n\nexport type ComboboxProps = ComboboxRootProps\n"]}
@@ -1,2 +0,0 @@
1
- import {b}from'./chunk-3HWPLULJ.js';import {jsx}from'react/jsx-runtime';function o({size:n="icon-md",...r}){return jsx(b,{size:n,...r})}o.displayName="IconButton";export{o as a};//# sourceMappingURL=chunk-M4FEKBLW.js.map
2
- //# sourceMappingURL=chunk-M4FEKBLW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/components/Button/IconButton.tsx"],"names":["IconButton","size","props","jsx","Button"],"mappings":"wEAWO,SAASA,CAAAA,CAAW,CAAE,IAAA,CAAAC,CAAAA,CAAO,SAAA,CAAW,GAAGC,CAAM,CAAA,CAAoB,CAC1E,OAAOC,GAAAA,CAACC,CAAAA,CAAA,CAAO,IAAA,CAAMH,CAAAA,CAAO,GAAGC,CAAAA,CAAO,CACxC,CAEAF,CAAAA,CAAW,WAAA,CAAc,YAAA","file":"chunk-M4FEKBLW.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport { Button } from './Button'\n\nexport interface IconButtonProps\n extends Omit<ComponentProps<typeof Button>, 'aria-label'> {\n 'aria-label': string\n}\n\nexport function IconButton({ size = 'icon-md', ...props }: IconButtonProps) {\n return <Button size={size} {...props} />\n}\n\nIconButton.displayName = 'IconButton'\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import {a as a$1}from'./chunk-N2HGY7W7.js';import {a as a$2,b as b$1}from'./chunk-LMV3JECI.js';import {a}from'./chunk-4LGCF3SN.js';import {createContext,use}from'react';import {Select}from'@base-ui/react/select';import {CaretDownIcon,CaretUpIcon,CheckIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var s=createContext({}),O=cva("inline-flex w-full items-center justify-between rounded-lg font-sans select-none cursor-pointer text-left data-[popup-open]:bg-[var(--color-accent-2)] data-[popup-open]:border-[var(--color-accent-9)] data-[popup-open]:outline-[length:var(--focus-ring-width)]",{variants:{intent:a,emphasis:{normal:"emphasis-raised border border-normal is-interactive-field",subtle:"bg-subtle text-normal border border-transparent is-interactive-field"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function N({invalid:e,required:t,...l}){let i=a$1(),p=e??i.invalid,a=t??i.required;return jsx(s,{value:{invalid:p,required:a},children:jsx(Select.Root,{...l})})}N.displayName="Select";function C({className:e,intent:t,emphasis:l,size:i,...p}){let a=a$1(),{invalid:y}=use(s),E=!!a.fieldId;return jsx(Select.Trigger,{className:cn(O({intent:t,emphasis:l,size:i,className:e})),...E&&{"aria-labelledby":a.labelId||void 0,"aria-describedby":y?a.errorTextId||void 0:a.helperTextId||void 0,"aria-invalid":y||void 0,"aria-required":a.required||void 0},...p})}C.displayName="Select.Trigger";function T({className:e,...t}){return jsx(Select.Value,{className:cn("truncate data-[placeholder]:text-subtle",e),...t})}T.displayName="Select.Value";function h({className:e,children:t,...l}){return jsx(Select.Icon,{className:cn("duration-moderate ml-2 shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",e),...l,children:t??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}h.displayName="Select.Icon";function u(e){return jsx(Select.Portal,{...e})}u.displayName="Select.Portal";function x({className:e,...t}){return jsx(Select.Positioner,{className:cn("z-50",e),alignItemWithTrigger:false,...t})}x.displayName="Select.Positioner";function P({className:e,...t}){return jsx(Select.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",e),...t})}P.displayName="Select.Popup";function A({className:e,children:t,...l}){let i=typeof t=="string"||typeof t=="number"?jsxs(Fragment,{children:[jsx(f,{children:t}),jsx(b,{})]}):t;return jsx(Select.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",e),...l,children:i})}A.displayName="Select.Item";function f(e){return jsx(Select.ItemText,{...e})}f.displayName="Select.ItemText";function b({className:e,children:t,...l}){return jsx(Select.ItemIndicator,{className:cn("shrink-0 text-subtle",e),...l,children:t??jsx(CheckIcon,{weight:"bold",className:"size-4"})})}b.displayName="Select.ItemIndicator";function V({className:e,...t}){return jsx(Select.Group,{className:cn("[&+&]:mt-1",e),...t})}V.displayName="Select.Group";function L({className:e,...t}){return jsx(Select.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",e),...t})}L.displayName="Select.GroupLabel";function G({className:e,showIndicator:t,children:l,...i}){let{required:p}=use(s);return jsxs(Select.Label,{className:cn("flex items-center gap-1 text-sm font-medium text-normal",e),...i,children:[l,t&&(p?jsxs(Fragment,{children:[" ",jsx(a$2,{})]}):jsxs(Fragment,{children:[" ",jsx(b$1,{})]}))]})}G.displayName="Select.Label";function q({className:e,...t}){return jsx(Select.ScrollUpArrow,{className:cn("flex items-center justify-center py-1 text-subtle",e),...t,children:jsx(CaretUpIcon,{weight:"bold",className:"size-3"})})}q.displayName="Select.ScrollUpArrow";function D({className:e,...t}){return jsx(Select.ScrollDownArrow,{className:cn("flex items-center justify-center py-1 text-subtle",e),...t,children:jsx(CaretDownIcon,{weight:"bold",className:"size-3"})})}D.displayName="Select.ScrollDownArrow";function U({className:e,...t}){return jsx("p",{className:cn("text-sm text-subtle",e),...t})}U.displayName="Select.HelperText";function R({className:e,...t}){let{invalid:l}=use(s);return l?jsx("p",{role:"alert",className:cn("text-sm text-subtle intent-danger",e),...t}):null}R.displayName="Select.ErrorText";function z({children:e,...t}){return jsx(u,{children:jsx(x,{children:jsx(P,{...t,children:e})})})}z.displayName="Select.Content";var _=Object.assign(N,{Trigger:C,Value:T,Icon:h,Portal:u,Positioner:x,Popup:P,Content:z,Item:A,ItemText:f,ItemIndicator:b,Group:V,GroupLabel:L,Label:G,HelperText:U,ErrorText:R,ScrollUpArrow:q,ScrollDownArrow:D});export{O as a,N as b,C as c,T as d,h as e,u as f,x as g,P as h,A as i,f as j,b as k,V as l,L as m,G as n,q as o,D as p,U as q,R as r,z as s,_ as t};//# sourceMappingURL=chunk-RXMWFJ6W.js.map
3
- //# sourceMappingURL=chunk-RXMWFJ6W.js.map