@devalok/shilp-sutra 0.8.3 → 0.9.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.
Files changed (217) hide show
  1. package/dist/_chunks/avatar.js +50 -0
  2. package/dist/_chunks/button.js +95 -0
  3. package/dist/_chunks/card.js +40 -0
  4. package/dist/_chunks/checkbox.js +14 -0
  5. package/dist/_chunks/form.js +27 -0
  6. package/dist/_chunks/primitives.js +6965 -0
  7. package/dist/_chunks/sidebar.js +592 -0
  8. package/dist/_chunks/spinner.js +34 -0
  9. package/dist/_chunks/tiptap.js +15254 -0
  10. package/dist/_chunks/tooltip.js +13 -0
  11. package/dist/_chunks/tree-view.js +304 -0
  12. package/dist/_chunks/use-calendar.js +990 -0
  13. package/dist/_chunks/utils.js +15 -0
  14. package/dist/_chunks/vendor.js +5823 -0
  15. package/dist/composed/avatar-group.js +20 -20
  16. package/dist/composed/command-palette.js +1 -1
  17. package/dist/composed/confirm-dialog.js +5 -5
  18. package/dist/composed/content-card.d.ts +1 -1
  19. package/dist/composed/content-card.js +6 -6
  20. package/dist/composed/date-picker/index.js +13 -0
  21. package/dist/composed/empty-state.js +10 -10
  22. package/dist/composed/error-boundary.js +2 -2
  23. package/dist/composed/global-loading.js +4 -4
  24. package/dist/composed/index.js +45 -53
  25. package/dist/composed/loading-skeleton.js +2 -2
  26. package/dist/composed/member-picker.js +5 -5
  27. package/dist/composed/page-header.js +4 -4
  28. package/dist/composed/page-skeletons.js +1 -1
  29. package/dist/composed/priority-indicator.js +6 -6
  30. package/dist/composed/rich-text-editor.js +422 -209
  31. package/dist/composed/schedule-view.js +1 -1
  32. package/dist/composed/simple-tooltip.js +6 -6
  33. package/dist/composed/status-badge.d.ts +1 -1
  34. package/dist/composed/status-badge.js +2 -2
  35. package/dist/shell/bottom-navbar.js +1 -1
  36. package/dist/shell/notification-center.js +2 -2
  37. package/dist/shell/notification-preferences.js +32 -33
  38. package/dist/shell/sidebar.js +24 -24
  39. package/dist/shell/top-bar.js +22 -22
  40. package/dist/ui/accordion.js +17 -17
  41. package/dist/ui/alert-dialog.js +29 -29
  42. package/dist/ui/alert.d.ts +2 -2
  43. package/dist/ui/alert.js +65 -44
  44. package/dist/ui/aspect-ratio.js +1 -1
  45. package/dist/ui/autocomplete.js +11 -11
  46. package/dist/ui/avatar.d.ts +1 -1
  47. package/dist/ui/avatar.js +67 -25
  48. package/dist/ui/badge.d.ts +2 -2
  49. package/dist/ui/badge.js +115 -91
  50. package/dist/ui/banner.d.ts +1 -1
  51. package/dist/ui/banner.js +5 -5
  52. package/dist/ui/breadcrumb.js +14 -14
  53. package/dist/ui/button-group.js +30 -15
  54. package/dist/ui/button.d.ts +2 -2
  55. package/dist/ui/button.js +114 -71
  56. package/dist/ui/card.js +66 -22
  57. package/dist/ui/charts/index.js +1221 -18
  58. package/dist/ui/checkbox.js +25 -5
  59. package/dist/ui/chip.d.ts +4 -4
  60. package/dist/ui/chip.js +2 -2
  61. package/dist/ui/code.js +1 -1
  62. package/dist/ui/collapsible.js +5 -5
  63. package/dist/ui/color-input.js +11 -11
  64. package/dist/ui/combobox.js +12 -12
  65. package/dist/ui/container.js +4 -4
  66. package/dist/ui/context-menu.js +37 -37
  67. package/dist/ui/data-table-toolbar.js +18 -18
  68. package/dist/ui/data-table.js +2 -2
  69. package/dist/ui/dialog.js +33 -33
  70. package/dist/ui/dropdown-menu.js +60 -60
  71. package/dist/ui/file-upload.js +1 -1
  72. package/dist/ui/form.js +36 -15
  73. package/dist/ui/hover-card.js +7 -7
  74. package/dist/ui/icon-button.js +9 -9
  75. package/dist/ui/index.js +523 -325
  76. package/dist/ui/input-otp.d.ts +2 -2
  77. package/dist/ui/input-otp.js +14 -14
  78. package/dist/ui/input.js +56 -28
  79. package/dist/ui/label.js +18 -4
  80. package/dist/ui/lib/utils.js +4 -5
  81. package/dist/ui/link.js +9 -9
  82. package/dist/ui/menubar.js +81 -81
  83. package/dist/ui/navigation-menu.js +42 -42
  84. package/dist/ui/number-input.js +13 -13
  85. package/dist/ui/pagination.js +5 -5
  86. package/dist/ui/popover.js +9 -9
  87. package/dist/ui/progress.d.ts +1 -1
  88. package/dist/ui/progress.js +15 -15
  89. package/dist/ui/radio.js +10 -10
  90. package/dist/ui/search-input.js +5 -5
  91. package/dist/ui/segmented-control.js +91 -83
  92. package/dist/ui/select.js +52 -52
  93. package/dist/ui/separator.js +20 -5
  94. package/dist/ui/sheet.js +28 -28
  95. package/dist/ui/sidebar.js +36 -560
  96. package/dist/ui/skeleton.d.ts +1 -1
  97. package/dist/ui/skeleton.js +9 -9
  98. package/dist/ui/slider.js +11 -11
  99. package/dist/ui/spinner.js +37 -2
  100. package/dist/ui/stack.js +1 -1
  101. package/dist/ui/stat-card.js +1 -1
  102. package/dist/ui/stepper.js +15 -15
  103. package/dist/ui/switch.js +22 -3
  104. package/dist/ui/table.js +1 -1
  105. package/dist/ui/tabs.js +59 -32
  106. package/dist/ui/text.js +2 -2
  107. package/dist/ui/textarea.js +7 -7
  108. package/dist/ui/toast.d.ts +1 -1
  109. package/dist/ui/toast.js +28 -28
  110. package/dist/ui/toggle-group.js +11 -11
  111. package/dist/ui/toggle.js +9 -9
  112. package/dist/ui/tooltip.js +17 -6
  113. package/dist/ui/transitions.js +68 -58
  114. package/dist/ui/tree-view/index.js +7 -0
  115. package/dist/ui/visually-hidden.js +3 -3
  116. package/llms-full.txt +1 -1
  117. package/llms.txt +7 -0
  118. package/package.json +656 -701
  119. package/dist/_virtual/client.js +0 -5
  120. package/dist/_virtual/index.js +0 -5
  121. package/dist/_virtual/react-dom-client.development.js +0 -5
  122. package/dist/_virtual/react-dom-client.production.js +0 -5
  123. package/dist/_virtual/scheduler.development.js +0 -5
  124. package/dist/_virtual/scheduler.production.js +0 -5
  125. package/dist/composed/date-picker/calendar-grid.js +0 -194
  126. package/dist/composed/date-picker/date-picker.js +0 -124
  127. package/dist/composed/date-picker/date-range-picker.js +0 -167
  128. package/dist/composed/date-picker/date-time-picker.js +0 -193
  129. package/dist/composed/date-picker/month-picker.js +0 -53
  130. package/dist/composed/date-picker/presets.js +0 -84
  131. package/dist/composed/date-picker/time-picker.js +0 -181
  132. package/dist/composed/date-picker/use-calendar.js +0 -17
  133. package/dist/composed/date-picker/year-picker.js +0 -45
  134. package/dist/composed/extensions/emoji-suggestion.js +0 -119
  135. package/dist/composed/extensions/file-attachment.js +0 -55
  136. package/dist/composed/extensions/mention-suggestion.js +0 -79
  137. package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +0 -40141
  138. package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +0 -17
  139. package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +0 -2958
  140. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.development.js +0 -17062
  141. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/cjs/react-dom-client.production.js +0 -9790
  142. package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +0 -20
  143. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +0 -237
  144. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +0 -234
  145. package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +0 -11
  146. package/dist/primitives/_internal/number.js +0 -6
  147. package/dist/primitives/_internal/primitive.js +0 -9
  148. package/dist/primitives/_internal/react-arrow.js +0 -13
  149. package/dist/primitives/_internal/react-collection.js +0 -48
  150. package/dist/primitives/_internal/react-compose-refs.js +0 -29
  151. package/dist/primitives/_internal/react-context.js +0 -76
  152. package/dist/primitives/_internal/react-direction.js +0 -10
  153. package/dist/primitives/_internal/react-dismissable-layer.js +0 -103
  154. package/dist/primitives/_internal/react-focus-guards.js +0 -17
  155. package/dist/primitives/_internal/react-focus-scope.js +0 -137
  156. package/dist/primitives/_internal/react-id.js +0 -14
  157. package/dist/primitives/_internal/react-popper.js +0 -137
  158. package/dist/primitives/_internal/react-portal.js +0 -16
  159. package/dist/primitives/_internal/react-presence.js +0 -71
  160. package/dist/primitives/_internal/react-primitive.js +0 -36
  161. package/dist/primitives/_internal/react-use-callback-ref.js +0 -13
  162. package/dist/primitives/_internal/react-use-controllable-state.js +0 -44
  163. package/dist/primitives/_internal/react-use-escape-keydown.js +0 -14
  164. package/dist/primitives/_internal/react-use-is-hydrated.js +0 -15
  165. package/dist/primitives/_internal/react-use-layout-effect.js +0 -6
  166. package/dist/primitives/_internal/react-use-previous.js +0 -8
  167. package/dist/primitives/_internal/react-use-size.js +0 -27
  168. package/dist/primitives/react-accordion.js +0 -239
  169. package/dist/primitives/react-alert-dialog.js +0 -127
  170. package/dist/primitives/react-aspect-ratio.js +0 -43
  171. package/dist/primitives/react-avatar.js +0 -75
  172. package/dist/primitives/react-checkbox.js +0 -251
  173. package/dist/primitives/react-collapsible.js +0 -120
  174. package/dist/primitives/react-context-menu.js +0 -240
  175. package/dist/primitives/react-dialog.js +0 -262
  176. package/dist/primitives/react-dropdown-menu.js +0 -227
  177. package/dist/primitives/react-hover-card.js +0 -187
  178. package/dist/primitives/react-label.js +0 -20
  179. package/dist/primitives/react-menu.js +0 -652
  180. package/dist/primitives/react-menubar.js +0 -355
  181. package/dist/primitives/react-navigation-menu.js +0 -607
  182. package/dist/primitives/react-popover.js +0 -243
  183. package/dist/primitives/react-progress.js +0 -84
  184. package/dist/primitives/react-radio-group.js +0 -238
  185. package/dist/primitives/react-roving-focus.js +0 -183
  186. package/dist/primitives/react-select.js +0 -862
  187. package/dist/primitives/react-separator.js +0 -24
  188. package/dist/primitives/react-slider.js +0 -437
  189. package/dist/primitives/react-slot.js +0 -70
  190. package/dist/primitives/react-switch.js +0 -132
  191. package/dist/primitives/react-tabs.js +0 -163
  192. package/dist/primitives/react-toast.js +0 -446
  193. package/dist/primitives/react-toggle-group.js +0 -137
  194. package/dist/primitives/react-toggle.js +0 -33
  195. package/dist/primitives/react-tooltip.js +0 -338
  196. package/dist/primitives/react-visually-hidden.js +0 -32
  197. package/dist/ui/charts/_internal/animation.js +0 -18
  198. package/dist/ui/charts/_internal/axes.js +0 -42
  199. package/dist/ui/charts/_internal/colors.js +0 -21
  200. package/dist/ui/charts/_internal/grid-lines.js +0 -43
  201. package/dist/ui/charts/_internal/legend.js +0 -29
  202. package/dist/ui/charts/_internal/tooltip.js +0 -39
  203. package/dist/ui/charts/_internal/types.js +0 -10
  204. package/dist/ui/charts/area-chart.js +0 -245
  205. package/dist/ui/charts/bar-chart.js +0 -153
  206. package/dist/ui/charts/chart-container.js +0 -27
  207. package/dist/ui/charts/gauge-chart.js +0 -72
  208. package/dist/ui/charts/line-chart.js +0 -163
  209. package/dist/ui/charts/pie-chart.js +0 -132
  210. package/dist/ui/charts/radar-chart.js +0 -223
  211. package/dist/ui/charts/sparkline.js +0 -124
  212. package/dist/ui/lib/motion.js +0 -32
  213. package/dist/ui/lib/use-reduced-motion.js +0 -15
  214. package/dist/ui/lib/use-ripple.js +0 -14
  215. package/dist/ui/tree-view/tree-item.js +0 -139
  216. package/dist/ui/tree-view/tree-view.js +0 -140
  217. package/dist/ui/tree-view/use-tree.js +0 -38
