@dimasbaguspm/versaur 0.0.21 → 0.0.23

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.
Files changed (28) hide show
  1. package/dist/js/bottom-sheet-CCDa5VGo.js +573 -0
  2. package/dist/js/{bottom-sheet-input-DFGibm1I.js → bottom-sheet-input-DsgPp5zI.js} +2 -2
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle-C6cgL8R9.js → image-rectangle-GA3oWX7A.js} +4 -4
  5. package/dist/js/index.js +64 -62
  6. package/dist/js/layouts/index.js +6 -4
  7. package/dist/js/navigation/index.js +1 -1
  8. package/dist/js/overlays/index.js +1 -1
  9. package/dist/js/primitive/index.js +1 -1
  10. package/dist/js/providers/index.js +1 -1
  11. package/dist/js/side-bar-BCTyiW3N.js +597 -0
  12. package/dist/js/{tabs-BbOkYchB.js → tabs-p6g9kN0N.js} +56 -74
  13. package/dist/js/{use-snackbars-oPoF7J5t.js → use-snackbars-B0MaRlg1.js} +1 -1
  14. package/dist/types/layouts/app-bar/app-bar.atoms.d.ts +2 -2
  15. package/dist/types/layouts/app-bar/app-bar.d.ts +2 -2
  16. package/dist/types/layouts/app-bar/types.d.ts +3 -2
  17. package/dist/types/layouts/button-group/button-group.d.ts +27 -0
  18. package/dist/types/layouts/button-group/index.d.ts +2 -0
  19. package/dist/types/layouts/button-group/types.d.ts +32 -0
  20. package/dist/types/layouts/index.d.ts +2 -0
  21. package/dist/types/layouts/page-header/index.d.ts +2 -0
  22. package/dist/types/layouts/page-header/page-header.atoms.d.ts +35 -0
  23. package/dist/types/layouts/page-header/page-header.d.ts +40 -0
  24. package/dist/types/layouts/page-header/types.d.ts +52 -0
  25. package/dist/utils/enforce-subpath-import.js +4 -1
  26. package/package.json +1 -1
  27. package/dist/js/bottom-sheet-Eqduh3eY.js +0 -495
  28. package/dist/js/side-bar-BUACYQUo.js +0 -397
