@oztix/roadie-components 2.0.1 → 2.0.2
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 +42 -21
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.js +1 -2
- package/dist/Accordion.js.map +1 -1
- package/dist/Autocomplete.d.ts +101 -60
- package/dist/Autocomplete.d.ts.map +1 -0
- package/dist/Autocomplete.js +1 -2
- package/dist/Autocomplete.js.map +1 -1
- package/dist/Badge.d.ts +27 -16
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Breadcrumb.d.ts +45 -23
- package/dist/Breadcrumb.d.ts.map +1 -0
- package/dist/Breadcrumb.js +1 -1
- package/dist/Breadcrumb.js.map +1 -1
- package/dist/Button-CDQ6ik0P.js +2 -0
- package/dist/Button-CDQ6ik0P.js.map +1 -0
- package/dist/Button-DdE0vCfo.js +2 -0
- package/dist/Button-DdE0vCfo.js.map +1 -0
- package/dist/Button-Dt1TGgrL.d.ts +26 -0
- package/dist/Button-Dt1TGgrL.d.ts.map +1 -0
- package/dist/Button.d.ts +3 -17
- package/dist/Button.js +1 -2
- package/dist/Card.d.ts +56 -30
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.js +1 -1
- package/dist/Card.js.map +1 -1
- package/dist/Code.d.ts +19 -13
- package/dist/Code.d.ts.map +1 -0
- package/dist/Code.js +1 -1
- package/dist/Code.js.map +1 -1
- package/dist/Combobox.d.ts +111 -63
- package/dist/Combobox.d.ts.map +1 -0
- package/dist/Combobox.js +1 -2
- package/dist/Combobox.js.map +1 -1
- package/dist/Field.d.ts +63 -46
- package/dist/Field.d.ts.map +1 -0
- package/dist/Field.js +1 -2
- package/dist/Field.js.map +1 -1
- package/dist/Fieldset.d.ts +34 -22
- package/dist/Fieldset.d.ts.map +1 -0
- package/dist/Fieldset.js +1 -2
- package/dist/Fieldset.js.map +1 -1
- package/dist/Highlight.d.ts +20 -15
- package/dist/Highlight.d.ts.map +1 -0
- package/dist/Highlight.js +1 -2
- package/dist/Highlight.js.map +1 -1
- package/dist/Indicator.d.ts +20 -12
- package/dist/Indicator.d.ts.map +1 -0
- package/dist/Indicator.js +1 -1
- package/dist/Indicator.js.map +1 -1
- package/dist/Input.d.ts +22 -14
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.js +1 -2
- package/dist/Input.js.map +1 -1
- package/dist/Label.d.ts +12 -8
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +1 -1
- package/dist/Label.js.map +1 -1
- package/dist/LinkButton-9nnOzX_0.js +2 -0
- package/dist/LinkButton-9nnOzX_0.js.map +1 -0
- package/dist/LinkButton.d.ts +2 -35
- package/dist/LinkButton.js +1 -2
- package/dist/Mark.d.ts +19 -12
- package/dist/Mark.d.ts.map +1 -0
- package/dist/Mark.js +1 -1
- package/dist/Mark.js.map +1 -1
- package/dist/Marquee.d.ts +27 -16
- package/dist/Marquee.d.ts.map +1 -0
- package/dist/Marquee.js +5 -2
- package/dist/Marquee.js.map +1 -1
- package/dist/Prose.d.ts +19 -12
- package/dist/Prose.d.ts.map +1 -0
- package/dist/Prose.js +1 -1
- package/dist/Prose.js.map +1 -1
- package/dist/RadioGroup.d.ts +62 -38
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.js +1 -2
- package/dist/RadioGroup.js.map +1 -1
- package/dist/Select.d.ts +129 -73
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.js +1 -2
- package/dist/Select.js.map +1 -1
- package/dist/Separator.d.ts +17 -12
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Separator.js +1 -1
- package/dist/Separator.js.map +1 -1
- package/dist/SpotIllustration.d.ts +71 -50
- package/dist/SpotIllustration.d.ts.map +1 -0
- package/dist/SpotIllustration.js +1 -2
- package/dist/SpotIllustration.js.map +1 -1
- package/dist/Steps.d.ts +102 -62
- package/dist/Steps.d.ts.map +1 -0
- package/dist/Steps.js +1 -2
- package/dist/Steps.js.map +1 -1
- package/dist/Textarea.d.ts +22 -13
- package/dist/Textarea.d.ts.map +1 -0
- package/dist/Textarea.js +1 -2
- package/dist/Textarea.js.map +1 -1
- package/dist/index-0w-ydb3o.d.ts +50 -0
- package/dist/index-0w-ydb3o.d.ts.map +1 -0
- package/dist/index-C3_4djmE.d.ts +17 -0
- package/dist/index-C3_4djmE.d.ts.map +1 -0
- package/dist/index.d.ts +47 -49
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/variants-DTAwzBl3.js +2 -0
- package/dist/variants-DTAwzBl3.js.map +1 -0
- package/package.json +6 -5
- package/dist/Button-fnIVmjIB.d.ts +0 -18
- package/dist/Button.js.map +0 -1
- package/dist/LinkButton.js.map +0 -1
- package/dist/_chunks/chunk-3H22EQQ6.js +0 -2
- package/dist/_chunks/chunk-3H22EQQ6.js.map +0 -1
- package/dist/_chunks/chunk-42UB7PQB.js +0 -3
- package/dist/_chunks/chunk-42UB7PQB.js.map +0 -1
- package/dist/_chunks/chunk-4LGCF3SN.js +0 -3
- package/dist/_chunks/chunk-4LGCF3SN.js.map +0 -1
- package/dist/_chunks/chunk-AFSDN4WI.js +0 -2
- package/dist/_chunks/chunk-AFSDN4WI.js.map +0 -1
- package/dist/_chunks/chunk-BQEJDV7D.js +0 -3
- package/dist/_chunks/chunk-BQEJDV7D.js.map +0 -1
- package/dist/_chunks/chunk-DRVUAPKN.js +0 -2
- package/dist/_chunks/chunk-DRVUAPKN.js.map +0 -1
- package/dist/_chunks/chunk-EKOEXSAP.js +0 -2
- package/dist/_chunks/chunk-EKOEXSAP.js.map +0 -1
- package/dist/_chunks/chunk-FQNVMKKV.js +0 -7
- package/dist/_chunks/chunk-FQNVMKKV.js.map +0 -1
- package/dist/_chunks/chunk-IEDKSZAQ.js +0 -3
- package/dist/_chunks/chunk-IEDKSZAQ.js.map +0 -1
- package/dist/_chunks/chunk-JBHYUOI2.js +0 -3
- package/dist/_chunks/chunk-JBHYUOI2.js.map +0 -1
- package/dist/_chunks/chunk-JGTZ3GCR.js +0 -2
- package/dist/_chunks/chunk-JGTZ3GCR.js.map +0 -1
- package/dist/_chunks/chunk-LHNOY24C.js +0 -2
- package/dist/_chunks/chunk-LHNOY24C.js.map +0 -1
- package/dist/_chunks/chunk-LMV3JECI.js +0 -3
- package/dist/_chunks/chunk-LMV3JECI.js.map +0 -1
- package/dist/_chunks/chunk-MDRAL676.js +0 -3
- package/dist/_chunks/chunk-MDRAL676.js.map +0 -1
- package/dist/_chunks/chunk-N2HGY7W7.js +0 -3
- package/dist/_chunks/chunk-N2HGY7W7.js.map +0 -1
- package/dist/_chunks/chunk-NRVNUMJE.js +0 -2
- package/dist/_chunks/chunk-NRVNUMJE.js.map +0 -1
- package/dist/_chunks/chunk-OIAETOZT.js +0 -3
- package/dist/_chunks/chunk-OIAETOZT.js.map +0 -1
- package/dist/_chunks/chunk-OIZX63GZ.js +0 -2
- package/dist/_chunks/chunk-OIZX63GZ.js.map +0 -1
- package/dist/_chunks/chunk-OPR5JL7N.js +0 -3
- package/dist/_chunks/chunk-OPR5JL7N.js.map +0 -1
- package/dist/_chunks/chunk-SCS7WZ6Z.js +0 -3
- package/dist/_chunks/chunk-SCS7WZ6Z.js.map +0 -1
- package/dist/_chunks/chunk-VSKUGXQG.js +0 -3
- package/dist/_chunks/chunk-VSKUGXQG.js.map +0 -1
- package/dist/_chunks/chunk-WOU2B425.js +0 -3
- package/dist/_chunks/chunk-WOU2B425.js.map +0 -1
- package/dist/_chunks/chunk-XERFFH3S.js +0 -3
- package/dist/_chunks/chunk-XERFFH3S.js.map +0 -1
- package/dist/_chunks/chunk-XRFHVFJ5.js +0 -3
- package/dist/_chunks/chunk-XRFHVFJ5.js.map +0 -1
- package/dist/_chunks/chunk-ZXR32FYA.js +0 -2
- package/dist/_chunks/chunk-ZXR32FYA.js.map +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Highlight/index.tsx"],"names":["highlight","text","query","ignoreCase","matchAll","validQueries","q","pattern","flags","regex","testRegex","part","Highlight","markProps","jsx","Fragment","chunks","chunk","index","Mark"],"mappings":"4HAqBA,SAASA,CAAAA,CACPC,EACAC,CAAAA,CACAC,CAAAA,CAAa,KACbC,CAAAA,CAAW,IAAA,CACO,CAElB,IAAMC,CAAAA,CAAAA,CADU,MAAM,OAAA,CAAQH,CAAK,EAAIA,CAAAA,CAAQ,CAACA,CAAK,CAAA,EACxB,MAAA,CAAQI,GAAMA,CAAAA,CAAE,MAAA,CAAS,CAAC,CAAA,CAEvD,GAAID,EAAa,MAAA,GAAW,CAAA,CAC1B,OAAO,CAAC,CAAE,KAAAJ,CAAAA,CAAM,KAAA,CAAO,KAAM,CAAC,CAAA,CAMhC,IAAMM,CAAAA,CAHUF,CAAAA,CA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GN,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"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,eAAA,CAAiB,CACf,QAAA,CAAU,QACZ,CACF,CAAC,EASD,SAASC,CAAAA,CAAwC,CAC/C,EAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,OAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAiB,CACf,IAAMC,CAAAA,CAAOD,CAAAA,CACPE,CAAAA,CAAgB,CAAC,CAACD,CAAAA,CAAK,IAAA,EAAQ,CAAC,CAACA,CAAAA,CAAK,OAAA,CACtCE,CAAAA,CAAYP,CAAAA,GAAOK,CAAAA,CAAK,IAAA,CAAO,GAAA,CAAM,KAAA,CAAA,CAC3C,OACEG,GAAAA,CAACD,CAAAA,CAAA,CACC,SAAA,CAAWE,EAAAA,CACTb,C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C,CAAAA,CAAU,CAAE,SAAA,CAAAb,CAAAA,CAAW,GAAGG,CAAM,CAAA,CAAyB,CAChE,OACEI,GAAAA,CAAC,IAAA,CAAA,CAAG,SAAA,CAAWC,EAAAA,CAAG,+BAAA,CAAiCR,CAAS,CAAA,CAAI,GAAGG,CAAAA,CAAO,CAE9E,CAEAU,CAAAA,CAAU,WAAA,CAAc,YAAA,CAExB,SAASC,CAAAA,CAAgB,CAAE,SAAA,CAAAd,CAAAA,CAAW,GAAGG,CAAM,EAAwB,CACrE,OAAOI,GAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAWC,EAAAA,CAAG,qBAAA,CAAuBR,CAAS,CAAA,CAAI,GAAGG,CAAAA,CAAO,CACxE,CAEAW,CAAAA,CAAgB,WAAA,CAAc,kBAAA,KAEjBC,CAAAA,CAAO,MAAA,CAAO,MAAA,CAAOjB,CAAAA,CAAU,CAC1C,MAAA,CAAQW,CAAAA,CACR,OAAA,CAASC,CAAAA,CACT,MAAA,CAAQC,CAAAA,CACR,KAAA,CAAOC,CAAAA,CACP,KAAA,CAAOC,CAAAA,CACP,WAAA,CAAaC,CACf,CAAC","file":"chunk-LHNOY24C.js","sourcesContent":["import type { ComponentProps, 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"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAoB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AAA,CACZ,GACF,CAEJ,CAEAR,EAAiB,WAAA,CAAc,mBAAA,CAE/B,SAASS,CAAAA,CAAiB,CACxB,SAAA,CAAAtB,CAAAA,CACA,QAAA,CAAAU,CAAAA,CACA,GAAGT,CACL,CAAA,CAA0B,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"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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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CAAE,QAAAH,CAAAA,CAAS,WAAA,CAAAQ,CAAY,CAAA,CAAIX,IAAIH,CAAY,CAAA,CACjD,OAAKM,CAAAA,CAEHS,GAAAA,CAAC,KACC,EAAA,CAAIkB,CAAAA,GAAOnB,GAAe,MAAA,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"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-4LGCF3SN.js';import {Button}from'@base-ui/react/button';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva("btn is-interactive",{variants:{intent:a,emphasis:{strong:"emphasis-strong",normal:"emphasis-normal",subtle:"emphasis-subtle",subtler:"emphasis-subtler"},size:{xs:"btn-xs",sm:"btn-sm",md:"btn-md",lg:"btn-lg","icon-xs":"btn-icon-xs","icon-sm":"btn-icon-sm","icon-md":"btn-icon-md","icon-lg":"btn-icon-lg"}},defaultVariants:{emphasis:"normal",size:"md"}});function u({className:s,intent:i,emphasis:o,size:e,...t}){return jsx(Button,{nativeButton:!t.render,className:cn(p({intent:i,emphasis:o,size:e,className:s})),...t})}u.displayName="Button";export{p as a,u as b};//# sourceMappingURL=chunk-NRVNUMJE.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-NRVNUMJE.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Button/Button.tsx"],"names":["buttonVariants","cva","intentVariants","Button","className","intent","emphasis","size","props","jsx","ButtonPrimitive","cn"],"mappings":"wMAWO,IAAMA,CAAAA,CAAiBC,GAAAA,CAAI,oBAAA,CAAsB,CACtD,QAAA,CAAU,CACR,MAAA,CAAQC,CAAAA,CACR,QAAA,CAAU,CACR,OAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,MAAA,CAAQ,iBAAA,CACR,OAAA,CAAS,kBACX,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,SACJ,EAAA,CAAI,QAAA,CACJ,EAAA,CAAI,QAAA,CACJ,SAAA,CAAW,aAAA,CACX,UAAW,aAAA,CACX,SAAA,CAAW,aAAA,CACX,SAAA,CAAW,aACb,CACF,EACA,eAAA,CAAiB,CACf,SAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CAAC,EAMM,SAASC,CAAAA,CAAO,CACrB,UAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAAgB,CACd,OACEC,GAAAA,CAACC,OAAA,CACC,YAAA,CAAc,CAACF,CAAAA,CAAM,MAAA,CACrB,SAAA,CAAWG,GAAGX,CAAAA,CAAe,CAAE,MAAA,CAAAK,CAAAA,CAAQ,QAAA,CAAAC,CAAAA,CAAU,KAAAC,CAAAA,CAAM,SAAA,CAAAH,CAAU,CAAC,CAAC,CAAA,CAClE,GAAGI,CAAAA,CACN,CAEJ,CAEAL,CAAAA,CAAO,WAAA,CAAc,QAAA","file":"chunk-NRVNUMJE.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\n\nexport const buttonVariants = cva('btn is-interactive', {\n variants: {\n intent: intentVariants,\n emphasis: {\n strong: 'emphasis-strong',\n normal: 'emphasis-normal',\n subtle: 'emphasis-subtle',\n subtler: 'emphasis-subtler'\n },\n size: {\n xs: 'btn-xs',\n sm: 'btn-sm',\n md: 'btn-md',\n lg: 'btn-lg',\n 'icon-xs': 'btn-icon-xs',\n 'icon-sm': 'btn-icon-sm',\n 'icon-md': 'btn-icon-md',\n 'icon-lg': 'btn-icon-lg'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n})\n\nexport type ButtonProps = ButtonPrimitive.Props &\n RefAttributes<HTMLElement> &\n VariantProps<typeof buttonVariants>\n\nexport function Button({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ButtonProps) {\n return (\n <ButtonPrimitive\n nativeButton={!props.render}\n className={cn(buttonVariants({ intent, emphasis, size, className }))}\n {...props}\n />\n )\n}\n\nButton.displayName = 'Button'\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Button/IconButton.tsx"],"names":["IconButton","size","props","jsx","Button"],"mappings":"wEAQO,SAASA,CAAAA,CAAW,CAAE,IAAA,CAAAC,CAAAA,CAAO,SAAA,CAAW,GAAGC,CAAM,CAAA,CAAoB,CAC1E,OAAOC,GAAAA,CAACC,CAAAA,CAAA,CAAO,IAAA,CAAMH,CAAAA,CAAO,GAAGC,CAAAA,CAAO,CACxC,CAEAF,CAAAA,CAAW,WAAA,CAAc,YAAA","file":"chunk-OIZX63GZ.js","sourcesContent":["'use client'\n\nimport { Button, type ButtonProps } from './Button'\n\nexport type IconButtonProps = Omit<ButtonProps, 'aria-label'> & {\n 'aria-label': string\n}\n\nexport function IconButton({ size = 'icon-md', ...props }: IconButtonProps) {\n return <Button size={size} {...props} />\n}\n\nIconButton.displayName = 'IconButton'\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {a as a$2}from'./chunk-N2HGY7W7.js';import {a as a$1}from'./chunk-4LGCF3SN.js';import {Combobox}from'@base-ui/react/combobox';import {CheckIcon,XIcon,CaretDownIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var O=Combobox.useFilter,M=cva("inline-flex w-full items-center rounded-lg font-sans",{variants:{intent:a$1,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field-group",subtle:"bg-subtle text-normal border border-transparent is-interactive-field-group"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function a(o){return jsx(Combobox.Root,{...o})}a.displayName="Combobox";function x({className:o,...t}){return jsx(Combobox.Label,{className:cn("text-sm font-medium text-normal",o),...t})}x.displayName="Combobox.Label";function l({className:o,intent:t,emphasis:i,size:p,...G}){let s=a$2(),E=!!s.fieldId;return jsx(Combobox.InputGroup,{className:cn(M({intent:t,emphasis:i,size:p,className:o})),"aria-invalid":E&&s.invalid||void 0,...G})}l.displayName="Combobox.InputGroup";function u({className:o,...t}){let i=a$2(),p=!!i.fieldId;return jsx(Combobox.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",o),...p&&{id:i.fieldId,"aria-invalid":i.invalid||void 0,"aria-required":i.required||void 0,"aria-describedby":i.invalid?i.errorTextId||void 0:i.helperTextId||void 0},...t})}u.displayName="Combobox.Input";function C({className:o,children:t,...i}){return jsx(Combobox.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",o),...i,children:t??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}C.displayName="Combobox.Trigger";function d({className:o,children:t,...i}){return jsx(Combobox.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",o),...i,children:t??jsx(XIcon,{weight:"bold",className:"size-4"})})}d.displayName="Combobox.Clear";function P(o){return jsx(Combobox.Portal,{...o})}P.displayName="Combobox.Portal";function c({className:o,...t}){return jsx(Combobox.Positioner,{className:cn("z-50",o),sideOffset:4,...t})}c.displayName="Combobox.Positioner";function f({className:o,...t}){return jsx(Combobox.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",o),...t})}f.displayName="Combobox.Popup";function y({className:o,...t}){return jsx(Combobox.List,{className:o,...t})}y.displayName="Combobox.List";function v({className:o,...t}){return jsx(Combobox.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",o),...t})}v.displayName="Combobox.Item";function I(o){return jsx(Combobox.Collection,{...o})}I.displayName="Combobox.Collection";function g({className:o,children:t,...i}){return jsx(Combobox.ItemIndicator,{className:cn("shrink-0 text-subtle",o),...i,children:t??jsx(CheckIcon,{weight:"bold",className:"size-4"})})}g.displayName="Combobox.ItemIndicator";function L({className:o,...t}){return jsx(Combobox.Group,{className:cn("[&+&]:mt-1",o),...t})}L.displayName="Combobox.Group";function N({className:o,...t}){return jsx(Combobox.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",o),...t})}N.displayName="Combobox.GroupLabel";function h({className:o,...t}){return jsx(Combobox.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",o),...t})}h.displayName="Combobox.Empty";function T({className:o,...t}){return jsx(Combobox.Status,{className:cn("sr-only",o),...t})}T.displayName="Combobox.Status";var q=Object.assign(a,{Label:x,InputGroup:l,Input:u,Trigger:C,Clear:d,Portal:P,Positioner:c,Popup:f,List:y,Item:v,Collection:I,ItemIndicator:g,Group:L,GroupLabel:N,Empty:h,Status:T});export{O as a,M as b,a as c,x as d,l as e,u as f,C as g,d as h,P as i,c as j,f as k,y as l,v as m,I as n,g as o,L as p,N as q,h as r,T as s,q as t};//# sourceMappingURL=chunk-OPR5JL7N.js.map
|
|
3
|
-
//# sourceMappingURL=chunk-OPR5JL7N.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Combobox/index.tsx"],"names":["useFilter","ComboboxPrimitive","comboboxInputGroupVariants","cva","intentVariants","ComboboxRoot","props","jsx","ComboboxLabel","className","cn","ComboboxInputGroup","intent","emphasis","size","fieldContext","useFieldContext","inField","ComboboxInput","ComboboxTrigger","children","CaretDownIcon","ComboboxClear","XIcon","ComboboxPortal","ComboboxPositioner","ComboboxPopup","ComboboxList","ComboboxItem","ComboboxCollection","ComboboxItemIndicator","CheckIcon","ComboboxGroup","ComboboxGroupLabel","ComboboxEmpty","ComboboxStatus","Combobox"],"mappings":"gUAiBO,IAAMA,EAAYC,QAAAA,CAAkB,SAAA,CAK9BC,CAAAA,CAA6BC,GAAAA,CACxC,uDACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,IACR,QAAA,CAAU,CACR,MAAA,CACE,iEAAA,CACF,MAAA,CACE,4EACJ,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,sBAAA,CACJ,EAAA,CAAI,qBAAA,CACJ,GAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,IAAA,CAAM,IACR,CACF,CACF,EAMO,SAASC,EAAaC,CAAAA,CAA0B,CACrD,OAAOC,GAAAA,CAACN,SAAkB,IAAA,CAAlB,CAAwB,GAAGK,CAAAA,CAAO,CAC5C,CAEAD,CAAAA,CAAa,WAAA,CAAc,UAAA,CAOpB,SAASG,CAAAA,CAAc,CAAE,SAAA,CAAAC,EAAW,GAAGH,CAAM,CAAA,CAAuB,CACzE,OACEC,GAAAA,CAACN,QAAAA,CAAkB,KAAA,CAAlB,CACC,UAAWS,EAAAA,CAAG,iCAAA,CAAmCD,CAAS,CAAA,CACzD,GAAGH,CAAAA,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,CAAlB,CACC,SAAA,CAAWS,EAAAA,CACTR,EAA2B,CAAE,MAAA,CAAAU,CAA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,OACEC,GAAAA,CAACN,QAAAA,CAAkB,UAAA,CAAlB,CACC,SAAA,CAAWS,EAAAA,CACT,yDAAA,CACAD,CACF,EACC,GAAGH,CAAAA,CACN,CAEJ,CAEA2B,EAAmB,WAAA,CAAc,qBAAA,CAO1B,SAASC,CAAAA,CAAc,CAAE,SAAA,CAAAzB,CAAAA,CAAW,GAAGH,CAAM,EAAuB,CACzE,OACEC,GAAAA,CAACN,QAAAA,CAAkB,MAAlB,CACC,SAAA,CAAWS,EAAAA,CACT,wFAAA,CACAD,CACF,CAAA,CACC,GAAGH,CAAAA,CACN,CAEJ,CAEA4B,CAAAA,CAAc,WAAA,CAAc,gBAAA,CAOrB,SAASC,CAAAA,CAAe,CAAE,SAAA,CAAA1B,CAAAA,CAAW,GAAGH,CAAM,CAAA,CAAwB,CAC3E,OACEC,GAAAA,CAACN,QAAAA,CAAkB,MAAA,CAAlB,CAAyB,UAAWS,EAAAA,CAAG,SAAA,CAAWD,CAAS,CAAA,CAAI,GAAGH,CAAAA,CAAO,CAE9E,CAEA6B,CAAAA,CAAe,YAAc,iBAAA,CAItB,IAAMC,CAAAA,CAAW,MAAA,CAAO,MAAA,CAAO/B,CAAAA,CAAc,CAClD,KAAA,CAAOG,EACP,UAAA,CAAYG,CAAAA,CACZ,KAAA,CAAOO,CAAAA,CACP,QAASC,CAAAA,CACT,KAAA,CAAOG,CAAAA,CACP,MAAA,CAAQE,EACR,UAAA,CAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,KAAMC,CAAAA,CACN,IAAA,CAAMC,CAAAA,CACN,UAAA,CAAYC,EACZ,aAAA,CAAeC,CAAAA,CACf,KAAA,CAAOE,CAAAA,CACP,WAAYC,CAAAA,CACZ,KAAA,CAAOC,CAAAA,CACP,MAAA,CAAQC,CACV,CAAC","file":"chunk-OPR5JL7N.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport {\n type ComboboxFilter,\n type ComboboxFilterOptions,\n Combobox as ComboboxPrimitive\n} from '@base-ui/react/combobox'\nimport { CaretDownIcon, CheckIcon, XIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\n\nexport const useFilter = ComboboxPrimitive.useFilter\nexport type { ComboboxFilter as Filter, ComboboxFilterOptions as FilterOptions }\n\n/* ─── Input group variants (matches Input/Select trigger) ─── */\n\nexport const comboboxInputGroupVariants = cva(\n 'inline-flex w-full items-center rounded-lg font-sans',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-sunken border border-subtle is-interactive-field-group',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field-group'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type ComboboxRootProps = ComboboxPrimitive.Root.Props<unknown>\n\nexport function ComboboxRoot(props: ComboboxRootProps) {\n return <ComboboxPrimitive.Root {...props} />\n}\n\nComboboxRoot.displayName = 'Combobox'\n\n/* ─── Label ─── */\n\nexport type ComboboxLabelProps = ComboboxPrimitive.Label.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.Label\n className={cn('text-sm font-medium text-normal', className)}\n {...props}\n />\n )\n}\n\nComboboxLabel.displayName = 'Combobox.Label'\n\n/* ─── InputGroup ─── */\n\nexport type ComboboxInputGroupProps = ComboboxPrimitive.InputGroup.Props &\n RefAttributes<HTMLDivElement> &\n VariantProps<typeof comboboxInputGroupVariants>\n\nexport function ComboboxInputGroup({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: ComboboxInputGroupProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.InputGroup\n className={cn(\n comboboxInputGroupVariants({ intent, emphasis, size, className })\n )}\n aria-invalid={(inField && fieldContext.invalid) || undefined}\n {...props}\n />\n )\n}\n\nComboboxInputGroup.displayName = 'Combobox.InputGroup'\n\n/* ─── Input ─── */\n\nexport type ComboboxInputProps = ComboboxPrimitive.Input.Props &\n RefAttributes<HTMLInputElement>\n\nexport function ComboboxInput({ className, ...props }: ComboboxInputProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <ComboboxPrimitive.Input\n className={cn(\n 'min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle',\n className\n )}\n {...(inField && {\n id: fieldContext.fieldId,\n 'aria-invalid': fieldContext.invalid || undefined,\n 'aria-required': fieldContext.required || undefined,\n 'aria-describedby': fieldContext.invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n )\n}\n\nComboboxInput.displayName = 'Combobox.Input'\n\n/* ─── Trigger ─── */\n\nexport type ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n className={cn(\n 'duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Trigger>\n )\n}\n\nComboboxTrigger.displayName = 'Combobox.Trigger'\n\n/* ─── Clear ─── */\n\nexport type ComboboxClearProps = ComboboxPrimitive.Clear.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function ComboboxClear({\n className,\n children,\n ...props\n}: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n className={cn(\n 'shrink-0 cursor-pointer text-subtle hover:text-normal',\n className\n )}\n {...props}\n >\n {children ?? <XIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.Clear>\n )\n}\n\nComboboxClear.displayName = 'Combobox.Clear'\n\n/* ─── Portal ─── */\n\nexport type ComboboxPortalProps = ComboboxPrimitive.Portal.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPortal(props: ComboboxPortalProps) {\n return <ComboboxPrimitive.Portal {...props} />\n}\n\nComboboxPortal.displayName = 'Combobox.Portal'\n\n/* ─── Positioner ─── */\n\nexport type ComboboxPositionerProps = ComboboxPrimitive.Positioner.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPositioner({\n className,\n ...props\n}: ComboboxPositionerProps) {\n return (\n <ComboboxPrimitive.Positioner\n className={cn('z-50', className)}\n sideOffset={4}\n {...props}\n />\n )\n}\n\nComboboxPositioner.displayName = 'Combobox.Positioner'\n\n/* ─── Popup ─── */\n\nexport type ComboboxPopupProps = ComboboxPrimitive.Popup.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxPopup({ className, ...props }: ComboboxPopupProps) {\n return (\n <ComboboxPrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxPopup.displayName = 'Combobox.Popup'\n\n/* ─── List ─── */\n\nexport type ComboboxListProps = ComboboxPrimitive.List.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxList({ className, ...props }: ComboboxListProps) {\n return <ComboboxPrimitive.List className={className} {...props} />\n}\n\nComboboxList.displayName = 'Combobox.List'\n\n/* ─── Item ─── */\n\nexport type ComboboxItemProps = ComboboxPrimitive.Item.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxItem({ className, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxItem.displayName = 'Combobox.Item'\n\n/* ─── Collection ─── */\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props\n\nexport function ComboboxCollection(props: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection {...props} />\n}\n\nComboboxCollection.displayName = 'Combobox.Collection'\n\n/* ─── ItemIndicator ─── */\n\nexport type ComboboxItemIndicatorProps = ComboboxPrimitive.ItemIndicator.Props &\n RefAttributes<HTMLSpanElement>\n\nexport function ComboboxItemIndicator({\n className,\n children,\n ...props\n}: ComboboxItemIndicatorProps) {\n return (\n <ComboboxPrimitive.ItemIndicator\n className={cn('shrink-0 text-subtle', className)}\n {...props}\n >\n {children ?? <CheckIcon weight='bold' className='size-4' />}\n </ComboboxPrimitive.ItemIndicator>\n )\n}\n\nComboboxItemIndicator.displayName = 'Combobox.ItemIndicator'\n\n/* ─── Group ─── */\n\nexport type ComboboxGroupProps = ComboboxPrimitive.Group.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return (\n <ComboboxPrimitive.Group\n className={cn('[&+&]:mt-1', className)}\n {...props}\n />\n )\n}\n\nComboboxGroup.displayName = 'Combobox.Group'\n\n/* ─── GroupLabel ─── */\n\nexport type ComboboxGroupLabelProps = ComboboxPrimitive.GroupLabel.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxGroupLabel({\n className,\n ...props\n}: ComboboxGroupLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxGroupLabel.displayName = 'Combobox.GroupLabel'\n\n/* ─── Empty ─── */\n\nexport type ComboboxEmptyProps = ComboboxPrimitive.Empty.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n className={cn(\n 'text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4',\n className\n )}\n {...props}\n />\n )\n}\n\nComboboxEmpty.displayName = 'Combobox.Empty'\n\n/* ─── Status ─── */\n\nexport type ComboboxStatusProps = ComboboxPrimitive.Status.Props &\n RefAttributes<HTMLDivElement>\n\nexport function ComboboxStatus({ className, ...props }: ComboboxStatusProps) {\n return (\n <ComboboxPrimitive.Status className={cn('sr-only', className)} {...props} />\n )\n}\n\nComboboxStatus.displayName = 'Combobox.Status'\n\n/* ─── Compound export ─── */\n\nexport const Combobox = Object.assign(ComboboxRoot, {\n Label: ComboboxLabel,\n InputGroup: ComboboxInputGroup,\n Input: ComboboxInput,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Portal: ComboboxPortal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n Collection: ComboboxCollection,\n ItemIndicator: ComboboxItemIndicator,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Empty: ComboboxEmpty,\n Status: ComboboxStatus\n})\n\nexport type ComboboxProps = ComboboxRootProps\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {a as a$2}from'./chunk-N2HGY7W7.js';import {a as a$1}from'./chunk-4LGCF3SN.js';import {Autocomplete}from'@base-ui/react/autocomplete';import {XIcon,CaretDownIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var z=Autocomplete.useFilter,O=Autocomplete.useFilteredItems,w=cva("inline-flex w-full items-center rounded-lg font-sans",{variants:{intent:a$1,emphasis:{normal:"emphasis-sunken border border-subtle is-interactive-field-group",subtle:"bg-subtle text-normal border border-transparent is-interactive-field-group"},size:{sm:"h-8 px-1.5 text-base",md:"h-10 px-2 text-base",lg:"h-12 px-2 text-base"}},defaultVariants:{emphasis:"normal",size:"md"}});function n(t){return jsx(Autocomplete.Root,{...t})}n.displayName="Autocomplete";function a(t){return jsx(Autocomplete.Value,{...t})}a.displayName="Autocomplete.Value";function c({className:t,intent:e,emphasis:p,size:l,...G}){let s=a$2(),T=!!s.fieldId;return jsx(Autocomplete.InputGroup,{className:cn(w({intent:e,emphasis:p,size:l,className:t})),"aria-invalid":T&&s.invalid||void 0,...G})}c.displayName="Autocomplete.InputGroup";function A({className:t,...e}){let p=a$2(),l=!!p.fieldId;return jsx(Autocomplete.Input,{className:cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle",t),...l&&{id:p.fieldId,"aria-invalid":p.invalid||void 0,"aria-required":p.required||void 0,"aria-describedby":p.invalid?p.errorTextId||void 0:p.helperTextId||void 0},...e})}A.displayName="Autocomplete.Input";function P({className:t,children:e,...p}){return jsx(Autocomplete.Trigger,{className:cn("duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180",t),...p,children:e??jsx(CaretDownIcon,{weight:"bold",className:"size-4"})})}P.displayName="Autocomplete.Trigger";function d({className:t,children:e,...p}){return jsx(Autocomplete.Clear,{className:cn("shrink-0 cursor-pointer text-subtle hover:text-normal",t),...p,children:e??jsx(XIcon,{weight:"bold",className:"size-4"})})}d.displayName="Autocomplete.Clear";function x(t){return jsx(Autocomplete.Portal,{...t})}x.displayName="Autocomplete.Portal";function f({className:t,...e}){return jsx(Autocomplete.Positioner,{className:cn("z-50",t),sideOffset:4,...e})}f.displayName="Autocomplete.Positioner";function y({className:t,...e}){return jsx(Autocomplete.Popup,{className:cn("max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg","origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",t),...e})}y.displayName="Autocomplete.Popup";function b({className:t,...e}){return jsx(Autocomplete.List,{className:t,...e})}b.displayName="Autocomplete.List";function v({className:t,...e}){return jsx(Autocomplete.Item,{className:cn("flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none","data-[highlighted]:bg-subtle",t),...e})}v.displayName="Autocomplete.Item";function g(t){return jsx(Autocomplete.Collection,{...t})}g.displayName="Autocomplete.Collection";function I({className:t,...e}){return jsx(Autocomplete.Group,{className:cn("[&+&]:mt-1",t),...e})}I.displayName="Autocomplete.Group";function N({className:t,...e}){return jsx(Autocomplete.GroupLabel,{className:cn("px-2 py-1.5 text-xs font-medium text-subtle select-none",t),...e})}N.displayName="Autocomplete.GroupLabel";function L({className:t,...e}){return jsx(Autocomplete.Empty,{className:cn("text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4",t),...e})}L.displayName="Autocomplete.Empty";function h({className:t,...e}){return jsx(Autocomplete.Status,{className:cn("sr-only",t),...e})}h.displayName="Autocomplete.Status";var k=Object.assign(n,{Value:a,InputGroup:c,Input:A,Trigger:P,Clear:d,Portal:x,Positioner:f,Popup:y,List:b,Item:v,Collection:g,Group:I,GroupLabel:N,Empty:L,Status:h});export{z as a,O as b,w as c,n as d,a as e,c as f,A as g,P as h,d as i,x as j,f as k,y as l,b as m,v as n,g as o,I as p,N as q,L as r,h as s,k as t};//# sourceMappingURL=chunk-SCS7WZ6Z.js.map
|
|
3
|
-
//# sourceMappingURL=chunk-SCS7WZ6Z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Autocomplete/index.tsx"],"names":["useFilter","AutocompletePrimitive","useFilteredItems","autocompleteInputGroupVariants","cva","intentVariants","AutocompleteRoot","props","jsx","AutocompleteValue","AutocompleteInputGroup","className","intent","emphasis","size","fieldContext","useFieldContext","inField","cn","AutocompleteInput","AutocompleteTrigger","children","CaretDownIcon","AutocompleteClear","XIcon","AutocompletePortal","AutocompletePositioner","AutocompletePopup","AutocompleteList","AutocompleteItem","AutocompleteCollection","AutocompleteGroup","AutocompleteGroupLabel","AutocompleteEmpty","AutocompleteStatus","Autocomplete"],"mappings":"8TAiBO,IAAMA,EAAYC,YAAAA,CAAsB,SAAA,CAClCC,CAAAA,CAAmBD,YAAAA,CAAsB,gBAAA,CAQzCE,CAAAA,CAAiCC,GAAAA,CAC5C,sDAAA,CACA,CACE,QAAA,CAAU,CACR,MAAA,CAAQC,GAAAA,CACR,QAAA,CAAU,CACR,MAAA,CACE,iEAAA,CACF,MAAA,CACE,4EACJ,CAAA,CACA,IAAA,CAAM,CACJ,EAAA,CAAI,sBAAA,CACJ,EAAA,CAAI,sBACJ,EAAA,CAAI,qBACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,QAAA,CACV,KAAM,IACR,CACF,CACF,EAMO,SAASC,CAAAA,CAAiBC,CAAAA,CAA8B,CAC7D,OAAOC,GAAAA,CAACP,YAAAA,CAAsB,IAAA,CAAtB,CAA4B,GAAGM,CAAAA,CAAO,CAChD,CAEAD,CAAAA,CAAiB,WAAA,CAAc,cAAA,CAMxB,SAASG,CAAAA,CAAkBF,CAAAA,CAA+B,CAC/D,OAAOC,IAACP,YAAAA,CAAsB,KAAA,CAAtB,CAA6B,GAAGM,CAAAA,CAAO,CACjD,CAEAE,CAAAA,CAAkB,YAAc,oBAAA,CASzB,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,CAAAA,CAAU,CAAC,CAACF,CAAAA,CAAa,OAAA,CAE/B,OACEP,IAACP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A,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-SCS7WZ6Z.js","sourcesContent":["'use client'\n\nimport type { RefAttributes } from 'react'\n\nimport {\n type AutocompleteFilter,\n type AutocompleteFilterOptions,\n Autocomplete as AutocompletePrimitive\n} from '@base-ui/react/autocomplete'\nimport { CaretDownIcon, XIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { intentVariants } from '../../variants'\nimport { useFieldContext } from '../Field'\n\nexport const useFilter = AutocompletePrimitive.useFilter\nexport const useFilteredItems = AutocompletePrimitive.useFilteredItems\nexport type {\n AutocompleteFilter as Filter,\n AutocompleteFilterOptions as FilterOptions\n}\n\n/* ─── Input group variants (matches Combobox/Select) ─── */\n\nexport const autocompleteInputGroupVariants = cva(\n 'inline-flex w-full items-center rounded-lg font-sans',\n {\n variants: {\n intent: intentVariants,\n emphasis: {\n normal:\n 'emphasis-sunken border border-subtle is-interactive-field-group',\n subtle:\n 'bg-subtle text-normal border border-transparent is-interactive-field-group'\n },\n size: {\n sm: 'h-8 px-1.5 text-base',\n md: 'h-10 px-2 text-base',\n lg: 'h-12 px-2 text-base'\n }\n },\n defaultVariants: {\n emphasis: 'normal',\n size: 'md'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type AutocompleteRootProps = AutocompletePrimitive.Root.Props<unknown>\n\nexport function AutocompleteRoot(props: AutocompleteRootProps) {\n return <AutocompletePrimitive.Root {...props} />\n}\n\nAutocompleteRoot.displayName = 'Autocomplete'\n\n/* ─── Value ─── */\n\nexport type AutocompleteValueProps = AutocompletePrimitive.Value.Props\n\nexport function AutocompleteValue(props: AutocompleteValueProps) {\n return <AutocompletePrimitive.Value {...props} />\n}\n\nAutocompleteValue.displayName = 'Autocomplete.Value'\n\n/* ─── InputGroup ─── */\n\nexport type AutocompleteInputGroupProps =\n AutocompletePrimitive.InputGroup.Props &\n RefAttributes<HTMLDivElement> &\n VariantProps<typeof autocompleteInputGroupVariants>\n\nexport function AutocompleteInputGroup({\n className,\n intent,\n emphasis,\n size,\n ...props\n}: AutocompleteInputGroupProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <AutocompletePrimitive.InputGroup\n className={cn(\n autocompleteInputGroupVariants({ intent, emphasis, size, className })\n )}\n aria-invalid={(inField && fieldContext.invalid) || undefined}\n {...props}\n />\n )\n}\n\nAutocompleteInputGroup.displayName = 'Autocomplete.InputGroup'\n\n/* ─── Input ─── */\n\nexport type AutocompleteInputProps = AutocompletePrimitive.Input.Props &\n RefAttributes<HTMLInputElement>\n\nexport function AutocompleteInput({\n className,\n ...props\n}: AutocompleteInputProps) {\n const fieldContext = useFieldContext()\n const inField = !!fieldContext.fieldId\n\n return (\n <AutocompletePrimitive.Input\n className={cn(\n 'min-w-0 flex-1 bg-transparent outline-none placeholder:text-subtle',\n className\n )}\n {...(inField && {\n id: fieldContext.fieldId,\n 'aria-invalid': fieldContext.invalid || undefined,\n 'aria-required': fieldContext.required || undefined,\n 'aria-describedby': fieldContext.invalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n )\n}\n\nAutocompleteInput.displayName = 'Autocomplete.Input'\n\n/* ─── Trigger ─── */\n\nexport type AutocompleteTriggerProps = AutocompletePrimitive.Trigger.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function AutocompleteTrigger({\n className,\n children,\n ...props\n}: AutocompleteTriggerProps) {\n return (\n <AutocompletePrimitive.Trigger\n className={cn(\n 'duration-moderate shrink-0 text-subtle transition-transform data-[popup-open]:rotate-180',\n className\n )}\n {...props}\n >\n {children ?? <CaretDownIcon weight='bold' className='size-4' />}\n </AutocompletePrimitive.Trigger>\n )\n}\n\nAutocompleteTrigger.displayName = 'Autocomplete.Trigger'\n\n/* ─── Clear ─── */\n\nexport type AutocompleteClearProps = AutocompletePrimitive.Clear.Props &\n RefAttributes<HTMLButtonElement>\n\nexport function AutocompleteClear({\n className,\n children,\n ...props\n}: AutocompleteClearProps) {\n return (\n <AutocompletePrimitive.Clear\n className={cn(\n 'shrink-0 cursor-pointer text-subtle hover:text-normal',\n className\n )}\n {...props}\n >\n {children ?? <XIcon weight='bold' className='size-4' />}\n </AutocompletePrimitive.Clear>\n )\n}\n\nAutocompleteClear.displayName = 'Autocomplete.Clear'\n\n/* ─── Portal ─── */\n\nexport type AutocompletePortalProps = AutocompletePrimitive.Portal.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompletePortal(props: AutocompletePortalProps) {\n return <AutocompletePrimitive.Portal {...props} />\n}\n\nAutocompletePortal.displayName = 'Autocomplete.Portal'\n\n/* ─── Positioner ─── */\n\nexport type AutocompletePositionerProps =\n AutocompletePrimitive.Positioner.Props & RefAttributes<HTMLDivElement>\n\nexport function AutocompletePositioner({\n className,\n ...props\n}: AutocompletePositionerProps) {\n return (\n <AutocompletePrimitive.Positioner\n className={cn('z-50', className)}\n sideOffset={4}\n {...props}\n />\n )\n}\n\nAutocompletePositioner.displayName = 'Autocomplete.Positioner'\n\n/* ─── Popup ─── */\n\nexport type AutocompletePopupProps = AutocompletePrimitive.Popup.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompletePopup({\n className,\n ...props\n}: AutocompletePopupProps) {\n return (\n <AutocompletePrimitive.Popup\n className={cn(\n 'max-h-[var(--available-height)] max-w-[var(--available-width)] min-w-[var(--anchor-width)] overflow-y-auto rounded-xl border border-[var(--intent-border-subtle)] bg-raised p-1 shadow-lg',\n 'origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompletePopup.displayName = 'Autocomplete.Popup'\n\n/* ─── List ─── */\n\nexport type AutocompleteListProps = AutocompletePrimitive.List.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteList({\n className,\n ...props\n}: AutocompleteListProps) {\n return <AutocompletePrimitive.List className={className} {...props} />\n}\n\nAutocompleteList.displayName = 'Autocomplete.List'\n\n/* ─── Item ─── */\n\nexport type AutocompleteItemProps = AutocompletePrimitive.Item.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteItem({\n className,\n ...props\n}: AutocompleteItemProps) {\n return (\n <AutocompletePrimitive.Item\n className={cn(\n 'flex w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg px-2 py-1.5 text-sm text-normal outline-none select-none',\n 'data-[highlighted]:bg-subtle',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteItem.displayName = 'Autocomplete.Item'\n\n/* ─── Collection ─── */\n\nexport type AutocompleteCollectionProps = AutocompletePrimitive.Collection.Props\n\nexport function AutocompleteCollection(props: AutocompleteCollectionProps) {\n return <AutocompletePrimitive.Collection {...props} />\n}\n\nAutocompleteCollection.displayName = 'Autocomplete.Collection'\n\n/* ─── Group ─── */\n\nexport type AutocompleteGroupProps = AutocompletePrimitive.Group.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteGroup({\n className,\n ...props\n}: AutocompleteGroupProps) {\n return (\n <AutocompletePrimitive.Group\n className={cn('[&+&]:mt-1', className)}\n {...props}\n />\n )\n}\n\nAutocompleteGroup.displayName = 'Autocomplete.Group'\n\n/* ─── GroupLabel ─── */\n\nexport type AutocompleteGroupLabelProps =\n AutocompletePrimitive.GroupLabel.Props & RefAttributes<HTMLDivElement>\n\nexport function AutocompleteGroupLabel({\n className,\n ...props\n}: AutocompleteGroupLabelProps) {\n return (\n <AutocompletePrimitive.GroupLabel\n className={cn(\n 'px-2 py-1.5 text-xs font-medium text-subtle select-none',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteGroupLabel.displayName = 'Autocomplete.GroupLabel'\n\n/* ─── Empty ─── */\n\nexport type AutocompleteEmptyProps = AutocompletePrimitive.Empty.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteEmpty({\n className,\n ...props\n}: AutocompleteEmptyProps) {\n return (\n <AutocompletePrimitive.Empty\n className={cn(\n 'text-center text-sm text-subtle empty:hidden [&:not(:empty)]:px-3 [&:not(:empty)]:py-4',\n className\n )}\n {...props}\n />\n )\n}\n\nAutocompleteEmpty.displayName = 'Autocomplete.Empty'\n\n/* ─── Status ─── */\n\nexport type AutocompleteStatusProps = AutocompletePrimitive.Status.Props &\n RefAttributes<HTMLDivElement>\n\nexport function AutocompleteStatus({\n className,\n ...props\n}: AutocompleteStatusProps) {\n return (\n <AutocompletePrimitive.Status\n className={cn('sr-only', className)}\n {...props}\n />\n )\n}\n\nAutocompleteStatus.displayName = 'Autocomplete.Status'\n\n/* ─── Compound export ─── */\n\nexport const Autocomplete = Object.assign(AutocompleteRoot, {\n Value: AutocompleteValue,\n InputGroup: AutocompleteInputGroup,\n Input: AutocompleteInput,\n Trigger: AutocompleteTrigger,\n Clear: AutocompleteClear,\n Portal: AutocompletePortal,\n Positioner: AutocompletePositioner,\n Popup: AutocompletePopup,\n List: AutocompleteList,\n Item: AutocompleteItem,\n Collection: AutocompleteCollection,\n Group: AutocompleteGroup,\n GroupLabel: AutocompleteGroupLabel,\n Empty: AutocompleteEmpty,\n Status: AutocompleteStatus\n})\n\nexport type AutocompleteProps = AutocompleteRootProps\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {useRef,useEffect,useCallback}from'react';import {Steps}from'@ark-ui/react/steps';export{useSteps as a}from'@ark-ui/react/steps';import {CheckIcon}from'@phosphor-icons/react';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs}from'react/jsx-runtime';var R=cva("grid w-full gap-4",{variants:{direction:{horizontal:"",vertical:"grid-cols-[auto_1fr] gap-3"}},defaultVariants:{direction:"horizontal"}});function d({direction:t,className:e,...o}){return jsx(Steps.Root,{orientation:t==="vertical"?"vertical":"horizontal",className:cn(R({direction:t,className:e})),...o})}d.displayName="Steps";function m({className:t,...e}){return jsx(Steps.List,{className:cn("flex items-start justify-start rounded-xl bg-subtler px-4 py-3","data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2",t),...e})}m.displayName="Steps.List";function g({className:t,invalid:e,...o}){let N=Steps.Item,p=useRef(null),l=useRef(e);useEffect(()=>{if(e&&!l.current){let n=p.current?.querySelector('[data-part="trigger"]');n&&(n.classList.remove("animate-shake"),n.offsetWidth,n.classList.add("animate-shake"));}l.current=e;},[e]);let C=useCallback(n=>{let i=n.currentTarget.querySelector('[data-part="trigger"]');!i||!(i.getAttribute("tabindex")==="-1"&&i.hasAttribute("data-incomplete"))||(i.classList.remove("animate-shake"),i.offsetWidth,i.classList.add("animate-shake"));},[]);return jsx(N,{ref:p,className:cn("group/step-item flex flex-1 items-center last:flex-none","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",t),"data-invalid":e||void 0,onClick:C,...o})}g.displayName="Steps.Item";function u({className:t,...e}){return jsx(Steps.Trigger,{className:cn("group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out","data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2","data-current:intent-accent",t),...e})}u.displayName="Steps.Trigger";function S({className:t,children:e,...o}){return jsxs(Steps.Indicator,{className:cn("flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out","border-subtle bg-raised text-subtler","group-hover/step:outline-[length:var(--focus-ring-width)]","data-current:border-normal data-current:bg-subtle data-current:text-subtle","data-complete:emphasis-strong","group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...o,children:[jsx("span",{className:"group-data-complete/step:hidden group-data-invalid/step-item:!block",children:e}),jsx(CheckIcon,{weight:"bold",className:"hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden"})]})}S.displayName="Steps.Indicator";function f({className:t,...e}){return jsx(Steps.Separator,{className:cn("h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5","data-complete:bg-strong","data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5",t),...e})}f.displayName="Steps.Separator";function P({className:t,...e}){let o=Steps.Content;return jsx(o,{className:cn(t),...e})}P.displayName="Steps.Content";function v({className:t,...e}){return jsx(Steps.CompletedContent,{className:cn(t),...e})}v.displayName="Steps.CompletedContent";function x({className:t,...e}){return jsx(Steps.NextTrigger,{className:cn(t),...e})}x.displayName="Steps.NextTrigger";function b({className:t,...e}){return jsx(Steps.PrevTrigger,{className:cn(t),...e})}b.displayName="Steps.PrevTrigger";function T({className:t,...e}){return jsx(Steps.Progress,{className:cn("relative h-1 w-full overflow-hidden rounded-sm bg-subtle","after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out",t),...e})}T.displayName="Steps.Progress";function y({className:t,...e}){return jsx("span",{className:cn("hidden text-sm font-bold md:block","group-data-incomplete/step:text-subtle","group-data-current/step:text-subtle","group-data-complete/step:text-normal","group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger",t),...e})}y.displayName="Steps.TriggerText";var U=Object.assign(d,{List:m,Item:g,Trigger:u,TriggerText:y,Indicator:S,Separator:f,Content:P,CompletedContent:v,NextTrigger:x,PrevTrigger:b,Progress:T,Context:Steps.Context,ItemContext:Steps.ItemContext,RootProvider:Steps.RootProvider});export{R as b,U as c};//# sourceMappingURL=chunk-XERFFH3S.js.map
|
|
3
|
-
//# sourceMappingURL=chunk-XERFFH3S.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Steps/index.tsx"],"names":["stepsVariants","cva","StepsRoot","direction","className","props","jsx","ArkSteps","cn","StepsList","StepsItem","invalid","Item","itemRef","useRef","prevInvalid","useEffect","trigger","handleClick","useCallback","e","StepsTrigger","StepsIndicator","children","jsxs","CheckIcon","StepsSeparator","StepsContent","Content","StepsCompletedContent","StepsNextTrigger","StepsPrevTrigger","StepsProgress","StepsTriggerText","Steps"],"mappings":"oTAqBO,IAAMA,CAAAA,CAAgBC,GAAAA,CAAI,mBAAA,CAAqB,CACpD,QAAA,CAAU,CACR,SAAA,CAAW,CACT,UAAA,CAAY,EAAA,CACZ,QAAA,CAAU,4BACZ,CACF,CAAA,CACA,eAAA,CAAiB,CACf,SAAA,CAAW,YACb,CACF,CAAC,EAOD,SAASC,CAAAA,CAAU,CAAE,SAAA,CAAAC,CAAAA,CAAW,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAe,CACjE,OACEC,GAAAA,CAACC,KAAAA,CAAS,IAAA,CAAT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AASzB,KAAAA,CAAS,OAAA,CAClB,WAAA,CAAaA,KAAAA,CAAS,WAAA,CACtB,YAAA,CAAcA,KAAAA,CAAS,YACzB,CAAC","file":"chunk-XERFFH3S.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, useCallback, useEffect, useRef } from 'react'\n\nimport {\n Steps as ArkSteps,\n type UseStepsProps,\n type UseStepsReturn,\n useSteps\n} from '@ark-ui/react/steps'\nimport { CheckIcon } from '@phosphor-icons/react'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\n/* ─── Re-exports ─── */\n\nexport { useSteps, type UseStepsProps, type UseStepsReturn }\n\n/* ─── Root variants ─── */\n\nexport const stepsVariants = cva('grid w-full gap-4', {\n variants: {\n direction: {\n horizontal: '',\n vertical: 'grid-cols-[auto_1fr] gap-3'\n }\n },\n defaultVariants: {\n direction: 'horizontal'\n }\n})\n\n/* ─── Root ─── */\n\nexport type StepsProps = Omit<ArkSteps.RootProps, 'orientation'> &\n VariantProps<typeof stepsVariants>\n\nfunction StepsRoot({ direction, className, ...props }: StepsProps) {\n return (\n <ArkSteps.Root\n orientation={direction === 'vertical' ? 'vertical' : 'horizontal'}\n className={cn(stepsVariants({ direction, className }))}\n {...props}\n />\n )\n}\n\nStepsRoot.displayName = 'Steps'\n\n/* ─── List ─── */\n\ntype StepsListProps = ArkSteps.ListProps\n\nfunction StepsList({ className, ...props }: StepsListProps) {\n return (\n <ArkSteps.List\n className={cn(\n 'flex items-start justify-start rounded-xl bg-subtler px-4 py-3',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:gap-2',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsList.displayName = 'Steps.List'\n\n/* ─── Item ─── */\n\nexport interface StepsItemProps {\n index: number\n invalid?: boolean\n className?: string\n children?: React.ReactNode\n}\n\ninterface StepsItemInternalProps extends StepsItemProps {\n ref?: React.Ref<HTMLDivElement>\n onClick?: React.MouseEventHandler<HTMLDivElement>\n}\n\nfunction StepsItem({ className, invalid, ...props }: StepsItemProps) {\n // Ark UI's types lose `index` in the HTMLProps intersection (upstream bug).\n // Cast is safe — index is required by the Zag.js state machine at runtime.\n const Item = ArkSteps.Item as React.ComponentType<\n Omit<StepsItemInternalProps, 'invalid'>\n >\n\n const itemRef = useRef<HTMLDivElement>(null)\n const prevInvalid = useRef(invalid)\n\n useEffect(() => {\n if (invalid && !prevInvalid.current) {\n const trigger = itemRef.current?.querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (trigger) {\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }\n }\n prevInvalid.current = invalid\n }, [invalid])\n\n const handleClick = useCallback((e: React.MouseEvent<HTMLDivElement>) => {\n const trigger = (e.currentTarget as HTMLElement).querySelector(\n '[data-part=\"trigger\"]'\n ) as HTMLElement | null\n if (!trigger) return\n // In linear mode, Ark sets tabindex=\"-1\" on non-current triggers\n // and the onClick returns early — the step doesn't change.\n // We detect this by checking tabindex and data-incomplete.\n const isLocked =\n trigger.getAttribute('tabindex') === '-1' &&\n trigger.hasAttribute('data-incomplete')\n if (!isLocked) return\n trigger.classList.remove('animate-shake')\n void trigger.offsetWidth\n trigger.classList.add('animate-shake')\n }, [])\n\n return (\n <Item\n ref={itemRef}\n className={cn(\n 'group/step-item flex flex-1 items-center last:flex-none',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n className\n )}\n data-invalid={invalid || undefined}\n onClick={handleClick}\n {...props}\n />\n )\n}\n\nStepsItem.displayName = 'Steps.Item'\n\n/* ─── Trigger ─── */\n\ntype StepsTriggerProps = ArkSteps.TriggerProps\n\nfunction StepsTrigger({ className, ...props }: StepsTriggerProps) {\n return (\n <ArkSteps.Trigger\n className={cn(\n 'group/step flex cursor-pointer flex-col items-center gap-1 rounded-md border-none bg-transparent px-3 py-3 transition-all duration-200 ease-out',\n 'data-[orientation=vertical]:flex-row data-[orientation=vertical]:items-center data-[orientation=vertical]:gap-2',\n 'data-current:intent-accent',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTrigger.displayName = 'Steps.Trigger'\n\n/* ─── Indicator ─── */\n\ntype StepsIndicatorProps = ArkSteps.IndicatorProps\n\nfunction StepsIndicator({\n className,\n children,\n ...props\n}: StepsIndicatorProps) {\n return (\n <ArkSteps.Indicator\n className={cn(\n 'flex size-10 shrink-0 items-center justify-center rounded-full border text-lg font-black outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-all duration-200 ease-out',\n 'border-subtle bg-raised text-subtler',\n 'group-hover/step:outline-[length:var(--focus-ring-width)]',\n 'data-current:border-normal data-current:bg-subtle data-current:text-subtle',\n 'data-complete:emphasis-strong',\n 'group-data-invalid/step-item:emphasis-normal group-data-invalid/step-item:border-normal group-data-invalid/step-item:bg-subtle group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n >\n <span className='group-data-complete/step:hidden group-data-invalid/step-item:!block'>\n {children}\n </span>\n <CheckIcon\n weight='bold'\n className='hidden size-5 group-data-complete/step:block group-data-invalid/step-item:!hidden'\n />\n </ArkSteps.Indicator>\n )\n}\n\nStepsIndicator.displayName = 'Steps.Indicator'\n\n/* ─── Separator ─── */\n\ntype StepsSeparatorProps = ArkSteps.SeparatorProps\n\nfunction StepsSeparator({ className, ...props }: StepsSeparatorProps) {\n return (\n <ArkSteps.Separator\n className={cn(\n 'h-0.5 flex-1 bg-subtle transition-all duration-200 ease-out md:bottom-0 md:translate-y-5.5',\n 'data-complete:bg-strong',\n 'data-[orientation=vertical]:ml-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-0.5',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsSeparator.displayName = 'Steps.Separator'\n\n/* ─── Content ─── */\n\ninterface StepsContentProps {\n index: number\n className?: string\n children?: React.ReactNode\n}\n\nfunction StepsContent({ className, ...props }: StepsContentProps) {\n const Content = ArkSteps.Content as React.ComponentType<StepsContentProps>\n return <Content className={cn(className)} {...props} />\n}\n\nStepsContent.displayName = 'Steps.Content'\n\n/* ─── CompletedContent ─── */\n\ntype StepsCompletedContentProps = ArkSteps.CompletedContentProps\n\nfunction StepsCompletedContent({\n className,\n ...props\n}: StepsCompletedContentProps) {\n return <ArkSteps.CompletedContent className={cn(className)} {...props} />\n}\n\nStepsCompletedContent.displayName = 'Steps.CompletedContent'\n\n/* ─── NextTrigger ─── */\n\ntype StepsNextTriggerProps = ArkSteps.NextTriggerProps\n\nfunction StepsNextTrigger({ className, ...props }: StepsNextTriggerProps) {\n return <ArkSteps.NextTrigger className={cn(className)} {...props} />\n}\n\nStepsNextTrigger.displayName = 'Steps.NextTrigger'\n\n/* ─── PrevTrigger ─── */\n\ntype StepsPrevTriggerProps = ArkSteps.PrevTriggerProps\n\nfunction StepsPrevTrigger({ className, ...props }: StepsPrevTriggerProps) {\n return <ArkSteps.PrevTrigger className={cn(className)} {...props} />\n}\n\nStepsPrevTrigger.displayName = 'Steps.PrevTrigger'\n\n/* ─── Progress ─── */\n\ntype StepsProgressProps = ArkSteps.ProgressProps\n\nfunction StepsProgress({ className, ...props }: StepsProgressProps) {\n return (\n <ArkSteps.Progress\n className={cn(\n 'relative h-1 w-full overflow-hidden rounded-sm bg-subtle',\n 'after:absolute after:inset-y-0 after:left-0 after:w-[calc(var(--percent)*1%)] after:bg-strong after:transition-[width] after:duration-300 after:ease-out',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsProgress.displayName = 'Steps.Progress'\n\n/* ─── TriggerText ─── */\n\ntype StepsTriggerTextProps = ComponentProps<'span'>\n\nfunction StepsTriggerText({ className, ...props }: StepsTriggerTextProps) {\n return (\n <span\n className={cn(\n 'hidden text-sm font-bold md:block',\n 'group-data-incomplete/step:text-subtle',\n 'group-data-current/step:text-subtle',\n 'group-data-complete/step:text-normal',\n 'group-data-invalid/step-item:text-subtle group-data-invalid/step-item:intent-danger',\n className\n )}\n {...props}\n />\n )\n}\n\nStepsTriggerText.displayName = 'Steps.TriggerText'\n\n/* ─── Compound export ─── */\n\nexport const Steps = Object.assign(StepsRoot, {\n List: StepsList,\n Item: StepsItem,\n Trigger: StepsTrigger,\n TriggerText: StepsTriggerText,\n Indicator: StepsIndicator,\n Separator: StepsSeparator,\n Content: StepsContent,\n CompletedContent: StepsCompletedContent,\n NextTrigger: StepsNextTrigger,\n PrevTrigger: StepsPrevTrigger,\n Progress: StepsProgress,\n Context: ArkSteps.Context,\n ItemContext: ArkSteps.ItemContext,\n RootProvider: ArkSteps.RootProvider\n})\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {a}from'./chunk-N2HGY7W7.js';import {a as a$1,b}from'./chunk-LMV3JECI.js';import {createContext,use}from'react';import {Radio}from'@base-ui/react/radio';import {RadioGroup}from'@base-ui/react/radio-group';import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var c=createContext({emphasis:"subtler",direction:"vertical"}),w=cva("flex flex-wrap",{variants:{direction:{vertical:"flex-col gap-2",horizontal:"flex-row gap-4"}},defaultVariants:{direction:"vertical"}}),k=cva("flex cursor-pointer select-none items-center",{variants:{emphasis:{subtler:"gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive",normal:"justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0"}},defaultVariants:{emphasis:"subtler"}});function G({className:r,direction:e="vertical",emphasis:t="subtler",invalid:n,required:p,...s}){let a$1=a(),d=n??a$1.invalid,N=p??a$1.required,I=!!a$1.fieldId;return jsx(c,{value:{emphasis:t,direction:e??"vertical",invalid:d,required:N},children:jsx(RadioGroup,{className:cn(w({direction:e,className:r})),...I&&{"aria-labelledby":a$1.labelId||void 0,"aria-describedby":d?a$1.errorTextId||void 0:a$1.helperTextId||void 0},...s})})}G.displayName="RadioGroup";function h({className:r,label:e,description:t,children:n,...p}){let{emphasis:s,direction:a}=use(c),d=jsx(Radio.Root,{className:cn("duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]",s!=="normal"&&"focus-visible:outline-[length:var(--focus-ring-width)]"),...p,children:jsx(Radio.Indicator,{className:"size-2.5 rounded-full bg-[var(--color-accent-9)]"})});return jsx("label",{className:cn(k({emphasis:s,className:r}),a==="horizontal"&&s==="normal"&&"flex-1"),children:s==="normal"?jsxs(Fragment,{children:[jsxs("div",{className:"grid gap-0.5",children:[jsxs("span",{className:"flex items-center gap-2",children:[n,e&&jsx("span",{className:"text-base font-medium text-normal",children:e})]}),t&&jsx("span",{className:"text-sm text-subtle",children:t})]}),d]}):jsxs(Fragment,{children:[d,n,e&&jsx("span",{className:"text-sm text-normal",children:e})]})})}h.displayName="RadioGroup.Item";function g({className:r,showIndicator:e,children:t,...n}){let{required:p}=use(c);return jsxs("label",{className:cn("flex w-full items-center gap-1 text-sm font-medium text-normal",r),...n,children:[t,e&&(p?jsxs(Fragment,{children:[" ",jsx(a$1,{})]}):jsxs(Fragment,{children:[" ",jsx(b,{})]}))]})}g.displayName="RadioGroup.Label";function P({className:r,...e}){return jsx("p",{className:cn("w-full text-sm text-subtle",r),...e})}P.displayName="RadioGroup.HelperText";function y({className:r,...e}){let{invalid:t}=use(c);return t?jsx("p",{role:"alert",className:cn("w-full text-sm text-subtle intent-danger",r),...e}):null}y.displayName="RadioGroup.ErrorText";var D=Object.assign(G,{Item:h,Label:g,HelperText:P,ErrorText:y});export{w as a,k as b,D as c};//# sourceMappingURL=chunk-XRFHVFJ5.js.map
|
|
3
|
-
//# sourceMappingURL=chunk-XRFHVFJ5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/RadioGroup/index.tsx"],"names":["RadioGroupContext","createContext","radioGroupVariants","cva","radioGroupItemVariants","RadioGroupRoot","className","direction","emphasis","invalid","required","props","fieldContext","useFieldContext","resolvedInvalid","resolvedRequired","inField","jsx","RadioGroupPrimitive","cn","RadioGroupItem","label","description","children","use","radio","Radio","jsxs","Fragment","RadioGroupLabel","showIndicator","RequiredIndicator","OptionalIndicator","RadioGroupHelperText","RadioGroupErrorText","RadioGroup"],"mappings":"2VA6BA,IAAMA,CAAAA,CAAoBC,cAAsC,CAC9D,QAAA,CAAU,SAAA,CACV,SAAA,CAAW,UACb,CAAC,EAIYC,CAAAA,CAAqBC,GAAAA,CAAI,gBAAA,CAAkB,CACtD,QAAA,CAAU,CACR,UAAW,CACT,QAAA,CAAU,gBAAA,CACV,UAAA,CAAY,gBACd,CACF,EACA,eAAA,CAAiB,CACf,UAAW,UACb,CACF,CAAC,CAAA,CAIYC,CAAAA,CAAyBD,GAAAA,CACpC,8CAAA,CACA,CACE,QAAA,CAAU,CACR,QAAA,CAAU,CACR,OAAA,CAAS,8DAAA,CACT,MAAA,CACE,6YACJ,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAA,CAAU,SACZ,CACF,CACF,EAWA,SAASE,EAAe,CACtB,SAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CAAY,UAAA,CACZ,QAAA,CAAAC,CAAAA,CAAW,SAAA,CACX,QAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAwB,CACtB,IAAMC,GAAAA,CAAeC,CAAAA,EAAgB,CAC/BC,CAAAA,CAAkBL,CAAAA,EAAWG,IAAa,OAAA,CAC1CG,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X,GAAAA,CAACc,GAAAA,CAAA,EAAkB,CAAA,CAAA,CACrB,CAAA,CAEAJ,IAAAA,CAAAC,SAAA,CACG,QAAA,CAAA,CAAA,GAAA,CACDX,GAAAA,CAACe,CAAAA,CAAA,EAAkB,CAAA,CAAA,CACrB,IAEN,CAEJ,CAEAH,EAAgB,WAAA,CAAc,kBAAA,CAM9B,SAASI,CAAAA,CAAqB,CAC5B,SAAA,CAAA3B,CAAAA,CACA,GAAGK,CACL,EAA8B,CAC5B,OACEM,GAAAA,CAAC,GAAA,CAAA,CAAE,SAAA,CAAWE,EAAAA,CAAG,6BAA8Bb,CAAS,CAAA,CAAI,GAAGK,CAAAA,CAAO,CAE1E,CAEAsB,EAAqB,WAAA,CAAc,uBAAA,CAMnC,SAASC,CAAAA,CAAoB,CAC3B,UAAA5B,CAAAA,CACA,GAAGK,CACL,CAAA,CAA6B,CAC3B,GAAM,CAAE,OAAA,CAAAF,CAAQ,CAAA,CAAIe,GAAAA,CAAIxB,CAAiB,CAAA,CACzC,OAAKS,CAAAA,CAEHQ,GAAAA,CAAC,GAAA,CAAA,CACC,IAAA,CAAK,OAAA,CACL,SAAA,CAAWE,GAAG,0CAAA,CAA4Cb,CAAS,CAAA,CAClE,GAAGK,CAAAA,CACN,CAAA,CANmB,IAQvB,CAEAuB,CAAAA,CAAoB,WAAA,CAAc,sBAAA,CAI3B,IAAMC,CAAAA,CAAa,OAAO,MAAA,CAAO9B,CAAAA,CAAgB,CACtD,IAAA,CAAMe,CAAAA,CACN,KAAA,CAAOS,EACP,UAAA,CAAYI,CAAAA,CACZ,SAAA,CAAWC,CACb,CAAC","file":"chunk-XRFHVFJ5.js","sourcesContent":["'use client'\n\nimport { type ComponentProps, createContext, use } from 'react'\n\nimport { Radio } from '@base-ui/react/radio'\nimport { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group'\nimport { type VariantProps, cva } from 'class-variance-authority'\n\nimport { cn } from '@oztix/roadie-core/utils'\n\nimport { useFieldContext } from '../Field'\nimport { OptionalIndicator } from '../Indicator'\nimport { RequiredIndicator } from '../Indicator'\n\n/* ─── Types ─── */\n\ntype RadioGroupEmphasis = 'subtler' | 'normal'\n\n/* ─── Context ─── */\n\ntype RadioGroupDirection = 'vertical' | 'horizontal'\n\ninterface RadioGroupContextValue {\n emphasis: RadioGroupEmphasis\n direction: RadioGroupDirection\n invalid?: boolean\n required?: boolean\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>({\n emphasis: 'subtler',\n direction: 'vertical'\n})\n\n/* ─── Root variants ─── */\n\nexport const radioGroupVariants = cva('flex flex-wrap', {\n variants: {\n direction: {\n vertical: 'flex-col gap-2',\n horizontal: 'flex-row gap-4'\n }\n },\n defaultVariants: {\n direction: 'vertical'\n }\n})\n\n/* ─── Item variants ─── */\n\nexport const radioGroupItemVariants = cva(\n 'flex cursor-pointer select-none items-center',\n {\n variants: {\n emphasis: {\n subtler: 'gap-2 rounded-lg px-1.5 py-1 emphasis-subtler is-interactive',\n normal:\n 'justify-between gap-3 rounded-xl p-4 emphasis-normal is-interactive has-[:checked]:bg-[var(--color-accent-2)] has-[:checked]:border-[var(--color-accent-9)] has-[:focus-visible]:outline has-[:focus-visible]:outline-[length:var(--focus-ring-width)] has-[:focus-visible]:outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] has-[:focus-visible]:outline-offset-0'\n }\n },\n defaultVariants: {\n emphasis: 'subtler'\n }\n }\n)\n\n/* ─── Root ─── */\n\nexport type RadioGroupRootProps = RadioGroupPrimitive.Props &\n VariantProps<typeof radioGroupVariants> & {\n emphasis?: RadioGroupEmphasis\n invalid?: boolean\n required?: boolean\n }\n\nfunction RadioGroupRoot({\n className,\n direction = 'vertical',\n emphasis = 'subtler',\n invalid,\n required,\n ...props\n}: RadioGroupRootProps) {\n const fieldContext = useFieldContext()\n const resolvedInvalid = invalid ?? fieldContext.invalid\n const resolvedRequired = required ?? fieldContext.required\n const inField = !!fieldContext.fieldId\n\n return (\n <RadioGroupContext\n value={{\n emphasis,\n direction: direction ?? 'vertical',\n invalid: resolvedInvalid,\n required: resolvedRequired\n }}\n >\n <RadioGroupPrimitive\n className={cn(radioGroupVariants({ direction, className }))}\n {...(inField && {\n 'aria-labelledby': fieldContext.labelId || undefined,\n 'aria-describedby': resolvedInvalid\n ? fieldContext.errorTextId || undefined\n : fieldContext.helperTextId || undefined\n })}\n {...props}\n />\n </RadioGroupContext>\n )\n}\n\nRadioGroupRoot.displayName = 'RadioGroup'\n\n/* ─── Item ─── */\n\nexport type RadioGroupItemProps = Radio.Root.Props & {\n label?: string\n description?: string\n}\n\nfunction RadioGroupItem({\n className,\n label,\n description,\n children,\n ...props\n}: RadioGroupItemProps) {\n const { emphasis, direction } = use(RadioGroupContext)\n\n const radio = (\n <Radio.Root\n className={cn(\n 'duration-moderate flex size-6 shrink-0 items-center justify-center rounded-full border border-subtle emphasis-sunken outline-0 outline-offset-0 outline-[color-mix(in_oklch,var(--color-accent-9)_var(--focus-ring-opacity),transparent)] transition-[background-color,border-color,outline-width,outline-color] data-[checked]:border-[var(--color-accent-9)] data-[checked]:bg-[var(--color-accent-3)]',\n emphasis !== 'normal' &&\n 'focus-visible:outline-[length:var(--focus-ring-width)]'\n )}\n {...props}\n >\n <Radio.Indicator className='size-2.5 rounded-full bg-[var(--color-accent-9)]' />\n </Radio.Root>\n )\n\n return (\n <label\n className={cn(\n radioGroupItemVariants({ emphasis, className }),\n direction === 'horizontal' && emphasis === 'normal' && 'flex-1'\n )}\n >\n {emphasis === 'normal' ? (\n <>\n <div className='grid gap-0.5'>\n <span className='flex items-center gap-2'>\n {children}\n {label && (\n <span className='text-base font-medium text-normal'>\n {label}\n </span>\n )}\n </span>\n {description && (\n <span className='text-sm text-subtle'>{description}</span>\n )}\n </div>\n {radio}\n </>\n ) : (\n <>\n {radio}\n {children}\n {label && <span className='text-sm text-normal'>{label}</span>}\n </>\n )}\n </label>\n )\n}\n\nRadioGroupItem.displayName = 'RadioGroup.Item'\n\n/* ─── Label ─── */\n\nexport interface RadioGroupLabelProps extends ComponentProps<'label'> {\n showIndicator?: boolean\n}\n\nfunction RadioGroupLabel({\n className,\n showIndicator,\n children,\n ...props\n}: RadioGroupLabelProps) {\n const { required } = use(RadioGroupContext)\n return (\n <label\n className={cn(\n 'flex w-full items-center gap-1 text-sm font-medium text-normal',\n className\n )}\n {...props}\n >\n {children}\n {showIndicator &&\n (required ? (\n <>\n {' '}\n <RequiredIndicator />\n </>\n ) : (\n <>\n {' '}\n <OptionalIndicator />\n </>\n ))}\n </label>\n )\n}\n\nRadioGroupLabel.displayName = 'RadioGroup.Label'\n\n/* ─── Helper text ─── */\n\nexport interface RadioGroupHelperTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupHelperText({\n className,\n ...props\n}: RadioGroupHelperTextProps) {\n return (\n <p className={cn('w-full text-sm text-subtle', className)} {...props} />\n )\n}\n\nRadioGroupHelperText.displayName = 'RadioGroup.HelperText'\n\n/* ─── Error text ─── */\n\nexport interface RadioGroupErrorTextProps extends ComponentProps<'p'> {}\n\nfunction RadioGroupErrorText({\n className,\n ...props\n}: RadioGroupErrorTextProps) {\n const { invalid } = use(RadioGroupContext)\n if (!invalid) return null\n return (\n <p\n role='alert'\n className={cn('w-full text-sm text-subtle intent-danger', className)}\n {...props}\n />\n )\n}\n\nRadioGroupErrorText.displayName = 'RadioGroup.ErrorText'\n\n/* ─── Compound export ─── */\n\nexport const RadioGroup = Object.assign(RadioGroupRoot, {\n Item: RadioGroupItem,\n Label: RadioGroupLabel,\n HelperText: RadioGroupHelperText,\n ErrorText: RadioGroupErrorText\n})\n\nexport type RadioGroupProps = RadioGroupRootProps\n"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {cva}from'class-variance-authority';import {cn}from'@oztix/roadie-core/utils';import {jsx}from'react/jsx-runtime';var p=cva(["text-prose text-normal","[&_a]:underline [&_a]:underline-offset-2","[&_ul]:list-disc [&_ul]:pl-6","[&_ol]:list-decimal [&_ol]:pl-6","[&_blockquote]:border-l-[3px] [&_blockquote]:border-normal [&_blockquote]:pl-4 [&_blockquote]:text-subtle","[&_:not(pre)>code]:bg-subtler [&_:not(pre)>code]:rounded-md [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-mono","[&_pre]:bg-sunken [&_pre]:rounded-lg [&_pre]:overflow-x-auto [&_pre]:font-mono","[&_img]:rounded-lg","[&_table]:w-full","[&_th]:text-left [&_th]:font-semibold [&_th]:border-b [&_th]:border-subtle","[&_td]:border-b [&_td]:border-subtler","[&_strong]:font-semibold [&_strong]:text-strong"],{variants:{size:{sm:["text-sm","[&>*+*]:mt-2","[&_h1]:text-display-ui-2 [&_h1]:text-strong [&_h1]:mt-4","[&_h2]:text-display-ui-3 [&_h2]:text-strong [&_h2]:mt-4","[&_h3]:text-display-ui-4 [&_h3]:text-strong [&_h3]:mt-3","[&_h4]:text-display-ui-5 [&_h4]:text-strong [&_h4]:mt-3","[&_h5]:text-display-ui-6 [&_h5]:text-strong [&_h5]:mt-2","[&_h6]:text-display-ui-6 [&_h6]:text-strong [&_h6]:mt-2","[&_ul>li+li]:mt-0.5 [&_ol>li+li]:mt-0.5","[&_pre]:p-3 [&_pre]:text-xs","[&_th]:py-1.5 [&_th]:pr-3 [&_td]:py-1.5 [&_td]:pr-3","[&_hr]:my-4"],md:["[&>*+*]:mt-4","[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-8","[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-8","[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-6","[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6","[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-4","[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4","[&_ul>li+li]:mt-1 [&_ol>li+li]:mt-1","[&_pre]:p-4 [&_pre]:text-sm","[&_th]:py-2 [&_th]:pr-4 [&_td]:py-2 [&_td]:pr-4","[&_hr]:my-8"],lg:["text-lg","[&>*+*]:mt-6","[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-12","[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-10","[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-8","[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6","[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-6","[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4","[&_ul>li+li]:mt-2 [&_ol>li+li]:mt-2","[&_pre]:p-6 [&_pre]:text-sm","[&_th]:py-3 [&_th]:pr-4 [&_td]:py-3 [&_td]:pr-4","[&_hr]:my-12"]}},defaultVariants:{size:"md"}});function l({as:t,className:e,size:o,..._}){return jsx(t||"div",{className:cn(p({size:o,className:e})),..._})}l.displayName="Prose";export{p as a,l as b};//# sourceMappingURL=chunk-ZXR32FYA.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-ZXR32FYA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Prose/index.tsx"],"names":["proseVariants","cva","Prose","as","className","size","props","jsx","cn"],"mappings":"yHAMO,IAAMA,CAAAA,CAAgBC,GAAAA,CAC3B,CACE,wBAAA,CAEA,0CAAA,CAEA,8BAAA,CACA,iCAAA,CAEA,2GAAA,CAEA,8KAAA,CAEA,gFAAA,CAEA,oBAAA,CAEA,kBAAA,CACA,4EAAA,CACA,uCAAA,CAEA,iDACF,CAAA,CACA,CACE,SAAU,CACR,IAAA,CAAM,CACJ,EAAA,CAAI,CACF,SAAA,CACA,cAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yDAAA,CACA,yCAAA,CACA,6BAAA,CACA,qDAAA,CACA,aACF,CAAA,CACA,EAAA,CAAI,CACF,cAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,qCAAA,CACA,6BAAA,CACA,iDAAA,CACA,aACF,CAAA,CACA,EAAA,CAAI,CACF,SAAA,CACA,cAAA,CACA,6DAAA,CACA,6DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,4DAAA,CACA,qCAAA,CACA,6BAAA,CACA,iDAAA,CACA,cACF,CACF,CACF,CAAA,CACA,eAAA,CAAiB,CACf,IAAA,CAAM,IACR,CACF,CACF,EAYO,SAASC,CAAAA,CAAqC,CACnD,EAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkB,CAEhB,OACEC,GAAAA,CAFgBJ,CAAAA,EAAM,KAAA,CAErB,CAAU,SAAA,CAAWK,EAAAA,CAAGR,CAAAA,CAAc,CAAE,IAAA,CAAAK,CAAAA,CAAM,SAAA,CAAAD,CAAU,CAAC,CAAC,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAE7E,CAEAJ,CAAAA,CAAM,WAAA,CAAc,OAAA","file":"chunk-ZXR32FYA.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 proseVariants = cva(\n [\n 'text-prose text-normal',\n // Links\n '[&_a]:underline [&_a]:underline-offset-2',\n // Lists\n '[&_ul]:list-disc [&_ul]:pl-6',\n '[&_ol]:list-decimal [&_ol]:pl-6',\n // Blockquote\n '[&_blockquote]:border-l-[3px] [&_blockquote]:border-normal [&_blockquote]:pl-4 [&_blockquote]:text-subtle',\n // Code\n '[&_:not(pre)>code]:bg-subtler [&_:not(pre)>code]:rounded-md [&_:not(pre)>code]:px-1.5 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-mono',\n // Pre\n '[&_pre]:bg-sunken [&_pre]:rounded-lg [&_pre]:overflow-x-auto [&_pre]:font-mono',\n // Images\n '[&_img]:rounded-lg',\n // Tables\n '[&_table]:w-full',\n '[&_th]:text-left [&_th]:font-semibold [&_th]:border-b [&_th]:border-subtle',\n '[&_td]:border-b [&_td]:border-subtler',\n // Strong/em\n '[&_strong]:font-semibold [&_strong]:text-strong'\n ],\n {\n variants: {\n size: {\n sm: [\n 'text-sm',\n '[&>*+*]:mt-2',\n '[&_h1]:text-display-ui-2 [&_h1]:text-strong [&_h1]:mt-4',\n '[&_h2]:text-display-ui-3 [&_h2]:text-strong [&_h2]:mt-4',\n '[&_h3]:text-display-ui-4 [&_h3]:text-strong [&_h3]:mt-3',\n '[&_h4]:text-display-ui-5 [&_h4]:text-strong [&_h4]:mt-3',\n '[&_h5]:text-display-ui-6 [&_h5]:text-strong [&_h5]:mt-2',\n '[&_h6]:text-display-ui-6 [&_h6]:text-strong [&_h6]:mt-2',\n '[&_ul>li+li]:mt-0.5 [&_ol>li+li]:mt-0.5',\n '[&_pre]:p-3 [&_pre]:text-xs',\n '[&_th]:py-1.5 [&_th]:pr-3 [&_td]:py-1.5 [&_td]:pr-3',\n '[&_hr]:my-4'\n ],\n md: [\n '[&>*+*]:mt-4',\n '[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-8',\n '[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-8',\n '[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-6',\n '[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6',\n '[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-4',\n '[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4',\n '[&_ul>li+li]:mt-1 [&_ol>li+li]:mt-1',\n '[&_pre]:p-4 [&_pre]:text-sm',\n '[&_th]:py-2 [&_th]:pr-4 [&_td]:py-2 [&_td]:pr-4',\n '[&_hr]:my-8'\n ],\n lg: [\n 'text-lg',\n '[&>*+*]:mt-6',\n '[&_h1]:text-display-prose-1 [&_h1]:text-strong [&_h1]:mt-12',\n '[&_h2]:text-display-prose-2 [&_h2]:text-strong [&_h2]:mt-10',\n '[&_h3]:text-display-prose-3 [&_h3]:text-strong [&_h3]:mt-8',\n '[&_h4]:text-display-prose-4 [&_h4]:text-strong [&_h4]:mt-6',\n '[&_h5]:text-display-prose-5 [&_h5]:text-strong [&_h5]:mt-6',\n '[&_h6]:text-display-prose-6 [&_h6]:text-strong [&_h6]:mt-4',\n '[&_ul>li+li]:mt-2 [&_ol>li+li]:mt-2',\n '[&_pre]:p-6 [&_pre]:text-sm',\n '[&_th]:py-3 [&_th]:pr-4 [&_td]:py-3 [&_td]:pr-4',\n '[&_hr]:my-12'\n ]\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nexport type ProseProps<T extends ElementType = 'div'> = {\n as?: T\n className?: string\n} & VariantProps<typeof proseVariants> &\n Omit<ComponentProps<T>, 'as' | 'className' | 'size'>\n\n/**\n * Prose container for long-form/rich content (CMS output, markdown, user HTML).\n * Applies semantic typography styles to nested HTML elements.\n */\nexport function Prose<T extends ElementType = 'div'>({\n as,\n className,\n size,\n ...props\n}: ProseProps<T>) {\n const Component = as || 'div'\n return (\n <Component className={cn(proseVariants({ size, className }))} {...props} />\n )\n}\n\nProse.displayName = 'Prose'\n"]}
|