ics-ui-kit 0.1.13 → 0.1.14
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/{AlertIcon-5B6AgZpe.js → AlertIcon-BphnEYvV.js} +3 -3
- package/dist/AlertIcon-BphnEYvV.js.map +1 -0
- package/dist/Field-CP_-li9L.js +90 -0
- package/dist/Field-CP_-li9L.js.map +1 -0
- package/dist/{FormFooterTemplate-ClTxqrIB.js → FormFooterTemplate-Cfn5Nmge.js} +2 -2
- package/dist/{FormFooterTemplate-ClTxqrIB.js.map → FormFooterTemplate-Cfn5Nmge.js.map} +1 -1
- package/dist/{FormStack-B3UBh9oF.js → FormStack-Cc_ELdWL.js} +2 -2
- package/dist/{FormStack-B3UBh9oF.js.map → FormStack-Cc_ELdWL.js.map} +1 -1
- package/dist/{SearchSelectTag-DFCX9zT1.js → SearchSelectTag-CA7Ie3Nx.js} +2 -2
- package/dist/{SearchSelectTag-DFCX9zT1.js.map → SearchSelectTag-CA7Ie3Nx.js.map} +1 -1
- package/dist/TableFillHandle-C_yvCTSl.js +65 -0
- package/dist/TableFillHandle-C_yvCTSl.js.map +1 -0
- package/dist/TextOverflowTooltip-B1I5qwAT.js.map +1 -1
- package/dist/blocks/auth/otp-form.js +1 -1
- package/dist/components/alert/Alert.d.ts +4 -0
- package/dist/components/alert/Alert.stories.d.ts +1 -0
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.js +18 -18
- package/dist/components/alert.js.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/field/Field.d.ts +4 -0
- package/dist/components/field/Field.stories.d.ts +1 -0
- package/dist/components/field.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form.js +3 -3
- package/dist/components/search-select.js +1 -1
- package/dist/components/sidebar.js +204 -210
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/system-state.js +1 -1
- package/dist/components/table/Table.d.ts +109 -5
- package/dist/components/table/Table.stories.d.ts +285 -9
- package/dist/components/table/column-reorder/index.d.ts +1 -0
- package/dist/components/table/column-reorder/useColumnReorder.d.ts +82 -0
- package/dist/components/table/column-reorder.d.ts +2 -0
- package/dist/components/table/column-reorder.js +6 -0
- package/dist/components/table/column-reorder.js.map +1 -0
- package/dist/components/table/column-resize/columnAutoFit.d.ts +21 -0
- package/dist/components/table/column-resize/columnResizeSession.d.ts +9 -0
- package/dist/components/table/column-resize/index.d.ts +3 -0
- package/dist/components/table/column-resize/useColumnResize.d.ts +52 -0
- package/dist/components/table/column-resize.d.ts +2 -0
- package/dist/components/table/column-resize.js +7 -0
- package/dist/components/table/column-resize.js.map +1 -0
- package/dist/components/table/editable/TableFillHandle.d.ts +23 -0
- package/dist/components/table/editable/cellRange.d.ts +83 -0
- package/dist/components/table/editable/editableCell.d.ts +90 -0
- package/dist/components/table/editable/index.d.ts +3 -0
- package/dist/components/table/editable.d.ts +2 -0
- package/dist/components/table/editable.js +12 -0
- package/dist/components/table/editable.js.map +1 -0
- package/dist/components/table/index.d.ts +8 -1
- package/dist/components/table/opaqueCell.d.ts +47 -0
- package/dist/components/table/rowTint.d.ts +60 -0
- package/dist/components/table/sticky/index.d.ts +1 -0
- package/dist/components/table/sticky/stickyCell.d.ts +105 -0
- package/dist/components/table/sticky.d.ts +2 -0
- package/dist/components/table/sticky.js +22 -0
- package/dist/components/table/sticky.js.map +1 -0
- package/dist/components/table/tableStoryData.d.ts +84 -0
- package/dist/components/table/tableStoryParts.d.ts +72 -0
- package/dist/components/table/tree/TableTree.d.ts +106 -0
- package/dist/components/table/tree/index.d.ts +3 -0
- package/dist/components/table/tree/treeGeometry.d.ts +86 -0
- package/dist/components/table/tree/treeModel.d.ts +87 -0
- package/dist/components/table/tree.d.ts +2 -0
- package/dist/components/table/tree.js +19 -0
- package/dist/components/table/tree.js.map +1 -0
- package/dist/components/table.js +52 -79
- package/dist/components/table.js.map +1 -1
- package/dist/components/tag-input.js +1 -1
- package/dist/components/toolbar.js +1 -2
- package/dist/components/toolbar.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/lib/utils/dom.d.ts +72 -0
- package/dist/opaqueCell-SGaiyL54.js +31 -0
- package/dist/opaqueCell-SGaiyL54.js.map +1 -0
- package/dist/plus-BpxYPnAG.js +15 -0
- package/dist/plus-BpxYPnAG.js.map +1 -0
- package/dist/styles-scoped.css +315 -72
- package/dist/styles.css +315 -72
- package/dist/theme.css +2 -0
- package/dist/treeModel-BlPWVj4W.js +319 -0
- package/dist/treeModel-BlPWVj4W.js.map +1 -0
- package/dist/useBreakpoints-DHvp74UL.js +31 -0
- package/dist/useBreakpoints-DHvp74UL.js.map +1 -0
- package/dist/useColumnReorder-BxVZQ_Y5.js +119 -0
- package/dist/useColumnReorder-BxVZQ_Y5.js.map +1 -0
- package/dist/useColumnResize-wjfEyBBg.js +130 -0
- package/dist/useColumnResize-wjfEyBBg.js.map +1 -0
- package/dist/vendors/date-fns/index.d.ts +7 -14
- package/dist/vendors/date-fns/locale/en-US/index.d.ts +4 -0
- package/dist/vendors/date-fns/locale/ru/index.d.ts +4 -0
- package/dist/vendors/react-day-picker/index.d.ts +8 -17
- package/dist/vendors/react-hook-form/index.d.ts +8 -15
- package/dist/vendors/tanstack/react-table/index.d.ts +12 -0
- package/dist/vendors/zod/index.d.ts +8 -9
- package/package.json +3 -2
- package/tailwind.preset.js +6 -2
- package/dist/AlertIcon-5B6AgZpe.js.map +0 -1
- package/dist/Field-COD9VbUX.js +0 -86
- package/dist/Field-COD9VbUX.js.map +0 -1
- package/dist/components/data-table/DataTable.stories.d.ts +0 -8
- package/dist/useBreakpoints-D8wKOvil.js +0 -103
- package/dist/useBreakpoints-D8wKOvil.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { e as T } from "../useBreakpoints-
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { e as T } from "../useBreakpoints-DHvp74UL.js";
|
|
3
3
|
import o from "react";
|
|
4
4
|
import { T as B, b as D, c as A, a as E } from "../Tooltip-7Duaau0S.js";
|
|
5
5
|
import { c as w } from "../cn-dsXlqdJg.js";
|
|
@@ -10,27 +10,18 @@ import { D as j } from "../Divider-DPW5ZhZ8.js";
|
|
|
10
10
|
import { S as v } from "../index-BtQfgaSF.js";
|
|
11
11
|
import { T as n } from "../index-BVqs-uqP.js";
|
|
12
12
|
import { S as I } from "../Skeleton-y6I-i9q5.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import {
|
|
13
|
+
import { S as F } from "../ScrollShadowContainer-DdrnF8qU.js";
|
|
14
|
+
import { P as $ } from "../plus-BpxYPnAG.js";
|
|
15
|
+
import { c as q } from "../createLucideIcon-DwBrHnj9.js";
|
|
15
16
|
/**
|
|
16
17
|
* @license lucide-react v0.460.0 - ISC
|
|
17
18
|
*
|
|
18
19
|
* This source code is licensed under the ISC license.
|
|
19
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
21
|
*/
|
|
21
|
-
const
|
|
22
|
+
const W = q("PanelLeft", [
|
|
22
23
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
23
24
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
24
|
-
]);
|
|
25
|
-
/**
|
|
26
|
-
* @license lucide-react v0.460.0 - ISC
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the ISC license.
|
|
29
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/
|
|
31
|
-
const F = k("Plus", [
|
|
32
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
33
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
34
25
|
]), C = o.createContext(null);
|
|
35
26
|
function N() {
|
|
36
27
|
const e = o.useContext(C);
|
|
@@ -38,52 +29,52 @@ function N() {
|
|
|
38
29
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
39
30
|
return e;
|
|
40
31
|
}
|
|
41
|
-
const
|
|
32
|
+
const V = "sidebar_state", U = 60 * 60 * 24 * 7, X = "16rem", Y = "18rem", J = "3rem", Q = "b", Z = n({
|
|
42
33
|
base: "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-primary-bg"
|
|
43
|
-
}),
|
|
44
|
-
const c = T(), [
|
|
34
|
+
}), ee = o.forwardRef(({ defaultOpen: e = !0, open: a, onOpenChange: t, className: i, style: s, children: d, ...u }, m) => {
|
|
35
|
+
const c = T(), [f, g] = o.useState(!1), [y, k] = o.useState(e), h = a ?? y, S = o.useCallback(
|
|
45
36
|
(l) => {
|
|
46
|
-
const
|
|
47
|
-
t ? t(
|
|
37
|
+
const b = typeof l == "function" ? l(h) : l;
|
|
38
|
+
t ? t(b) : k(b), document.cookie = `${V}=${b}; path=/; max-age=${U}`;
|
|
48
39
|
},
|
|
49
40
|
[t, h]
|
|
50
|
-
), x = o.useCallback(() => c ?
|
|
41
|
+
), x = o.useCallback(() => c ? g((l) => !l) : S((l) => !l), [c, S, g]);
|
|
51
42
|
o.useEffect(() => {
|
|
52
|
-
const l = (
|
|
53
|
-
|
|
43
|
+
const l = (b) => {
|
|
44
|
+
b.key === Q && (b.metaKey || b.ctrlKey) && (b.preventDefault(), x());
|
|
54
45
|
};
|
|
55
46
|
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
56
47
|
}, [x]);
|
|
57
|
-
const M = h ? "expanded" : "collapsed",
|
|
48
|
+
const M = h ? "expanded" : "collapsed", _ = o.useMemo(
|
|
58
49
|
() => ({
|
|
59
50
|
state: M,
|
|
60
51
|
open: h,
|
|
61
52
|
setOpen: S,
|
|
62
53
|
isMobile: c,
|
|
63
|
-
openMobile:
|
|
64
|
-
setOpenMobile:
|
|
54
|
+
openMobile: f,
|
|
55
|
+
setOpenMobile: g,
|
|
65
56
|
toggleSidebar: x
|
|
66
57
|
}),
|
|
67
|
-
[M, h, S, c,
|
|
58
|
+
[M, h, S, c, f, g, x]
|
|
68
59
|
);
|
|
69
|
-
return /* @__PURE__ */ r(C.Provider, { value:
|
|
60
|
+
return /* @__PURE__ */ r(C.Provider, { value: _, children: /* @__PURE__ */ r(E, { delayDuration: 0, children: /* @__PURE__ */ r(
|
|
70
61
|
"div",
|
|
71
62
|
{
|
|
72
63
|
style: {
|
|
73
|
-
"--sidebar-width":
|
|
74
|
-
"--sidebar-width-icon":
|
|
64
|
+
"--sidebar-width": X,
|
|
65
|
+
"--sidebar-width-icon": J,
|
|
75
66
|
...s
|
|
76
67
|
},
|
|
77
|
-
className:
|
|
78
|
-
ref:
|
|
79
|
-
...
|
|
68
|
+
className: Z({ className: i }),
|
|
69
|
+
ref: m,
|
|
70
|
+
...u,
|
|
80
71
|
children: d
|
|
81
72
|
}
|
|
82
73
|
) }) });
|
|
83
74
|
});
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
const {
|
|
75
|
+
ee.displayName = "SidebarProvider";
|
|
76
|
+
const ae = o.forwardRef(({ side: e = "left", variant: a = "sidebar", collapsible: t = "offcanvas", className: i, children: s, ...d }, u) => {
|
|
77
|
+
const { state: m, openMobile: c, setOpenMobile: f } = N();
|
|
87
78
|
return t === "none" ? /* @__PURE__ */ r(
|
|
88
79
|
"div",
|
|
89
80
|
{
|
|
@@ -91,82 +82,85 @@ const ee = o.forwardRef(({ side: e = "left", variant: a = "sidebar", collapsible
|
|
|
91
82
|
"text-sidebar-foreground flex h-full w-[--sidebar-width] flex-col bg-sidebar-bg",
|
|
92
83
|
i
|
|
93
84
|
),
|
|
94
|
-
ref:
|
|
85
|
+
ref: u,
|
|
95
86
|
...d,
|
|
96
87
|
children: s
|
|
97
88
|
}
|
|
98
|
-
) :
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
89
|
+
) : /* @__PURE__ */ p(z, { children: [
|
|
90
|
+
/* @__PURE__ */ r("div", { className: "contents lg:hidden", children: /* @__PURE__ */ r(G, { open: c, onOpenChange: f, ...d, children: /* @__PURE__ */ p(
|
|
91
|
+
L,
|
|
92
|
+
{
|
|
93
|
+
"data-sidebar": "sidebar",
|
|
94
|
+
"data-mobile": "true",
|
|
95
|
+
className: "w-[--sidebar-width] bg-sidebar-bg p-0 text-secondary-fg [&>button]:hidden",
|
|
96
|
+
style: {
|
|
97
|
+
"--sidebar-width": Y
|
|
98
|
+
},
|
|
99
|
+
side: e,
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ p(O, { className: "sr-only", children: [
|
|
102
|
+
/* @__PURE__ */ r(H, { children: "Sidebar" }),
|
|
103
|
+
/* @__PURE__ */ r(P, { children: "Displays the mobile sidebar." })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: s })
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
) }) }),
|
|
109
|
+
/* @__PURE__ */ p(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref: u,
|
|
113
|
+
className: "text-sidebar-foreground group peer hidden lg:block",
|
|
114
|
+
"data-state": m,
|
|
115
|
+
"data-collapsible": m === "collapsed" ? t : "",
|
|
116
|
+
"data-variant": a,
|
|
117
|
+
"data-side": e,
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ r(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: w(
|
|
123
|
+
"relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
124
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
125
|
+
"group-data-[side=right]:rotate-180",
|
|
126
|
+
a === "floating" || a === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ r(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
className: w(
|
|
134
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear lg:flex",
|
|
135
|
+
e === "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)]",
|
|
136
|
+
// Adjust the padding for floating and inset variants.
|
|
137
|
+
a === "floating" || a === "inset" ? "p-2 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 group-data-[side=left]:border-secondary-border group-data-[side=right]:border-secondary-border",
|
|
138
|
+
i
|
|
139
|
+
),
|
|
140
|
+
...d,
|
|
141
|
+
children: /* @__PURE__ */ r(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
"data-sidebar": "sidebar",
|
|
145
|
+
className: "flex h-full w-full flex-col bg-sidebar-bg group-data-[variant=floating]:rounded-xl group-data-[variant=floating]:border-0.5 group-data-[variant=floating]:border-primary-border group-data-[variant=floating]:shadow-soft-xl",
|
|
146
|
+
children: s
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
] });
|
|
161
155
|
});
|
|
162
|
-
|
|
163
|
-
const
|
|
156
|
+
ae.displayName = "Sidebar";
|
|
157
|
+
const te = o.forwardRef(
|
|
164
158
|
({ onClick: e, ...a }, t) => {
|
|
165
159
|
const { toggleSidebar: i } = N();
|
|
166
160
|
return /* @__PURE__ */ r(
|
|
167
161
|
R,
|
|
168
162
|
{
|
|
169
|
-
icon:
|
|
163
|
+
icon: W,
|
|
170
164
|
ref: t,
|
|
171
165
|
"data-sidebar": "trigger",
|
|
172
166
|
variant: "ghost",
|
|
@@ -179,8 +173,8 @@ const ae = o.forwardRef(
|
|
|
179
173
|
);
|
|
180
174
|
}
|
|
181
175
|
);
|
|
182
|
-
|
|
183
|
-
const
|
|
176
|
+
te.displayName = "SidebarTrigger";
|
|
177
|
+
const re = n({
|
|
184
178
|
base: [
|
|
185
179
|
"absolute inset-y-0 z-20 hidden w-[5px] -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0 hover:after:-translate-x-1/2 hover:after:border-l hover:after:border-primary-border group-data-[side=left]:-right-[5px] group-data-[side=right]:left-0 sm:flex",
|
|
186
180
|
"cursor-ew-resize",
|
|
@@ -188,7 +182,7 @@ const te = n({
|
|
|
188
182
|
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-[2.5px]",
|
|
189
183
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-[2.5px]"
|
|
190
184
|
]
|
|
191
|
-
}),
|
|
185
|
+
}), oe = o.forwardRef(
|
|
192
186
|
({ className: e, ...a }, t) => {
|
|
193
187
|
const { toggleSidebar: i } = N();
|
|
194
188
|
return /* @__PURE__ */ r(
|
|
@@ -200,58 +194,58 @@ const te = n({
|
|
|
200
194
|
tabIndex: -1,
|
|
201
195
|
onClick: i,
|
|
202
196
|
title: "Toggle Sidebar",
|
|
203
|
-
className:
|
|
197
|
+
className: re({ className: e }),
|
|
204
198
|
...a
|
|
205
199
|
}
|
|
206
200
|
);
|
|
207
201
|
}
|
|
208
202
|
);
|
|
209
|
-
|
|
210
|
-
const
|
|
203
|
+
oe.displayName = "SidebarRail";
|
|
204
|
+
const ie = n({
|
|
211
205
|
base: [
|
|
212
206
|
"relative flex w-full flex-1 flex-col bg-secondary-bg",
|
|
213
207
|
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow"
|
|
214
208
|
]
|
|
215
|
-
}),
|
|
216
|
-
|
|
217
|
-
const
|
|
209
|
+
}), se = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("main", { ref: t, className: ie({ className: e }), ...a }));
|
|
210
|
+
se.displayName = "SidebarInset";
|
|
211
|
+
const ne = n({
|
|
218
212
|
base: "h-8 w-full shadow-none"
|
|
219
|
-
}),
|
|
220
|
-
({ className: e, ...a }, t) => /* @__PURE__ */ r(K, { ref: t, "data-sidebar": "input", className:
|
|
213
|
+
}), de = o.forwardRef(
|
|
214
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ r(K, { ref: t, "data-sidebar": "input", className: ne({ className: e }), ...a })
|
|
221
215
|
);
|
|
222
|
-
|
|
223
|
-
const
|
|
216
|
+
de.displayName = "SidebarInput";
|
|
217
|
+
const le = n({
|
|
224
218
|
base: "flex flex-col gap-2 p-2 group-data-[variant=floating]:px-2.5"
|
|
225
|
-
}),
|
|
226
|
-
|
|
227
|
-
const
|
|
219
|
+
}), ce = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "header", className: le({ className: e }), ...a }));
|
|
220
|
+
ce.displayName = "SidebarHeader";
|
|
221
|
+
const be = n({
|
|
228
222
|
base: "flex flex-col gap-2 p-2 group-data-[variant=floating]:px-2.5"
|
|
229
|
-
}),
|
|
230
|
-
|
|
231
|
-
const
|
|
223
|
+
}), ue = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "footer", className: be({ className: e }), ...a }));
|
|
224
|
+
ue.displayName = "SidebarFooter";
|
|
225
|
+
const pe = n({
|
|
232
226
|
base: "w-auto bg-secondary-border"
|
|
233
|
-
}),
|
|
227
|
+
}), me = o.forwardRef(
|
|
234
228
|
({ className: e, ...a }, t) => /* @__PURE__ */ r(
|
|
235
229
|
j,
|
|
236
230
|
{
|
|
237
231
|
ref: t,
|
|
238
232
|
orientation: "horizontal",
|
|
239
233
|
"data-sidebar": "separator",
|
|
240
|
-
className:
|
|
234
|
+
className: pe({ className: e }),
|
|
241
235
|
...a
|
|
242
236
|
}
|
|
243
237
|
)
|
|
244
238
|
);
|
|
245
|
-
|
|
246
|
-
const
|
|
239
|
+
me.displayName = "SidebarSeparator";
|
|
240
|
+
const fe = n({
|
|
247
241
|
slots: {
|
|
248
242
|
content: "flex flex-1 flex-col gap-2 group-data-[collapsible=icon]:overflow-hidden"
|
|
249
243
|
}
|
|
250
|
-
}),
|
|
244
|
+
}), ge = o.forwardRef(
|
|
251
245
|
({ className: e, children: a, ...t }, i) => {
|
|
252
|
-
const s =
|
|
246
|
+
const s = fe();
|
|
253
247
|
return /* @__PURE__ */ r(
|
|
254
|
-
|
|
248
|
+
F,
|
|
255
249
|
{
|
|
256
250
|
ref: i,
|
|
257
251
|
"data-sidebar": "content",
|
|
@@ -263,54 +257,54 @@ const me = n({
|
|
|
263
257
|
);
|
|
264
258
|
}
|
|
265
259
|
);
|
|
266
|
-
|
|
267
|
-
const
|
|
260
|
+
ge.displayName = "SidebarContent";
|
|
261
|
+
const he = n({
|
|
268
262
|
base: "relative flex w-full min-w-0 flex-col p-2 group-data-[variant=floating]:px-2.5"
|
|
269
|
-
}),
|
|
270
|
-
|
|
271
|
-
const
|
|
263
|
+
}), ve = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group", className: he({ className: e }), ...a }));
|
|
264
|
+
ve.displayName = "SidebarGroup";
|
|
265
|
+
const ye = n({
|
|
272
266
|
base: [
|
|
273
267
|
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-secondary-fg/70 outline-none transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
274
268
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0"
|
|
275
269
|
]
|
|
276
|
-
}),
|
|
277
|
-
({ className: e, asChild: a = !1, ...t }, i) => /* @__PURE__ */ r(a ? v : "div", { ref: i, "data-sidebar": "group-label", className:
|
|
270
|
+
}), Se = o.forwardRef(
|
|
271
|
+
({ className: e, asChild: a = !1, ...t }, i) => /* @__PURE__ */ r(a ? v : "div", { ref: i, "data-sidebar": "group-label", className: ye({ className: e }), ...t })
|
|
278
272
|
);
|
|
279
|
-
|
|
280
|
-
const
|
|
273
|
+
Se.displayName = "SidebarGroupLabel";
|
|
274
|
+
const xe = n({
|
|
281
275
|
base: [
|
|
282
276
|
"focus-visible:ring-primary2 absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-muted outline-none transition-transform hover:text-primary-fg focus-visible:shadow-focus [&>svg]:size-4 [&>svg]:shrink-0",
|
|
283
277
|
// Increases the hit area of the button on mobile.
|
|
284
278
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
285
279
|
"group-data-[collapsible=icon]:hidden"
|
|
286
280
|
]
|
|
287
|
-
}),
|
|
281
|
+
}), we = o.forwardRef(
|
|
288
282
|
({ className: e, asChild: a = !1, ...t }, i) => /* @__PURE__ */ r(
|
|
289
283
|
a ? v : "button",
|
|
290
284
|
{
|
|
291
285
|
ref: i,
|
|
292
286
|
"data-sidebar": "group-action",
|
|
293
|
-
className:
|
|
287
|
+
className: xe({ className: e }),
|
|
294
288
|
...t
|
|
295
289
|
}
|
|
296
290
|
)
|
|
297
291
|
);
|
|
298
|
-
|
|
299
|
-
const
|
|
292
|
+
we.displayName = "SidebarGroupAction";
|
|
293
|
+
const Ne = n({
|
|
300
294
|
base: "w-full text-sm"
|
|
301
|
-
}),
|
|
302
|
-
({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group-content", className:
|
|
295
|
+
}), Me = o.forwardRef(
|
|
296
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group-content", className: Ne({ className: e }), ...a })
|
|
303
297
|
);
|
|
304
|
-
|
|
305
|
-
const
|
|
298
|
+
Me.displayName = "SidebarGroupContent";
|
|
299
|
+
const Ie = n({
|
|
306
300
|
base: "flex w-full min-w-0 flex-col gap-1"
|
|
307
|
-
}),
|
|
308
|
-
|
|
309
|
-
const
|
|
301
|
+
}), Re = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu", className: Ie({ className: e }), ...a }));
|
|
302
|
+
Re.displayName = "SidebarMenu";
|
|
303
|
+
const Ce = n({
|
|
310
304
|
base: "group/menu-item relative"
|
|
311
|
-
}), ke = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("li", { ref: t, "data-sidebar": "menu-item", className:
|
|
305
|
+
}), ke = o.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r("li", { ref: t, "data-sidebar": "menu-item", className: Ce({ className: e }), ...a }));
|
|
312
306
|
ke.displayName = "SidebarMenuItem";
|
|
313
|
-
const
|
|
307
|
+
const _e = n({
|
|
314
308
|
base: [
|
|
315
309
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md bg-primary-bg p-2 text-left text-sm text-secondary-fg outline-none transition-[width,height,padding]",
|
|
316
310
|
"hover:bg-primary-bg-hover hover:text-primary-fg focus-visible:shadow-focus",
|
|
@@ -339,27 +333,27 @@ const Ce = n({
|
|
|
339
333
|
variant: "default",
|
|
340
334
|
size: "default"
|
|
341
335
|
}
|
|
342
|
-
}),
|
|
343
|
-
const c = e ? v : "button", { isMobile:
|
|
336
|
+
}), ze = o.forwardRef(({ asChild: e = !1, isActive: a = !1, variant: t = "default", size: i = "default", tooltip: s, className: d, ...u }, m) => {
|
|
337
|
+
const c = e ? v : "button", { isMobile: f, state: g } = N(), y = /* @__PURE__ */ r(
|
|
344
338
|
c,
|
|
345
339
|
{
|
|
346
|
-
ref:
|
|
340
|
+
ref: m,
|
|
347
341
|
"data-sidebar": "menu-button",
|
|
348
342
|
"data-size": i,
|
|
349
343
|
"data-active": a,
|
|
350
|
-
className: w(
|
|
351
|
-
...
|
|
344
|
+
className: w(_e({ variant: t, size: i }), d),
|
|
345
|
+
...u
|
|
352
346
|
}
|
|
353
347
|
);
|
|
354
348
|
return s ? (typeof s == "string" && (s = {
|
|
355
349
|
children: s
|
|
356
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ p(B, { children: [
|
|
357
351
|
/* @__PURE__ */ r(D, { asChild: !0, children: y }),
|
|
358
|
-
/* @__PURE__ */ r(A, { side: "right", align: "center", hidden:
|
|
352
|
+
/* @__PURE__ */ r(A, { side: "right", align: "center", hidden: g !== "collapsed" || f, ...s })
|
|
359
353
|
] })) : y;
|
|
360
354
|
});
|
|
361
|
-
|
|
362
|
-
const
|
|
355
|
+
ze.displayName = "SidebarMenuButton";
|
|
356
|
+
const Te = n({
|
|
363
357
|
base: [
|
|
364
358
|
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-muted outline-none transition-transform hover:text-primary-fg focus-visible:ring-1 focus-visible:ring-primary peer-hover/menu-button:text-primary-fg [&>svg]:size-4 [&>svg]:shrink-0",
|
|
365
359
|
// Increases the hit area of the button on mobile.
|
|
@@ -374,17 +368,17 @@ const ze = n({
|
|
|
374
368
|
true: "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-primary-accent md:opacity-0"
|
|
375
369
|
}
|
|
376
370
|
}
|
|
377
|
-
}),
|
|
371
|
+
}), Be = o.forwardRef(({ className: e, asChild: a = !1, showOnHover: t = !1, ...i }, s) => /* @__PURE__ */ r(
|
|
378
372
|
a ? v : "button",
|
|
379
373
|
{
|
|
380
374
|
ref: s,
|
|
381
375
|
"data-sidebar": "menu-action",
|
|
382
|
-
className:
|
|
376
|
+
className: Te({ isHover: t, className: e }),
|
|
383
377
|
...i
|
|
384
378
|
}
|
|
385
379
|
));
|
|
386
|
-
|
|
387
|
-
const
|
|
380
|
+
Be.displayName = "SidebarMenuAction";
|
|
381
|
+
const De = n({
|
|
388
382
|
base: [
|
|
389
383
|
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-normal tabular-nums leading-none text-muted",
|
|
390
384
|
"peer-hover/menu-button:text-muted peer-disabled/menu-button:opacity-50 peer-data-[active=true]/menu-button:text-muted",
|
|
@@ -393,19 +387,19 @@ const Be = n({
|
|
|
393
387
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
394
388
|
"group-data-[collapsible=icon]:hidden"
|
|
395
389
|
]
|
|
396
|
-
}),
|
|
397
|
-
({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "menu-badge", className:
|
|
390
|
+
}), Ae = o.forwardRef(
|
|
391
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "menu-badge", className: De({ className: e }), ...a })
|
|
398
392
|
);
|
|
399
|
-
|
|
400
|
-
const
|
|
393
|
+
Ae.displayName = "SidebarMenuBadge";
|
|
394
|
+
const Ee = n({
|
|
401
395
|
slots: {
|
|
402
396
|
wrapper: "flex h-8 items-center gap-2 rounded-md px-2",
|
|
403
397
|
skeleton: "h-4 max-w-[--skeleton-width] flex-1",
|
|
404
398
|
skeletonIcon: "size-4 rounded-md"
|
|
405
399
|
}
|
|
406
|
-
}),
|
|
407
|
-
const s = o.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []), d =
|
|
408
|
-
return /* @__PURE__ */
|
|
400
|
+
}), Ge = o.forwardRef(({ className: e, showIcon: a = !1, ...t }, i) => {
|
|
401
|
+
const s = o.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []), d = Ee();
|
|
402
|
+
return /* @__PURE__ */ p("div", { ref: i, "data-sidebar": "menu-skeleton", className: d.wrapper({ className: e }), ...t, children: [
|
|
409
403
|
a && /* @__PURE__ */ r(I, { className: d.skeletonIcon(), "data-sidebar": "menu-skeleton-icon" }),
|
|
410
404
|
/* @__PURE__ */ r(
|
|
411
405
|
I,
|
|
@@ -419,23 +413,23 @@ const Ae = n({
|
|
|
419
413
|
)
|
|
420
414
|
] });
|
|
421
415
|
});
|
|
422
|
-
|
|
423
|
-
const
|
|
416
|
+
Ge.displayName = "SidebarMenuSkeleton";
|
|
417
|
+
const Le = n({
|
|
424
418
|
base: [
|
|
425
419
|
"ml-3.5 flex min-w-0 flex-col gap-1 border-l border-secondary-border py-0.5 pl-2.5",
|
|
426
420
|
"group-data-[collapsible=icon]:hidden"
|
|
427
421
|
]
|
|
428
|
-
}),
|
|
429
|
-
({ className: e, ...a }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu-sub", className:
|
|
422
|
+
}), Oe = o.forwardRef(
|
|
423
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu-sub", className: Le({ className: e }), ...a })
|
|
430
424
|
);
|
|
431
|
-
|
|
432
|
-
const
|
|
425
|
+
Oe.displayName = "SidebarMenuSub";
|
|
426
|
+
const He = n({
|
|
433
427
|
base: "rounded-md focus-visible:shadow-focus focus-visible:outline-none"
|
|
434
|
-
}),
|
|
435
|
-
({ className: e, ...a }, t) => /* @__PURE__ */ r("li", { ref: t, className:
|
|
428
|
+
}), Pe = o.forwardRef(
|
|
429
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ r("li", { ref: t, className: He({ className: e }), ...a })
|
|
436
430
|
);
|
|
437
|
-
|
|
438
|
-
const
|
|
431
|
+
Pe.displayName = "SidebarMenuSubItem";
|
|
432
|
+
const Ke = n({
|
|
439
433
|
base: [
|
|
440
434
|
"flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 text-secondary-fg outline-none hover:bg-secondary-bg-hover hover:text-primary-fg focus-visible:mr-0.5 focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-primary-fg",
|
|
441
435
|
"data-[active=true]:bg-primary-bg-hover data-[active=true]:text-primary-accent",
|
|
@@ -447,19 +441,19 @@ const Pe = n({
|
|
|
447
441
|
md: "text-sm"
|
|
448
442
|
}
|
|
449
443
|
}
|
|
450
|
-
}),
|
|
444
|
+
}), je = o.forwardRef(({ asChild: e = !1, size: a = "md", isActive: t, className: i, ...s }, d) => /* @__PURE__ */ r(
|
|
451
445
|
e ? v : "a",
|
|
452
446
|
{
|
|
453
447
|
ref: d,
|
|
454
448
|
"data-sidebar": "menu-sub-button",
|
|
455
449
|
"data-size": a,
|
|
456
450
|
"data-active": t,
|
|
457
|
-
className:
|
|
451
|
+
className: Ke({ size: a, className: i }),
|
|
458
452
|
...s
|
|
459
453
|
}
|
|
460
454
|
));
|
|
461
|
-
|
|
462
|
-
const
|
|
455
|
+
je.displayName = "SidebarMenuSubButton";
|
|
456
|
+
const Fe = n({
|
|
463
457
|
slots: {
|
|
464
458
|
wrapper: "group/insertion flex cursor-pointer flex-row items-center border-none bg-transparent p-0",
|
|
465
459
|
icon: "peer/icon h-4 w-4 p-0.5 text-muted opacity-0 group-hover/insertion:opacity-100",
|
|
@@ -467,39 +461,39 @@ const je = n({
|
|
|
467
461
|
}
|
|
468
462
|
}), $e = o.forwardRef(
|
|
469
463
|
({ className: e, ...a }, t) => {
|
|
470
|
-
const i =
|
|
471
|
-
return /* @__PURE__ */
|
|
472
|
-
/* @__PURE__ */ r(R, { icon:
|
|
464
|
+
const i = Fe();
|
|
465
|
+
return /* @__PURE__ */ p("div", { "data-sidebar": "sidebar-insertion-line", className: i.wrapper({ className: e }), ref: t, ...a, children: [
|
|
466
|
+
/* @__PURE__ */ r(R, { icon: $, size: "xs", className: i.icon(), variant: "link" }),
|
|
473
467
|
/* @__PURE__ */ r("div", { className: i.line() })
|
|
474
468
|
] });
|
|
475
469
|
}
|
|
476
470
|
);
|
|
477
471
|
$e.displayName = "SidebarInsertionLine";
|
|
478
472
|
export {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
473
|
+
ae as Sidebar,
|
|
474
|
+
ge as SidebarContent,
|
|
475
|
+
ue as SidebarFooter,
|
|
476
|
+
ve as SidebarGroup,
|
|
477
|
+
we as SidebarGroupAction,
|
|
478
|
+
Me as SidebarGroupContent,
|
|
479
|
+
Se as SidebarGroupLabel,
|
|
480
|
+
ce as SidebarHeader,
|
|
481
|
+
de as SidebarInput,
|
|
488
482
|
$e as SidebarInsertionLine,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
483
|
+
se as SidebarInset,
|
|
484
|
+
Re as SidebarMenu,
|
|
485
|
+
Be as SidebarMenuAction,
|
|
486
|
+
Ae as SidebarMenuBadge,
|
|
487
|
+
ze as SidebarMenuButton,
|
|
494
488
|
ke as SidebarMenuItem,
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
489
|
+
Ge as SidebarMenuSkeleton,
|
|
490
|
+
Oe as SidebarMenuSub,
|
|
491
|
+
je as SidebarMenuSubButton,
|
|
492
|
+
Pe as SidebarMenuSubItem,
|
|
493
|
+
ee as SidebarProvider,
|
|
494
|
+
oe as SidebarRail,
|
|
495
|
+
me as SidebarSeparator,
|
|
496
|
+
te as SidebarTrigger,
|
|
503
497
|
N as useSidebar
|
|
504
498
|
};
|
|
505
499
|
//# sourceMappingURL=sidebar.js.map
|