@@ -1,397 +0,0 @@
1
- import { c as i, j as s, a as l } from "./index-DOdDlCoL.js";
2
- import * as f from "react";
3
- import { forwardRef as n } from "react";
4
- import "./image-rectangle-C6cgL8R9.js";
5
- import "./snackbar-DH8jCh2V.js";
6
- import { T as d } from "./text-CRsIInRA.js";
7
- const b = i(
8
- "w-full flex flex-wrap items-center px-4 pt-3 mb-3 gap-2 bg-white [&>[data-versaur-appbar-bottom]]:basis-full [&>[data-versaur-appbar-bottom]]:w-full",
9
- {
10
- variants: {
11
- variant: {
12
- primary: "",
13
- secondary: "",
14
- tertiary: "",
15
- ghost: "",
16
- neutral: ""
17
- }
18
- },
19
- defaultVariants: {
20
- variant: "primary"
21
- }
22
- }
23
- ), g = i(
24
- "flex flex-col justify-center min-w-0 flex-grow",
25
- {
26
- variants: {
27
- placement: {
28
- start: "items-start",
29
- center: "items-center",
30
- end: "items-end"
31
- }
32
- },
33
- defaultVariants: {
34
- placement: "start"
35
- }
36
- }
37
- ), v = n(
38
- ({ children: e, className: a }, t) => /* @__PURE__ */ s.jsx(
39
- "div",
40
- {
41
- ref: t,
42
- "data-versaur-appbar-bottom": !0,
43
- className: l("w-full flex items-center min-h-[2.5rem] mt-2", a),
44
- children: e
45
- }
46
- )
47
- ), y = n(
48
- ({ children: e, className: a }, t) => /* @__PURE__ */ s.jsx("div", { ref: t, className: l("flex items-center", a), children: e })
49
- ), B = n(
50
- ({ children: e, className: a }, t) => /* @__PURE__ */ s.jsx(
51
- "div",
52
- {
53
- ref: t,
54
- className: l("font-semibold text-lg truncate min-w-0", a),
55
- children: e
56
- }
57
- )
58
- ), h = n(
59
- ({ children: e, className: a }, t) => /* @__PURE__ */ s.jsx(
60
- "div",
61
- {
62
- ref: t,
63
- className: l("text-xs text-ghost-400 truncate min-w-0", a),
64
- children: e
65
- }
66
- )
67
- ), j = n(
68
- ({ children: e, className: a }, t) => /* @__PURE__ */ s.jsx(
69
- "div",
70
- {
71
- ref: t,
72
- className: l("flex items-center justify-end gap-2", a),
73
- children: e
74
- }
75
- )
76
- ), N = n(
77
- ({ children: e, className: a, placement: t }, r) => /* @__PURE__ */ s.jsx(
78
- "div",
79
- {
80
- ref: r,
81
- className: l(g({ placement: t }), a),
82
- children: e
83
- }
84
- )
85
- ), w = ({
86
- children: e,
87
- className: a,
88
- variant: t = "primary"
89
- }) => /* @__PURE__ */ s.jsx(
90
- "header",
91
- {
92
- className: l(b({ variant: t }), a),
93
- role: "banner",
94
- children: e
95
- }
96
- ), ta = Object.assign(w, {
97
- Leading: y,
98
- Headline: B,
99
- Subtitle: h,
100
- Trailing: j,
101
- Center: N,
102
- Bottom: v
103
- }), T = i(
104
- "sticky bottom-0 left-0 w-full flex justify-between items-center bg-white border-t border-border shadow-xs z-40 safe-bottom px-8 py-1",
105
- {
106
- variants: {
107
- variant: {
108
- primary: "",
109
- secondary: "",
110
- ghost: "",
111
- neutral: "",
112
- tertiary: ""
113
- },
114
- size: {
115
- sm: "h-12 text-sm",
116
- md: "h-16 text-base",
117
- lg: "h-20 text-lg"
118
- }
119
- },
120
- defaultVariants: {
121
- variant: "primary",
122
- size: "md"
123
- }
124
- }
125
- ), S = i(
126
- "flex flex-col items-center justify-center gap-1 px-2 py-1",
127
- {
128
- variants: {
129
- active: {
130
- true: "font-semibold text-primary",
131
- false: "text-ghost"
132
- }
133
- },
134
- defaultVariants: {
135
- active: !1
136
- }
137
- }
138
- ), L = n(
139
- ({ icon: e, label: a, active: t = !1, className: r, ...o }, c) => /* @__PURE__ */ s.jsxs(
140
- "div",
141
- {
142
- ref: c,
143
- "aria-current": t ? "page" : void 0,
144
- className: S({ active: t, className: r }),
145
- ...o,
146
- children: [
147
- e,
148
- a && /* @__PURE__ */ s.jsx("span", { className: "text-xs mt-0.5", children: a })
149
- ]
150
- }
151
- )
152
- ), V = ({
153
- children: e,
154
- variant: a = "primary",
155
- size: t = "md",
156
- className: r,
157
- ...o
158
- }) => /* @__PURE__ */ s.jsx(
159
- "nav",
160
- {
161
- role: "navigation",
162
- "aria-label": "Bottom navigation",
163
- className: T({ variant: a, size: t, className: r }),
164
- ...o,
165
- children: e
166
- }
167
- ), ea = Object.assign(V, {
168
- Item: L
169
- }), A = i(
170
- "w-full flex items-center px-6 py-4 mb-6 border-b border-border shadow-xs bg-white",
171
- {
172
- variants: {},
173
- defaultVariants: {}
174
- }
175
- ), R = i("flex items-center gap-3 min-w-0 flex-1"), I = i("flex items-center gap-2 ml-auto"), C = i(
176
- "px-2.5 py-1.5 rounded-md text-sm cursor-pointer transition-colors",
177
- {
178
- variants: {
179
- active: {
180
- true: "bg-primary/10 text-primary",
181
- false: "hover:text-primary text-ghost"
182
- }
183
- },
184
- defaultVariants: {
185
- active: !1
186
- }
187
- }
188
- ), k = i("flex items-center gap-2 ml-4"), z = i("flex items-center gap-2 mr-4"), F = n(
189
- function({ children: a, className: t, ...r }, o) {
190
- return /* @__PURE__ */ s.jsx("nav", { ref: o, className: k({ className: t }), ...r, children: a });
191
- }
192
- ), O = n(
193
- function({ children: a, className: t, ...r }, o) {
194
- return /* @__PURE__ */ s.jsx("div", { ref: o, className: z({ className: t }), ...r, children: a });
195
- }
196
- ), P = n(
197
- function({ children: a, className: t, ...r }, o) {
198
- return /* @__PURE__ */ s.jsx("div", { ref: o, className: R({ className: t }), ...r, children: a });
199
- }
200
- ), G = n(
201
- function({ children: a, className: t, ...r }, o) {
202
- return /* @__PURE__ */ s.jsx("div", { ref: o, className: I({ className: t }), ...r, children: a });
203
- }
204
- ), H = n(
205
- function({ children: a, className: t, active: r, ...o }, c) {
206
- return /* @__PURE__ */ s.jsx(
207
- "div",
208
- {
209
- ref: c,
210
- className: C({ active: r, className: t }),
211
- "aria-current": r ? "page" : void 0,
212
- ...o,
213
- children: a
214
- }
215
- );
216
- }
217
- ), M = n(
218
- ({ children: e, className: a, ...t }, r) => /* @__PURE__ */ s.jsx("header", { ref: r, className: A({ className: a }), ...t, children: e })
219
- ), sa = Object.assign(M, {
220
- Leading: P,
221
- Trailing: G,
222
- NavItem: H,
223
- Nav: F,
224
- Actions: O
225
- }), E = i("w-full mx-auto relative", {
226
- variants: {
227
- type: {
228
- desktop: "max-w-7xl px-6 pb-10",
229
- tablet: "max-w-3xl px-4",
230
- mobile: "w-full px-4"
231
- }
232
- },
233
- defaultVariants: {
234
- type: "desktop"
235
- }
236
- }), ra = f.forwardRef(
237
- function({ type: a = "desktop", className: t, children: r, ...o }, c) {
238
- return /* @__PURE__ */ s.jsx(
239
- "div",
240
- {
241
- ref: c,
242
- className: l(E({ type: a }), t),
243
- ...o,
244
- children: r
245
- }
246
- );
247
- }
248
- ), W = i("grid w-full gap-4 grid-cols-12"), $ = i("", {
249
- variants: {
250
- span: {
251
- 1: "col-span-1",
252
- 2: "col-span-2",
253
- 3: "col-span-3",
254
- 4: "col-span-4",
255
- 5: "col-span-5",
256
- 6: "col-span-6",
257
- 7: "col-span-7",
258
- 8: "col-span-8",
259
- 9: "col-span-9",
260
- 10: "col-span-10",
261
- 11: "col-span-11",
262
- 12: "col-span-12"
263
- }
264
- },
265
- defaultVariants: {
266
- span: "4"
267
- }
268
- }), q = n(
269
- function({ className: a, children: t, ...r }, o) {
270
- return /* @__PURE__ */ s.jsx(
271
- "div",
272
- {
273
- ref: o,
274
- className: l(W(), a),
275
- ...r,
276
- children: t
277
- }
278
- );
279
- }
280
- ), D = n(
281
- function({ span: a = 4, className: t, children: r, ...o }, c) {
282
- const m = Math.min(12, Math.max(1, a));
283
- return /* @__PURE__ */ s.jsx(
284
- "div",
285
- {
286
- ref: c,
287
- className: l(
288
- $({ span: `${m}` }),
289
- t
290
- ),
291
- ...o,
292
- children: r
293
- }
294
- );
295
- }
296
- ), oa = Object.assign(q, {
297
- Column: D
298
- }), u = i(
299
- "flex items-center gap-2 px-4 py-2 rounded-md hover:text-primary focus:outline-none transition-colors",
300
- {
301
- variants: {
302
- active: {
303
- true: "bg-primary/10 text-primary",
304
- false: "text-ghost"
305
- },
306
- disabled: {
307
- true: "opacity-50 pointer-events-none",
308
- false: ""
309
- }
310
- },
311
- defaultVariants: {
312
- active: !1,
313
- disabled: !1
314
- }
315
- }
316
- ), J = n(
317
- (e, a) => {
318
- const { icon: t, children: r, href: o, onClick: c, active: m, ...x } = e;
319
- if (typeof o == "string") {
320
- const p = x;
321
- return /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsxs(
322
- "a",
323
- {
324
- ref: a,
325
- href: o,
326
- className: u({
327
- disabled: !!e["aria-disabled"],
328
- active: m
329
- }),
330
- ...p,
331
- children: [
332
- t,
333
- /* @__PURE__ */ s.jsx(d, { as: "span", color: "inherit", fontSize: "sm", children: r })
334
- ]
335
- }
336
- ) });
337
- } else {
338
- const p = x;
339
- return /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsxs(
340
- "button",
341
- {
342
- ref: a,
343
- type: "button",
344
- onClick: c,
345
- className: l(
346
- u({ disabled: !!p.disabled, active: m }),
347
- "w-full text-left"
348
- ),
349
- ...p,
350
- children: [
351
- t,
352
- /* @__PURE__ */ s.jsx(d, { as: "span", color: "inherit", fontSize: "sm", children: r })
353
- ]
354
- }
355
- ) });
356
- }
357
- }
358
- ), K = n(
359
- function({ children: a, label: t, ...r }, o) {
360
- return /* @__PURE__ */ s.jsxs("li", { ref: o, className: "flex flex-col gap-2 mt-2", ...r, children: [
361
- /* @__PURE__ */ s.jsx(
362
- d,
363
- {
364
- as: "h2",
365
- fontSize: "xs",
366
- fontWeight: "semibold",
367
- color: "gray",
368
- className: "px-2",
369
- children: t
370
- }
371
- ),
372
- /* @__PURE__ */ s.jsx("ul", { className: "flex flex-col gap-1", children: a })
373
- ] });
374
- }
375
- ), Q = n(
376
- ({ children: e, ...a }, t) => /* @__PURE__ */ s.jsx(
377
- "nav",
378
- {
379
- ref: t,
380
- className: "w-56 bg-background border-r border-border flex flex-col my-2",
381
- "aria-label": "Sidebar",
382
- ...a,
383
- children: /* @__PURE__ */ s.jsx("div", { className: "flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-background", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-col gap-1 mx-2", children: e }) })
384
- }
385
- )
386
- ), na = Object.assign(Q, {
387
- Item: J,
388
- Group: K
389
- });
390
- export {
391
- ta as A,
392
- ea as B,
393
- oa as F,
394
- ra as P,
395
- na as S,
396
- sa as T
397
- };