@photon-ai/pho-ui 0.1.1 → 0.2.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/button-GQALfaly.js +325 -0
- package/dist/chunks/button-GQALfaly.js.map +1 -0
- package/dist/chunks/{close-button-CbQNfpxU.js → close-button-DKaNIndU.js} +6 -6
- package/dist/chunks/{close-button-CbQNfpxU.js.map → close-button-DKaNIndU.js.map} +1 -1
- package/dist/chunks/{cn-D6jQqeRj.js → cn-7uGUzCOM.js} +2 -3
- package/dist/chunks/{cn-D6jQqeRj.js.map → cn-7uGUzCOM.js.map} +1 -1
- package/dist/chunks/{dialog-BSBF1Wyq.js → dialog-CyyL5VCc.js} +13 -13
- package/dist/chunks/dialog-CyyL5VCc.js.map +1 -0
- package/dist/chunks/{input-aZqjjV_m.js → input-DX7d5MlS.js} +3 -3
- package/dist/chunks/input-DX7d5MlS.js.map +1 -0
- package/dist/chunks/menu-BfaNHnOp.js +101 -0
- package/dist/chunks/menu-BfaNHnOp.js.map +1 -0
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.js +5 -5
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/autocomplete.js +7 -7
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +2 -2
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.js +10 -11
- package/dist/components/checkbox.js +2 -2
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +53 -53
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/context-menu.js +11 -11
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/field.js +26 -26
- package/dist/components/field.js.map +1 -1
- package/dist/components/fieldset.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.js +8 -8
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/menubar.js +5 -5
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/navigation-menu.js +34 -34
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/notification.js +16 -16
- package/dist/components/notification.js.map +1 -1
- package/dist/components/number-field.js +18 -18
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/otp-field.js +6 -6
- package/dist/components/otp-field.js.map +1 -1
- package/dist/components/popover.js +9 -9
- package/dist/components/popover.js.map +1 -1
- package/dist/components/preview-card.js +12 -12
- package/dist/components/preview-card.js.map +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.js +9 -9
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +10 -10
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/slider.js +16 -16
- package/dist/components/slider.js.map +1 -1
- package/dist/components/switch.js +11 -11
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +15 -15
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/toast.js +6 -6
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +6 -6
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/toolbar.js +7 -7
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +14 -14
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +17 -18
- package/dist/src/components/button/button.d.ts +12 -35
- package/dist/src/components/button/index.d.ts +1 -1
- package/dist/src/components/menu/menu.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/src/styles/fonts.css +22 -0
- package/src/styles/theme.css +166 -169
- package/dist/chunks/button-DjjSiLYz.js +0 -334
- package/dist/chunks/button-DjjSiLYz.js.map +0 -1
- package/dist/chunks/dialog-BSBF1Wyq.js.map +0 -1
- package/dist/chunks/input-aZqjjV_m.js.map +0 -1
- package/dist/chunks/menu-BkzDbNuX.js +0 -101
- package/dist/chunks/menu-BkzDbNuX.js.map +0 -1
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as o } from "../chunks/cn-
|
|
2
|
+
import { t as o } from "../chunks/cn-7uGUzCOM.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
import { Combobox as
|
|
6
|
-
var i =
|
|
7
|
-
function c({ className: e, ...
|
|
8
|
-
return /* @__PURE__ */ n(
|
|
5
|
+
import { Combobox as t } from "@base-ui/react/combobox";
|
|
6
|
+
var i = t.Root, s = t.Value, p = t.Portal, l = t.Group, u = t.Collection;
|
|
7
|
+
function c({ className: e, ...r }) {
|
|
8
|
+
return /* @__PURE__ */ n(t.InputGroup, {
|
|
9
9
|
className: o("relative flex items-center", e),
|
|
10
|
-
...
|
|
10
|
+
...r
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
function m({ className: e, ...
|
|
14
|
-
return /* @__PURE__ */ n(
|
|
15
|
-
className: o("squircle bg-pho-primary
|
|
16
|
-
...
|
|
13
|
+
function m({ className: e, ...r }) {
|
|
14
|
+
return /* @__PURE__ */ n(t.Input, {
|
|
15
|
+
className: o("squircle bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand w-full rounded-lg px-3 py-2 text-sm ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50", e),
|
|
16
|
+
...r
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function h({ className: e, ...
|
|
20
|
-
return /* @__PURE__ */ n(
|
|
19
|
+
function h({ className: e, ...r }) {
|
|
20
|
+
return /* @__PURE__ */ n(t.Clear, {
|
|
21
21
|
className: o("combobox-clear text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4", e),
|
|
22
|
-
...
|
|
22
|
+
...r
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function g({ className: e, ...
|
|
26
|
-
return /* @__PURE__ */ n(
|
|
25
|
+
function g({ className: e, ...r }) {
|
|
26
|
+
return /* @__PURE__ */ n(t.Trigger, {
|
|
27
27
|
className: o("text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4", e),
|
|
28
|
-
...
|
|
28
|
+
...r
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function d({ className: e, sideOffset:
|
|
32
|
-
return /* @__PURE__ */ n(
|
|
33
|
-
sideOffset:
|
|
31
|
+
function d({ className: e, sideOffset: r = 6, ...a }) {
|
|
32
|
+
return /* @__PURE__ */ n(t.Positioner, {
|
|
33
|
+
sideOffset: r,
|
|
34
34
|
className: o("z-50 outline-none", e),
|
|
35
35
|
...a
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function x({ className: e, ...
|
|
39
|
-
return /* @__PURE__ */ n(
|
|
40
|
-
className: o("squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-
|
|
41
|
-
...
|
|
38
|
+
function x({ className: e, ...r }) {
|
|
39
|
+
return /* @__PURE__ */ n(t.Popup, {
|
|
40
|
+
className: o("squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] rounded-xl 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),
|
|
41
|
+
...r
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function f({ className: e, ...
|
|
45
|
-
return /* @__PURE__ */ n(
|
|
44
|
+
function f({ className: e, ...r }) {
|
|
45
|
+
return /* @__PURE__ */ n(t.List, {
|
|
46
46
|
className: o("max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain", e),
|
|
47
|
-
...
|
|
47
|
+
...r
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function y({ className: e, ...
|
|
51
|
-
return /* @__PURE__ */ n(
|
|
50
|
+
function y({ className: e, ...r }) {
|
|
51
|
+
return /* @__PURE__ */ n(t.Empty, {
|
|
52
52
|
className: o("text-pho-tertiary px-2.5 py-6 text-center text-sm empty:m-0 empty:p-0", e),
|
|
53
|
-
...
|
|
53
|
+
...r
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function v({ className: e, ...
|
|
57
|
-
return /* @__PURE__ */ n(
|
|
58
|
-
className: o("text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2 text-sm outline-none select-none", "data-[highlighted]:bg-pho-
|
|
59
|
-
...
|
|
56
|
+
function v({ className: e, ...r }) {
|
|
57
|
+
return /* @__PURE__ */ n(t.Item, {
|
|
58
|
+
className: o("text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2 text-sm outline-none select-none", "data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary", e),
|
|
59
|
+
...r
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function b({ className: e, ...
|
|
63
|
-
return /* @__PURE__ */ n(
|
|
62
|
+
function b({ className: e, ...r }) {
|
|
63
|
+
return /* @__PURE__ */ n(t.ItemIndicator, {
|
|
64
64
|
className: o("text-pho-brand col-start-1 flex items-center [&>svg]:size-4", e),
|
|
65
|
-
...
|
|
65
|
+
...r
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return /* @__PURE__ */ n(
|
|
68
|
+
function N({ className: e, ...r }) {
|
|
69
|
+
return /* @__PURE__ */ n(t.GroupLabel, {
|
|
70
70
|
className: o("text-pho-quaternary px-2.5 py-1.5 text-xs font-medium", e),
|
|
71
|
-
...
|
|
71
|
+
...r
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
return /* @__PURE__ */ n(
|
|
76
|
-
className: o("squircle bg-pho-primary
|
|
77
|
-
...
|
|
74
|
+
function C({ className: e, ...r }) {
|
|
75
|
+
return /* @__PURE__ */ n(t.Chips, {
|
|
76
|
+
className: o("squircle bg-pho-primary ring-pho-primary focus-within:ring-pho-brand flex flex-wrap items-center gap-1.5 rounded-lg p-1.5 ring-1 ring-inset focus-within:ring-2", e),
|
|
77
|
+
...r
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return /* @__PURE__ */ n(
|
|
82
|
-
className: o("bg-pho-
|
|
83
|
-
...
|
|
80
|
+
function w({ className: e, ...r }) {
|
|
81
|
+
return /* @__PURE__ */ n(t.Chip, {
|
|
82
|
+
className: o("bg-pho-tertiary text-pho-secondary data-[highlighted]:bg-pho-quaternary flex items-center gap-1 rounded-md py-0.5 pr-1 pl-2 text-sm", e),
|
|
83
|
+
...r
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function q({ className: e, ...
|
|
87
|
-
return /* @__PURE__ */ n(
|
|
86
|
+
function q({ className: e, ...r }) {
|
|
87
|
+
return /* @__PURE__ */ n(t.ChipRemove, {
|
|
88
88
|
className: o("text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover flex cursor-pointer items-center rounded-sm [&>svg]:size-3.5", e),
|
|
89
|
-
...
|
|
89
|
+
...r
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
var L = {
|
|
@@ -105,9 +105,9 @@ var L = {
|
|
|
105
105
|
Item: v,
|
|
106
106
|
ItemIndicator: b,
|
|
107
107
|
Group: l,
|
|
108
|
-
GroupLabel:
|
|
109
|
-
Chips:
|
|
110
|
-
Chip:
|
|
108
|
+
GroupLabel: N,
|
|
109
|
+
Chips: C,
|
|
110
|
+
Chip: w,
|
|
111
111
|
ChipRemove: q
|
|
112
112
|
};
|
|
113
113
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":[],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\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 = BaseCombobox.Root;\nconst Value = BaseCombobox.Value;\nconst Portal = BaseCombobox.Portal;\nconst Group = BaseCombobox.Group;\nconst Collection = BaseCombobox.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.InputGroup>) {\n return (\n <BaseCombobox.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Input>) {\n return (\n <BaseCombobox.Input\n className={cn(\n \"squircle bg-pho-primary
|
|
1
|
+
{"version":3,"file":"combobox.js","names":[],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Combobox as BaseCombobox } from \"@base-ui/react/combobox\";\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 = BaseCombobox.Root;\nconst Value = BaseCombobox.Value;\nconst Portal = BaseCombobox.Portal;\nconst Group = BaseCombobox.Group;\nconst Collection = BaseCombobox.Collection;\n\nfunction InputGroup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.InputGroup>) {\n return (\n <BaseCombobox.InputGroup\n className={cn(\"relative flex items-center\", className)}\n {...props}\n />\n );\n}\n\nfunction Input({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Input>) {\n return (\n <BaseCombobox.Input\n className={cn(\n \"squircle bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder focus-visible:ring-pho-brand w-full rounded-lg px-3 py-2 text-sm ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset focus-visible:ring-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Clear({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Clear>) {\n return (\n <BaseCombobox.Clear\n className={cn(\n \"combobox-clear text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Trigger({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Trigger>) {\n return (\n <BaseCombobox.Trigger\n className={cn(\n \"text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover absolute right-2.5 flex cursor-pointer items-center [&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseCombobox.Positioner>) {\n return (\n <BaseCombobox.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50 outline-none\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Popup>) {\n return (\n <BaseCombobox.Popup\n className={cn(\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary w-[var(--anchor-width)] max-w-[var(--available-width)] origin-[var(--transform-origin)] rounded-xl p-1 ring-1 transition-[transform,opacity] duration-150 ease-out outline-none ring-inset\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction List({ className, ...props }: StyledProps<typeof BaseCombobox.List>) {\n return (\n <BaseCombobox.List\n className={cn(\n \"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Empty({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Empty>) {\n return (\n <BaseCombobox.Empty\n className={cn(\n \"text-pho-tertiary px-2.5 py-6 text-center text-sm empty:m-0 empty:p-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseCombobox.Item>) {\n return (\n <BaseCombobox.Item\n className={cn(\n \"text-pho-secondary grid cursor-pointer grid-cols-[1rem_1fr] items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2 text-sm outline-none select-none\",\n \"data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ItemIndicator>) {\n return (\n <BaseCombobox.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 BaseCombobox.GroupLabel>) {\n return (\n <BaseCombobox.GroupLabel\n className={cn(\n \"text-pho-quaternary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chips({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.Chips>) {\n return (\n <BaseCombobox.Chips\n className={cn(\n \"squircle bg-pho-primary ring-pho-primary focus-within:ring-pho-brand flex flex-wrap items-center gap-1.5 rounded-lg p-1.5 ring-1 ring-inset focus-within:ring-2\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Chip({ className, ...props }: StyledProps<typeof BaseCombobox.Chip>) {\n return (\n <BaseCombobox.Chip\n className={cn(\n \"bg-pho-tertiary text-pho-secondary data-[highlighted]:bg-pho-quaternary flex items-center gap-1 rounded-md py-0.5 pr-1 pl-2 text-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ChipRemove({\n className,\n ...props\n}: StyledProps<typeof BaseCombobox.ChipRemove>) {\n return (\n <BaseCombobox.ChipRemove\n className={cn(\n \"text-fg-pho-quaternary hover:text-fg-pho-quaternary-hover flex cursor-pointer items-center rounded-sm [&>svg]:size-3.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Combobox built on Base UI `Combobox` — a text input that filters a list as\n * you type and commits to a value from it. Pass `items` to `Combobox.Root`;\n * `Combobox.List` takes a render function mapping each (filtered) item to a\n * `Combobox.Item`. Add `Combobox.Chips` for multi-select. For free-form text\n * with suggestions, use `Autocomplete`; for a small fixed set, use `Select`.\n */\nexport const Combobox = {\n Root,\n Value,\n InputGroup,\n Input,\n Trigger,\n Clear,\n Portal,\n Positioner,\n Popup,\n List,\n Collection,\n Empty,\n Item,\n ItemIndicator,\n Group,\n GroupLabel,\n Chips,\n Chip,\n ChipRemove,\n};\n"],"mappings":"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"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "../chunks/cn-
|
|
3
|
-
import { n as u, t as n } from "../chunks/menu-
|
|
2
|
+
import { t as e } from "../chunks/cn-7uGUzCOM.js";
|
|
3
|
+
import { n as u, t as n } from "../chunks/menu-BfaNHnOp.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
import { ContextMenu as t } from "@base-ui/react/context-menu";
|
|
7
7
|
import { Separator as p } from "@base-ui/react/separator";
|
|
8
8
|
var m = t.Root, i = t.Trigger, s = t.Portal, c = t.Group, f = t.RadioGroup, l = t.SubmenuRoot;
|
|
9
|
-
function
|
|
9
|
+
function g({ className: r, ...o }) {
|
|
10
10
|
return /* @__PURE__ */ a(t.Positioner, {
|
|
11
11
|
className: e("z-50", r),
|
|
12
12
|
...o
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function x({ className: r, ...o }) {
|
|
16
16
|
return /* @__PURE__ */ a(t.Popup, {
|
|
17
17
|
className: e(u, r),
|
|
18
18
|
...o
|
|
@@ -24,13 +24,13 @@ function b({ className: r, ...o }) {
|
|
|
24
24
|
...o
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function v({ className: r, ...o }) {
|
|
28
28
|
return /* @__PURE__ */ a(t.GroupLabel, {
|
|
29
29
|
className: e("text-pho-quaternary px-2.5 py-1.5 text-xs font-medium", r),
|
|
30
30
|
...o
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function P({ className: r, ...o }) {
|
|
34
34
|
return /* @__PURE__ */ a(p, {
|
|
35
35
|
className: e("-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]", r),
|
|
36
36
|
...o
|
|
@@ -38,7 +38,7 @@ function v({ className: r, ...o }) {
|
|
|
38
38
|
}
|
|
39
39
|
function N({ className: r, ...o }) {
|
|
40
40
|
return /* @__PURE__ */ a(t.SubmenuTrigger, {
|
|
41
|
-
className: e(n, "data-[popup-open]:bg-pho-
|
|
41
|
+
className: e(n, "data-[popup-open]:bg-pho-ghost-hover", r),
|
|
42
42
|
...o
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -46,12 +46,12 @@ var T = {
|
|
|
46
46
|
Root: m,
|
|
47
47
|
Trigger: i,
|
|
48
48
|
Portal: s,
|
|
49
|
-
Positioner:
|
|
50
|
-
Popup:
|
|
49
|
+
Positioner: g,
|
|
50
|
+
Popup: x,
|
|
51
51
|
Item: b,
|
|
52
52
|
Group: c,
|
|
53
|
-
GroupLabel:
|
|
54
|
-
Separator:
|
|
53
|
+
GroupLabel: v,
|
|
54
|
+
Separator: P,
|
|
55
55
|
SubmenuRoot: l,
|
|
56
56
|
SubmenuTrigger: N,
|
|
57
57
|
RadioGroup: f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.js","names":[],"sources":["../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { ContextMenu as BaseContextMenu } from \"@base-ui/react/context-menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\nimport { MENU_POPUP, MENU_ITEM } from \"../menu/menu\";\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 = BaseContextMenu.Root;\nconst Trigger = BaseContextMenu.Trigger;\nconst Portal = BaseContextMenu.Portal;\nconst Group = BaseContextMenu.Group;\nconst RadioGroup = BaseContextMenu.RadioGroup;\nconst SubmenuRoot = BaseContextMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Positioner>) {\n return (\n <BaseContextMenu.Positioner className={cn(\"z-50\", className)} {...props} />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Popup>) {\n return (\n <BaseContextMenu.Popup className={cn(MENU_POPUP, className)} {...props} />\n );\n}\n\nfunction Item({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Item>) {\n return (\n <BaseContextMenu.Item className={cn(MENU_ITEM, className)} {...props} />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.GroupLabel>) {\n return (\n <BaseContextMenu.GroupLabel\n className={cn(\n \"text-pho-quaternary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.SubmenuTrigger>) {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(MENU_ITEM
|
|
1
|
+
{"version":3,"file":"context-menu.js","names":[],"sources":["../../src/components/context-menu/context-menu.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { ContextMenu as BaseContextMenu } from \"@base-ui/react/context-menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\nimport { cn } from \"../../utils/cn\";\nimport { MENU_POPUP, MENU_ITEM } from \"../menu/menu\";\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 = BaseContextMenu.Root;\nconst Trigger = BaseContextMenu.Trigger;\nconst Portal = BaseContextMenu.Portal;\nconst Group = BaseContextMenu.Group;\nconst RadioGroup = BaseContextMenu.RadioGroup;\nconst SubmenuRoot = BaseContextMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Positioner>) {\n return (\n <BaseContextMenu.Positioner className={cn(\"z-50\", className)} {...props} />\n );\n}\n\nfunction Popup({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Popup>) {\n return (\n <BaseContextMenu.Popup className={cn(MENU_POPUP, className)} {...props} />\n );\n}\n\nfunction Item({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.Item>) {\n return (\n <BaseContextMenu.Item className={cn(MENU_ITEM, className)} {...props} />\n );\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.GroupLabel>) {\n return (\n <BaseContextMenu.GroupLabel\n className={cn(\n \"text-pho-quaternary px-2.5 py-1.5 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Separator({ className, ...props }: StyledProps<typeof BaseSeparator>) {\n return (\n <BaseSeparator\n className={cn(\n \"-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SubmenuTrigger({\n className,\n ...props\n}: StyledProps<typeof BaseContextMenu.SubmenuTrigger>) {\n return (\n <BaseContextMenu.SubmenuTrigger\n className={cn(\n MENU_ITEM,\n \"data-[popup-open]:bg-pho-ghost-hover\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Right-click (context) menu built on Base UI `ContextMenu`. `ContextMenu.Trigger`\n * wraps the area that opens the menu on right-click / long-press; the popup\n * shares its look with `Menu`. Always mirror these actions somewhere visible —\n * a context menu must not be the only way to reach them.\n */\nexport const ContextMenu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n RadioGroup,\n};\n"],"mappings":";;;;;;;AAcA,IAAM,IAAO,EAAgB,MACvB,IAAU,EAAgB,SAC1B,IAAS,EAAgB,QACzB,IAAQ,EAAgB,OACxB,IAAa,EAAgB,YAC7B,IAAc,EAAgB;AAEpC,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GAC8C;AACjD,SACE,gBAAA,EAAC,EAAgB,YAAjB;AAAA,IAA4B,WAAW,EAAG,QAAQ,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE9E;AAEA,SAAS,EAAM,EACb,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAgB,OAAjB;AAAA,IAAuB,WAAW,EAAG,GAAY,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE7E;AAEA,SAAS,EAAK,EACZ,WAAA,GACA,GAAG,EAAA,GACwC;AAC3C,SACE,gBAAA,EAAC,EAAgB,MAAjB;AAAA,IAAsB,WAAW,EAAG,GAAW,CAAS;AAAA,IAAG,GAAI;AAAA,EAAQ,CAAA;AAE3E;AAEA,SAAS,EAAW,EAClB,WAAA,GACA,GAAG,EAAA,GAC8C;AACjD,SACE,gBAAA,EAAC,EAAgB,YAAjB;AAAA,IACE,WAAW,EACT,yDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EAAE,WAAA,GAAW,GAAG,EAAA,GAA4C;AAC7E,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,EACT,0DACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAe,EACtB,WAAA,GACA,GAAG,EAAA,GACkD;AACrD,SACE,gBAAA,EAAC,EAAgB,gBAAjB;AAAA,IACE,WAAW,EACT,GACA,wCACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAc;AAAA,EACzB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,YAAA;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as a } from "../chunks/cn-
|
|
2
|
+
import { t as a } from "../chunks/cn-7uGUzCOM.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import { Drawer as e } from "@base-ui/react/drawer";
|
|
@@ -18,7 +18,7 @@ function c({ className: t, ...r }) {
|
|
|
18
18
|
}
|
|
19
19
|
function u({ className: t, ...r }) {
|
|
20
20
|
return /* @__PURE__ */ o(e.Popup, {
|
|
21
|
-
className: a("squircle border-pho-
|
|
21
|
+
className: a("squircle border-pho-secondary bg-pho-primary shadow-pho-xl h-full w-[22rem] max-w-[calc(100vw-3rem)] overflow-y-auto overscroll-contain border-l p-6 outline-none", "[transform:translateX(var(--drawer-swipe-movement-x,0px))] transition-transform duration-300 ease-out", "data-[ending-style]:translate-x-full data-[starting-style]:translate-x-full data-[swiping]:duration-0", t),
|
|
22
22
|
...r
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","names":[],"sources":["../../src/components/drawer/drawer.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Drawer as BaseDrawer } from \"@base-ui/react/drawer\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseDrawer.Root;\nconst Trigger = BaseDrawer.Trigger;\nconst Portal = BaseDrawer.Portal;\nconst Close = BaseDrawer.Close;\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Backdrop>) {\n return (\n <BaseDrawer.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 backdrop-blur-[2px] transition-opacity duration-300 ease-out\",\n \"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Viewport>) {\n return (\n <BaseDrawer.Viewport\n className={cn(\n \"fixed inset-0 z-50 flex items-stretch justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDrawer.Popup>) {\n return (\n <BaseDrawer.Popup\n className={cn(\n \"squircle border-pho-
|
|
1
|
+
{"version":3,"file":"drawer.js","names":[],"sources":["../../src/components/drawer/drawer.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Drawer as BaseDrawer } from \"@base-ui/react/drawer\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nconst Root = BaseDrawer.Root;\nconst Trigger = BaseDrawer.Trigger;\nconst Portal = BaseDrawer.Portal;\nconst Close = BaseDrawer.Close;\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Backdrop>) {\n return (\n <BaseDrawer.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 backdrop-blur-[2px] transition-opacity duration-300 ease-out\",\n \"data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Viewport({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Viewport>) {\n return (\n <BaseDrawer.Viewport\n className={cn(\n \"fixed inset-0 z-50 flex items-stretch justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDrawer.Popup>) {\n return (\n <BaseDrawer.Popup\n className={cn(\n // Floating layer: keeps its elevation shadow; hairline edge is the\n // site card stroke (border-pho-secondary), not the interactive edge.\n \"squircle border-pho-secondary bg-pho-primary shadow-pho-xl h-full w-[22rem] max-w-[calc(100vw-3rem)] overflow-y-auto overscroll-contain border-l p-6 outline-none\",\n \"[transform:translateX(var(--drawer-swipe-movement-x,0px))] transition-transform duration-300 ease-out\",\n \"data-[ending-style]:translate-x-full data-[starting-style]:translate-x-full data-[swiping]:duration-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Content({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Content>) {\n return (\n <BaseDrawer.Content\n className={cn(\"flex h-full flex-col\", className)}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDrawer.Title>) {\n return (\n <BaseDrawer.Title\n className={cn(\"text-pho-primary text-lg font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDrawer.Description>) {\n return (\n <BaseDrawer.Description\n className={cn(\"text-pho-tertiary mt-1 text-sm\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Drawer built on Base UI `Drawer` — a panel that slides in from the edge\n * (here, the right) with swipe-to-dismiss. Use it for secondary tasks and\n * navigation that should keep page context; for a forced decision use\n * `AlertDialog`, and for a centered modal use `Dialog`. Compose `Drawer.Portal`\n * → `Backdrop` → `Viewport` → `Popup` → `Content`.\n */\nexport const Drawer = {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Viewport,\n Popup,\n Content,\n Title,\n Description,\n Close,\n};\n"],"mappings":";;;;;AAYA,IAAM,IAAO,EAAW,MAClB,IAAU,EAAW,SACrB,IAAS,EAAW,QACpB,IAAQ,EAAW;AAEzB,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAW,UAAZ;AAAA,IACE,WAAW,EACT,kGACA,2FACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAChB,WAAA,GACA,GAAG,EAAA,GACuC;AAC1C,SACE,gBAAA,EAAC,EAAW,UAAZ;AAAA,IACE,WAAW,EACT,qDACA,CACF;AAAA,IACA,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,qKACA,yGACA,yGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAQ,EACf,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAW,SAAZ;AAAA,IACE,WAAW,EAAG,wBAAwB,CAAS;AAAA,IAC/C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA+C;AAC5E,SACE,gBAAA,EAAC,EAAW,OAAZ;AAAA,IACE,WAAW,EAAG,0CAA0C,CAAS;AAAA,IACjE,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,WAAA,GACA,GAAG,EAAA,GAC0C;AAC7C,SACE,gBAAA,EAAC,EAAW,aAAZ;AAAA,IACE,WAAW,EAAG,kCAAkC,CAAS;AAAA,IACzD,GAAI;AAAA,EACL,CAAA;AAEL;AASA,IAAa,IAAS;AAAA,EACpB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AACF"}
|
package/dist/components/field.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t } from "../chunks/cn-
|
|
2
|
+
import { t as o } from "../chunks/cn-7uGUzCOM.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
import { Field as
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */ i(
|
|
8
|
-
className:
|
|
9
|
-
...
|
|
5
|
+
import { Field as t } from "@base-ui/react/field";
|
|
6
|
+
function n({ className: r, ...e }) {
|
|
7
|
+
return /* @__PURE__ */ i(t.Root, {
|
|
8
|
+
className: o("group/field flex flex-col gap-1.5", r),
|
|
9
|
+
...e
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */ i(
|
|
14
|
-
className:
|
|
15
|
-
...
|
|
12
|
+
function a({ className: r, ...e }) {
|
|
13
|
+
return /* @__PURE__ */ i(t.Label, {
|
|
14
|
+
className: o("text-pho-secondary cursor-default text-sm font-medium", r),
|
|
15
|
+
...e
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
function l({ className: r, ...
|
|
19
|
-
return /* @__PURE__ */ i(
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
18
|
+
function l({ className: r, ...e }) {
|
|
19
|
+
return /* @__PURE__ */ i(t.Control, {
|
|
20
|
+
className: o("bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder text-md w-full rounded-lg px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset", "focus-visible:ring-pho-brand focus-visible:ring-2", "data-[invalid]:ring-pho-error-subtle data-[invalid]:focus-visible:ring-pho-error", "disabled:cursor-not-allowed disabled:opacity-50", r),
|
|
21
|
+
...e
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function s({ className: r, ...
|
|
25
|
-
return /* @__PURE__ */ i(
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
24
|
+
function s({ className: r, ...e }) {
|
|
25
|
+
return /* @__PURE__ */ i(t.Description, {
|
|
26
|
+
className: o("text-pho-tertiary text-sm", r),
|
|
27
|
+
...e
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function p({ className: r, ...
|
|
31
|
-
return /* @__PURE__ */ i(
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
30
|
+
function p({ className: r, ...e }) {
|
|
31
|
+
return /* @__PURE__ */ i(t.Error, {
|
|
32
|
+
className: o("text-pho-error text-sm", r),
|
|
33
|
+
...e
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
var f = {
|
|
37
|
-
Root:
|
|
38
|
-
Label:
|
|
37
|
+
Root: n,
|
|
38
|
+
Label: a,
|
|
39
39
|
Control: l,
|
|
40
40
|
Description: s,
|
|
41
41
|
Error: p,
|
|
42
|
-
Item:
|
|
43
|
-
Validity:
|
|
42
|
+
Item: t.Item,
|
|
43
|
+
Validity: t.Validity
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
46
|
f as Field
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseField.Root>) {\n return (\n <BaseField.Root\n className={cn(\"group/field flex flex-col gap-1.5\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({ className, ...props }: StyledProps<typeof BaseField.Label>) {\n return (\n <BaseField.Label\n className={cn(\n \"text-pho-secondary cursor-default text-sm font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Control({\n className,\n ...props\n}: StyledProps<typeof BaseField.Control>) {\n return (\n <BaseField.Control\n className={cn(\n \"bg-pho-primary
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../src/components/field/field.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Field as BaseField } from \"@base-ui/react/field\";\nimport { cn } from \"../../utils/cn\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\nfunction Root({ className, ...props }: StyledProps<typeof BaseField.Root>) {\n return (\n <BaseField.Root\n className={cn(\"group/field flex flex-col gap-1.5\", className)}\n {...props}\n />\n );\n}\n\nfunction Label({ className, ...props }: StyledProps<typeof BaseField.Label>) {\n return (\n <BaseField.Label\n className={cn(\n \"text-pho-secondary cursor-default text-sm font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Control({\n className,\n ...props\n}: StyledProps<typeof BaseField.Control>) {\n return (\n <BaseField.Control\n className={cn(\n // Flat field surface — hairline ring carries the edge (site has no\n // resting shadows outside floating layers).\n \"bg-pho-primary ring-pho-primary text-pho-primary placeholder:text-pho-placeholder text-md w-full rounded-lg px-3 py-2 ring-1 transition-shadow duration-100 ease-linear outline-none ring-inset\",\n \"focus-visible:ring-pho-brand focus-visible:ring-2\",\n \"data-[invalid]:ring-pho-error-subtle data-[invalid]:focus-visible:ring-pho-error\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseField.Description>) {\n return (\n <BaseField.Description\n className={cn(\"text-pho-tertiary text-sm\", className)}\n {...props}\n />\n );\n}\n\nfunction Error({ className, ...props }: StyledProps<typeof BaseField.Error>) {\n return (\n <BaseField.Error\n className={cn(\"text-pho-error text-sm\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Form field built on Base UI `Field`. Wires a label, description, and\n * validation error to a control for you — compose it around `Field.Control`\n * (or any control via `render`). `Field.Error` shows when the control is\n * invalid; `Field.Validity` exposes raw validity for custom messages.\n */\nexport const Field = {\n Root,\n Label,\n Control,\n Description,\n Error,\n Item: BaseField.Item,\n Validity: BaseField.Validity,\n};\n"],"mappings":";;;;;AAYA,SAAS,EAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA6C;AACzE,SACE,gBAAA,EAAC,EAAU,MAAX;AAAA,IACE,WAAW,EAAG,qCAAqC,CAAS;AAAA,IAC5D,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC3E,SACE,gBAAA,EAAC,EAAU,OAAX;AAAA,IACE,WAAW,EACT,yDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAQ,EACf,WAAA,GACA,GAAG,EAAA,GACqC;AACxC,SACE,gBAAA,EAAC,EAAU,SAAX;AAAA,IACE,WAAW,EAGT,mMACA,qDACA,oFACA,mDACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,WAAA,GACA,GAAG,EAAA,GACyC;AAC5C,SACE,gBAAA,EAAC,EAAU,aAAX;AAAA,IACE,WAAW,EAAG,6BAA6B,CAAS;AAAA,IACpD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAM,EAAE,WAAA,GAAW,GAAG,EAAA,GAA8C;AAC3E,SACE,gBAAA,EAAC,EAAU,OAAX;AAAA,IACE,WAAW,EAAG,0BAA0B,CAAS;AAAA,IACjD,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAQ;AAAA,EACnB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,aAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAM,EAAU;AAAA,EAChB,UAAU,EAAU;AACtB"}
|
package/dist/components/form.js
CHANGED
package/dist/components/input.js
CHANGED
package/dist/components/kbd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as i } from "../chunks/cn-
|
|
2
|
+
import { t as i } from "../chunks/cn-7uGUzCOM.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
6
|
-
function s({ keys: e, className: n, children:
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
className: i(
|
|
9
|
-
...
|
|
10
|
-
children:
|
|
4
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
+
var m = "inline-flex h-4 min-w-4 items-center justify-center rounded-[3px] px-1 font-mono text-xs font-medium text-pho-quaternary ring-1 ring-pho-secondary ring-inset select-none";
|
|
6
|
+
function s({ keys: e, className: n, children: t, ...r }) {
|
|
7
|
+
return /* @__PURE__ */ o("kbd", {
|
|
8
|
+
className: i(m, n),
|
|
9
|
+
...r,
|
|
10
|
+
children: t ?? e
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
s.displayName = "Kbd";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd/kbd.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** A single keycap surface — a
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd/kbd.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** A single keycap surface — a mono-label pill with the site hairline (ring-pho-secondary) in the quaternary ink. */\nconst KBD_CLASS =\n \"inline-flex h-4 min-w-4 items-center justify-center rounded-[3px] px-1 font-mono text-xs font-medium text-pho-quaternary ring-1 ring-pho-secondary ring-inset select-none\";\n\ninterface KbdBaseProps {\n /** Convenience string for the key(s) to show, e.g. \"⌘K\". Ignored when `children` are provided. */\n keys?: string;\n}\n\nexport interface KbdProps\n extends KbdBaseProps, Omit<ComponentProps<\"kbd\">, keyof KbdBaseProps> {}\n\n/**\n * Kbd — a keyboard keycap for documenting a shortcut (`⌘K`, `Esc`, `↵`). Supply\n * the key via `children` or the `keys` string; for a chord, place several in a\n * row (`Press ⌘ K`). It's purely presentational and carries no interaction — to\n * actually trigger a shortcut, wire a key handler on the target control.\n */\nexport function Kbd({ keys, className, children, ...props }: KbdProps) {\n return (\n <kbd className={cn(KBD_CLASS, className)} {...props}>\n {children ?? keys}\n </kbd>\n );\n}\n\nKbd.displayName = \"Kbd\";\n"],"mappings":";;;;AAIA,IAAM,IACJ;AAgBF,SAAgB,EAAI,EAAE,MAAA,GAAM,WAAA,GAAW,UAAA,GAAU,GAAG,EAAA,GAAmB;AACrE,SACE,gBAAA,EAAC,OAAD;AAAA,IAAK,WAAW,EAAG,GAAW,CAAS;AAAA,IAAG,GAAI;AAAA,cAC3C,KAAY;AAAA,EACV,CAAA;AAET;AAEA,EAAI,cAAc"}
|
package/dist/components/menu.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as o } from "../chunks/cn-
|
|
2
|
+
import { t as o } from "../chunks/cn-7uGUzCOM.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { Menubar as
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { Menubar as a } from "@base-ui/react/menubar";
|
|
6
6
|
function i({ className: r, ...e }) {
|
|
7
|
-
return /* @__PURE__ */ a
|
|
8
|
-
className: o("squircle border-pho-secondary bg-pho-primary
|
|
7
|
+
return /* @__PURE__ */ n(a, {
|
|
8
|
+
className: o("squircle border-pho-secondary bg-pho-primary inline-flex items-center gap-1 rounded-lg border p-1", r),
|
|
9
9
|
...e
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.js","names":[],"sources":["../../src/components/menubar/menubar.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface MenubarProps extends Omit<\n ComponentProps<typeof BaseMenubar>,\n \"className\"\n> {\n className?: string;\n}\n\n/**\n * Horizontal bar of top-level menus, built on Base UI `Menubar` — the classic\n * desktop-app menu strip (File / Edit / View). Place `Menu` components inside;\n * the menubar coordinates roving focus and lets open menus switch on hover.\n */\nexport function Menubar({ className, ...props }: MenubarProps) {\n return (\n <BaseMenubar\n className={cn(\n \"squircle border-pho-secondary bg-pho-primary
|
|
1
|
+
{"version":3,"file":"menubar.js","names":[],"sources":["../../src/components/menubar/menubar.tsx"],"sourcesContent":["import { type ComponentProps } from \"react\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface MenubarProps extends Omit<\n ComponentProps<typeof BaseMenubar>,\n \"className\"\n> {\n className?: string;\n}\n\n/**\n * Horizontal bar of top-level menus, built on Base UI `Menubar` — the classic\n * desktop-app menu strip (File / Edit / View). Place `Menu` components inside;\n * the menubar coordinates roving focus and lets open menus switch on hover.\n */\nexport function Menubar({ className, ...props }: MenubarProps) {\n return (\n <BaseMenubar\n className={cn(\n // Static app chrome, not a floating layer — flat, the hairline border\n // carries the edge (shadows are reserved for the menus it opens).\n \"squircle border-pho-secondary bg-pho-primary inline-flex items-center gap-1 rounded-lg border p-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\nMenubar.displayName = \"Menubar\";\n"],"mappings":";;;;;AAgBA,SAAgB,EAAQ,EAAE,WAAA,GAAW,GAAG,EAAA,GAAuB;AAC7D,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW,EAGT,qGACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,EAAQ,cAAc"}
|
package/dist/components/meter.js
CHANGED