@photon-ai/pho-ui 0.7.1 → 1.0.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/avatar-CiAvJNNs.js +99 -0
- package/dist/chunks/avatar-CiAvJNNs.js.map +1 -0
- package/dist/chunks/close-button-8f-oRJXt.js +420 -0
- package/dist/chunks/close-button-8f-oRJXt.js.map +1 -0
- package/dist/chunks/{cn-7uGUzCOM.js → cn-DTiB6ek_.js} +4 -2
- package/dist/chunks/{cn-7uGUzCOM.js.map → cn-DTiB6ek_.js.map} +1 -1
- package/dist/chunks/dialog-Bgb2Z1_v.js +141 -0
- package/dist/chunks/dialog-Bgb2Z1_v.js.map +1 -0
- package/dist/chunks/{input-DbJpdu6v.js → input-BSJGBUbf.js} +36 -36
- package/dist/chunks/input-BSJGBUbf.js.map +1 -0
- package/dist/chunks/menu-COLB_liS.js +205 -0
- package/dist/chunks/menu-COLB_liS.js.map +1 -0
- package/dist/chunks/{sidebar-CivriTLb.js → sidebar-16Pfn7IC.js} +12 -12
- package/dist/chunks/sidebar-16Pfn7IC.js.map +1 -0
- package/dist/chunks/spinner-Cy8bkyJf.js +54 -0
- package/dist/chunks/spinner-Cy8bkyJf.js.map +1 -0
- package/dist/components/accordion.js +21 -21
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +26 -26
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/autocomplete.js +46 -46
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button.js +11 -11
- package/dist/components/checkbox.js +3 -3
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.js +8 -8
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js +69 -69
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/context-menu.js +57 -44
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +3 -2
- package/dist/components/drawer.js +15 -15
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/field.js +18 -18
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +9 -9
- package/dist/components/fieldset.js.map +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.js +6 -6
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/menu.js +6 -4
- package/dist/components/menubar.js +5 -5
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/meter.js +20 -20
- package/dist/components/meter.js.map +1 -1
- package/dist/components/navigation-menu.js +8 -8
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/notification.js +24 -24
- package/dist/components/notification.js.map +1 -1
- package/dist/components/number-field.js +32 -32
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/otp-field.js +5 -5
- package/dist/components/otp-field.js.map +1 -1
- package/dist/components/popover.js +10 -10
- package/dist/components/popover.js.map +1 -1
- package/dist/components/preview-card.js +8 -8
- package/dist/components/preview-card.js.map +1 -1
- package/dist/components/progress.js +25 -25
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +13 -13
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +27 -27
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/slider.js +17 -17
- package/dist/components/slider.js.map +1 -1
- package/dist/components/spinner.js +6 -0
- package/dist/components/switch.js +10 -10
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +16 -16
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/theme-toggle.js +199 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/components/toast.js +24 -24
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +5 -5
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/toolbar.js +8 -8
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +10 -10
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +29 -28
- package/dist/sections/sidebar.js +1 -1
- package/dist/src/components/avatar/avatar.d.ts +24 -2
- package/dist/src/components/avatar/index.d.ts +1 -1
- package/dist/src/components/button/button.d.ts +58 -44
- package/dist/src/components/button/index.d.ts +1 -1
- package/dist/src/components/dialog/dialog.d.ts +50 -7
- package/dist/src/components/dialog/index.d.ts +1 -1
- package/dist/src/components/menu/index.d.ts +1 -1
- package/dist/src/components/menu/menu-pending.d.ts +43 -0
- package/dist/src/components/spinner/index.d.ts +1 -0
- package/dist/src/components/spinner/spinner.d.ts +32 -0
- package/dist/src/components/theme-toggle/index.d.ts +1 -0
- package/dist/src/components/theme-toggle/theme-toggle.d.ts +77 -0
- package/dist/src/sections/sidebar/sidebar.d.ts +5 -6
- package/dist/utils.js +1 -1
- package/package.json +9 -1
- package/src/styles/fonts.css +14 -18
- package/src/styles/pho.css +11 -0
- package/src/styles/theme.css +182 -146
- package/dist/chunks/avatar-Bb4RZQIa.js +0 -53
- package/dist/chunks/avatar-Bb4RZQIa.js.map +0 -1
- package/dist/chunks/button-CQ4cZvkC.js +0 -365
- package/dist/chunks/button-CQ4cZvkC.js.map +0 -1
- package/dist/chunks/close-button-CNhn8z0w.js +0 -29
- package/dist/chunks/close-button-CNhn8z0w.js.map +0 -1
- package/dist/chunks/dialog-7oOe-eaO.js +0 -63
- package/dist/chunks/dialog-7oOe-eaO.js.map +0 -1
- package/dist/chunks/input-DbJpdu6v.js.map +0 -1
- package/dist/chunks/menu-BfaNHnOp.js +0 -101
- package/dist/chunks/menu-BfaNHnOp.js.map +0 -1
- package/dist/chunks/sidebar-CivriTLb.js.map +0 -1
- package/dist/src/components/context-menu/context-menu.d.ts +0 -34
- package/dist/src/components/menu/menu.d.ts +0 -47
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t } from "../chunks/cn-
|
|
2
|
+
import { t as n } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
-
import { NumberField as
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */ o(
|
|
8
|
-
className:
|
|
9
|
-
...
|
|
5
|
+
import { NumberField as t } from "@base-ui/react/number-field";
|
|
6
|
+
function s({ className: e, ...r }) {
|
|
7
|
+
return /* @__PURE__ */ o(t.Root, {
|
|
8
|
+
className: n("flex flex-col gap-1.5", e),
|
|
9
|
+
...r
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
14
|
-
className:
|
|
15
|
-
...
|
|
12
|
+
function i({ className: e, ...r }) {
|
|
13
|
+
return /* @__PURE__ */ o(t.Group, {
|
|
14
|
+
className: n("bg-pho-primary ring-pho-primary rounded-base inline-flex items-stretch ring-1 transition-shadow duration-100 ease-linear ring-inset", "has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2", e),
|
|
15
|
+
...r
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
var a =
|
|
19
|
-
function u({ className:
|
|
20
|
-
return /* @__PURE__ */ o(
|
|
21
|
-
className:
|
|
22
|
-
...
|
|
18
|
+
var a = n("text-pho-secondary hover:text-pho-secondary-hover hover:bg-pho-primary-hover flex w-9 cursor-pointer items-center justify-center transition duration-100 ease-linear select-none first:rounded-l-lg last:rounded-r-lg", "disabled:cursor-not-allowed disabled:opacity-50 [&>svg]:size-4");
|
|
19
|
+
function u({ className: e, ...r }) {
|
|
20
|
+
return /* @__PURE__ */ o(t.Decrement, {
|
|
21
|
+
className: n(a, e),
|
|
22
|
+
...r
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function c({ className:
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
27
|
-
className:
|
|
28
|
-
...
|
|
25
|
+
function c({ className: e, ...r }) {
|
|
26
|
+
return /* @__PURE__ */ o(t.Increment, {
|
|
27
|
+
className: n(a, e),
|
|
28
|
+
...r
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function l({ className:
|
|
32
|
-
return /* @__PURE__ */ o(
|
|
33
|
-
className:
|
|
34
|
-
...
|
|
31
|
+
function l({ className: e, ...r }) {
|
|
32
|
+
return /* @__PURE__ */ o(t.Input, {
|
|
33
|
+
className: n("text-pho-primary placeholder:text-pho-placeholder text-md border-pho-secondary w-16 border-x bg-transparent px-2 py-2 text-center tabular-nums outline-none", e),
|
|
34
|
+
...r
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
function p({ className:
|
|
38
|
-
return /* @__PURE__ */ o(
|
|
39
|
-
className:
|
|
40
|
-
...
|
|
37
|
+
function p({ className: e, ...r }) {
|
|
38
|
+
return /* @__PURE__ */ o(t.ScrubArea, {
|
|
39
|
+
className: n("cursor-ew-resize select-none", e),
|
|
40
|
+
...r
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
var
|
|
44
|
-
Root:
|
|
45
|
-
Group:
|
|
43
|
+
var f = {
|
|
44
|
+
Root: s,
|
|
45
|
+
Group: i,
|
|
46
46
|
Decrement: u,
|
|
47
47
|
Increment: c,
|
|
48
48
|
Input: l,
|
|
49
49
|
ScrubArea: p,
|
|
50
|
-
ScrubAreaCursor:
|
|
50
|
+
ScrubAreaCursor: t.ScrubAreaCursor
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
f as NumberField
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
//# sourceMappingURL=number-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-field.js","names":[],"sources":["../../src/components/number-field/number-field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { NumberField as BaseNumberField } from \"@base-ui/react/number-field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Root>) {\n return (\n <BaseNumberField.Root\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...props}\n />\n );\n}\n\nfunction Group({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Group>) {\n return (\n <BaseNumberField.Group\n className={cn(\n // Flat field surface — the ring hairline carries the edge (no shadow;\n // shadows are reserved for floating layers). `transition-shadow` still\n // animates the focus ring, which Tailwind renders as a box-shadow.\n \"bg-pho-primary ring-pho-primary inline-flex items-stretch
|
|
1
|
+
{"version":3,"file":"number-field.js","names":[],"sources":["../../src/components/number-field/number-field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { NumberField as BaseNumberField } from \"@base-ui/react/number-field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Root>) {\n return (\n <BaseNumberField.Root\n className={cn(\"flex flex-col gap-1.5\", className)}\n {...props}\n />\n );\n}\n\nfunction Group({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Group>) {\n return (\n <BaseNumberField.Group\n className={cn(\n // Flat field surface — the ring hairline carries the edge (no shadow;\n // shadows are reserved for floating layers). `transition-shadow` still\n // animates the focus ring, which Tailwind renders as a box-shadow.\n \"bg-pho-primary ring-pho-primary rounded-base inline-flex items-stretch ring-1 transition-shadow duration-100 ease-linear ring-inset\",\n \"has-[input:focus-visible]:ring-pho-brand has-[input:focus-visible]:ring-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst STEPPER = cn(\n \"text-pho-secondary hover:text-pho-secondary-hover hover:bg-pho-primary-hover flex w-9 cursor-pointer items-center justify-center transition duration-100 ease-linear select-none first:rounded-l-lg last:rounded-r-lg\",\n \"disabled:cursor-not-allowed disabled:opacity-50 [&>svg]:size-4\",\n);\n\nfunction Decrement({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Decrement>) {\n return (\n <BaseNumberField.Decrement className={cn(STEPPER, className)} {...props} />\n );\n}\n\nfunction Increment({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Increment>) {\n return (\n <BaseNumberField.Increment className={cn(STEPPER, className)} {...props} />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.Input>) {\n return (\n <BaseNumberField.Input\n className={cn(\n \"text-pho-primary placeholder:text-pho-placeholder text-md border-pho-secondary w-16 border-x bg-transparent px-2 py-2 text-center tabular-nums outline-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ScrubArea({\n className,\n ...props\n}: StyledProps<typeof BaseNumberField.ScrubArea>) {\n return (\n <BaseNumberField.ScrubArea\n className={cn(\"cursor-ew-resize select-none\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Numeric input with stepper buttons, built on Base UI `NumberField`. Compose\n * `NumberField.Group` with a `Decrement`, `Input`, and `Increment`; it handles\n * clamping, keyboard step, and pointer scrubbing. Use it over a plain text\n * input whenever the value is a number with a sensible range.\n */\nexport const NumberField = {\n Root,\n Group,\n Decrement,\n Increment,\n Input,\n ScrubArea,\n ScrubAreaCursor: BaseNumberField.ScrubAreaCursor,\n};\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACwC;AAC3C,SACE,gBAAA,EAAC,EAAgB,MAAjB;AAAA,IACE,WAAW,EAAG,yBAAyB,CAAS;AAAA,IAChD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EAIT,uIACA,6EACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,IAAM,IAAU,EACd,yNACA,gEACF;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IAA2B,WAAW,EAAG,GAAS,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IAA2B,WAAW,EAAG,GAAS,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EACT,+JACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC6C;AAChD,SACE,gBAAA,EAAC,EAAgB,WAAjB;AAAA,IACE,WAAW,EAAG,gCAAgC,CAAS;AAAA,IACvD,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAc;AAAA,EACzB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,OAAA;AAAA,EACA,WAAA;AAAA,EACA,iBAAiB,EAAgB;AACnC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as e } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import { OTPField as t } from "@base-ui/react/otp-field";
|
|
6
6
|
function s({ className: o, length: i, ...a }) {
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ r(t.Root, {
|
|
8
8
|
length: i,
|
|
9
|
-
className:
|
|
9
|
+
className: e("flex items-center gap-2", o),
|
|
10
10
|
...a,
|
|
11
|
-
children: Array.from({ length: i }, (
|
|
11
|
+
children: Array.from({ length: i }, (d, n) => /* @__PURE__ */ r(t.Input, { className: e("bg-pho-primary ring-pho-primary text-pho-primary rounded-base size-11 text-center text-lg font-medium ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset", "focus-visible:ring-pho-brand focus-visible:ring-2", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50") }, n))
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
s.displayName = "OtpField";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp-field.js","names":[],"sources":["../../src/components/otp-field/otp-field.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { OTPField as BaseOTPField } from \"@base-ui/react/otp-field\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface OtpFieldProps extends Omit<\n ComponentProps<typeof BaseOTPField.Root>,\n \"className\"\n> {\n /** Class applied to the cell row. */\n className?: string;\n /** Number of single-character cells. */\n length: number;\n}\n\n/**\n * One-time-code input built on Base UI `OTPField` — a row of single-character\n * cells with paste, arrow-key, and auto-advance handling. Control with `value`\n * / `onValueChange`, or read the completed code via `onValueChange`.\n */\nexport function OtpField({ className, length, ...props }: OtpFieldProps) {\n return (\n <BaseOTPField.Root\n length={length}\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n >\n {Array.from({ length }, (_, i) => (\n <BaseOTPField.Input\n key={i}\n className={cn(\n // Flat field surface — shadows are reserved for floating layers;\n // the 15% ring-pho-primary hairline carries the input edge.\n \"
|
|
1
|
+
{"version":3,"file":"otp-field.js","names":[],"sources":["../../src/components/otp-field/otp-field.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { OTPField as BaseOTPField } from \"@base-ui/react/otp-field\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface OtpFieldProps extends Omit<\n ComponentProps<typeof BaseOTPField.Root>,\n \"className\"\n> {\n /** Class applied to the cell row. */\n className?: string;\n /** Number of single-character cells. */\n length: number;\n}\n\n/**\n * One-time-code input built on Base UI `OTPField` — a row of single-character\n * cells with paste, arrow-key, and auto-advance handling. Control with `value`\n * / `onValueChange`, or read the completed code via `onValueChange`.\n */\nexport function OtpField({ className, length, ...props }: OtpFieldProps) {\n return (\n <BaseOTPField.Root\n length={length}\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n >\n {Array.from({ length }, (_, i) => (\n <BaseOTPField.Input\n key={i}\n className={cn(\n // Flat field surface — shadows are reserved for floating layers;\n // the 15% ring-pho-primary hairline carries the input edge.\n \"bg-pho-primary ring-pho-primary text-pho-primary rounded-base size-11 text-center text-lg font-medium ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset\",\n \"focus-visible:ring-pho-brand focus-visible:ring-2\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n )}\n />\n ))}\n </BaseOTPField.Root>\n );\n}\n\nOtpField.displayName = \"OtpField\";\n"],"mappings":";;;;;AAmBA,SAAgB,EAAS,EAAE,WAAA,GAAW,QAAA,GAAQ,GAAG,EAAA,GAAwB;AACvE,SACE,gBAAA,EAAC,EAAa,MAAd;AAAA,IACU,QAAA;AAAA,IACR,WAAW,EAAG,2BAA2B,CAAS;AAAA,IAClD,GAAI;AAAA,cAEH,MAAM,KAAK,EAAE,QAAA,EAAO,GAAA,CAAI,GAAG,MAC1B,gBAAA,EAAC,EAAa,OAAd,EAEE,WAAW,EAGT,mLACA,qDACA,+DACF,EACD,GARM,CAQN,CACF;AAAA,EACgB,CAAA;AAEvB;AAEA,EAAS,cAAc"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "../chunks/cn-
|
|
2
|
+
import { t as e } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
import { Popover as t } from "@base-ui/react/popover";
|
|
6
|
-
var n = t.Root, s = t.Trigger, p = t.Portal,
|
|
6
|
+
var n = t.Root, s = t.Trigger, p = t.Portal, c = t.Close;
|
|
7
7
|
function m({ className: r, sideOffset: o = 8, ...i }) {
|
|
8
8
|
return /* @__PURE__ */ a(t.Positioner, {
|
|
9
9
|
sideOffset: o,
|
|
@@ -11,36 +11,36 @@ function m({ className: r, sideOffset: o = 8, ...i }) {
|
|
|
11
11
|
...i
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function l({ className: r, ...o }) {
|
|
15
15
|
return /* @__PURE__ */ a(t.Popup, {
|
|
16
|
-
className: e("
|
|
16
|
+
className: e("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-w-[calc(100vw-2rem)] origin-[var(--transform-origin)] p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", r),
|
|
17
17
|
...o
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function u({ className: r, ...o }) {
|
|
21
21
|
return /* @__PURE__ */ a(t.Title, {
|
|
22
|
-
className: e("text-pho-primary text-
|
|
22
|
+
className: e("text-pho-primary text-base font-medium", r),
|
|
23
23
|
...o
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
function g({ className: r, ...o }) {
|
|
27
27
|
return /* @__PURE__ */ a(t.Description, {
|
|
28
|
-
className: e("text-pho-
|
|
28
|
+
className: e("text-pho-description mt-1 text-base", r),
|
|
29
29
|
...o
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var P = {
|
|
33
33
|
Root: n,
|
|
34
34
|
Trigger: s,
|
|
35
35
|
Portal: p,
|
|
36
36
|
Positioner: m,
|
|
37
|
-
Popup:
|
|
37
|
+
Popup: l,
|
|
38
38
|
Title: u,
|
|
39
39
|
Description: g,
|
|
40
|
-
Close:
|
|
40
|
+
Close: c
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
P as Popover
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
//# sourceMappingURL=popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":[],"sources":["../../src/components/popover/popover.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePopover.Root;\nconst Trigger = BasePopover.Trigger;\nconst Portal = BasePopover.Portal;\nconst Close = BasePopover.Close;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePopover.Positioner>) {\n return (\n <BasePopover.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BasePopover.Popup>) {\n return (\n <BasePopover.Popup\n className={cn(\n // Floating layer: keeps shadow elevation; ring-pho-secondary is the\n // site card-hairline edge (#eee / #202020).\n \"
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../src/components/popover/popover.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePopover.Root;\nconst Trigger = BasePopover.Trigger;\nconst Portal = BasePopover.Portal;\nconst Close = BasePopover.Close;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePopover.Positioner>) {\n return (\n <BasePopover.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BasePopover.Popup>) {\n return (\n <BasePopover.Popup\n className={cn(\n // Floating layer: keeps shadow elevation; ring-pho-secondary is the\n // site card-hairline edge (#eee / #202020).\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base max-w-[calc(100vw-2rem)] origin-[var(--transform-origin)] p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BasePopover.Title>) {\n return (\n <BasePopover.Title\n className={cn(\"text-pho-primary text-base font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BasePopover.Description>) {\n return (\n <BasePopover.Description\n className={cn(\"text-pho-description mt-1 text-base\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Popover built on Base UI `Popover` — a click-triggered floating panel\n * anchored to its trigger, for rich, interactive content (forms, menus of\n * actions, details). Unlike a `Tooltip`, it can hold focusable controls and is\n * dismissed by clicking away or pressing Escape.\n */\nexport const Popover = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Title,\n Description,\n Close,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAY,MACnB,IAAU,EAAY,SACtB,IAAS,EAAY,QACrB,IAAQ,EAAY;AAE1B,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GAC0C;AAC7C,SACE,gBAAA,EAAC,EAAY,YAAb;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,QAAQ,CAAS;AAAA,IAC/B,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC7E,SACE,gBAAA,EAAC,EAAY,OAAb;AAAA,IACE,WAAW,EAGT,mOACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC7E,SACE,gBAAA,EAAC,EAAY,OAAb;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,WAAA,GACA,GAAG,EAAA,GAC2C;AAC9C,SACE,gBAAA,EAAC,EAAY,aAAb;AAAA,IACE,WAAW,EAAG,uCAAuC,CAAS;AAAA,IAC9D,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAU;AAAA,EACrB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AACF"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as o } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
import { PreviewCard as r } from "@base-ui/react/preview-card";
|
|
6
6
|
var n = r.Root, s = r.Trigger, p = r.Portal;
|
|
7
|
-
function g({ className: t, sideOffset:
|
|
7
|
+
function g({ className: t, sideOffset: a = 8, ...e }) {
|
|
8
8
|
return /* @__PURE__ */ i(r.Positioner, {
|
|
9
|
-
sideOffset:
|
|
10
|
-
className:
|
|
9
|
+
sideOffset: a,
|
|
10
|
+
className: o("z-50", t),
|
|
11
11
|
...e
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function d({ className: t, ...a }) {
|
|
15
15
|
return /* @__PURE__ */ i(r.Popup, {
|
|
16
|
-
className:
|
|
17
|
-
...
|
|
16
|
+
className: o("bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-72 origin-[var(--transform-origin)] p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", t),
|
|
17
|
+
...a
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
var y = {
|
|
@@ -22,7 +22,7 @@ var y = {
|
|
|
22
22
|
Trigger: s,
|
|
23
23
|
Portal: p,
|
|
24
24
|
Positioner: g,
|
|
25
|
-
Popup:
|
|
25
|
+
Popup: d
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
28
28
|
y as PreviewCard
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-card.js","names":[],"sources":["../../src/components/preview-card/preview-card.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { PreviewCard as BasePreviewCard } from \"@base-ui/react/preview-card\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePreviewCard.Root;\nconst Trigger = BasePreviewCard.Trigger;\nconst Portal = BasePreviewCard.Portal;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePreviewCard.Positioner>) {\n return (\n <BasePreviewCard.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BasePreviewCard.Popup>) {\n return (\n <BasePreviewCard.Popup\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"preview-card.js","names":[],"sources":["../../src/components/preview-card/preview-card.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { PreviewCard as BasePreviewCard } from \"@base-ui/react/preview-card\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BasePreviewCard.Root;\nconst Trigger = BasePreviewCard.Trigger;\nconst Portal = BasePreviewCard.Portal;\n\nfunction Positioner({\n className,\n sideOffset = 8,\n ...props\n}: StyledProps<typeof BasePreviewCard.Positioner>) {\n return (\n <BasePreviewCard.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BasePreviewCard.Popup>) {\n return (\n <BasePreviewCard.Popup\n className={cn(\n \"bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary rounded-base w-72 origin-[var(--transform-origin)] p-4 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Preview card built on Base UI `PreviewCard` — a hover-triggered card that\n * previews what's behind a link (a profile, a repo, an article). Like a\n * `Tooltip` it opens on hover/focus, but it holds richer, non-essential\n * content. Keep the underlying link fully usable without opening the card.\n */\nexport const PreviewCard = { Root, Trigger, Portal, Positioner, Popup };\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAgB,MACvB,IAAU,EAAgB,SAC1B,IAAS,EAAgB;AAE/B,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GAC8C;AACjD,SACE,gBAAA,EAAC,EAAgB,YAAjB;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,QAAQ,CAAS;AAAA,IAC/B,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IACE,WAAW,EACT,+MACA,kEACA,8DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAc;AAAA,EAAE,MAAA;AAAA,EAAM,SAAA;AAAA,EAAS,QAAA;AAAA,EAAQ,YAAA;AAAA,EAAY,OAAA;AAAM"}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as o } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
5
|
import { Progress as a } from "@base-ui/react/progress";
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
className:
|
|
9
|
-
...
|
|
6
|
+
function n({ className: e, ...r }) {
|
|
7
|
+
return /* @__PURE__ */ t(a.Root, {
|
|
8
|
+
className: o("flex w-full flex-col gap-2", e),
|
|
9
|
+
...r
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
className:
|
|
15
|
-
...
|
|
12
|
+
function l({ className: e, ...r }) {
|
|
13
|
+
return /* @__PURE__ */ t(a.Label, {
|
|
14
|
+
className: o("text-pho-secondary text-base font-medium", e),
|
|
15
|
+
...r
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
function s({ className:
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
18
|
+
function s({ className: e, ...r }) {
|
|
19
|
+
return /* @__PURE__ */ t(a.Value, {
|
|
20
|
+
className: o("text-pho-secondary text-base tabular-nums", e),
|
|
21
|
+
...r
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function u({ className:
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
24
|
+
function u({ className: e, ...r }) {
|
|
25
|
+
return /* @__PURE__ */ t(a.Track, {
|
|
26
|
+
className: o("bg-pho-secondary relative h-2 w-full overflow-hidden rounded-full", e),
|
|
27
|
+
...r
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
30
|
+
function c({ className: e, ...r }) {
|
|
31
|
+
return /* @__PURE__ */ t(a.Indicator, {
|
|
32
|
+
className: o("bg-pho-brand-solid h-full rounded-full transition-all duration-200 ease-out", e),
|
|
33
|
+
...r
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
var p = {
|
|
37
|
-
Root:
|
|
38
|
-
Label:
|
|
37
|
+
Root: n,
|
|
38
|
+
Label: l,
|
|
39
39
|
Value: s,
|
|
40
40
|
Track: u,
|
|
41
|
-
Indicator:
|
|
41
|
+
Indicator: c
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
44
|
p as Progress
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":[],"sources":["../../src/components/progress/progress.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Progress as BaseProgress } from \"@base-ui/react/progress\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseProgress.Root>) {\n return (\n <BaseProgress.Root\n className={cn(\"flex w-full flex-col gap-2\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Label>) {\n return (\n <BaseProgress.Label\n className={cn(\"text-pho-secondary text-
|
|
1
|
+
{"version":3,"file":"progress.js","names":[],"sources":["../../src/components/progress/progress.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Progress as BaseProgress } from \"@base-ui/react/progress\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseProgress.Root>) {\n return (\n <BaseProgress.Root\n className={cn(\"flex w-full flex-col gap-2\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Label>) {\n return (\n <BaseProgress.Label\n className={cn(\"text-pho-secondary text-base font-medium\", className)}\n {...props}\n />\n );\n}\n\nfunction Value({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Value>) {\n return (\n <BaseProgress.Value\n className={cn(\"text-pho-secondary text-base tabular-nums\", className)}\n {...props}\n />\n );\n}\n\nfunction Track({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Track>) {\n return (\n <BaseProgress.Track\n className={cn(\n \"bg-pho-secondary relative h-2 w-full overflow-hidden rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Indicator({\n className,\n ...props\n}: StyledProps<typeof BaseProgress.Indicator>) {\n return (\n <BaseProgress.Indicator\n className={cn(\n \"bg-pho-brand-solid h-full rounded-full transition-all duration-200 ease-out\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Determinate progress bar built on Base UI `Progress`. Set `value` (0–100, or\n * `null` for indeterminate) on `Progress.Root`; Base UI sizes the indicator.\n * Compose a header row with `Progress.Label` + `Progress.Value`.\n */\nexport const Progress = { Root, Label, Value, Track, Indicator };\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAAgD;AAC5E,SACE,gBAAA,EAAC,EAAa,MAAd;AAAA,IACE,WAAW,EAAG,8BAA8B,CAAS;AAAA,IACrD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EAAG,4CAA4C,CAAS;AAAA,IACnE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EAAG,6CAA6C,CAAS;AAAA,IACpE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAa,OAAd;AAAA,IACE,WAAW,EACT,qEACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GAC0C;AAC7C,SACE,gBAAA,EAAC,EAAa,WAAd;AAAA,IACE,WAAW,EACT,+EACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAOA,IAAa,IAAW;AAAA,EAAE,MAAA;AAAA,EAAM,OAAA;AAAA,EAAO,OAAA;AAAA,EAAO,OAAA;AAAA,EAAO,WAAA;AAAU"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t
|
|
2
|
+
import { t } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as o, jsxs as
|
|
5
|
-
import { Radio as
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { Radio as i } from "@base-ui/react/radio";
|
|
6
6
|
import { RadioGroup as d } from "@base-ui/react/radio-group";
|
|
7
7
|
function l({ className: r, ...e }) {
|
|
8
8
|
return /* @__PURE__ */ o(d, {
|
|
9
|
-
className:
|
|
9
|
+
className: t("flex flex-col gap-3", r),
|
|
10
10
|
...e
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
l.displayName = "RadioGroup";
|
|
14
|
-
function c({ className: r, label: e, ...
|
|
15
|
-
const
|
|
16
|
-
className:
|
|
17
|
-
...
|
|
18
|
-
children: /* @__PURE__ */ o(
|
|
14
|
+
function c({ className: r, label: e, ...n }) {
|
|
15
|
+
const a = /* @__PURE__ */ o(i.Root, {
|
|
16
|
+
className: t("outline-pho-brand bg-pho-primary ring-pho-primary flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full ring-1 transition duration-100 ease-linear ring-inset focus-visible:outline-2 focus-visible:outline-offset-2", "data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", r),
|
|
17
|
+
...n,
|
|
18
|
+
children: /* @__PURE__ */ o(i.Indicator, { className: "bg-pho-on-brand size-2 rounded-full" })
|
|
19
19
|
});
|
|
20
|
-
return e ? /* @__PURE__ */
|
|
20
|
+
return e ? /* @__PURE__ */ s("label", {
|
|
21
21
|
className: "flex cursor-pointer items-center gap-2 select-none",
|
|
22
|
-
children: [
|
|
23
|
-
className: "text-pho-secondary text-
|
|
22
|
+
children: [a, /* @__PURE__ */ o("span", {
|
|
23
|
+
className: "text-pho-secondary text-base",
|
|
24
24
|
children: e
|
|
25
25
|
})]
|
|
26
|
-
}) :
|
|
26
|
+
}) : a;
|
|
27
27
|
}
|
|
28
28
|
c.displayName = "Radio";
|
|
29
29
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","names":[],"sources":["../../src/components/radio-group/radio-group.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode } from \"react\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface RadioGroupProps extends Omit<\n ComponentProps<typeof BaseRadioGroup>,\n \"className\"\n> {\n className?: string;\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, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n className={cn(\"flex flex-col gap-3\", className)}\n {...props}\n />\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, ...props }: RadioProps) {\n const dot = (\n <BaseRadio.Root\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"radio-group.js","names":[],"sources":["../../src/components/radio-group/radio-group.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode } from \"react\";\nimport { RadioGroup as BaseRadioGroup } from \"@base-ui/react/radio-group\";\nimport { Radio as BaseRadio } from \"@base-ui/react/radio\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface RadioGroupProps extends Omit<\n ComponentProps<typeof BaseRadioGroup>,\n \"className\"\n> {\n className?: string;\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, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n className={cn(\"flex flex-col gap-3\", className)}\n {...props}\n />\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, ...props }: RadioProps) {\n const dot = (\n <BaseRadio.Root\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 transition duration-100 ease-linear ring-inset focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"data-[checked]:bg-pho-brand-solid data-[checked]:ring-transparent\",\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. */}\n <BaseRadio.Indicator className=\"bg-pho-on-brand size-2 rounded-full\" />\n </BaseRadio.Root>\n );\n\n if (!label) return dot;\n return (\n <label className=\"flex cursor-pointer items-center gap-2 select-none\">\n {dot}\n <span className=\"text-pho-secondary text-base\">{label}</span>\n </label>\n );\n}\n\nRadio.displayName = \"Radio\";\n"],"mappings":";;;;;;AAiBA,SAAgB,EAAW,EAAE,WAAA,GAAW,GAAG,EAAA,GAA0B;AACnE,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,EAAG,uBAAuB,CAAS;AAAA,IAC9C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,EAAW,cAAc;AAezB,SAAgB,EAAM,EAAE,WAAA,GAAW,OAAA,GAAO,GAAG,EAAA,GAAqB;AAChE,QAAM,IACJ,gBAAA,EAAC,EAAU,MAAX;AAAA,IACE,WAAW,EACT,+OACA,qEACA,iEACA,CACF;AAAA,IACA,GAAI;AAAA,cAKJ,gBAAA,EAAC,EAAU,WAAX,EAAqB,WAAU,sCAAuC,CAAA;AAAA,EACxD,CAAA;AAGlB,SAAK,IAEH,gBAAA,EAAC,SAAD;AAAA,IAAO,WAAU;AAAA,cAAjB,CACG,GACD,gBAAA,EAAC,QAAD;AAAA,MAAM,WAAU;AAAA,gBAAgC;AAAA,IAAY,CAAA,CACvD;AAAA,OALU;AAOrB;AAEA,EAAM,cAAc"}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as o } from "../chunks/cn-
|
|
2
|
+
import { t as o } from "../chunks/cn-DTiB6ek_.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
import { Select as r } from "@base-ui/react/select";
|
|
6
|
-
var i = r.Root, s = r.Value,
|
|
7
|
-
function d({ className:
|
|
6
|
+
var i = r.Root, s = r.Value, p = r.Portal, l = r.List, c = r.Group, u = r.ItemText;
|
|
7
|
+
function d({ className: e, ...t }) {
|
|
8
8
|
return /* @__PURE__ */ a(r.Trigger, {
|
|
9
|
-
className: o("
|
|
10
|
-
...
|
|
9
|
+
className: o("bg-pho-primary ring-pho-primary text-pho-primary outline-pho-brand rounded-base flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 transition select-none ring-inset", "data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:text-pho-secondary [&_svg]:size-4", e),
|
|
10
|
+
...t
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function m({ className:
|
|
13
|
+
function m({ className: e, ...t }) {
|
|
14
14
|
return /* @__PURE__ */ a(r.Icon, {
|
|
15
|
-
className: o("flex shrink-0 items-center",
|
|
16
|
-
...
|
|
15
|
+
className: o("flex shrink-0 items-center", e),
|
|
16
|
+
...t
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function g({ className:
|
|
19
|
+
function g({ className: e, sideOffset: t = 6, ...n }) {
|
|
20
20
|
return /* @__PURE__ */ a(r.Positioner, {
|
|
21
|
-
sideOffset:
|
|
22
|
-
className: o("z-50 outline-none",
|
|
21
|
+
sideOffset: t,
|
|
22
|
+
className: o("z-50 outline-none", e),
|
|
23
23
|
...n
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function h({ className:
|
|
26
|
+
function h({ className: e, ...t }) {
|
|
27
27
|
return /* @__PURE__ */ a(r.Popup, {
|
|
28
|
-
className: o("
|
|
29
|
-
...
|
|
28
|
+
className: o("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 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", e),
|
|
29
|
+
...t
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function y({ className: e, ...t }) {
|
|
33
33
|
return /* @__PURE__ */ a(r.Item, {
|
|
34
|
-
className: o("text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2
|
|
35
|
-
...
|
|
34
|
+
className: o("text-pho-secondary rounded-base grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 py-1.5 pr-2.5 pl-2 text-base outline-none select-none", "data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:opacity-50", e),
|
|
35
|
+
...t
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function f({ className: e, ...t }) {
|
|
39
39
|
return /* @__PURE__ */ a(r.ItemIndicator, {
|
|
40
|
-
className: o("text-pho-brand col-start-1 flex items-center [&>svg]:size-4",
|
|
41
|
-
...
|
|
40
|
+
className: o("text-pho-brand col-start-1 flex items-center [&>svg]:size-4", e),
|
|
41
|
+
...t
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function x({ className:
|
|
44
|
+
function x({ className: e, ...t }) {
|
|
45
45
|
return /* @__PURE__ */ a(r.GroupLabel, {
|
|
46
|
-
className: o("text-pho-
|
|
47
|
-
...
|
|
46
|
+
className: o("text-pho-secondary px-2.5 py-1.5 text-xs font-medium", e),
|
|
47
|
+
...t
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
var N = {
|
|
@@ -52,13 +52,13 @@ var N = {
|
|
|
52
52
|
Trigger: d,
|
|
53
53
|
Value: s,
|
|
54
54
|
Icon: m,
|
|
55
|
-
Portal:
|
|
55
|
+
Portal: p,
|
|
56
56
|
Positioner: g,
|
|
57
57
|
Popup: h,
|
|
58
|
-
List:
|
|
59
|
-
Item:
|
|
58
|
+
List: l,
|
|
59
|
+
Item: y,
|
|
60
60
|
ItemText: u,
|
|
61
|
-
ItemIndicator:
|
|
61
|
+
ItemIndicator: f,
|
|
62
62
|
Group: c,
|
|
63
63
|
GroupLabel: x
|
|
64
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseSelect.Root;\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\nconst ItemText = BaseSelect.ItemText;\n\nfunction Trigger({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger>) {\n return (\n <BaseSelect.Trigger\n className={cn(\n // Flat field surface — shadows are reserved for floating layers;\n // the 15% ring-pho-primary hairline is the input edge.\n \"
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../src/components/select/select.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseSelect.Root;\nconst Value = BaseSelect.Value;\nconst Portal = BaseSelect.Portal;\nconst List = BaseSelect.List;\nconst Group = BaseSelect.Group;\nconst ItemText = BaseSelect.ItemText;\n\nfunction Trigger({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.Trigger>) {\n return (\n <BaseSelect.Trigger\n className={cn(\n // Flat field surface — shadows are reserved for floating layers;\n // 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 flex min-w-44 cursor-pointer items-center justify-between gap-2 px-3 py-2 text-base ring-1 transition select-none ring-inset\",\n \"data-[popup-open]:ring-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-1\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"[&_svg]:text-pho-secondary [&_svg]:size-4\",\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 ...props\n}: StyledProps<typeof BaseSelect.Positioner>) {\n return (\n <BaseSelect.Positioner\n sideOffset={sideOffset}\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 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseSelect.Item>) {\n return (\n <BaseSelect.Item\n className={cn(\n \"text-pho-secondary rounded-base grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 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 ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseSelect.ItemIndicator>) {\n return (\n <BaseSelect.ItemIndicator\n className={cn(\n \"text-pho-brand col-start-1 flex items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\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 on click. Pass `items` to `Select.Root`,\n * render an `Item` per option, and show the selection with `Select.Value`. For\n * a short, always-visible set use `RadioGroup`; to filter a long list by typing\n * use `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":";;;;;AAYA,IAAM,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAS,EAAW,QACpB,IAAO,EAAW,MAClB,IAAQ,EAAW,OACnB,IAAW,EAAW;AAE5B,SAAS,EAAQ,EACf,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAW,SAAZ;AAAA,IACE,WAAW,EAGT,gNACA,4FACA,iEACA,6CACA,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,EACL,CAAA;AAEL;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAW,YAAZ;AAAA,IACc,YAAA;AAAA,IACZ,WAAW,EAAG,qBAAqB,CAAS;AAAA,IAC5C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA+C;AAC5E,SACE,gBAAA,EAAC,EAAW,OAAZ;AAAA,IACE,WAAW,EAGT,sRACA,kEACA,8DACA,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,EACT,qJAEA,wGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,GAAG,EAAA,GAC4C;AAC/C,SACE,gBAAA,EAAC,EAAW,eAAZ;AAAA,IACE,WAAW,EACT,+DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;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;AASA,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"}
|