@photon-ai/pho-ui 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/chunks/animated-height-zr7BmFY1.js +56 -0
  2. package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -0
  3. package/dist/chunks/basic-page-CJ11ekjH.js +2217 -0
  4. package/dist/chunks/basic-page-CJ11ekjH.js.map +1 -0
  5. package/dist/chunks/{chat-B0WIgEyM.js → chat-CU3XVm99.js} +2 -2
  6. package/dist/chunks/{chat-B0WIgEyM.js.map → chat-CU3XVm99.js.map} +1 -1
  7. package/dist/chunks/{checkbox-CLPmblNA.js → checkbox-CwvoEJhd.js} +2 -2
  8. package/dist/chunks/{checkbox-CLPmblNA.js.map → checkbox-CwvoEJhd.js.map} +1 -1
  9. package/dist/chunks/choice-card-_Ocs0iUj.js +17 -0
  10. package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -0
  11. package/dist/chunks/{command-iYvU6Mhf.js → command-D5g49VqR.js} +3 -3
  12. package/dist/chunks/{command-iYvU6Mhf.js.map → command-D5g49VqR.js.map} +1 -1
  13. package/dist/chunks/{data-table-B1dmrN6r.js → data-table-Ce_c6T73.js} +3 -3
  14. package/dist/chunks/{data-table-B1dmrN6r.js.map → data-table-Ce_c6T73.js.map} +1 -1
  15. package/dist/chunks/{dialog-MPvem7yV.js → dialog-ChS0tdHa.js} +120 -116
  16. package/dist/chunks/dialog-ChS0tdHa.js.map +1 -0
  17. package/dist/chunks/{filter-bar-B-oYYBsU.js → filter-bar-CMkvhvgL.js} +2 -2
  18. package/dist/chunks/{filter-bar-B-oYYBsU.js.map → filter-bar-CMkvhvgL.js.map} +1 -1
  19. package/dist/chunks/{input-DjvZoF8v.js → input-fFWvPJOf.js} +2 -1
  20. package/dist/chunks/{input-DjvZoF8v.js.map → input-fFWvPJOf.js.map} +1 -1
  21. package/dist/components/chat.js +1 -1
  22. package/dist/components/checkbox.js +1 -1
  23. package/dist/components/command.js +1 -1
  24. package/dist/components/data-table.js +1 -1
  25. package/dist/components/dialog.js +1 -1
  26. package/dist/components/field.js +34 -29
  27. package/dist/components/field.js.map +1 -1
  28. package/dist/components/filter-bar.js +1 -1
  29. package/dist/components/input.js +1 -1
  30. package/dist/components/radio-group.js +64 -59
  31. package/dist/components/radio-group.js.map +1 -1
  32. package/dist/index.js +6 -6
  33. package/dist/sections/basic-page.js +2 -2
  34. package/dist/src/components/dialog/dialog.d.ts +9 -1
  35. package/dist/src/components/field/field.d.ts +11 -1
  36. package/dist/src/components/radio-group/radio-card.d.ts +11 -4
  37. package/dist/src/sections/basic-page/basic-page.d.ts +145 -15
  38. package/dist/src/sections/basic-page/index.d.ts +1 -1
  39. package/dist/src/utils/animated-height.d.ts +16 -7
  40. package/dist/src/utils/choice-card.d.ts +8 -1
  41. package/package.json +1 -1
  42. package/dist/chunks/animated-height-I44sUq0n.js +0 -48
  43. package/dist/chunks/animated-height-I44sUq0n.js.map +0 -1
  44. package/dist/chunks/basic-page-B5FsORRi.js +0 -1885
  45. package/dist/chunks/basic-page-B5FsORRi.js.map +0 -1
  46. package/dist/chunks/choice-card-BVNP1NB6.js +0 -17
  47. package/dist/chunks/choice-card-BVNP1NB6.js.map +0 -1
  48. package/dist/chunks/dialog-MPvem7yV.js.map +0 -1
@@ -1,99 +1,104 @@
1
1
  "use client";
