@photon-ai/pho-ui 4.10.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.
- package/dist/chunks/animated-height-zr7BmFY1.js +56 -0
- package/dist/chunks/animated-height-zr7BmFY1.js.map +1 -0
- package/dist/chunks/{bar-chart-HsoFFaPb.js → bar-chart-By5gWQqP.js} +2 -2
- package/dist/chunks/{bar-chart-HsoFFaPb.js.map → bar-chart-By5gWQqP.js.map} +1 -1
- package/dist/chunks/basic-page-CJ11ekjH.js +2217 -0
- package/dist/chunks/basic-page-CJ11ekjH.js.map +1 -0
- package/dist/chunks/{chart-BrIXaMue.js → chart-Dx3rjeFn.js} +527 -490
- package/dist/chunks/chart-Dx3rjeFn.js.map +1 -0
- package/dist/chunks/{chat-B0WIgEyM.js → chat-CU3XVm99.js} +2 -2
- package/dist/chunks/{chat-B0WIgEyM.js.map → chat-CU3XVm99.js.map} +1 -1
- package/dist/chunks/{checkbox-CLPmblNA.js → checkbox-CwvoEJhd.js} +2 -2
- package/dist/chunks/{checkbox-CLPmblNA.js.map → checkbox-CwvoEJhd.js.map} +1 -1
- package/dist/chunks/choice-card-_Ocs0iUj.js +17 -0
- package/dist/chunks/choice-card-_Ocs0iUj.js.map +1 -0
- package/dist/chunks/{command-iYvU6Mhf.js → command-D5g49VqR.js} +3 -3
- package/dist/chunks/{command-iYvU6Mhf.js.map → command-D5g49VqR.js.map} +1 -1
- package/dist/chunks/{data-table-B1dmrN6r.js → data-table-Ce_c6T73.js} +3 -3
- package/dist/chunks/{data-table-B1dmrN6r.js.map → data-table-Ce_c6T73.js.map} +1 -1
- package/dist/chunks/{dialog-MPvem7yV.js → dialog-ChS0tdHa.js} +120 -116
- package/dist/chunks/dialog-ChS0tdHa.js.map +1 -0
- package/dist/chunks/{filter-bar-B-oYYBsU.js → filter-bar-CMkvhvgL.js} +2 -2
- package/dist/chunks/{filter-bar-B-oYYBsU.js.map → filter-bar-CMkvhvgL.js.map} +1 -1
- package/dist/chunks/{input-DjvZoF8v.js → input-fFWvPJOf.js} +2 -1
- package/dist/chunks/{input-DjvZoF8v.js.map → input-fFWvPJOf.js.map} +1 -1
- package/dist/chunks/{line-chart-Bv25WyGp.js → line-chart-CAe09fqr.js} +2 -2
- package/dist/chunks/{line-chart-Bv25WyGp.js.map → line-chart-CAe09fqr.js.map} +1 -1
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chat.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/field.js +34 -29
- package/dist/components/field.js.map +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/line-chart.js +1 -1
- package/dist/components/radio-group.js +64 -59
- package/dist/components/radio-group.js.map +1 -1
- package/dist/index.js +9 -9
- package/dist/sections/basic-page.js +2 -2
- package/dist/src/components/dialog/dialog.d.ts +9 -1
- package/dist/src/components/field/field.d.ts +11 -1
- package/dist/src/components/radio-group/radio-card.d.ts +11 -4
- package/dist/src/sections/basic-page/basic-page.d.ts +230 -15
- package/dist/src/sections/basic-page/index.d.ts +1 -1
- package/dist/src/utils/animated-height.d.ts +16 -7
- package/dist/src/utils/choice-card.d.ts +8 -1
- package/package.json +1 -1
- package/dist/chunks/animated-height-I44sUq0n.js +0 -48
- package/dist/chunks/animated-height-I44sUq0n.js.map +0 -1
- package/dist/chunks/basic-page-DzT8yecB.js +0 -1801
- package/dist/chunks/basic-page-DzT8yecB.js.map +0 -1
- package/dist/chunks/chart-BrIXaMue.js.map +0 -1
- package/dist/chunks/choice-card-BVNP1NB6.js +0 -17
- package/dist/chunks/choice-card-BVNP1NB6.js.map +0 -1
- package/dist/chunks/dialog-MPvem7yV.js.map +0 -1
|
@@ -1,99 +1,104 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
3
|
-
import { r as
|
|
4
|
-
import { a as
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { jsx as o, jsxs as
|
|
7
|
-
import { motion as
|
|
8
|
-
import { Radio as
|
|
9
|
-
import { RadioGroup as
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
return
|
|
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
|
|
15
|
-
return /* @__PURE__ */ o(
|
|
16
|
-
value: !!
|
|
17
|
-
children: /* @__PURE__ */ o(
|
|
18
|
-
disabled:
|
|
19
|
-
className:
|
|
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
|
-
|
|
25
|
-
function
|
|
26
|
-
const
|
|
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 ||
|
|
29
|
-
}), { onPointerDown: t, ...u } =
|
|
28
|
+
disabled: !!(a || n)
|
|
29
|
+
}), { onPointerDown: t, ...u } = s, d = /* @__PURE__ */ o(p.Root, {
|
|
30
30
|
disabled: a,
|
|
31
|
-
render: /* @__PURE__ */ o(
|
|
31
|
+
render: /* @__PURE__ */ o(c.span, {
|
|
32
32
|
...u,
|
|
33
|
-
onPointerDown:
|
|
33
|
+
onPointerDown: e ? void 0 : t
|
|
34
34
|
}),
|
|
35
|
-
className:
|
|
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(
|
|
38
|
-
render: /* @__PURE__ */ o(
|
|
37
|
+
children: /* @__PURE__ */ o(p.Indicator, {
|
|
38
|
+
render: /* @__PURE__ */ o(c.span, {
|
|
39
39
|
initial: { scale: 0 },
|
|
40
40
|
animate: { scale: 1 },
|
|
41
|
-
transition:
|
|
41
|
+
transition: f
|
|
42
42
|
}),
|
|
43
43
|
className: "bg-pho-on-brand size-2 rounded-full"
|
|
44
44
|
})
|
|
45
45
|
});
|
|
46
|
-
return
|
|
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: [
|
|
49
|
+
children: [d, /* @__PURE__ */ o("span", {
|
|
50
50
|
className: "text-pho-secondary text-base",
|
|
51
|
-
children:
|
|
51
|
+
children: e
|
|
52
52
|
})]
|
|
53
|
-
}) :
|
|
53
|
+
}) : d;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
function
|
|
57
|
-
return /* @__PURE__ */
|
|
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
|
|
69
|
-
const
|
|
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 ||
|
|
72
|
-
transition:
|
|
73
|
-
}),
|
|
74
|
-
return /* @__PURE__ */
|
|
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(
|
|
77
|
-
className:
|
|
78
|
-
...
|
|
76
|
+
render: /* @__PURE__ */ o(c.span, { ...d }),
|
|
77
|
+
className: l(R, h && "flex-col gap-1.5", r),
|
|
78
|
+
...t,
|
|
79
79
|
children: [
|
|
80
|
-
|
|
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:
|
|
85
|
+
/* @__PURE__ */ o(P, {
|
|
86
|
+
title: e,
|
|
87
87
|
description: a
|
|
88
88
|
}),
|
|
89
|
-
|
|
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:
|
|
92
|
-
children: /* @__PURE__ */ o(
|
|
93
|
-
render: /* @__PURE__ */ o(
|
|
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:
|
|
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
|
-
|
|
109
|
+
D.displayName = "RadioCard";
|
|
105
110
|
export {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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,gBAAA,EAAC,EAAO,MAAR;AAAA,QACE,SAAS,EAAE,OAAO,EAAE;AAAA,QACpB,SAAS,EAAE,OAAO,EAAE;AAAA,QACpB,YAAY;AAAA,MACb,CAAA;AAAA,MAEH,WAAU;AAAA,IACX,CAAA;AAAA,EACa,CAAA;AAGlB,SAAK,IAEH,gBAAA,EAAC,SAAD;AAAA,IACE,WAAU;AAAA,IACK,eAAA;AAAA,IAFjB,UAAA,CAIG,GACD,gBAAA,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,MAAgC,UAAA;AAAA,IAAY,CAAA,CACvD;AAAA,OARU;AAUrB;AAEA,EAAM,cAAc;AC7FpB,SAAS,EAAS,EAChB,OAAA,GACA,aAAA,EAAA,GAIC;AACD,SACE,gBAAA,EAAC,QAAD;AAAA,IAAM,WAAU;AAAA,IAAhB,UAAA,CACE,gBAAA,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,MAAsC,UAAA;AAAA,IAAY,CAAA,GACjE,IACC,gBAAA,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,MAA8B,UAAA;AAAA,IAAkB,CAAA,IAC9D,IACA;AAAA;AAEV;AAQA,SAAgB,EAAU,EACxB,WAAA,GACA,OAAA,GACA,aAAA,GACA,MAAA,GACA,UAAA,GACA,GAAG,EAAA,GACc;AACjB,QAAM,IAAgB,EAAsB,GACtC,EAAE,aAAA,EAAA,IAAgB,EAAc;AAAA,IACpC,OAAO;AAAA,IACP,UAAU,GAAQ,KAAY;AAAA,IAC9B,YAAY;AAAA,EACd,CAAC,GACK,IAAU,KAAQ;AAExB,SACE,gBAAA,EAAC,EAAU,MAAX;AAAA,IACY,UAAA;AAAA,IACV,QAAQ,gBAAA,EAAC,EAAO,MAAR,EAAa,GAAI,EAAc,CAAA;AAAA,IACvC,WAAW,EACT,GACA,KAAA,oBACA,CACF;AAAA,IACA,GAAI;AAAA,IARN,UAAA;AAAA,MAUG,IACC,gBAAA,EAAC,QAAD;AAAA,QACE,eAAA;AAAA,QACA,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_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":"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"}
|
package/dist/index.js
CHANGED
|
@@ -9,28 +9,28 @@ 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-
|
|
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-
|
|
19
|
-
import { i as Os, n as ds, r as Vs, t as gs } from "./chunks/filter-bar-
|
|
20
|
-
import { i as Gs } from "./chunks/data-table-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
+
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
|
-
import { t as Dt } from "./chunks/bar-chart-
|
|
33
|
-
import { t as dt } from "./chunks/line-chart-
|
|
32
|
+
import { t as Dt } from "./chunks/bar-chart-By5gWQqP.js";
|
|
33
|
+
import { t as dt } from "./chunks/line-chart-CAe09fqr.js";
|
|
34
34
|
import { i as gt, n as ht, r as Gt, t as Ut } from "./chunks/log-list-tNuCFGlP.js";
|
|
35
35
|
import { n as bt, t as Ft } from "./chunks/bubble-eaoLJP4N.js";
|
|
36
36
|
import { n as kt, r as wt, t as Wt } from "./chunks/message-Dz2-numf.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as s } from "../chunks/data-table-
|
|
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-
|
|
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
|
-
|
|
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
|
|
15
|
-
*
|
|
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
|
}
|