@locusgraph/components 0.1.1 → 0.2.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.
Files changed (116) hide show
  1. package/dist/action/button-group.js +148 -17
  2. package/dist/action/button.js +91 -27
  3. package/dist/action/toggle-group.js +176 -12
  4. package/dist/action/toggle.js +71 -18
  5. package/dist/display/avatar.js +118 -7
  6. package/dist/display/badge.d.ts +1 -1
  7. package/dist/display/badge.js +74 -17
  8. package/dist/display/chart/chart-container.js +205 -45
  9. package/dist/display/chart/chart-legend.js +79 -14
  10. package/dist/display/chart/chart-tooltip.js +211 -40
  11. package/dist/display/chat/attachment/attachment-parts.js +222 -13
  12. package/dist/display/chat/attachment/attachment.js +210 -28
  13. package/dist/display/chat/bubble.js +225 -37
  14. package/dist/display/chat/marker.js +143 -15
  15. package/dist/display/chat/message-scroller.js +277 -15
  16. package/dist/display/chat/message.js +238 -13
  17. package/dist/display/content/item.js +448 -47
  18. package/dist/display/content/kbd.js +78 -5
  19. package/dist/display/media/aspect-ratio.js +27 -3
  20. package/dist/display/media/carousel-controls.js +163 -12
  21. package/dist/display/media/carousel.js +325 -65
  22. package/dist/display/rule-grid/rule-grid.d.ts +3 -1
  23. package/dist/display/rule-grid/rule-grid.js +311 -25
  24. package/dist/display/separator.js +56 -3
  25. package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
  26. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
  27. package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
  28. package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
  29. package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
  30. package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
  31. package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
  32. package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
  33. package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
  34. package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
  35. package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
  36. package/dist/display/skeletons/skeleton-parts.js +68 -0
  37. package/dist/display/status/alert.d.ts +1 -1
  38. package/dist/display/status/alert.js +137 -17
  39. package/dist/display/status/empty.js +250 -22
  40. package/dist/display/status/progress.d.ts +5 -1
  41. package/dist/display/status/progress.js +120 -3
  42. package/dist/display/status/skeleton.js +40 -3
  43. package/dist/display/status/spinner.js +42 -4
  44. package/dist/display/table.js +310 -17
  45. package/dist/feedback/toaster.d.ts +1 -1
  46. package/dist/feedback/toaster.js +100 -25
  47. package/dist/form/advanced/calendar-day-button.js +89 -12
  48. package/dist/form/advanced/calendar.js +349 -56
  49. package/dist/form/advanced/combobox/combobox-chips.js +152 -9
  50. package/dist/form/advanced/combobox/combobox-items.js +240 -15
  51. package/dist/form/advanced/combobox/combobox.js +387 -14
  52. package/dist/form/advanced/input-otp.js +202 -12
  53. package/dist/form/choice/checkbox.js +59 -4
  54. package/dist/form/choice/radio-group.js +95 -6
  55. package/dist/form/choice/select.js +479 -25
  56. package/dist/form/choice/slider.js +118 -4
  57. package/dist/form/choice/switch.js +53 -3
  58. package/dist/form/field/field-error.js +117 -14
  59. package/dist/form/field/field-separator.js +70 -3
  60. package/dist/form/field/field-set.js +85 -5
  61. package/dist/form/field/field-text.js +116 -7
  62. package/dist/form/field/field.js +138 -26
  63. package/dist/form/hook-form/form.js +338 -40
  64. package/dist/form/input-group.js +297 -47
  65. package/dist/form/input.js +47 -3
  66. package/dist/form/label.js +42 -3
  67. package/dist/form/native-select.js +148 -8
  68. package/dist/form/textarea.js +41 -3
  69. package/dist/index.d.ts +6 -0
  70. package/dist/index.js +6 -0
  71. package/dist/layout/accordion.js +166 -9
  72. package/dist/layout/collapsible.js +75 -7
  73. package/dist/layout/resizable.js +123 -8
  74. package/dist/layout/scroll/direction.js +25 -3
  75. package/dist/layout/scroll/scroll-area.d.ts +1 -1
  76. package/dist/layout/scroll/scroll-area.js +138 -5
  77. package/dist/layout/sidebar/sidebar-context.js +184 -51
  78. package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
  79. package/dist/layout/sidebar/sidebar-menu.js +319 -38
  80. package/dist/layout/sidebar/sidebar-sections.js +369 -22
  81. package/dist/layout/sidebar/sidebar.js +385 -29
  82. package/dist/layout/tabs.js +183 -18
  83. package/dist/layout/use-mobile.js +23 -10
  84. package/dist/navigation/breadcrumb.js +302 -18
  85. package/dist/navigation/menubar/menubar-items.js +323 -17
  86. package/dist/navigation/menubar/menubar-sub.js +126 -8
  87. package/dist/navigation/menubar/menubar.js +213 -13
  88. package/dist/navigation/navigation-menu.js +367 -19
  89. package/dist/navigation/pagination.js +329 -20
  90. package/dist/overlay/alert-dialog.js +485 -26
  91. package/dist/overlay/context-menu/context-menu-items.js +323 -17
  92. package/dist/overlay/context-menu/context-menu-sub.js +126 -8
  93. package/dist/overlay/context-menu/context-menu.js +140 -11
  94. package/dist/overlay/dialog.js +406 -25
  95. package/dist/overlay/floating/command.js +424 -21
  96. package/dist/overlay/floating/drawer.js +354 -22
  97. package/dist/overlay/floating/hover-card.js +107 -7
  98. package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
  99. package/dist/overlay/menu/dropdown-menu-item.js +174 -9
  100. package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
  101. package/dist/overlay/menu/dropdown-menu.js +147 -12
  102. package/dist/overlay/popover.js +106 -7
  103. package/dist/overlay/sheet.js +380 -27
  104. package/dist/overlay/tooltip.js +145 -9
  105. package/dist/shell/app-header.js +81 -5
  106. package/dist/shell/app-shell.js +58 -3
  107. package/dist/shell/breadcrumbs.js +102 -12
  108. package/dist/shell/docs/docs-header.js +211 -11
  109. package/dist/shell/docs/docs-shell.js +100 -3
  110. package/dist/shell/docs/docs-sidebar.js +88 -7
  111. package/dist/shell/docs/on-this-page.js +78 -7
  112. package/dist/shell/docs/use-active-section.js +88 -42
  113. package/dist/shell/navigation/app-sidebar.js +188 -6
  114. package/dist/shell/navigation/nav-group.js +161 -10
  115. package/dist/shell/theme-toggle.js +52 -5
  116. package/package.json +5 -5
