@gears-frontx/ui-kit 0.4.3 → 0.4.4
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/README.md +4 -1
- package/dist/chunks/dialog.CIR9bQoU.css +1 -0
- package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
- package/dist/chunks/pagination.BAAl9D_S.css +1 -0
- package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
- package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
- package/dist/chunks/tabs.BqhiMRUP.css +1 -0
- package/dist/data-grid/pagination.js +35 -35
- package/dist/dialog.js +38 -38
- package/dist/docs/data-grid.md +2 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/questionnaire.md +1 -1
- package/dist/dropdown-menu.js +56 -56
- package/dist/select.js +45 -45
- package/dist/sidebar.js +112 -112
- package/dist/tabs.js +14 -14
- package/package.json +1 -4
- package/dist/chunks/dialog.Cpo8vChK.css +0 -1
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
- package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
- package/dist/chunks/sidebar.CIuN--7U.css +0 -1
- package/dist/chunks/tabs.DFa0OYMo.css +0 -1
package/dist/select.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { Select as
|
|
3
|
-
import { cx as
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import './chunks/select.
|
|
6
|
-
trigger:
|
|
7
|
-
sizeDefault:
|
|
8
|
-
sizeSm:
|
|
9
|
-
variantDefault:
|
|
10
|
-
variantFilter:
|
|
11
|
-
triggerIcon:
|
|
12
|
-
value:
|
|
2
|
+
import { Select as n } from "@base-ui/react/select";
|
|
3
|
+
import { cx as s, cva as I } from "class-variance-authority";
|
|
4
|
+
import { CheckIcon as w, ChevronDownIcon as p, ChevronUpIcon as S } from "lucide-react";
|
|
5
|
+
import './chunks/select.C3sLDoZI.css';const d = "_trigger_16bp2_6", N = "_sizeDefault_16bp2_9", A = "_sizeSm_16bp2_9", D = "_variantDefault_16bp2_107", h = "_variantFilter_16bp2_117", z = "_triggerIcon_16bp2_122", x = "_value_16bp2_128", L = "_positioner_16bp2_138", T = "_popup_16bp2_143", U = "_list_16bp2_157", C = "_group_16bp2_258", F = "_groupLabel_16bp2_262", V = "_item_16bp2_269", G = "_itemText_16bp2_314", P = "_itemIndicator_16bp2_275", j = "_separator_16bp2_345", B = "_scrollArrow_16bp2_157", k = "_scrollArrowUp_16bp2_385", y = "_scrollArrowDown_16bp2_389", R = "_svgIcon_16bp2_393", r = {
|
|
6
|
+
trigger: d,
|
|
7
|
+
sizeDefault: N,
|
|
8
|
+
sizeSm: A,
|
|
9
|
+
variantDefault: D,
|
|
10
|
+
variantFilter: h,
|
|
11
|
+
triggerIcon: z,
|
|
12
|
+
value: x,
|
|
13
13
|
positioner: L,
|
|
14
14
|
popup: T,
|
|
15
15
|
list: U,
|
|
@@ -23,11 +23,11 @@ import './chunks/select.BFwI5rhI.css';const N = "_trigger_163c9_6", A = "_sizeDe
|
|
|
23
23
|
scrollArrowUp: k,
|
|
24
24
|
scrollArrowDown: y,
|
|
25
25
|
svgIcon: R
|
|
26
|
-
}, O =
|
|
26
|
+
}, O = n.Root;
|
|
27
27
|
function Q({ className: t, ...o }) {
|
|
28
|
-
return /* @__PURE__ */ e(
|
|
28
|
+
return /* @__PURE__ */ e(n.Value, { className: s(r.value, t), ...o });
|
|
29
29
|
}
|
|
30
|
-
const $ =
|
|
30
|
+
const $ = I(r.trigger, {
|
|
31
31
|
variants: {
|
|
32
32
|
size: {
|
|
33
33
|
default: r.sizeDefault,
|
|
@@ -50,13 +50,13 @@ const $ = w(r.trigger, {
|
|
|
50
50
|
variant: "default"
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
function W({ className: t, size: o, variant:
|
|
54
|
-
return /* @__PURE__ */ i(
|
|
53
|
+
function W({ className: t, size: o, variant: c, children: l, ...a }) {
|
|
54
|
+
return /* @__PURE__ */ i(n.Trigger, { className: $({ size: o, variant: c, className: t }), ...a, children: [
|
|
55
55
|
l,
|
|
56
56
|
/* @__PURE__ */ e(
|
|
57
|
-
|
|
57
|
+
n.Icon,
|
|
58
58
|
{
|
|
59
|
-
render: /* @__PURE__ */ e(
|
|
59
|
+
render: /* @__PURE__ */ e(p, { className: s(r.svgIcon, r.triggerIcon) })
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
] });
|
|
@@ -64,69 +64,69 @@ function W({ className: t, size: o, variant: s, children: l, ...a }) {
|
|
|
64
64
|
function X({
|
|
65
65
|
className: t,
|
|
66
66
|
children: o,
|
|
67
|
-
container:
|
|
67
|
+
container: c,
|
|
68
68
|
side: l = "bottom",
|
|
69
69
|
sideOffset: a = 4,
|
|
70
|
-
align:
|
|
71
|
-
alignOffset:
|
|
70
|
+
align: _ = "center",
|
|
71
|
+
alignOffset: u = 0,
|
|
72
72
|
alignItemWithTrigger: m = !0,
|
|
73
73
|
positionMethod: g,
|
|
74
|
-
collisionBoundary:
|
|
75
|
-
collisionPadding:
|
|
76
|
-
...
|
|
74
|
+
collisionBoundary: b,
|
|
75
|
+
collisionPadding: f,
|
|
76
|
+
...v
|
|
77
77
|
}) {
|
|
78
|
-
return /* @__PURE__ */ e(
|
|
79
|
-
|
|
78
|
+
return /* @__PURE__ */ e(n.Portal, { container: c, children: /* @__PURE__ */ e(
|
|
79
|
+
n.Positioner,
|
|
80
80
|
{
|
|
81
81
|
side: l,
|
|
82
82
|
sideOffset: a,
|
|
83
|
-
align:
|
|
84
|
-
alignOffset:
|
|
83
|
+
align: _,
|
|
84
|
+
alignOffset: u,
|
|
85
85
|
alignItemWithTrigger: m,
|
|
86
86
|
positionMethod: g,
|
|
87
|
-
collisionBoundary:
|
|
88
|
-
collisionPadding:
|
|
87
|
+
collisionBoundary: b,
|
|
88
|
+
collisionPadding: f,
|
|
89
89
|
className: r.positioner,
|
|
90
|
-
children: /* @__PURE__ */ i(
|
|
90
|
+
children: /* @__PURE__ */ i(n.Popup, { className: s(r.popup, t), ...v, children: [
|
|
91
91
|
/* @__PURE__ */ e(q, {}),
|
|
92
|
-
/* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e(n.List, { className: r.list, children: o }),
|
|
93
93
|
/* @__PURE__ */ e(E, {})
|
|
94
94
|
] })
|
|
95
95
|
}
|
|
96
96
|
) });
|
|
97
97
|
}
|
|
98
98
|
function Y({ className: t, ...o }) {
|
|
99
|
-
return /* @__PURE__ */ e(
|
|
99
|
+
return /* @__PURE__ */ e(n.Group, { className: s(r.group, t), ...o });
|
|
100
100
|
}
|
|
101
101
|
function Z({ className: t, ...o }) {
|
|
102
|
-
return /* @__PURE__ */ e(
|
|
102
|
+
return /* @__PURE__ */ e(n.GroupLabel, { className: s(r.groupLabel, t), ...o });
|
|
103
103
|
}
|
|
104
|
-
function rr({ className: t, children: o, ...
|
|
105
|
-
return /* @__PURE__ */ i(
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
104
|
+
function rr({ className: t, children: o, ...c }) {
|
|
105
|
+
return /* @__PURE__ */ i(n.Item, { className: s(r.item, t), ...c, children: [
|
|
106
|
+
/* @__PURE__ */ e(n.ItemText, { className: r.itemText, children: o }),
|
|
107
|
+
/* @__PURE__ */ e(n.ItemIndicator, { render: /* @__PURE__ */ e("span", { className: r.itemIndicator }), children: /* @__PURE__ */ e(w, { className: r.svgIcon }) })
|
|
108
108
|
] });
|
|
109
109
|
}
|
|
110
110
|
function er({ className: t, ...o }) {
|
|
111
|
-
return /* @__PURE__ */ e(
|
|
111
|
+
return /* @__PURE__ */ e(n.Separator, { className: s(r.separator, t), ...o });
|
|
112
112
|
}
|
|
113
113
|
function q({ className: t, ...o }) {
|
|
114
114
|
return /* @__PURE__ */ e(
|
|
115
|
-
|
|
115
|
+
n.ScrollUpArrow,
|
|
116
116
|
{
|
|
117
|
-
className:
|
|
117
|
+
className: s(r.scrollArrow, r.scrollArrowUp, t),
|
|
118
118
|
...o,
|
|
119
|
-
children: /* @__PURE__ */ e(
|
|
119
|
+
children: /* @__PURE__ */ e(S, { className: r.svgIcon })
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
function E({ className: t, ...o }) {
|
|
124
124
|
return /* @__PURE__ */ e(
|
|
125
|
-
|
|
125
|
+
n.ScrollDownArrow,
|
|
126
126
|
{
|
|
127
|
-
className:
|
|
127
|
+
className: s(r.scrollArrow, r.scrollArrowDown, t),
|
|
128
128
|
...o,
|
|
129
|
-
children: /* @__PURE__ */ e(
|
|
129
|
+
children: /* @__PURE__ */ e(p, { className: r.svgIcon })
|
|
130
130
|
}
|
|
131
131
|
);
|
|
132
132
|
}
|
package/dist/sidebar.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
2
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
3
3
|
import { mergeProps as b } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender as S } from "@base-ui/react/use-render";
|
|
5
|
-
import { cx as s, cva as
|
|
6
|
-
import { PanelLeftIcon as
|
|
7
|
-
import { useState as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Input as
|
|
10
|
-
import { Separator as
|
|
11
|
-
import { Sheet as
|
|
12
|
-
import { Skeleton as
|
|
5
|
+
import { cx as s, cva as y } from "class-variance-authority";
|
|
6
|
+
import { PanelLeftIcon as E } from "lucide-react";
|
|
7
|
+
import { useState as N, useEffect as w, useId as L, useCallback as A, useMemo as C, useContext as R, createContext as H } from "react";
|
|
8
|
+
import { Button as K } from "./button.js";
|
|
9
|
+
import { Input as P } from "./input.js";
|
|
10
|
+
import { Separator as $ } from "./separator.js";
|
|
11
|
+
import { Sheet as G, SheetContent as V, SheetHeader as W, SheetTitle as j, SheetDescription as F } from "./sheet.js";
|
|
12
|
+
import { Skeleton as z } from "./skeleton.js";
|
|
13
13
|
import { TooltipTrigger as U, Tooltip as Q, TooltipContent as X, TooltipProvider as Y } from "./tooltip.js";
|
|
14
|
-
import './chunks/sidebar.
|
|
14
|
+
import './chunks/sidebar.Dw_e0Jqw.css';const q = 768;
|
|
15
15
|
function J(e = q) {
|
|
16
|
-
const [n, r] =
|
|
17
|
-
return
|
|
16
|
+
const [n, r] = N(!1);
|
|
17
|
+
return w(() => {
|
|
18
18
|
const i = window.matchMedia(`(max-width: ${e - 1}px)`), a = () => r(window.innerWidth < e);
|
|
19
19
|
return i.addEventListener("change", a), a(), () => i.removeEventListener("change", a);
|
|
20
20
|
}, [e]), n;
|
|
21
21
|
}
|
|
22
|
-
const Z = "
|
|
22
|
+
const Z = "_wrapper_d26kh_33", ee = "_none_d26kh_74", ne = "_root_d26kh_14", te = "_gap_d26kh_116", oe = "_container_d26kh_112", re = "_inner_d26kh_238", ae = "_mobileContent_d26kh_81", ie = "_mobileInner_d26kh_276", se = "_srOnly_d26kh_288", ue = "_triggerIcon_d26kh_303", ce = "_rail_d26kh_308", de = "_inset_d26kh_406", le = "_input_d26kh_449", me = "_separator_d26kh_469", _e = "_header_d26kh_493", be = "_footer_d26kh_494", Se = "_content_d26kh_501", fe = "_group_d26kh_528", he = "_groupLabel_d26kh_538", pe = "_groupAction_d26kh_579", ge = "_groupContent_d26kh_615", ke = "_menu_d26kh_640", ve = "_menuItem_d26kh_651", Ie = "_menuButton_d26kh_659", Ne = "_menuAction_d26kh_675", we = "_menuBadge_d26kh_708", Me = "_variantDefault_d26kh_761", Be = "_variantOutline_d26kh_767", Te = "_sizeDefault_d26kh_758", Ae = "_sizeSm_d26kh_783", ze = "_sizeLg_d26kh_798", ye = "_menuActionShowOnHover_d26kh_903", De = "_menuSkeleton_d26kh_955", Oe = "_menuSkeletonIcon_d26kh_965", xe = "_menuSkeletonText_d26kh_972", Ee = "_menuSub_d26kh_1003", Le = "_menuSubItem_d26kh_1016", Ce = "_menuSubButton_d26kh_1026", Re = "_subSizeSm_d26kh_1088", He = "_subSizeMd_d26kh_1093", Ke = "_contained_d26kh_1122", t = {
|
|
23
23
|
wrapper: Z,
|
|
24
24
|
none: ee,
|
|
25
25
|
root: ne,
|
|
@@ -38,42 +38,42 @@ const Z = "_wrapper_eykjd_33", ee = "_none_eykjd_74", ne = "_root_eykjd_14", te
|
|
|
38
38
|
footer: be,
|
|
39
39
|
content: Se,
|
|
40
40
|
group: fe,
|
|
41
|
-
groupLabel:
|
|
42
|
-
groupAction:
|
|
43
|
-
groupContent:
|
|
41
|
+
groupLabel: he,
|
|
42
|
+
groupAction: pe,
|
|
43
|
+
groupContent: ge,
|
|
44
44
|
menu: ke,
|
|
45
|
-
menuItem:
|
|
46
|
-
menuButton:
|
|
47
|
-
menuAction:
|
|
48
|
-
menuBadge:
|
|
49
|
-
variantDefault:
|
|
50
|
-
variantOutline:
|
|
51
|
-
sizeDefault:
|
|
52
|
-
sizeSm:
|
|
53
|
-
sizeLg:
|
|
54
|
-
menuActionShowOnHover:
|
|
55
|
-
menuSkeleton:
|
|
56
|
-
menuSkeletonIcon:
|
|
57
|
-
menuSkeletonText:
|
|
58
|
-
menuSub:
|
|
59
|
-
menuSubItem:
|
|
60
|
-
menuSubButton:
|
|
61
|
-
subSizeSm:
|
|
62
|
-
subSizeMd:
|
|
63
|
-
contained:
|
|
64
|
-
},
|
|
65
|
-
function
|
|
45
|
+
menuItem: ve,
|
|
46
|
+
menuButton: Ie,
|
|
47
|
+
menuAction: Ne,
|
|
48
|
+
menuBadge: we,
|
|
49
|
+
variantDefault: Me,
|
|
50
|
+
variantOutline: Be,
|
|
51
|
+
sizeDefault: Te,
|
|
52
|
+
sizeSm: Ae,
|
|
53
|
+
sizeLg: ze,
|
|
54
|
+
menuActionShowOnHover: ye,
|
|
55
|
+
menuSkeleton: De,
|
|
56
|
+
menuSkeletonIcon: Oe,
|
|
57
|
+
menuSkeletonText: xe,
|
|
58
|
+
menuSub: Ee,
|
|
59
|
+
menuSubItem: Le,
|
|
60
|
+
menuSubButton: Ce,
|
|
61
|
+
subSizeSm: Re,
|
|
62
|
+
subSizeMd: He,
|
|
63
|
+
contained: Ke
|
|
64
|
+
}, D = "sidebar_state", Pe = 3600 * 24 * 7, $e = "16rem", Ge = "18rem", Ve = "3rem", We = "b";
|
|
65
|
+
function je(e) {
|
|
66
66
|
if (typeof document > "u")
|
|
67
67
|
return e;
|
|
68
|
-
const n = document.cookie.match(new RegExp(`(?:^|; )${
|
|
68
|
+
const n = document.cookie.match(new RegExp(`(?:^|; )${D}=([^;]*)`));
|
|
69
69
|
return n ? n[1] === "true" : e;
|
|
70
70
|
}
|
|
71
71
|
function Fe(e) {
|
|
72
|
-
typeof document > "u" || (document.cookie = `${
|
|
72
|
+
typeof document > "u" || (document.cookie = `${D}=${e}; path=/; max-age=${Pe}`);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
function
|
|
76
|
-
const e =
|
|
74
|
+
const O = H(null);
|
|
75
|
+
function I() {
|
|
76
|
+
const e = R(O);
|
|
77
77
|
if (!e)
|
|
78
78
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
79
79
|
return e;
|
|
@@ -88,37 +88,37 @@ function cn({
|
|
|
88
88
|
children: f,
|
|
89
89
|
..._
|
|
90
90
|
}) {
|
|
91
|
-
const d = J(), [l,
|
|
92
|
-
|
|
93
|
-
e !== void 0 || n ||
|
|
91
|
+
const d = J(), [l, h] = N(!1), [M, B] = N(e ?? !0), p = r ?? M;
|
|
92
|
+
w(() => {
|
|
93
|
+
e !== void 0 || n || B(je(!0));
|
|
94
94
|
}, [e, n]);
|
|
95
|
-
const k =
|
|
95
|
+
const k = A(
|
|
96
96
|
(u) => {
|
|
97
|
-
const m = typeof u == "function" ? u(
|
|
98
|
-
i == null || i(m),
|
|
97
|
+
const m = typeof u == "function" ? u(p) : u;
|
|
98
|
+
i == null || i(m), B(m), n || Fe(m);
|
|
99
99
|
},
|
|
100
|
-
[
|
|
101
|
-
),
|
|
102
|
-
d ?
|
|
100
|
+
[p, i, n]
|
|
101
|
+
), v = A(() => {
|
|
102
|
+
d ? h((u) => !u) : k((u) => !u);
|
|
103
103
|
}, [d, k]);
|
|
104
|
-
|
|
104
|
+
w(() => {
|
|
105
105
|
if (n)
|
|
106
106
|
return;
|
|
107
107
|
function u(m) {
|
|
108
|
-
m.key ===
|
|
108
|
+
m.key === We && (m.metaKey || m.ctrlKey) && (m.preventDefault(), v());
|
|
109
109
|
}
|
|
110
110
|
return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
|
|
111
|
-
}, [
|
|
112
|
-
const
|
|
113
|
-
() => ({ state:
|
|
114
|
-
[
|
|
111
|
+
}, [v, n]);
|
|
112
|
+
const T = p ? "expanded" : "collapsed", x = C(
|
|
113
|
+
() => ({ state: T, open: p, setOpen: k, openMobile: l, setOpenMobile: h, isMobile: d, toggleSidebar: v }),
|
|
114
|
+
[T, p, k, l, d, v]
|
|
115
115
|
);
|
|
116
|
-
return /* @__PURE__ */ o(
|
|
116
|
+
return /* @__PURE__ */ o(O.Provider, { value: x, children: /* @__PURE__ */ o(Y, { delay: 0, children: /* @__PURE__ */ o(
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
119
119
|
style: {
|
|
120
|
-
"--sidebar-width":
|
|
121
|
-
"--sidebar-width-icon":
|
|
120
|
+
"--sidebar-width": $e,
|
|
121
|
+
"--sidebar-width-icon": Ve,
|
|
122
122
|
...c
|
|
123
123
|
},
|
|
124
124
|
className: s(t.wrapper, n && t.contained, a),
|
|
@@ -135,24 +135,24 @@ function dn({
|
|
|
135
135
|
children: a,
|
|
136
136
|
...c
|
|
137
137
|
}) {
|
|
138
|
-
const { isMobile: f, state: _, openMobile: d, setOpenMobile: l } =
|
|
139
|
-
return r === "none" ? /* @__PURE__ */ o("div", { className: s(t.none, i), ...c, children: a }) : f ? /* @__PURE__ */ o(
|
|
140
|
-
|
|
138
|
+
const { isMobile: f, state: _, openMobile: d, setOpenMobile: l } = I();
|
|
139
|
+
return r === "none" ? /* @__PURE__ */ o("div", { className: s(t.none, i), ...c, children: a }) : f ? /* @__PURE__ */ o(G, { open: d, onOpenChange: l, children: /* @__PURE__ */ g(
|
|
140
|
+
V,
|
|
141
141
|
{
|
|
142
142
|
side: e,
|
|
143
143
|
showCloseButton: !1,
|
|
144
144
|
className: s(t.mobileContent, i),
|
|
145
|
-
style: { "--sidebar-width":
|
|
145
|
+
style: { "--sidebar-width": Ge },
|
|
146
146
|
...c,
|
|
147
147
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */ o(
|
|
148
|
+
/* @__PURE__ */ g(W, { className: t.srOnly, children: [
|
|
149
|
+
/* @__PURE__ */ o(j, { children: "Sidebar" }),
|
|
150
150
|
/* @__PURE__ */ o(F, { children: "Displays the mobile sidebar." })
|
|
151
151
|
] }),
|
|
152
152
|
/* @__PURE__ */ o("div", { className: t.mobileInner, children: a })
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
|
-
) }) : /* @__PURE__ */
|
|
155
|
+
) }) : /* @__PURE__ */ g(
|
|
156
156
|
"div",
|
|
157
157
|
{
|
|
158
158
|
className: t.root,
|
|
@@ -168,14 +168,14 @@ function dn({
|
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
170
|
function ln({ className: e, onClick: n, label: r = "Toggle Sidebar", ...i }) {
|
|
171
|
-
const { toggleSidebar: a } =
|
|
171
|
+
const { toggleSidebar: a } = I();
|
|
172
172
|
return /* @__PURE__ */ o(
|
|
173
|
-
|
|
173
|
+
K,
|
|
174
174
|
{
|
|
175
175
|
variant: "ghost",
|
|
176
176
|
size: "sm",
|
|
177
177
|
className: e,
|
|
178
|
-
icon: /* @__PURE__ */ o(
|
|
178
|
+
icon: /* @__PURE__ */ o(E, { className: t.triggerIcon }),
|
|
179
179
|
"aria-label": r,
|
|
180
180
|
onClick: (c) => {
|
|
181
181
|
n == null || n(c), a();
|
|
@@ -185,7 +185,7 @@ function ln({ className: e, onClick: n, label: r = "Toggle Sidebar", ...i }) {
|
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
function mn({ className: e, onClick: n, ...r }) {
|
|
188
|
-
const { toggleSidebar: i } =
|
|
188
|
+
const { toggleSidebar: i } = I();
|
|
189
189
|
return /* @__PURE__ */ o(
|
|
190
190
|
"button",
|
|
191
191
|
{
|
|
@@ -209,7 +209,7 @@ function _n({ className: e, render: n, ...r }) {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
function bn({ className: e, ...n }) {
|
|
212
|
-
return /* @__PURE__ */ o(
|
|
212
|
+
return /* @__PURE__ */ o(P, { className: s(t.input, e), ...n });
|
|
213
213
|
}
|
|
214
214
|
function Sn({ className: e, ...n }) {
|
|
215
215
|
return /* @__PURE__ */ o("div", { className: s(t.header, e), ...n });
|
|
@@ -217,13 +217,13 @@ function Sn({ className: e, ...n }) {
|
|
|
217
217
|
function fn({ className: e, ...n }) {
|
|
218
218
|
return /* @__PURE__ */ o("div", { className: s(t.footer, e), ...n });
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */ o(
|
|
220
|
+
function hn({ className: e, ...n }) {
|
|
221
|
+
return /* @__PURE__ */ o($, { className: s(t.separator, e), ...n });
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function pn({ className: e, ...n }) {
|
|
224
224
|
return /* @__PURE__ */ o("div", { className: s(t.content, e), ...n });
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function gn({ className: e, ...n }) {
|
|
227
227
|
return /* @__PURE__ */ o("div", { className: s(t.group, e), ...n });
|
|
228
228
|
}
|
|
229
229
|
function kn({ className: e, render: n, ...r }) {
|
|
@@ -233,23 +233,23 @@ function kn({ className: e, render: n, ...r }) {
|
|
|
233
233
|
props: b({ className: s(t.groupLabel, e) }, r)
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function vn({ className: e, render: n, ...r }) {
|
|
237
237
|
return S({
|
|
238
238
|
defaultTagName: "button",
|
|
239
239
|
render: n,
|
|
240
240
|
props: b({ className: s(t.groupAction, e) }, r)
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function In({ className: e, ...n }) {
|
|
244
244
|
return /* @__PURE__ */ o("div", { className: s(t.groupContent, e), ...n });
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Nn({ className: e, ...n }) {
|
|
247
247
|
return /* @__PURE__ */ o("ul", { className: s(t.menu, e), ...n });
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function wn({ className: e, ...n }) {
|
|
250
250
|
return /* @__PURE__ */ o("li", { className: s(t.menuItem, e), ...n });
|
|
251
251
|
}
|
|
252
|
-
const Ue =
|
|
252
|
+
const Ue = y(t.menuButton, {
|
|
253
253
|
variants: {
|
|
254
254
|
variant: {
|
|
255
255
|
default: t.variantDefault,
|
|
@@ -266,7 +266,7 @@ const Ue = A(t.menuButton, {
|
|
|
266
266
|
size: "default"
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
|
-
function
|
|
269
|
+
function Mn({
|
|
270
270
|
render: e,
|
|
271
271
|
isActive: n = !1,
|
|
272
272
|
variant: r,
|
|
@@ -275,7 +275,7 @@ function Nn({
|
|
|
275
275
|
className: c,
|
|
276
276
|
...f
|
|
277
277
|
}) {
|
|
278
|
-
const { isMobile: _, state: d } =
|
|
278
|
+
const { isMobile: _, state: d } = I(), l = a != null && d === "collapsed" && !_, h = S({
|
|
279
279
|
defaultTagName: "button",
|
|
280
280
|
render: l ? /* @__PURE__ */ o(U, { render: e }) : e,
|
|
281
281
|
// `state`/`stateAttributesMapping` (not a plain `data-active` prop,
|
|
@@ -298,12 +298,12 @@ function Nn({
|
|
|
298
298
|
f
|
|
299
299
|
)
|
|
300
300
|
});
|
|
301
|
-
return l ? /* @__PURE__ */
|
|
302
|
-
|
|
301
|
+
return l ? /* @__PURE__ */ g(Q, { children: [
|
|
302
|
+
h,
|
|
303
303
|
/* @__PURE__ */ o(X, { side: "right", align: "center", ...typeof a == "string" ? { children: a } : a })
|
|
304
|
-
] }) :
|
|
304
|
+
] }) : h;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Bn({ className: e, render: n, showOnHover: r = !1, ...i }) {
|
|
307
307
|
return S({
|
|
308
308
|
defaultTagName: "button",
|
|
309
309
|
render: n,
|
|
@@ -313,7 +313,7 @@ function wn({ className: e, render: n, showOnHover: r = !1, ...i }) {
|
|
|
313
313
|
)
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Tn({ className: e, ...n }) {
|
|
317
317
|
return /* @__PURE__ */ o("div", { className: s(t.menuBadge, e), ...n });
|
|
318
318
|
}
|
|
319
319
|
function Qe(e) {
|
|
@@ -322,12 +322,12 @@ function Qe(e) {
|
|
|
322
322
|
n ^= e.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
323
323
|
return 50 + Math.abs(n) % 40;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
const a = `${Qe(
|
|
327
|
-
return /* @__PURE__ */
|
|
328
|
-
n && /* @__PURE__ */ o(
|
|
325
|
+
function An({ className: e, showIcon: n = !1, style: r, ...i }) {
|
|
326
|
+
const a = `${Qe(L())}%`;
|
|
327
|
+
return /* @__PURE__ */ g("div", { className: s(t.menuSkeleton, e), style: r, ...i, children: [
|
|
328
|
+
n && /* @__PURE__ */ o(z, { className: t.menuSkeletonIcon }),
|
|
329
329
|
/* @__PURE__ */ o(
|
|
330
|
-
|
|
330
|
+
z,
|
|
331
331
|
{
|
|
332
332
|
className: t.menuSkeletonText,
|
|
333
333
|
style: { "--skeleton-width": a }
|
|
@@ -335,13 +335,13 @@ function Bn({ className: e, showIcon: n = !1, style: r, ...i }) {
|
|
|
335
335
|
)
|
|
336
336
|
] });
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function zn({ className: e, ...n }) {
|
|
339
339
|
return /* @__PURE__ */ o("ul", { className: s(t.menuSub, e), ...n });
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function yn({ className: e, ...n }) {
|
|
342
342
|
return /* @__PURE__ */ o("li", { className: s(t.menuSubItem, e), ...n });
|
|
343
343
|
}
|
|
344
|
-
const Xe =
|
|
344
|
+
const Xe = y(t.menuSubButton, {
|
|
345
345
|
variants: {
|
|
346
346
|
size: {
|
|
347
347
|
sm: t.subSizeSm,
|
|
@@ -352,7 +352,7 @@ const Xe = A(t.menuSubButton, {
|
|
|
352
352
|
size: "md"
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
|
-
function
|
|
355
|
+
function Dn({
|
|
356
356
|
render: e,
|
|
357
357
|
size: n,
|
|
358
358
|
isActive: r = !1,
|
|
@@ -372,29 +372,29 @@ function zn({
|
|
|
372
372
|
}
|
|
373
373
|
export {
|
|
374
374
|
dn as Sidebar,
|
|
375
|
-
|
|
375
|
+
pn as SidebarContent,
|
|
376
376
|
fn as SidebarFooter,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
gn as SidebarGroup,
|
|
378
|
+
vn as SidebarGroupAction,
|
|
379
|
+
In as SidebarGroupContent,
|
|
380
380
|
kn as SidebarGroupLabel,
|
|
381
381
|
Sn as SidebarHeader,
|
|
382
382
|
bn as SidebarInput,
|
|
383
383
|
_n as SidebarInset,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
384
|
+
Nn as SidebarMenu,
|
|
385
|
+
Bn as SidebarMenuAction,
|
|
386
|
+
Tn as SidebarMenuBadge,
|
|
387
|
+
Mn as SidebarMenuButton,
|
|
388
|
+
wn as SidebarMenuItem,
|
|
389
|
+
An as SidebarMenuSkeleton,
|
|
390
|
+
zn as SidebarMenuSub,
|
|
391
|
+
Dn as SidebarMenuSubButton,
|
|
392
|
+
yn as SidebarMenuSubItem,
|
|
393
393
|
cn as SidebarProvider,
|
|
394
394
|
mn as SidebarRail,
|
|
395
|
-
|
|
395
|
+
hn as SidebarSeparator,
|
|
396
396
|
ln as SidebarTrigger,
|
|
397
397
|
Ue as sidebarMenuButtonVariants,
|
|
398
|
-
|
|
398
|
+
I as useSidebar
|
|
399
399
|
};
|
|
400
400
|
//# sourceMappingURL=sidebar.js.map
|
package/dist/tabs.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as s, jsxs as _ } from "react/jsx-runtime";
|
|
2
2
|
import { Tabs as n } from "@base-ui/react/tabs";
|
|
3
3
|
import { cx as r, cva as l } from "class-variance-authority";
|
|
4
|
-
import './chunks/tabs.
|
|
4
|
+
import './chunks/tabs.BqhiMRUP.css';const u = "_tabs_4zxq0_32", f = "_list_4zxq0_31", z = "_trigger_4zxq0_25", m = "_content_4zxq0_32", d = "_sizeSm_4zxq0_92", v = "_sizeDefault_4zxq0_98", x = "_variantDefault_4zxq0_116", b = "_variantLine_4zxq0_131", g = "_indicator_4zxq0_284", t = {
|
|
5
5
|
tabs: u,
|
|
6
6
|
list: f,
|
|
7
|
-
trigger:
|
|
8
|
-
content:
|
|
9
|
-
sizeSm:
|
|
10
|
-
sizeDefault:
|
|
11
|
-
variantDefault:
|
|
12
|
-
variantLine:
|
|
13
|
-
indicator:
|
|
7
|
+
trigger: z,
|
|
8
|
+
content: m,
|
|
9
|
+
sizeSm: d,
|
|
10
|
+
sizeDefault: v,
|
|
11
|
+
variantDefault: x,
|
|
12
|
+
variantLine: b,
|
|
13
|
+
indicator: g
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function N({ className: a, ...i }) {
|
|
16
16
|
return /* @__PURE__ */ s(n.Root, { className: r(t.tabs, a), ...i });
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const q = l(t.list, {
|
|
19
19
|
variants: {
|
|
20
20
|
variant: {
|
|
21
21
|
default: t.variantDefault,
|
|
@@ -31,8 +31,8 @@ const D = l(t.list, {
|
|
|
31
31
|
size: "default"
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */ _(n.List, { className:
|
|
34
|
+
function p({ className: a, variant: i, size: e, children: o, ...c }) {
|
|
35
|
+
return /* @__PURE__ */ _(n.List, { className: q({ variant: i, size: e, className: a }), ...c, children: [
|
|
36
36
|
o,
|
|
37
37
|
/* @__PURE__ */ s(n.Indicator, { className: t.indicator })
|
|
38
38
|
] });
|
|
@@ -51,9 +51,9 @@ function j({ className: a, animate: i = !0, ...e }) {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
N as Tabs,
|
|
55
55
|
j as TabsContent,
|
|
56
|
-
|
|
56
|
+
p as TabsList,
|
|
57
57
|
S as TabsTrigger
|
|
58
58
|
};
|
|
59
59
|
//# sourceMappingURL=tabs.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gears-frontx/ui-kit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Standard React component base for FrontX templates - Base UI behavior, CSS Modules styling on semantic tokens, CVA variants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
"test:unit": "vitest --run --passWithNoTests=false",
|
|
38
38
|
"test:unit:watch": "vitest --watch",
|
|
39
39
|
"test:consumer": "bash scripts/verify-consumer.sh",
|
|
40
|
-
"type-check:demo": "tsc -p demo/tsconfig.json",
|
|
41
|
-
"predemo": "npm run build",
|
|
42
|
-
"demo": "vite demo",
|
|
43
40
|
"contracts:compile": "tsx scripts/contracts/compile.ts",
|
|
44
41
|
"contracts:check": "tsx scripts/contracts/check.ts",
|
|
45
42
|
"contracts:enrollment": "tsx scripts/contracts/check.ts enrollment"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._backdrop_135ow_6{position:fixed;top:0;right:0;bottom:0;left:0;isolation:isolate;z-index:50;background-color:var(--overlay-modal);transition:opacity .1s ease}._backdrop_135ow_6[data-starting-style],._backdrop_135ow_6[data-ending-style]{opacity:0}._popup_135ow_22{box-sizing:border-box;position:fixed;top:50%;left:50%;isolation:isolate;z-index:50;display:grid;grid-template-columns:minmax(0,1fr);width:100%;max-width:calc(100% - var(--space-8));max-height:calc(100% - var(--space-8));overflow-y:auto;gap:var(--space-6);padding:0;border:var(--border-width) solid var(--popover-border);border-radius:var(--radius-xl);background-color:var(--popover);color:var(--popover-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height);outline:none;transform:translate(-50%,-50%);box-shadow:var(--popover-shadow);transition:opacity .1s ease,transform .1s ease}@media(prefers-reduced-motion:reduce){._popup_135ow_22{transition:opacity .1s ease}}@media(min-width:640px){._popup_135ow_22{max-width:24rem}._popup_135ow_22[data-size=lg]{max-width:36rem}}._popup_135ow_22[data-starting-style],._popup_135ow_22[data-ending-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}._popup_135ow_22>:where(*:not(._closeButton_135ow_164)){box-sizing:border-box;padding-inline:var(--space-6)}._popup_135ow_22>:where(*:not(._closeButton_135ow_164):first-child){padding-block-start:var(--space-6)}._popup_135ow_22>:where(*:not(._closeButton_135ow_164):last-child){padding-block-end:var(--space-6)}._popup_135ow_22>:where(*:has(+._closeButton_135ow_164)){padding-block-end:var(--space-6)}._closeButton_135ow_164{position:absolute;top:var(--space-4);right:var(--space-4);z-index:2}._header_135ow_152{position:sticky;top:0;z-index:1;display:flex;flex-direction:column;gap:var(--space-2);background-color:var(--popover)}._footer_135ow_152{position:sticky;bottom:0;z-index:1;display:flex;flex-direction:column-reverse;gap:var(--space-2);background-color:var(--popover)}@media(min-width:640px){._footer_135ow_152{flex-direction:row;justify-content:flex-end}}._popup_135ow_22 form>._header_135ow_152{margin-bottom:var(--space-6)}._popup_135ow_22 form>._footer_135ow_152{margin-top:var(--space-6)}._title_135ow_274{margin:0;font-size:var(--text-heading-2-size);line-height:var(--text-heading-2-line-height);font-weight:var(--text-heading-2-weight);letter-spacing:var(--text-heading-2-tracking)}._description_135ow_282{color:var(--muted-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._svgIcon_135ow_289{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}
|