@photon-ai/pho-ui 0.7.2 → 1.0.1
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-Dan0oRvL.js +208 -0
- package/dist/chunks/menu-Dan0oRvL.js.map +1 -0
- package/dist/chunks/{sidebar-CivriTLb.js → sidebar-Buhva5xa.js} +13 -13
- package/dist/chunks/sidebar-Buhva5xa.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 +55 -39
- 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 +35 -35
- 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 +203 -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 +81 -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 +5 -1
- package/src/styles/theme.css +183 -147
- 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,101 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as o } from "./cn-7uGUzCOM.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
-
import { Menu as r } from "@base-ui/react/menu";
|
|
6
|
-
import { Separator as p } from "@base-ui/react/separator";
|
|
7
|
-
var u = "squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary origin-[var(--transform-origin)] min-w-44 rounded-xl p-1 ring-1 ring-inset outline-none transition-[transform,opacity] duration-150 ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0", n = "relative flex cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2.5 text-sm text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:text-fg-pho-quaternary", m = r.Root, c = r.Trigger, l = r.Portal, d = r.Group, g = r.RadioGroup, h = r.SubmenuRoot;
|
|
8
|
-
function f({ className: t, sideOffset: e = 6, ...s }) {
|
|
9
|
-
return /* @__PURE__ */ a(r.Positioner, {
|
|
10
|
-
sideOffset: e,
|
|
11
|
-
className: o("z-50", t),
|
|
12
|
-
...s
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function x({ className: t, ...e }) {
|
|
16
|
-
return /* @__PURE__ */ a(r.Popup, {
|
|
17
|
-
className: o(u, t),
|
|
18
|
-
...e
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
function b({ className: t, ...e }) {
|
|
22
|
-
return /* @__PURE__ */ a(r.Item, {
|
|
23
|
-
className: o(n, t),
|
|
24
|
-
...e
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function v({ className: t, ...e }) {
|
|
28
|
-
return /* @__PURE__ */ a(r.LinkItem, {
|
|
29
|
-
className: o(n, t),
|
|
30
|
-
...e
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function y({ className: t, ...e }) {
|
|
34
|
-
return /* @__PURE__ */ a(r.GroupLabel, {
|
|
35
|
-
className: o("text-pho-quaternary px-2.5 py-1.5 text-xs font-medium", t),
|
|
36
|
-
...e
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function I({ className: t, ...e }) {
|
|
40
|
-
return /* @__PURE__ */ a(p, {
|
|
41
|
-
className: o("-mx-1 my-1 h-px bg-[var(--border-color-pho-secondary)]", t),
|
|
42
|
-
...e
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function N({ className: t, ...e }) {
|
|
46
|
-
return /* @__PURE__ */ a(r.SubmenuTrigger, {
|
|
47
|
-
className: o(n, "data-[popup-open]:bg-pho-ghost-hover", t),
|
|
48
|
-
...e
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function R({ className: t, ...e }) {
|
|
52
|
-
return /* @__PURE__ */ a(r.CheckboxItem, {
|
|
53
|
-
className: o(n, "pl-8", t),
|
|
54
|
-
...e
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function P({ className: t, ...e }) {
|
|
58
|
-
return /* @__PURE__ */ a(r.RadioItem, {
|
|
59
|
-
className: o(n, "pl-8", t),
|
|
60
|
-
...e
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
var i = "text-pho-brand absolute left-2.5 flex items-center [&>svg]:size-4";
|
|
64
|
-
function C({ className: t, ...e }) {
|
|
65
|
-
return /* @__PURE__ */ a(r.CheckboxItemIndicator, {
|
|
66
|
-
className: o(i, t),
|
|
67
|
-
...e
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function S({ className: t, ...e }) {
|
|
71
|
-
return /* @__PURE__ */ a(r.RadioItemIndicator, {
|
|
72
|
-
className: o(i, t),
|
|
73
|
-
...e
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
var L = {
|
|
77
|
-
Root: m,
|
|
78
|
-
Trigger: c,
|
|
79
|
-
Portal: l,
|
|
80
|
-
Positioner: f,
|
|
81
|
-
Popup: x,
|
|
82
|
-
Item: b,
|
|
83
|
-
LinkItem: v,
|
|
84
|
-
Group: d,
|
|
85
|
-
GroupLabel: y,
|
|
86
|
-
Separator: I,
|
|
87
|
-
SubmenuRoot: h,
|
|
88
|
-
SubmenuTrigger: N,
|
|
89
|
-
CheckboxItem: R,
|
|
90
|
-
CheckboxItemIndicator: C,
|
|
91
|
-
RadioGroup: g,
|
|
92
|
-
RadioItem: P,
|
|
93
|
-
RadioItemIndicator: S
|
|
94
|
-
};
|
|
95
|
-
export {
|
|
96
|
-
u as n,
|
|
97
|
-
L as r,
|
|
98
|
-
n as t
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=menu-BfaNHnOp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu-BfaNHnOp.js","names":[],"sources":["../../src/components/menu/menu.tsx"],"sourcesContent":["import { type ComponentProps, type ElementType } from \"react\";\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Separator as BaseSeparator } from \"@base-ui/react/separator\";\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\n/** Shared popup + item styles, reused by `ContextMenu` and `Menubar` menus. */\n// Floating layer: keeps its elevation shadow, sits on the primary surface\n// with the site's hairline (ring-pho-secondary, #eee/#202020) as its edge.\nexport const MENU_POPUP =\n \"squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary origin-[var(--transform-origin)] min-w-44 rounded-xl p-1 ring-1 ring-inset outline-none transition-[transform,opacity] duration-150 ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0\";\n// Highlighted item uses the ghost-hover wash (Font/5%) so it reads as a\n// lighten/darken over the popup in BOTH modes (bg-pho-secondary is darker\n// than the popup surface in dark mode).\nexport const MENU_ITEM =\n \"relative flex cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2.5 text-sm text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:text-fg-pho-quaternary\";\n\nconst Root = BaseMenu.Root;\nconst Trigger = BaseMenu.Trigger;\nconst Portal = BaseMenu.Portal;\nconst Group = BaseMenu.Group;\nconst RadioGroup = BaseMenu.RadioGroup;\nconst SubmenuRoot = BaseMenu.SubmenuRoot;\n\nfunction Positioner({\n className,\n sideOffset = 6,\n ...props\n}: StyledProps<typeof BaseMenu.Positioner>) {\n return (\n <BaseMenu.Positioner\n sideOffset={sideOffset}\n className={cn(\"z-50\", className)}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseMenu.Popup>) {\n return <BaseMenu.Popup className={cn(MENU_POPUP, className)} {...props} />;\n}\n\nfunction Item({ className, ...props }: StyledProps<typeof BaseMenu.Item>) {\n return <BaseMenu.Item className={cn(MENU_ITEM, className)} {...props} />;\n}\n\nfunction LinkItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.LinkItem>) {\n return <BaseMenu.LinkItem className={cn(MENU_ITEM, className)} {...props} />;\n}\n\nfunction GroupLabel({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.GroupLabel>) {\n return (\n <BaseMenu.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 BaseMenu.SubmenuTrigger>) {\n return (\n <BaseMenu.SubmenuTrigger\n className={cn(\n MENU_ITEM,\n \"data-[popup-open]:bg-pho-ghost-hover\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CheckboxItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItem>) {\n return (\n <BaseMenu.CheckboxItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction RadioItem({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItem>) {\n return (\n <BaseMenu.RadioItem\n className={cn(MENU_ITEM, \"pl-8\", className)}\n {...props}\n />\n );\n}\n\nconst CHECK_INDICATOR =\n \"text-pho-brand absolute left-2.5 flex items-center [&>svg]:size-4\";\n\nfunction CheckboxItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.CheckboxItemIndicator>) {\n return (\n <BaseMenu.CheckboxItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\nfunction RadioItemIndicator({\n className,\n ...props\n}: StyledProps<typeof BaseMenu.RadioItemIndicator>) {\n return (\n <BaseMenu.RadioItemIndicator\n className={cn(CHECK_INDICATOR, className)}\n {...props}\n />\n );\n}\n\n/**\n * Dropdown menu built on Base UI `Menu` — a list of actions opened from a\n * trigger. Supports grouped items, separators, submenus\n * (`SubmenuRoot` + `SubmenuTrigger`), and stateful `CheckboxItem` /\n * `RadioItem`s. For a right-click menu use `ContextMenu`.\n */\nexport const Menu = {\n Root,\n Trigger,\n Portal,\n Positioner,\n Popup,\n Item,\n LinkItem,\n Group,\n GroupLabel,\n Separator,\n SubmenuRoot,\n SubmenuTrigger,\n CheckboxItem,\n CheckboxItemIndicator,\n RadioGroup,\n RadioItem,\n RadioItemIndicator,\n};\n"],"mappings":";;;;;;AAgBA,IAAa,IACX,oVAIW,IACX,8TAEI,IAAO,EAAS,MAChB,IAAU,EAAS,SACnB,IAAS,EAAS,QAClB,IAAQ,EAAS,OACjB,IAAa,EAAS,YACtB,IAAc,EAAS;AAE7B,SAAS,EAAW,EAClB,WAAA,GACA,YAAA,IAAa,GACb,GAAG,EAAA,GACuC;AA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AAAA,IACE,WAAW,EAAG,GAAW,QAAQ,CAAS;AAAA,IAC1C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,WAAA,GACA,GAAG,EAAA,GACsC;AACzC,SACE,gBAAA,EAAC,EAAS,WAAV;AAAA,IACE,WAAW,EAAG,GAAW,QAAQ,CAAS;AAAA,IAC1C,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,IAAM,IACJ;AAEF,SAAS,EAAsB,EAC7B,WAAA,GACA,GAAG,EAAA,GACkD;AACrD,SACE,gBAAA,EAAC,EAAS,uBAAV;AAAA,IACE,WAAW,EAAG,GAAiB,CAAS;AAAA,IACxC,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAmB,EAC1B,WAAA,GACA,GAAG,EAAA,GAC+C;AAClD,SACE,gBAAA,EAAC,EAAS,oBAAV;AAAA,IACE,WAAW,EAAG,GAAiB,CAAS;AAAA,IACxC,GAAI;AAAA,EACL,CAAA;AAEL;AAQA,IAAa,IAAO;AAAA,EAClB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,cAAA;AAAA,EACA,uBAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA,oBAAA;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-CivriTLb.js","names":["__iconNode"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.44.0_react@19.2.7/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowUpRight.mjs","../../../../node_modules/.pnpm/@tabler+icons-react@3.44.0_react@19.2.7/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.mjs","../../src/sections/sidebar/sidebar.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.44.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M17 7l-10 10\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M8 7l9 0l0 9\", \"key\": \"svg-1\" }]];\nconst IconArrowUpRight = createReactComponent(\"outline\", \"arrow-up-right\", \"ArrowUpRight\", __iconNode);\n\nexport { __iconNode, IconArrowUpRight as default };\n//# sourceMappingURL=IconArrowUpRight.mjs.map\n","/**\n * @license @tabler/icons-react v3.44.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0\", \"key\": \"svg-2\" }]];\nconst IconDots = createReactComponent(\"outline\", \"dots\", \"Dots\", __iconNode);\n\nexport { __iconNode, IconDots as default };\n//# sourceMappingURL=IconDots.mjs.map\n","import {\n isValidElement,\n type AnchorHTMLAttributes,\n type ButtonHTMLAttributes,\n type ComponentProps,\n type FC,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { IconArrowUpRight, IconDots } from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { isReactComponent } from \"../../utils/is-react-component\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\nimport { Avatar } from \"../../components/avatar\";\nimport { buttonVariants } from \"../../components/button\";\n\n/**\n * Sidebar — Pho's first SECTION: a composed app rail, not a micro component.\n * It encodes the navigation rail used across Photon surfaces (the Pho docs\n * site, the dashboard): a sticky full-height column with a brand header, a\n * scrollable stack of titled nav groups, and a pinned footer that usually\n * carries the account row.\n *\n * Sections stay presentational — no router, no data fetching, no theme\n * plumbing. Links render through the host's `LinkProvider` (same contract as\n * `ButtonLink`), state arrives via props (`active`), and interactive footers\n * compose with other Pho parts (e.g. wrap `Sidebar.AccountRow` in a\n * `Menu.Trigger render={...}` to open an account menu).\n */\n\n/* ------------------------------- class map ------------------------------- */\n\n/** The rail itself — sticky, full-height, hairline right edge. */\nexport const SIDEBAR_ROOT =\n \"border-pho-secondary bg-pho-page sticky top-0 flex h-dvh w-64 shrink-0 flex-col border-r px-4 py-5\";\n\n/** A nav row at rest and on hover. Active/inactive inks split below. */\nexport const SIDEBAR_ITEM =\n \"outline-pho-brand flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1\";\n\n/**\n * Selected row — lifted onto the primary surface with the site hairline.\n * The icon carries the same ink as the label so the pair reads as one unit.\n */\nexport const SIDEBAR_ITEM_ACTIVE =\n \"bg-pho-primary text-pho-primary ring-pho-secondary font-medium ring-1 ring-inset *:data-icon:text-fg-pho-primary\";\n\n/**\n * Resting row — secondary ink (75% alpha; tertiary at 50% fails contrast for\n * nav labels), ghost wash on hover. The icon tracks the label's ink at every\n * state instead of sitting on a fainter step.\n */\nexport const SIDEBAR_ITEM_INACTIVE = cn(\n \"text-pho-secondary *:data-icon:text-fg-pho-secondary\",\n \"hover:bg-pho-ghost-hover hover:text-pho-primary hover:*:data-icon:text-fg-pho-primary\",\n);\n\n/* --------------------------------- frame --------------------------------- */\n\ninterface RootProps extends ComponentProps<\"aside\"> {\n ref?: Ref<HTMLElement>;\n}\n\n/** The rail — a sticky, full-height `<aside>` with the hairline right edge. */\nfunction Root({ className, ...props }: RootProps) {\n return <aside className={cn(SIDEBAR_ROOT, className)} {...props} />;\n}\n\n/** Brand slot at the top of the rail — logo, wordmark, workspace switcher. */\nfunction Header({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\"mb-6 flex items-center gap-2.5 px-2\", className)}\n {...props}\n />\n );\n}\n\n/** The scrollable middle — a stack of `Sidebar.Group`s. */\nfunction Nav({ className, ...props }: ComponentProps<\"nav\">) {\n return (\n <nav\n className={cn(\"flex flex-1 flex-col gap-6 overflow-y-auto\", className)}\n {...props}\n />\n );\n}\n\n/** One titled cluster of nav rows: a `GroupLabel` followed by a `List`. */\nfunction Group({ className, ...props }: ComponentProps<\"div\">) {\n return <div className={className} {...props} />;\n}\n\n/** The cluster's caption — secondary ink; quaternary (30%) is illegible. */\nfunction GroupLabel({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"text-pho-secondary mb-2 px-2 text-xs font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface ListProps extends ComponentProps<\"ul\"> {\n /** Lay the rows out in two columns — for long, flat registries. */\n columns?: boolean;\n}\n\n/** The rows of a group. `columns` switches to a two-column grid. */\nfunction List({ className, columns, ...props }: ListProps) {\n return (\n <ul\n className={cn(\n // list-none/m-0/p-0 shield the rail from host prose styles.\n \"m-0 list-none p-0 *:m-0\",\n columns\n ? \"grid grid-cols-2 gap-x-2 gap-y-0.5\"\n : \"flex flex-col gap-0.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Pinned bottom cluster — docs link, account row, theme toggle. */\nfunction Footer({ className, ...props }: ComponentProps<\"div\">) {\n return (\n <div className={cn(\"mt-4 flex flex-col gap-0.5\", className)} {...props} />\n );\n}\n\n/* --------------------------------- item ---------------------------------- */\n\n/** An icon slot — a component (`IconBook`) or element (`<IconBook />`). */\ntype Slottable = ReactNode | FC<{ className?: string }>;\n\nfunction renderIcon(icon: Slottable): ReactNode {\n if (icon == null || icon === false) return null;\n let content: ReactNode = null;\n if (isReactComponent(icon)) {\n const Icon = icon;\n content = <Icon />;\n } else if (isValidElement(icon)) {\n content = icon;\n }\n if (content == null) return null;\n return (\n <span\n data-icon\n className=\"pointer-events-none inline-flex shrink-0 items-center [&>svg]:size-4 [&>svg]:shrink-0\"\n >\n {content}\n </span>\n );\n}\n\ninterface ItemBaseProps {\n /** Slot before the label — a component (`IconBook`) or element. */\n icon?: Slottable;\n /** Marks the row as the current destination (adds `aria-current=\"page\"`). */\n active?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\nexport interface SidebarItemLinkProps\n extends\n ItemBaseProps,\n Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof ItemBaseProps> {\n /** Destination — rendered through the host's `LinkProvider`. */\n href: string;\n /** Leaves the app: opens in a new tab and renders a ↗ cue. */\n external?: boolean;\n}\n\nexport interface SidebarItemButtonProps\n extends\n ItemBaseProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ItemBaseProps> {\n href?: undefined;\n external?: undefined;\n}\n\nexport type SidebarItemProps = SidebarItemLinkProps | SidebarItemButtonProps;\n\n/**\n * A nav row — a link when `href` is given (rendered through the host's\n * `LinkProvider`), otherwise a button. `active` lifts the row onto the\n * primary surface; `external` opens a new tab and appends a ↗ cue.\n */\nfunction Item({\n icon,\n active,\n className,\n children,\n href,\n external,\n ...rest\n}: SidebarItemProps) {\n const Link = useLinkComponent();\n const rowClass = cn(\n SIDEBAR_ITEM,\n active ? SIDEBAR_ITEM_ACTIVE : SIDEBAR_ITEM_INACTIVE,\n className,\n );\n const label = <span className=\"min-w-0 flex-1 truncate\">{children}</span>;\n\n if (href !== undefined) {\n return (\n <li>\n <Link\n href={href}\n aria-current={active ? \"page\" : undefined}\n {...(external && { target: \"_blank\", rel: \"noopener noreferrer\" })}\n {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}\n className={rowClass}\n >\n {renderIcon(icon)}\n {label}\n {external && (\n <>\n {renderIcon(<IconArrowUpRight aria-hidden />)}\n <span className=\"sr-only\">(opens in a new tab)</span>\n </>\n )}\n </Link>\n </li>\n );\n }\n\n return (\n <li>\n <button\n type=\"button\"\n aria-current={active ? \"page\" : undefined}\n {...(rest as ButtonHTMLAttributes<HTMLButtonElement>)}\n className={rowClass}\n >\n {renderIcon(icon)}\n {label}\n </button>\n </li>\n );\n}\n\n/* ------------------------------ account row ------------------------------ */\n\n/**\n * Whole-row account trigger. The row itself stays visually quiet — it only\n * carries the `group` state (hover/press/popup-open) and the focus ring;\n * all visual feedback renders on the ⋯ circle via `group-*` classes.\n */\nconst ACCOUNT_ROW =\n \"group outline-pho-brand flex w-full cursor-pointer items-center gap-2 rounded-lg p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2\";\n\n/** Avatar initials: first + last word initial, else the first character. */\nfunction initialsFrom(name: string): string {\n const words = name.split(/\\s+/).filter(Boolean);\n const first = words[0]?.[0] ?? name[0] ?? \"?\";\n const last = words.length >= 2 ? (words[words.length - 1]?.[0] ?? \"\") : \"\";\n return (first + last).toUpperCase();\n}\n\nexport interface SidebarAccountRowProps extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n \"children\"\n> {\n /** Display name — also the source for fallback initials. */\n name: string;\n /** Avatar image URL; falls back to initials while loading or on error. */\n avatarSrc?: string;\n /** Override the derived initials. */\n initials?: string;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * The account chip pinned to the rail's footer — an xs avatar, the name, and\n * a decorative ⋯ circle. The WHOLE row is one button, but the row is only the\n * control — the circle is the indicator: hover, press, and menu-open feedback\n * all render on the ⋯ (a span wearing the stock secondary-circle button\n * classes), driven by the row's `group` state, so it reads as a button\n * without nesting one.\n *\n * It renders a plain `<button>` and forwards every prop, so it slots straight\n * into a menu: `<Menu.Trigger render={<Sidebar.AccountRow name=\"…\" />} />` —\n * Base UI's `data-popup-open` / `data-pressed` states light up the circle.\n */\nfunction AccountRow({\n name,\n avatarSrc,\n initials,\n className,\n ...props\n}: SidebarAccountRowProps) {\n return (\n <button type=\"button\" className={cn(ACCOUNT_ROW, className)} {...props}>\n <Avatar.Root size=\"xs\">\n {avatarSrc && <Avatar.Image src={avatarSrc} alt=\"\" />}\n <Avatar.Fallback>{initials ?? initialsFrom(name)}</Avatar.Fallback>\n </Avatar.Root>\n <span className=\"text-pho-primary min-w-0 flex-1 truncate text-xs\">\n {name}\n </span>\n <span\n aria-hidden\n className={buttonVariants({\n variant: \"secondary\",\n size: \"sm\",\n shape: \"circle\",\n className:\n \"group-hover:bg-pho-primary-hover group-hover:text-pho-secondary-hover group-data-[popup-open]:bg-pho-primary-hover group-data-[popup-open]:text-pho-secondary-hover p-1 group-data-[pressed]:scale-[0.97]\",\n })}\n >\n <IconDots className=\"size-4\" />\n </span>\n </button>\n );\n}\n\n/* -------------------------------- assembly ------------------------------- */\n\n/**\n * The composed sidebar rail. Assemble the frame parts and fill them with\n * rows; wire interactivity by composing other Pho parts around them:\n *\n * ```tsx\n * <Sidebar.Root>\n * <Sidebar.Header>…brand…</Sidebar.Header>\n * <Sidebar.Nav>\n * <Sidebar.Group>\n * <Sidebar.GroupLabel>Pages</Sidebar.GroupLabel>\n * <Sidebar.List>\n * <Sidebar.Item href=\"/\" icon={IconHome} active>\n * Overview\n * </Sidebar.Item>\n * </Sidebar.List>\n * </Sidebar.Group>\n * </Sidebar.Nav>\n * <Sidebar.Footer>\n * <Menu.Root>\n * <Menu.Trigger render={<Sidebar.AccountRow name=\"Ada Lovelace\" />} />\n * …\n * </Menu.Root>\n * </Sidebar.Footer>\n * </Sidebar.Root>\n * ```\n */\nexport const Sidebar = {\n Root,\n Header,\n Nav,\n Group,\n GroupLabel,\n List,\n Item,\n Footer,\n AccountRow,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;AASA,IAAMA,IAAa,CAAC,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAgB,KAAO;AAAQ,CAAC,GAAG,CAAC,QAAQ;AAAA,EAAE,GAAK;AAAA,EAAgB,KAAO;AAAQ,CAAC,CAAC,GAClH,IAAmB,EAAqB,WAAW,kBAAkB,gBAAgBA,CAAU,GCD/F,IAAa;AAAA,EAAC,CAAC,QAAQ;AAAA,IAAE,GAAK;AAA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,gBAAA,EAAC,GAAD,EAAU,WAAU,SAAU,CAAA;AAAA,MAC1B,CAAA;AAAA,IACA;AAAA;AAEZ;AA8BA,IAAa,IAAU;AAAA,EACrB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,YAAA;AACF"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ElementType } from 'react';
|
|
2
|
-
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
3
|
-
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
4
|
-
/** Override Base UI's `string | (state) => string` className with plain string. */
|
|
5
|
-
type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
|
|
6
|
-
className?: string;
|
|
7
|
-
};
|
|
8
|
-
declare function Positioner({ className, ...props }: StyledProps<typeof BaseContextMenu.Positioner>): import("react").JSX.Element;
|
|
9
|
-
declare function Popup({ className, ...props }: StyledProps<typeof BaseContextMenu.Popup>): import("react").JSX.Element;
|
|
10
|
-
declare function Item({ className, ...props }: StyledProps<typeof BaseContextMenu.Item>): import("react").JSX.Element;
|
|
11
|
-
declare function GroupLabel({ className, ...props }: StyledProps<typeof BaseContextMenu.GroupLabel>): import("react").JSX.Element;
|
|
12
|
-
declare function Separator({ className, ...props }: StyledProps<typeof BaseSeparator>): import("react").JSX.Element;
|
|
13
|
-
declare function SubmenuTrigger({ className, ...props }: StyledProps<typeof BaseContextMenu.SubmenuTrigger>): import("react").JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* Right-click (context) menu built on Base UI `ContextMenu`. `ContextMenu.Trigger`
|
|
16
|
-
* wraps the area that opens the menu on right-click / long-press; the popup
|
|
17
|
-
* shares its look with `Menu`. Always mirror these actions somewhere visible —
|
|
18
|
-
* a context menu must not be the only way to reach them.
|
|
19
|
-
*/
|
|
20
|
-
export declare const ContextMenu: {
|
|
21
|
-
Root: typeof BaseContextMenu.Root;
|
|
22
|
-
Trigger: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuTriggerProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
-
Portal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPortalProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
|
-
Positioner: typeof Positioner;
|
|
25
|
-
Popup: typeof Popup;
|
|
26
|
-
Item: typeof Item;
|
|
27
|
-
Group: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
28
|
-
GroupLabel: typeof GroupLabel;
|
|
29
|
-
Separator: typeof Separator;
|
|
30
|
-
SubmenuRoot: typeof BaseContextMenu.SubmenuRoot;
|
|
31
|
-
SubmenuTrigger: typeof SubmenuTrigger;
|
|
32
|
-
RadioGroup: import('react').NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
|
-
};
|
|
34
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ElementType } from 'react';
|
|
2
|
-
import { Menu as BaseMenu } from '@base-ui/react/menu';
|
|
3
|
-
import { Separator as BaseSeparator } from '@base-ui/react/separator';
|
|
4
|
-
/** Override Base UI's `string | (state) => string` className with plain string. */
|
|
5
|
-
type StyledProps<T extends ElementType> = Omit<ComponentProps<T>, "className"> & {
|
|
6
|
-
className?: string;
|
|
7
|
-
};
|
|
8
|
-
/** Shared popup + item styles, reused by `ContextMenu` and `Menubar` menus. */
|
|
9
|
-
export declare const MENU_POPUP = "squircle bg-pho-primary text-pho-primary shadow-pho-lg ring-pho-secondary origin-[var(--transform-origin)] min-w-44 rounded-xl p-1 ring-1 ring-inset outline-none transition-[transform,opacity] duration-150 ease-out data-[starting-style]:scale-95 data-[starting-style]:opacity-0 data-[ending-style]:scale-95 data-[ending-style]:opacity-0";
|
|
10
|
-
export declare const MENU_ITEM = "relative flex cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-2.5 pl-2.5 text-sm text-pho-secondary outline-none select-none data-[highlighted]:bg-pho-ghost-hover data-[highlighted]:text-pho-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:text-fg-pho-quaternary";
|
|
11
|
-
declare function Positioner({ className, sideOffset, ...props }: StyledProps<typeof BaseMenu.Positioner>): import("react").JSX.Element;
|
|
12
|
-
declare function Popup({ className, ...props }: StyledProps<typeof BaseMenu.Popup>): import("react").JSX.Element;
|
|
13
|
-
declare function Item({ className, ...props }: StyledProps<typeof BaseMenu.Item>): import("react").JSX.Element;
|
|
14
|
-
declare function LinkItem({ className, ...props }: StyledProps<typeof BaseMenu.LinkItem>): import("react").JSX.Element;
|
|
15
|
-
declare function GroupLabel({ className, ...props }: StyledProps<typeof BaseMenu.GroupLabel>): import("react").JSX.Element;
|
|
16
|
-
declare function Separator({ className, ...props }: StyledProps<typeof BaseSeparator>): import("react").JSX.Element;
|
|
17
|
-
declare function SubmenuTrigger({ className, ...props }: StyledProps<typeof BaseMenu.SubmenuTrigger>): import("react").JSX.Element;
|
|
18
|
-
declare function CheckboxItem({ className, ...props }: StyledProps<typeof BaseMenu.CheckboxItem>): import("react").JSX.Element;
|
|
19
|
-
declare function RadioItem({ className, ...props }: StyledProps<typeof BaseMenu.RadioItem>): import("react").JSX.Element;
|
|
20
|
-
declare function CheckboxItemIndicator({ className, ...props }: StyledProps<typeof BaseMenu.CheckboxItemIndicator>): import("react").JSX.Element;
|
|
21
|
-
declare function RadioItemIndicator({ className, ...props }: StyledProps<typeof BaseMenu.RadioItemIndicator>): import("react").JSX.Element;
|
|
22
|
-
/**
|
|
23
|
-
* Dropdown menu built on Base UI `Menu` — a list of actions opened from a
|
|
24
|
-
* trigger. Supports grouped items, separators, submenus
|
|
25
|
-
* (`SubmenuRoot` + `SubmenuTrigger`), and stateful `CheckboxItem` /
|
|
26
|
-
* `RadioItem`s. For a right-click menu use `ContextMenu`.
|
|
27
|
-
*/
|
|
28
|
-
export declare const Menu: {
|
|
29
|
-
Root: <Payload>(props: BaseMenu.Root.Props<Payload>) => import("react").JSX.Element;
|
|
30
|
-
Trigger: BaseMenu.Trigger;
|
|
31
|
-
Portal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPortalProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
|
-
Positioner: typeof Positioner;
|
|
33
|
-
Popup: typeof Popup;
|
|
34
|
-
Item: typeof Item;
|
|
35
|
-
LinkItem: typeof LinkItem;
|
|
36
|
-
Group: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
37
|
-
GroupLabel: typeof GroupLabel;
|
|
38
|
-
Separator: typeof Separator;
|
|
39
|
-
SubmenuRoot: typeof BaseMenu.SubmenuRoot;
|
|
40
|
-
SubmenuTrigger: typeof SubmenuTrigger;
|
|
41
|
-
CheckboxItem: typeof CheckboxItem;
|
|
42
|
-
CheckboxItemIndicator: typeof CheckboxItemIndicator;
|
|
43
|
-
RadioGroup: import('react').NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
44
|
-
RadioItem: typeof RadioItem;
|
|
45
|
-
RadioItemIndicator: typeof RadioItemIndicator;
|
|
46
|
-
};
|
|
47
|
-
export {};
|