@devalok/shilp-sutra 0.8.4 → 0.9.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.js +50 -0
- package/dist/_chunks/button.js +95 -0
- package/dist/_chunks/card.js +40 -0
- package/dist/_chunks/checkbox.js +14 -0
- package/dist/_chunks/form.js +27 -0
- package/dist/_chunks/primitives.js +6965 -0
- package/dist/_chunks/sidebar.js +592 -0
- package/dist/_chunks/spinner.js +34 -0
- package/dist/_chunks/tiptap.js +15254 -0
- package/dist/_chunks/tooltip.js +13 -0
- package/dist/_chunks/tree-view.js +304 -0
- package/dist/_chunks/use-calendar.js +990 -0
- package/dist/_chunks/utils.js +15 -0
- package/dist/_chunks/vendor-client.js +1835 -0
- package/dist/_chunks/vendor-utils.js +3995 -0
- package/dist/composed/avatar-group.js +20 -20
- package/dist/composed/command-palette.js +1 -1
- package/dist/composed/confirm-dialog.js +5 -5
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +2 -2
- package/dist/composed/date-picker/index.js +13 -0
- package/dist/composed/empty-state.js +10 -10
- package/dist/composed/error-boundary.js +2 -2
- package/dist/composed/global-loading.js +4 -4
- package/dist/composed/index.js +45 -53
- package/dist/composed/loading-skeleton.js +2 -2
- package/dist/composed/member-picker.js +5 -5
- package/dist/composed/page-header.js +4 -4
- package/dist/composed/page-skeletons.js +1 -1
- package/dist/composed/priority-indicator.js +6 -6
- package/dist/composed/rich-text-editor.js +422 -209
- package/dist/composed/schedule-view.js +1 -1
- package/dist/composed/simple-tooltip.js +6 -6
- package/dist/composed/status-badge.d.ts +1 -1
- package/dist/composed/status-badge.js +2 -2
- package/dist/shell/bottom-navbar.js +1 -1
- package/dist/shell/notification-center.js +2 -2
- package/dist/shell/notification-preferences.js +32 -33
- package/dist/shell/sidebar.js +24 -24
- package/dist/shell/top-bar.js +22 -22
- package/dist/ui/accordion.js +17 -17
- package/dist/ui/alert-dialog.js +29 -29
- package/dist/ui/alert.d.ts +2 -2
- package/dist/ui/alert.js +65 -44
- package/dist/ui/aspect-ratio.js +1 -1
- package/dist/ui/autocomplete.js +11 -11
- package/dist/ui/avatar.d.ts +1 -1
- package/dist/ui/avatar.js +67 -25
- package/dist/ui/badge.d.ts +2 -2
- package/dist/ui/badge.js +115 -91
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.js +2 -2
- package/dist/ui/breadcrumb.js +14 -14
- package/dist/ui/button-group.js +30 -15
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.js +114 -71
- package/dist/ui/card.js +66 -22
- package/dist/ui/charts/index.js +1221 -18
- package/dist/ui/checkbox.js +25 -5
- package/dist/ui/chip.d.ts +4 -4
- package/dist/ui/chip.js +2 -2
- package/dist/ui/code.js +1 -1
- package/dist/ui/collapsible.js +5 -5
- package/dist/ui/color-input.js +11 -11
- package/dist/ui/combobox.js +12 -12
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.js +37 -37
- package/dist/ui/data-table-toolbar.js +18 -18
- package/dist/ui/data-table.js +2 -2
- package/dist/ui/dialog.js +33 -33
- package/dist/ui/dropdown-menu.js +60 -60
- package/dist/ui/file-upload.js +1 -1
- package/dist/ui/form.js +36 -15
- package/dist/ui/hover-card.js +7 -7
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.js +523 -325
- package/dist/ui/input-otp.d.ts +2 -2
- package/dist/ui/input-otp.js +14 -14
- package/dist/ui/input.js +56 -28
- package/dist/ui/label.js +18 -4
- package/dist/ui/lib/utils.js +4 -5
- package/dist/ui/link.js +9 -9
- package/dist/ui/menubar.js +81 -81
- package/dist/ui/navigation-menu.js +42 -42
- package/dist/ui/number-input.js +13 -13
- package/dist/ui/pagination.js +5 -5
- package/dist/ui/popover.js +9 -9
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +15 -15
- package/dist/ui/radio.js +10 -10
- package/dist/ui/search-input.js +5 -5
- package/dist/ui/segmented-control.js +91 -83
- package/dist/ui/select.js +52 -52
- package/dist/ui/separator.js +20 -5
- package/dist/ui/sheet.js +28 -28
- package/dist/ui/sidebar.js +36 -560
- package/dist/ui/skeleton.d.ts +1 -1
- package/dist/ui/skeleton.js +7 -7
- package/dist/ui/slider.js +11 -11
- package/dist/ui/spinner.js +37 -2
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.js +1 -1
- package/dist/ui/stepper.js +15 -15
- package/dist/ui/switch.js +22 -3
- package/dist/ui/table.js +1 -1
- package/dist/ui/tabs.js +59 -32
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.js +7 -7
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toast.js +28 -28
- package/dist/ui/toggle-group.js +11 -11
- package/dist/ui/toggle.js +7 -7
- package/dist/ui/tooltip.js +17 -6
- package/dist/ui/transitions.js +68 -58
- package/dist/ui/tree-view/index.js +7 -0
- package/dist/ui/visually-hidden.js +3 -3
- package/llms-full.txt +1 -1
- package/llms.txt +7 -0
- package/package.json +656 -706
- package/dist/_virtual/client.js +0 -5
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/react-dom-client.development.js +0 -5
- package/dist/_virtual/react-dom-client.production.js +0 -5
- package/dist/_virtual/scheduler.development.js +0 -5
- package/dist/_virtual/scheduler.production.js +0 -5
- package/dist/composed/date-picker/calendar-grid.js +0 -194
- package/dist/composed/date-picker/date-picker.js +0 -124
- package/dist/composed/date-picker/date-range-picker.js +0 -167
- package/dist/composed/date-picker/date-time-picker.js +0 -193
- package/dist/composed/date-picker/month-picker.js +0 -53
- package/dist/composed/date-picker/presets.js +0 -84
- package/dist/composed/date-picker/time-picker.js +0 -181
- package/dist/composed/date-picker/use-calendar.js +0 -17
- package/dist/composed/date-picker/year-picker.js +0 -45
- package/dist/composed/extensions/emoji-suggestion.js +0 -119
- package/dist/composed/extensions/file-attachment.js +0 -55
- package/dist/composed/extensions/mention-suggestion.js +0 -79
- package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +0 -40141
- 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
- package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +0 -2958
- 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
- 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
- package/dist/node_modules/.pnpm/react-dom@19.2.4_react@19.2.4/node_modules/react-dom/client.js +0 -20
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.development.js +0 -237
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js +0 -234
- package/dist/node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/index.js +0 -11
- package/dist/primitives/_internal/number.js +0 -6
- package/dist/primitives/_internal/primitive.js +0 -9
- package/dist/primitives/_internal/react-arrow.js +0 -13
- package/dist/primitives/_internal/react-collection.js +0 -48
- package/dist/primitives/_internal/react-compose-refs.js +0 -29
- package/dist/primitives/_internal/react-context.js +0 -76
- package/dist/primitives/_internal/react-direction.js +0 -10
- package/dist/primitives/_internal/react-dismissable-layer.js +0 -103
- package/dist/primitives/_internal/react-focus-guards.js +0 -17
- package/dist/primitives/_internal/react-focus-scope.js +0 -137
- package/dist/primitives/_internal/react-id.js +0 -14
- package/dist/primitives/_internal/react-popper.js +0 -137
- package/dist/primitives/_internal/react-portal.js +0 -16
- package/dist/primitives/_internal/react-presence.js +0 -71
- package/dist/primitives/_internal/react-primitive.js +0 -36
- package/dist/primitives/_internal/react-use-callback-ref.js +0 -13
- package/dist/primitives/_internal/react-use-controllable-state.js +0 -44
- package/dist/primitives/_internal/react-use-escape-keydown.js +0 -14
- package/dist/primitives/_internal/react-use-is-hydrated.js +0 -15
- package/dist/primitives/_internal/react-use-layout-effect.js +0 -6
- package/dist/primitives/_internal/react-use-previous.js +0 -8
- package/dist/primitives/_internal/react-use-size.js +0 -27
- package/dist/primitives/react-accordion.js +0 -239
- package/dist/primitives/react-alert-dialog.js +0 -127
- package/dist/primitives/react-aspect-ratio.js +0 -43
- package/dist/primitives/react-avatar.js +0 -75
- package/dist/primitives/react-checkbox.js +0 -251
- package/dist/primitives/react-collapsible.js +0 -120
- package/dist/primitives/react-context-menu.js +0 -240
- package/dist/primitives/react-dialog.js +0 -262
- package/dist/primitives/react-dropdown-menu.js +0 -227
- package/dist/primitives/react-hover-card.js +0 -187
- package/dist/primitives/react-label.js +0 -20
- package/dist/primitives/react-menu.js +0 -652
- package/dist/primitives/react-menubar.js +0 -355
- package/dist/primitives/react-navigation-menu.js +0 -607
- package/dist/primitives/react-popover.js +0 -243
- package/dist/primitives/react-progress.js +0 -84
- package/dist/primitives/react-radio-group.js +0 -238
- package/dist/primitives/react-roving-focus.js +0 -183
- package/dist/primitives/react-select.js +0 -862
- package/dist/primitives/react-separator.js +0 -24
- package/dist/primitives/react-slider.js +0 -437
- package/dist/primitives/react-slot.js +0 -70
- package/dist/primitives/react-switch.js +0 -132
- package/dist/primitives/react-tabs.js +0 -163
- package/dist/primitives/react-toast.js +0 -446
- package/dist/primitives/react-toggle-group.js +0 -137
- package/dist/primitives/react-toggle.js +0 -33
- package/dist/primitives/react-tooltip.js +0 -338
- package/dist/primitives/react-visually-hidden.js +0 -32
- package/dist/ui/charts/_internal/animation.js +0 -18
- package/dist/ui/charts/_internal/axes.js +0 -42
- package/dist/ui/charts/_internal/colors.js +0 -21
- package/dist/ui/charts/_internal/grid-lines.js +0 -43
- package/dist/ui/charts/_internal/legend.js +0 -29
- package/dist/ui/charts/_internal/tooltip.js +0 -39
- package/dist/ui/charts/_internal/types.js +0 -10
- package/dist/ui/charts/area-chart.js +0 -245
- package/dist/ui/charts/bar-chart.js +0 -153
- package/dist/ui/charts/chart-container.js +0 -27
- package/dist/ui/charts/gauge-chart.js +0 -72
- package/dist/ui/charts/line-chart.js +0 -163
- package/dist/ui/charts/pie-chart.js +0 -132
- package/dist/ui/charts/radar-chart.js +0 -223
- package/dist/ui/charts/sparkline.js +0 -124
- package/dist/ui/lib/motion.js +0 -32
- package/dist/ui/lib/use-reduced-motion.js +0 -15
- package/dist/ui/lib/use-ripple.js +0 -14
- package/dist/ui/tree-view/tree-item.js +0 -139
- package/dist/ui/tree-view/tree-view.js +0 -140
- 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 { e as z } from "./vendor-utils.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
|
+
(b) => {
|
|
60
|
+
const m = typeof b == "function" ? b(h) : b;
|
|
61
|
+
t ? t(m) : y(m), document.cookie = `${Y}=${m}; path=/; max-age=${J}`;
|
|
62
|
+
},
|
|
63
|
+
[t, h]
|
|
64
|
+
), S = C(() => l ? p((b) => !b) : w((b) => !b), [l, w, p]);
|
|
65
|
+
j(() => {
|
|
66
|
+
const b = (m) => {
|
|
67
|
+
m.key === ae && (m.metaKey || m.ctrlKey) && (m.preventDefault(), S());
|
|
68
|
+
};
|
|
69
|
+
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
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 be = 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
|
+
be.displayName = "SidebarGroupLabel";
|
|
346
|
+
const me = 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
|
+
me.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
|
+
be 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
|
+
me 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
|
+
};
|