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