@namuna-nur/ui-kit 1.10.4 → 1.10.5
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/lib/shared/shared.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as f from "@radix-ui/react-accordion";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import u from "react";
|
|
5
|
-
import { S as
|
|
5
|
+
import { S as R } from "./assets-icons-2.js";
|
|
6
6
|
import { cn as r } from "../utils/index.js";
|
|
7
7
|
import * as c from "@radix-ui/react-popover";
|
|
8
|
-
import * as
|
|
8
|
+
import * as g from "@radix-ui/react-tabs";
|
|
9
9
|
import "@radix-ui/react-dialog";
|
|
10
|
-
import { ChevronRightIcon as
|
|
10
|
+
import { ChevronRightIcon as T, CheckIcon as C, DotFilledIcon as I, Cross2Icon as P } from "@radix-ui/react-icons";
|
|
11
11
|
import * as d from "@radix-ui/react-toast";
|
|
12
|
-
import { cva as
|
|
13
|
-
import * as
|
|
12
|
+
import { cva as z } from "class-variance-authority";
|
|
13
|
+
import * as D from "@radix-ui/react-progress";
|
|
14
14
|
import * as l from "@radix-ui/react-dropdown-menu";
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const Ne = f.Root, { Content: M, Header: S, Item: j, Trigger: A } = f, ye = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(j, { ref: a, className: r(t), ...e })), ke = n.forwardRef(({ children: t, icon: e, className: a, ...s }, i) => /* @__PURE__ */ o(S, { className: "flex", children: /* @__PURE__ */ m(
|
|
16
|
+
A,
|
|
17
17
|
{
|
|
18
18
|
ref: i,
|
|
19
19
|
className: r(
|
|
@@ -24,7 +24,7 @@ const we = p.Root, { Content: z, Header: D, Item: M, Trigger: S } = p, he = n.fo
|
|
|
24
24
|
children: [
|
|
25
25
|
t,
|
|
26
26
|
/* @__PURE__ */ o(
|
|
27
|
-
|
|
27
|
+
R,
|
|
28
28
|
{
|
|
29
29
|
"aria-hidden": !0,
|
|
30
30
|
width: (e == null ? void 0 : e.width) ?? 20,
|
|
@@ -35,42 +35,52 @@ const we = p.Root, { Content: z, Header: D, Item: M, Trigger: S } = p, he = n.fo
|
|
|
35
35
|
)
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
|
-
) })),
|
|
39
|
-
|
|
38
|
+
) })), Re = n.forwardRef(({ children: t, className: e, ...a }, s) => /* @__PURE__ */ o(
|
|
39
|
+
M,
|
|
40
40
|
{
|
|
41
41
|
ref: s,
|
|
42
42
|
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
43
43
|
...a,
|
|
44
44
|
children: /* @__PURE__ */ o("div", { className: r("pt-0", e), children: t })
|
|
45
45
|
}
|
|
46
|
-
)), { Content:
|
|
47
|
-
({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
)), { Content: $, Portal: L } = c, Te = c.Root, Ce = c.Trigger, Ie = n.forwardRef(
|
|
47
|
+
({
|
|
48
|
+
align: t = "center",
|
|
49
|
+
className: e,
|
|
50
|
+
sideOffset: a = 4,
|
|
51
|
+
container: s,
|
|
52
|
+
disablePortal: i = !1,
|
|
53
|
+
...y
|
|
54
|
+
}, k) => {
|
|
55
|
+
const p = /* @__PURE__ */ o(
|
|
56
|
+
$,
|
|
57
|
+
{
|
|
58
|
+
ref: k,
|
|
59
|
+
align: t,
|
|
60
|
+
sideOffset: a,
|
|
61
|
+
className: r(
|
|
62
|
+
"z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
63
|
+
e
|
|
64
|
+
),
|
|
65
|
+
...y
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
return i ? p : /* @__PURE__ */ o(L, { container: s, children: p });
|
|
69
|
+
}
|
|
60
70
|
), {
|
|
61
|
-
CheckboxItem:
|
|
62
|
-
Content:
|
|
63
|
-
SubContent:
|
|
64
|
-
Item:
|
|
65
|
-
ItemIndicator:
|
|
66
|
-
Portal:
|
|
67
|
-
Root:
|
|
68
|
-
Trigger:
|
|
69
|
-
SubTrigger:
|
|
70
|
-
RadioItem:
|
|
71
|
-
Label:
|
|
72
|
-
Separator:
|
|
73
|
-
} = l,
|
|
71
|
+
CheckboxItem: b,
|
|
72
|
+
Content: v,
|
|
73
|
+
SubContent: V,
|
|
74
|
+
Item: x,
|
|
75
|
+
ItemIndicator: _,
|
|
76
|
+
Portal: B,
|
|
77
|
+
Root: F,
|
|
78
|
+
Trigger: H,
|
|
79
|
+
SubTrigger: q,
|
|
80
|
+
RadioItem: E,
|
|
81
|
+
Label: G,
|
|
82
|
+
Separator: J
|
|
83
|
+
} = l, Pe = F, ze = H, K = n.forwardRef(({ className: t, inset: e, children: a, ...s }, i) => /* @__PURE__ */ m(
|
|
74
84
|
l.SubTrigger,
|
|
75
85
|
{
|
|
76
86
|
ref: i,
|
|
@@ -82,13 +92,13 @@ const we = p.Root, { Content: z, Header: D, Item: M, Trigger: S } = p, he = n.fo
|
|
|
82
92
|
...s,
|
|
83
93
|
children: [
|
|
84
94
|
a,
|
|
85
|
-
/* @__PURE__ */ o(
|
|
95
|
+
/* @__PURE__ */ o(T, { className: "ml-auto" })
|
|
86
96
|
]
|
|
87
97
|
}
|
|
88
98
|
));
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
99
|
+
K.displayName = q.displayName;
|
|
100
|
+
const O = n.forwardRef(({ className: t, sideOffset: e = 4, ...a }, s) => /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(
|
|
101
|
+
v,
|
|
92
102
|
{
|
|
93
103
|
ref: s,
|
|
94
104
|
sideOffset: e,
|
|
@@ -100,8 +110,8 @@ const J = n.forwardRef(({ className: t, sideOffset: e = 4, ...a }, s) => /* @__P
|
|
|
100
110
|
...a
|
|
101
111
|
}
|
|
102
112
|
) }));
|
|
103
|
-
|
|
104
|
-
const
|
|
113
|
+
O.displayName = v.displayName;
|
|
114
|
+
const Q = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
105
115
|
l.SubContent,
|
|
106
116
|
{
|
|
107
117
|
ref: a,
|
|
@@ -112,9 +122,9 @@ const K = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
112
122
|
...e
|
|
113
123
|
}
|
|
114
124
|
));
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
125
|
+
Q.displayName = V.displayName;
|
|
126
|
+
const U = n.forwardRef(({ className: t, inset: e, ...a }, s) => /* @__PURE__ */ o(
|
|
127
|
+
x,
|
|
118
128
|
{
|
|
119
129
|
ref: s,
|
|
120
130
|
className: r(
|
|
@@ -125,9 +135,9 @@ const O = n.forwardRef(({ className: t, inset: e, ...a }, s) => /* @__PURE__ */
|
|
|
125
135
|
...a
|
|
126
136
|
}
|
|
127
137
|
));
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
138
|
+
U.displayName = x.displayName;
|
|
139
|
+
const W = n.forwardRef(({ checked: t, children: e, className: a, ...s }, i) => /* @__PURE__ */ m(
|
|
140
|
+
b,
|
|
131
141
|
{
|
|
132
142
|
ref: i,
|
|
133
143
|
className: r(
|
|
@@ -137,13 +147,13 @@ const Q = n.forwardRef(({ checked: t, children: e, className: a, ...s }, i) => /
|
|
|
137
147
|
checked: t,
|
|
138
148
|
...s,
|
|
139
149
|
children: [
|
|
140
|
-
/* @__PURE__ */ o("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(
|
|
150
|
+
/* @__PURE__ */ o("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(C, { className: "size-4" }) }) }),
|
|
141
151
|
e
|
|
142
152
|
]
|
|
143
153
|
}
|
|
144
154
|
));
|
|
145
|
-
|
|
146
|
-
const
|
|
155
|
+
W.displayName = b.displayName;
|
|
156
|
+
const X = n.forwardRef(({ className: t, children: e, ...a }, s) => /* @__PURE__ */ m(
|
|
147
157
|
l.RadioItem,
|
|
148
158
|
{
|
|
149
159
|
ref: s,
|
|
@@ -153,13 +163,13 @@ const U = n.forwardRef(({ className: t, children: e, ...a }, s) => /* @__PURE__
|
|
|
153
163
|
),
|
|
154
164
|
...a,
|
|
155
165
|
children: [
|
|
156
|
-
/* @__PURE__ */ o("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(l.ItemIndicator, { children: /* @__PURE__ */ o(
|
|
166
|
+
/* @__PURE__ */ o("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(l.ItemIndicator, { children: /* @__PURE__ */ o(I, { className: "size-2 fill-current" }) }) }),
|
|
157
167
|
e
|
|
158
168
|
]
|
|
159
169
|
}
|
|
160
170
|
));
|
|
161
|
-
|
|
162
|
-
const
|
|
171
|
+
X.displayName = E.displayName;
|
|
172
|
+
const Y = n.forwardRef(({ className: t, inset: e, ...a }, s) => /* @__PURE__ */ o(
|
|
163
173
|
l.Label,
|
|
164
174
|
{
|
|
165
175
|
ref: s,
|
|
@@ -171,8 +181,8 @@ const W = n.forwardRef(({ className: t, inset: e, ...a }, s) => /* @__PURE__ */
|
|
|
171
181
|
...a
|
|
172
182
|
}
|
|
173
183
|
));
|
|
174
|
-
|
|
175
|
-
const
|
|
184
|
+
Y.displayName = G.displayName;
|
|
185
|
+
const Z = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
176
186
|
l.Separator,
|
|
177
187
|
{
|
|
178
188
|
ref: a,
|
|
@@ -183,9 +193,9 @@ const X = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
183
193
|
...e
|
|
184
194
|
}
|
|
185
195
|
));
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
196
|
+
Z.displayName = J.displayName;
|
|
197
|
+
const De = g.Root, { List: w, Trigger: h, Content: N } = g, ee = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
198
|
+
w,
|
|
189
199
|
{
|
|
190
200
|
ref: a,
|
|
191
201
|
className: r(
|
|
@@ -195,9 +205,9 @@ const Pe = f.Root, { List: x, Trigger: w, Content: h } = f, Y = u.forwardRef(({
|
|
|
195
205
|
...e
|
|
196
206
|
}
|
|
197
207
|
));
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
|
|
208
|
+
ee.displayName = w.displayName;
|
|
209
|
+
const te = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
210
|
+
h,
|
|
201
211
|
{
|
|
202
212
|
ref: a,
|
|
203
213
|
className: r(
|
|
@@ -207,9 +217,9 @@ const Z = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
207
217
|
...e
|
|
208
218
|
}
|
|
209
219
|
));
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
|
|
220
|
+
te.displayName = h.displayName;
|
|
221
|
+
const ae = u.forwardRef(({ children: t, className: e, ...a }, s) => /* @__PURE__ */ o(
|
|
222
|
+
N,
|
|
213
223
|
{
|
|
214
224
|
ref: s,
|
|
215
225
|
className: r(
|
|
@@ -220,8 +230,8 @@ const ee = u.forwardRef(({ children: t, className: e, ...a }, s) => /* @__PURE__
|
|
|
220
230
|
children: t
|
|
221
231
|
}
|
|
222
232
|
));
|
|
223
|
-
|
|
224
|
-
const
|
|
233
|
+
ae.displayName = N.displayName;
|
|
234
|
+
const oe = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
225
235
|
d.Viewport,
|
|
226
236
|
{
|
|
227
237
|
ref: a,
|
|
@@ -232,8 +242,8 @@ const te = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
232
242
|
...e
|
|
233
243
|
}
|
|
234
244
|
));
|
|
235
|
-
|
|
236
|
-
const
|
|
245
|
+
oe.displayName = d.Viewport.displayName;
|
|
246
|
+
const re = z(
|
|
237
247
|
"group pointer-events-auto rounded-[10px] text-sidebar-10 relative flex w-full items-center justify-between space-x-2 overflow-hidden py-3 px-[15px] transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-neutral-800",
|
|
238
248
|
{
|
|
239
249
|
variants: {
|
|
@@ -249,16 +259,16 @@ const ae = I(
|
|
|
249
259
|
variant: "default"
|
|
250
260
|
}
|
|
251
261
|
}
|
|
252
|
-
),
|
|
262
|
+
), se = n.forwardRef(({ className: t, variant: e, ...a }, s) => /* @__PURE__ */ o(
|
|
253
263
|
d.Root,
|
|
254
264
|
{
|
|
255
265
|
ref: s,
|
|
256
|
-
className: r(
|
|
266
|
+
className: r(re({ variant: e }), t),
|
|
257
267
|
...a
|
|
258
268
|
}
|
|
259
269
|
));
|
|
260
|
-
|
|
261
|
-
const
|
|
270
|
+
se.displayName = d.Root.displayName;
|
|
271
|
+
const ne = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
262
272
|
d.Action,
|
|
263
273
|
{
|
|
264
274
|
ref: a,
|
|
@@ -269,8 +279,8 @@ const re = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
269
279
|
...e
|
|
270
280
|
}
|
|
271
281
|
));
|
|
272
|
-
|
|
273
|
-
const
|
|
282
|
+
ne.displayName = d.Action.displayName;
|
|
283
|
+
const de = n.forwardRef(({ className: t, variant: e, ...a }, s) => /* @__PURE__ */ o(
|
|
274
284
|
d.Close,
|
|
275
285
|
{
|
|
276
286
|
ref: s,
|
|
@@ -280,11 +290,11 @@ const se = n.forwardRef(({ className: t, variant: e, ...a }, s) => /* @__PURE__
|
|
|
280
290
|
),
|
|
281
291
|
"toast-close": "",
|
|
282
292
|
...a,
|
|
283
|
-
children: /* @__PURE__ */ o(
|
|
293
|
+
children: /* @__PURE__ */ o(P, { className: r(`size-4 text-${e}-10`) })
|
|
284
294
|
}
|
|
285
295
|
));
|
|
286
|
-
|
|
287
|
-
const
|
|
296
|
+
de.displayName = d.Close.displayName;
|
|
297
|
+
const ie = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
288
298
|
d.Title,
|
|
289
299
|
{
|
|
290
300
|
ref: a,
|
|
@@ -292,8 +302,8 @@ const ne = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
292
302
|
...e
|
|
293
303
|
}
|
|
294
304
|
));
|
|
295
|
-
|
|
296
|
-
const
|
|
305
|
+
ie.displayName = d.Title.displayName;
|
|
306
|
+
const le = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
297
307
|
d.Description,
|
|
298
308
|
{
|
|
299
309
|
ref: a,
|
|
@@ -301,9 +311,9 @@ const de = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
301
311
|
...e
|
|
302
312
|
}
|
|
303
313
|
));
|
|
304
|
-
|
|
305
|
-
const { Root:
|
|
306
|
-
|
|
314
|
+
le.displayName = d.Description.displayName;
|
|
315
|
+
const { Root: me, Indicator: ue } = D, ce = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
316
|
+
me,
|
|
307
317
|
{
|
|
308
318
|
ref: a,
|
|
309
319
|
className: r(
|
|
@@ -313,9 +323,9 @@ const { Root: ie, Indicator: le } = P, me = n.forwardRef(({ className: t, ...e }
|
|
|
313
323
|
...e
|
|
314
324
|
}
|
|
315
325
|
));
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
326
|
+
ce.displayName = "ProgressRoot";
|
|
327
|
+
const pe = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
328
|
+
ue,
|
|
319
329
|
{
|
|
320
330
|
ref: a,
|
|
321
331
|
className: r(
|
|
@@ -325,25 +335,25 @@ const ue = n.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ o(
|
|
|
325
335
|
...e
|
|
326
336
|
}
|
|
327
337
|
));
|
|
328
|
-
|
|
338
|
+
pe.displayName = "ProgressIndicator";
|
|
329
339
|
export {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
340
|
+
Ne as A,
|
|
341
|
+
Pe as D,
|
|
342
|
+
Te as P,
|
|
343
|
+
ie as T,
|
|
344
|
+
le as a,
|
|
345
|
+
Ce as b,
|
|
346
|
+
Ie as c,
|
|
347
|
+
ze as d,
|
|
348
|
+
O as e,
|
|
349
|
+
U as f,
|
|
350
|
+
ye as g,
|
|
351
|
+
ke as h,
|
|
352
|
+
Re as i,
|
|
353
|
+
De as j,
|
|
354
|
+
ee as k,
|
|
355
|
+
te as l,
|
|
356
|
+
ae as m,
|
|
357
|
+
ce as n,
|
|
358
|
+
pe as o
|
|
349
359
|
};
|
|
@@ -4,4 +4,5 @@ export declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
|
4
4
|
export declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
6
6
|
container?: HTMLElement | null;
|
|
7
|
+
disablePortal?: boolean;
|
|
7
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -8,6 +8,8 @@ export type ComboboxProps = {
|
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
9
|
searchValue: string;
|
|
10
10
|
onSearchChange: (query: string) => void;
|
|
11
|
+
onDebouncedSearch?: (query: string) => void;
|
|
12
|
+
debounceDelay?: number;
|
|
11
13
|
placeholder?: string;
|
|
12
14
|
searchPlaceholder?: string;
|
|
13
15
|
emptyMessage?: string;
|
|
@@ -15,6 +17,7 @@ export type ComboboxProps = {
|
|
|
15
17
|
status?: SelectStatusType;
|
|
16
18
|
isLoading?: boolean;
|
|
17
19
|
container?: HTMLElement | null;
|
|
20
|
+
disablePortal?: boolean;
|
|
18
21
|
classNames?: {
|
|
19
22
|
parent?: string;
|
|
20
23
|
trigger?: string;
|