@@ -0,0 +1,592 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as x } from "react/jsx-runtime";
3
+ import { bi as I, S as v } from "./primitives.js";
4
+ import { m as z } from "./vendor.js";
5
+ import { IconLayoutSidebarLeftCollapse as O } from "@tabler/icons-react";
6
+ import { useIsMobile as G } from "../hooks/use-mobile.js";
7
+ import { c as i } from "./utils.js";
8
+ import { B as q } from "./button.js";
9
+ import * as B from "react";
10
+ import { createContext as L, forwardRef as o, useState as _, useCallback as C, useEffect as j, useMemo as E, useContext as H } from "react";
11
+ import { u as K } from "./form.js";
12
+ import { Sheet as V, SheetContent as F } from "../ui/sheet.js";
13
+ import { Skeleton as k } from "../ui/skeleton.js";
14
+ import { T as $, a as P, b as W, c as U } from "./tooltip.js";
15
+ const X = z([
16
+ "flex w-full font-sans",
17
+ "bg-field text-text-primary",
18
+ "border border-border rounded-ds-md",
19
+ "placeholder:text-text-placeholder",
20
+ "hover:bg-field-hover",
21
+ "transition-colors duration-fast-01",
22
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:border-border-interactive",
23
+ "disabled:cursor-not-allowed disabled:opacity-[0.38]",
24
+ "read-only:bg-layer-02 read-only:cursor-default"
25
+ ], {
26
+ variants: {
27
+ size: {
28
+ sm: "h-ds-sm text-ds-sm px-ds-03",
29
+ md: "h-ds-md text-ds-base px-ds-04",
30
+ lg: "h-ds-lg text-ds-lg px-ds-05"
31
+ }
32
+ },
33
+ defaultVariants: { size: "md" }
34
+ }), T = B.forwardRef(({ className: a, type: e, state: t, size: d, startIcon: s, endIcon: n, ...c }, f) => {
35
+ const l = K(), u = t ?? (l.state === "helper" ? void 0 : l.state), p = c["aria-describedby"] ?? l.helperTextId, g = c["aria-required"] ?? l.required, y = r("input", { type: e, className: i(X({ size: d }), s && "pl-ds-08", n && "pr-ds-08", u === "error" && "border-border-error focus-visible:ring-error", u === "warning" && "border-border-warning focus-visible:ring-warning", u === "success" && "border-border-success focus-visible:ring-success", a), "aria-invalid": u === "error" || void 0, "aria-describedby": p, "aria-required": g || void 0, ref: f, ...c });
36
+ return !s && !n ? y : x("div", { className: "relative flex items-center w-full", children: [s && r("span", { className: "absolute left-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: s }), y, n && r("span", { className: "absolute right-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: n })] });
37
+ });
38
+ T.displayName = "Input";
39
+ const R = B.forwardRef(({ className: a, orientation: e = "horizontal", decorative: t = !0, ...d }, s) => r(I, { ref: s, decorative: t, orientation: e, className: i("shrink-0 bg-border-subtle", e === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", a), ...d }));
40
+ R.displayName = I.displayName;
41
+ const Y = "sidebar:state", J = 60 * 60 * 24 * 7, Q = "16rem", Z = "18rem", ee = "3rem", ae = "b", A = L(null);
42
+ function N() {
43
+ const a = H(A);
44
+ if (!a)
45
+ throw new Error("useSidebar must be used within a SidebarProvider.");
46
+ return a;
47
+ }
48
+ const te = o(
49
+ ({
50
+ defaultOpen: a = !0,
51
+ open: e,
52
+ onOpenChange: t,
53
+ className: d,
54
+ style: s,
55
+ children: n,
56
+ ...c
57
+ }, f) => {
58
+ const l = G(), [u, p] = _(!1), [g, y] = _(a), h = e ?? g, w = C(
59
+ (m) => {
60
+ const b = typeof m == "function" ? m(h) : m;
61
+ t ? t(b) : y(b), document.cookie = `${Y}=${b}; path=/; max-age=${J}`;
62
+ },
63
+ [t, h]
64
+ ), S = C(() => l ? p((m) => !m) : w((m) => !m), [l, w, p]);
65
+ j(() => {
66
+ const m = (b) => {
67
+ b.key === ae && (b.metaKey || b.ctrlKey) && (b.preventDefault(), S());
68
+ };
69
+ return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
70
+ }, [S]);
71
+ const M = h ? "expanded" : "collapsed", D = E(
72
+ () => ({
73
+ state: M,
74
+ open: h,
75
+ setOpen: w,
76
+ isMobile: l,
77
+ openMobile: u,
78
+ setOpenMobile: p,
79
+ toggleSidebar: S
80
+ }),
81
+ [
82
+ M,
83
+ h,
84
+ w,
85
+ l,
86
+ u,
87
+ p,
88
+ S
89
+ ]
90
+ );
91
+ return /* @__PURE__ */ r(A.Provider, { value: D, children: /* @__PURE__ */ r($, { delayDuration: 0, children: /* @__PURE__ */ r(
92
+ "div",
93
+ {
94
+ style: {
95
+ "--sidebar-width": Q,
96
+ "--sidebar-width-icon": ee,
97
+ ...s
98
+ },
99
+ className: i(
100
+ "group/sidebar-wrapper flex min-h-svh has-[[data-variant=inset]]:bg-background",
101
+ d
102
+ ),
103
+ ref: f,
104
+ ...c,
105
+ children: n
106
+ }
107
+ ) }) });
108
+ }
109
+ );
110
+ te.displayName = "SidebarProvider";
111
+ const re = o(
112
+ ({
113
+ side: a = "left",
114
+ variant: e = "sidebar",
115
+ collapsible: t = "offcanvas",
116
+ className: d,
117
+ children: s,
118
+ ...n
119
+ }, c) => {
120
+ const { isMobile: f, state: l, openMobile: u, setOpenMobile: p } = N();
121
+ return t === "none" ? /* @__PURE__ */ r(
122
+ "div",
123
+ {
124
+ className: i(
125
+ "flex h-full w-[--sidebar-width] flex-col bg-layer-01 text-text-primary",
126
+ d
127
+ ),
128
+ ref: c,
129
+ ...n,
130
+ children: s
131
+ }
132
+ ) : f ? /* @__PURE__ */ r(V, { open: u, onOpenChange: p, ...n, children: /* @__PURE__ */ r(
133
+ F,
134
+ {
135
+ "data-sidebar": "sidebar",
136
+ "data-mobile": "true",
137
+ className: "w-[--sidebar-width] bg-layer-01 p-0 text-text-primary [&>button]:hidden",
138
+ style: {
139
+ "--sidebar-width": Z
140
+ },
141
+ side: a,
142
+ children: /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: s })
143
+ }
144
+ ) }) : /* @__PURE__ */ x(
145
+ "div",
146
+ {
147
+ ref: c,
148
+ className: "group peer hidden text-text-primary md:block",
149
+ "data-state": l,
150
+ "data-collapsible": l === "collapsed" ? t : "",
151
+ "data-variant": e,
152
+ "data-side": a,
153
+ children: [
154
+ /* @__PURE__ */ r(
155
+ "div",
156
+ {
157
+ className: i(
158
+ "relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-moderate-02 ease-linear",
159
+ "group-data-[collapsible=offcanvas]:w-0",
160
+ "group-data-[side=right]:rotate-180",
161
+ e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
162
+ )
163
+ }
164
+ ),
165
+ /* @__PURE__ */ r(
166
+ "div",
167
+ {
168
+ className: i(
169
+ "fixed inset-y-0 z-raised hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-moderate-02 ease-linear md:flex",
170
+ a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
171
+ e === "floating" || e === "inset" ? "p-ds-03 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
172
+ d
173
+ ),
174
+ ...n,
175
+ children: /* @__PURE__ */ r(
176
+ "div",
177
+ {
178
+ "data-sidebar": "sidebar",
179
+ className: "flex h-full w-full flex-col bg-layer-01 group-data-[variant=floating]:rounded-ds-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border-subtle group-data-[variant=floating]:shadow",
180
+ children: s
181
+ }
182
+ )
183
+ }
184
+ )
185
+ ]
186
+ }
187
+ );
188
+ }
189
+ );
190
+ re.displayName = "Sidebar";
191
+ const se = o(({ className: a, onClick: e, ...t }, d) => {
192
+ const { toggleSidebar: s } = N();
193
+ return /* @__PURE__ */ x(
194
+ q,
195
+ {
196
+ ref: d,
197
+ "data-sidebar": "trigger",
198
+ variant: "ghost",
199
+ size: "icon-md",
200
+ className: i("h-ds-xs-plus w-ds-xs-plus", a),
201
+ onClick: (n) => {
202
+ e == null || e(n), s();
203
+ },
204
+ ...t,
205
+ children: [
206
+ /* @__PURE__ */ r(O, {}),
207
+ /* @__PURE__ */ r("span", { className: "sr-only", children: "Toggle Sidebar" })
208
+ ]
209
+ }
210
+ );
211
+ });
212
+ se.displayName = "SidebarTrigger";
213
+ const ie = o(
214
+ ({ className: a, ...e }, t) => {
215
+ const { toggleSidebar: d } = N();
216
+ return /* @__PURE__ */ r(
217
+ "button",
218
+ {
219
+ ref: t,
220
+ "data-sidebar": "rail",
221
+ "aria-label": "Toggle Sidebar",
222
+ tabIndex: -1,
223
+ onClick: d,
224
+ title: "Toggle Sidebar",
225
+ className: i(
226
+ "hover:after:bg-border-strong absolute inset-y-0 z-raised hidden w-4 -translate-x-1/2 transition-colors ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
227
+ "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
228
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
229
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-layer-02",
230
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
231
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
232
+ a
233
+ ),
234
+ ...e
235
+ }
236
+ );
237
+ }
238
+ );
239
+ ie.displayName = "SidebarRail";
240
+ const de = o(
241
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
242
+ "main",
243
+ {
244
+ ref: t,
245
+ className: i(
246
+ "relative flex min-h-svh flex-1 flex-col bg-background",
247
+ "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-ds-03 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-ds-03 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-ds-xl md:peer-data-[variant=inset]:shadow",
248
+ a
249
+ ),
250
+ ...e
251
+ }
252
+ )
253
+ );
254
+ de.displayName = "SidebarInset";
255
+ const oe = o(({ className: a, ...e }, t) => /* @__PURE__ */ r(
256
+ T,
257
+ {
258
+ ref: t,
259
+ "data-sidebar": "input",
260
+ className: i(
261
+ "h-ds-sm w-full bg-layer-01 shadow-none focus-visible:ring-2 focus-visible:ring-focus",
262
+ a
263
+ ),
264
+ ...e
265
+ }
266
+ ));
267
+ oe.displayName = "SidebarInput";
268
+ const ne = o(
269
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
270
+ "div",
271
+ {
272
+ ref: t,
273
+ "data-sidebar": "header",
274
+ className: i("flex flex-col gap-ds-03 p-ds-03", a),
275
+ ...e
276
+ }
277
+ )
278
+ );
279
+ ne.displayName = "SidebarHeader";
280
+ const le = o(
281
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
282
+ "div",
283
+ {
284
+ ref: t,
285
+ "data-sidebar": "footer",
286
+ className: i("flex flex-col gap-ds-03 p-ds-03", a),
287
+ ...e
288
+ }
289
+ )
290
+ );
291
+ le.displayName = "SidebarFooter";
292
+ const ce = o(({ className: a, ...e }, t) => /* @__PURE__ */ r(
293
+ R,
294
+ {
295
+ ref: t,
296
+ "data-sidebar": "separator",
297
+ className: i(
298
+ "bg-border-subtle mx-ds-03 w-auto",
299
+ a
300
+ ),
301
+ ...e
302
+ }
303
+ ));
304
+ ce.displayName = "SidebarSeparator";
305
+ const ue = o(
306
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
307
+ "div",
308
+ {
309
+ ref: t,
310
+ "data-sidebar": "content",
311
+ className: i(
312
+ "flex min-h-0 flex-1 flex-col gap-ds-03 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
313
+ a
314
+ ),
315
+ ...e
316
+ }
317
+ )
318
+ );
319
+ ue.displayName = "SidebarContent";
320
+ const pe = o(
321
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
322
+ "div",
323
+ {
324
+ ref: t,
325
+ "data-sidebar": "group",
326
+ className: i("relative flex w-full min-w-0 flex-col p-ds-03", a),
327
+ ...e
328
+ }
329
+ )
330
+ );
331
+ pe.displayName = "SidebarGroup";
332
+ const me = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
333
+ e ? v : "div",
334
+ {
335
+ ref: d,
336
+ "data-sidebar": "group-label",
337
+ className: i(
338
+ "flex h-ds-sm shrink-0 items-center rounded-ds-md px-ds-03 text-ds-sm font-medium text-text-secondary outline-none ring-focus transition-[margin,opa] duration-moderate-02 ease-linear focus-visible:ring-2 [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
339
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
340
+ a
341
+ ),
342
+ ...t
343
+ }
344
+ ));
345
+ me.displayName = "SidebarGroupLabel";
346
+ const be = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
347
+ e ? v : "button",
348
+ {
349
+ ref: d,
350
+ "data-sidebar": "group-action",
351
+ className: i(
352
+ "hover:bg-layer-02 absolute right-ds-04 top-ds-04 flex aspect-square w-5 items-center justify-center rounded-ds-md p-0 text-text-primary outline-none ring-focus transition-transform hover:text-text-primary focus-visible:ring-2 [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
353
+ "after:absolute after:-inset-2 after:md:hidden",
354
+ "group-data-[collapsible=icon]:hidden",
355
+ a
356
+ ),
357
+ ...t
358
+ }
359
+ ));
360
+ be.displayName = "SidebarGroupAction";
361
+ const fe = o(
362
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
363
+ "div",
364
+ {
365
+ ref: t,
366
+ "data-sidebar": "group-content",
367
+ className: i("w-full text-ds-md", a),
368
+ ...e
369
+ }
370
+ )
371
+ );
372
+ fe.displayName = "SidebarGroupContent";
373
+ const ge = o(
374
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
375
+ "ul",
376
+ {
377
+ ref: t,
378
+ "data-sidebar": "menu",
379
+ className: i("flex w-full min-w-0 flex-col gap-ds-02", a),
380
+ ...e
381
+ }
382
+ )
383
+ );
384
+ ge.displayName = "SidebarMenu";
385
+ const he = o(
386
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
387
+ "li",
388
+ {
389
+ ref: t,
390
+ "data-sidebar": "menu-item",
391
+ className: i("group/menu-item relative", a),
392
+ ...e
393
+ }
394
+ )
395
+ );
396
+ he.displayName = "SidebarMenuItem";
397
+ const xe = z(
398
+ "peer/menu-button hover:bg-layer-02 active:bg-interactive-subtle data-[active=true]:bg-interactive-subtle data-[state=open]:hover:bg-layer-02 flex w-full items-center gap-ds-03 overflow-hidden rounded-ds-md p-ds-03 text-left outline-none ring-focus transition-[width,height,padding] hover:text-text-primary focus-visible:ring-2 active:text-text-primary disabled:pointer-events-none disabled:opacity-[0.38] group-has-[[data-sidebar=menu-action]]/menu-item:pr-ds-07 aria-disabled:pointer-events-none aria-disabled:opacity-[0.38] data-[active=true]:font-medium data-[active=true]:text-text-primary data-[state=open]:hover:text-text-primary group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-ds-03 [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
399
+ {
400
+ variants: {
401
+ variant: {
402
+ default: "hover:bg-layer-02 hover:text-text-primary",
403
+ outline: "hover:bg-layer-02 bg-background shadow-[0_0_0_1px_var(--color-border-subtle)] hover:text-text-primary hover:shadow-[0_0_0_1px_var(--color-border-strong)]"
404
+ },
405
+ size: {
406
+ md: "h-ds-sm text-ds-md",
407
+ sm: "h-ds-xs-plus text-ds-sm",
408
+ lg: "h-ds-lg text-ds-md group-data-[collapsible=icon]:!p-0"
409
+ }
410
+ },
411
+ defaultVariants: {
412
+ variant: "default",
413
+ size: "md"
414
+ }
415
+ }
416
+ ), ve = o(
417
+ ({
418
+ asChild: a = !1,
419
+ isActive: e = !1,
420
+ variant: t = "default",
421
+ size: d = "md",
422
+ tooltip: s,
423
+ className: n,
424
+ ...c
425
+ }, f) => {
426
+ const l = a ? v : "button", { isMobile: u, state: p } = N(), g = /* @__PURE__ */ r(
427
+ l,
428
+ {
429
+ ref: f,
430
+ "data-sidebar": "menu-button",
431
+ "data-size": d,
432
+ "data-active": e,
433
+ className: i(xe({ variant: t, size: d }), n),
434
+ ...c
435
+ }
436
+ );
437
+ return s ? (typeof s == "string" && (s = {
438
+ children: s
439
+ }), /* @__PURE__ */ x(P, { children: [
440
+ /* @__PURE__ */ r(W, { asChild: !0, children: g }),
441
+ /* @__PURE__ */ r(
442
+ U,
443
+ {
444
+ side: "right",
445
+ align: "center",
446
+ hidden: p !== "collapsed" || u,
447
+ ...s
448
+ }
449
+ )
450
+ ] })) : g;
451
+ }
452
+ );
453
+ ve.displayName = "SidebarMenuButton";
454
+ const ye = o(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, s) => /* @__PURE__ */ r(
455
+ e ? v : "button",
456
+ {
457
+ ref: s,
458
+ "data-sidebar": "menu-action",
459
+ className: i(
460
+ "hover:bg-layer-02 absolute right-ds-02 top-ds-02b flex aspect-square w-5 items-center justify-center rounded-ds-md p-0 text-text-primary outline-none ring-focus transition-transform hover:text-text-primary focus-visible:ring-2 peer-hover/menu-button:text-text-primary [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0",
461
+ "after:absolute after:-inset-2 after:md:hidden",
462
+ "peer-data-[size=sm]/menu-button:top-1",
463
+ "peer-data-[size=md]/menu-button:top-ds-02b",
464
+ "peer-data-[size=lg]/menu-button:top-ds-03",
465
+ "group-data-[collapsible=icon]:hidden",
466
+ t && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-text-primary md:opacity-0",
467
+ a
468
+ ),
469
+ ...d
470
+ }
471
+ ));
472
+ ye.displayName = "SidebarMenuAction";
473
+ const we = o(
474
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
475
+ "div",
476
+ {
477
+ ref: t,
478
+ "data-sidebar": "menu-badge",
479
+ className: i(
480
+ "pointer-events-none absolute right-ds-02 flex h-5 min-w-5 select-none items-center justify-center rounded-ds-md px-ds-02 text-ds-sm font-medium tabular-nums text-text-primary",
481
+ "peer-hover/menu-button:text-text-primary peer-data-[active=true]/menu-button:text-text-primary",
482
+ "peer-data-[size=sm]/menu-button:top-1",
483
+ "peer-data-[size=md]/menu-button:top-ds-02b",
484
+ "peer-data-[size=lg]/menu-button:top-ds-03",
485
+ "group-data-[collapsible=icon]:hidden",
486
+ a
487
+ ),
488
+ ...e
489
+ }
490
+ )
491
+ );
492
+ we.displayName = "SidebarMenuBadge";
493
+ const Se = o(({ className: a, showIcon: e = !1, ...t }, d) => {
494
+ const s = E(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
495
+ return /* @__PURE__ */ x(
496
+ "div",
497
+ {
498
+ ref: d,
499
+ "data-sidebar": "menu-skeleton",
500
+ className: i("flex h-ds-sm items-center gap-ds-03 rounded-ds-md px-ds-03", a),
501
+ ...t,
502
+ children: [
503
+ e && /* @__PURE__ */ r(
504
+ k,
505
+ {
506
+ className: "h-ico-sm w-ico-sm rounded-ds-md",
507
+ "data-sidebar": "menu-skeleton-icon"
508
+ }
509
+ ),
510
+ /* @__PURE__ */ r(
511
+ k,
512
+ {
513
+ className: "h-4 max-w-[--skeleton-width] flex-1",
514
+ "data-sidebar": "menu-skeleton-text",
515
+ style: {
516
+ "--skeleton-width": s
517
+ }
518
+ }
519
+ )
520
+ ]
521
+ }
522
+ );
523
+ });
524
+ Se.displayName = "SidebarMenuSkeleton";
525
+ const Ne = o(
526
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
527
+ "ul",
528
+ {
529
+ ref: t,
530
+ "data-sidebar": "menu-sub",
531
+ className: i(
532
+ "mx-ds-04 flex min-w-0 translate-x-px flex-col gap-ds-02 border-l border-border-subtle px-ds-03 py-ds-01",
533
+ "group-data-[collapsible=icon]:hidden",
534
+ a
535
+ ),
536
+ ...e
537
+ }
538
+ )
539
+ );
540
+ Ne.displayName = "SidebarMenuSub";
541
+ const Me = o(
542
+ ({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a })
543
+ );
544
+ Me.displayName = "SidebarMenuSubItem";
545
+ const _e = o(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...s }, n) => /* @__PURE__ */ r(
546
+ a ? v : "a",
547
+ {
548
+ ref: n,
549
+ "data-sidebar": "menu-sub-button",
550
+ "data-size": e,
551
+ "data-active": t,
552
+ className: i(
553
+ "hover:bg-layer-02 active:bg-interactive-subtle flex h-ds-xs-plus min-w-0 -translate-x-px items-center gap-ds-03 overflow-hidden rounded-ds-md px-ds-03 text-text-primary outline-none ring-focus hover:text-text-primary focus-visible:ring-2 active:text-text-primary disabled:pointer-events-none disabled:opacity-[0.38] aria-disabled:pointer-events-none aria-disabled:opacity-[0.38] [&>span:last-child]:truncate [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0 [&>svg]:text-text-primary",
554
+ "data-[active=true]:bg-interactive-subtle data-[active=true]:text-text-primary",
555
+ e === "sm" && "text-ds-sm",
556
+ e === "md" && "text-ds-md",
557
+ "group-data-[collapsible=icon]:hidden",
558
+ d
559
+ ),
560
+ ...s
561
+ }
562
+ ));
563
+ _e.displayName = "SidebarMenuSubButton";
564
+ export {
565
+ T as I,
566
+ re as S,
567
+ ne as a,
568
+ ce as b,
569
+ ue as c,
570
+ pe as d,
571
+ me as e,
572
+ fe as f,
573
+ ge as g,
574
+ le as h,
575
+ he as i,
576
+ ve as j,
577
+ se as k,
578
+ R as l,
579
+ be as m,
580
+ oe as n,
581
+ de as o,
582
+ ye as p,
583
+ we as q,
584
+ Se as r,
585
+ Ne as s,
586
+ _e as t,
587
+ Me as u,
588
+ te as v,
589
+ ie as w,
590
+ X as x,
591
+ N as y
592
+ };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx as o, jsxs as i } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ import { c as l } from "./utils.js";
5
+ const c = n.createContext({});
6
+ function v() {
7
+ return n.useContext(c);
8
+ }
9
+ const h = n.forwardRef(({ className: s, variant: e, color: r, size: t, orientation: a = "horizontal", children: d, ...u }, m) => {
10
+ const f = n.useMemo(() => ({ variant: e, color: r, size: t }), [e, r, t]);
11
+ return o(c.Provider, { value: f, children: o("div", { ref: m, role: "group", className: l("inline-flex", a === "horizontal" ? [
12
+ "flex-row",
13
+ "[&>*:not(:first-child)]:rounded-l-none",
14
+ "[&>*:not(:last-child)]:rounded-r-none",
15
+ "[&>*:not(:first-child)]:-ml-px"
16
+ ] : [
17
+ "flex-col",
18
+ "[&>*:not(:first-child)]:rounded-t-none",
19
+ "[&>*:not(:last-child)]:rounded-b-none",
20
+ "[&>*:not(:first-child)]:-mt-px"
21
+ ], s), ...u, children: d }) });
22
+ });
23
+ h.displayName = "ButtonGroup";
24
+ const p = {
25
+ sm: "h-ico-sm w-ico-sm",
26
+ md: "h-ico-md w-ico-md",
27
+ lg: "h-ico-lg w-ico-lg"
28
+ }, x = n.forwardRef(({ size: s = "md", className: e, ...r }, t) => i("span", { role: "status", children: [i("svg", { ref: t, className: l("animate-spin motion-reduce:animate-none", p[s], e), viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r, children: [o("circle", { cx: "12", cy: "12", r: "10", stroke: "var(--color-border-subtle)", strokeWidth: "4", fill: "none" }), o("path", { d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z", fill: "var(--color-interactive)" })] }), o("span", { className: "sr-only", children: "Loading..." })] }));
29
+ x.displayName = "Spinner";
30
+ export {
31
+ h as B,
32
+ x as S,
33
+ v as u
34
+ };