2
- import { t as d } from "../chunks/cn-ChIgwEl3.js";
3
- import { r as m } from "../chunks/use-press-pulse-IbNstUT0.js";
4
- import { a as g, n as C, r as x, t as R } from "../chunks/choice-card-BVNP1NB6.js";
5
- import { createContext as v, useContext as N } from "react";
6
- import { jsx as o, jsxs as h } from "react/jsx-runtime";
7
- import { motion as l } from "motion/react";
8
- import { Radio as c } from "@base-ui/react/radio";
9
- import { RadioGroup as y } from "@base-ui/react/radio-group";
10
- var f = v(!1);
11
- function b() {
12
- return N(f);
2
+ import { t as l } from "../chunks/cn-ChIgwEl3.js";
3
+ import { r as g } from "../chunks/use-press-pulse-IbNstUT0.js";
4
+ import { a as f, n as C, r as v, t as R } from "../chunks/choice-card-_Ocs0iUj.js";
5
+ import { createContext as N, useContext as y } from "react";
6
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
7
+ import { motion as c } from "motion/react";
8
+ import { Radio as p } from "@base-ui/react/radio";
9
+ import { RadioGroup as k } from "@base-ui/react/radio-group";
10
+ var b = N(!1);
11
+ function x() {
12
+ return y(b);
13
13
  }
14
- function k({ className: e, disabled: r, ...a }) {
15
- return /* @__PURE__ */ o(f.Provider, {
16
- value: !!r,
17
- children: /* @__PURE__ */ o(y, {
18
- disabled: r,
19
- className: d("flex flex-col gap-3", e),
14
+ function I({ className: r, disabled: e, ...a }) {
15
+ return /* @__PURE__ */ o(b.Provider, {
16
+ value: !!e,
17
+ children: /* @__PURE__ */ o(k, {
18
+ disabled: e,
19
+ className: l("flex flex-col gap-3", r),
20
20
  ...a
21
21
  })
22
22
  });
23
23
  }
24
- k.displayName = "RadioGroup";
25
- function I({ className: e, label: r, disabled: a, ...i }) {
26
- const s = b(), { motionProps: p } = m({
24
+ I.displayName = "RadioGroup";
25
+ function _({ className: r, label: e, disabled: a, ...i }) {
26
+ const n = x(), { motionProps: s } = g({
27
27
  scale: 0.94,
28
- disabled: !!(a || s)
29
- }), { onPointerDown: t, ...u } = p, n = /* @__PURE__ */ o(c.Root, {
28
+ disabled: !!(a || n)
29
+ }), { onPointerDown: t, ...u } = s, d = /* @__PURE__ */ o(p.Root, {
30
30
  disabled: a,
31
- render: /* @__PURE__ */ o(l.span, {
31
+ render: /* @__PURE__ */ o(c.span, {
32
32
  ...u,
33
- onPointerDown: r ? void 0 : t
33
+ onPointerDown: e ? void 0 : t
34
34
  }),
35
- className: d("outline-pho-brand bg-pho-primary ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 ring-inset focus-visible:outline-2 focus-visible:outline-offset-2", "transition-[background-color,box-shadow,color,outline-color] duration-150 ease-out", "hover:bg-pho-primary-hover hover:ring-pho-ink group-hover:bg-pho-primary-hover group-hover:ring-pho-ink", "data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent", "data-[checked]:hover:bg-pho-brand-solid-hover data-[checked]:group-hover:bg-pho-brand-solid-hover", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", e),
35
+ className: l("outline-pho-brand bg-pho-primary ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 ring-inset focus-visible:outline-2 focus-visible:outline-offset-2", "transition-[background-color,box-shadow,color,outline-color] duration-150 ease-out", "hover:bg-pho-primary-hover hover:ring-pho-ink group-hover:bg-pho-primary-hover group-hover:ring-pho-ink", "data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent", "data-[checked]:hover:bg-pho-brand-solid-hover data-[checked]:group-hover:bg-pho-brand-solid-hover", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", r),
36
36
  ...i,
37
- children: /* @__PURE__ */ o(c.Indicator, {
38
- render: /* @__PURE__ */ o(l.span, {
37
+ children: /* @__PURE__ */ o(p.Indicator, {
38
+ render: /* @__PURE__ */ o(c.span, {
39
39
  initial: { scale: 0 },
40
40
  animate: { scale: 1 },
41
- transition: g
41
+ transition: f
42
42
  }),
43
43
  className: "bg-pho-on-brand size-2 rounded-full"
44
44
  })
45
45
  });
46
- return r ? /* @__PURE__ */ h("label", {
46
+ return e ? /* @__PURE__ */ m("label", {
47
47
  className: "group flex cursor-pointer items-center gap-2 select-none",
48
48
  onPointerDown: t,
49
- children: [n, /* @__PURE__ */ o("span", {
49
+ children: [d, /* @__PURE__ */ o("span", {
50
50
  className: "text-pho-secondary text-base",
51
- children: r
51
+ children: e
52
52
  })]
53
- }) : n;
53
+ }) : d;
54
54
  }
55
- I.displayName = "Radio";
56
- function _({ title: e, description: r }) {
57
- return /* @__PURE__ */ h("span", {
55
+ _.displayName = "Radio";
56
+ function P({ title: r, description: e }) {
57
+ return /* @__PURE__ */ m("span", {
58
58
  className: "flex min-w-0 flex-1 flex-col",
59
59
  children: [/* @__PURE__ */ o("span", {
60
60
  className: "text-pho-primary block font-medium",
61
- children: e
62
- }), r ? /* @__PURE__ */ o("span", {
63
- className: "text-pho-description block",
64
61
  children: r
62
+ }), e ? /* @__PURE__ */ o("span", {
63
+ className: "text-pho-description block",
64
+ children: e
65
65
  }) : null]
66
66
  });
67
67
  }
68
- function P({ className: e, title: r, description: a, icon: i, disabled: s, ...p }) {
69
- const t = b(), { motionProps: u } = m({
68
+ function D({ className: r, title: e, description: a, icon: i, trailing: n, disabled: s, ...t }) {
69
+ const u = x(), { motionProps: d } = g({
70
70
  scale: C,
71
- disabled: !!(s || t),
72
- transition: x
73
- }), n = i != null;
74
- return /* @__PURE__ */ h(c.Root, {
71
+ disabled: !!(s || u),
72
+ transition: v
73
+ }), h = i != null;
74
+ return /* @__PURE__ */ m(p.Root, {
75
75
  disabled: s,
76
- render: /* @__PURE__ */ o(l.span, { ...u }),
77
- className: d(R, n && "flex-col gap-1.5", e),
78
- ...p,
76
+ render: /* @__PURE__ */ o(c.span, { ...d }),
77
+ className: l(R, h && "flex-col gap-1.5", r),
78
+ ...t,
79
79
  children: [
80
- n ? /* @__PURE__ */ o("span", {
80
+ h ? /* @__PURE__ */ o("span", {
81
81
  "aria-hidden": !0,
82
82
  className: "text-pho-secondary flex size-6 shrink-0 items-center justify-center [&>svg]:size-6",
83
83
  children: i
84
84
  }) : null,
85
- /* @__PURE__ */ o(_, {
86
- title: r,
85
+ /* @__PURE__ */ o(P, {
86
+ title: e,
87
87
  description: a
88
88
  }),
89
- n ? null : /* @__PURE__ */ o("span", {
89
+ h ? null : n != null && n !== !1 ? /* @__PURE__ */ o("span", {
90
+ "aria-hidden": !0,
91
+ "data-radio-card-trailing": "",
92
+ className: "text-pho-secondary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
93
+ children: n
94
+ }) : /* @__PURE__ */ o("span", {
90
95
  "aria-hidden": !0,
91
- className: d("bg-pho-primary ring-pho-primary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ring-1 ring-inset", "group-hover:bg-pho-primary-hover group-hover:ring-pho-ink transition-[background-color,box-shadow] duration-150 ease-out", "group-data-[checked]:bg-pho-brand-solid group-data-[checked]:group-hover:bg-pho-brand-solid-hover group-data-[checked]:ring-transparent"),
92
- children: /* @__PURE__ */ o(c.Indicator, {
93
- render: /* @__PURE__ */ o(l.span, {
96
+ className: l("bg-pho-primary ring-pho-primary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ring-1 ring-inset", "group-hover:bg-pho-primary-hover group-hover:ring-pho-ink transition-[background-color,box-shadow] duration-150 ease-out", "group-data-[checked]:bg-pho-brand-solid group-data-[checked]:group-hover:bg-pho-brand-solid-hover group-data-[checked]:ring-transparent"),
97
+ children: /* @__PURE__ */ o(p.Indicator, {
98
+ render: /* @__PURE__ */ o(c.span, {
94
99
  initial: { scale: 0 },
95
100
  animate: { scale: 1 },
96
- transition: g
101
+ transition: f
97
102
  }),
98
103
  className: "bg-pho-on-brand size-1.5 rounded-full"
99
104
  })
@@ -101,11 +106,11 @@ function P({ className: e, title: r, description: a, icon: i, disabled: s, ...p
101
106
  ]
102
107
  });
103
108
  }
104
- P.displayName = "RadioCard";
109
+ D.displayName = "RadioCard";
105
110
  export {
106
- I as Radio,
107
- P as RadioCard,
108
- k as RadioGroup
111
+ _ as Radio,
112
+ D as RadioCard,
113
+ I as RadioGroup
109
114
  };
110
115
 
111
116
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":[],"sources":["../../src/components/radio-group/radio-group.tsx","../../src/components/radio-group/radio-card.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\nimport { CHOICE_INDICATOR_POP_TRANSITION } from \"../../utils/choice-card\";\n\nexport interface RadioGroupProps extends Omit<\n ComponentProps<typeof BaseRadioGroup>,\n \"className\"\n> {\n className?: string;\n}\n\nconst RadioGroupDisabledContext = createContext(false);\n\n/** Group-level `disabled`, so press pulse skips when the group is locked. */\nexport function useRadioGroupDisabled() {\n return useContext(RadioGroupDisabledContext);\n}\n\n/**\n * Single-choice group built on Base UI `RadioGroup`. Holds `Radio` items;\n * exactly one may be selected. Control with `value` / `onValueChange` or leave\n * uncontrolled with `defaultValue`.\n */\nexport function RadioGroup({ className, disabled, ...props }: RadioGroupProps) {\n return (\n <RadioGroupDisabledContext.Provider value={Boolean(disabled)}>\n <BaseRadioGroup\n disabled={disabled}\n className={cn(\"flex flex-col gap-3\", className)}\n {...props}\n />\n </RadioGroupDisabledContext.Provider>\n );\n}\n\nRadioGroup.displayName = \"RadioGroup\";\n\nexport interface RadioProps extends Omit<\n ComponentProps<typeof BaseRadio.Root>,\n \"className\"\n> {\n className?: string;\n /** Text rendered beside the dot; the whole row selects this option. */\n label?: ReactNode;\n}\n\n/**\n * A single option within a `RadioGroup`. Requires a `value`; pass `label` for a\n * clickable text row or provide an `aria-label`.\n */\nexport function Radio({ className, label, disabled, ...props }: RadioProps) {\n const groupDisabled = useRadioGroupDisabled();\n const { motionProps } = usePressPulse({\n scale: 0.94,\n disabled: Boolean(disabled || groupDisabled),\n });\n // With a label, the whole row is the hit target — press-trigger from there\n // (pointerdown bubbles up from the label text too) so the dot still\n // animates when the text, not the dot itself, is what's clicked.\n const { onPointerDown, ...dotMotionProps } = motionProps;\n\n const dot = (\n <BaseRadio.Root\n disabled={disabled}\n render={\n <motion.span\n {...dotMotionProps}\n onPointerDown={label ? undefined : onPointerDown}\n />\n }\n className={cn(\n \"outline-pho-brand bg-pho-primary ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 ring-inset focus-visible:outline-2 focus-visible:outline-offset-2\",\n // Transform stays out — Motion owns the press pulse.\n \"transition-[background-color,box-shadow,color,outline-color] duration-150 ease-out\",\n // group-hover covers hovering the label text, not just the dot itself.\n \"hover:bg-pho-primary-hover hover:ring-pho-ink group-hover:bg-pho-primary-hover group-hover:ring-pho-ink\",\n \"data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent\",\n \"data-[checked]:hover:bg-pho-brand-solid-hover data-[checked]:group-hover:bg-pho-brand-solid-hover\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n {/* The indicator only renders when checked, i.e. always on brand-solid —\n on-brand (light-dark(#fff,#000)) keeps the dot visible in dark mode,\n where brand-solid is white. Pops in rather than appearing flat. */}\n <BaseRadio.Indicator\n render={\n <motion.span\n initial={{ scale: 0 }}\n animate={{ scale: 1 }}\n transition={CHOICE_INDICATOR_POP_TRANSITION}\n />\n }\n className=\"bg-pho-on-brand size-2 rounded-full\"\n />\n </BaseRadio.Root>\n );\n\n if (!label) return dot;\n return (\n <label\n className=\"group flex cursor-pointer items-center gap-2 select-none\"\n onPointerDown={onPointerDown}\n >\n {dot}\n <span className=\"text-pho-secondary text-base\">{label}</span>\n </label>\n );\n}\n\nRadio.displayName = \"Radio\";\n","import { type ComponentProps, type ReactNode } from \"react\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\nimport {\n CHOICE_CARD_BASE,\n CHOICE_CARD_WITH_ICON,\n CHOICE_CARD_PRESS_SCALE,\n CHOICE_CARD_PRESS_TRANSITION,\n CHOICE_INDICATOR_POP_TRANSITION,\n} from \"../../utils/choice-card\";\nimport { useRadioGroupDisabled } from \"./radio-group\";\n\nexport interface RadioCardProps extends Omit<\n ComponentProps<typeof BaseRadio.Root>,\n \"className\" | \"title\"\n> {\n className?: string;\n /** Tile heading. */\n title: ReactNode;\n /** Supporting copy shown below the title. */\n description?: ReactNode;\n /** Glyph stacked above the title. When set, it replaces the radio dot. */\n icon?: ReactNode;\n}\n\nfunction CardCopy({\n title,\n description,\n}: {\n title: ReactNode;\n description?: ReactNode;\n}) {\n return (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-pho-primary block font-medium\">{title}</span>\n {description ? (\n <span className=\"text-pho-description block\">{description}</span>\n ) : null}\n </span>\n );\n}\n\n/**\n * A `Radio` styled as a bordered, selectable tile — title, optional\n * description, and either a stacked icon above them or the radio dot at\n * the end of the title row. The tile *is* the radio (see `usePressPulse`);\n * an inner glyph is decorative.\n */\nexport function RadioCard({\n className,\n title,\n description,\n icon,\n disabled,\n ...props\n}: RadioCardProps) {\n const groupDisabled = useRadioGroupDisabled();\n const { motionProps } = usePressPulse({\n scale: CHOICE_CARD_PRESS_SCALE,\n disabled: Boolean(disabled || groupDisabled),\n transition: CHOICE_CARD_PRESS_TRANSITION,\n });\n const hasIcon = icon != null;\n\n return (\n <BaseRadio.Root\n disabled={disabled}\n render={<motion.span {...motionProps} />}\n className={cn(\n CHOICE_CARD_BASE,\n hasIcon && CHOICE_CARD_WITH_ICON,\n className,\n )}\n {...props}\n >\n {hasIcon ? (\n <span\n aria-hidden\n className=\"text-pho-secondary flex size-6 shrink-0 items-center justify-center [&>svg]:size-6\"\n >\n {icon}\n </span>\n ) : null}\n <CardCopy title={title} description={description} />\n {/* The dot sits at the end of the title row, centered on the title's\n line; the same half step from the right edge keeps it square in\n the corner. */}\n {hasIcon ? null : (\n <span\n aria-hidden\n className={cn(\n \"bg-pho-primary ring-pho-primary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ring-1 ring-inset\",\n \"group-hover:bg-pho-primary-hover group-hover:ring-pho-ink transition-[background-color,box-shadow] duration-150 ease-out\",\n \"group-data-[checked]:bg-pho-brand-solid group-data-[checked]:group-hover:bg-pho-brand-solid-hover group-data-[checked]:ring-transparent\",\n )}\n >\n <BaseRadio.Indicator\n render={\n <motion.span\n initial={{ scale: 0 }}\n animate={{ scale: 1 }}\n transition={CHOICE_INDICATOR_POP_TRANSITION}\n />\n }\n className=\"bg-pho-on-brand size-1.5 rounded-full\"\n />\n </span>\n )}\n </BaseRadio.Root>\n );\n}\n\nRadioCard.displayName = \"RadioCard\";\n"],"mappings":";;;;;;;;;AAoBA,IAAM,IAA4B,EAAc,EAAK;AAGrD,SAAgB,IAAwB;AACtC,SAAO,EAAW,CAAyB;AAC7C;AAOA,SAAgB,EAAW,EAAE,WAAA,GAAW,UAAA,GAAU,GAAG,EAAA,GAA0B;AAC7E,SACE,gBAAA,EAAC,EAA0B,UAA3B;AAAA,IAAoC,OAAO,EAAQ;AAAA,IACjD,UAAA,gBAAA,EAAC,GAAD;AAAA,MACY,UAAA;AAAA,MACV,WAAW,EAAG,uBAAuB,CAAS;AAAA,MAC9C,GAAI;AAAA,IACL,CAAA;AAAA,EACiC,CAAA;AAExC;AAEA,EAAW,cAAc;AAezB,SAAgB,EAAM,EAAE,WAAA,GAAW,OAAA,GAAO,UAAA,GAAU,GAAG,EAAA,GAAqB;AAC1E,QAAM,IAAgB,EAAsB,GACtC,EAAE,aAAA,EAAA,IAAgB,EAAc;AAAA,IACpC,OAAO;AAAA,IACP,UAAU,GAAQ,KAAY;AAAA,EAChC,CAAC,GAIK,EAAE,eAAA,GAAe,GAAG,EAAA,IAAmB,GAEvC,IACJ,gBAAA,EAAC,EAAU,MAAX;AAAA,IACY,UAAA;AAAA,IACV,QACE,gBAAA,EAAC,EAAO,MAAR;AAAA,MACE,GAAI;AAAA,MACJ,eAAe,IAAQ,SAAY;AAAA,IACpC,CAAA;AAAA,IAEH,WAAW,EACT,2MAEA,sFAEA,2GACA,qEACA,qGACA,iEACA,CACF;AAAA,IACA,GAAI;AAAA,IAKJ,UAAA,gBAAA,EAAC,EAAU,WAAX;AAAA,MACE,QACE,gBA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A,WAAU;AAAA,QAET,UAAA;AAAA,MACG,CAAA,IACJ;AAAA,MACJ,gBAAA,EAAC,GAAD;AAAA,QAAiB,OAAA;AAAA,QAAoB,aAAA;AAAA,MAAc,CAAA;AAAA,MAIlD,IAAU,OACT,gBAAA,EAAC,QAAD;AAAA,QACE,eAAA;AAAA,QACA,WAAW,EACT,iIACA,4HACA,yIACF;AAAA,QAEA,UAAA,gBAAA,EAAC,EAAU,WAAX;AAAA,UACE,QACE,gBAAA,EAAC,EAAO,MAAR;AAAA,YACE,SAAS,EAAE,OAAO,EAAE;AAAA,YACpB,SAAS,EAAE,OAAO,EAAE;AAAA,YACpB,YAAY;AAAA,UACb,CAAA;AAAA,UAEH,WAAU;AAAA,QACX,CAAA;AAAA,MACG,CAAA;AAAA,IAEM;AAAA;AAEpB;AAEA,EAAU,cAAc"}
1
+ {"version":3,"file":"radio-group.js","names":[],"sources":["../../src/components/radio-group/radio-group.tsx","../../src/components/radio-group/radio-card.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\nimport { CHOICE_INDICATOR_POP_TRANSITION } from \"../../utils/choice-card\";\n\nexport interface RadioGroupProps extends Omit<\n ComponentProps<typeof BaseRadioGroup>,\n \"className\"\n> {\n className?: string;\n}\n\nconst RadioGroupDisabledContext = createContext(false);\n\n/** Group-level `disabled`, so press pulse skips when the group is locked. */\nexport function useRadioGroupDisabled() {\n return useContext(RadioGroupDisabledContext);\n}\n\n/**\n * Single-choice group built on Base UI `RadioGroup`. Holds `Radio` items;\n * exactly one may be selected. Control with `value` / `onValueChange` or leave\n * uncontrolled with `defaultValue`.\n */\nexport function RadioGroup({ className, disabled, ...props }: RadioGroupProps) {\n return (\n <RadioGroupDisabledContext.Provider value={Boolean(disabled)}>\n <BaseRadioGroup\n disabled={disabled}\n className={cn(\"flex flex-col gap-3\", className)}\n {...props}\n />\n </RadioGroupDisabledContext.Provider>\n );\n}\n\nRadioGroup.displayName = \"RadioGroup\";\n\nexport interface RadioProps extends Omit<\n ComponentProps<typeof BaseRadio.Root>,\n \"className\"\n> {\n className?: string;\n /** Text rendered beside the dot; the whole row selects this option. */\n label?: ReactNode;\n}\n\n/**\n * A single option within a `RadioGroup`. Requires a `value`; pass `label` for a\n * clickable text row or provide an `aria-label`.\n */\nexport function Radio({ className, label, disabled, ...props }: RadioProps) {\n const groupDisabled = useRadioGroupDisabled();\n const { motionProps } = usePressPulse({\n scale: 0.94,\n disabled: Boolean(disabled || groupDisabled),\n });\n // With a label, the whole row is the hit target — press-trigger from there\n // (pointerdown bubbles up from the label text too) so the dot still\n // animates when the text, not the dot itself, is what's clicked.\n const { onPointerDown, ...dotMotionProps } = motionProps;\n\n const dot = (\n <BaseRadio.Root\n disabled={disabled}\n render={\n <motion.span\n {...dotMotionProps}\n onPointerDown={label ? undefined : onPointerDown}\n />\n }\n className={cn(\n \"outline-pho-brand bg-pho-primary ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 ring-inset focus-visible:outline-2 focus-visible:outline-offset-2\",\n // Transform stays out — Motion owns the press pulse.\n \"transition-[background-color,box-shadow,color,outline-color] duration-150 ease-out\",\n // group-hover covers hovering the label text, not just the dot itself.\n \"hover:bg-pho-primary-hover hover:ring-pho-ink group-hover:bg-pho-primary-hover group-hover:ring-pho-ink\",\n \"data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent\",\n \"data-[checked]:hover:bg-pho-brand-solid-hover data-[checked]:group-hover:bg-pho-brand-solid-hover\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n {/* The indicator only renders when checked, i.e. always on brand-solid —\n on-brand (light-dark(#fff,#000)) keeps the dot visible in dark mode,\n where brand-solid is white. Pops in rather than appearing flat. */}\n <BaseRadio.Indicator\n render={\n <motion.span\n initial={{ scale: 0 }}\n animate={{ scale: 1 }}\n transition={CHOICE_INDICATOR_POP_TRANSITION}\n />\n }\n className=\"bg-pho-on-brand size-2 rounded-full\"\n />\n </BaseRadio.Root>\n );\n\n if (!label) return dot;\n return (\n <label\n className=\"group flex cursor-pointer items-center gap-2 select-none\"\n onPointerDown={onPointerDown}\n >\n {dot}\n <span className=\"text-pho-secondary text-base\">{label}</span>\n </label>\n );\n}\n\nRadio.displayName = \"Radio\";\n","import { type ComponentProps, type ReactNode } from \"react\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\nimport {\n CHOICE_CARD_BASE,\n CHOICE_CARD_WITH_ICON,\n CHOICE_CARD_PRESS_SCALE,\n CHOICE_CARD_PRESS_TRANSITION,\n CHOICE_INDICATOR_POP_TRANSITION,\n} from \"../../utils/choice-card\";\nimport { useRadioGroupDisabled } from \"./radio-group\";\n\nexport interface RadioCardProps extends Omit<\n ComponentProps<typeof BaseRadio.Root>,\n \"className\" | \"title\"\n> {\n className?: string;\n /** Tile heading. */\n title: ReactNode;\n /** Supporting copy shown below the title. */\n description?: ReactNode;\n /** Glyph stacked above the title. When set, it replaces the radio dot. */\n icon?: ReactNode;\n /**\n * Glyph at the end of the title row in place of the radio dot, for a\n * choice that adds something rather than picks it — a plus on \"New\n * brand\". The tile's ring still shows it chosen. For tiles without an\n * `icon` (those have no dot to replace).\n */\n trailing?: ReactNode;\n}\n\nfunction CardCopy({\n title,\n description,\n}: {\n title: ReactNode;\n description?: ReactNode;\n}) {\n return (\n <span className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-pho-primary block font-medium\">{title}</span>\n {description ? (\n <span className=\"text-pho-description block\">{description}</span>\n ) : null}\n </span>\n );\n}\n\n/**\n * A `Radio` styled as a bordered, selectable tile — title, optional\n * description, and either a stacked icon above them or, at the end of the\n * title row, the radio dot (or a `trailing` glyph in its place). The tile\n * *is* the radio (see `usePressPulse`); an inner glyph is decorative.\n */\nexport function RadioCard({\n className,\n title,\n description,\n icon,\n trailing,\n disabled,\n ...props\n}: RadioCardProps) {\n const groupDisabled = useRadioGroupDisabled();\n const { motionProps } = usePressPulse({\n scale: CHOICE_CARD_PRESS_SCALE,\n disabled: Boolean(disabled || groupDisabled),\n transition: CHOICE_CARD_PRESS_TRANSITION,\n });\n const hasIcon = icon != null;\n\n return (\n <BaseRadio.Root\n disabled={disabled}\n render={<motion.span {...motionProps} />}\n className={cn(\n CHOICE_CARD_BASE,\n hasIcon && CHOICE_CARD_WITH_ICON,\n className,\n )}\n {...props}\n >\n {hasIcon ? (\n <span\n aria-hidden\n className=\"text-pho-secondary flex size-6 shrink-0 items-center justify-center [&>svg]:size-6\"\n >\n {icon}\n </span>\n ) : null}\n <CardCopy title={title} description={description} />\n {/* The dot sits at the end of the title row, centered on the title's\n line; the same half step from the right edge keeps it square in\n the corner. A trailing glyph takes the same seat at the same size. */}\n {hasIcon ? null : trailing != null && trailing !== false ? (\n <span\n aria-hidden\n data-radio-card-trailing=\"\"\n className=\"text-pho-secondary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center [&>svg]:size-4\"\n >\n {trailing}\n </span>\n ) : (\n <span\n aria-hidden\n className={cn(\n \"bg-pho-primary ring-pho-primary mt-0.5 mr-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ring-1 ring-inset\",\n \"group-hover:bg-pho-primary-hover group-hover:ring-pho-ink transition-[background-color,box-shadow] duration-150 ease-out\",\n \"group-data-[checked]:bg-pho-brand-solid group-data-[checked]:group-hover:bg-pho-brand-solid-hover group-data-[checked]:ring-transparent\",\n )}\n >\n <BaseRadio.Indicator\n render={\n <motion.span\n initial={{ scale: 0 }}\n animate={{ scale: 1 }}\n transition={CHOICE_INDICATOR_POP_TRANS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A;AAAA,MAIlD,IAAU,OAAO,KAAY,QAAQ,MAAa,KACjD,gBAAA,EAAC,QAAD;AAAA,QACE,eAAA;AAAA,QACA,4BAAyB;AAAA,QACzB,WAAU;AAAA,QAET,UAAA;AAAA,MACG,CAAA,IAEN,gBAAA,EAAC,QAAD;AAAA,QACE,eAAA;AAAA,QACA,WAAW,EACT,iIACA,4HACA,yIACF;AAAA,QAEA,UAAA,gBAAA,EAAC,EAAU,WAAX;AAAA,UACE,QACE,gBAAA,EAAC,EAAO,MAAR;AAAA,YACE,SAAS,EAAE,OAAO,EAAE;AAAA,YACpB,SAAS,EAAE,OAAO,EAAE;AAAA,YACpB,YAAY;AAAA,UACb,CAAA;AAAA,UAEH,WAAU;AAAA,QACX,CAAA;AAAA,MACG,CAAA;AAAA,IAEM;AAAA;AAEpB;AAEA,EAAU,cAAc"}
package/dist/index.js CHANGED
@@ -9,24 +9,24 @@ import { n as U, t as M } from "./chunks/use-copy-D6JwKUll.js";
9
9
  import "./utils.js";
10
10
  import { a as v, c as k, d as w, i as W, l as y, n as H, o as K, r as x, s as z, t as X, u as Y } from "./chunks/button-C9VqBBIr.js";
11
11
  import { a as j, c as J, i as Q, l as q, n as $, o as aa, r as sa, s as ta, t as ra } from "./chunks/error-D5SzZ0ev.js";
12
- import { t as ea } from "./chunks/chat-B0WIgEyM.js";
12
+ import { t as ea } from "./chunks/chat-CU3XVm99.js";
13
13
  import { A as Sa, B as Ea, C as _a, D as na, E as ma, F as Aa, I as Ia, L as Ta, M as pa, N as Ra, O as la, P as Ca, R as ua, S as Ba, T as fa, V as Na, _ as La, a as Pa, b as ca, c as Da, d as Oa, f as da, g as Va, h as ga, i as ha, j as Ga, k as Ua, l as Ma, m as ba, n as Fa, o as va, p as ka, r as wa, s as Wa, t as ya, u as Ha, v as Ka, w as xa, x as za, y as Xa, z as Ya } from "./chunks/trace-D1fOFzJt.js";
14
14
  import { a as ja, c as Ja, d as Qa, i as qa, l as $a, n as as, o as ss, r as ts, s as rs, t as os, u as es } from "./chunks/code-block-CbcE994O.js";
15
15
  import { n as Ss, t as Es } from "./chunks/date-picker-CZbcNIe-.js";
16
16
  import { n as ns, t as ms } from "./chunks/copy-button-D8XyP0oR.js";
17
17
  import { a as Is, c as Ts, d as ps, i as Rs, l as ls, n as Cs, o as us, r as Bs, s as fs, t as Ns, u as Ls } from "./chunks/sidebar-BP39w1iA.js";
18
- import { t as cs } from "./chunks/input-DjvZoF8v.js";
19
- import { i as Os, n as ds, r as Vs, t as gs } from "./chunks/filter-bar-B-oYYBsU.js";
20
- import { i as Gs } from "./chunks/data-table-B1dmrN6r.js";
18
+ import { t as cs } from "./chunks/input-fFWvPJOf.js";
19
+ import { i as Os, n as ds, r as Vs, t as gs } from "./chunks/filter-bar-CMkvhvgL.js";
20
+ import { i as Gs } from "./chunks/data-table-Ce_c6T73.js";
21
21
  import { n as Ms, t as bs } from "./chunks/stat-hnNqjWVG.js";
22
22
  import { t as vs } from "./chunks/calendar-4OFiCLAv.js";
23
23
  import { t as ws } from "./chunks/close-button-GvqWbLl0.js";
24
24
  import { t as ys } from "./chunks/input-group-fc9_jD4d.js";
25
25
  import { n as Ks, t as xs } from "./chunks/card-N-tvFsuV.js";
26
- import { n as Xs, t as Ys } from "./chunks/dialog-MPvem7yV.js";
26
+ import { n as Xs, t as Ys } from "./chunks/dialog-ChS0tdHa.js";
27
27
  import { i as js, n as Js, r as Qs, t as qs } from "./chunks/status-view-C8tabjDu.js";
28
28
  import { t as at } from "./chunks/description-list-8qm83WZB.js";
29
- import { a as tt, c as rt, d as ot, f as et, i as it, l as St, m as Et, n as _t, o as nt, p as mt, r as At, s as It, t as Tt, u as pt } from "./chunks/basic-page-B5FsORRi.js";
29
+ import { a as tt, c as rt, d as ot, f as et, i as it, l as St, m as Et, n as _t, o as nt, p as mt, r as At, s as It, t as Tt, u as pt } from "./chunks/basic-page-CJ11ekjH.js";
30
30
  import { a as lt, i as Ct, n as ut, o as Bt, r as ft, s as Nt, t as Lt } from "./chunks/chart-Dx3rjeFn.js";
31
31
  import "./components/chart.js";
32
32
  import { t as Dt } from "./chunks/bar-chart-By5gWQqP.js";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { i as s } from "../chunks/data-table-B1dmrN6r.js";
3
- import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-B5FsORRi.js";
2
+ import { i as s } from "../chunks/data-table-Ce_c6T73.js";
3
+ import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-CJ11ekjH.js";
4
4
  export {
5
5
  D as AUTO_SAVE_DELAY_MS,
6
6
  B as BASIC_PAGE_CALLOUT,
@@ -70,6 +70,14 @@ interface ContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title
70
70
  * set, the header close button is never shown — dismiss via the actions.
71
71
  */
72
72
  actions?: ReactNode;
73
+ /**
74
+ * A quiet footnote at the panel's foot — the limit, cost or policy that
75
+ * frames the decision without being it ("You may change these up to five
76
+ * times a week."). Description ink at `text-xs`, at the action row's
77
+ * start with the actions at its end; when the row runs short of room it
78
+ * takes a line of its own above them. One short sentence.
79
+ */
80
+ caption?: ReactNode;
73
81
  /**
74
82
  * Header close control. Only applies when `actions` is absent.
75
83
  * @default true
@@ -83,7 +91,7 @@ interface ContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title
83
91
  * full control, compose the parts directly (`Dialog.Portal` /
84
92
  * `Dialog.Backdrop` / `Dialog.Popup`).
85
93
  */
86
- declare function Content({ icon, title, description, consequences, warning, actions, showClose, children, className, ...props }: ContentProps): import("react").JSX.Element;
94
+ declare function Content({ icon, title, description, consequences, warning, actions, caption, showClose, children, className, ...props }: ContentProps): import("react").JSX.Element;
87
95
  /**
88
96
  * Near-fullscreen popup — the viewport minus a breathing ring, floating over
89
97
  * a backdrop (the page stays visible through the gap, so it dims like any
@@ -5,7 +5,17 @@ type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> &
5
5
  className?: string;
6
6
  };
7
7
  declare function Root({ className, ...props }: StyledProps<typeof BaseField.Root>): import("react").JSX.Element;
8
- declare function Label({ className, ...props }: StyledProps<typeof BaseField.Label>): import("react").JSX.Element;
8
+ /**
9
+ * The field's label. `required` marks it the way `Input required` marks
10
+ * its own: a brand-coloured star after the words. A form marks every
11
+ * required field or none, so a field built from parts (a `Select`, a
12
+ * `PhoneInput`, a pair of inputs under one label) takes `required` here to
13
+ * match the `Input`s beside it.
14
+ */
15
+ declare function Label({ className, required, children, ...props }: StyledProps<typeof BaseField.Label> & {
16
+ /** Mark the field required: a star after the label's words. */
17
+ required?: boolean;
18
+ }): import("react").JSX.Element;
9
19
  declare function Control({ className, ...props }: StyledProps<typeof BaseField.Control>): import("react").JSX.Element;
10
20
  /**
11
21
  * Several controls under one label: the lines of an address, first and
@@ -8,14 +8,21 @@ export interface RadioCardProps extends Omit<ComponentProps<typeof BaseRadio.Roo
8
8
  description?: ReactNode;
9
9
  /** Glyph stacked above the title. When set, it replaces the radio dot. */
10
10
  icon?: ReactNode;
11
+ /**
12
+ * Glyph at the end of the title row in place of the radio dot, for a
13
+ * choice that adds something rather than picks it — a plus on "New
14
+ * brand". The tile's ring still shows it chosen. For tiles without an
15
+ * `icon` (those have no dot to replace).
16
+ */
17
+ trailing?: ReactNode;
11
18
  }
12
19
  /**
13
20
  * A `Radio` styled as a bordered, selectable tile — title, optional
14
- * description, and either a stacked icon above them or the radio dot at
15
- * the end of the title row. The tile *is* the radio (see `usePressPulse`);
16
- * an inner glyph is decorative.
21
+ * description, and either a stacked icon above them or, at the end of the
22
+ * title row, the radio dot (or a `trailing` glyph in its place). The tile
23
+ * *is* the radio (see `usePressPulse`); an inner glyph is decorative.
17
24
  */
18
- export declare function RadioCard({ className, title, description, icon, disabled, ...props }: RadioCardProps): import("react").JSX.Element;
25
+ export declare function RadioCard({ className, title, description, icon, trailing, disabled, ...props }: RadioCardProps): import("react").JSX.Element;
19
26
  export declare namespace RadioCard {
20
27
  var displayName: string;
21
28
  }
@@ -8,12 +8,12 @@ import { CodeBlock } from '../../components/code-block';
8
8
  * card's own: Stack used to force `gap-3` onto a bare Card and open 12px
9
9
  * bands between `divide-y` rows. The marker below lets Stack skip it.
10
10
  */
11
- export declare const BASIC_PAGE_CARD = "rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0 gap-0";
11
+ export declare const BASIC_PAGE_CARD = "rounded-base border border-pho-secondary bg-pho-primary [--choice-card-inset:0.75rem] divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0 gap-0";
12
12
  /**
13
13
  * Standalone callout surface — featured block (invite form, notice, etc.).
14
14
  * Don't wrap in `Card`; this is the outer chrome.
15
15
  */
16
- export declare const BASIC_PAGE_CALLOUT = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5";
16
+ export declare const BASIC_PAGE_CALLOUT = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5 [--choice-card-inset:0.75rem]";
17
17
  /**
18
18
  * One row — label (+ optional description) left, control right.
19
19
  * `min-h-[4.25rem]` (68px) keeps avatar/control rows from collapsing shorter
@@ -227,6 +227,25 @@ export interface BasicPageTitleProps extends ComponentProps<"h1"> {
227
227
  trailing?: ReactNode;
228
228
  ref?: Ref<HTMLHeadingElement>;
229
229
  }
230
+ export interface BasicPageTitleAccessoryProps {
231
+ /**
232
+ * Whether it goes with the words into the condensed bar once the title
233
+ * has scrolled away. A status the name can't be read without does (a
234
+ * badge); an action on the page doesn't (a Rename pencil): the bar is a
235
+ * way back and a name, not a toolbar.
236
+ * @default true
237
+ */
238
+ inBar?: boolean;
239
+ children?: ReactNode;
240
+ }
241
+ /**
242
+ * A part of the title beside its words — a badge, a status, an action on
243
+ * the page itself — that says whether it follows the words into the
244
+ * condensed bar (`Root condense`). Put it inside `Title` after the words.
245
+ * Everything in a title's children goes into the bar unless it says
246
+ * otherwise; `Title`'s `trailing` never does.
247
+ */
248
+ declare function TitleAccessory({ inBar, children, }: BasicPageTitleAccessoryProps): import("react").JSX.Element | null;
230
249
  /**
231
250
  * Page title — largest heading on the surface. Plain-text children get a slug
232
251
  * `id` for hash targets (`#profile`); the heading itself is not a link.
@@ -308,11 +327,12 @@ export interface BasicPageHeaderProps extends Omit<ComponentProps<"div">, Reveal
308
327
  declare function Header({ enter: enterProp, className, ...props }: BasicPageHeaderProps): import("react").JSX.Element;
309
328
  /**
310
329
  * An action at the header row's end — a small button (or two) seated in
311
- * the `Header` grid the way `Search` is: top-right of the block, its top
312
- * edge on the header's top, its right edge on the title / card-content
313
- * inset (`mr-5` matching `SectionTitle`'s `px-5`). A callout already
314
- * carries `p-5` and its title has no `px-5`, so the inset drops there.
315
- * Text shorter than the seat centers against it. Put it inside `Header`
330
+ * the `Header` grid the way `Search` is, its right edge on the title /
331
+ * card-content inset (`mr-5` matching `SectionTitle`'s `px-5`). A callout
332
+ * already carries `p-5` and its title has no `px-5`, so the inset drops
333
+ * there. It centers on the text block whichever is taller: beside a
334
+ * description that wraps to a third line it stays on the block's middle,
335
+ * and text shorter than it centers against it. Put it inside `Header`
316
336
  * after the text; with a `Search` present it stands to the search's right.
317
337
  */
318
338
  declare function HeaderAction({ className, ...props }: ComponentProps<"div"> & {
@@ -425,6 +445,16 @@ declare function CalloutDescription({ className, ...props }: ComponentProps<"p">
425
445
  ref?: Ref<HTMLParagraphElement>;
426
446
  }): import("react").JSX.Element;
427
447
  export interface BasicPageOnboardProps extends ComponentProps<"ol"> {
448
+ /**
449
+ * One page per step, the steps in a row above it, instead of the card
450
+ * with the step at hand folded open — for a setup whose steps are
451
+ * pages of their own: a registration that asks who is registering,
452
+ * then for the brand, then for the campaign. Each `Step`'s children are
453
+ * its page (a `Stack`, or a `Form` around one), and the paged `Onboard`
454
+ * stands where the page's `Stack` would, under the `Title`. The rest of
455
+ * the props go to the row, the ordered list of steps.
456
+ */
457
+ paged?: boolean;
428
458
  ref?: Ref<HTMLOListElement>;
429
459
  }
430
460
  /**
@@ -438,30 +468,40 @@ export interface BasicPageOnboardProps extends ComponentProps<"ol"> {
438
468
  * with a check and what they came to, the waiting ones muted. A step
439
469
  * finishing folds closed as the next opens, on the Accordion's spring.
440
470
  * When the last step is done the service is on — render the page in its
441
- * place.
471
+ * place. `paged` turns the card into a row of steps over the page at
472
+ * hand (see `PagedOnboard`).
442
473
  */
443
- declare function Onboard({ className, children, ...props }: BasicPageOnboardProps): import("react").JSX.Element;
474
+ declare function Onboard({ paged, className, children, ...props }: BasicPageOnboardProps): import("react").JSX.Element;
444
475
  export interface BasicPageStepProps extends Omit<ComponentProps<"li">, "title"> {
445
476
  /**
446
477
  * Decorative glyph for the step at hand, top-right of its body the way a
447
478
  * `Callout`'s is — typically a Tabler outline icon at stroke 1.25. It is
448
479
  * aria-hidden (keep the meaning in the title) and folds away with the
449
- * body: a done or waiting step shows none.
480
+ * body: a done or waiting step shows none. In a paged list it is what a
481
+ * done step came to, drawn in its ring in place of the check — the
482
+ * choice a step made, say — and a step without one keeps the check.
450
483
  */
451
484
  icon?: ReactNode;
452
485
  /**
453
486
  * Something to look at beside the step at hand — a code to scan, with
454
487
  * its caption — in the corner where the `icon` would be, its top on the
455
488
  * title's, holding still as the fold opens beside it. It takes the
456
- * icon's place when both are given, and folds away with the body.
489
+ * icon's place when both are given, and folds away with the body. Not
490
+ * shown in a paged list.
457
491
  */
458
492
  aside?: ReactNode;
459
- /** The title: a verb and its object — "Choose a number". */
493
+ /**
494
+ * The title: a verb and its object — "Choose a number". In a paged
495
+ * list, the step's name in the row, a word or two — "Brand" — which a
496
+ * done step may trade for what it came to ("Business"); the row
497
+ * crossfades it.
498
+ */
460
499
  title: ReactNode;
461
500
  /**
462
501
  * The line under the title while the step is at hand: what it involves,
463
502
  * or, while it waits, how long. Folded away with the rest once the step
464
- * is done or before its turn.
503
+ * is done or before its turn. Not shown in a paged list; the page says
504
+ * it in its own `Header`.
465
505
  */
466
506
  description?: ReactNode;
467
507
  /**
@@ -486,11 +526,95 @@ export interface BasicPageStepProps extends Omit<ComponentProps<"li">, "title">
486
526
  /**
487
527
  * At hand: the step's action — a small `Button` or `ButtonLink` — under
488
528
  * its line. Done: what it came to — a `Value` — at the title's end.
489
- * Waiting its turn: not shown.
529
+ * Waiting its turn: not shown. In a paged list, the step's page — a
530
+ * `Stack`, or a `Form` around one — shown under the row while the step
531
+ * is at hand.
490
532
  */
491
533
  children?: ReactNode;
492
534
  ref?: Ref<HTMLLIElement>;
493
535
  }
536
+ /**
537
+ * Where a check stands. As `Step`'s: `done` draws the check, `working`
538
+ * spins while Photon is at it, `pending` is dashed while it waits on
539
+ * someone else (a carrier, a DNS host, the visitor), `upcoming` is faint
540
+ * while it waits its turn. `failed` trades the ring for an X and says so.
541
+ */
542
+ export type BasicPageCheckState = "done" | "working" | "pending" | "upcoming" | "failed";
543
+ /**
544
+ * A list of checks Photon reports on, one line each: DNS records found, a
545
+ * registration's stages. Not steps someone takes (that is `Onboard`), and
546
+ * not a percentage (that is `Progress`). It speaks the `Onboard` ring's
547
+ * language at the line's size. The check where the list stands, whatever
548
+ * came of it, is its current step: its label one weight up, and
549
+ * `aria-current` for assistive tech. Put it in a `Card`'s `Item`, and say
550
+ * when it was last checked, if that matters, in a `SectionFooter`.
551
+ */
552
+ declare function Checklist({ className, children, ...props }: ComponentProps<"ul"> & {
553
+ ref?: Ref<HTMLUListElement>;
554
+ }): import("react").JSX.Element;
555
+ export interface BasicPageCheckProps extends Omit<ComponentProps<"li">, "value"> {
556
+ /** @default "upcoming" */
557
+ state?: BasicPageCheckState;
558
+ /**
559
+ * What the check came to, at the line's end in description ink: the
560
+ * date it passed, a count.
561
+ */
562
+ value?: ReactNode;
563
+ /**
564
+ * A line (or a few) right under the label, on its start edge, at
565
+ * `text-xs`: why a failed check failed, in error ink with no surface of
566
+ * its own (the X already marks it); otherwise what the check waits on,
567
+ * in description ink. Several reasons are several block children.
568
+ */
569
+ description?: ReactNode;
570
+ /**
571
+ * What a failed check's failure is called, beside its label in error
572
+ * ink: "Rejected", "Suspended". Read only when `state` is `failed`.
573
+ * @default "Failed"
574
+ */
575
+ failure?: ReactNode;
576
+ ref?: Ref<HTMLLIElement>;
577
+ }
578
+ /**
579
+ * One check: its ring, its label, its `value` at the line's end, and its
580
+ * `description` under the label. The ring is `Step`'s at the text's size;
581
+ * a check that turns done draws its mark on, one that loads done shows it
582
+ * drawn. The list says which check is current; its label and a failed
583
+ * one's "Failed" go one weight up.
584
+ */
585
+ declare function Check({ state, value, description, failure, className, children, ...props }: BasicPageCheckProps): import("react").JSX.Element;
586
+ /**
587
+ * What happened, in order: a registration's reviews, a domain's checks
588
+ * over time, a key's uses. One event per `TimelineItem`, newest first
589
+ * unless the page says otherwise, each on the checklist's mark with a
590
+ * faint line down to the next. Where `Checklist` is where things stand
591
+ * now, a timeline is how they got there. Put it in a `Card`'s `Item`.
592
+ */
593
+ declare function Timeline({ className, ...props }: ComponentProps<"ol"> & {
594
+ ref?: Ref<HTMLOListElement>;
595
+ }): import("react").JSX.Element;
596
+ export interface BasicPageTimelineItemProps extends Omit<ComponentProps<"li">, "title"> {
597
+ /** What came of the event, on the checklist's mark. @default "done" */
598
+ state?: BasicPageCheckState;
599
+ /** The event, in words: "Carrier review failed". */
600
+ title: ReactNode;
601
+ /** When it happened, under the title in description ink. */
602
+ time?: ReactNode;
603
+ /**
604
+ * What there is to say about it, under the time at `text-xs` in
605
+ * description ink: a reviewer's reasons, a note. A record, not an alarm:
606
+ * a failure's mark says it failed, and the page's current state says
607
+ * what to do about it.
608
+ */
609
+ children?: ReactNode;
610
+ ref?: Ref<HTMLLIElement>;
611
+ }
612
+ /**
613
+ * One event: its mark on the rail, a line from it down to the next
614
+ * event's, and beside it the title, the time and the details. The mark
615
+ * sits on the title's line; the last event draws no line.
616
+ */
617
+ declare function TimelineItem({ state, title, time, className, children, ...props }: BasicPageTimelineItemProps): import("react").JSX.Element;
494
618
  /**
495
619
  * One step of an `Onboard`, left to right: the ring, the words, the
496
620
  * corner. The ring and the title share one row and center on each
@@ -503,7 +627,8 @@ export interface BasicPageStepProps extends Omit<ComponentProps<"li">, "title">
503
627
  * does; the others stay on the card's white. The title and the line wear the
504
628
  * section's type — `SectionTitle` over `Description`, both
505
629
  * `text-display-xs`. Its standing comes from the list; on its own it is
506
- * the step at hand.
630
+ * the step at hand. In a paged list it is its place in the row instead
631
+ * (`StepInRow`), and the list shows its children as the page.
507
632
  */
508
633
  declare function Step({ icon, aside, title, description, done, working, pending, className, children, ...props }: BasicPageStepProps): import("react").JSX.Element;
509
634
  export interface BasicPageRowProps extends Omit<ComponentProps<"div">, "title" | RevealMotionConflicts> {
@@ -1139,6 +1264,7 @@ export declare const BasicPage: {
1139
1264
  Crumb: typeof Crumb;
1140
1265
  Back: typeof Back;
1141
1266
  Title: typeof Title;
1267
+ TitleAccessory: typeof TitleAccessory;
1142
1268
  Stack: typeof Stack;
1143
1269
  Columns: typeof Columns;
1144
1270
  Header: typeof Header;
@@ -1155,6 +1281,10 @@ export declare const BasicPage: {
1155
1281
  CalloutDescription: typeof CalloutDescription;
1156
1282
  Onboard: typeof Onboard;
1157
1283
  Step: typeof Step;
1284
+ Checklist: typeof Checklist;
1285
+ Check: typeof Check;
1286
+ Timeline: typeof Timeline;
1287
+ TimelineItem: typeof TimelineItem;
1158
1288
  Row: typeof Row;
1159
1289
  RowLink: typeof RowLink;
1160
1290
  Value: typeof Value;
@@ -1,3 +1,3 @@
1
- export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageColumnsProps, type BasicPageAsideProps, type BasicPageAsideWidth, type BasicPageAsidePresentation, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, type BasicPageReceiptProps, type BasicPageReceiptGroupProps, type BasicPageReceiptLineProps, type BasicPageReceiptTotalProps, } from './basic-page';
1
+ export { BasicPage, formToasts, AUTO_SAVE_DELAY_MS, useCondense, useAutoSave, type BasicPageCondense, BASIC_PAGE_CARD, CONDENSE_BAR_ENTER, CONDENSE_BAR_TRAVEL, CONDENSE_BAR_RISE_PX, BASIC_PAGE_CALLOUT, BASIC_PAGE_ROW, BASIC_PAGE_ITEM, BASIC_PAGE_ITEM_PANEL, BASIC_PAGE_ITEM_PANEL_DIVIDED, type BasicPageRootProps, type BasicPageColumnsProps, type BasicPageAsideProps, type BasicPageAsideWidth, type BasicPageAsidePresentation, type BasicPageRowProps, type BasicPageRowLinkProps, type BasicPageBackProps, type BasicPageBreadcrumbsProps, type BasicPageCrumbProps, type BasicPageFooterProps, type BasicPageFormProps, type BasicPageFormErrors, type BasicPageItemPanelProps, type BasicPageOnboardProps, type BasicPageStepProps, type BasicPageTitleAccessoryProps, type BasicPageCheckProps, type BasicPageCheckState, type BasicPageTimelineItemProps, type BasicPageReceiptProps, type BasicPageReceiptGroupProps, type BasicPageReceiptLineProps, type BasicPageReceiptTotalProps, } from './basic-page';
2
2
  export { createColumns, type DataTableColumn, type DataTableColumnMeta, type DataTableProps, type SortingState, } from '../../components/data-table';
3
3
  export { type DescriptionListRootProps as BasicPageMetaProps, type DescriptionListItemProps as BasicPageMetaItemProps, type DescriptionListLayout as BasicPageMetaLayout, } from '../../components/description-list';