@@ -1,8 +1,63 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "cn";
3
3
  import { SidebarInset } from "../layout/sidebar/sidebar.js";
4
4
  import { SidebarProvider } from "../layout/sidebar/sidebar-context.js";
5
- function AppShell({ sidebar, header, children, defaultOpen, bodyClassName }) {
6
- return (_jsxs(SidebarProvider, { defaultOpen: defaultOpen, children: [sidebar, _jsxs(SidebarInset, { className: "h-svh overflow-hidden", children: [header, _jsx("div", { "data-slot": "app-shell-body", className: cn("no-scrollbar flex w-full flex-1 flex-col overflow-y-auto px-6 pt-7 pb-8 lg:px-8", bodyClassName), children: children })] })] }));
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ function AppShell(t0) {
7
+ const $ = _c(12);
8
+ const {
9
+ sidebar,
10
+ header,
11
+ children,
12
+ defaultOpen,
13
+ bodyClassName
14
+ } = t0;
15
+ let t1;
16
+ if ($[0] !== bodyClassName) {
17
+ t1 = cn("no-scrollbar flex w-full flex-1 flex-col overflow-y-auto px-6 pt-7 pb-8 lg:px-8", bodyClassName);
18
+ $[0] = bodyClassName;
19
+ $[1] = t1;
20
+ } else {
21
+ t1 = $[1];
22
+ }
23
+ let t2;
24
+ if ($[2] !== children || $[3] !== t1) {
25
+ t2 = /*#__PURE__*/_jsx("div", {
26
+ "data-slot": "app-shell-body",
27
+ className: t1,
28
+ children: children
29
+ });
30
+ $[2] = children;
31
+ $[3] = t1;
32
+ $[4] = t2;
33
+ } else {
34
+ t2 = $[4];
35
+ }
36
+ let t3;
37
+ if ($[5] !== header || $[6] !== t2) {
38
+ t3 = /*#__PURE__*/_jsxs(SidebarInset, {
39
+ className: "h-svh overflow-hidden",
40
+ children: [header, t2]
41
+ });
42
+ $[5] = header;
43
+ $[6] = t2;
44
+ $[7] = t3;
45
+ } else {
46
+ t3 = $[7];
47
+ }
48
+ let t4;
49
+ if ($[8] !== defaultOpen || $[9] !== sidebar || $[10] !== t3) {
50
+ t4 = /*#__PURE__*/_jsxs(SidebarProvider, {
51
+ defaultOpen: defaultOpen,
52
+ children: [sidebar, t3]
53
+ });
54
+ $[8] = defaultOpen;
55
+ $[9] = sidebar;
56
+ $[10] = t3;
57
+ $[11] = t4;
58
+ } else {
59
+ t4 = $[11];
60
+ }
61
+ return t4;
7
62
  }
8
63
  export { AppShell };
@@ -1,18 +1,108 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
1
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ChevronRightIcon } from "lucide-react";
3
- function CrumbLabel({ crumb, last, Link, }) {
4
- if (last) {
5
- return (_jsx("span", { "aria-current": "page", className: "truncate font-medium", children: crumb.label }));
4
+ function CrumbLabel(t0) {
5
+ const $ = _c(8);
6
+ const {
7
+ crumb,
8
+ last,
9
+ Link
10
+ } = t0;
11
+ if (last) {
12
+ let t1;
13
+ if ($[0] !== crumb.label) {
14
+ t1 = /*#__PURE__*/_jsx("span", {
15
+ "aria-current": "page",
16
+ className: "truncate font-medium",
17
+ children: crumb.label
18
+ });
19
+ $[0] = crumb.label;
20
+ $[1] = t1;
21
+ } else {
22
+ t1 = $[1];
6
23
  }
7
- if (crumb.href === undefined) {
8
- return _jsx("span", { className: "truncate text-soft", children: crumb.label });
24
+ return t1;
25
+ }
26
+ if (crumb.href === undefined) {
27
+ let t1;
28
+ if ($[2] !== crumb.label) {
29
+ t1 = /*#__PURE__*/_jsx("span", {
30
+ className: "truncate text-soft",
31
+ children: crumb.label
32
+ });
33
+ $[2] = crumb.label;
34
+ $[3] = t1;
35
+ } else {
36
+ t1 = $[3];
9
37
  }
10
- return (_jsx(Link, { href: crumb.href, className: "truncate text-soft transition-colors hover:text-foreground", children: crumb.label }));
38
+ return t1;
39
+ }
40
+ let t1;
41
+ if ($[4] !== Link || $[5] !== crumb.href || $[6] !== crumb.label) {
42
+ t1 = /*#__PURE__*/_jsx(Link, {
43
+ href: crumb.href,
44
+ className: "truncate text-soft transition-colors hover:text-foreground",
45
+ children: crumb.label
46
+ });
47
+ $[4] = Link;
48
+ $[5] = crumb.href;
49
+ $[6] = crumb.label;
50
+ $[7] = t1;
51
+ } else {
52
+ t1 = $[7];
53
+ }
54
+ return t1;
11
55
  }
12
- function Breadcrumbs({ items, linkComponent = "a" }) {
13
- return (_jsx("nav", { "aria-label": "Breadcrumb", className: "flex min-w-0 items-center gap-1.5 text-sm", children: items.map((crumb, index) => {
14
- const last = index === items.length - 1;
15
- return (_jsxs("span", { className: last ? "flex min-w-0 items-center gap-1.5" : "hidden items-center gap-1.5 sm:flex", children: [_jsx(CrumbLabel, { crumb: crumb, last: last, Link: linkComponent }), last ? null : (_jsx(ChevronRightIcon, { className: "size-3.5 shrink-0 text-faint", "aria-hidden": true }))] }, crumb.href ?? index));
16
- }) }));
56
+ function Breadcrumbs(t0) {
57
+ const $ = _c(8);
58
+ const {
59
+ items,
60
+ linkComponent: t1
61
+ } = t0;
62
+ const linkComponent = t1 === undefined ? "a" : t1;
63
+ let t2;
64
+ if ($[0] !== items || $[1] !== linkComponent) {
65
+ let t3;
66
+ if ($[3] !== items.length || $[4] !== linkComponent) {
67
+ t3 = (crumb, index) => {
68
+ const last = index === items.length - 1;
69
+ return /*#__PURE__*/_jsxs("span", {
70
+ className: last ? "flex min-w-0 items-center gap-1.5" : "hidden items-center gap-1.5 sm:flex",
71
+ children: [/*#__PURE__*/_jsx(CrumbLabel, {
72
+ crumb: crumb,
73
+ last: last,
74
+ Link: linkComponent
75
+ }), last ? null : /*#__PURE__*/_jsx(ChevronRightIcon, {
76
+ className: "size-3.5 shrink-0 text-faint",
77
+ "aria-hidden": true
78
+ })]
79
+ }, crumb.href ?? index);
80
+ };
81
+ $[3] = items.length;
82
+ $[4] = linkComponent;
83
+ $[5] = t3;
84
+ } else {
85
+ t3 = $[5];
86
+ }
87
+ t2 = items.map(t3);
88
+ $[0] = items;
89
+ $[1] = linkComponent;
90
+ $[2] = t2;
91
+ } else {
92
+ t2 = $[2];
93
+ }
94
+ let t3;
95
+ if ($[6] !== t2) {
96
+ t3 = /*#__PURE__*/_jsx("nav", {
97
+ "aria-label": "Breadcrumb",
98
+ className: "flex min-w-0 items-center gap-1.5 text-sm",
99
+ children: t2
100
+ });
101
+ $[6] = t2;
102
+ $[7] = t3;
103
+ } else {
104
+ t3 = $[7];
105
+ }
106
+ return t3;
17
107
  }
18
108
  export { Breadcrumbs };
@@ -1,20 +1,220 @@
1
1
  "use client";
2
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { Menu as MenuIcon } from "@carbon/icons-react";
3
5
  import { cn } from "cn";
4
- import { MenuIcon } from "lucide-react";
5
6
  import { useState } from "react";
6
7
  import { Button } from "../../action/button.js";
7
8
  import { Sheet, SheetContent, SheetTitle } from "../../overlay/sheet.js";
8
- function MobileNavSheet({ children }) {
9
- const [open, setOpen] = useState(false);
10
- const closeOnLinkClick = (event) => {
11
- if (event.target.closest("a")) {
12
- setOpen(false);
13
- }
9
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
+ function MobileNavSheet(t0) {
11
+ const $ = _c(8);
12
+ const {
13
+ children
14
+ } = t0;
15
+ const [open, setOpen] = useState(false);
16
+ let t1;
17
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
18
+ t1 = event => {
19
+ if (event.target.closest("a")) {
20
+ setOpen(false);
21
+ }
14
22
  };
15
- return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", size: "icon-sm", className: "lg:hidden", "aria-label": "Open menu", onClick: () => setOpen(true), children: _jsx(MenuIcon, {}) }), _jsx(Sheet, { open: open, onOpenChange: setOpen, children: _jsxs(SheetContent, { side: "left", className: "w-72 overflow-y-auto p-4", children: [_jsx(SheetTitle, { className: "sr-only", children: "Menu" }), _jsx("div", { onClickCapture: closeOnLinkClick, children: children })] }) })] }));
23
+ $[0] = t1;
24
+ } else {
25
+ t1 = $[0];
26
+ }
27
+ const closeOnLinkClick = t1;
28
+ let t2;
29
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
30
+ t2 = /*#__PURE__*/_jsx(Button, {
31
+ variant: "ghost",
32
+ size: "icon-sm",
33
+ className: "lg:hidden",
34
+ "aria-label": "Open menu",
35
+ onClick: () => setOpen(true),
36
+ children: /*#__PURE__*/_jsx(MenuIcon, {})
37
+ });
38
+ $[1] = t2;
39
+ } else {
40
+ t2 = $[1];
41
+ }
42
+ let t3;
43
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
44
+ t3 = /*#__PURE__*/_jsx(SheetTitle, {
45
+ className: "sr-only",
46
+ children: "Menu"
47
+ });
48
+ $[2] = t3;
49
+ } else {
50
+ t3 = $[2];
51
+ }
52
+ let t4;
53
+ if ($[3] !== children) {
54
+ t4 = /*#__PURE__*/_jsxs(SheetContent, {
55
+ side: "left",
56
+ className: "w-72 overflow-y-auto p-4",
57
+ children: [t3, /*#__PURE__*/_jsx("div", {
58
+ onClickCapture: closeOnLinkClick,
59
+ children: children
60
+ })]
61
+ });
62
+ $[3] = children;
63
+ $[4] = t4;
64
+ } else {
65
+ t4 = $[4];
66
+ }
67
+ let t5;
68
+ if ($[5] !== open || $[6] !== t4) {
69
+ t5 = /*#__PURE__*/_jsxs(_Fragment, {
70
+ children: [t2, /*#__PURE__*/_jsx(Sheet, {
71
+ open: open,
72
+ onOpenChange: setOpen,
73
+ children: t4
74
+ })]
75
+ });
76
+ $[5] = open;
77
+ $[6] = t4;
78
+ $[7] = t5;
79
+ } else {
80
+ t5 = $[7];
81
+ }
82
+ return t5;
16
83
  }
17
- function DocsHeader({ brand, links, activeHref, mobileNav, linkComponent: Link = "a", children, }) {
18
- return (_jsx("header", { "data-slot": "docs-header", className: "sticky top-0 z-50 w-full bg-background/95 backdrop-blur", children: _jsxs("div", { className: "mx-auto flex h-(--docs-header-height) w-full max-w-[1536px] items-center gap-4 px-6 **:data-[slot=separator]:h-4!", children: [_jsx(MobileNavSheet, { children: mobileNav }), _jsxs(Link, { href: brand.href, className: "flex items-center gap-2 font-brand text-base tracking-tight", children: [brand.icon, _jsxs("span", { children: [_jsx("span", { className: "font-bold", children: brand.name }), brand.product && _jsx("span", { className: "font-light", children: brand.product })] })] }), _jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-0.5 lg:flex", children: links.map((link) => (_jsx(Link, { href: link.href, "aria-current": link.href === activeHref ? "page" : undefined, className: cn("rounded-md px-2.5 py-1.5 text-sm font-medium text-foreground/80 transition-colors hover:text-foreground", link.href === activeHref && "text-foreground"), children: link.title }, link.href))) }), _jsx("div", { className: "ml-auto flex items-center gap-2", children: children })] }) }));
84
+ function DocsHeader(t0) {
85
+ const $ = _c(30);
86
+ const {
87
+ brand,
88
+ links,
89
+ activeHref,
90
+ mobileNav,
91
+ linkComponent: t1,
92
+ children
93
+ } = t0;
94
+ const Link = t1 === undefined ? "a" : t1;
95
+ let t2;
96
+ if ($[0] !== mobileNav) {
97
+ t2 = /*#__PURE__*/_jsx(MobileNavSheet, {
98
+ children: mobileNav
99
+ });
100
+ $[0] = mobileNav;
101
+ $[1] = t2;
102
+ } else {
103
+ t2 = $[1];
104
+ }
105
+ let t3;
106
+ if ($[2] !== brand.name) {
107
+ t3 = /*#__PURE__*/_jsx("span", {
108
+ className: "font-bold",
109
+ children: brand.name
110
+ });
111
+ $[2] = brand.name;
112
+ $[3] = t3;
113
+ } else {
114
+ t3 = $[3];
115
+ }
116
+ let t4;
117
+ if ($[4] !== brand.product) {
118
+ t4 = brand.product && /*#__PURE__*/_jsx("span", {
119
+ className: "font-light",
120
+ children: brand.product
121
+ });
122
+ $[4] = brand.product;
123
+ $[5] = t4;
124
+ } else {
125
+ t4 = $[5];
126
+ }
127
+ let t5;
128
+ if ($[6] !== t3 || $[7] !== t4) {
129
+ t5 = /*#__PURE__*/_jsxs("span", {
130
+ children: [t3, t4]
131
+ });
132
+ $[6] = t3;
133
+ $[7] = t4;
134
+ $[8] = t5;
135
+ } else {
136
+ t5 = $[8];
137
+ }
138
+ let t6;
139
+ if ($[9] !== Link || $[10] !== brand.href || $[11] !== brand.icon || $[12] !== t5) {
140
+ t6 = /*#__PURE__*/_jsxs(Link, {
141
+ href: brand.href,
142
+ className: "flex items-center gap-2 font-brand text-base tracking-tight",
143
+ children: [brand.icon, t5]
144
+ });
145
+ $[9] = Link;
146
+ $[10] = brand.href;
147
+ $[11] = brand.icon;
148
+ $[12] = t5;
149
+ $[13] = t6;
150
+ } else {
151
+ t6 = $[13];
152
+ }
153
+ let t7;
154
+ if ($[14] !== Link || $[15] !== activeHref || $[16] !== links) {
155
+ let t8;
156
+ if ($[18] !== Link || $[19] !== activeHref) {
157
+ t8 = link => /*#__PURE__*/_jsx(Link, {
158
+ href: link.href,
159
+ "aria-current": link.href === activeHref ? "page" : undefined,
160
+ className: cn("rounded-md px-2.5 py-1.5 text-sm font-medium text-foreground/80 transition-colors hover:text-foreground", link.href === activeHref && "text-foreground"),
161
+ children: link.title
162
+ }, link.href);
163
+ $[18] = Link;
164
+ $[19] = activeHref;
165
+ $[20] = t8;
166
+ } else {
167
+ t8 = $[20];
168
+ }
169
+ t7 = links.map(t8);
170
+ $[14] = Link;
171
+ $[15] = activeHref;
172
+ $[16] = links;
173
+ $[17] = t7;
174
+ } else {
175
+ t7 = $[17];
176
+ }
177
+ let t8;
178
+ if ($[21] !== t7) {
179
+ t8 = /*#__PURE__*/_jsx("nav", {
180
+ "aria-label": "Main",
181
+ className: "hidden items-center gap-0.5 lg:flex",
182
+ children: t7
183
+ });
184
+ $[21] = t7;
185
+ $[22] = t8;
186
+ } else {
187
+ t8 = $[22];
188
+ }
189
+ let t9;
190
+ if ($[23] !== children) {
191
+ t9 = /*#__PURE__*/_jsx("div", {
192
+ className: "ml-auto flex items-center gap-2",
193
+ children: children
194
+ });
195
+ $[23] = children;
196
+ $[24] = t9;
197
+ } else {
198
+ t9 = $[24];
199
+ }
200
+ let t10;
201
+ if ($[25] !== t2 || $[26] !== t6 || $[27] !== t8 || $[28] !== t9) {
202
+ t10 = /*#__PURE__*/_jsx("header", {
203
+ "data-slot": "docs-header",
204
+ className: "sticky top-0 z-50 w-full bg-background/95 backdrop-blur",
205
+ children: /*#__PURE__*/_jsxs("div", {
206
+ className: "mx-auto flex h-(--docs-header-height) w-full max-w-[1536px] items-center gap-4 px-6 **:data-[slot=separator]:h-4!",
207
+ children: [t2, t6, t8, t9]
208
+ })
209
+ });
210
+ $[25] = t2;
211
+ $[26] = t6;
212
+ $[27] = t8;
213
+ $[28] = t9;
214
+ $[29] = t10;
215
+ } else {
216
+ t10 = $[29];
217
+ }
218
+ return t10;
19
219
  }
20
220
  export { DocsHeader };
@@ -1,7 +1,104 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "cn";
3
3
  import { TooltipProvider } from "../../overlay/tooltip.js";
4
- function DocsShell({ header, sidebar, aside, children }) {
5
- return (_jsx(TooltipProvider, { delayDuration: 0, children: _jsxs("div", { "data-slot": "docs-shell", className: "flex min-h-svh flex-col bg-background [--docs-header-height:3.5rem] lg:[--docs-header-height:4rem]", children: [header, _jsxs("div", { className: cn("mx-auto w-full max-w-[1536px] flex-1 items-start px-2", sidebar && "lg:grid lg:grid-cols-[18rem_minmax(0,1fr)]"), children: [sidebar && (_jsx("aside", { "data-slot": "docs-sidebar", className: "sticky top-[calc(var(--docs-header-height)+0.6rem)] hidden h-[calc(100svh-10rem)] lg:block", children: sidebar })), _jsxs("div", { className: "flex min-w-0 items-stretch", children: [_jsx("main", { "data-slot": "docs-body", className: "min-w-0 flex-1 px-4 pt-6 pb-16 md:px-6 lg:pt-10", children: children }), aside && (_jsx("aside", { "data-slot": "docs-aside", className: "sticky top-[calc(var(--docs-header-height)+1px)] hidden h-[90svh] w-72 shrink-0 flex-col gap-8 overflow-hidden pt-10 xl:flex", children: _jsx("div", { className: "no-scrollbar flex flex-col gap-8 overflow-y-auto px-8", children: aside }) }))] })] })] }) }));
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ function DocsShell(t0) {
6
+ const $ = _c(18);
7
+ const {
8
+ header,
9
+ sidebar,
10
+ aside,
11
+ children
12
+ } = t0;
13
+ const t1 = sidebar && "lg:grid lg:grid-cols-[18rem_minmax(0,1fr)]";
14
+ let t2;
15
+ if ($[0] !== t1) {
16
+ t2 = cn("mx-auto w-full max-w-[1536px] flex-1 items-start px-2", t1);
17
+ $[0] = t1;
18
+ $[1] = t2;
19
+ } else {
20
+ t2 = $[1];
21
+ }
22
+ let t3;
23
+ if ($[2] !== sidebar) {
24
+ t3 = sidebar && /*#__PURE__*/_jsx("aside", {
25
+ "data-slot": "docs-sidebar",
26
+ className: "sticky top-[calc(var(--docs-header-height)+0.6rem)] hidden h-[calc(100svh-10rem)] lg:block",
27
+ children: sidebar
28
+ });
29
+ $[2] = sidebar;
30
+ $[3] = t3;
31
+ } else {
32
+ t3 = $[3];
33
+ }
34
+ let t4;
35
+ if ($[4] !== children) {
36
+ t4 = /*#__PURE__*/_jsx("main", {
37
+ "data-slot": "docs-body",
38
+ className: "min-w-0 flex-1 px-4 pt-6 pb-16 md:px-6 lg:pt-10",
39
+ children: children
40
+ });
41
+ $[4] = children;
42
+ $[5] = t4;
43
+ } else {
44
+ t4 = $[5];
45
+ }
46
+ let t5;
47
+ if ($[6] !== aside) {
48
+ t5 = aside && /*#__PURE__*/_jsx("aside", {
49
+ "data-slot": "docs-aside",
50
+ className: "sticky top-[calc(var(--docs-header-height)+1px)] hidden h-[90svh] w-72 shrink-0 flex-col gap-8 overflow-hidden pt-10 xl:flex",
51
+ children: /*#__PURE__*/_jsx("div", {
52
+ className: "no-scrollbar flex flex-col gap-8 overflow-y-auto px-8",
53
+ children: aside
54
+ })
55
+ });
56
+ $[6] = aside;
57
+ $[7] = t5;
58
+ } else {
59
+ t5 = $[7];
60
+ }
61
+ let t6;
62
+ if ($[8] !== t4 || $[9] !== t5) {
63
+ t6 = /*#__PURE__*/_jsxs("div", {
64
+ className: "flex min-w-0 items-stretch",
65
+ children: [t4, t5]
66
+ });
67
+ $[8] = t4;
68
+ $[9] = t5;
69
+ $[10] = t6;
70
+ } else {
71
+ t6 = $[10];
72
+ }
73
+ let t7;
74
+ if ($[11] !== t2 || $[12] !== t3 || $[13] !== t6) {
75
+ t7 = /*#__PURE__*/_jsxs("div", {
76
+ className: t2,
77
+ children: [t3, t6]
78
+ });
79
+ $[11] = t2;
80
+ $[12] = t3;
81
+ $[13] = t6;
82
+ $[14] = t7;
83
+ } else {
84
+ t7 = $[14];
85
+ }
86
+ let t8;
87
+ if ($[15] !== header || $[16] !== t7) {
88
+ t8 = /*#__PURE__*/_jsx(TooltipProvider, {
89
+ delayDuration: 0,
90
+ children: /*#__PURE__*/_jsxs("div", {
91
+ "data-slot": "docs-shell",
92
+ className: "flex min-h-svh flex-col bg-background [--docs-header-height:3.5rem] lg:[--docs-header-height:4rem]",
93
+ children: [header, t7]
94
+ })
95
+ });
96
+ $[15] = header;
97
+ $[16] = t7;
98
+ $[17] = t8;
99
+ } else {
100
+ t8 = $[17];
101
+ }
102
+ return t8;
6
103
  }
7
104
  export { DocsShell };
@@ -1,12 +1,93 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "cn";
3
- function DocsNavList({ groups, activeHref, linkComponent: Link = "a" }) {
4
- return (_jsx("div", { className: "flex flex-col gap-4", children: groups.map((group) => (_jsxs("div", { className: "flex flex-col", children: [_jsx("p", { className: "flex h-8 items-center px-2 text-xs font-medium text-muted-foreground", children: group.label }), _jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
5
- const active = item.href === activeHref;
6
- return (_jsx("li", { children: _jsx(Link, { href: item.href, "aria-current": active ? "page" : undefined, className: cn("flex h-[30px] w-fit items-center rounded-md border border-transparent px-2 text-[0.8rem] font-medium transition-colors hover:bg-accent", active && "border-accent bg-accent"), children: item.title }) }, item.href));
7
- }) })] }, group.label))) }));
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ function DocsNavList(t0) {
5
+ const $ = _c(9);
6
+ const {
7
+ groups,
8
+ activeHref,
9
+ linkComponent: t1
10
+ } = t0;
11
+ const Link = t1 === undefined ? "a" : t1;
12
+ let t2;
13
+ if ($[0] !== Link || $[1] !== activeHref || $[2] !== groups) {
14
+ let t3;
15
+ if ($[4] !== Link || $[5] !== activeHref) {
16
+ t3 = group => /*#__PURE__*/_jsxs("div", {
17
+ className: "flex flex-col",
18
+ children: [/*#__PURE__*/_jsx("p", {
19
+ className: "eyebrow flex h-8 items-center px-2",
20
+ children: group.label
21
+ }), /*#__PURE__*/_jsx("ul", {
22
+ className: "flex flex-col gap-0.5",
23
+ children: group.items.map(item => {
24
+ const active = item.href === activeHref;
25
+ return /*#__PURE__*/_jsx("li", {
26
+ children: /*#__PURE__*/_jsx(Link, {
27
+ href: item.href,
28
+ "aria-current": active ? "page" : undefined,
29
+ className: cn("flex h-[30px] w-fit items-center rounded-md border border-transparent px-2 text-sm font-medium transition-colors hover:bg-accent", active && "border-accent bg-accent"),
30
+ children: item.title
31
+ })
32
+ }, item.href);
33
+ })
34
+ })]
35
+ }, group.label);
36
+ $[4] = Link;
37
+ $[5] = activeHref;
38
+ $[6] = t3;
39
+ } else {
40
+ t3 = $[6];
41
+ }
42
+ t2 = groups.map(t3);
43
+ $[0] = Link;
44
+ $[1] = activeHref;
45
+ $[2] = groups;
46
+ $[3] = t2;
47
+ } else {
48
+ t2 = $[3];
49
+ }
50
+ let t3;
51
+ if ($[7] !== t2) {
52
+ t3 = /*#__PURE__*/_jsx("div", {
53
+ className: "flex flex-col gap-4",
54
+ children: t2
55
+ });
56
+ $[7] = t2;
57
+ $[8] = t3;
58
+ } else {
59
+ t3 = $[8];
60
+ }
61
+ return t3;
8
62
  }
9
63
  function DocsSidebar(props) {
10
- return (_jsxs("div", { className: "relative h-full", children: [_jsx("div", { className: "absolute top-12 right-2 bottom-0 w-px bg-[linear-gradient(to_bottom,transparent_0%,var(--border)_10%,var(--border)_90%,transparent_100%)]" }), _jsx("nav", { "aria-label": "Documentation", className: "no-scrollbar h-full w-56 overflow-y-auto pt-10 pb-12 pl-2.5 [mask-image:linear-gradient(to_bottom,transparent,black_2rem,black_calc(100%-3rem),transparent)]", children: _jsx(DocsNavList, { ...props }) })] }));
64
+ const $ = _c(3);
65
+ let t0;
66
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
67
+ t0 = /*#__PURE__*/_jsx("div", {
68
+ className: "absolute top-12 right-2 bottom-0 w-px bg-[linear-gradient(to_bottom,transparent_0%,var(--border)_10%,var(--border)_90%,transparent_100%)]"
69
+ });
70
+ $[0] = t0;
71
+ } else {
72
+ t0 = $[0];
73
+ }
74
+ let t1;
75
+ if ($[1] !== props) {
76
+ t1 = /*#__PURE__*/_jsxs("div", {
77
+ className: "relative h-full",
78
+ children: [t0, /*#__PURE__*/_jsx("nav", {
79
+ "aria-label": "Documentation",
80
+ className: "no-scrollbar h-full w-56 overflow-y-auto pt-10 pb-12 pl-2.5 [mask-image:linear-gradient(to_bottom,transparent,black_2rem,black_calc(100%-3rem),transparent)]",
81
+ children: /*#__PURE__*/_jsx(DocsNavList, {
82
+ ...props
83
+ })
84
+ })]
85
+ });
86
+ $[1] = props;
87
+ $[2] = t1;
88
+ } else {
89
+ t1 = $[2];
90
+ }
91
+ return t1;
11
92
  }
12
93
  export { DocsNavList, DocsSidebar };