@photon-ai/pho-ui 4.21.0 → 4.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{basic-page-B78a6jpw.js → basic-page-DnB4YSRj.js} +15 -15
- package/dist/chunks/basic-page-DnB4YSRj.js.map +1 -0
- package/dist/chunks/{chat-Dfbkf7g8.js → chat-C5W6L_Jg.js} +51 -51
- package/dist/chunks/chat-C5W6L_Jg.js.map +1 -0
- package/dist/chunks/{checkbox-DpWLbKVS.js → checkbox-D8smFViR.js} +2 -2
- package/dist/chunks/{checkbox-DpWLbKVS.js.map → checkbox-D8smFViR.js.map} +1 -1
- package/dist/chunks/chrome-Dyvv0FVf.js +14 -0
- package/dist/chunks/{chrome-Ds7WykBJ.js.map → chrome-Dyvv0FVf.js.map} +1 -1
- package/dist/chunks/{combobox-OQOi5hlB.js → combobox-C_yfFCFL.js} +2 -2
- package/dist/chunks/{combobox-OQOi5hlB.js.map → combobox-C_yfFCFL.js.map} +1 -1
- package/dist/chunks/{data-table-CAz_8HQw.js → data-table-C1tLUdw0.js} +4 -4
- package/dist/chunks/{data-table-CAz_8HQw.js.map → data-table-C1tLUdw0.js.map} +1 -1
- package/dist/chunks/{date-picker-vJQrTol9.js → date-picker-D-sWo3i8.js} +2 -2
- package/dist/chunks/{date-picker-vJQrTol9.js.map → date-picker-D-sWo3i8.js.map} +1 -1
- package/dist/chunks/{description-list-Duhhralt.js → description-list-DcTvBHzI.js} +6 -6
- package/dist/chunks/{description-list-Duhhralt.js.map → description-list-DcTvBHzI.js.map} +1 -1
- package/dist/chunks/{dialog-CDL6qY2a.js → dialog-e4_mOYGp.js} +5 -5
- package/dist/chunks/dialog-e4_mOYGp.js.map +1 -0
- package/dist/chunks/{error-BObcQClz.js → error-BjSn7wLu.js} +3 -3
- package/dist/chunks/{error-BObcQClz.js.map → error-BjSn7wLu.js.map} +1 -1
- package/dist/chunks/{filter-bar-qqCZf1x4.js → filter-bar-CLLonntH.js} +2 -2
- package/dist/chunks/{filter-bar-qqCZf1x4.js.map → filter-bar-CLLonntH.js.map} +1 -1
- package/dist/chunks/{log-list-QbSYHZu3.js → log-list-BqaJv2oA.js} +2 -2
- package/dist/chunks/{log-list-QbSYHZu3.js.map → log-list-BqaJv2oA.js.map} +1 -1
- package/dist/chunks/{menu-CC3fhf83.js → menu-CZSn8JAX.js} +2 -2
- package/dist/chunks/{menu-CC3fhf83.js.map → menu-CZSn8JAX.js.map} +1 -1
- package/dist/chunks/{popover-B0NBrYV5.js → popover-Dtp9C6Qg.js} +4 -4
- package/dist/chunks/{popover-B0NBrYV5.js.map → popover-Dtp9C6Qg.js.map} +1 -1
- package/dist/chunks/{select-xhSvDNbw.js → select-Dux2SBVc.js} +2 -2
- package/dist/chunks/{select-xhSvDNbw.js.map → select-Dux2SBVc.js.map} +1 -1
- package/dist/chunks/{sidebar-DHYyBBUj.js → sidebar-BsBlAVM9.js} +2 -2
- package/dist/chunks/sidebar-BsBlAVM9.js.map +1 -0
- package/dist/chunks/{stat-VxA1SvS_.js → stat-DUq4roVt.js} +16 -16
- package/dist/chunks/{stat-VxA1SvS_.js.map → stat-DUq4roVt.js.map} +1 -1
- package/dist/chunks/{status-view-I_Y6eEyX.js → status-view-Buhh1UBJ.js} +2 -2
- package/dist/chunks/status-view-Buhh1UBJ.js.map +1 -0
- package/dist/chunks/{toast-B1GAdxXP.js → toast-K549iZEX.js} +2 -2
- package/dist/chunks/{toast-B1GAdxXP.js.map → toast-K549iZEX.js.map} +1 -1
- package/dist/chunks/{trace-D9F0sne7.js → trace-5Rh1ade9.js} +2 -2
- package/dist/chunks/{trace-D9F0sne7.js.map → trace-5Rh1ade9.js.map} +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/autocomplete.js +5 -5
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/context-menu.js +5 -5
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/data-table.js +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/description-list.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +5 -5
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/error.js +1 -1
- package/dist/components/field.js +26 -24
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +5 -5
- package/dist/components/fieldset.js.map +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/log-list.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/meter.js +12 -12
- package/dist/components/meter.js.map +1 -1
- package/dist/components/notification.js +2 -2
- package/dist/components/notification.js.map +1 -1
- package/dist/components/phone-input.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +16 -16
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scope.js +3 -3
- package/dist/components/scope.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +16 -16
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stat.js +1 -1
- package/dist/components/status-view.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/index.js +13 -13
- package/dist/sections/basic-page.js +2 -2
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/data-table/chrome.d.ts +1 -1
- package/dist/src/components/drawer/drawer.d.ts +1 -0
- package/dist/src/components/field/field.d.ts +10 -2
- package/dist/src/components/status-view/status-view.d.ts +4 -3
- package/dist/src/sections/sidebar/sidebar.d.ts +7 -2
- package/package.json +1 -1
- package/src/styles/fonts.css +6 -4
- package/src/styles/theme.css +5 -3
- package/dist/chunks/basic-page-B78a6jpw.js.map +0 -1
- package/dist/chunks/chat-Dfbkf7g8.js.map +0 -1
- package/dist/chunks/chrome-Ds7WykBJ.js +0 -14
- package/dist/chunks/dialog-CDL6qY2a.js.map +0 -1
- package/dist/chunks/sidebar-DHYyBBUj.js.map +0 -1
- package/dist/chunks/status-view-I_Y6eEyX.js.map +0 -1
|
@@ -53,7 +53,7 @@ function g({ className: e, ...t }) {
|
|
|
53
53
|
function f({ className: e, children: t, ...o }) {
|
|
54
54
|
const a = l(p);
|
|
55
55
|
return /* @__PURE__ */ c(s.Trigger, {
|
|
56
|
-
className: n("group/trigger text-pho-primary outline-pho-brand relative flex flex-1 cursor-pointer items-center justify-between gap-3 text-left font-medium tracking-[-0.1px]", "ease-pho-spring-reveal data-[panel-open]:text-pho-description transition-colors duration-500", "focus-visible:outline-2 focus-visible:outline-offset-4", "before:absolute before:inset-x-0", i[a].question, i[a].hit, e),
|
|
56
|
+
className: n("group/trigger text-pho-primary outline-pho-brand font-heading relative flex flex-1 cursor-pointer items-center justify-between gap-3 text-left font-medium tracking-[-0.1px]", "ease-pho-spring-reveal data-[panel-open]:text-pho-description transition-colors duration-500", "focus-visible:outline-2 focus-visible:outline-offset-4", "before:absolute before:inset-x-0", i[a].question, i[a].hit, e),
|
|
57
57
|
...o,
|
|
58
58
|
children: [t, /* @__PURE__ */ r("svg", {
|
|
59
59
|
"aria-hidden": "true",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","names":["BaseAccordion","cn","createContext","useContext","jsx","jsxs","Accordion$1","SIZE","SizeContext","Root","className","multiple","size","props","Item","Header","Trigger","children","Panel","Accordion"],"sources":["../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n} from \"react\";\nimport { Accordion as BaseAccordion } from \"@base-ui/react/accordion\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nexport type AccordionSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Three sizes, one step of the type scale apart. `lg` is photon.codes's\n * FAQ to the pixel: the question at 20/28, the answer at 18/28, 20px\n * above and below, 8px between. `md` and `sm` step the type, the\n * padding, and the gap down together; the chevron is the same small\n * glyph in the same 24px box at every size, so a row is never shorter\n * than it.\n */\nconst SIZE: Record<\n AccordionSize,\n { item: string; hit: string; question: string; gap: string; answer: string }\n> = {\n sm: {\n item: \"py-3\",\n hit: \"before:-top-3 before:-bottom-3\",\n question: \"text-base\",\n gap: \"pt-1 pb-1\",\n answer: \"text-xs\",\n },\n md: {\n item: \"py-4\",\n hit: \"before:-top-4 before:-bottom-4\",\n question: \"text-md\",\n gap: \"pt-1.5 pb-1.5\",\n answer: \"text-base\",\n },\n lg: {\n item: \"py-5\",\n hit: \"before:-top-5 before:-bottom-5\",\n question: \"text-xl leading-7\",\n gap: \"pt-2 pb-2\",\n answer: \"text-lg\",\n },\n};\n\nconst SizeContext = createContext<AccordionSize>(\"md\");\n\nexport interface AccordionRootProps extends StyledProps<\n typeof BaseAccordion.Root\n> {\n /** @default \"md\" */\n size?: AccordionSize;\n}\n\n/**\n * The list — bare, so the page decides the surface: on photon.codes the\n * FAQ card is the section's, 32px around the list; in a settings page it\n * is a `Card`. Items divide with a hairline and the list has no outer\n * lines. Items are independent, as on the site, so `multiple` is on\n * unless said otherwise.\n */\nfunction Root({\n className,\n multiple = true,\n size = \"md\",\n ...props\n}: AccordionRootProps) {\n return (\n <SizeContext.Provider value={size}>\n <BaseAccordion.Root\n multiple={multiple}\n data-size={size}\n className={cn(\"w-full\", className)}\n {...props}\n />\n </SizeContext.Provider>\n );\n}\n\n/**\n * One question, padded above and below, whatever is open inside. The\n * hairline under it overlaps the next item by its own pixel, the way\n * Framer draws a border inside the box, so an item advances by exactly\n * its padding and its rows: 68px at `lg`, the site's figure. The last\n * item draws none.\n */\nfunction Item({ className, ...props }: StyledProps<typeof BaseAccordion.Item>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Item\n className={cn(\n \"border-pho-secondary -mb-px border-b last:mb-0 last:border-b-0\",\n SIZE[size].item,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Header({\n className,\n ...props\n}: StyledProps<typeof BaseAccordion.Header>) {\n return <BaseAccordion.Header className={cn(\"flex\", className)} {...props} />;\n}\n\n/**\n * The question row: the question in medium with the chevron at the row's\n * end. The chevron is the site's small one (a 6.5×3.5 stroke in a 24px\n * box, weight 1.5) and the trigger wears it itself — pass only the\n * question. Open, the question settles to the description tone and the\n * chevron makes a half turn, both on the section spring; the chevron keeps\n * the primary ink. The whole item is the target, as on the site: the hit\n * area reaches through the item's padding above and below the row.\n */\nfunction Trigger({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseAccordion.Trigger>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Trigger\n className={cn(\n \"group/trigger text-pho-primary outline-pho-brand relative flex flex-1 cursor-pointer items-center justify-between gap-3 text-left font-medium tracking-[-0.1px]\",\n \"ease-pho-spring-reveal data-[panel-open]:text-pho-description transition-colors duration-500\",\n \"focus-visible:outline-2 focus-visible:outline-offset-4\",\n \"before:absolute before:inset-x-0\",\n SIZE[size].question,\n SIZE[size].hit,\n className,\n )}\n {...props}\n >\n {children}\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n data-accordion-chevron=\"\"\n className=\"text-pho-primary ease-pho-spring-reveal size-6 shrink-0 transition-[rotate] duration-500 group-data-[panel-open]/trigger:rotate-180\"\n >\n <path d=\"M 6.5 0 L 3.25 3.5 L 0 0\" transform=\"translate(8.75 10.75)\" />\n </svg>\n </BaseAccordion.Trigger>\n );\n}\n\n/**\n * The answer: medium in the primary ink, one type step under the\n * question, a short gap below it. Opening, the panel's height rides the\n * section spring while the answer arrives 100ms later on the appear\n * spring, fading in as it rises 20px. Closing, the answer is gone at once\n * and the height settles on the section spring — the site's way round.\n */\nfunction Panel({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseAccordion.Panel>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Panel\n className={cn(\n \"group/panel ease-pho-spring-reveal h-[var(--accordion-panel-height)] overflow-hidden transition-[height] duration-500\",\n \"data-[ending-style]:h-0 data-[starting-style]:h-0\",\n className,\n )}\n {...props}\n >\n {/* The gap is symmetric: the panel clips, so the answer's last line\n needs room below it for a link's focus ring, not just above.\n The gap and the clip live on one wrapper, the rise on another:\n the panel measures its height from layout, and a translated\n child would count its 20px of overflow into that measure. */}\n <div className={cn(\"overflow-clip\", SIZE[size].gap)}>\n <div\n data-accordion-answer=\"\"\n className={cn(\n \"text-pho-primary font-medium tracking-[-0.1px]\",\n \"ease-pho-spring-appear transition-[opacity,translate] delay-100 duration-700\",\n \"group-data-[starting-style]/panel:translate-y-5 group-data-[starting-style]/panel:opacity-0\",\n \"group-data-[ending-style]/panel:opacity-0 group-data-[ending-style]/panel:transition-none\",\n SIZE[size].answer,\n )}\n >\n {children}\n </div>\n </div>\n </BaseAccordion.Panel>\n );\n}\n\n/**\n * Questions that each reveal an answer — photon.codes's FAQ, as a\n * component, built on Base UI `Accordion`. Each `Accordion.Item` needs a\n * `value`; control the open set with `value` / `onValueChange` or\n * `defaultValue`. Items are independent by default; `multiple={false}`\n * opens one at a time. Three sizes; `lg` is the site's.\n */\nexport const Accordion = { Root, Item, Header, Trigger, Panel };\n"],"mappings":";;;;;AA2BA,IAAMO,IAGF;AAAA,EACF,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AAAA,EACA,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AAAA,EACA,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACF,GAEMC,IAAcN,EAA6B,IAAI;AAgBrD,SAASO,EAAK,EACZ,WAAAC,GACA,UAAAC,IAAW,IACX,MAAAC,IAAO,MACP,GAAGC,EAAA,GACkB;AACrB,SACE,gBAAAT,EAACI,EAAY,UAAb;AAAA,IAAsB,OAAOI;AAAA,IAC3B,UAAA,gBAAAR,EAACJ,EAAc,MAAf;AAAA,MACY,UAAAW;AAAA,MACV,aAAWC;AAAA,MACX,WAAWX,EAAG,UAAUS,CAAS;AAAA,MACjC,GAAIG;AAAA,IACL,CAAA;AAAA,EACmB,CAAA;AAE1B;AASA,SAASC,EAAK,EAAE,WAAAJ,GAAW,GAAGG,EAAA,GAAiD;AAC7E,QAAMD,IAAOT,EAAWK,CAAW;AACnC,SACE,gBAAAJ,EAACJ,EAAc,MAAf;AAAA,IACE,WAAWC,EACT,kEACAM,EAAKK,CAAA,EAAM,MACXF,CACF;AAAA,IACA,GAAIG;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAO,EACd,WAAAL,GACA,GAAGG,EAAA,GACwC;AAC3C,SAAO,gBAAAT,EAACJ,EAAc,QAAf;AAAA,IAAsB,WAAWC,EAAG,QAAQS,CAAS;AAAA,IAAG,GAAIG;AAAA,EAAQ,CAAA;AAC7E;AAWA,SAASG,EAAQ,EACf,WAAAN,GACA,UAAAO,GACA,GAAGJ,EAAA,GACyC;AAC5C,QAAMD,IAAOT,EAAWK,CAAW;AACnC,SACE,gBAAAH,EAACL,EAAc,SAAf;AAAA,IACE,WAAWC,EACT,
|
|
1
|
+
{"version":3,"file":"accordion.js","names":["BaseAccordion","cn","createContext","useContext","jsx","jsxs","Accordion$1","SIZE","SizeContext","Root","className","multiple","size","props","Item","Header","Trigger","children","Panel","Accordion"],"sources":["../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n} from \"react\";\nimport { Accordion as BaseAccordion } from \"@base-ui/react/accordion\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nexport type AccordionSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Three sizes, one step of the type scale apart. `lg` is photon.codes's\n * FAQ to the pixel: the question at 20/28, the answer at 18/28, 20px\n * above and below, 8px between. `md` and `sm` step the type, the\n * padding, and the gap down together; the chevron is the same small\n * glyph in the same 24px box at every size, so a row is never shorter\n * than it.\n */\nconst SIZE: Record<\n AccordionSize,\n { item: string; hit: string; question: string; gap: string; answer: string }\n> = {\n sm: {\n item: \"py-3\",\n hit: \"before:-top-3 before:-bottom-3\",\n question: \"text-base\",\n gap: \"pt-1 pb-1\",\n answer: \"text-xs\",\n },\n md: {\n item: \"py-4\",\n hit: \"before:-top-4 before:-bottom-4\",\n question: \"text-md\",\n gap: \"pt-1.5 pb-1.5\",\n answer: \"text-base\",\n },\n lg: {\n item: \"py-5\",\n hit: \"before:-top-5 before:-bottom-5\",\n question: \"text-xl leading-7\",\n gap: \"pt-2 pb-2\",\n answer: \"text-lg\",\n },\n};\n\nconst SizeContext = createContext<AccordionSize>(\"md\");\n\nexport interface AccordionRootProps extends StyledProps<\n typeof BaseAccordion.Root\n> {\n /** @default \"md\" */\n size?: AccordionSize;\n}\n\n/**\n * The list — bare, so the page decides the surface: on photon.codes the\n * FAQ card is the section's, 32px around the list; in a settings page it\n * is a `Card`. Items divide with a hairline and the list has no outer\n * lines. Items are independent, as on the site, so `multiple` is on\n * unless said otherwise.\n */\nfunction Root({\n className,\n multiple = true,\n size = \"md\",\n ...props\n}: AccordionRootProps) {\n return (\n <SizeContext.Provider value={size}>\n <BaseAccordion.Root\n multiple={multiple}\n data-size={size}\n className={cn(\"w-full\", className)}\n {...props}\n />\n </SizeContext.Provider>\n );\n}\n\n/**\n * One question, padded above and below, whatever is open inside. The\n * hairline under it overlaps the next item by its own pixel, the way\n * Framer draws a border inside the box, so an item advances by exactly\n * its padding and its rows: 68px at `lg`, the site's figure. The last\n * item draws none.\n */\nfunction Item({ className, ...props }: StyledProps<typeof BaseAccordion.Item>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Item\n className={cn(\n \"border-pho-secondary -mb-px border-b last:mb-0 last:border-b-0\",\n SIZE[size].item,\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Header({\n className,\n ...props\n}: StyledProps<typeof BaseAccordion.Header>) {\n return <BaseAccordion.Header className={cn(\"flex\", className)} {...props} />;\n}\n\n/**\n * The question row: the question in medium with the chevron at the row's\n * end. The chevron is the site's small one (a 6.5×3.5 stroke in a 24px\n * box, weight 1.5) and the trigger wears it itself — pass only the\n * question. Open, the question settles to the description tone and the\n * chevron makes a half turn, both on the section spring; the chevron keeps\n * the primary ink. The whole item is the target, as on the site: the hit\n * area reaches through the item's padding above and below the row.\n */\nfunction Trigger({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseAccordion.Trigger>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Trigger\n className={cn(\n \"group/trigger text-pho-primary outline-pho-brand font-heading relative flex flex-1 cursor-pointer items-center justify-between gap-3 text-left font-medium tracking-[-0.1px]\",\n \"ease-pho-spring-reveal data-[panel-open]:text-pho-description transition-colors duration-500\",\n \"focus-visible:outline-2 focus-visible:outline-offset-4\",\n \"before:absolute before:inset-x-0\",\n SIZE[size].question,\n SIZE[size].hit,\n className,\n )}\n {...props}\n >\n {children}\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n data-accordion-chevron=\"\"\n className=\"text-pho-primary ease-pho-spring-reveal size-6 shrink-0 transition-[rotate] duration-500 group-data-[panel-open]/trigger:rotate-180\"\n >\n <path d=\"M 6.5 0 L 3.25 3.5 L 0 0\" transform=\"translate(8.75 10.75)\" />\n </svg>\n </BaseAccordion.Trigger>\n );\n}\n\n/**\n * The answer: medium in the primary ink, one type step under the\n * question, a short gap below it. Opening, the panel's height rides the\n * section spring while the answer arrives 100ms later on the appear\n * spring, fading in as it rises 20px. Closing, the answer is gone at once\n * and the height settles on the section spring — the site's way round.\n */\nfunction Panel({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseAccordion.Panel>) {\n const size = useContext(SizeContext);\n return (\n <BaseAccordion.Panel\n className={cn(\n \"group/panel ease-pho-spring-reveal h-[var(--accordion-panel-height)] overflow-hidden transition-[height] duration-500\",\n \"data-[ending-style]:h-0 data-[starting-style]:h-0\",\n className,\n )}\n {...props}\n >\n {/* The gap is symmetric: the panel clips, so the answer's last line\n needs room below it for a link's focus ring, not just above.\n The gap and the clip live on one wrapper, the rise on another:\n the panel measures its height from layout, and a translated\n child would count its 20px of overflow into that measure. */}\n <div className={cn(\"overflow-clip\", SIZE[size].gap)}>\n <div\n data-accordion-answer=\"\"\n className={cn(\n \"text-pho-primary font-medium tracking-[-0.1px]\",\n \"ease-pho-spring-appear transition-[opacity,translate] delay-100 duration-700\",\n \"group-data-[starting-style]/panel:translate-y-5 group-data-[starting-style]/panel:opacity-0\",\n \"group-data-[ending-style]/panel:opacity-0 group-data-[ending-style]/panel:transition-none\",\n SIZE[size].answer,\n )}\n >\n {children}\n </div>\n </div>\n </BaseAccordion.Panel>\n );\n}\n\n/**\n * Questions that each reveal an answer — photon.codes's FAQ, as a\n * component, built on Base UI `Accordion`. Each `Accordion.Item` needs a\n * `value`; control the open set with `value` / `onValueChange` or\n * `defaultValue`. Items are independent by default; `multiple={false}`\n * opens one at a time. Three sizes; `lg` is the site's.\n */\nexport const Accordion = { Root, Item, Header, Trigger, Panel };\n"],"mappings":";;;;;AA2BA,IAAMO,IAGF;AAAA,EACF,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AAAA,EACA,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AAAA,EACA,IAAI;AAAA,IACF,MAAM;AAAA,IACN,KAAK;AAAA,IACL,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACF,GAEMC,IAAcN,EAA6B,IAAI;AAgBrD,SAASO,EAAK,EACZ,WAAAC,GACA,UAAAC,IAAW,IACX,MAAAC,IAAO,MACP,GAAGC,EAAA,GACkB;AACrB,SACE,gBAAAT,EAACI,EAAY,UAAb;AAAA,IAAsB,OAAOI;AAAA,IAC3B,UAAA,gBAAAR,EAACJ,EAAc,MAAf;AAAA,MACY,UAAAW;AAAA,MACV,aAAWC;AAAA,MACX,WAAWX,EAAG,UAAUS,CAAS;AAAA,MACjC,GAAIG;AAAA,IACL,CAAA;AAAA,EACmB,CAAA;AAE1B;AASA,SAASC,EAAK,EAAE,WAAAJ,GAAW,GAAGG,EAAA,GAAiD;AAC7E,QAAMD,IAAOT,EAAWK,CAAW;AACnC,SACE,gBAAAJ,EAACJ,EAAc,MAAf;AAAA,IACE,WAAWC,EACT,kEACAM,EAAKK,CAAA,EAAM,MACXF,CACF;AAAA,IACA,GAAIG;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAO,EACd,WAAAL,GACA,GAAGG,EAAA,GACwC;AAC3C,SAAO,gBAAAT,EAACJ,EAAc,QAAf;AAAA,IAAsB,WAAWC,EAAG,QAAQS,CAAS;AAAA,IAAG,GAAIG;AAAA,EAAQ,CAAA;AAC7E;AAWA,SAASG,EAAQ,EACf,WAAAN,GACA,UAAAO,GACA,GAAGJ,EAAA,GACyC;AAC5C,QAAMD,IAAOT,EAAWK,CAAW;AACnC,SACE,gBAAAH,EAACL,EAAc,SAAf;AAAA,IACE,WAAWC,EACT,gLACA,gGACA,0DACA,oCACAM,EAAKK,CAAA,EAAM,UACXL,EAAKK,CAAA,EAAM,KACXF,CACF;AAAA,IACA,GAAIG;AAAA,IAVN,UAAA,CAYGI,GACD,gBAAAb,EAAC,OAAD;AAAA,MACE,eAAY;AAAA,MACZ,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAa;AAAA,MACb,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,0BAAuB;AAAA,MACvB,WAAU;AAAA,MAEV,UAAA,gBAAAA,EAAC,QAAD;AAAA,QAAM,GAAE;AAAA,QAA2B,WAAU;AAAA,MAAyB,CAAA;AAAA,IACnE,CAAA,CACgB;AAAA,E;AAE3B;AASA,SAASc,EAAM,EACb,WAAAR,GACA,UAAAO,GACA,GAAGJ,EAAA,GACuC;AAC1C,QAAMD,IAAOT,EAAWK,CAAW;AACnC,SACE,gBAAAJ,EAACJ,EAAc,OAAf;AAAA,IACE,WAAWC,EACT,yHACA,qDACAS,CACF;AAAA,IACA,GAAIG;AAAA,IAOJ,UAAA,gBAAAT,EAAC,OAAD;AAAA,MAAK,WAAWH,EAAG,iBAAiBM,EAAKK,CAAA,EAAM,GAAG;AAAA,MAChD,UAAA,gBAAAR,EAAC,OAAD;AAAA,QACE,yBAAsB;AAAA,QACtB,WAAWH,EACT,kDACA,gFACA,+FACA,6FACAM,EAAKK,CAAA,EAAM,MACb;AAAA,QAEC,UAAAK;AAAA,MACE,CAAA;AAAA,IACF,CAAA;AAAA,EACc,CAAA;AAEzB;AASA,IAAaE,IAAY;AAAA,EAAE,MAAAV;AAAA,EAAM,MAAAK;AAAA,EAAM,QAAAC;AAAA,EAAQ,SAAAC;AAAA,EAAS,OAAAE;AAAM"}
|
|
@@ -29,13 +29,13 @@ function h({ className: e, sideOffset: t = 6, ...n }) {
|
|
|
29
29
|
...n
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function g({ className: e, ...t }) {
|
|
33
33
|
return /* @__PURE__ */ a(o.Popup, {
|
|
34
34
|
className: r("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", e),
|
|
35
35
|
...t
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function y({ className: e, ...t }) {
|
|
39
39
|
return /* @__PURE__ */ a(o.List, {
|
|
40
40
|
className: r("max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain", e),
|
|
41
41
|
...t
|
|
@@ -55,7 +55,7 @@ function f({ className: e, ...t }) {
|
|
|
55
55
|
}
|
|
56
56
|
function v({ className: e, ...t }) {
|
|
57
57
|
return /* @__PURE__ */ a(o.GroupLabel, {
|
|
58
|
-
className: r("text-pho-secondary px-2.5 py-1.5 text-xs font-medium", e),
|
|
58
|
+
className: r("text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium", e),
|
|
59
59
|
...t
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -67,8 +67,8 @@ var I = {
|
|
|
67
67
|
Clear: d,
|
|
68
68
|
Portal: p,
|
|
69
69
|
Positioner: h,
|
|
70
|
-
Popup:
|
|
71
|
-
List:
|
|
70
|
+
Popup: g,
|
|
71
|
+
List: y,
|
|
72
72
|
Collection: u,
|
|
73
73
|
Empty: x,
|
|
74
74
|
Item: f,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","names":["BaseAutocomplete","cn","jsx","Autocomplete$1","Root","Value","Portal","Group","Collection","InputGroup","className","props","Input","Clear","Positioner","sideOffset","Popup","List","Empty","Item","GroupLabel","Autocomplete"],"sources":["../../src/components/autocomplete/autocomplete.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Autocomplete as BaseAutocomplete } from \"@base-ui/react/autocomplete\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseAutocomplete.Root;\nconst Value = BaseAutocomplete.Value;\nconst Portal = BaseAutocomplete.Portal;\nconst Group = BaseAutocomplete.Group;\nconst Collection = BaseAutocomplete.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.InputGroup>) {\n return (\n <BaseAutocomplete.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Input>) {\n return (\n <BaseAutocomplete.Input\n className={cn(\n // Flat field surface — the 15% hairline ring carries the edge; shadows\n // are reserved for floating layers.\n // text-md on small viewports — iOS zooms into fields under 16px.\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Clear({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Clear>) {\n return (\n <BaseAutocomplete.Clear\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Positioner>) {\n return (\n <BaseAutocomplete.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Popup>) {\n return (\n <BaseAutocomplete.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction List({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.List>) {\n return (\n <BaseAutocomplete.List\n className={cn(\n \"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Empty({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Empty>) {\n return (\n <BaseAutocomplete.Empty\n className={cn(\n \"text-pho-description px-2.5 py-6 text-center text-base empty:m-0 empty:p-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Item>) {\n return (\n <BaseAutocomplete.Item\n className={cn(\n \"text-pho-secondary flex cursor-pointer items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.GroupLabel>) {\n return (\n <BaseAutocomplete.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Autocomplete built on Base UI `Autocomplete` — a free-text input that offers\n * matching suggestions as you type. Unlike `Combobox`, the value isn't\n * constrained to the list: the user can submit text that matches no suggestion.\n * Pass `items` to `Autocomplete.Root` and render an `Item` per suggestion.\n */\nexport const Autocomplete = {\n Root,\n Value,\n InputGroup,\n Input,\n Clear,\n Portal,\n Positioner,\n Popup,\n List,\n Collection,\n Empty,\n Item,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;AAYA,IAAMI,IAAOJ,EAAiB,MACxBK,IAAQL,EAAiB,OACzBM,IAASN,EAAiB,QAC1BO,IAAQP,EAAiB,OACzBQ,IAAaR,EAAiB;AAEpC,SAASS,EAAW,EAClB,WAAAC,GACA,GAAGC,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACE,WAAWC,EAAG,8BAA8BS,CAAS;AAAA,IACrD,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAM,EACb,WAAAF,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EAIT,oTACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAM,EACb,WAAAH,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EACT,wHACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASG,EAAW,EAClB,WAAAJ,GACA,YAAAK,IAAa,GACb,GAAGJ,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACc,YAAAe;AAAA,IACZ,WAAWd,EAAG,qBAAqBS,CAAS;AAAA,IAC5C,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASK,EAAM,EACb,WAAAN,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EAGT,iQACA,kEACA,8DACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASM,EAAK,EACZ,WAAAP,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAT,EAACF,EAAiB,MAAlB;AAAA,IACE,WAAWC,EACT,iFACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASO,EAAM,EACb,WAAAR,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EACT,8EACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASQ,EAAK,EACZ,WAAAT,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAT,EAACF,EAAiB,MAAlB;AAAA,IACE,WAAWC,EACT,0JAEA,6EACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASS,EAAW,EAClB,WAAAV,GACA,GAAGC,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACE,WAAWC,EACT,
|
|
1
|
+
{"version":3,"file":"autocomplete.js","names":["BaseAutocomplete","cn","jsx","Autocomplete$1","Root","Value","Portal","Group","Collection","InputGroup","className","props","Input","Clear","Positioner","sideOffset","Popup","List","Empty","Item","GroupLabel","Autocomplete"],"sources":["../../src/components/autocomplete/autocomplete.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Autocomplete as BaseAutocomplete } from \"@base-ui/react/autocomplete\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseAutocomplete.Root;\nconst Value = BaseAutocomplete.Value;\nconst Portal = BaseAutocomplete.Portal;\nconst Group = BaseAutocomplete.Group;\nconst Collection = BaseAutocomplete.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.InputGroup>) {\n return (\n <BaseAutocomplete.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Input>) {\n return (\n <BaseAutocomplete.Input\n className={cn(\n // Flat field surface — the 15% hairline ring carries the edge; shadows\n // are reserved for floating layers.\n // text-md on small viewports — iOS zooms into fields under 16px.\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Clear({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Clear>) {\n return (\n <BaseAutocomplete.Clear\n className={cn(\n \"text-pho-secondary hover:text-pho-secondary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Positioner>) {\n return (\n <BaseAutocomplete.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Popup>) {\n return (\n <BaseAutocomplete.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction List({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.List>) {\n return (\n <BaseAutocomplete.List\n className={cn(\n \"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Empty({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Empty>) {\n return (\n <BaseAutocomplete.Empty\n className={cn(\n \"text-pho-description px-2.5 py-6 text-center text-base empty:m-0 empty:p-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.Item>) {\n return (\n <BaseAutocomplete.Item\n className={cn(\n \"text-pho-secondary flex cursor-pointer items-center gap-2 rounded-[calc(var(--radius-base)-4px)] py-1.5 pr-2.5 pl-2 text-base outline-none select-none\",\n // Secondary at rest; highlight lifts to primary + ghost wash (Menu idiom).\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseAutocomplete.GroupLabel>) {\n return (\n <BaseAutocomplete.GroupLabel\n className={cn(\n \"text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Autocomplete built on Base UI `Autocomplete` — a free-text input that offers\n * matching suggestions as you type. Unlike `Combobox`, the value isn't\n * constrained to the list: the user can submit text that matches no suggestion.\n * Pass `items` to `Autocomplete.Root` and render an `Item` per suggestion.\n */\nexport const Autocomplete = {\n Root,\n Value,\n InputGroup,\n Input,\n Clear,\n Portal,\n Positioner,\n Popup,\n List,\n Collection,\n Empty,\n Item,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;AAYA,IAAMI,IAAOJ,EAAiB,MACxBK,IAAQL,EAAiB,OACzBM,IAASN,EAAiB,QAC1BO,IAAQP,EAAiB,OACzBQ,IAAaR,EAAiB;AAEpC,SAASS,EAAW,EAClB,WAAAC,GACA,GAAGC,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACE,WAAWC,EAAG,8BAA8BS,CAAS;AAAA,IACrD,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAM,EACb,WAAAF,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EAIT,oTACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAM,EACb,WAAAH,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EACT,wHACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASG,EAAW,EAClB,WAAAJ,GACA,YAAAK,IAAa,GACb,GAAGJ,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACc,YAAAe;AAAA,IACZ,WAAWd,EAAG,qBAAqBS,CAAS;AAAA,IAC5C,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASK,EAAM,EACb,WAAAN,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EAGT,iQACA,kEACA,8DACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASM,EAAK,EACZ,WAAAP,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAT,EAACF,EAAiB,MAAlB;AAAA,IACE,WAAWC,EACT,iFACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASO,EAAM,EACb,WAAAR,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAT,EAACF,EAAiB,OAAlB;AAAA,IACE,WAAWC,EACT,8EACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASQ,EAAK,EACZ,WAAAT,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAT,EAACF,EAAiB,MAAlB;AAAA,IACE,WAAWC,EACT,0JAEA,6EACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASS,EAAW,EAClB,WAAAV,GACA,GAAGC,EAAA,GAC+C;AAClD,SACE,gBAAAT,EAACF,EAAiB,YAAlB;AAAA,IACE,WAAWC,EACT,qEACAS,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAQA,IAAaU,IAAe;AAAA,EAC1B,MAAAjB;AAAA,EACA,OAAAC;AAAA,EACA,YAAAI;AAAA,EACA,OAAAG;AAAA,EACA,OAAAC;AAAA,EACA,QAAAP;AAAA,EACA,YAAAQ;AAAA,EACA,OAAAE;AAAA,EACA,MAAAC;AAAA,EACA,YAAAT;AAAA,EACA,OAAAU;AAAA,EACA,MAAAC;AAAA,EACA,OAAAZ;AAAA,EACA,YAAAa;AACF"}
|
package/dist/components/chat.js
CHANGED
|
@@ -5,7 +5,7 @@ import { SPRING_SETTLE as P } from "../motion.js";
|
|
|
5
5
|
import { t as j } from "../chunks/IconArrowUpRight-OK8Fp0KQ.js";
|
|
6
6
|
import { t as V } from "../chunks/IconChevronLeft-CptqhdxO.js";
|
|
7
7
|
import { t as Z } from "../chunks/animated-height-zr7BmFY1.js";
|
|
8
|
-
import { t as u } from "../chunks/dialog-
|
|
8
|
+
import { t as u } from "../chunks/dialog-e4_mOYGp.js";
|
|
9
9
|
import { useEffect as $, useId as z, useLayoutEffect as A, useRef as F } from "react";
|
|
10
10
|
import { Fragment as E, jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
11
11
|
import { LayoutGroup as H, motion as g, useReducedMotion as B } from "motion/react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as a } from "../chunks/cn-CPbhpG1q.js";
|
|
3
3
|
import { t as v } from "../chunks/resolve-variant-CcD8iG5l.js";
|
|
4
|
-
import { l as x, n as
|
|
4
|
+
import { l as x, n as h, o as M, r as P, s as N, t as i } from "../chunks/menu-CZSn8JAX.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment as S, jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
import { Separator as R } from "@base-ui/react/separator";
|
|
@@ -15,7 +15,7 @@ function U({ className: r, ...o }) {
|
|
|
15
15
|
}
|
|
16
16
|
function _({ className: r, ...o }) {
|
|
17
17
|
return /* @__PURE__ */ t(e.Popup, {
|
|
18
|
-
className: a(
|
|
18
|
+
className: a(P, r),
|
|
19
19
|
...o
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -27,7 +27,7 @@ function k({ className: r, color: o = "default", onClick: p, closeOnClick: s = !
|
|
|
27
27
|
disabled: l
|
|
28
28
|
});
|
|
29
29
|
return /* @__PURE__ */ u(e.Item, {
|
|
30
|
-
className: a(i, v(
|
|
30
|
+
className: a(i, v(h, o), r),
|
|
31
31
|
closeOnClick: s,
|
|
32
32
|
disabled: f,
|
|
33
33
|
"data-loading": n || void 0,
|
|
@@ -35,7 +35,7 @@ function k({ className: r, color: o = "default", onClick: p, closeOnClick: s = !
|
|
|
35
35
|
...b,
|
|
36
36
|
onClick: g,
|
|
37
37
|
...d,
|
|
38
|
-
children: [n ? /* @__PURE__ */ u(S, { children: [/* @__PURE__ */ t(
|
|
38
|
+
children: [n ? /* @__PURE__ */ u(S, { children: [/* @__PURE__ */ t(M, {}), /* @__PURE__ */ t("output", {
|
|
39
39
|
className: "sr-only",
|
|
40
40
|
"aria-live": "polite"
|
|
41
41
|
})] }) : null, c]
|
|
@@ -43,7 +43,7 @@ function k({ className: r, color: o = "default", onClick: p, closeOnClick: s = !
|
|
|
43
43
|
}
|
|
44
44
|
function L({ className: r, ...o }) {
|
|
45
45
|
return /* @__PURE__ */ t(e.GroupLabel, {
|
|
46
|
-
className: a("text-pho-secondary px-2.5 py-1.5 text-xs font-medium", r),
|
|
46
|
+
className: a("text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium", r),
|
|
47
47
|
...o
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.js","names":["BaseContextMenu","_Fragment","Separator","BaseSeparator","cn","resolveVariant","withMenuPendingRoot","MENU_ITEM_COLORS","MenuItemSpinner","MENU_POPUP","useAsyncMenuItem","MENU_ITEM","Fragment$1","jsx","jsxs","Separator","ContextMenu$1","Root","Trigger","Portal","Group","RadioGroup","SubmenuRoot","Positioner","className","props","Popup","Item","color","onClick","closeOnClick","loading","disabled","children","inert","blocked","handleClick","blinkProps","GroupLabel","Separator$1","SubmenuTrigger","ContextMenu"],"sources":["../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ElementType,\n type MouseEvent as ReactMouseEvent,\n} from \"react\";\nimport { ContextMenu as BaseContextMenu } from \"@base-ui/react/context-menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant } from \"../../utils/resolve-variant\";\nimport {\n MENU_POPUP,\n MENU_ITEM,\n MENU_ITEM_COLORS,\n type MenuItemColor,\n} from \"../menu/menu\";\nimport {\n MenuItemSpinner,\n useAsyncMenuItem,\n withMenuPendingRoot,\n type AsyncMenuItemClick,\n} from \"../menu/menu-pending\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\" | \"color\"\n> & {\n className?: string;\n};\n\ntype ContextMenuItemProps = Omit<\n StyledProps<typeof BaseContextMenu.Item>,\n \"onClick\"\n> & {\n /** Semantic ink. @default \"default\" */\n color?: MenuItemColor;\n /**\n * Action handler. Return a promise to keep the menu open while it runs —\n * same behavior as `Menu.Item`.\n */\n onClick?: AsyncMenuItemClick;\n /** Declarative loading state. @default false */\n loading?: boolean;\n};\n\nconst Root = withMenuPendingRoot(BaseContextMenu.Root);\nconst Trigger = BaseContextMenu.Trigger;\nconst Portal = BaseContextMenu.Portal;\nconst Group = BaseContextMenu.Group;\nconst RadioGroup = BaseContextMenu.RadioGroup;\n// Don't wrap SubmenuRoot — nested pending context would shadow the parent\n// Root and fail to lock dismissal for async items inside a submenu.\nconst SubmenuRoot = BaseContextMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Positioner>) {\n return (\n <BaseContextMenu.Positioner className={cn(\"z-50\", className)} {...props} />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Popup>) {\n return (\n <BaseContextMenu.Popup className={cn(MENU_POPUP, className)} {...props} />\n );\n}\n\nfunction Item({\n className,\n color = \"default\",\n onClick,\n closeOnClick = true,\n loading = false,\n disabled = false,\n children,\n ...props\n}: ContextMenuItemProps) {\n const { inert, blocked, handleClick, blinkProps } = useAsyncMenuItem({\n onClick,\n closeOnClick,\n loading,\n disabled,\n });\n\n return (\n <BaseContextMenu.Item\n className={cn(\n MENU_ITEM,\n resolveVariant(MENU_ITEM_COLORS, color),\n className,\n )}\n closeOnClick={closeOnClick}\n disabled={blocked}\n data-loading={inert || undefined}\n aria-busy={inert || undefined}\n {...blinkProps}\n onClick={handleClick as (event: ReactMouseEvent<HTMLElement>) => void}\n {...props}\n >\n {inert ? (\n <>\n <MenuItemSpinner />\n <output className=\"sr-only\" aria-live=\"polite\" />\n </>\n ) : null}\n {children}\n </BaseContextMenu.Item>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.GroupLabel>) {\n return (\n <BaseContextMenu.GroupLabel\n className={cn(\n \"text-pho-secondary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1.5 my-1.5 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.SubmenuTrigger>) {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(\n MENU_ITEM,\n \"data-[popup-open]:bg-pho-ghost-hover\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Right-click (context) menu built on Base UI `ContextMenu`. `ContextMenu.Trigger`\n * wraps the area that opens the menu on right-click / long-press; the popup\n * shares its look with `Menu`. `ContextMenu.Item` has the same native promise\n * support as `Menu.Item`. Always mirror these actions somewhere visible —\n * a context menu must not be the only way to reach them.\n */\nexport const ContextMenu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n RadioGroup,\n};\n"],"mappings":";;;;;;;;AA6CA,IAAMiB,IAAOX,EAAoBN,EAAgB,IAAI,GAC/CkB,IAAUlB,EAAgB,SAC1BmB,IAASnB,EAAgB,QACzBoB,IAAQpB,EAAgB,OACxBqB,IAAarB,EAAgB,YAG7BsB,IAActB,EAAgB;AAEpC,SAASuB,EAAW,EAClB,WAAAC,GACA,GAAGC,EAAA,GAC8C;AACjD,SACE,gBAAAZ,EAACb,EAAgB,YAAjB;AAAA,IAA4B,WAAWI,EAAG,QAAQoB,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAASC,EAAM,EACb,WAAAF,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAZ,EAACb,EAAgB,OAAjB;AAAA,IAAuB,WAAWI,EAAGK,GAAYe,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE7E;AAEA,SAASE,EAAK,EACZ,WAAAH,GACA,OAAAI,IAAQ,WACR,SAAAC,GACA,cAAAC,IAAe,IACf,SAAAC,IAAU,IACV,UAAAC,IAAW,IACX,UAAAC,GACA,GAAGR,EAAA,GACoB;AACvB,QAAM,EAAE,OAAAS,GAAO,SAAAC,GAAS,aAAAC,GAAa,YAAAC,EAAA,IAAe3B,EAAiB;AAAA,IACnE,SAAAmB;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,EACF,CAAC;AAED,SACE,gBAAAlB,EAACd,EAAgB,MAAjB;AAAA,IACE,WAAWI,EACTO,GACAN,EAAeE,GAAkBqB,CAAK,GACtCJ,CACF;AAAA,IACc,cAAAM;AAAA,IACd,UAAUK;AAAA,IACV,gBAAcD,KAAS;AAAA,IACvB,aAAWA,KAAS;AAAA,IACpB,GAAIG;AAAA,IACJ,SAASD;AAAA,IACT,GAAIX;AAAA,IAZN,UAAA,CAcGS,IACC,gBAAApB,EAAAb,GAAA,EAAA,UAAA,CACE,gBAAAY,EAACL,GAAD,CAAkB,CAAA,GAClB,gBAAAK,EAAC,UAAD;AAAA,MAAQ,WAAU;AAAA,MAAU,aAAU;AAAA,IAAU,CAAA,CAChD,EAAA,CAAA,IACA,MACHoB,CACmB;AAAA,E;AAE1B;AAEA,SAASK,EAAW,EAClB,WAAAd,GACA,GAAGC,EAAA,GAC8C;AACjD,SACE,gBAAAZ,EAACb,EAAgB,YAAjB;AAAA,IACE,WAAWI,EACT,
|
|
1
|
+
{"version":3,"file":"context-menu.js","names":["BaseContextMenu","_Fragment","Separator","BaseSeparator","cn","resolveVariant","withMenuPendingRoot","MENU_ITEM_COLORS","MenuItemSpinner","MENU_POPUP","useAsyncMenuItem","MENU_ITEM","Fragment$1","jsx","jsxs","Separator","ContextMenu$1","Root","Trigger","Portal","Group","RadioGroup","SubmenuRoot","Positioner","className","props","Popup","Item","color","onClick","closeOnClick","loading","disabled","children","inert","blocked","handleClick","blinkProps","GroupLabel","Separator$1","SubmenuTrigger","ContextMenu"],"sources":["../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ElementType,\n type MouseEvent as ReactMouseEvent,\n} from \"react\";\nimport { ContextMenu as BaseContextMenu } from \"@base-ui/react/context-menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\nimport { resolveVariant } from \"../../utils/resolve-variant\";\nimport {\n MENU_POPUP,\n MENU_ITEM,\n MENU_ITEM_COLORS,\n type MenuItemColor,\n} from \"../menu/menu\";\nimport {\n MenuItemSpinner,\n useAsyncMenuItem,\n withMenuPendingRoot,\n type AsyncMenuItemClick,\n} from \"../menu/menu-pending\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\" | \"color\"\n> & {\n className?: string;\n};\n\ntype ContextMenuItemProps = Omit<\n StyledProps<typeof BaseContextMenu.Item>,\n \"onClick\"\n> & {\n /** Semantic ink. @default \"default\" */\n color?: MenuItemColor;\n /**\n * Action handler. Return a promise to keep the menu open while it runs —\n * same behavior as `Menu.Item`.\n */\n onClick?: AsyncMenuItemClick;\n /** Declarative loading state. @default false */\n loading?: boolean;\n};\n\nconst Root = withMenuPendingRoot(BaseContextMenu.Root);\nconst Trigger = BaseContextMenu.Trigger;\nconst Portal = BaseContextMenu.Portal;\nconst Group = BaseContextMenu.Group;\nconst RadioGroup = BaseContextMenu.RadioGroup;\n// Don't wrap SubmenuRoot — nested pending context would shadow the parent\n// Root and fail to lock dismissal for async items inside a submenu.\nconst SubmenuRoot = BaseContextMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Positioner>) {\n return (\n <BaseContextMenu.Positioner className={cn(\"z-50\", className)} {...props} />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Popup>) {\n return (\n <BaseContextMenu.Popup className={cn(MENU_POPUP, className)} {...props} />\n );\n}\n\nfunction Item({\n className,\n color = \"default\",\n onClick,\n closeOnClick = true,\n loading = false,\n disabled = false,\n children,\n ...props\n}: ContextMenuItemProps) {\n const { inert, blocked, handleClick, blinkProps } = useAsyncMenuItem({\n onClick,\n closeOnClick,\n loading,\n disabled,\n });\n\n return (\n <BaseContextMenu.Item\n className={cn(\n MENU_ITEM,\n resolveVariant(MENU_ITEM_COLORS, color),\n className,\n )}\n closeOnClick={closeOnClick}\n disabled={blocked}\n data-loading={inert || undefined}\n aria-busy={inert || undefined}\n {...blinkProps}\n onClick={handleClick as (event: ReactMouseEvent<HTMLElement>) => void}\n {...props}\n >\n {inert ? (\n <>\n <MenuItemSpinner />\n <output className=\"sr-only\" aria-live=\"polite\" />\n </>\n ) : null}\n {children}\n </BaseContextMenu.Item>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.GroupLabel>) {\n return (\n <BaseContextMenu.GroupLabel\n className={cn(\n \"text-pho-secondary font-heading px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1.5 my-1.5 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.SubmenuTrigger>) {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(\n MENU_ITEM,\n \"data-[popup-open]:bg-pho-ghost-hover\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Right-click (context) menu built on Base UI `ContextMenu`. `ContextMenu.Trigger`\n * wraps the area that opens the menu on right-click / long-press; the popup\n * shares its look with `Menu`. `ContextMenu.Item` has the same native promise\n * support as `Menu.Item`. Always mirror these actions somewhere visible —\n * a context menu must not be the only way to reach them.\n */\nexport const ContextMenu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n RadioGroup,\n};\n"],"mappings":";;;;;;;;AA6CA,IAAMiB,IAAOX,EAAoBN,EAAgB,IAAI,GAC/CkB,IAAUlB,EAAgB,SAC1BmB,IAASnB,EAAgB,QACzBoB,IAAQpB,EAAgB,OACxBqB,IAAarB,EAAgB,YAG7BsB,IAActB,EAAgB;AAEpC,SAASuB,EAAW,EAClB,WAAAC,GACA,GAAGC,EAAA,GAC8C;AACjD,SACE,gBAAAZ,EAACb,EAAgB,YAAjB;AAAA,IAA4B,WAAWI,EAAG,QAAQoB,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAASC,EAAM,EACb,WAAAF,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAZ,EAACb,EAAgB,OAAjB;AAAA,IAAuB,WAAWI,EAAGK,GAAYe,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE7E;AAEA,SAASE,EAAK,EACZ,WAAAH,GACA,OAAAI,IAAQ,WACR,SAAAC,GACA,cAAAC,IAAe,IACf,SAAAC,IAAU,IACV,UAAAC,IAAW,IACX,UAAAC,GACA,GAAGR,EAAA,GACoB;AACvB,QAAM,EAAE,OAAAS,GAAO,SAAAC,GAAS,aAAAC,GAAa,YAAAC,EAAA,IAAe3B,EAAiB;AAAA,IACnE,SAAAmB;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,EACF,CAAC;AAED,SACE,gBAAAlB,EAACd,EAAgB,MAAjB;AAAA,IACE,WAAWI,EACTO,GACAN,EAAeE,GAAkBqB,CAAK,GACtCJ,CACF;AAAA,IACc,cAAAM;AAAA,IACd,UAAUK;AAAA,IACV,gBAAcD,KAAS;AAAA,IACvB,aAAWA,KAAS;AAAA,IACpB,GAAIG;AAAA,IACJ,SAASD;AAAA,IACT,GAAIX;AAAA,IAZN,UAAA,CAcGS,IACC,gBAAApB,EAAAb,GAAA,EAAA,UAAA,CACE,gBAAAY,EAACL,GAAD,CAAkB,CAAA,GAClB,gBAAAK,EAAC,UAAD;AAAA,MAAQ,WAAU;AAAA,MAAU,aAAU;AAAA,IAAU,CAAA,CAChD,EAAA,CAAA,IACA,MACHoB,CACmB;AAAA,E;AAE1B;AAEA,SAASK,EAAW,EAClB,WAAAd,GACA,GAAGC,EAAA,GAC8C;AACjD,SACE,gBAAAZ,EAACb,EAAgB,YAAjB;AAAA,IACE,WAAWI,EACT,qEACAoB,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASvB,EAAU,EAAE,WAAAsB,GAAW,GAAGC,EAAA,GAA4C;AAC7E,SACE,gBAAAZ,EAACV,GAAD;AAAA,IACE,WAAWC,EACT,8DACAoB,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASe,EAAe,EACtB,WAAAhB,GACA,GAAGC,EAAA,GACkD;AACrD,SACE,gBAAAZ,EAACb,EAAgB,gBAAjB;AAAA,IACE,WAAWI,EACTO,GACA,wCACAa,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,IAAagB,IAAc;AAAA,EACzB,MAAAxB;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAI;AAAA,EACA,OAAAG;AAAA,EACA,MAAAC;AAAA,EACA,OAAAP;AAAA,EACA,YAAAkB;AAAA,EACA,WAAAC;AAAA,EACA,aAAAjB;AAAA,EACA,gBAAAkB;AAAA,EACA,YAAAnB;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, i as t, n as r, r as o, t as s } from "../chunks/data-table-
|
|
3
|
-
import { r as c } from "../chunks/chrome-
|
|
2
|
+
import { a as e, i as t, n as r, r as o, t as s } from "../chunks/data-table-C1tLUdw0.js";
|
|
3
|
+
import { r as c } from "../chunks/chrome-Dyvv0FVf.js";
|
|
4
4
|
import { t as T } from "../chunks/ghost-search-CMUI2UH0.js";
|
|
5
5
|
export {
|
|
6
6
|
c as DATA_TABLE_SURFACE,
|
|
@@ -22,13 +22,13 @@ function u({ className: t, ...r }) {
|
|
|
22
22
|
...r
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function d({ className: t, ...r }) {
|
|
26
26
|
return /* @__PURE__ */ o(a.Content, {
|
|
27
27
|
className: e("flex h-full flex-col", t),
|
|
28
28
|
...r
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function m({ className: t, ...r }) {
|
|
32
32
|
return /* @__PURE__ */ o(a.Title, {
|
|
33
33
|
className: e("text-pho-primary font-display text-display-sm font-medium text-balance", t),
|
|
34
34
|
...r
|
|
@@ -36,7 +36,7 @@ function d({ className: t, ...r }) {
|
|
|
36
36
|
}
|
|
37
37
|
function f({ className: t, ...r }) {
|
|
38
38
|
return /* @__PURE__ */ o(a.Description, {
|
|
39
|
-
className: e("text-pho-description text-display-xs
|
|
39
|
+
className: e("text-pho-description text-display-xs font-normal", t),
|
|
40
40
|
...r
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -47,8 +47,8 @@ var v = {
|
|
|
47
47
|
Backdrop: p,
|
|
48
48
|
Viewport: c,
|
|
49
49
|
Popup: u,
|
|
50
|
-
Content:
|
|
51
|
-
Title:
|
|
50
|
+
Content: d,
|
|
51
|
+
Title: m,
|
|
52
52
|
Description: f,
|
|
53
53
|
Close: l
|
|
54
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","names":["BaseDrawer","cn","jsx","Drawer$1","Root","Trigger","Portal","Close","Backdrop","className","props","Viewport","Popup","Content","Title","Description","Drawer"],"sources":["../../src/components/drawer/drawer.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Drawer as BaseDrawer } from \"@base-ui/react/drawer\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseDrawer.Root;\nconst Trigger = BaseDrawer.Trigger;\nconst Portal = BaseDrawer.Portal;\nconst Close = BaseDrawer.Close;\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Backdrop>) {\n return (\n <BaseDrawer.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-300 ease-out\",\n \"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Viewport>) {\n return (\n <BaseDrawer.Viewport\n className={cn(\n \"fixed inset-0 z-50 flex items-stretch justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDrawer.Popup>) {\n return (\n <BaseDrawer.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow; hairline edge is the\n // site card stroke (border-pho-secondary), not the interactive edge.\n \"border-pho-secondary bg-pho-primary shadow-pho-xl h-full w-[22rem] max-w-[calc(100vw-3rem)] overflow-y-auto overscroll-contain border-l p-6 outline-none\",\n \"[transform:translateX(var(--drawer-swipe-movement-x,0px))] transition-transform duration-300 ease-out\",\n \"data-[ending-style]:translate-x-full data-[starting-style]:translate-x-full data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Content>) {\n return (\n <BaseDrawer.Content\n className={cn(\"flex h-full flex-col\", className)}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDrawer.Title>) {\n return (\n <BaseDrawer.Title\n className={cn(\n \"text-pho-primary font-display text-display-sm font-medium text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Description>) {\n return (\n <BaseDrawer.Description\n className={cn(\n \"text-pho-description text-display-xs
|
|
1
|
+
{"version":3,"file":"drawer.js","names":["BaseDrawer","cn","jsx","Drawer$1","Root","Trigger","Portal","Close","Backdrop","className","props","Viewport","Popup","Content","Title","Description","Drawer"],"sources":["../../src/components/drawer/drawer.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Drawer as BaseDrawer } from \"@base-ui/react/drawer\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseDrawer.Root;\nconst Trigger = BaseDrawer.Trigger;\nconst Portal = BaseDrawer.Portal;\nconst Close = BaseDrawer.Close;\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Backdrop>) {\n return (\n <BaseDrawer.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-300 ease-out\",\n \"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Viewport>) {\n return (\n <BaseDrawer.Viewport\n className={cn(\n \"fixed inset-0 z-50 flex items-stretch justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDrawer.Popup>) {\n return (\n <BaseDrawer.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow; hairline edge is the\n // site card stroke (border-pho-secondary), not the interactive edge.\n \"border-pho-secondary bg-pho-primary shadow-pho-xl h-full w-[22rem] max-w-[calc(100vw-3rem)] overflow-y-auto overscroll-contain border-l p-6 outline-none\",\n \"[transform:translateX(var(--drawer-swipe-movement-x,0px))] transition-transform duration-300 ease-out\",\n \"data-[ending-style]:translate-x-full data-[starting-style]:translate-x-full data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Content>) {\n return (\n <BaseDrawer.Content\n className={cn(\"flex h-full flex-col\", className)}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDrawer.Title>) {\n return (\n <BaseDrawer.Title\n className={cn(\n \"text-pho-primary font-display text-display-sm font-medium text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Supporting copy flush under the title: no gap between the two. */\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Description>) {\n return (\n <BaseDrawer.Description\n className={cn(\n \"text-pho-description text-display-xs font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Drawer built on Base UI `Drawer` — a panel that slides in from the edge\n * (here, the right) with swipe-to-dismiss. Use it for secondary tasks and\n * navigation that should keep page context; for a decision or a centered modal\n * use `Dialog`. Compose `Drawer.Portal`\n * → `Backdrop` → `Viewport` → `Popup` → `Content`.\n */\nexport const Drawer = {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Viewport,\n Popup,\n Content,\n Title,\n Description,\n Close,\n};\n"],"mappings":";;;;;AAYA,IAAMI,IAAOJ,EAAW,MAClBK,IAAUL,EAAW,SACrBM,IAASN,EAAW,QACpBO,IAAQP,EAAW;AAEzB,SAASQ,EAAS,EAChB,WAAAC,GACA,GAAGC,EAAA,GACuC;AAC1C,SACE,gBAAAR,EAACF,EAAW,UAAZ;AAAA,IACE,WAAWC,EACT,8EACA,2FACAQ,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAS,EAChB,WAAAF,GACA,GAAGC,EAAA,GACuC;AAC1C,SACE,gBAAAR,EAACF,EAAW,UAAZ;AAAA,IACE,WAAWC,EACT,qDACAQ,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASE,EAAM,EAAE,WAAAH,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAR,EAACF,EAAW,OAAZ;AAAA,IACE,WAAWC,EAGT,4JACA,yGACA,yGACAQ,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASG,EAAQ,EACf,WAAAJ,GACA,GAAGC,EAAA,GACsC;AACzC,SACE,gBAAAR,EAACF,EAAW,SAAZ;AAAA,IACE,WAAWC,EAAG,wBAAwBQ,CAAS;AAAA,IAC/C,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASI,EAAM,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAA+C;AAC5E,SACE,gBAAAR,EAACF,EAAW,OAAZ;AAAA,IACE,WAAWC,EACT,0EACAQ,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAGA,SAASK,EAAY,EACnB,WAAAN,GACA,GAAGC,EAAA,GAC0C;AAC7C,SACE,gBAAAR,EAACF,EAAW,aAAZ;AAAA,IACE,WAAWC,EACT,oDACAQ,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,IAAaM,IAAS;AAAA,EACpB,MAAAZ;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAE;AAAA,EACA,UAAAG;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAR;AACF"}
|
package/dist/components/error.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as r, c as s, i as t, l as e, n as i, o, r as E, s as n, t as p, u as l } from "../chunks/error-
|
|
2
|
+
import { a as r, c as s, i as t, l as e, n as i, o, r as E, s as n, t as p, u as l } from "../chunks/error-BjSn7wLu.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Error,
|
|
5
5
|
i as ErrorView,
|
package/dist/components/field.js
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t } from "../chunks/cn-CPbhpG1q.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { Field as
|
|
6
|
-
function s({ className:
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
className: t("group/field flex flex-col gap-1.5",
|
|
4
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { Field as r } from "@base-ui/react/field";
|
|
6
|
+
function s({ className: i, ...e }) {
|
|
7
|
+
return /* @__PURE__ */ a(r.Root, {
|
|
8
|
+
className: t("group/field flex flex-col gap-1.5", "[&>[data-field-label]+[data-field-description]]:-mt-1.5", i),
|
|
9
9
|
...e
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function d({ className:
|
|
13
|
-
return /* @__PURE__ */ l(
|
|
14
|
-
|
|
12
|
+
function d({ className: i, required: e, children: o, ...n }) {
|
|
13
|
+
return /* @__PURE__ */ l(r.Label, {
|
|
14
|
+
"data-field-label": "",
|
|
15
|
+
className: t("text-pho-secondary font-heading cursor-default text-base font-medium", e && "flex items-center gap-0.5", i),
|
|
15
16
|
...n,
|
|
16
|
-
children: [
|
|
17
|
+
children: [o, e ? /* @__PURE__ */ a("span", {
|
|
17
18
|
className: "text-pho-brand",
|
|
18
19
|
"aria-hidden": "true",
|
|
19
20
|
children: "*"
|
|
20
21
|
}) : null]
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
function c({ className:
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
className: t("bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset", "focus-visible:ring-pho-brand focus-visible:ring-2", "data-[invalid]:ring-pho-error-subtle data-[invalid]:focus-visible:ring-pho-error data-[invalid]:ring-[1.5px] data-[invalid]:focus-visible:ring-2", "disabled:cursor-not-allowed disabled:opacity-50",
|
|
24
|
+
function c({ className: i, ...e }) {
|
|
25
|
+
return /* @__PURE__ */ a(r.Control, {
|
|
26
|
+
className: t("bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset", "focus-visible:ring-pho-brand focus-visible:ring-2", "data-[invalid]:ring-pho-error-subtle data-[invalid]:focus-visible:ring-pho-error data-[invalid]:ring-[1.5px] data-[invalid]:focus-visible:ring-2", "disabled:cursor-not-allowed disabled:opacity-50", i),
|
|
26
27
|
...e
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
|
-
function p({ className:
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
className: t("flex min-w-0 flex-col gap-3",
|
|
30
|
+
function p({ className: i, ...e }) {
|
|
31
|
+
return /* @__PURE__ */ a("div", {
|
|
32
|
+
className: t("flex min-w-0 flex-col gap-3", i),
|
|
32
33
|
...e
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
function u({ className:
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
function u({ className: i, ...e }) {
|
|
37
|
+
return /* @__PURE__ */ a(r.Description, {
|
|
38
|
+
"data-field-description": "",
|
|
39
|
+
className: t("text-pho-description text-base", i),
|
|
38
40
|
...e
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
className: t("text-pho-error text-base",
|
|
43
|
+
function f({ className: i, ...e }) {
|
|
44
|
+
return /* @__PURE__ */ a(r.Error, {
|
|
45
|
+
className: t("text-pho-error text-base", i),
|
|
44
46
|
...e
|
|
45
47
|
});
|
|
46
48
|
}
|
|
@@ -50,9 +52,9 @@ var g = {
|
|
|
50
52
|
Control: c,
|
|
51
53
|
Controls: p,
|
|
52
54
|
Description: u,
|
|
53
|
-
Error:
|
|
54
|
-
Item:
|
|
55
|
-
Validity:
|
|
55
|
+
Error: f,
|
|
56
|
+
Item: r.Item,
|
|
57
|
+
Validity: r.Validity
|
|
56
58
|
};
|
|
57
59
|
export {
|
|
58
60
|
g as Field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":["BaseField","jsx","jsxs","Field$1","Root","className","props","cn","Label","required","children","Control","Controls","Description","Error","Field"],"sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseField.Root>) {\n return (\n <BaseField.Root\n className={cn(\"group/field flex flex-col gap-1.5\"
|
|
1
|
+
{"version":3,"file":"field.js","names":["BaseField","jsx","jsxs","Field$1","Root","className","props","cn","Label","required","children","Control","Controls","Description","Error","Field"],"sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/**\n * The field's column: label, control and description 6px apart. A\n * description right under the label (above the control) is the label's\n * own and sits flush under it: `-mt-1.5` takes back the column's gap for\n * that pair. A title of the host's own standing in for `Label` (a `div`\n * over a group of controls) joins the pair with `data-field-label`.\n */\nfunction Root({ className, ...props }: StyledProps<typeof BaseField.Root>) {\n return (\n <BaseField.Root\n className={cn(\n \"group/field flex flex-col gap-1.5\",\n \"[&>[data-field-label]+[data-field-description]]:-mt-1.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * The field's label. `required` marks it the way `Input required` marks\n * its own: a brand-coloured star after the words. A form marks every\n * required field or none, so a field built from parts (a `Select`, a\n * `PhoneInput`, a pair of inputs under one label) takes `required` here to\n * match the `Input`s beside it.\n */\nfunction Label({\n className,\n required,\n children,\n ...props\n}: StyledProps<typeof BaseField.Label> & {\n /** Mark the field required: a star after the label's words. */\n required?: boolean;\n}) {\n return (\n <BaseField.Label\n data-field-label=\"\"\n className={cn(\n \"text-pho-secondary font-heading cursor-default text-base font-medium\",\n required && \"flex items-center gap-0.5\",\n className,\n )}\n {...props}\n >\n {children}\n {/* The star is for the eye; the control carries the required state. */}\n {required ? (\n <span className=\"text-pho-brand\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </BaseField.Label>\n );\n}\n\nfunction Control({\n className,\n ...props\n}: StyledProps<typeof BaseField.Control>) {\n return (\n <BaseField.Control\n className={cn(\n // Flat field surface — hairline ring carries the edge (site has no\n // resting shadows outside floating layers).\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder text-md rounded-base w-full px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset\",\n \"focus-visible:ring-pho-brand focus-visible:ring-2\",\n // Invalid is mid-weight: thicker than the 1px rest hairline, thinner\n // than the 2px focus ring. Rest uses the subtle error ink; focus\n // steps up to the solid error.\n \"data-[invalid]:ring-pho-error-subtle data-[invalid]:focus-visible:ring-pho-error data-[invalid]:ring-[1.5px] data-[invalid]:focus-visible:ring-2\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Several controls under one label: the lines of an address, first and\n * last name, the parts of a date. Stacks them at the gap the system uses\n * between the parts of one thing (12px), so the field's own 6px stays\n * between the label, the controls and the description. Put an `Inline`\n * inside for a side-by-side row.\n */\nfunction Controls({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div className={cn(\"flex min-w-0 flex-col gap-3\", className)} {...props} />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseField.Description>) {\n return (\n <BaseField.Description\n data-field-description=\"\"\n className={cn(\"text-pho-description text-base\", className)}\n {...props}\n />\n );\n}\n\nfunction Error({ className, ...props }: StyledProps<typeof BaseField.Error>) {\n return (\n <BaseField.Error\n className={cn(\"text-pho-error text-base\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Form field built on Base UI `Field`. Wires a label, description, and\n * validation error to a control for you — compose it around `Field.Control`\n * (or any control via `render`). `Field.Error` shows when the control is\n * invalid; `Field.Validity` exposes raw validity for custom messages.\n * `Field.Controls` stacks several controls under one label.\n */\nexport const Field = {\n Root,\n Label,\n Control,\n Controls,\n Description,\n Error,\n Item: BaseField.Item,\n Validity: BaseField.Validity,\n};\n"],"mappings":";;;;;AAmBA,SAASI,EAAK,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAA6C;AACzE,SACE,gBAAAL,EAACD,EAAU,MAAX;AAAA,IACE,WAAWO,EACT,qCACA,2DACAF,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,SAASE,EAAM,EACb,WAAAH,GACA,UAAAI,GACA,UAAAC,GACA,GAAGJ,EAAA,GAIF;AACD,SACE,gBAAAJ,EAACF,EAAU,OAAX;AAAA,IACE,oBAAiB;AAAA,IACjB,WAAWO,EACT,wEACAE,KAAY,6BACZJ,CACF;AAAA,IACA,GAAIC;AAAA,IAPN,UAAA,CASGI,GAEAD,IACC,gBAAAR,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,MAAiB,eAAY;AAAA,MAAO,UAAA;AAAA,IAE9C,CAAA,IACJ,IACW;AAAA,E;AAErB;AAEA,SAASU,EAAQ,EACf,WAAAN,GACA,GAAGC,EAAA,GACqC;AACxC,SACE,gBAAAL,EAACD,EAAU,SAAX;AAAA,IACE,WAAWO,EAGT,qMACA,qDAIA,oJACA,mDACAF,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,SAASM,EAAS,EAAE,WAAAP,GAAW,GAAGC,EAAA,GAAgC;AAChE,SACE,gBAAAL,EAAC,OAAD;AAAA,IAAK,WAAWM,EAAG,+BAA+BF,CAAS;AAAA,IAAG,GAAIC;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAASO,EAAY,EACnB,WAAAR,GACA,GAAGC,EAAA,GACyC;AAC5C,SACE,gBAAAL,EAACD,EAAU,aAAX;AAAA,IACE,0BAAuB;AAAA,IACvB,WAAWO,EAAG,kCAAkCF,CAAS;AAAA,IACzD,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASQ,EAAM,EAAE,WAAAT,GAAW,GAAGC,EAAA,GAA8C;AAC3E,SACE,gBAAAL,EAACD,EAAU,OAAX;AAAA,IACE,WAAWO,EAAG,4BAA4BF,CAAS;AAAA,IACnD,GAAIC;AAAA,EACL,CAAA;AAEL;AASA,IAAaS,IAAQ;AAAA,EACnB,MAAAX;AAAA,EACA,OAAAI;AAAA,EACA,SAAAG;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAMd,EAAU;AAAA,EAChB,UAAUA,EAAU;AACtB"}
|
|
@@ -3,21 +3,21 @@ import { t as o } from "../chunks/cn-CPbhpG1q.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import { Fieldset as i } from "@base-ui/react/fieldset";
|
|
6
|
-
function
|
|
6
|
+
function n({ className: e, ...t }) {
|
|
7
7
|
return /* @__PURE__ */ r(i.Root, {
|
|
8
8
|
className: o("flex flex-col gap-4", e),
|
|
9
9
|
...t
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function m({ className: e, ...t }) {
|
|
13
13
|
return /* @__PURE__ */ r(i.Legend, {
|
|
14
|
-
className: o("text-pho-primary text-base font-medium", e),
|
|
14
|
+
className: o("text-pho-primary font-heading text-base font-medium", e),
|
|
15
15
|
...t
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
var p = {
|
|
19
|
-
Root:
|
|
20
|
-
Legend:
|
|
19
|
+
Root: n,
|
|
20
|
+
Legend: m
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
23
|
p as Fieldset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset.js","names":["BaseFieldset","cn","jsx","Fieldset$1","Root","className","props","Legend","Fieldset"],"sources":["../../src/components/fieldset/fieldset.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Fieldset as BaseFieldset } from \"@base-ui/react/fieldset\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseFieldset.Root>) {\n return (\n <BaseFieldset.Root\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n );\n}\n\nfunction Legend({\n className,\n ...props\n}: StyledProps<typeof BaseFieldset.Legend>) {\n return (\n <BaseFieldset.Legend\n className={cn(\"text-pho-primary text-base font-medium\"
|
|
1
|
+
{"version":3,"file":"fieldset.js","names":["BaseFieldset","cn","jsx","Fieldset$1","Root","className","props","Legend","Fieldset"],"sources":["../../src/components/fieldset/fieldset.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Fieldset as BaseFieldset } from \"@base-ui/react/fieldset\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseFieldset.Root>) {\n return (\n <BaseFieldset.Root\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n );\n}\n\nfunction Legend({\n className,\n ...props\n}: StyledProps<typeof BaseFieldset.Legend>) {\n return (\n <BaseFieldset.Legend\n className={cn(\n \"text-pho-primary font-heading text-base font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Groups related fields under a shared legend, built on Base UI `Fieldset`.\n * Use it to title a cluster of inputs (e.g. \"Billing address\") so the grouping\n * is announced to assistive tech.\n */\nexport const Fieldset = { Root, Legend };\n"],"mappings":";;;;;AAYA,SAASI,EAAK,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAgD;AAC5E,SACE,gBAAAJ,EAACF,EAAa,MAAd;AAAA,IACE,WAAWC,EAAG,uBAAuBI,CAAS;AAAA,IAC9C,GAAIC;AAAA,EACL,CAAA;AAEL;AAEA,SAASC,EAAO,EACd,WAAAF,GACA,GAAGC,EAAA,GACuC;AAC1C,SACE,gBAAAJ,EAACF,EAAa,QAAd;AAAA,IACE,WAAWC,EACT,uDACAI,CACF;AAAA,IACA,GAAIC;AAAA,EACL,CAAA;AAEL;AAOA,IAAaE,IAAW;AAAA,EAAE,MAAAJ;AAAA,EAAM,QAAAG;AAAO"}
|
package/dist/components/menu.js
CHANGED
package/dist/components/meter.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as o } from "../chunks/cn-CPbhpG1q.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import { Meter as a } from "@base-ui/react/meter";
|
|
6
6
|
function n({ className: e, ...t }) {
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
className:
|
|
7
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
8
|
+
className: o("flex w-full flex-col gap-2", e),
|
|
9
9
|
...t
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
function l({ className: e, ...t }) {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
className:
|
|
13
|
+
return /* @__PURE__ */ r(a.Label, {
|
|
14
|
+
className: o("text-pho-secondary font-heading text-base font-medium", e),
|
|
15
15
|
...t
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function u({ className: e, ...t }) {
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
19
|
+
return /* @__PURE__ */ r(a.Value, {
|
|
20
|
+
className: o("text-pho-secondary text-base tabular-nums", e),
|
|
21
21
|
...t
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
function s({ className: e, ...t }) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
25
|
+
return /* @__PURE__ */ r(a.Track, {
|
|
26
|
+
className: o("bg-pho-secondary relative h-2 w-full overflow-hidden rounded-full", e),
|
|
27
27
|
...t
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function c({ className: e, ...t }) {
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
className:
|
|
31
|
+
return /* @__PURE__ */ r(a.Indicator, {
|
|
32
|
+
className: o("bg-pho-brand-solid h-full rounded-full transition-all duration-200 ease-out", e),
|
|
33
33
|
...t
|
|
34
34
|
});
|
|
35
35
|
}
|