@oztix/roadie-components 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.d.ts +37 -0
- package/dist/Accordion.js +3 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/Autocomplete.d.ts +131 -0
- package/dist/Autocomplete.js +3 -0
- package/dist/Autocomplete.js.map +1 -0
- package/dist/Badge.d.ts +22 -0
- package/dist/Badge.js +2 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Breadcrumb.d.ts +43 -0
- package/dist/Breadcrumb.js +2 -0
- package/dist/Breadcrumb.js.map +1 -0
- package/dist/Button-DagX1D_q.d.ts +19 -0
- package/dist/Button.d.ts +11 -15
- package/dist/Button.js +1 -1
- package/dist/Card.d.ts +51 -0
- package/dist/Card.js +2 -0
- package/dist/Card.js.map +1 -0
- package/dist/Code.d.ts +14 -24
- package/dist/Code.js +1 -1
- package/dist/Combobox.d.ts +137 -0
- package/dist/Combobox.js +3 -0
- package/dist/Combobox.js.map +1 -0
- package/dist/Field.d.ts +71 -0
- package/dist/Field.js +3 -0
- package/dist/Field.js.map +1 -0
- package/dist/Fieldset.d.ts +36 -0
- package/dist/Fieldset.js +3 -0
- package/dist/Fieldset.js.map +1 -0
- package/dist/Highlight.d.ts +14 -36
- package/dist/Highlight.js +1 -1
- package/dist/Indicator.d.ts +17 -0
- package/dist/Indicator.js +2 -0
- package/dist/Indicator.js.map +1 -0
- package/dist/Input.d.ts +18 -0
- package/dist/Input.js +3 -0
- package/dist/Input.js.map +1 -0
- package/dist/Label.d.ts +11 -0
- package/dist/Label.js +2 -0
- package/dist/Label.js.map +1 -0
- package/dist/LinkButton.d.ts +35 -0
- package/dist/LinkButton.js +2 -0
- package/dist/LinkButton.js.map +1 -0
- package/dist/Mark.d.ts +15 -26
- package/dist/Mark.js +1 -1
- package/dist/Marquee.d.ts +21 -0
- package/dist/Marquee.js +3 -0
- package/dist/Marquee.js.map +1 -0
- package/dist/Prose.d.ts +22 -0
- package/dist/Prose.js +2 -0
- package/dist/Prose.js.map +1 -0
- package/dist/RadioGroup.d.ts +59 -0
- package/dist/RadioGroup.js +3 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/Select.d.ts +144 -0
- package/dist/Select.js +3 -0
- package/dist/Select.js.map +1 -0
- package/dist/Separator.d.ts +16 -0
- package/dist/Separator.js +2 -0
- package/dist/Separator.js.map +1 -0
- package/dist/SpotIllustration.d.ts +59 -24
- package/dist/SpotIllustration.js +2 -1
- package/dist/SpotIllustration.js.map +1 -1
- package/dist/Steps.d.ts +105 -0
- package/dist/Steps.js +3 -0
- package/dist/Steps.js.map +1 -0
- package/dist/Textarea.d.ts +19 -0
- package/dist/Textarea.js +3 -0
- package/dist/Textarea.js.map +1 -0
- package/dist/_chunks/chunk-2MBFDJ6K.js +3 -0
- package/dist/_chunks/chunk-2MBFDJ6K.js.map +1 -0
- package/dist/_chunks/chunk-3HWPLULJ.js +2 -0
- package/dist/_chunks/chunk-3HWPLULJ.js.map +1 -0
- package/dist/_chunks/chunk-3NU36NBL.js +3 -0
- package/dist/_chunks/chunk-3NU36NBL.js.map +1 -0
- package/dist/_chunks/chunk-42UB7PQB.js +3 -0
- package/dist/_chunks/chunk-42UB7PQB.js.map +1 -0
- package/dist/_chunks/chunk-4LGCF3SN.js +3 -0
- package/dist/_chunks/chunk-4LGCF3SN.js.map +1 -0
- package/dist/_chunks/chunk-A6JSYXKN.js +2 -0
- package/dist/_chunks/chunk-A6JSYXKN.js.map +1 -0
- package/dist/_chunks/chunk-AFSDN4WI.js +2 -0
- package/dist/_chunks/chunk-AFSDN4WI.js.map +1 -0
- package/dist/_chunks/chunk-DRVUAPKN.js +2 -0
- package/dist/_chunks/chunk-DRVUAPKN.js.map +1 -0
- package/dist/_chunks/chunk-EKOEXSAP.js +2 -0
- package/dist/_chunks/chunk-EKOEXSAP.js.map +1 -0
- package/dist/_chunks/chunk-FQNVMKKV.js +7 -0
- package/dist/_chunks/chunk-FQNVMKKV.js.map +1 -0
- package/dist/_chunks/chunk-FSO4EAAY.js +3 -0
- package/dist/_chunks/chunk-FSO4EAAY.js.map +1 -0
- package/dist/_chunks/chunk-IEDKSZAQ.js +3 -0
- package/dist/_chunks/chunk-IEDKSZAQ.js.map +1 -0
- package/dist/_chunks/chunk-JBHYUOI2.js +3 -0
- package/dist/_chunks/chunk-JBHYUOI2.js.map +1 -0
- package/dist/_chunks/chunk-JGTZ3GCR.js +2 -0
- package/dist/_chunks/chunk-JGTZ3GCR.js.map +1 -0
- package/dist/_chunks/chunk-LHNOY24C.js +2 -0
- package/dist/_chunks/chunk-LHNOY24C.js.map +1 -0
- package/dist/_chunks/chunk-LMV3JECI.js +3 -0
- package/dist/_chunks/chunk-LMV3JECI.js.map +1 -0
- package/dist/_chunks/chunk-M4FEKBLW.js +2 -0
- package/dist/_chunks/chunk-M4FEKBLW.js.map +1 -0
- package/dist/_chunks/chunk-MDRAL676.js +3 -0
- package/dist/_chunks/chunk-MDRAL676.js.map +1 -0
- package/dist/_chunks/chunk-N2HGY7W7.js +3 -0
- package/dist/_chunks/chunk-N2HGY7W7.js.map +1 -0
- package/dist/_chunks/chunk-OIAETOZT.js +3 -0
- package/dist/_chunks/chunk-OIAETOZT.js.map +1 -0
- package/dist/_chunks/chunk-RXMWFJ6W.js +3 -0
- package/dist/_chunks/chunk-RXMWFJ6W.js.map +1 -0
- package/dist/_chunks/chunk-VSKUGXQG.js +3 -0
- package/dist/_chunks/chunk-VSKUGXQG.js.map +1 -0
- package/dist/_chunks/chunk-WOU2B425.js +3 -0
- package/dist/_chunks/chunk-WOU2B425.js.map +1 -0
- package/dist/_chunks/chunk-Y6TDYPCZ.js +3 -0
- package/dist/_chunks/chunk-Y6TDYPCZ.js.map +1 -0
- package/dist/_chunks/chunk-ZXR32FYA.js +2 -0
- package/dist/_chunks/chunk-ZXR32FYA.js.map +1 -0
- package/dist/index.d.ts +60 -15
- package/dist/index.js +34 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -22
- package/dist/Container.d.ts +0 -34
- package/dist/Container.js +0 -2
- package/dist/Container.js.map +0 -1
- package/dist/Heading.d.ts +0 -45
- package/dist/Heading.js +0 -2
- package/dist/Heading.js.map +0 -1
- package/dist/Text.d.ts +0 -47
- package/dist/Text.js +0 -2
- package/dist/Text.js.map +0 -1
- package/dist/View.d.ts +0 -12
- package/dist/View.js +0 -2
- package/dist/View.js.map +0 -1
- package/dist/_chunks/chunk-AZZHYO2A.js +0 -3
- package/dist/_chunks/chunk-AZZHYO2A.js.map +0 -1
- package/dist/_chunks/chunk-JOQJCXYF.js +0 -2
- package/dist/_chunks/chunk-JOQJCXYF.js.map +0 -1
- package/dist/_chunks/chunk-NMGF2AP6.js +0 -2
- package/dist/_chunks/chunk-NMGF2AP6.js.map +0 -1
- package/dist/_chunks/chunk-OH4JYS35.js +0 -3
- package/dist/_chunks/chunk-OH4JYS35.js.map +0 -1
- package/dist/_chunks/chunk-P5L5LN6E.js +0 -2
- package/dist/_chunks/chunk-P5L5LN6E.js.map +0 -1
- package/dist/_chunks/chunk-RJEJUZ3O.js +0 -2
- package/dist/_chunks/chunk-RJEJUZ3O.js.map +0 -1
- package/dist/_chunks/chunk-SUDUTP6A.js +0 -3
- package/dist/_chunks/chunk-SUDUTP6A.js.map +0 -1
- package/dist/_chunks/chunk-YNF56IUK.js +0 -2
- package/dist/_chunks/chunk-YNF56IUK.js.map +0 -1
- package/dist/_chunks/chunk-ZXS7U3VJ.js +0 -2
- package/dist/_chunks/chunk-ZXS7U3VJ.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -27
- package/dist/hooks/index.js +0 -2
- package/dist/hooks/index.js.map +0 -1
- package/src/components/Button/Button.test.tsx +0 -156
- package/src/components/Button/Button.tsx +0 -12
- package/src/components/Button/IconButton.test.tsx +0 -234
- package/src/components/Button/IconButton.tsx +0 -14
- package/src/components/Button/index.tsx +0 -2
- package/src/components/Code/Code.test.tsx +0 -85
- package/src/components/Code/index.tsx +0 -37
- package/src/components/Container/Container.test.tsx +0 -241
- package/src/components/Container/index.tsx +0 -34
- package/src/components/Heading/Heading.test.tsx +0 -128
- package/src/components/Heading/index.tsx +0 -49
- package/src/components/Highlight/Highlight.test.tsx +0 -113
- package/src/components/Highlight/index.tsx +0 -96
- package/src/components/Mark/Mark.test.tsx +0 -82
- package/src/components/Mark/index.tsx +0 -33
- package/src/components/SpotIllustration/ArrowUpRight.tsx +0 -9
- package/src/components/SpotIllustration/CowboyHat.tsx +0 -6
- package/src/components/SpotIllustration/Cursor.tsx +0 -6
- package/src/components/SpotIllustration/FlowerSpiral.tsx +0 -9
- package/src/components/SpotIllustration/Football.tsx +0 -6
- package/src/components/SpotIllustration/Hand.tsx +0 -6
- package/src/components/SpotIllustration/Heart.tsx +0 -6
- package/src/components/SpotIllustration/HighFive.tsx +0 -6
- package/src/components/SpotIllustration/MapPin.tsx +0 -6
- package/src/components/SpotIllustration/NoteMusic.tsx +0 -6
- package/src/components/SpotIllustration/README.md +0 -280
- package/src/components/SpotIllustration/SpotIllustration.test.tsx +0 -179
- package/src/components/SpotIllustration/SpotIllustration.tsx +0 -96
- package/src/components/SpotIllustration/Ticket.tsx +0 -6
- package/src/components/SpotIllustration/WineGlass.tsx +0 -6
- package/src/components/SpotIllustration/createSpotIllustration.tsx +0 -46
- package/src/components/SpotIllustration/index.tsx +0 -42
- package/src/components/SpotIllustration/json/arrow-up-right.json +0 -34
- package/src/components/SpotIllustration/json/cowboy-hat.json +0 -34
- package/src/components/SpotIllustration/json/cursor.json +0 -34
- package/src/components/SpotIllustration/json/flower-spiral.json +0 -38
- package/src/components/SpotIllustration/json/football.json +0 -46
- package/src/components/SpotIllustration/json/hand.json +0 -22
- package/src/components/SpotIllustration/json/heart.json +0 -26
- package/src/components/SpotIllustration/json/high-five.json +0 -62
- package/src/components/SpotIllustration/json/map-pin.json +0 -26
- package/src/components/SpotIllustration/json/note-music.json +0 -42
- package/src/components/SpotIllustration/json/ticket.json +0 -42
- package/src/components/SpotIllustration/json/wine-glass.json +0 -34
- package/src/components/SpotIllustration/svgs/arrow-up-right.svg +0 -9
- package/src/components/SpotIllustration/svgs/cowboy-hat.svg +0 -9
- package/src/components/SpotIllustration/svgs/cursor.svg +0 -9
- package/src/components/SpotIllustration/svgs/flower-spiral.svg +0 -10
- package/src/components/SpotIllustration/svgs/football.svg +0 -12
- package/src/components/SpotIllustration/svgs/hand.svg +0 -6
- package/src/components/SpotIllustration/svgs/heart.svg +0 -7
- package/src/components/SpotIllustration/svgs/high-five.svg +0 -16
- package/src/components/SpotIllustration/svgs/map-pin.svg +0 -7
- package/src/components/SpotIllustration/svgs/note-music.svg +0 -11
- package/src/components/SpotIllustration/svgs/ticket.svg +0 -11
- package/src/components/SpotIllustration/svgs/wine-glass.svg +0 -9
- package/src/components/Text/Text.test.tsx +0 -121
- package/src/components/Text/index.tsx +0 -51
- package/src/components/View/View.test.tsx +0 -161
- package/src/components/View/index.tsx +0 -12
- package/src/components/index.ts +0 -17
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useColorMode.ts +0 -37
- package/src/index.test.tsx +0 -37
- package/src/index.tsx +0 -9
|
@@ -0,0 +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,CAC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Q,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-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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {createContext,use}from'react';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var n=createContext({});function l({className:e,invalid:t,...r}){return jsx(n,{value:{invalid:t},children:jsx("fieldset",{className:cn("m-0 border-none p-0 [&>*+*]:mt-6",e),...r})})}l.displayName="Fieldset";function i({className:e,...t}){return jsx("legend",{className:cn("text-lg font-semibold text-strong",e),...t})}i.displayName="Fieldset.Legend";function d({className:e,...t}){return jsx("p",{className:cn("text-sm text-subtle",e),...t})}d.displayName="Fieldset.HelperText";function p({className:e,...t}){let{invalid:r}=use(n);return r?jsx("p",{role:"alert",className:cn("text-sm text-subtle intent-danger",e),...t}):null}p.displayName="Fieldset.ErrorText";var c=Object.assign(l,{Legend:i,HelperText:d,ErrorText:p});export{c as a};//# sourceMappingURL=chunk-42UB7PQB.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-42UB7PQB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Fieldset/index.tsx"],"names":["FieldsetContext","createContext","FieldsetRoot","className","invalid","props","jsx","cn","FieldsetLegend","FieldsetHelperText","FieldsetErrorText","use","Fieldset"],"mappings":"oHAYA,IAAMA,CAAAA,CAAkBC,cAAoC,E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AAW,MAAA,CAAO,MAAA,CAAOV,CAAAA,CAAc,CAClD,OAAQM,CAAAA,CACR,UAAA,CAAYC,CAAAA,CACZ,SAAA,CAAWC,CACb,CAAC","file":"chunk-42UB7PQB.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── Context ─── */\n\ninterface FieldsetContextValue {\n invalid?: boolean\n}\n\nconst FieldsetContext = createContext<FieldsetContextValue>({})\n\n/* ─── Root ─── */\n\nexport interface FieldsetRootProps extends ComponentProps<'fieldset'> {\n invalid?: boolean\n}\n\nfunction FieldsetRoot({ className, invalid, ...props }: FieldsetRootProps) {\n return (\n <FieldsetContext value={{ invalid }}>\n <fieldset\n className={cn('m-0 border-none p-0 [&>*+*]:mt-6', className)}\n {...props}\n />\n </FieldsetContext>\n )\n}\n\nFieldsetRoot.displayName = 'Fieldset'\n\n/* ─── Legend ─── */\n\nexport interface FieldsetLegendProps extends ComponentProps<'legend'> {}\n\nfunction FieldsetLegend({ className, ...props }: FieldsetLegendProps) {\n return (\n <legend\n className={cn('text-lg font-semibold text-strong', className)}\n {...props}\n />\n )\n}\n\nFieldsetLegend.displayName = 'Fieldset.Legend'\n\n/* ─── Helper text ─── */\n\nexport interface FieldsetHelperTextProps extends ComponentProps<'p'> {}\n\nfunction FieldsetHelperText({ className, ...props }: FieldsetHelperTextProps) {\n return <p className={cn('text-sm text-subtle', className)} {...props} />\n}\n\nFieldsetHelperText.displayName = 'Fieldset.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface FieldsetErrorTextProps extends ComponentProps<'p'> {}\n\nfunction FieldsetErrorText({ className, ...props }: FieldsetErrorTextProps) {\n const { invalid } = use(FieldsetContext)\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\nFieldsetErrorText.displayName = 'Fieldset.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const Fieldset = Object.assign(FieldsetRoot, {\n Legend: FieldsetLegend,\n HelperText: FieldsetHelperText,\n ErrorText: FieldsetErrorText\n})\n\nexport type FieldsetProps = FieldsetRootProps\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var n={neutral:"intent-neutral",brand:"intent-brand","brand-secondary":"intent-brand-secondary",accent:"intent-accent",danger:"intent-danger",success:"intent-success",warning:"intent-warning",info:"intent-info"};export{n as a};//# sourceMappingURL=chunk-4LGCF3SN.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-4LGCF3SN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/variants.ts"],"names":["intentVariants"],"mappings":"AAGO,IAAMA,EAAiB,CAC5B,OAAA,CAAS,gBAAA,CACT,KAAA,CAAO,eACP,iBAAA,CAAmB,wBAAA,CACnB,MAAA,CAAQ,eAAA,CACR,OAAQ,eAAA,CACR,OAAA,CAAS,iBACT,OAAA,CAAS,gBAAA,CACT,KAAM,aACR","file":"chunk-4LGCF3SN.js","sourcesContent":["/**\n * Shared CVA variant maps used across multiple components.\n */\nexport const intentVariants = {\n neutral: 'intent-neutral',\n brand: 'intent-brand',\n 'brand-secondary': 'intent-brand-secondary',\n accent: 'intent-accent',\n danger: 'intent-danger',\n success: 'intent-success',\n warning: 'intent-warning',\n info: 'intent-info'\n} as const\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-3HWPLULJ.js';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';function p({as:n,className:o,intent:e,emphasis:i,size:s,...a$1}){return jsx(n||"a",{className:cn(a({intent:e,emphasis:i,size:s,className:o})),...a$1})}p.displayName="LinkButton";function r({as:n,className:o,intent:e,emphasis:i,size:s="icon-md",...a$1}){return jsx(n||"a",{className:cn(a({intent:e,emphasis:i,size:s,className:o})),...a$1})}r.displayName="LinkIconButton";export{p as a,r as b};//# sourceMappingURL=chunk-A6JSYXKN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-A6JSYXKN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/LinkButton/LinkButton.tsx","../../src/components/LinkButton/LinkIconButton.tsx"],"names":["LinkButton","as","className","intent","emphasis","size","props","jsx","cn","buttonVariants","LinkIconButton"],"mappings":"kHAkBO,SAASA,CAAAA,CAAwC,CACtD,EAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,MAAA,CAAAC,EACA,QAAA,CAAAC,CAAAA,CACA,KAAAC,CAAAA,CACA,GAAGC,GACL,CAAA,CAAuB,CAErB,OACEC,IAFgBN,CAAAA,EAAM,GAAA,CAErB,CACC,SAAA,CAAWO,EAAAA,CAAGC,EAAe,CAAE,MAAA,CAAAN,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,IAAA,CAAAC,EAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CAClE,GAAGI,GAAAA,CACN,CAEJ,CAEAN,CAAAA,CAAW,WAAA,CAAc,YAAA,CCblB,SAASU,CAAAA,CAA4C,CAC1D,EAAA,CAAAT,CAAAA,CACA,SAAA,CAAAC,EACA,MAAA,CAAAC,CAAAA,CACA,SAAAC,CAAAA,CACA,IAAA,CAAAC,EAAO,SAAA,CACP,GAAGC,GACL,CAAA,CAA2B,CAEzB,OACEC,IAFgBN,CAAAA,EAAM,GAAA,CAErB,CACC,SAAA,CAAWO,EAAAA,CAAGC,EAAe,CAAE,MAAA,CAAAN,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,IAAA,CAAAC,EAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CAClE,GAAGI,GAAAA,CACN,CAEJ,CAEAI,CAAAA,CAAe,WAAA,CAAc,gBAAA","file":"chunk-A6JSYXKN.js","sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { buttonVariants } from '../Button/Button'\n\ntype LinkButtonSize = 'xs' | 'sm' | 'md' | 'lg'\n\nexport type LinkButtonProps<T extends ElementType = 'a'> = {\n as?: T\n intent?: VariantProps<typeof buttonVariants>['intent']\n emphasis?: VariantProps<typeof buttonVariants>['emphasis']\n size?: LinkButtonSize\n className?: string\n} & Omit<ComponentProps<T>, 'as' | 'intent' | 'emphasis' | 'size' | 'className'>\n\nexport function LinkButton<T extends ElementType = 'a'>({\n as,\n className,\n intent,\n emphasis,\n size,\n ...props\n}: LinkButtonProps<T>) {\n const Component = as || 'a'\n return (\n <Component\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nLinkButton.displayName = 'LinkButton'\n","import type { ComponentProps, ElementType } from 'react'\n\nimport type { VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { buttonVariants } from '../Button/Button'\n\ntype LinkIconButtonSize = 'icon-xs' | 'icon-sm' | 'icon-md' | 'icon-lg'\n\nexport type LinkIconButtonProps<T extends ElementType = 'a'> = {\n as?: T\n 'aria-label': string\n intent?: VariantProps<typeof buttonVariants>['intent']\n emphasis?: VariantProps<typeof buttonVariants>['emphasis']\n size?: LinkIconButtonSize\n className?: string\n} & Omit<\n ComponentProps<T>,\n 'as' | 'aria-label' | 'intent' | 'emphasis' | 'size' | 'className'\n>\n\nexport function LinkIconButton<T extends ElementType = 'a'>({\n as,\n className,\n intent,\n emphasis,\n size = 'icon-md',\n ...props\n}: LinkIconButtonProps<T>) {\n const Component = as || 'a'\n return (\n <Component\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nLinkIconButton.displayName = 'LinkIconButton'\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-4LGCF3SN.js';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsxs,jsx}from'react/jsx-runtime';var d=cva("inline-flex items-center justify-center rounded-full font-semibold whitespace-nowrap gap-1 [&_svg]:size-[1em] [&_svg]:shrink-0",{variants:{intent:a,emphasis:{strong:"emphasis-strong",normal:"emphasis-normal text-subtle",subtle:"emphasis-subtle text-subtle",subtler:"emphasis-subtler text-subtle"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-0.5 text-sm"}},defaultVariants:{emphasis:"normal",size:"md"}});function u({className:t,intent:a,emphasis:n,size:r,indicator:i,indicatorPulse:o,children:p,...m}){return jsxs("span",{className:cn(d({intent:a,emphasis:n,size:r,className:t})),...m,children:[i&&jsx("span",{className:cn("size-1.5 shrink-0 rounded-full bg-current",o&&"animate-pulse"),"aria-hidden":"true"}),p]})}u.displayName="Badge";export{d as a,u as b};//# sourceMappingURL=chunk-AFSDN4WI.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-AFSDN4WI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Badge/index.tsx"],"names":["badgeVariants","cva","intentVariants","Badge","className","intent","emphasis","size","indicator","indicatorPulse","children","props","jsxs","cn","jsx"],"mappings":"kKAQO,IAAMA,CAAAA,CAAgBC,GAAAA,CAC3B,gIAAA,CACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,MAAA,CAAQ,iBAAA,CACR,OAAQ,6BAAA,CACR,MAAA,CAAQ,6BAAA,CACR,OAAA,CAAS,8BACX,CAAA,CACA,KAAM,CACJ,EAAA,CAAI,qBAAA,CACJ,EAAA,CAAI,uBACN,CACF,EACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CACF,EAWO,SAASC,CAAAA,CAAM,CACpB,SAAA,CAAAC,EACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAe,CACb,OACEC,IAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAWC,GAAGb,CAAAA,CAAc,CAAE,MAAA,CAAAK,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,KAAAC,CAAAA,CAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CACjE,GAAGO,CAAAA,CAEH,QAAA,CAAA,CAAAH,CAAAA,EACCM,GAAAA,CAAC,MAAA,CAAA,CACC,SAAA,CAAWD,GACT,2CAAA,CACAJ,CAAAA,EAAkB,eACpB,CAAA,CACA,aAAA,CAAY,MAAA,CACd,EAEDC,CAAAA,CAAAA,CACH,CAEJ,CAEAP,CAAAA,CAAM,WAAA,CAAc,OAAA","file":"chunk-AFSDN4WI.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-full font-semibold whitespace-nowrap gap-1 [&_svg]:size-[1em] [&_svg]:shrink-0',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n strong: 'emphasis-strong',\n normal: 'emphasis-normal text-subtle',\n subtle: 'emphasis-subtle text-subtle',\n subtler: 'emphasis-subtler text-subtle'\n },\n size: {\n sm: 'px-2 py-0.5 text-xs',\n md: 'px-2.5 py-0.5 text-sm'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\nexport interface BadgeProps\n extends ComponentProps<'span'>,\n VariantProps<typeof badgeVariants> {\n /** Show a dot indicator before the text */\n indicator?: boolean\n /** Animate the indicator with a slow pulse */\n indicatorPulse?: boolean\n}\n\nexport function Badge({\n className,\n intent,\n emphasis,\n size,\n indicator,\n indicatorPulse,\n children,\n ...props\n}: BadgeProps) {\n return (\n <span\n className={cn(badgeVariants({ intent, emphasis, size, className }))}\n {...props}\n >\n {indicator && (\n <span\n className={cn(\n 'size-1.5 shrink-0 rounded-full bg-current',\n indicatorPulse && 'animate-pulse'\n )}\n aria-hidden='true'\n />\n )}\n {children}\n </span>\n )\n}\n\nBadge.displayName = 'Badge'\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-4LGCF3SN.js';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("font-mono rounded-md px-1.5 py-0.5 text-[0.9em]",{variants:{intent:a,emphasis:{normal:"emphasis-normal",strong:"emphasis-strong",subtle:"emphasis-subtle",subtler:"emphasis-subtler"}},defaultVariants:{emphasis:"normal"}});function m({className:e,intent:t,emphasis:r,...s}){return jsx("code",{className:cn(p({intent:t,emphasis:r,className:e})),...s})}m.displayName="Code";export{p as a,m as b};//# sourceMappingURL=chunk-DRVUAPKN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-DRVUAPKN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Code/index.tsx"],"names":["codeVariants","cva","intentVariants","Code","className","intent","emphasis","props","jsx","cn"],"mappings":"6JAQO,IAAMA,CAAAA,CAAeC,GAAAA,CAC1B,iDAAA,CACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,MAAA,CAAQ,iBAAA,CACR,OAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,OAAA,CAAS,kBACX,CACF,CAAA,CACA,eAAA,CAAiB,CACf,SAAU,QACZ,CACF,CACF,EAMO,SAASC,CAAAA,CAAK,CAAE,SAAA,CAAAC,EAAW,MAAA,CAAAC,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAc,CACzE,OACEC,IAAC,MAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CAAGT,CAAAA,CAAa,CAAE,MAAA,CAAAK,CAAAA,CAAQ,QAAA,CAAAC,EAAU,SAAA,CAAAF,CAAU,CAAC,CAAC,EAC1D,GAAGG,CAAAA,CACN,CAEJ,CAEAJ,EAAK,WAAA,CAAc,MAAA","file":"chunk-DRVUAPKN.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const codeVariants = cva(\n 'font-mono rounded-md px-1.5 py-0.5 text-[0.9em]',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal: 'emphasis-normal',\n strong: 'emphasis-strong',\n subtle: 'emphasis-subtle',\n subtler: 'emphasis-subtler'\n }\n },\n defaultVariants: {\n emphasis: 'normal'\n }\n }\n)\n\nexport interface CodeProps\n extends ComponentProps<'code'>,\n VariantProps<typeof codeVariants> {}\n\nexport function Code({ className, intent, emphasis, ...props }: CodeProps) {\n return (\n <code\n className={cn(codeVariants({ intent, emphasis, className }))}\n {...props}\n />\n )\n}\n\nCode.displayName = 'Code'\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';function o({className:e,...r}){return jsx("nav",{"aria-label":"Breadcrumb",className:e,...r})}o.displayName="Breadcrumb";function m({className:e,...r}){return jsx("ol",{className:cn("flex items-center gap-2 text-sm",e),...r})}m.displayName="Breadcrumb.List";function s({className:e,...r}){return jsx("li",{className:cn("flex items-center gap-2",e),...r})}s.displayName="Breadcrumb.Item";function p({as:e,className:r,...n}){return jsx(e||"a",{className:cn("text-subtle transition-colors hover:text-normal",r),...n})}p.displayName="Breadcrumb.Link";function c({className:e,children:r="/",...n}){return jsx("span",{role:"presentation",className:cn("text-subtler",e),...n,children:r})}c.displayName="Breadcrumb.Separator";function u({className:e,...r}){return jsx("span",{"aria-current":"page",className:cn("font-medium text-normal",e),...r})}u.displayName="Breadcrumb.Current";var d=Object.assign(o,{List:m,Item:s,Link:p,Separator:c,Current:u});export{d as a};//# sourceMappingURL=chunk-EKOEXSAP.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-EKOEXSAP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Breadcrumb/index.tsx"],"names":["BreadcrumbRoot","className","props","jsx","BreadcrumbList","cn","BreadcrumbItem","BreadcrumbLink","as","BreadcrumbSeparator","children","BreadcrumbCurrent","Breadcrumb"],"mappings":"8EAIA,SAASA,CAAAA,CAAe,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA0B,CACtE,OAAOC,GAAAA,CAAC,OAAI,YAAA,CAAW,YAAA,CAAa,SAAA,CAAWF,CAAAA,CAAY,GAAGC,CAAAA,CAAO,CACvE,CAEAF,CAAAA,CAAe,WAAA,CAAc,aAE7B,SAASI,CAAAA,CAAe,CAAE,SAAA,CAAAH,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAyB,CACrE,OACEC,GAAAA,CAAC,MACC,SAAA,CAAWE,EAAAA,CAAG,iCAAA,CAAmCJ,CAAS,EACzD,GAAGC,CAAAA,CACN,CAEJ,CAEAE,CAAAA,CAAe,YAAc,iBAAA,CAE7B,SAASE,EAAe,CAAE,SAAA,CAAAL,EAAW,GAAGC,CAAM,EAAyB,CACrE,OAAOC,IAAC,IAAA,CAAA,CAAG,SAAA,CAAWE,EAAAA,CAAG,yBAAA,CAA2BJ,CAAS,CAAA,CAAI,GAAGC,EAAO,CAC7E,CAEAI,EAAe,WAAA,CAAc,iBAAA,CAO7B,SAASC,CAAAA,CAA4C,CACnD,GAAAC,CAAAA,CACA,SAAA,CAAAP,EACA,GAAGC,CACL,EAA2B,CAEzB,OACEC,GAAAA,CAFgBK,CAAAA,EAAM,IAErB,CACC,SAAA,CAAWH,GACT,iDAAA,CACAJ,CACF,EACC,GAAGC,CAAAA,CACN,CAEJ,CAEAK,EAAe,WAAA,CAAc,iBAAA,CAM7B,SAASE,CAAAA,CAAoB,CAC3B,UAAAR,CAAAA,CACA,QAAA,CAAAS,CAAAA,CAAW,GAAA,CACX,GAAGR,CACL,CAAA,CAA6B,CAC3B,OACEC,GAAAA,CAAC,QACC,IAAA,CAAK,cAAA,CACL,UAAWE,EAAAA,CAAG,cAAA,CAAgBJ,CAAS,CAAA,CACtC,GAAGC,EAEH,QAAA,CAAAQ,CAAAA,CACH,CAEJ,CAEAD,CAAAA,CAAoB,WAAA,CAAc,sBAAA,CAElC,SAASE,CAAAA,CAAkB,CAAE,UAAAV,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA2B,CAC1E,OACEC,GAAAA,CAAC,MAAA,CAAA,CACC,eAAa,MAAA,CACb,SAAA,CAAWE,GAAG,yBAAA,CAA2BJ,CAAS,EACjD,GAAGC,CAAAA,CACN,CAEJ,CAEAS,EAAkB,WAAA,CAAc,oBAAA,KAEnBC,CAAAA,CAAa,MAAA,CAAO,OAAOZ,CAAAA,CAAgB,CACtD,KAAMI,CAAAA,CACN,IAAA,CAAME,EACN,IAAA,CAAMC,CAAAA,CACN,UAAWE,CAAAA,CACX,OAAA,CAASE,CACX,CAAC","file":"chunk-EKOEXSAP.js","sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nfunction BreadcrumbRoot({ className, ...props }: ComponentProps<'nav'>) {\n return <nav aria-label='Breadcrumb' className={className} {...props} />\n}\n\nBreadcrumbRoot.displayName = 'Breadcrumb'\n\nfunction BreadcrumbList({ className, ...props }: ComponentProps<'ol'>) {\n return (\n <ol\n className={cn('flex items-center gap-2 text-sm', className)}\n {...props}\n />\n )\n}\n\nBreadcrumbList.displayName = 'Breadcrumb.List'\n\nfunction BreadcrumbItem({ className, ...props }: ComponentProps<'li'>) {\n return <li className={cn('flex items-center gap-2', className)} {...props} />\n}\n\nBreadcrumbItem.displayName = 'Breadcrumb.Item'\n\ntype BreadcrumbLinkProps<T extends ElementType = 'a'> = {\n as?: T\n className?: string\n} & Omit<ComponentProps<T>, 'as' | 'className'>\n\nfunction BreadcrumbLink<T extends ElementType = 'a'>({\n as,\n className,\n ...props\n}: BreadcrumbLinkProps<T>) {\n const Component = as || 'a'\n return (\n <Component\n className={cn(\n 'text-subtle transition-colors hover:text-normal',\n className\n )}\n {...props}\n />\n )\n}\n\nBreadcrumbLink.displayName = 'Breadcrumb.Link'\n\ninterface BreadcrumbSeparatorProps extends ComponentProps<'span'> {\n children?: React.ReactNode\n}\n\nfunction BreadcrumbSeparator({\n className,\n children = '/',\n ...props\n}: BreadcrumbSeparatorProps) {\n return (\n <span\n role='presentation'\n className={cn('text-subtler', className)}\n {...props}\n >\n {children}\n </span>\n )\n}\n\nBreadcrumbSeparator.displayName = 'Breadcrumb.Separator'\n\nfunction BreadcrumbCurrent({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n aria-current='page'\n className={cn('font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nBreadcrumbCurrent.displayName = 'Breadcrumb.Current'\n\nexport const Breadcrumb = Object.assign(BreadcrumbRoot, {\n List: BreadcrumbList,\n Item: BreadcrumbItem,\n Link: BreadcrumbLink,\n Separator: BreadcrumbSeparator,\n Current: BreadcrumbCurrent\n})\n\nexport type { BreadcrumbSeparatorProps }\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {useRef,useState,useEffect}from'react';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs}from'react/jsx-runtime';function T({children:o,speed:l=50,pauseOnHover:d=false,direction:M="normal",gap:c=16,className:P,"aria-label":k,...w}){let u=useRef(null),m=useRef(null),f=useRef(null),[v,D]=useState(0),[p,R]=useState(1);useEffect(()=>{let e=u.current,t=f.current;if(!e||!t)return;let r=()=>{let q=e.clientWidth,y=t.scrollWidth;if(y>0){let E=Math.ceil(q/y)+1;R(E);}};r();let n=new ResizeObserver(r);return n.observe(e),n.observe(t),()=>n.disconnect()},[o,c]),useEffect(()=>{let e=m.current;if(!e)return;let t=()=>{let n=e.scrollWidth/2;n>0&&D(n/l);};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[l,p]);let i=`${c}px`,h=Array.from({length:p},(e,t)=>jsx("div",{className:"flex shrink-0 items-center",style:{gap:i},children:o},t));return jsxs("div",{ref:u,className:cn("relative max-w-full overflow-hidden",P),"aria-label":k,...w,children:[jsx("style",{children:`
|
|
3
|
+
@keyframes roadie-marquee {
|
|
4
|
+
to { transform: translateX(-50%); }
|
|
5
|
+
}
|
|
6
|
+
`}),jsx("div",{ref:f,"aria-hidden":"true",style:{position:"absolute",visibility:"hidden",pointerEvents:"none",display:"flex",width:"max-content",height:0,overflow:"hidden",gap:i},children:o}),jsxs("div",{ref:m,style:{display:"flex",width:"max-content",gap:i,animationName:v>0?"roadie-marquee":"none",animationDuration:`${v}s`,animationTimingFunction:"linear",animationIterationCount:"infinite",animationDirection:M,animationPlayState:"running"},onMouseEnter:d?e=>{e.currentTarget.style.animationPlayState="paused";}:void 0,onMouseLeave:d?e=>{e.currentTarget.style.animationPlayState="running";}:void 0,children:[jsx("div",{className:"flex shrink-0 items-center",style:{gap:i},children:h}),jsx("div",{className:"flex shrink-0 items-center",style:{gap:i},"aria-hidden":"true",children:h})]})]})}T.displayName="Marquee";export{T as a};//# sourceMappingURL=chunk-FQNVMKKV.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-FQNVMKKV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Marquee/index.tsx"],"names":["Marquee","children","speed","pauseOnHover","direction","gap","className","ariaLabel","props","outerRef","useRef","trackRef","measureRef","duration","setDuration","useState","repeats","setRepeats","useEffect","outer","measure","update","containerWidth","contentWidth","needed","observer","track","updateDuration","halfWidth","gapPx","repeatedChildren","_","i","jsx","jsxs","cn"],"mappings":"iIAmBO,SAASA,CAAAA,CAAQ,CACtB,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ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A,CACT,KAAA,CAAO,aAAA,CACP,MAAA,CAAQ,CAAA,CACR,QAAA,CAAU,QAAA,CACV,GAAA,CAAKiB,CACP,CAAA,CAEC,QAAA,CAAA5B,EACH,CAAA,CACAiC,IAAAA,CAAC,KAAA,CAAA,CACC,GAAA,CAAKvB,CAAAA,CACL,KAAA,CAAO,CACL,OAAA,CAAS,MAAA,CACT,KAAA,CAAO,aAAA,CACP,GAAA,CAAKkB,CAAAA,CACL,cAAehB,CAAAA,CAAW,CAAA,CAAI,gBAAA,CAAmB,MAAA,CACjD,iBAAA,CAAmB,CAAA,EAAGA,CAAQ,CAAA,CAAA,CAAA,CAC9B,uBAAA,CAAyB,QAAA,CACzB,uBAAA,CAAyB,UAAA,CACzB,kBAAA,CAAoBT,CAAAA,CACpB,mBAAoB,SACtB,CAAA,CACA,YAAA,CACED,CAAAA,CACK,CAAA,EAAM,CACL,EAAE,aAAA,CAAc,KAAA,CAAM,kBAAA,CAAqB,SAC7C,CAAA,CACA,MAAA,CAEN,aACEA,CAAAA,CACK,CAAA,EAAM,CACL,CAAA,CAAE,aAAA,CAAc,KAAA,CAAM,kBAAA,CAAqB,UAC7C,CAAA,CACA,MAAA,CAIN,QAAA,CAAA,CAAA8B,GAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,6BAA6B,KAAA,CAAO,CAAE,GAAA,CAAKJ,CAAM,CAAA,CAC7D,QAAA,CAAAC,EACH,CAAA,CAEAG,GAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAU,4BAAA,CACV,KAAA,CAAO,CAAE,GAAA,CAAKJ,CAAM,CAAA,CACpB,aAAA,CAAY,MAAA,CAEX,QAAA,CAAAC,CAAAA,CACH,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAEJ,CAEA9B,CAAAA,CAAQ,WAAA,CAAc,SAAA","file":"chunk-FQNVMKKV.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, useEffect, useRef, useState } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport interface MarqueeProps extends ComponentProps<'div'> {\n /** Scroll speed in pixels per second. @default 50 */\n speed?: number\n /** Pause animation on hover. @default false */\n pauseOnHover?: boolean\n /** Scroll direction. @default 'normal' */\n direction?: 'normal' | 'reverse'\n /** Gap between items in pixels. @default 16 */\n gap?: number\n /** Accessible label for the marquee region. */\n 'aria-label'?: string\n}\n\nexport function Marquee({\n children,\n speed = 50,\n pauseOnHover = false,\n direction = 'normal',\n gap = 16,\n className,\n 'aria-label': ariaLabel,\n ...props\n}: MarqueeProps) {\n const outerRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const measureRef = useRef<HTMLDivElement>(null)\n const [duration, setDuration] = useState(0)\n const [repeats, setRepeats] = useState(1)\n\n useEffect(() => {\n const outer = outerRef.current\n const measure = measureRef.current\n if (!outer || !measure) return\n\n const update = () => {\n const containerWidth = outer.clientWidth\n const contentWidth = measure.scrollWidth\n if (contentWidth > 0) {\n // Repeat enough times so one \"set\" is always wider than the container\n const needed = Math.ceil(containerWidth / contentWidth) + 1\n setRepeats(needed)\n }\n }\n\n update()\n\n const observer = new ResizeObserver(update)\n observer.observe(outer)\n observer.observe(measure)\n return () => observer.disconnect()\n }, [children, gap])\n\n useEffect(() => {\n const track = trackRef.current\n if (!track) return\n\n const updateDuration = () => {\n const halfWidth = track.scrollWidth / 2\n if (halfWidth > 0) {\n setDuration(halfWidth / speed)\n }\n }\n\n updateDuration()\n\n const observer = new ResizeObserver(updateDuration)\n observer.observe(track)\n return () => observer.disconnect()\n }, [speed, repeats])\n\n const gapPx = `${gap}px`\n\n const repeatedChildren = Array.from({ length: repeats }, (_, i) => (\n <div key={i} className='flex shrink-0 items-center' style={{ gap: gapPx }}>\n {children}\n </div>\n ))\n\n return (\n <div\n ref={outerRef}\n className={cn('relative max-w-full overflow-hidden', className)}\n aria-label={ariaLabel}\n {...props}\n >\n <style>{`\n @keyframes roadie-marquee {\n to { transform: translateX(-50%); }\n }\n `}</style>\n {/* Hidden measure element to get single-set width */}\n <div\n ref={measureRef}\n aria-hidden='true'\n style={{\n position: 'absolute',\n visibility: 'hidden',\n pointerEvents: 'none',\n display: 'flex',\n width: 'max-content',\n height: 0,\n overflow: 'hidden',\n gap: gapPx\n }}\n >\n {children}\n </div>\n <div\n ref={trackRef}\n style={{\n display: 'flex',\n width: 'max-content',\n gap: gapPx,\n animationName: duration > 0 ? 'roadie-marquee' : 'none',\n animationDuration: `${duration}s`,\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite',\n animationDirection: direction,\n animationPlayState: 'running'\n }}\n onMouseEnter={\n pauseOnHover\n ? (e) => {\n e.currentTarget.style.animationPlayState = 'paused'\n }\n : undefined\n }\n onMouseLeave={\n pauseOnHover\n ? (e) => {\n e.currentTarget.style.animationPlayState = 'running'\n }\n : undefined\n }\n >\n {/* Set A */}\n <div className='flex shrink-0 items-center' style={{ gap: gapPx }}>\n {repeatedChildren}\n </div>\n {/* Set B (clone for seamless loop) */}\n <div\n className='flex shrink-0 items-center'\n style={{ gap: gapPx }}\n aria-hidden='true'\n >\n {repeatedChildren}\n </div>\n </div>\n </div>\n )\n}\n\nMarquee.displayName = 'Marquee'\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 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
|
|
@@ -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,EAOO,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,CACN,CAEJ,CAEAE,EAAc,WAAA,CAAc,gBAAA,CAQrB,SAASG,CAAAA,CAAmB,CACjC,SAAA,CAAAF,CAAAA,CACA,MAAA,CAAAG,CAAAA,CACA,SAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGR,CACL,CAAA,CAA4B,CAC1B,IAAMS,EAAeC,GAAAA,EAAgB,CAC/BC,CAAAA,CAAU,CAAC,CAACF,CAAAA,CAAa,OAAA,CAE/B,OACER,GAAAA,CAACN,SAAkB,UAAA,CAAl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Props } 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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';function r({className:e,...o}){return jsx("label",{className:cn("text-sm font-medium text-normal",e),...o})}r.displayName="Label";export{r as a};//# sourceMappingURL=chunk-IEDKSZAQ.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-IEDKSZAQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Label/index.tsx"],"names":["Label","className","props","jsx","cn"],"mappings":"8EAMO,SAASA,CAAAA,CAAM,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAe,CACzD,OACEC,GAAAA,CAAC,OAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CAAG,iCAAA,CAAmCH,CAAS,CAAA,CACzD,GAAGC,CAAAA,CACN,CAEJ,CAEAF,CAAAA,CAAM,WAAA,CAAc,OAAA","file":"chunk-IEDKSZAQ.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport interface LabelProps extends ComponentProps<'label'> {}\n\nexport function Label({ className, ...props }: LabelProps) {\n return (\n <label\n className={cn('text-sm font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nLabel.displayName = 'Label'\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {b}from'./chunk-WOU2B425.js';import {Fragment as Fragment$1}from'react';import {jsx,Fragment}from'react/jsx-runtime';function x(i,t,n=true,g=true){let o=(Array.isArray(t)?t:[t]).filter(e=>e.length>0);if(o.length===0)return [{text:i,match:false}];let r=o.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=`${n?"i":""}${g?"g":""}`,m=new RegExp(`(${r})`,s),f=new RegExp(`^(${r})$`,n?"i":"");return i.split(m).filter(e=>e.length>0).map(e=>({text:e,match:f.test(e)}))}function y({text:i,query:t,ignoreCase:n=true,matchAll:g=true,...l}){if(!t||Array.isArray(t)&&t.length===0||t==="")return jsx(Fragment,{children:i});let h=x(i,t,n,g);return jsx(Fragment,{children:h.map((r,s)=>r.match?jsx(b,{...l,children:r.text},s):jsx(Fragment$1,{children:r.text},s))})}y.displayName="Highlight";export{y as a};//# sourceMappingURL=chunk-JBHYUOI2.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-JBHYUOI2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Highlight/index.tsx"],"names":["highlight","text","query","ignoreCase","matchAll","valid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A,CACb,SAAAC,CAAAA,CAAW,IAAA,CACX,GAAGS,CACL,CAAA,CAAiC,CAI/B,GAFE,CAACX,GAAU,KAAA,CAAM,OAAA,CAAQA,CAAK,CAAA,EAAKA,CAAAA,CAAM,SAAW,CAAA,EAAMA,CAAAA,GAAU,GAGpE,OAAOY,GAAAA,CAAAC,SAAA,CAAG,QAAA,CAAAd,EAAK,CAAA,CAGjB,IAAMe,EAAShB,CAAAA,CAAUC,CAAAA,CAAMC,EAAOC,CAAAA,CAAYC,CAAQ,EAE1D,OACEU,GAAAA,CAAAC,SAAA,CACG,QAAA,CAAAC,EAAO,GAAA,CAAI,CAACC,EAAOC,CAAAA,GAClBD,CAAAA,CAAM,MACJH,GAAAA,CAACK,CAAAA,CAAA,CAAkB,GAAGN,CAAAA,CACnB,SAAAI,CAAAA,CAAM,IAAA,CAAA,CADEC,CAEX,CAAA,CAEAJ,GAAAA,CAACC,WAAA,CAAsB,QAAA,CAAAE,EAAM,IAAA,CAAA,CAAdC,CAAmB,CAEtC,CAAA,CACF,CAEJ,CAEAN,CAAAA,CAAU,WAAA,CAAc,WAAA","file":"chunk-JBHYUOI2.js","sourcesContent":["'use client'\n\nimport { Fragment, type ReactElement } from 'react'\n\nimport { Mark, type MarkProps } from '../Mark'\n\nexport interface HighlightChunk {\n text: string\n match: boolean\n}\n\nexport interface HighlightProps extends Omit<MarkProps, 'children'> {\n text: string\n query: string | string[]\n ignoreCase?: boolean\n matchAll?: boolean\n}\n\n/**\n * Split text into chunks, marking which parts match the query.\n */\nfunction highlight(\n text: string,\n query: string | string[],\n ignoreCase = true,\n matchAll = true\n): HighlightChunk[] {\n const queries = Array.isArray(query) ? query : [query]\n const validQueries = queries.filter((q) => q.length > 0)\n\n if (validQueries.length === 0) {\n return [{ text, match: false }]\n }\n\n const escaped = validQueries.map((q) =>\n q.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n )\n const pattern = escaped.join('|')\n const flags = `${ignoreCase ? 'i' : ''}${matchAll ? 'g' : ''}`\n const regex = new RegExp(`(${pattern})`, flags)\n\n const testRegex = new RegExp(`^(${pattern})$`, ignoreCase ? 'i' : '')\n const parts = text.split(regex)\n return parts\n .filter((part) => part.length > 0)\n .map((part) => ({\n text: part,\n match: testRegex.test(part)\n }))\n}\n\nexport function Highlight({\n text,\n query,\n ignoreCase = true,\n matchAll = true,\n ...markProps\n}: HighlightProps): ReactElement {\n const isQueryEmpty =\n !query || (Array.isArray(query) && query.length === 0) || query === ''\n\n if (isQueryEmpty) {\n return <>{text}</>\n }\n\n const chunks = highlight(text, query, ignoreCase, matchAll)\n\n return (\n <>\n {chunks.map((chunk, index) =>\n chunk.match ? (\n <Mark key={index} {...markProps}>\n {chunk.text}\n </Mark>\n ) : (\n <Fragment key={index}>{chunk.text}</Fragment>\n )\n )}\n </>\n )\n}\n\nHighlight.displayName = 'Highlight'\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("border border-subtle",{variants:{orientation:{horizontal:"h-px w-full border-t",vertical:"w-px self-stretch border-l"}},defaultVariants:{orientation:"horizontal"}});function n({className:o,orientation:r,...a}){return jsx("div",{role:"separator","aria-orientation":r??"horizontal",className:cn(p({orientation:r,className:o})),...a})}n.displayName="Separator";export{p as a,n as b};//# sourceMappingURL=chunk-JGTZ3GCR.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-JGTZ3GCR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Separator/index.tsx"],"names":["separatorVariants","cva","Separator","className","orientation","props","jsx","cn"],"mappings":"yHAMO,IAAMA,CAAAA,CAAoBC,IAAI,sBAAA,CAAwB,CAC3D,QAAA,CAAU,CACR,WAAA,CAAa,CACX,UAAA,CAAY,sBAAA,CACZ,SAAU,4BACZ,CACF,CAAA,CACA,eAAA,CAAiB,CACf,WAAA,CAAa,YACf,CACF,CAAC,EAMM,SAASC,CAAAA,CAAU,CACxB,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAmB,CACjB,OACEC,GAAAA,CAAC,KAAA,CAAA,CACC,IAAA,CAAK,WAAA,CACL,mBAAkBF,CAAAA,EAAe,YAAA,CACjC,SAAA,CAAWG,EAAAA,CAAGP,CAAAA,CAAkB,CAAE,WAAA,CAAAI,CAAAA,CAAa,UAAAD,CAAU,CAAC,CAAC,CAAA,CAC1D,GAAGE,CAAAA,CACN,CAEJ,CAEAH,EAAU,WAAA,CAAc,WAAA","file":"chunk-JGTZ3GCR.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport const separatorVariants = cva('border border-subtle', {\n variants: {\n orientation: {\n horizontal: 'h-px w-full border-t',\n vertical: 'w-px self-stretch border-l'\n }\n },\n defaultVariants: {\n orientation: 'horizontal'\n }\n})\n\nexport interface SeparatorProps\n extends ComponentProps<'div'>,\n VariantProps<typeof separatorVariants> {}\n\nexport function Separator({\n className,\n orientation,\n ...props\n}: SeparatorProps) {\n return (\n <div\n role='separator'\n aria-orientation={orientation ?? 'horizontal'}\n className={cn(separatorVariants({ orientation, className }))}\n {...props}\n />\n )\n}\n\nSeparator.displayName = 'Separator'\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-4LGCF3SN.js';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var v=cva("grid content-start rounded-xl group/card",{variants:{intent:a,emphasis:{raised:"emphasis-raised",subtle:"emphasis-subtle",subtler:"emphasis-subtler p-2 gap-4 -m-2",normal:"emphasis-normal"}},defaultVariants:{emphasis:"normal"}});function p({as:e,className:r,intent:C,emphasis:f,...s}){let o=s,y=!!o.href||!!o.onClick,g=e||(o.href?"a":"div");return jsx(g,{className:cn(v({intent:C,emphasis:f}),y&&"is-interactive",r),...s})}p.displayName="Card";function i({className:e,...r}){return jsx("div",{className:cn("grid gap-1.5 px-6 pt-6 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:pt-0",e),...r})}i.displayName="Card.Header";function d({className:e,...r}){return jsx("div",{className:cn("px-6 py-4 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:py-0",e),...r})}d.displayName="Card.Content";function m({className:e,...r}){return jsx("div",{className:cn("flex items-center gap-2 px-6 pb-6 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:pb-0",e),...r})}m.displayName="Card.Footer";function l({className:e,...r}){return jsx("div",{className:"overflow-hidden rounded-xl",children:jsx("img",{className:cn("aspect-2/1 w-full object-cover transition-transform duration-300 group-hover/card:scale-105",e),...r})})}l.displayName="Card.Image";function c({className:e,...r}){return jsx("h3",{className:cn("text-display-ui-6 text-strong",e),...r})}c.displayName="Card.Title";function u({className:e,...r}){return jsx("p",{className:cn("text-sm text-subtle",e),...r})}u.displayName="Card.Description";var N=Object.assign(p,{Header:i,Content:d,Footer:m,Image:l,Title:c,Description:u});export{v as a,N as b};//# sourceMappingURL=chunk-LHNOY24C.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-LHNOY24C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Card/index.tsx"],"names":["cardVariants","cva","intentVariants","CardRoot","as","className","intent","emphasis","props","rest","isInteractive","Component","jsx","cn","CardHeader","CardContent","CardFooter","CardImage","CardTitle","CardDescription","Card"],"mappings":"6JAQO,IAAMA,CAAAA,CAAeC,GAAAA,CAAI,0CAAA,CAA4C,CAC1E,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,MAAA,CAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,OAAA,CAAS,iCAAA,CACT,MAAA,CAAQ,iBACV,CACF,CAAA,CACA,eA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ps, ElementType, ImgHTMLAttributes } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const cardVariants = cva('grid content-start rounded-xl group/card', {\n variants: {\n intent: intentVariants,\n emphasis: {\n raised: 'emphasis-raised',\n subtle: 'emphasis-subtle',\n subtler: 'emphasis-subtler p-2 gap-4 -m-2',\n normal: 'emphasis-normal'\n }\n },\n defaultVariants: {\n emphasis: 'normal'\n }\n})\n\ntype CardOwnProps<T extends ElementType = 'div'> = {\n as?: T\n} & VariantProps<typeof cardVariants>\n\nexport type CardProps<T extends ElementType = 'div'> = CardOwnProps<T> &\n Omit<ComponentProps<T>, keyof CardOwnProps<T>>\n\nfunction CardRoot<T extends ElementType = 'div'>({\n as,\n className,\n intent,\n emphasis,\n ...props\n}: CardProps<T>) {\n const rest = props as Record<string, unknown>\n const isInteractive = !!rest.href || !!rest.onClick\n const Component = as || (rest.href ? 'a' : 'div')\n return (\n <Component\n className={cn(\n cardVariants({ intent, emphasis }),\n isInteractive && 'is-interactive',\n className\n )}\n {...props}\n />\n )\n}\n\nCardRoot.displayName = 'Card'\n\nfunction CardHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'grid gap-1.5 px-6 pt-6 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:pt-0',\n className\n )}\n {...props}\n />\n )\n}\n\nCardHeader.displayName = 'Card.Header'\n\nfunction CardContent({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'px-6 py-4 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:py-0',\n className\n )}\n {...props}\n />\n )\n}\n\nCardContent.displayName = 'Card.Content'\n\nfunction CardFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'flex items-center gap-2 px-6 pb-6 group-[.emphasis-subtler]/card:px-0 group-[.emphasis-subtler]/card:pb-0',\n className\n )}\n {...props}\n />\n )\n}\n\nCardFooter.displayName = 'Card.Footer'\n\nfunction CardImage({\n className,\n ...props\n}: ImgHTMLAttributes<HTMLImageElement>) {\n return (\n <div className='overflow-hidden rounded-xl'>\n <img\n className={cn(\n 'aspect-2/1 w-full object-cover transition-transform duration-300 group-hover/card:scale-105',\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nCardImage.displayName = 'Card.Image'\n\nfunction CardTitle({ className, ...props }: ComponentProps<'h3'>) {\n return (\n <h3 className={cn('text-display-ui-6 text-strong', className)} {...props} />\n )\n}\n\nCardTitle.displayName = 'Card.Title'\n\nfunction CardDescription({ className, ...props }: ComponentProps<'p'>) {\n return <p className={cn('text-sm text-subtle', className)} {...props} />\n}\n\nCardDescription.displayName = 'Card.Description'\n\nexport const Card = Object.assign(CardRoot, {\n Header: CardHeader,\n Content: CardContent,\n Footer: CardFooter,\n Image: CardImage,\n Title: CardTitle,\n Description: CardDescription\n}) as typeof CardRoot & {\n Header: typeof CardHeader\n Content: typeof CardContent\n Footer: typeof CardFooter\n Image: typeof CardImage\n Title: typeof CardTitle\n Description: typeof CardDescription\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';function a({className:t,children:n,...e}){return jsx("span",{"aria-hidden":"true",className:cn("text-subtle intent-danger",t),...e,children:n??"*"})}a.displayName="RequiredIndicator";function p({className:t,children:n,...e}){return jsx("span",{className:cn("text-sm text-subtle",t),...e,children:n??"(optional)"})}p.displayName="OptionalIndicator";export{a,p as b};//# sourceMappingURL=chunk-LMV3JECI.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-LMV3JECI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Indicator/index.tsx"],"names":["RequiredIndicator","className","children","props","jsx","cn","OptionalIndicator"],"mappings":"8EAQO,SAASA,CAAAA,CAAkB,CAChC,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAA2B,CACzB,OACEC,GAAAA,CAAC,MAAA,CAAA,CACC,aAAA,CAAY,MAAA,CACZ,SAAA,CAAWC,EAAAA,CAAG,2BAAA,CAA6BJ,CAAS,CAAA,CACnD,GAAGE,CAAAA,CAEH,SAAAD,CAAAA,EAAY,GAAA,CACf,CAEJ,CAEAF,CAAAA,CAAkB,WAAA,CAAc,mBAAA,CAMzB,SAASM,CAAAA,CAAkB,CAChC,SAAA,CAAAL,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,EAA2B,CACzB,OACEC,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAWC,EAAAA,CAAG,qBAAA,CAAuBJ,CAAS,CAAA,CAAI,GAAGE,CAAAA,CACxD,QAAA,CAAAD,CAAAA,EAAY,YAAA,CACf,CAEJ,CAEAI,EAAkB,WAAA,CAAc,mBAAA","file":"chunk-LMV3JECI.js","sourcesContent":["import type { ComponentProps } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── RequiredIndicator ─── */\n\nexport interface RequiredIndicatorProps extends ComponentProps<'span'> {}\n\nexport function RequiredIndicator({\n className,\n children,\n ...props\n}: RequiredIndicatorProps) {\n return (\n <span\n aria-hidden='true'\n className={cn('text-subtle intent-danger', className)}\n {...props}\n >\n {children ?? '*'}\n </span>\n )\n}\n\nRequiredIndicator.displayName = 'RequiredIndicator'\n\n/* ─── OptionalIndicator ─── */\n\nexport interface OptionalIndicatorProps extends ComponentProps<'span'> {}\n\nexport function OptionalIndicator({\n className,\n children,\n ...props\n}: OptionalIndicatorProps) {\n return (\n <span className={cn('text-sm text-subtle', className)} {...props}>\n {children ?? '(optional)'}\n </span>\n )\n}\n\nOptionalIndicator.displayName = 'OptionalIndicator'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {a}from'./chunk-4LGCF3SN.js';import {createContext,useId,useMemo,useCallback,use}from'react';import {CaretDownIcon}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 m=createContext({name:void 0,emphasis:"normal"}),v=cva("grid w-full",{variants:{intent:a,emphasis:{normal:"emphasis-normal rounded-xl [&>*+*]:border-t [&>*+*]:border-subtle",subtle:"gap-0.5",subtler:""}},defaultVariants:{emphasis:"normal"}}),V={normal:"",subtle:"emphasis-subtle first:rounded-t-xl last:rounded-b-xl",subtler:""};function p({type:t="single",intent:n,emphasis:e,className:s,...i}){let r=useId(),o=t==="single"?`accordion-${r}`:void 0,c=useMemo(()=>({name:o,emphasis:e??"normal"}),[o,e]);return jsx(m.Provider,{value:c,children:jsx("div",{className:cn(v({intent:n,emphasis:e,className:s})),...i})})}p.displayName="Accordion";function u({className:t,children:n,...e}){let{name:s,emphasis:i}=use(m),r=V[i??"normal"];return jsx("details",{name:s,className:cn("group/item is-disclosure-animated",r,t),...e,children:n})}u.displayName="Accordion.Item";function f({className:t,children:n,onClick:e,...s}){let i=useCallback(r=>{if(e?.(r),typeof CSS<"u"&&CSS.supports?.("interpolate-size","allow-keywords"))return;let o=r.currentTarget.closest("details");if(!o||o.open)return;o.open=true;let c=o.querySelector(":scope > :not(summary)");c?.scrollHeight&&o.style.setProperty("--content-height",`${c.scrollHeight}px`),o.open=false;},[e]);return jsxs("summary",{className:cn("flex w-full cursor-pointer list-none items-center justify-between px-4 py-3 text-left font-medium text-normal transition-colors hover:bg-subtle [&::-webkit-details-marker]:hidden",t),onClick:i,...s,children:[n,jsx(CaretDownIcon,{weight:"bold",className:"duration-moderate size-4 shrink-0 text-subtle transition-transform ease-enter group-open/item:rotate-180"})]})}f.displayName="Accordion.Trigger";function y({className:t,children:n,...e}){return jsx("div",{className:cn("min-h-0 overflow-hidden px-4 pt-1 pb-3",t),...e,children:n})}y.displayName="Accordion.Content";var S=Object.assign(p,{Item:u,Trigger:f,Content:y});export{v as a,S as b};//# sourceMappingURL=chunk-MDRAL676.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-MDRAL676.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Accordion/index.tsx"],"names":["AccordionContext","createContext","accordionVariants","cva","intentVariants","accordionItemVariants","AccordionRoot","type","intent","emphasis","className","props","id","useId","name","contextValue","useMemo","jsx","cn","AccordionItem","children","use","itemEmphasis","AccordionTrigger","onClick","handleClick","useCallback","e","details","content","jsxs","CaretDownIcon","AccordionContent","Accordion"],"mappings":"oRA4BA,IAAMA,CAAAA,CAAmBC,cAAqC,CAC5D,IAAA,CAAM,OACN,QAAA,CAAU,QACZ,CAAC,CAAA,CAIYC,CAAAA,CAAoBC,GAAAA,CAAI,aAAA,CAAe,CAClD,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,SAAU,CACR,MAAA,CACE,mEAAA,CACF,MAAA,CAAQ,UACR,OAAA,CAAS,EACX,CACF,CAAA,CACA,eAAA,C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CACxB,OACEM,IAAC,KAAA,CAAA,CACC,SAAA,CAAWC,GAAG,wCAAA,CAA0CR,CAAS,EAChE,GAAGC,CAAAA,CAEH,QAAA,CAAAS,CAAAA,CACH,CAEJ,CAEAY,CAAAA,CAAiB,WAAA,CAAc,mBAAA,KAElBC,CAAAA,CAAY,MAAA,CAAO,MAAA,CAAO3B,CAAAA,CAAe,CACpD,IAAA,CAAMa,CAAAA,CACN,QAASI,CAAAA,CACT,OAAA,CAASS,CACX,CAAC","file":"chunk-MDRAL676.js","sourcesContent":["'use client'\n\nimport {\n type ComponentProps,\n createContext,\n use,\n useCallback,\n useId,\n useMemo\n} from 'react'\n\nimport { CaretDownIcon } 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'\n\n// --- Context ---\n\ntype AccordionType = 'single' | 'multiple'\ntype AccordionEmphasis = 'normal' | 'subtle' | 'subtler' | null\n\ninterface AccordionContextValue {\n name: string | undefined\n emphasis: AccordionEmphasis\n}\n\nconst AccordionContext = createContext<AccordionContextValue>({\n name: undefined,\n emphasis: 'normal'\n})\n\n// --- Variants ---\n\nexport const accordionVariants = cva('grid w-full', {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-normal rounded-xl [&>*+*]:border-t [&>*+*]:border-subtle',\n subtle: 'gap-0.5',\n subtler: ''\n }\n },\n defaultVariants: {\n emphasis: 'normal'\n }\n})\n\nconst accordionItemVariants: Record<'normal' | 'subtle' | 'subtler', string> = {\n normal: '',\n subtle: 'emphasis-subtle first:rounded-t-xl last:rounded-b-xl',\n subtler: ''\n}\n\n// --- Components ---\n\nexport interface AccordionProps\n extends ComponentProps<'div'>,\n VariantProps<typeof accordionVariants> {\n type?: AccordionType\n}\n\nfunction AccordionRoot({\n type = 'single',\n intent,\n emphasis,\n className,\n ...props\n}: AccordionProps) {\n const id = useId()\n const name = type === 'single' ? `accordion-${id}` : undefined\n\n const contextValue = useMemo(\n () => ({ name, emphasis: emphasis ?? 'normal' }),\n [name, emphasis]\n )\n\n return (\n <AccordionContext.Provider value={contextValue}>\n <div\n className={cn(accordionVariants({ intent, emphasis, className }))}\n {...props}\n />\n </AccordionContext.Provider>\n )\n}\n\nAccordionRoot.displayName = 'Accordion'\n\ntype AccordionItemProps = ComponentProps<'details'>\n\nfunction AccordionItem({ className, children, ...props }: AccordionItemProps) {\n const { name, emphasis } = use(AccordionContext)\n const itemEmphasis = accordionItemVariants[emphasis ?? 'normal']\n\n return (\n <details\n name={name}\n className={cn(\n 'group/item is-disclosure-animated',\n itemEmphasis,\n className\n )}\n {...props}\n >\n {children}\n </details>\n )\n}\n\nAccordionItem.displayName = 'Accordion.Item'\n\nfunction AccordionTrigger({\n className,\n children,\n onClick,\n ...props\n}: ComponentProps<'summary'>) {\n const handleClick = useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n onClick?.(e)\n\n // Only measure for browsers without interpolate-size (Safari)\n if (\n typeof CSS !== 'undefined' &&\n CSS.supports?.('interpolate-size', 'allow-keywords')\n )\n return\n\n const details = e.currentTarget.closest('details')\n if (!details || details.open) return\n\n // Temporarily open to measure content, then close before browser toggles\n details.open = true\n const content = details.querySelector(\n ':scope > :not(summary)'\n ) as HTMLElement\n if (content?.scrollHeight) {\n details.style.setProperty(\n '--content-height',\n `${content.scrollHeight}px`\n )\n }\n details.open = false\n },\n [onClick]\n )\n\n return (\n <summary\n className={cn(\n 'flex w-full cursor-pointer list-none items-center justify-between px-4 py-3 text-left font-medium text-normal transition-colors hover:bg-subtle [&::-webkit-details-marker]:hidden',\n className\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n <CaretDownIcon\n weight='bold'\n className='duration-moderate size-4 shrink-0 text-subtle transition-transform ease-enter group-open/item:rotate-180'\n />\n </summary>\n )\n}\n\nAccordionTrigger.displayName = 'Accordion.Trigger'\n\nfunction AccordionContent({\n className,\n children,\n ...props\n}: ComponentProps<'div'>) {\n return (\n <div\n className={cn('min-h-0 overflow-hidden px-4 pt-1 pb-3', className)}\n {...props}\n >\n {children}\n </div>\n )\n}\n\nAccordionContent.displayName = 'Accordion.Content'\n\nexport const Accordion = Object.assign(AccordionRoot, {\n Item: AccordionItem,\n Trigger: AccordionTrigger,\n Content: AccordionContent\n})\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {b}from'./chunk-OIAETOZT.js';import {a as a$1,b as b$2}from'./chunk-LMV3JECI.js';import {b as b$1}from'./chunk-VSKUGXQG.js';import {a}from'./chunk-IEDKSZAQ.js';import {createContext,useId,use}from'react';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var l=createContext({fieldId:"",labelId:"",helperTextId:"",errorTextId:""});function j(){return use(l)}function m({className:e,invalid:r,required:t,disabled:d,...i}){let n=`field-${useId()}`,g=`${n}-label`,h=`${n}-helper`,v=`${n}-error`;return jsx(l,{value:{invalid:r,required:t,disabled:d,fieldId:n,labelId:g,helperTextId:h,errorTextId:v},children:jsx("div",{className:cn("grid gap-1.5",e),...i})})}m.displayName="Field";function T({htmlFor:e,showIndicator:r,children:t,...d}){let{fieldId:i,labelId:p,required:n}=use(l);return jsxs(a,{id:p||void 0,htmlFor:e??(i||void 0),...d,children:[t,r&&(n?jsxs(Fragment,{children:[" ",jsx(a$1,{})]}):jsxs(Fragment,{children:[" ",jsx(b$2,{})]}))]})}T.displayName="Field.Label";function P(){let{invalid:e,required:r,disabled:t,fieldId:d,helperTextId:i,errorTextId:p}=use(l);return {id:d||void 0,disabled:t||void 0,"aria-invalid":e||void 0,"aria-required":r||void 0,"aria-describedby":(e?p:i)||void 0}}function y(e){let r=P();return jsx(b$1,{...r,...e})}y.displayName="Field.Input";function C(e){let r=P();return jsx(b,{...r,...e})}C.displayName="Field.Textarea";function L({id:e,className:r,...t}){let{helperTextId:d}=use(l);return jsx("p",{id:e??(d||void 0),className:cn("text-sm text-subtle",r),...t})}L.displayName="Field.HelperText";function N({id:e,className:r,...t}){let{invalid:d,errorTextId:i}=use(l);return d?jsx("p",{id:e??(i||void 0),role:"alert",className:cn("text-sm text-subtle intent-danger",r),...t}):null}N.displayName="Field.ErrorText";var k=Object.assign(m,{Label:T,Input:y,Textarea:C,HelperText:L,ErrorText:N});export{j as a,P as b,k as c};//# sourceMappingURL=chunk-N2HGY7W7.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-N2HGY7W7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Field/index.tsx"],"names":["FieldContext","createContext","useFieldContext","use","FieldRoot","className","invalid","required","disabled","props","fieldId","useId","labelId","helperTextId","errorTextId","jsx","cn","FieldLabel","htmlFor","showIndicator","children","jsxs","Label","Fragment","RequiredIndicator","OptionalIndicator","useFieldInputProps","FieldInput","fieldProps","Input","FieldTextarea","Textarea","FieldHelperText","id","FieldErrorText","Field"],"mappings":"+SAwBA,IAAMA,CAAAA,CAAeC,aAAAA,CAAiC,CACpD,OAAA,CAAS,EAAA,CACT,QAAS,EAAA,CACT,YAAA,CAAc,GACd,WAAA,CAAa,EACf,CAAC,CAAA,CAEM,SAASC,GAAkB,CAChC,OAAOC,IAAIH,CAAY,CACzB,CAUA,SAASI,CAAAA,CAAU,CACjB,SAAA,CAAAC,EACA,OAAA,CAAAC,CAAAA,CACA,SAAAC,CAAAA,CACA,QAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAAmB,CAEjB,IAAMC,CAAAA,CAAU,CAAA,MAAA,EADLC,OACgB,CAAA,CAAA,CACrBC,EAAU,CAAA,EAAGF,CAAO,CAAA,MAAA,CAAA,CACpBG,CAAAA,CAAe,GAAGH,CAAO,CAAA,OAAA,CAAA,CACzBI,EAAc,CAAA,EAAGJ,CAAO,SAE9B,OACEK,GAAAA,CAACf,EAAA,CACC,KAAA,CAAO,CACL,OAAA,CAAAM,CAAAA,CACA,SAAAC,CAAAA,CACA,QAAA,CAA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CAAA,CAC1B,IAAA,CAAK,QACL,SAAA,CAAWE,EAAAA,CAAG,oCAAqCX,CAAS,CAAA,CAC3D,GAAGI,CAAAA,CACN,CAAA,CAPmB,IASvB,CAEAyB,EAAe,WAAA,CAAc,iBAAA,KAIhBC,CAAAA,CAAQ,MAAA,CAAO,OAAO/B,CAAAA,CAAW,CAC5C,MAAOa,CAAAA,CACP,KAAA,CAAOU,EACP,QAAA,CAAUG,CAAAA,CACV,WAAYE,CAAAA,CACZ,SAAA,CAAWE,CACb,CAAC","file":"chunk-N2HGY7W7.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use, useId } from 'react'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\nimport { Input, type InputProps } from '../Input'\nimport { Label, type LabelProps } from '../Label'\nimport { Textarea, type TextareaProps } from '../Textarea'\n\n/* ─── Context ─── */\n\ninterface FieldContextValue {\n invalid?: boolean\n required?: boolean\n disabled?: boolean\n fieldId: string\n labelId: string\n helperTextId: string\n errorTextId: string\n}\n\nconst FieldContext = createContext<FieldContextValue>({\n fieldId: '',\n labelId: '',\n helperTextId: '',\n errorTextId: ''\n})\n\nexport function useFieldContext() {\n return use(FieldContext)\n}\n\n/* ─── Root ─── */\n\nexport interface FieldRootProps extends ComponentProps<'div'> {\n invalid?: boolean\n required?: boolean\n disabled?: boolean\n}\n\nfunction FieldRoot({\n className,\n invalid,\n required,\n disabled,\n ...props\n}: FieldRootProps) {\n const id = useId()\n const fieldId = `field-${id}`\n const labelId = `${fieldId}-label`\n const helperTextId = `${fieldId}-helper`\n const errorTextId = `${fieldId}-error`\n\n return (\n <FieldContext\n value={{\n invalid,\n required,\n disabled,\n fieldId,\n labelId,\n helperTextId,\n errorTextId\n }}\n >\n <div className={cn('grid gap-1.5', className)} {...props} />\n </FieldContext>\n )\n}\n\nFieldRoot.displayName = 'Field'\n\n/* ─── Label ─── */\n\nexport interface FieldLabelProps extends LabelProps {\n showIndicator?: boolean\n}\n\nfunction FieldLabel({\n htmlFor,\n showIndicator,\n children,\n ...props\n}: FieldLabelProps) {\n const { fieldId, labelId, required } = use(FieldContext)\n return (\n <Label\n id={labelId || undefined}\n htmlFor={htmlFor ?? (fieldId || undefined)}\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\nFieldLabel.displayName = 'Field.Label'\n\n/* ─── aria helper ─── */\n\nexport function useFieldInputProps() {\n const { invalid, required, disabled, fieldId, helperTextId, errorTextId } =\n use(FieldContext)\n const describedBy = invalid ? errorTextId : helperTextId\n return {\n id: fieldId || undefined,\n disabled: disabled || undefined,\n 'aria-invalid': invalid || undefined,\n 'aria-required': required || undefined,\n 'aria-describedby': describedBy || undefined\n }\n}\n\n/* ─── Input ─── */\n\nfunction FieldInput(props: InputProps) {\n const fieldProps = useFieldInputProps()\n return <Input {...fieldProps} {...props} />\n}\n\nFieldInput.displayName = 'Field.Input'\n\n/* ─── Textarea ─── */\n\nfunction FieldTextarea(props: TextareaProps) {\n const fieldProps = useFieldInputProps()\n return <Textarea {...fieldProps} {...props} />\n}\n\nFieldTextarea.displayName = 'Field.Textarea'\n\n/* ─── Helper text ─── */\n\nexport interface FieldHelperTextProps extends ComponentProps<'p'> {}\n\nfunction FieldHelperText({ id, className, ...props }: FieldHelperTextProps) {\n const { helperTextId } = use(FieldContext)\n return (\n <p\n id={id ?? (helperTextId || undefined)}\n className={cn('text-sm text-subtle', className)}\n {...props}\n />\n )\n}\n\nFieldHelperText.displayName = 'Field.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface FieldErrorTextProps extends ComponentProps<'p'> {}\n\nfunction FieldErrorText({ id, className, ...props }: FieldErrorTextProps) {\n const { invalid, errorTextId } = use(FieldContext)\n if (!invalid) return null\n return (\n <p\n id={id ?? (errorTextId || undefined)}\n role='alert'\n className={cn('text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nFieldErrorText.displayName = 'Field.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const Field = Object.assign(FieldRoot, {\n Label: FieldLabel,\n Input: FieldInput,\n Textarea: FieldTextarea,\n HelperText: FieldHelperText,\n ErrorText: FieldErrorText\n})\n\nexport type FieldProps = FieldRootProps\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {a}from'./chunk-4LGCF3SN.js';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var m=cva("w-full rounded-lg font-sans min-h-20 resize-y",{variants:{intent:a,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field",subtle:"bg-subtle text-normal border border-transparent is-interactive-field"},size:{sm:"px-1.5 py-2 text-base",md:"px-2 py-2.5 text-base",lg:"px-2 py-3 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function l({className:t,intent:a,emphasis:r,size:s,autoResize:n,...i}){return jsx("textarea",{className:cn(m({intent:a,emphasis:r,size:s}),n&&"[field-sizing:content] resize-none",t),...i})}l.displayName="Textarea";export{m as a,l as b};//# sourceMappingURL=chunk-OIAETOZT.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-OIAETOZT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Textarea/index.tsx"],"names":["textareaVariants","cva","intentVariants","Textarea","className","intent","emphasis","size","autoResize","props","jsx","cn"],"mappings":"6JAUO,IAAMA,EAAmBC,GAAAA,CAC9B,+CAAA,CACA,CACE,QAAA,CAAU,CACR,OAAQC,CAAAA,CACR,QAAA,CAAU,CACR,MAAA,CAAQ,4DACR,MAAA,CACE,sEACJ,EACA,IAAA,CAAM,CACJ,GAAI,uBAAA,CACJ,EAAA,CAAI,wBACJ,EAAA,CAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,KAAM,IACR,CACF,CACF,EAQO,SAASC,CAAAA,CAAS,CACvB,UAAAC,CAAAA,CACA,MAAA,CAAAC,EACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkB,CAChB,OACEC,GAAAA,CAAC,UAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CACTX,EAAiB,CAAE,MAAA,CAAAK,EAAQ,QAAA,CAAAC,CAAAA,CAAU,KAAAC,CAAK,CAAC,EAC3CC,CAAAA,EAAc,oCAAA,CACdJ,CACF,CAAA,CACC,GAAGK,EACN,CAEJ,CAEAN,EAAS,WAAA,CAAc,UAAA","file":"chunk-OIAETOZT.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const textareaVariants = cva(\n 'w-full rounded-lg font-sans min-h-20 resize-y',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal: 'emphasis-sunken border border-subtle is-interactive-field',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field'\n },\n size: {\n sm: 'px-1.5 py-2 text-base',\n md: 'px-2 py-2.5 text-base',\n lg: 'px-2 py-3 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\nexport interface TextareaProps\n extends Omit<ComponentProps<'textarea'>, 'size'>,\n VariantProps<typeof textareaVariants> {\n autoResize?: boolean\n}\n\nexport function Textarea({\n className,\n intent,\n emphasis,\n size,\n autoResize,\n ...props\n}: TextareaProps) {\n return (\n <textarea\n className={cn(\n textareaVariants({ intent, emphasis, size }),\n autoResize && '[field-sizing:content] resize-none',\n className\n )}\n {...props}\n />\n )\n}\n\nTextarea.displayName = 'Textarea'\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
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
|
|
@@ -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":"uaAsBMA,CAAAA,CAAgBC,aAAAA,CAAkC,EAAE,CAAA,CA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C,CAAAA,CAAgB,WAAA,CAAc,mBAMvB,SAASC,CAAAA,CAAc,CAAE,QAAA,CAAAvB,CAAAA,CAAU,GAAGjB,CAAM,CAAA,CAAuB,CACxE,OACEK,GAAAA,CAACc,EAAA,CACC,QAAA,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-RXMWFJ6W.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } 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 interface SelectRootProps\n extends ComponentProps<typeof SelectPrimitive.Root> {\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 interface SelectTriggerProps\n extends ComponentProps<typeof SelectPrimitive.Trigger>,\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 interface SelectValueProps\n extends ComponentProps<typeof SelectPrimitive.Value> {}\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 interface SelectIconProps\n extends ComponentProps<typeof SelectPrimitive.Icon> {}\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 interface SelectPortalProps\n extends ComponentProps<typeof SelectPrimitive.Portal> {}\n\nexport function SelectPortal(props: SelectPortalProps) {\n return <SelectPrimitive.Portal {...props} />\n}\n\nSelectPortal.displayName = 'Select.Portal'\n\n/* ─── Positioner ─── */\n\nexport interface SelectPositionerProps\n extends ComponentProps<typeof SelectPrimitive.Positioner> {}\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 interface SelectPopupProps\n extends ComponentProps<typeof SelectPrimitive.Popup> {}\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 interface SelectItemProps\n extends ComponentProps<typeof SelectPrimitive.Item> {}\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 interface SelectItemTextProps\n extends ComponentProps<typeof SelectPrimitive.ItemText> {}\n\nexport function SelectItemText(props: SelectItemTextProps) {\n return <SelectPrimitive.ItemText {...props} />\n}\n\nSelectItemText.displayName = 'Select.ItemText'\n\n/* ─── ItemIndicator ─── */\n\nexport interface SelectItemIndicatorProps\n extends ComponentProps<typeof SelectPrimitive.ItemIndicator> {}\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 interface SelectGroupProps\n extends ComponentProps<typeof SelectPrimitive.Group> {}\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 interface SelectGroupLabelProps\n extends ComponentProps<typeof SelectPrimitive.GroupLabel> {}\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 interface SelectLabelProps\n extends ComponentProps<typeof SelectPrimitive.Label> {\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 interface SelectScrollUpArrowProps\n extends ComponentProps<typeof SelectPrimitive.ScrollUpArrow> {}\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 interface SelectScrollDownArrowProps\n extends ComponentProps<typeof SelectPrimitive.ScrollDownArrow> {}\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"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {a}from'./chunk-4LGCF3SN.js';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var m=cva("w-full rounded-lg font-sans",{variants:{intent:a,emphasis:{normal:"emphasis-sunken border border-subtle 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 u({className:e,intent:n,emphasis:r,size:s,type:a="text",...i}){return jsx("input",{type:a,className:cn(m({intent:n,emphasis:r,size:s,className:e})),...i})}u.displayName="Input";export{m as a,u as b};//# sourceMappingURL=chunk-VSKUGXQG.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-VSKUGXQG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Input/index.tsx"],"names":["inputVariants","cva","intentVariants","Input","className","intent","emphasis","size","type","props","jsx","cn"],"mappings":"6JAUO,IAAMA,CAAAA,CAAgBC,IAAI,6BAAA,CAA+B,CAC9D,SAAU,CACR,MAAA,CAAQC,EACR,QAAA,CAAU,CACR,MAAA,CAAQ,2DAAA,CACR,OACE,sEACJ,CAAA,CACA,KAAM,CACJ,EAAA,CAAI,uBACJ,EAAA,CAAI,qBAAA,CACJ,GAAI,qBACN,CACF,EACA,eAAA,CAAiB,CACf,SAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CAAC,EAMM,SAASC,EAAM,CACpB,SAAA,CAAAC,EACA,MAAA,CAAAC,CAAAA,CACA,SAAAC,CAAAA,CACA,IAAA,CAAAC,EACA,IAAA,CAAAC,CAAAA,CAAO,OACP,GAAGC,CACL,EAAe,CACb,OACEC,IAAC,OAAA,CAAA,CACC,IAAA,CAAMF,CAAAA,CACN,SAAA,CAAWG,GAAGX,CAAAA,CAAc,CAAE,OAAAK,CAAAA,CAAQ,QAAA,CAAAC,EAAU,IAAA,CAAAC,CAAAA,CAAM,UAAAH,CAAU,CAAC,CAAC,CAAA,CACjE,GAAGK,EACN,CAEJ,CAEAN,EAAM,WAAA,CAAc,OAAA","file":"chunk-VSKUGXQG.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const inputVariants = cva('w-full rounded-lg font-sans', {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal: 'emphasis-sunken border border-subtle 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\nexport interface InputProps\n extends Omit<ComponentProps<'input'>, 'size'>,\n VariantProps<typeof inputVariants> {}\n\nexport function Input({\n className,\n intent,\n emphasis,\n size,\n type = 'text',\n ...props\n}: InputProps) {\n return (\n <input\n type={type}\n className={cn(inputVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nInput.displayName = 'Input'\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("inline-block justify-self-start self-start px-[0.1em] py-[0.05em]",{variants:{intent:{neutral:"intent-neutral","neutral-inverted":"intent-neutral",brand:"intent-brand","brand-secondary":"intent-brand-secondary",accent:"intent-accent",danger:"intent-danger",success:"intent-success",warning:"intent-warning",info:"intent-info"}},defaultVariants:{intent:"info"}}),c=new Set(["h1","h2","h3","h4","h5","h6"]);function l({as:e,className:a,intent:t,...r}){let n=e||"mark",s=typeof n=="string"&&c.has(n),i=t==="neutral-inverted";return jsx(n,{className:cn(p({intent:t}),i?"bg-neutral-0 text-neutral-13":"bg-mark text-mark",s&&"px-[0.4em] py-[0.2em]",a),...r})}l.displayName="Mark";export{p as a,l as b};//# sourceMappingURL=chunk-WOU2B425.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-WOU2B425.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Mark/index.tsx"],"names":["markVariants","cva","headingElements","Mark","as","className","intent","props","Component","isHeading","isNeutralInverted","jsx","cn"],"mappings":"yHAMO,IAAMA,CAAAA,CAAeC,IAC1B,mEAAA,CACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQ,CACN,QAAS,gBAAA,CACT,kBAAA,CAAoB,gBAAA,CACpB,KAAA,CAAO,cAAA,CACP,iBAAA,CAAmB,yBACnB,MAAA,CAAQ,eAAA,CACR,MAAA,CAAQ,eAAA,CACR,OAAA,CAAS,gBAAA,CACT,QAAS,gBAAA,CACT,IAAA,CAAM,aACR,CACF,CAAA,CACA,eAAA,CAAiB,CAAE,MAAA,CAAQ,MAAO,CACpC,CACF,CAAA,CAQMC,CAAAA,CAAkB,IAAI,GAAA,CAAI,CAAC,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,IAAI,CAAC,EAE7D,SAASC,CAAAA,CAAqC,CACnD,EAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,EAAiB,CACf,IAAMC,CAAAA,CAAYJ,CAAAA,EAAM,MAAA,CAClBK,CAAAA,CACJ,OAAOD,CAAAA,EAAc,QAAA,EAAYN,CAAAA,CAAgB,GAAA,CAAIM,CAAS,CAAA,CAC1DE,EAAoBJ,CAAAA,GAAW,kBAAA,CACrC,OACEK,GAAAA,CAACH,CAAAA,CAAA,CACC,UAAWI,EAAAA,CACTZ,CAAAA,CAAa,CAAE,MAAA,CAAAM,CAAO,CAAC,EACvBI,CAAAA,CACI,8BAAA,CACA,mBAAA,CACJD,CAAAA,EAAa,uBAAA,CACbJ,CACF,CAAA,CACC,GAAGE,CAAAA,CACN,CAEJ,CAEAJ,CAAAA,CAAK,WAAA,CAAc,MAAA","file":"chunk-WOU2B425.js","sourcesContent":["import type { ComponentProps, ElementType } from 'react'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nexport const markVariants = cva(\n 'inline-block justify-self-start self-start px-[0.1em] py-[0.05em]',\n {\n variants: {\n intent: {\n neutral: 'intent-neutral',\n 'neutral-inverted': 'intent-neutral',\n brand: 'intent-brand',\n 'brand-secondary': 'intent-brand-secondary',\n accent: 'intent-accent',\n danger: 'intent-danger',\n success: 'intent-success',\n warning: 'intent-warning',\n info: 'intent-info'\n }\n },\n defaultVariants: { intent: 'info' }\n }\n)\n\nexport type MarkProps<T extends ElementType = 'mark'> = {\n as?: T\n className?: string\n} & VariantProps<typeof markVariants> &\n Omit<ComponentProps<T>, 'as' | 'className'>\n\nconst headingElements = new Set(['h1', 'h2', 'h3', 'h4', 'h5', 'h6'])\n\nexport function Mark<T extends ElementType = 'mark'>({\n as,\n className,\n intent,\n ...props\n}: MarkProps<T>) {\n const Component = as || 'mark'\n const isHeading =\n typeof Component === 'string' && headingElements.has(Component)\n const isNeutralInverted = intent === 'neutral-inverted'\n return (\n <Component\n className={cn(\n markVariants({ intent }),\n isNeutralInverted\n ? 'bg-neutral-0 text-neutral-13'\n : 'bg-mark text-mark',\n isHeading && 'px-[0.4em] py-[0.2em]',\n className\n )}\n {...props}\n />\n )\n}\n\nMark.displayName = 'Mark'\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 q=Autocomplete.useFilter,j=Autocomplete.useFilteredItems,T=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 m(e){return jsx(Autocomplete.Root,{...e})}m.displayName="Autocomplete";function a(e){return jsx(Autocomplete.Value,{...e})}a.displayName="Autocomplete.Value";function c({className:e,intent:t,emphasis:r,size:n,...G}){let s=a$2(),w=!!s.fieldId;return jsx(Autocomplete.InputGroup,{className:cn(T({intent:t,emphasis:r,size:n,className:e})),"aria-invalid":w&&s.invalid||void 0,...G})}c.displayName="Autocomplete.InputGroup";function d({className:e,...t}){let r=a$2(),n=!!r.fieldId;return jsx(Autocomplete.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",e),...n&&{id:r.fieldId,"aria-invalid":r.invalid||void 0,"aria-required":r.required||void 0,"aria-describedby":r.invalid?r.errorTextId||void 0:r.helperTextId||void 0},...t})}d.displayName="Autocomplete.Input";function P({className:e,children:t,...r}){return jsx(Autocomplete.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",e),...r,children:t??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}P.displayName="Autocomplete.Trigger";function A({className:e,children:t,...r}){return jsx(Autocomplete.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",e),...r,children:t??jsx(XIcon,{weight:"bold",className:"size-4"})})}A.displayName="Autocomplete.Clear";function x(e){return jsx(Autocomplete.Portal,{...e})}x.displayName="Autocomplete.Portal";function f({className:e,...t}){return jsx(Autocomplete.Positioner,{className:cn("z-50",e),sideOffset:4,...t})}f.displayName="Autocomplete.Positioner";function y({className:e,...t}){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",e),...t})}y.displayName="Autocomplete.Popup";function b({className:e,...t}){return jsx(Autocomplete.List,{className:e,...t})}b.displayName="Autocomplete.List";function g({className:e,...t}){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",e),...t})}g.displayName="Autocomplete.Item";function v(e){return jsx(Autocomplete.Collection,{...e})}v.displayName="Autocomplete.Collection";function C({className:e,...t}){return jsx(Autocomplete.Group,{className:cn("[&+&]:mt-1",e),...t})}C.displayName="Autocomplete.Group";function I({className:e,...t}){return jsx(Autocomplete.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",e),...t})}I.displayName="Autocomplete.GroupLabel";function N({className:e,...t}){return jsx(Autocomplete.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",e),...t})}N.displayName="Autocomplete.Empty";function h({className:e,...t}){return jsx(Autocomplete.Status,{className:cn("sr-only",e),...t})}h.displayName="Autocomplete.Status";var D=Object.assign(m,{Value:a,InputGroup:c,Input:d,Trigger:P,Clear:A,Portal:x,Positioner:f,Popup:y,List:b,Item:g,Collection:v,Group:C,GroupLabel:I,Empty:N,Status:h});export{q as a,j as b,T as c,m as d,a as e,c as f,d as g,P as h,A as i,x as j,f as k,y as l,b as m,g as n,v as o,C as p,I as q,N as r,h as s,D as t};//# sourceMappingURL=chunk-Y6TDYPCZ.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-Y6TDYPCZ.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,EAOO,SAASC,CAAAA,CAAiBC,CAAAA,CAA8B,CAC7D,OAAOC,GAAAA,CAACP,YAAAA,CAAsB,IAAA,CAAtB,CAA4B,GAAGM,CAAAA,CAAO,CAChD,CAEAD,CAAAA,CAAiB,WAAA,CAAc,cAAA,CAOxB,SAASG,CAAAA,CAAkBF,CAAAA,CAA+B,CAC/D,OAAOC,IAACP,YAAAA,CAAsB,KAAA,CAAtB,CAA6B,GAAGM,CAAAA,CAAO,CACjD,CAEAE,CAAAA,CAAkB,YAAc,oBAAA,CAQzB,SAASC,CAAAA,CAAuB,CACrC,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,SAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGP,CACL,CAAA,CAAgC,CAC9B,IAAMQ,EAAeC,GAAAA,EAAgB,CAC/BC,C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AA,CAAuB,YAAc,yBAAA,CAO9B,SAASC,CAAAA,CAAkB,CAChC,SAAA,CAAAtB,CAAAA,CACA,GAAGJ,CACL,EAA2B,CACzB,OACEC,GAAAA,CAACP,YAAAA,CAAsB,KAAA,CAAtB,CACC,SAAA,CAAWiB,EAAAA,CACT,yFACAP,CACF,CAAA,CACC,GAAGJ,CAAAA,CACN,CAEJ,CAEA0B,CAAAA,CAAkB,WAAA,CAAc,oBAAA,CAOzB,SAASC,CAAAA,CAAmB,CACjC,SAAA,CAAAvB,CAAAA,CACA,GAAGJ,CACL,EAA4B,CAC1B,OACEC,GAAAA,CAACP,YAAAA,CAAsB,MAAA,CAAtB,CACC,SAAA,CAAWiB,EAAAA,CAAG,UAAWP,CAAS,CAAA,CACjC,GAAGJ,CAAAA,CACN,CAEJ,CAEA2B,CAAAA,CAAmB,WAAA,CAAc,sBAI1B,IAAMC,CAAAA,CAAe,MAAA,CAAO,MAAA,CAAO7B,CAAAA,CAAkB,CAC1D,KAAA,CAAOG,CAAAA,CACP,WAAYC,CAAAA,CACZ,KAAA,CAAOS,CAAAA,CACP,OAAA,CAASC,CAAAA,CACT,KAAA,CAAOG,CAAAA,CACP,MAAA,CAAQE,EACR,UAAA,CAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,IAAA,CAAMC,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,WAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,UAAA,CAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,MAAA,CAAQC,CACV,CAAC","file":"chunk-Y6TDYPCZ.js","sourcesContent":["'use client'\n\nimport type { ComponentProps } 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 interface AutocompleteRootProps\n extends ComponentProps<typeof AutocompletePrimitive.Root> {}\n\nexport function AutocompleteRoot(props: AutocompleteRootProps) {\n return <AutocompletePrimitive.Root {...props} />\n}\n\nAutocompleteRoot.displayName = 'Autocomplete'\n\n/* ─── Value ─── */\n\nexport interface AutocompleteValueProps\n extends ComponentProps<typeof AutocompletePrimitive.Value> {}\n\nexport function AutocompleteValue(props: AutocompleteValueProps) {\n return <AutocompletePrimitive.Value {...props} />\n}\n\nAutocompleteValue.displayName = 'Autocomplete.Value'\n\n/* ─── InputGroup ─── */\n\nexport interface AutocompleteInputGroupProps\n extends ComponentProps<typeof AutocompletePrimitive.InputGroup>,\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 interface AutocompleteInputProps\n extends ComponentProps<typeof AutocompletePrimitive.Input> {}\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 interface AutocompleteTriggerProps\n extends ComponentProps<typeof AutocompletePrimitive.Trigger> {}\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 interface AutocompleteClearProps\n extends ComponentProps<typeof AutocompletePrimitive.Clear> {}\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 interface AutocompletePortalProps\n extends ComponentProps<typeof AutocompletePrimitive.Portal> {}\n\nexport function AutocompletePortal(props: AutocompletePortalProps) {\n return <AutocompletePrimitive.Portal {...props} />\n}\n\nAutocompletePortal.displayName = 'Autocomplete.Portal'\n\n/* ─── Positioner ─── */\n\nexport interface AutocompletePositionerProps\n extends ComponentProps<typeof AutocompletePrimitive.Positioner> {}\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 interface AutocompletePopupProps\n extends ComponentProps<typeof AutocompletePrimitive.Popup> {}\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 interface AutocompleteListProps\n extends ComponentProps<typeof AutocompletePrimitive.List> {}\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 interface AutocompleteItemProps\n extends ComponentProps<typeof AutocompletePrimitive.Item> {}\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 interface AutocompleteCollectionProps\n extends ComponentProps<typeof AutocompletePrimitive.Collection> {}\n\nexport function AutocompleteCollection(props: AutocompleteCollectionProps) {\n return <AutocompletePrimitive.Collection {...props} />\n}\n\nAutocompleteCollection.displayName = 'Autocomplete.Collection'\n\n/* ─── Group ─── */\n\nexport interface AutocompleteGroupProps\n extends ComponentProps<typeof AutocompletePrimitive.Group> {}\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 interface AutocompleteGroupLabelProps\n extends ComponentProps<typeof AutocompletePrimitive.GroupLabel> {}\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 interface AutocompleteEmptyProps\n extends ComponentProps<typeof AutocompletePrimitive.Empty> {}\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 interface AutocompleteStatusProps\n extends ComponentProps<typeof AutocompletePrimitive.Status> {}\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"]}
|