@dimasbaguspm/versaur 0.0.56 → 0.0.58
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/js/desktop-breakpoint-CuSom-sN.js +47 -0
- package/dist/js/feedbacks/index.js +1 -1
- package/dist/js/forms/index.js +1 -1
- package/dist/js/helpers/index.js +14 -0
- package/dist/js/{image-rectangle-K9jmTTED.js → image-rectangle-CCvXv24a.js} +819 -926
- package/dist/js/{index-DOdDlCoL.js → index-BDtz_hQY.js} +520 -802
- package/dist/js/index.js +76 -64
- package/dist/js/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +2 -2
- package/dist/js/providers/index.js +1 -1
- package/dist/js/{skeleton-BNZyaRjo.js → skeleton-BRwIW26B.js} +6 -5
- package/dist/js/{snackbar-DH8jCh2V.js → snackbar-CTq4MLir.js} +14 -13
- package/dist/js/{tabs-I4n6MLAv.js → tabs-BQs53hHL.js} +59 -50
- package/dist/js/{time-picker-input-BgbyllDK.js → time-picker-input-Disd231b.js} +24 -23
- package/dist/js/{tooltip-nZW9TUz3.js → tooltip-Dpx3TpR6.js} +211 -205
- package/dist/js/{top-bar-Dqje-W3G.js → top-bar-DEesTo9i.js} +242 -197
- package/dist/js/{use-snackbars-Cou8L41F.js → use-snackbars-B6lnVjrX.js} +14 -13
- package/dist/types/helpers/index.d.ts +1 -0
- package/dist/types/helpers/match-media/built-in/components/desktop-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/index.d.ts +3 -0
- package/dist/types/helpers/match-media/built-in/components/mobile-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/tablet-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/hooks/index.d.ts +3 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-desktop-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-mobile-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-tablet-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/index.d.ts +2 -0
- package/dist/types/helpers/match-media/constants.d.ts +7 -0
- package/dist/types/helpers/match-media/index.d.ts +4 -0
- package/dist/types/helpers/match-media/match-media.d.ts +25 -0
- package/dist/types/helpers/match-media/test-helpers.d.ts +21 -0
- package/dist/types/helpers/match-media/use-match-media.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layouts/badge-group/types.d.ts +5 -0
- package/dist/types/layouts/button-group/types.d.ts +5 -0
- package/dist/types/layouts/filter-chip-group/types.d.ts +5 -0
- package/dist/types/layouts/page-header/types.d.ts +14 -0
- package/dist/types/navigation/tabs/types.d.ts +4 -0
- package/dist/types/overlays/menu/types.d.ts +8 -8
- package/dist/types/primitive/button-menu/types.d.ts +1 -1
- package/dist/types/primitive/button-menu-icon/types.d.ts +1 -1
- package/dist/utils/enforce-subpath-import.js +3 -1
- package/package.json +5 -1
- package/dist/types/overlays/menu/use-menu.d.ts +0 -15
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { c as d, a as f } from "./index-BDtz_hQY.js";
|
|
2
3
|
import { forwardRef as m, createContext as p, useContext as h, useState as g, useLayoutEffect as j, useRef as T } from "react";
|
|
3
|
-
import { I as w } from "./image-rectangle-
|
|
4
|
-
import "./snackbar-
|
|
4
|
+
import { I as w } from "./image-rectangle-CCvXv24a.js";
|
|
5
|
+
import "./snackbar-CTq4MLir.js";
|
|
5
6
|
import { ChevronRight as y } from "lucide-react";
|
|
6
|
-
const I =
|
|
7
|
+
const I = d(
|
|
7
8
|
"flex items-center gap-2 text-sm text-gray-500"
|
|
8
|
-
), C =
|
|
9
|
+
), C = d(
|
|
9
10
|
"inline-flex items-center gap-1 transition-colors hover:underline cursor-pointer"
|
|
10
|
-
), N = m(function({ children: s, icon: n, isCurrent: a, className: r, ...
|
|
11
|
+
), N = m(function({ children: s, icon: n, isCurrent: a, className: r, ...o }, i) {
|
|
11
12
|
return /* @__PURE__ */ t.jsx("li", { className: "flex items-center", children: /* @__PURE__ */ t.jsxs(
|
|
12
13
|
"a",
|
|
13
14
|
{
|
|
14
|
-
ref:
|
|
15
|
+
ref: i,
|
|
15
16
|
"aria-current": a ? "page" : void 0,
|
|
16
17
|
tabIndex: a ? -1 : 0,
|
|
17
|
-
className:
|
|
18
|
-
...
|
|
18
|
+
className: f(C(), r),
|
|
19
|
+
...o,
|
|
19
20
|
children: [
|
|
20
21
|
n && /* @__PURE__ */ t.jsx("span", { className: "mr-1 inline-flex", children: n }),
|
|
21
22
|
s
|
|
@@ -30,20 +31,20 @@ const R = m(
|
|
|
30
31
|
function({ children: s, "aria-label": n = "Breadcrumb", ...a }, r) {
|
|
31
32
|
return /* @__PURE__ */ t.jsx("nav", { "aria-label": n, ...a, children: /* @__PURE__ */ t.jsx("ol", { ref: r, className: I(), children: s }) });
|
|
32
33
|
}
|
|
33
|
-
),
|
|
34
|
+
), G = Object.assign(R, {
|
|
34
35
|
Item: N,
|
|
35
36
|
Separator: B
|
|
36
|
-
}),
|
|
37
|
-
const e = h(
|
|
37
|
+
}), x = p(null), S = () => {
|
|
38
|
+
const e = h(x);
|
|
38
39
|
if (!e)
|
|
39
40
|
throw new Error("useTabsContext must be used within a TabsProvider");
|
|
40
41
|
return e;
|
|
41
|
-
}, E =
|
|
42
|
+
}, E = d(
|
|
42
43
|
[
|
|
43
|
-
"
|
|
44
|
+
"flex items-center justify-center",
|
|
44
45
|
"px-4 py-2",
|
|
45
46
|
"text-sm font-normal",
|
|
46
|
-
"text-foreground",
|
|
47
|
+
"text-foreground text-center",
|
|
47
48
|
"transition-all duration-200",
|
|
48
49
|
"border-b-2 border-transparent",
|
|
49
50
|
"select-none",
|
|
@@ -63,20 +64,25 @@ const R = m(
|
|
|
63
64
|
active: {
|
|
64
65
|
true: "text-primary font-medium",
|
|
65
66
|
false: "hover:text-primary"
|
|
67
|
+
},
|
|
68
|
+
fullWidth: {
|
|
69
|
+
true: "flex-1 w-full",
|
|
70
|
+
false: ""
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
defaultVariants: {
|
|
69
|
-
active: !1
|
|
74
|
+
active: !1,
|
|
75
|
+
fullWidth: !1
|
|
70
76
|
}
|
|
71
77
|
}
|
|
72
|
-
), L =
|
|
78
|
+
), L = d([
|
|
73
79
|
"flex flex-row w-full",
|
|
74
80
|
"border-b border-border",
|
|
75
81
|
"overflow-x-auto overflow-y-visible",
|
|
76
82
|
"whitespace-nowrap",
|
|
77
83
|
// Ensure focus rings with offset are not cropped (2px ring + 2px offset = 4px needed)
|
|
78
84
|
"py-1"
|
|
79
|
-
]), V =
|
|
85
|
+
]), V = d([
|
|
80
86
|
"absolute bottom-0",
|
|
81
87
|
"h-0.5 rounded",
|
|
82
88
|
"bg-primary",
|
|
@@ -89,10 +95,10 @@ const R = m(
|
|
|
89
95
|
onClick: a,
|
|
90
96
|
...r
|
|
91
97
|
}) => {
|
|
92
|
-
const { activeTab:
|
|
93
|
-
u.preventDefault(),
|
|
98
|
+
const { activeTab: o, setActiveTab: i, fullWidth: l } = S(), c = o === e, b = (u) => {
|
|
99
|
+
u.preventDefault(), i(e), a?.(u);
|
|
94
100
|
};
|
|
95
|
-
return /* @__PURE__ */ t.jsx("li", { role: "presentation", children: /* @__PURE__ */ t.jsx(
|
|
101
|
+
return /* @__PURE__ */ t.jsx("li", { role: "presentation", className: l ? "flex-1" : void 0, children: /* @__PURE__ */ t.jsx(
|
|
96
102
|
"a",
|
|
97
103
|
{
|
|
98
104
|
role: "tab",
|
|
@@ -101,13 +107,14 @@ const R = m(
|
|
|
101
107
|
"aria-controls": `tabs-content-${e}`,
|
|
102
108
|
"aria-current": c ? "page" : void 0,
|
|
103
109
|
href: `#${e}`,
|
|
104
|
-
className:
|
|
110
|
+
className: f(
|
|
105
111
|
E({
|
|
106
|
-
active: c
|
|
112
|
+
active: c,
|
|
113
|
+
fullWidth: l
|
|
107
114
|
}),
|
|
108
115
|
n
|
|
109
116
|
),
|
|
110
|
-
onClick:
|
|
117
|
+
onClick: b,
|
|
111
118
|
...r,
|
|
112
119
|
children: s
|
|
113
120
|
}
|
|
@@ -121,7 +128,7 @@ const R = m(
|
|
|
121
128
|
"div",
|
|
122
129
|
{
|
|
123
130
|
"aria-hidden": "true",
|
|
124
|
-
className:
|
|
131
|
+
className: f(V(), n),
|
|
125
132
|
style: {
|
|
126
133
|
left: e,
|
|
127
134
|
width: s
|
|
@@ -129,7 +136,7 @@ const R = m(
|
|
|
129
136
|
...a
|
|
130
137
|
}
|
|
131
138
|
);
|
|
132
|
-
function
|
|
139
|
+
function W(e, s) {
|
|
133
140
|
const [n, a] = g({
|
|
134
141
|
left: 0,
|
|
135
142
|
width: 0
|
|
@@ -137,57 +144,59 @@ function $(e, s) {
|
|
|
137
144
|
return j(() => {
|
|
138
145
|
const r = s.current;
|
|
139
146
|
if (!r) return;
|
|
140
|
-
const
|
|
147
|
+
const o = r.querySelector(
|
|
141
148
|
`a#tabs-trigger-${e}`
|
|
142
149
|
);
|
|
143
|
-
if (!i) return;
|
|
144
|
-
const o = i.parentElement;
|
|
145
150
|
if (!o) return;
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
const i = o.parentElement;
|
|
152
|
+
if (!i) return;
|
|
153
|
+
const l = () => {
|
|
154
|
+
const u = i.offsetLeft - r.scrollLeft, v = i.offsetWidth;
|
|
155
|
+
a({ left: u, width: v });
|
|
149
156
|
};
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
157
|
+
l();
|
|
158
|
+
const c = () => {
|
|
159
|
+
l();
|
|
153
160
|
};
|
|
154
|
-
r.addEventListener("scroll",
|
|
155
|
-
const
|
|
156
|
-
|
|
161
|
+
r.addEventListener("scroll", c, { passive: !0 });
|
|
162
|
+
const b = requestAnimationFrame(() => {
|
|
163
|
+
o.scrollIntoView({
|
|
157
164
|
behavior: "smooth",
|
|
158
165
|
inline: "center",
|
|
159
166
|
block: "nearest"
|
|
160
167
|
});
|
|
161
168
|
});
|
|
162
169
|
return () => {
|
|
163
|
-
cancelAnimationFrame(
|
|
170
|
+
cancelAnimationFrame(b), r.removeEventListener("scroll", c);
|
|
164
171
|
};
|
|
165
172
|
}, [e, s]), n;
|
|
166
173
|
}
|
|
167
|
-
const
|
|
174
|
+
const $ = ({
|
|
168
175
|
value: e,
|
|
169
176
|
onValueChange: s,
|
|
170
177
|
children: n,
|
|
171
178
|
className: a,
|
|
172
|
-
|
|
179
|
+
fullWidth: r = !1,
|
|
180
|
+
...o
|
|
173
181
|
}) => {
|
|
174
182
|
const i = {
|
|
175
183
|
activeTab: e,
|
|
176
|
-
setActiveTab: s
|
|
177
|
-
|
|
178
|
-
|
|
184
|
+
setActiveTab: s,
|
|
185
|
+
fullWidth: r
|
|
186
|
+
}, l = T(null), c = W(e, l);
|
|
187
|
+
return /* @__PURE__ */ t.jsx(x.Provider, { value: i, children: /* @__PURE__ */ t.jsx(
|
|
179
188
|
"nav",
|
|
180
189
|
{
|
|
181
|
-
className:
|
|
190
|
+
className: f("relative w-full", a),
|
|
182
191
|
"aria-label": "Tabs",
|
|
183
|
-
...
|
|
192
|
+
...o,
|
|
184
193
|
children: /* @__PURE__ */ t.jsxs("div", { className: "relative overflow-hidden", children: [
|
|
185
194
|
/* @__PURE__ */ t.jsx(
|
|
186
195
|
"ul",
|
|
187
196
|
{
|
|
188
197
|
role: "tablist",
|
|
189
198
|
className: L(),
|
|
190
|
-
ref:
|
|
199
|
+
ref: l,
|
|
191
200
|
children: n
|
|
192
201
|
}
|
|
193
202
|
),
|
|
@@ -201,10 +210,10 @@ const q = ({
|
|
|
201
210
|
] })
|
|
202
211
|
}
|
|
203
212
|
) });
|
|
204
|
-
},
|
|
213
|
+
}, H = Object.assign($, {
|
|
205
214
|
Trigger: A
|
|
206
215
|
});
|
|
207
216
|
export {
|
|
208
|
-
|
|
209
|
-
|
|
217
|
+
G as B,
|
|
218
|
+
H as T
|
|
210
219
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import m, { createContext as F, useContext as B, useId as A, forwardRef as O, useRef as T, useEffect as ne, useState as se } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { c as C, a as x } from "./index-BDtz_hQY.js";
|
|
4
|
+
import { I as $ } from "./image-rectangle-CCvXv24a.js";
|
|
4
5
|
import { Calendar as oe, MailIcon as ie, Banknote as ce, SearchIcon as le, ChevronDown as de, Clock as ue } from "lucide-react";
|
|
5
|
-
import "./snackbar-
|
|
6
|
+
import "./snackbar-CTq4MLir.js";
|
|
6
7
|
const fe = C("space-y-2", {
|
|
7
8
|
variants: {
|
|
8
9
|
direction: {
|
|
@@ -116,7 +117,7 @@ const K = m.forwardRef(
|
|
|
116
117
|
}
|
|
117
118
|
);
|
|
118
119
|
K.displayName = "CheckboxInput";
|
|
119
|
-
const
|
|
120
|
+
const dt = Object.assign(K, {
|
|
120
121
|
Option: G
|
|
121
122
|
}), _ = F(null), be = () => {
|
|
122
123
|
const t = B(_);
|
|
@@ -234,7 +235,7 @@ const lt = Object.assign(K, {
|
|
|
234
235
|
}
|
|
235
236
|
) });
|
|
236
237
|
}
|
|
237
|
-
),
|
|
238
|
+
), ut = Object.assign(ye, {
|
|
238
239
|
Option: xe
|
|
239
240
|
}), H = F(null), we = () => {
|
|
240
241
|
const t = B(H);
|
|
@@ -357,7 +358,7 @@ const lt = Object.assign(K, {
|
|
|
357
358
|
}
|
|
358
359
|
) });
|
|
359
360
|
}
|
|
360
|
-
),
|
|
361
|
+
), ft = Object.assign(ke, {
|
|
361
362
|
Option: je
|
|
362
363
|
}), Ie = C(
|
|
363
364
|
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:bg-gray-50 text-left",
|
|
@@ -484,7 +485,7 @@ function Ne(t) {
|
|
|
484
485
|
day: "numeric"
|
|
485
486
|
});
|
|
486
487
|
}
|
|
487
|
-
const
|
|
488
|
+
const pt = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatter: n, min: o, max: d, ...l }, c) {
|
|
488
489
|
const i = T(null), u = (b) => {
|
|
489
490
|
i.current = b, typeof c == "function" ? c(b) : c && typeof c == "object" && (c.current = b);
|
|
490
491
|
}, p = () => {
|
|
@@ -621,7 +622,7 @@ const ft = m.forwardRef(function({ value: r = "", onChange: a, label: s, formatt
|
|
|
621
622
|
}
|
|
622
623
|
);
|
|
623
624
|
M.displayName = "TextInput";
|
|
624
|
-
const
|
|
625
|
+
const mt = O(
|
|
625
626
|
(t, r) => /* @__PURE__ */ e.jsx(
|
|
626
627
|
M,
|
|
627
628
|
{
|
|
@@ -847,7 +848,7 @@ function U(t, r = !1) {
|
|
|
847
848
|
}
|
|
848
849
|
return n = n.replace(/\.{2,}/g, "."), (a ? "-" : "") + n;
|
|
849
850
|
}
|
|
850
|
-
const
|
|
851
|
+
const ht = ({
|
|
851
852
|
value: t,
|
|
852
853
|
onChange: r,
|
|
853
854
|
allowNegative: a = !1,
|
|
@@ -1048,9 +1049,9 @@ const mt = ({
|
|
|
1048
1049
|
!f && s && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: s })
|
|
1049
1050
|
] }) });
|
|
1050
1051
|
}
|
|
1051
|
-
),
|
|
1052
|
+
), bt = Object.assign(We, {
|
|
1052
1053
|
Option: Ae
|
|
1053
|
-
}),
|
|
1054
|
+
}), gt = O(
|
|
1054
1055
|
({
|
|
1055
1056
|
autoComplete: t = "off",
|
|
1056
1057
|
spellCheck: r = !1,
|
|
@@ -1176,7 +1177,7 @@ const ee = m.forwardRef(
|
|
|
1176
1177
|
}
|
|
1177
1178
|
);
|
|
1178
1179
|
ee.displayName = "SelectInput";
|
|
1179
|
-
const
|
|
1180
|
+
const xt = Object.assign(ee, {
|
|
1180
1181
|
Option: Y,
|
|
1181
1182
|
OptionGroup: Z
|
|
1182
1183
|
}), Te = C(
|
|
@@ -1630,7 +1631,7 @@ const et = C(
|
|
|
1630
1631
|
}
|
|
1631
1632
|
);
|
|
1632
1633
|
at.displayName = "TextAreaInput";
|
|
1633
|
-
const
|
|
1634
|
+
const yt = O(function(r, a) {
|
|
1634
1635
|
const s = (n) => {
|
|
1635
1636
|
r?.onChange?.(n.target.value);
|
|
1636
1637
|
};
|
|
@@ -1648,21 +1649,21 @@ const xt = O(function(r, a) {
|
|
|
1648
1649
|
);
|
|
1649
1650
|
});
|
|
1650
1651
|
export {
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1652
|
+
dt as C,
|
|
1653
|
+
pt as D,
|
|
1654
|
+
mt as E,
|
|
1654
1655
|
De as P,
|
|
1655
|
-
|
|
1656
|
-
|
|
1656
|
+
bt as R,
|
|
1657
|
+
gt as S,
|
|
1657
1658
|
M as T,
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1659
|
+
ut as a,
|
|
1660
|
+
ft as b,
|
|
1661
|
+
ht as c,
|
|
1662
|
+
xt as d,
|
|
1662
1663
|
Ge as e,
|
|
1663
1664
|
He as f,
|
|
1664
1665
|
Ze as g,
|
|
1665
1666
|
J as h,
|
|
1666
1667
|
at as i,
|
|
1667
|
-
|
|
1668
|
+
yt as j
|
|
1668
1669
|
};
|