@photon-ai/pho-ui 2.7.0 → 2.8.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-BI8y4hHk.js +1449 -0
- package/dist/chunks/basic-page-BI8y4hHk.js.map +1 -0
- package/dist/chunks/{checkbox-Cdm08HWG.js → checkbox-CznlNhDY.js} +40 -37
- package/dist/chunks/checkbox-CznlNhDY.js.map +1 -0
- package/dist/chunks/data-table-Cmz0p-jt.js +279 -0
- package/dist/chunks/data-table-Cmz0p-jt.js.map +1 -0
- package/dist/chunks/rolldown-runtime-wKSmTnsc.js +22 -0
- package/dist/components/accordion.js +87 -28
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/phone-input.js +1 -1
- package/dist/components/radio-group.js +50 -43
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/select.js +7 -7
- package/dist/components/select.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +1 -1
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +1 -1
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.js +1 -1
- package/dist/sections/basic-page.js +2 -2
- package/dist/src/components/accordion/accordion.d.ts +45 -8
- package/dist/src/components/checkbox/checkbox-card.d.ts +2 -1
- package/dist/src/components/data-table/data-table.d.ts +3 -2
- package/dist/src/components/radio-group/radio-card.d.ts +3 -2
- package/dist/src/sections/basic-page/basic-page.d.ts +43 -11
- package/package.json +1 -1
- package/src/styles/theme.css +54 -0
- package/dist/chunks/basic-page-DR5szOOs.js +0 -1373
- package/dist/chunks/basic-page-DR5szOOs.js.map +0 -1
- package/dist/chunks/checkbox-Cdm08HWG.js.map +0 -1
- package/dist/chunks/data-table-DwbPU0zt.js +0 -2970
- package/dist/chunks/data-table-DwbPU0zt.js.map +0 -1
- package/dist/chunks/rolldown-runtime-DG5F_Nuu.js +0 -27
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as d } from "../chunks/cn-ChIgwEl3.js";
|
|
3
3
|
import { r as m } from "../chunks/use-press-pulse-IbNstUT0.js";
|
|
4
|
-
import { a as g, n as C, r as
|
|
5
|
-
import { createContext as
|
|
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
6
|
import { jsx as o, jsxs as h } from "react/jsx-runtime";
|
|
7
|
-
import { motion as
|
|
8
|
-
import { Radio as
|
|
7
|
+
import { motion as l } from "motion/react";
|
|
8
|
+
import { Radio as c } from "@base-ui/react/radio";
|
|
9
9
|
import { RadioGroup as y } from "@base-ui/react/radio-group";
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
return N(
|
|
10
|
+
var f = v(!1);
|
|
11
|
+
function b() {
|
|
12
|
+
return N(f);
|
|
13
13
|
}
|
|
14
14
|
function k({ className: e, disabled: r, ...a }) {
|
|
15
|
-
return /* @__PURE__ */ o(
|
|
15
|
+
return /* @__PURE__ */ o(f.Provider, {
|
|
16
16
|
value: !!r,
|
|
17
17
|
children: /* @__PURE__ */ o(y, {
|
|
18
18
|
disabled: r,
|
|
@@ -23,19 +23,19 @@ function k({ className: e, disabled: r, ...a }) {
|
|
|
23
23
|
}
|
|
24
24
|
k.displayName = "RadioGroup";
|
|
25
25
|
function I({ className: e, label: r, disabled: a, ...i }) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = b(), { motionProps: p } = m({
|
|
27
27
|
scale: 0.94,
|
|
28
28
|
disabled: !!(a || s)
|
|
29
|
-
}), { onPointerDown: t, ...u } = p, n = /* @__PURE__ */ o(
|
|
29
|
+
}), { onPointerDown: t, ...u } = p, n = /* @__PURE__ */ o(c.Root, {
|
|
30
30
|
disabled: a,
|
|
31
|
-
render: /* @__PURE__ */ o(
|
|
31
|
+
render: /* @__PURE__ */ o(l.span, {
|
|
32
32
|
...u,
|
|
33
33
|
onPointerDown: r ? void 0 : t
|
|
34
34
|
}),
|
|
35
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),
|
|
36
36
|
...i,
|
|
37
|
-
children: /* @__PURE__ */ o(
|
|
38
|
-
render: /* @__PURE__ */ o(
|
|
37
|
+
children: /* @__PURE__ */ o(c.Indicator, {
|
|
38
|
+
render: /* @__PURE__ */ o(l.span, {
|
|
39
39
|
initial: { scale: 0 },
|
|
40
40
|
animate: { scale: 1 },
|
|
41
41
|
transition: g
|
|
@@ -54,44 +54,51 @@ function I({ className: e, label: r, disabled: a, ...i }) {
|
|
|
54
54
|
}
|
|
55
55
|
I.displayName = "Radio";
|
|
56
56
|
function _({ title: e, description: r }) {
|
|
57
|
-
return /* @__PURE__ */ h("span", {
|
|
58
|
-
className: "
|
|
59
|
-
children:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
return /* @__PURE__ */ h("span", {
|
|
58
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
59
|
+
children: [/* @__PURE__ */ o("span", {
|
|
60
|
+
className: "text-pho-primary block font-medium",
|
|
61
|
+
children: e
|
|
62
|
+
}), r ? /* @__PURE__ */ o("span", {
|
|
63
|
+
className: "text-pho-description block",
|
|
64
|
+
children: r
|
|
65
|
+
}) : null]
|
|
66
|
+
});
|
|
64
67
|
}
|
|
65
68
|
function P({ className: e, title: r, description: a, icon: i, disabled: s, ...p }) {
|
|
66
|
-
const t =
|
|
69
|
+
const t = b(), { motionProps: u } = m({
|
|
67
70
|
scale: C,
|
|
68
71
|
disabled: !!(s || t),
|
|
69
|
-
transition:
|
|
72
|
+
transition: x
|
|
70
73
|
}), n = i != null;
|
|
71
|
-
return /* @__PURE__ */ h(
|
|
74
|
+
return /* @__PURE__ */ h(c.Root, {
|
|
72
75
|
disabled: s,
|
|
73
|
-
render: /* @__PURE__ */ o(
|
|
74
|
-
className: d(
|
|
76
|
+
render: /* @__PURE__ */ o(l.span, { ...u }),
|
|
77
|
+
className: d(R, n && "flex-col gap-1.5", e),
|
|
75
78
|
...p,
|
|
76
|
-
children: [
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
children: [
|
|
80
|
+
n ? /* @__PURE__ */ o("span", {
|
|
81
|
+
"aria-hidden": !0,
|
|
82
|
+
className: "text-pho-secondary flex size-6 shrink-0 items-center justify-center [&>svg]:size-6",
|
|
83
|
+
children: i
|
|
84
|
+
}) : null,
|
|
85
|
+
/* @__PURE__ */ o(_, {
|
|
86
|
+
title: r,
|
|
87
|
+
description: a
|
|
88
|
+
}),
|
|
89
|
+
n ? null : /* @__PURE__ */ o("span", {
|
|
90
|
+
"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, {
|
|
94
|
+
initial: { scale: 0 },
|
|
95
|
+
animate: { scale: 1 },
|
|
96
|
+
transition: g
|
|
97
|
+
}),
|
|
98
|
+
className: "bg-pho-on-brand size-1.5 rounded-full"
|
|
99
|
+
})
|
|
90
100
|
})
|
|
91
|
-
|
|
92
|
-
title: r,
|
|
93
|
-
description: a
|
|
94
|
-
})]
|
|
101
|
+
]
|
|
95
102
|
});
|
|
96
103
|
}
|
|
97
104
|
P.displayName = "RadioCard";
|
|
@@ -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>\n <span className=\"text-pho-primary block\">{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 or the radio dot. The tile *is*\n * the radio (see `usePressPulse`); 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 ) : (\n <span\n aria-hidden\n className={cn(\n \"bg-pho-primary ring-pho-primary mt-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 <CardCopy title={title} description={description} />\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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A,IACA,GAAI;AAAA,IARN,UAAA,CAUG,IACC,gBAAA,EAAC,QAAD;AAAA,MACE,eAAA;AAAA,MACA,WAAU;AAAA,MAET,UAAA;AAAA,IACG,CAAA,IAEN,gBAAA,EAAC,QAAD;AAAA,MACE,eAAA;AAAA,MACA,WAAW,EACT,0HACA,4HACA,yIACF;AAAA,MAEA,UAAA,gBAAA,EAAC,EAAU,WAAX;AAAA,QACE,QACE,gBAAA,EAAC,EAAO,MAAR;AAAA,UACE,SAAS,EAAE,OAAO,EAAE;AAAA,UACpB,SAAS,EAAE,OAAO,EAAE;AAAA,UACpB,YAAY;AAAA,QACb,CAAA;AAAA,QAEH,WAAU;AAAA,MACX,CAAA;AAAA,IACG,CAAA,GAER,gBAAA,EAAC,GAAD;AAAA,MAAiB,OAAA;AAAA,MAAoB,aAAA;AAAA,IAAc,CAAA,CACrC;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\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,E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CAAA;AAAA,UAEH,WAAU;AAAA,QACX,CAAA;AAAA,MACG,CAAA;AAAA,IAEM;AAAA;AAEpB;AAEA,EAAU,cAAc"}
|
|
@@ -7,9 +7,9 @@ import { createContext as g, useContext as h } from "react";
|
|
|
7
7
|
import { jsx as r } from "react/jsx-runtime";
|
|
8
8
|
import { motion as f } from "motion/react";
|
|
9
9
|
import { Select as o } from "@base-ui/react/select";
|
|
10
|
-
var
|
|
10
|
+
var l = g(!1), y = 0.99, b = p;
|
|
11
11
|
function x({ multiple: e = !1, ...t }) {
|
|
12
|
-
return /* @__PURE__ */ r(
|
|
12
|
+
return /* @__PURE__ */ r(l.Provider, {
|
|
13
13
|
value: !!e,
|
|
14
14
|
children: /* @__PURE__ */ r(o.Root, {
|
|
15
15
|
multiple: e,
|
|
@@ -19,16 +19,16 @@ function x({ multiple: e = !1, ...t }) {
|
|
|
19
19
|
}
|
|
20
20
|
var v = o.Value, I = o.Portal, N = o.List, P = o.Group, S = a("flex cursor-pointer items-center justify-between gap-2 text-base select-none", "transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:text-pho-secondary [&_svg]:size-4");
|
|
21
21
|
function w({ className: e, disabled: t, variant: n = "default", onPointerDown: s, ...i }) {
|
|
22
|
-
const
|
|
23
|
-
scale:
|
|
24
|
-
transition:
|
|
22
|
+
const c = n === "inline", { motionProps: d } = u({
|
|
23
|
+
scale: c ? y : 0.98,
|
|
24
|
+
transition: c ? b : void 0,
|
|
25
25
|
disabled: !!t
|
|
26
26
|
});
|
|
27
27
|
return /* @__PURE__ */ r(o.Trigger, {
|
|
28
28
|
disabled: t,
|
|
29
29
|
onPointerDown: s,
|
|
30
30
|
render: /* @__PURE__ */ r(f.button, { ...d }),
|
|
31
|
-
className: a(S,
|
|
31
|
+
className: a(S, c ? "rounded-base min-w-0 bg-transparent focus-visible:outline-none" : a("bg-pho-primary ring-pho-primary text-pho-primary rounded-base min-w-44 px-3 py-2 ring-1 ring-inset focus-visible:outline-none", "data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2"), e),
|
|
32
32
|
...i
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -66,7 +66,7 @@ function L({ className: e, ...t }) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
function z({ className: e, children: t, ...n }) {
|
|
69
|
-
const s = h(
|
|
69
|
+
const s = h(l), i = t ?? /* @__PURE__ */ r(m, {});
|
|
70
70
|
return s ? /* @__PURE__ */ r("span", {
|
|
71
71
|
"aria-hidden": !0,
|
|
72
72
|
className: a("col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset", "bg-pho-primary ring-pho-primary text-pho-on-brand", "transition-[background-color,box-shadow,color] duration-150 ease-out", "group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { SPRING_PRESS_INLINE } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { IconCheck } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\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/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = SPRING_PRESS_INLINE;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <BaseSelect.Root multiple={multiple} {...props} />\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base min-w-44 px-3 py-2 ring-1 ring-inset\",\n \"data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] 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 data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <IconCheck />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.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 * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;;;;;AAuBA,IAAM,IAAwB,EAAc,EAAK,GAM3C,IAAqB,MACrB,IAAsB;AAE5B,SAAS,EAAK,EACZ,UAAA,IAAW,IACX,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAsB,UAAvB;AAAA,IAAgC,OAAO,EAAQ;AAAA,IAC7C,UAAA,gBAAA,EAAC,EAAW,MAAZ;AAAA,MAA2B,UAAA;AAAA,MAAU,GAAI;AAAA,IAAQ,CAAA;AAAA,EACnB,CAAA;AAEpC;AAEA,IAAM,IAAQ,EAAW,OACnB,IAAS,EAAW,QACpB,IAAO,EAAW,MAClB,IAAQ,EAAW,OAGnB,IAAe,EACnB,gFAEA,sFACA,iEACA,2CACF;AAEA,SAAS,EAAQ,EACf,WAAA,GACA,UAAA,GACA,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AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAW,UAAZ;AAAA,IAGE,WAAW,EAAG,uBAAuB,CAAS;AAAA,IAC9C,GAAI;AAAA,EACL,CAAA;AAEL;AAOA,SAAS,EAAc,EACrB,WAAA,GACA,UAAA,GACA,GAAG,EAAA,GACuE;AAC1E,QAAM,IAAW,EAAW,CAAqB,GAC3C,IAAO,KAAY,gBAAA,EAAC,GAAD,CAAY,CAAA;AAErC,SAAI,IAEA,gBAAA,EAAC,QAAD;AAAA,IACE,eAAA;AAAA,IACA,WAAW,EACT,6FACA,qDAEA,wEACA,mGACF;AAAA,IAEA,UAAA,gBAAA,EAAC,EAAW,eAAZ;AAAA,MACE,WAAW,EACT,mDAEA,wDACA,kEACA,8DACA,CACF;AAAA,MACA,GAAI;AAAA,MAEH,UAAA;AAAA,IACuB,CAAA;AAAA,EACtB,CAAA,IAKR,gBAAA,EAAC,EAAW,eAAZ;AAAA,IACE,WAAW,EACT,qFACA,CACF;AAAA,IACA,GAAI;AAAA,IAEH,UAAA;AAAA,EACuB,CAAA;AAE9B;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACE,WAAW,EACT,wDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAUA,IAAa,IAAS;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AACF"}
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { SPRING_PRESS_INLINE } from \"../../motion\";\nimport { motion } from \"motion/react\";\nimport { IconCheck } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePressPulse } from \"../../utils/use-press-pulse\";\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/** Lets `ItemIndicator` know whether the Root is in `multiple` mode. */\nconst SelectMultipleContext = createContext(false);\n\nexport type SelectTriggerVariant = \"default\" | \"inline\";\n\n// Inline rides someone else's surface, so its pulse is shallower and snappier\n// than the default field's (0.98 / stiffness 700) — felt, not seen moving.\nconst INLINE_PRESS_SCALE = 0.99;\nconst INLINE_PRESS_SPRING = SPRING_PRESS_INLINE;\n\nfunction Root({\n multiple = false,\n ...props\n}: ComponentProps<typeof BaseSelect.Root>) {\n return (\n <SelectMultipleContext.Provider value={Boolean(multiple)}>\n <BaseSelect.Root multiple={multiple} {...props} />\n </SelectMultipleContext.Provider>\n );\n}\n\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\n\n// Shared by both Trigger variants — layout, easing, disabled, icon tone.\nconst TRIGGER_BASE = cn(\n \"flex cursor-pointer items-center justify-between gap-2 text-base select-none\",\n // Colors/stroke ease briefly; transform stays out (Motion owns it).\n \"transition-[color,background-color,box-shadow,outline-color] duration-150 ease-out\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\n);\n\nfunction Trigger({\n className,\n disabled,\n variant = \"default\",\n onPointerDown,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger> & {\n /**\n * `inline` drops the field chrome (ring, background, padding, min-width)\n * to ride a host surface — an Input Group addon, a toolbar — which then\n * carries the focus/open treatment. The press pulse moves to the arrow.\n * @default \"default\"\n */\n variant?: SelectTriggerVariant;\n}) {\n // One-shot press pulse (fires on pointer-down, always completes) — the\n // Effect Button gesture family adapted for a field-sized control. Both\n // variants pulse the whole trigger; inline is shallower and quicker.\n const inline = variant === \"inline\";\n const { motionProps } = usePressPulse({\n scale: inline ? INLINE_PRESS_SCALE : 0.98,\n transition: inline ? INLINE_PRESS_SPRING : undefined,\n disabled: Boolean(disabled),\n });\n\n return (\n <BaseSelect.Trigger\n disabled={disabled}\n onPointerDown={onPointerDown}\n // Motion owns transform; a caller-supplied `render` in props still wins.\n render={<motion.button {...motionProps} />}\n className={cn(\n TRIGGER_BASE,\n inline\n ? // Chrome-free: no surface of its own, text inherits the host\n // tone, and the host shows focus (e.g. Input Group's shared ring).\n \"rounded-base min-w-0 bg-transparent focus-visible:outline-none\"\n : cn(\n // Flat field surface — shadows are reserved for floating\n // layers; the 15% ring-pho-primary hairline is the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base min-w-44 px-3 py-2 ring-1 ring-inset focus-visible:outline-none\",\n // Open or focused, the edge is Input's: the brand ring at 2px,\n // inset, in place of the hairline.\n \"data-[popup-open]:ring-pho-brand focus-visible:ring-pho-brand focus-visible:ring-2 data-[popup-open]:ring-2\",\n ),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Icon({ className, ...props }: StyledProps<typeof BaseSelect.Icon>) {\n return (\n <BaseSelect.Icon\n className={cn(\"flex shrink-0 items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n align = \"start\",\n alignItemWithTrigger = false,\n ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\n align={align}\n // Base UI defaults to the macOS-style overlap (popup covers the trigger\n // so the selected item sits on the value text) — disorienting in a page\n // flow, so Pho drops the list below the field like a menu instead.\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseSelect.Popup>) {\n return (\n <BaseSelect.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow, edged with the site\n // hairline (ring-pho-secondary, #eee/#202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-h-[var(--available-height)] min-w-[var(--anchor-width)] origin-[var(--transform-origin)] overflow-y-auto p-1 ring-1 outline-none ring-inset\",\n // Effect-Button animation family, faster: the open springs from the\n // trigger edge with a slight overshoot; close is a quick ease-out.\n \"transition-[transform,opacity] duration-[140ms] ease-[cubic-bezier(0.34,1.3,0.64,1)]\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 data-[ending-style]:ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n // Fixed 1rem leading column: the selection mark lives there, so every\n // label starts at the same x whether or not it is selected.\n // `group/pho-item` feeds the multiple-mode checkbox indicator.\n \"group/pho-item text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] 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 data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemText({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemText>) {\n return (\n <BaseSelect.ItemText\n // Pin to column 2: when the single-select indicator unmounts, grid\n // auto-placement would otherwise pull the label into the mark column.\n className={cn(\"col-start-2 min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Leading selection mark, mode-aware. Single: a brand check that appears in\n * the reserved column. Multiple: an always-visible checkbox box that fills\n * with the same quiet fill/stroke ease as the standalone Checkbox.\n */\nfunction ItemIndicator({\n className,\n children,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator> & { children?: ReactNode }) {\n const multiple = useContext(SelectMultipleContext);\n const mark = children ?? <IconCheck />;\n\n if (multiple) {\n return (\n <span\n aria-hidden\n className={cn(\n \"col-start-1 flex size-4 shrink-0 items-center justify-center rounded-sm ring-1 ring-inset\",\n \"bg-pho-primary ring-pho-primary text-pho-on-brand\",\n // Fill + stroke ease together on toggle — Checkbox's transition.\n \"transition-[background-color,box-shadow,color] duration-150 ease-out\",\n \"group-data-[selected]/pho-item:bg-pho-brand-solid group-data-[selected]/pho-item:ring-transparent\",\n )}\n >\n <BaseSelect.ItemIndicator\n className={cn(\n \"flex items-center justify-center [&>svg]:size-3\",\n // Glyph pops with the fill; exits on the same path.\n \"transition-[transform,opacity] duration-150 ease-out\",\n \"data-[starting-style]:scale-50 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-50 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n </span>\n );\n }\n\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex size-4 items-center justify-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n >\n {mark}\n </BaseSelect.ItemIndicator>\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.GroupLabel>) {\n return (\n <BaseSelect.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 * Select built on Base UI `Select` — pick one option (or several with\n * `multiple`) from a list that opens below the trigger on click; the pattern\n * other design systems call a picker. Pass `items` to `Select.Root`, render an\n * `Item` per option, and show the selection with `Select.Value`. For a short,\n * always-visible set use `RadioGroup`; to filter a long list by typing use\n * `Combobox`.\n */\nexport const Select = {\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Positioner,\n Popup,\n List,\n Item,\n ItemText,\n ItemIndicator,\n Group,\n GroupLabel,\n};\n"],"mappings":";;;;;;;;;AAuBA,IAAM,IAAwB,EAAc,EAAK,GAM3C,IAAqB,MACrB,IAAsB;AAE5B,SAAS,EAAK,EACZ,UAAA,IAAW,IACX,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAsB,UAAvB;AAAA,IAAgC,OAAO,EAAQ;AAAA,IAC7C,UAAA,gBAAA,EAAC,EAAW,MAAZ;AAAA,MAA2B,UAAA;AAAA,MAAU,GAAI;AAAA,IAAQ,CAAA;AAAA,EACnB,CAAA;AAEpC;AAEA,IAAM,IAAQ,EAAW,OACnB,IAAS,EAAW,QACpB,IAAO,EAAW,MAClB,IAAQ,EAAW,OAGnB,IAAe,EACnB,gFAEA,sFACA,iEACA,2CACF;AAEA,SAAS,EAAQ,EACf,WAAA,GACA,UAAA,GACA,SAAA,IAAU,WACV,eAAA,GACA,GAAG,EAAA,GASF;AAID,QAAM,IAAS,MAAY,UACrB,EAAE,aAAA,EAAA,IAAgB,EAAc;AAAA,IACpC,OAAO,IAAS,IAAqB;AAAA,IACrC,YAAY,IAAS,IAAsB;AAAA,IAC3C,UAAU,EAAQ;AAAA,EACpB,CAAC;AAED,SACE,gBAAA,EAAC,EAAW,SAAZ;AAAA,IACY,UAAA;AAAA,IACK,eAAA;AAAA,IAEf,QAAQ,gBAAA,EAAC,EAAO,QAAR,EAAe,GAAI,EAAc,CAAA;AAAA,IACzC,WAAW,EACT,GACA,IAGI,mEACA,EAGE,iIAGA,6GACF,GACJ,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC1E,SACE,gBAAA,EAAC,EAAW,MAAZ;AAAA,IACE,WAAW,EAAG,8BAA8B,CAAS;AAAA,IACrD,GAAI;AAAA,E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EACtB,CAAA,IAKR,gBAAA,EAAC,EAAW,eAAZ;AAAA,IACE,WAAW,EACT,qFACA,CACF;AAAA,IACA,GAAI;AAAA,IAEH,UAAA;AAAA,EACuB,CAAA;AAE9B;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACE,WAAW,EACT,wDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAUA,IAAa,IAAS;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AACF"}
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { n as c, r as G, t as U } from "./chunks/use-press-pulse-IbNstUT0.js";
|
|
|
8
8
|
import "./utils.js";
|
|
9
9
|
import { a as F, c as W, d as b, i as g, l as h, n as k, o as X, r as v, s as Z, t as w, u as x } from "./chunks/button-CdqS_t5a.js";
|
|
10
10
|
import { a as K, c as Y, i as z, l as Q, n as j, o as q, r as y, s as J, t as $ } from "./chunks/error-D0yoFxCv.js";
|
|
11
|
-
import { a as as, c as Es, d as ts, f as _s, i as rs, l as Ss, m as os, n as As, o as Rs, p as Is, r as is, s as Ts, t as ms, u as es } from "./chunks/basic-page-
|
|
12
|
-
import { o as Ps } from "./chunks/data-table-
|
|
11
|
+
import { a as as, c as Es, d as ts, f as _s, i as rs, l as Ss, m as os, n as As, o as Rs, p as Is, r as is, s as Ts, t as ms, u as es } from "./chunks/basic-page-BI8y4hHk.js";
|
|
12
|
+
import { o as Ps } from "./chunks/data-table-Cmz0p-jt.js";
|
|
13
13
|
import { a as Ns, c as Bs, i as ps, n as Os, o as fs, r as us, s as Ls, t as Ds } from "./chunks/sidebar-DVzZsCts.js";
|
|
14
14
|
import { t as Vs } from "./chunks/input-DjvZoF8v.js";
|
|
15
15
|
import { t as Gs } from "./chunks/close-button-GvqWbLl0.js";
|
package/dist/primitives/field.js
CHANGED
package/dist/primitives/form.js
CHANGED
package/dist/primitives/input.js
CHANGED
package/dist/primitives/menu.js
CHANGED
package/dist/primitives/meter.js
CHANGED
package/dist/primitives/radio.js
CHANGED
package/dist/primitives/tabs.js
CHANGED
package/dist/primitives/toast.js
CHANGED
package/dist/primitives.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as s, c as A, d as E, f as a, i as C, l as S, m as o, n as I, o as e, p as B, r as P, s as N, t as r, u as t } from "../chunks/basic-page-
|
|
3
|
-
import { o as R } from "../chunks/data-table-
|
|
2
|
+
import { a as s, c as A, d as E, f as a, i as C, l as S, m as o, n as I, o as e, p as B, r as P, s as N, t as r, u as t } from "../chunks/basic-page-BI8y4hHk.js";
|
|
3
|
+
import { o as R } from "../chunks/data-table-Cmz0p-jt.js";
|
|
4
4
|
export {
|
|
5
5
|
r as AUTO_SAVE_DELAY_MS,
|
|
6
6
|
I as BASIC_PAGE_CALLOUT,
|