@dimasbaguspm/versaur 0.0.16 → 0.0.17

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 (58) hide show
  1. package/dist/js/bottom-sheet-CHRSxXRE.js +501 -0
  2. package/dist/js/{switch-input-Bx6_2zG9.js → email-input-CVyrFzqL.js} +592 -807
  3. package/dist/js/enforce-subpath-import.js +5 -2
  4. package/dist/js/feedbacks/index.js +1 -1
  5. package/dist/js/{form-layout-4ASWdXn8.js → form-layout-Dhlv-FZL.js} +1 -1
  6. package/dist/js/forms/index.js +17 -14
  7. package/dist/js/{index-DOdDlCoL.js → index-C1uJQB34.js} +2 -2
  8. package/dist/js/index.js +45 -43
  9. package/dist/js/layouts/index.js +1 -1
  10. package/dist/js/modal-FqewbVts.js +150 -0
  11. package/dist/js/navigation/index.js +1 -1
  12. package/dist/js/overlays/index.js +4 -4
  13. package/dist/js/primitive/index.js +14 -15
  14. package/dist/js/{skeleton-BNZyaRjo.js → skeleton-QEyPZAuF.js} +1 -1
  15. package/dist/js/{tabs-BbOkYchB.js → tabs-DYcTvVao.js} +1 -1
  16. package/dist/js/tile-B9bt2AY6.js +1776 -0
  17. package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +10 -0
  18. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +5 -0
  19. package/dist/types/forms/chip-multiple-input/index.d.ts +2 -0
  20. package/dist/types/forms/{chip-input → chip-multiple-input}/types.d.ts +16 -4
  21. package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +10 -0
  22. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +5 -0
  23. package/dist/types/forms/chip-single-input/index.d.ts +1 -0
  24. package/dist/types/forms/chip-single-input/types.d.ts +67 -0
  25. package/dist/types/forms/date-single-picker-input/date-single-picker-input.d.ts +1 -8
  26. package/dist/types/forms/date-single-picker-input/index.d.ts +1 -1
  27. package/dist/types/forms/date-single-picker-input/types.d.ts +12 -66
  28. package/dist/types/forms/email-input/email-input.d.ts +8 -0
  29. package/dist/types/forms/email-input/index.d.ts +2 -0
  30. package/dist/types/forms/email-input/types.d.ts +6 -0
  31. package/dist/types/forms/index.d.ts +5 -1
  32. package/dist/types/forms/price-input/index.d.ts +2 -0
  33. package/dist/types/forms/price-input/price-input.d.ts +6 -0
  34. package/dist/types/forms/price-input/types.d.ts +15 -0
  35. package/dist/types/forms/price-input/use-price-input.d.ts +6 -0
  36. package/dist/types/forms/search-input/index.d.ts +2 -0
  37. package/dist/types/forms/search-input/search-input.d.ts +8 -0
  38. package/dist/types/forms/search-input/types.d.ts +35 -0
  39. package/dist/types/forms/segment-multiple-input/types.d.ts +1 -5
  40. package/dist/types/forms/segment-single-input/types.d.ts +1 -5
  41. package/dist/types/overlays/modal/types.d.ts +1 -1
  42. package/dist/types/primitive/anchor/types.d.ts +8 -2
  43. package/package.json +1 -1
  44. package/dist/js/bottom-sheet-Difan0U1.js +0 -340
  45. package/dist/js/calendar-CUjVZ7Ap.js +0 -811
  46. package/dist/js/menu-Bm-yPIMN.js +0 -310
  47. package/dist/js/tile-BjhJ5Mvl.js +0 -939
  48. package/dist/types/forms/chip-input/chip-input.atoms.d.ts +0 -10
  49. package/dist/types/forms/chip-input/chip-input.d.ts +0 -5
  50. package/dist/types/forms/chip-input/index.d.ts +0 -2
  51. package/dist/types/forms/date-range-picker-input/date-range-picker-input.d.ts +0 -10
  52. package/dist/types/forms/date-range-picker-input/index.d.ts +0 -2
  53. package/dist/types/forms/date-range-picker-input/types.d.ts +0 -64
  54. package/dist/types/forms/date-range-picker-input/use-date-range-picker.d.ts +0 -13
  55. package/dist/types/forms/date-single-picker-input/date-single-picker-input.atoms.d.ts +0 -13
  56. package/dist/types/forms/date-single-picker-input/date-single-picker-input.docked.d.ts +0 -14
  57. package/dist/types/forms/date-single-picker-input/date-single-picker-input.modal.d.ts +0 -15
  58. package/dist/types/forms/date-single-picker-input/use-date-single-picker.d.ts +0 -10
@@ -40,17 +40,20 @@ const symbolToSubpath = {
40
40
  // forms
41
41
  CalculatorInput: 'forms',
42
42
  CheckboxInput: 'forms',
43
- ChipInput: 'forms',
43
+ ChipSingleInput: 'forms',
44
+ ChipMultipleInput: 'forms',
44
45
  DateSinglePickerInput: 'forms',
45
- DateRangePickerInput: 'forms',
46
+ EmailInput: 'forms',
46
47
  RadioInput: 'forms',
47
48
  SegmentMultipleInput: 'forms',
48
49
  SegmentSingleInput: 'forms',
50
+ SearchInput: 'forms',
49
51
  SelectInput: 'forms',
50
52
  SwitchInput: 'forms',
51
53
  TextInput: 'forms',
52
54
  TextareaInput: 'forms',
53
55
  TimePickerInput: 'forms',
56
+ PriceInput: 'forms',
54
57
  }
55
58
 
56
59
  const rules = {
@@ -1,4 +1,4 @@
1
- import { L as r, P as s, S as e } from "../skeleton-BNZyaRjo.js";
1
+ import { L as r, P as s, S as e } from "../skeleton-QEyPZAuF.js";
2
2
  export {
3
3
  r as LoadingIndicator,
4
4
  s as ProgressIndicator,
@@ -1,4 +1,4 @@
1
- import { c as i, j as o, a as l } from "./index-DOdDlCoL.js";
1
+ import { a as i, j as o, c as l } from "./index-C1uJQB34.js";
2
2
  import * as p from "react";
3
3
  import { forwardRef as n } from "react";
4
4
  const u = i(
@@ -1,18 +1,21 @@
1
- import { C as e, a as n, b as p, D as s, R as u, c as i, S as I, d as c, g as S, j as h, i as l, h as r, e as T, T as g, f as m } from "../switch-input-Bx6_2zG9.js";
1
+ import { C as e, a as n, b as p, D as u, E as s, P as i, R as I, d as c, c as l, S, e as h, h as r, k as m, j as T, i as g, f as k, T as o, g as b } from "../email-input-CVyrFzqL.js";
2
2
  export {
3
3
  e as CalculatorInput,
4
4
  n as CheckboxInput,
5
- p as ChipInput,
6
- s as DateSinglePickerInput,
7
- u as RadioInput,
8
- i as SegmentMultipleInput,
9
- I as SegmentSingleInput,
10
- c as SelectInput,
11
- S as SwitchInput,
12
- h as SwitchLabel,
13
- l as SwitchThumb,
14
- r as SwitchTrack,
15
- T as TextAreaInput,
16
- g as TextInput,
17
- m as TimePickerInput
5
+ p as ChipMultipleInput,
6
+ u as DateSinglePickerInput,
7
+ s as EmailInput,
8
+ i as PriceInput,
9
+ I as RadioInput,
10
+ c as SearchInput,
11
+ l as SegmentMultipleInput,
12
+ S as SegmentSingleInput,
13
+ h as SelectInput,
14
+ r as SwitchInput,
15
+ m as SwitchLabel,
16
+ T as SwitchThumb,
17
+ g as SwitchTrack,
18
+ k as TextAreaInput,
19
+ o as TextInput,
20
+ b as TimePickerInput
18
21
  };
@@ -3049,7 +3049,7 @@ const Ee = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ae = Te, A
3049
3049
  return Ae(e, c, f, o?.class, o?.className);
3050
3050
  };
3051
3051
  export {
3052
- Er as a,
3053
- Ar as c,
3052
+ Ar as a,
3053
+ Er as c,
3054
3054
  Rr as j
3055
3055
  };
package/dist/js/index.js CHANGED
@@ -1,54 +1,56 @@
1
- import { L as s, P as e, S as o } from "./skeleton-BNZyaRjo.js";
2
- import { A as n, B as p, F as u, P as c, T as i } from "./form-layout-4ASWdXn8.js";
3
- import { C as I, a as m, b as B, D as S, R as T, c as x, S as d, d as b, g as h, j as f, i as g, h as A, e as C, T as k, f as P } from "./switch-input-Bx6_2zG9.js";
4
- import { B as L, D } from "./bottom-sheet-Difan0U1.js";
5
- import { M as F, a as y } from "./menu-Bm-yPIMN.js";
6
- import { A as j, a as v, b as q, B as z, c as E, d as G, S as H, T as J, e as K } from "./tile-BjhJ5Mvl.js";
7
- import { B as O, a as Q, C as U, b as V, I as W, T as X } from "./calendar-CUjVZ7Ap.js";
8
- import { B as Z, T as _ } from "./tabs-BbOkYchB.js";
1
+ import { L as s, P as e, S as r } from "./skeleton-QEyPZAuF.js";
2
+ import { A as n, B as p, F as u, P as c, T as i } from "./form-layout-Dhlv-FZL.js";
3
+ import { C as I, a as m, b as S, D as B, E as T, P as h, R as d, d as x, c as g, S as b, e as f, h as P, k, j as A, i as C, f as M, T as w, g as L } from "./email-input-CVyrFzqL.js";
4
+ import { B as F, D as y, M as E } from "./bottom-sheet-CHRSxXRE.js";
5
+ import { M as j } from "./modal-FqewbVts.js";
6
+ import { A as q, a as z, b as G, B as H, c as J, d as K, e as N, f as O, C as Q, g as U, I as V, S as W, T as X, h as Y, i as Z } from "./tile-B9bt2AY6.js";
7
+ import { B as $, T as aa } from "./tabs-DYcTvVao.js";
9
8
  export {
10
- j as Alert,
11
- v as Anchor,
9
+ q as Alert,
10
+ z as Anchor,
12
11
  n as AppBar,
13
- q as Avatar,
14
- z as Badge,
12
+ G as Avatar,
13
+ H as Badge,
15
14
  p as BottomBar,
16
- L as BottomSheet,
17
- E as Brand,
18
- Z as Breadcrumbs,
19
- O as Button,
20
- G as ButtonFloat,
21
- Q as ButtonIcon,
22
- U as Calculator,
15
+ F as BottomSheet,
16
+ J as Brand,
17
+ $ as Breadcrumbs,
18
+ K as Button,
19
+ N as ButtonFloat,
20
+ O as ButtonIcon,
21
+ Q as Calculator,
23
22
  I as CalculatorInput,
24
- V as Calendar,
23
+ U as Calendar,
25
24
  m as CheckboxInput,
26
- B as ChipInput,
27
- S as DateSinglePickerInput,
28
- D as Drawer,
25
+ S as ChipMultipleInput,
26
+ B as DateSinglePickerInput,
27
+ y as Drawer,
28
+ T as EmailInput,
29
29
  u as FormLayout,
30
- W as Icon,
30
+ V as Icon,
31
31
  s as LoadingIndicator,
32
- F as Menu,
33
- y as Modal,
32
+ E as Menu,
33
+ j as Modal,
34
34
  c as PageLayout,
35
+ h as PriceInput,
35
36
  e as ProgressIndicator,
36
- T as RadioInput,
37
- x as SegmentMultipleInput,
38
- d as SegmentSingleInput,
39
- b as SelectInput,
40
- o as Skeleton,
41
- H as Snackbar,
42
- h as SwitchInput,
43
- f as SwitchLabel,
44
- g as SwitchThumb,
45
- A as SwitchTrack,
46
- J as Table,
47
- _ as Tabs,
48
- X as Text,
49
- C as TextAreaInput,
50
- k as TextInput,
51
- K as Tile,
52
- P as TimePickerInput,
37
+ d as RadioInput,
38
+ x as SearchInput,
39
+ g as SegmentMultipleInput,
40
+ b as SegmentSingleInput,
41
+ f as SelectInput,
42
+ r as Skeleton,
43
+ W as Snackbar,
44
+ P as SwitchInput,
45
+ k as SwitchLabel,
46
+ A as SwitchThumb,
47
+ C as SwitchTrack,
48
+ X as Table,
49
+ aa as Tabs,
50
+ Y as Text,
51
+ M as TextAreaInput,
52
+ w as TextInput,
53
+ Z as Tile,
54
+ L as TimePickerInput,
53
55
  i as TopBar
54
56
  };
@@ -1,4 +1,4 @@
1
- import { A as r, B as s, F as t, P as B, T as p } from "../form-layout-4ASWdXn8.js";
1
+ import { A as r, B as s, F as t, P as B, T as p } from "../form-layout-Dhlv-FZL.js";
2
2
  export {
3
3
  r as AppBar,
4
4
  s as BottomBar,
@@ -0,0 +1,150 @@
1
+ import { j as o, c as d, a as p } from "./index-C1uJQB34.js";
2
+ import { forwardRef as s, useEffect as u, useRef as x, useState as y } from "react";
3
+ const E = s(
4
+ ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx(
5
+ "div",
6
+ {
7
+ ref: a,
8
+ className: d("px-6 pt-6 pb-2 text-lg font-semibold", e),
9
+ ...t
10
+ }
11
+ )
12
+ ), M = s(
13
+ ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx(
14
+ "div",
15
+ {
16
+ ref: a,
17
+ className: d("px-6 py-4 flex justify-end gap-2", e),
18
+ ...t
19
+ }
20
+ )
21
+ ), R = s(
22
+ ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx("div", { ref: a, className: d("px-6 py-2", e), ...t })
23
+ ), k = s(
24
+ ({ onOverlayClick: e, ...t }, a) => /* @__PURE__ */ o.jsx(
25
+ "div",
26
+ {
27
+ ref: a,
28
+ role: "presentation",
29
+ tabIndex: -1,
30
+ "aria-modal": "true",
31
+ onClick: e,
32
+ ...t
33
+ }
34
+ )
35
+ ), N = p(
36
+ "fixed inset-0 z-60 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md flex items-center justify-center transition-opacity duration-200 ease-in-out",
37
+ {
38
+ variants: {
39
+ placement: {
40
+ top: "items-start",
41
+ center: "items-center"
42
+ }
43
+ },
44
+ defaultVariants: {
45
+ placement: "center"
46
+ }
47
+ }
48
+ ), V = p(
49
+ [
50
+ "bg-white rounded-lg shadow-xl relative",
51
+ "flex flex-col",
52
+ "outline-none",
53
+ "mx-4",
54
+ "transition-all duration-200 ease-in-out "
55
+ ],
56
+ {
57
+ variants: {
58
+ size: {
59
+ sm: "w-[20rem] max-w-sm",
60
+ // 20rem, 320px
61
+ md: "w-[28rem] max-w-md",
62
+ // 28rem, 448px
63
+ lg: "w-[36rem] max-w-lg",
64
+ // 36rem, 576px
65
+ "fit-content": "w-fit max-w-full"
66
+ // Fit content, no max width
67
+ },
68
+ placement: {
69
+ top: "mt-4",
70
+ center: ""
71
+ }
72
+ },
73
+ defaultVariants: {
74
+ size: "md",
75
+ placement: "center"
76
+ }
77
+ }
78
+ );
79
+ function A(e, t) {
80
+ u(() => {
81
+ if (t && e.current) {
82
+ const a = e.current.querySelectorAll(
83
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
84
+ );
85
+ a.length && a[0].focus();
86
+ }
87
+ }, [t, e]);
88
+ }
89
+ function F(e, t) {
90
+ u(() => {
91
+ if (!e) return;
92
+ const a = (n) => {
93
+ n.key === "Escape" && t();
94
+ };
95
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
96
+ }, [e, t]);
97
+ }
98
+ const I = 200, T = ({
99
+ isOpen: e,
100
+ onOpenChange: t,
101
+ size: a = "md",
102
+ placement: n = "center",
103
+ children: v,
104
+ disableOverlayClose: b,
105
+ disableEscClose: w,
106
+ ...g
107
+ }) => {
108
+ const r = x(null), i = x(null), [j, f] = y(e), [m, l] = y(!1);
109
+ return u(() => {
110
+ if (e)
111
+ f(!0), l(!1), r.current = document.activeElement;
112
+ else if (j) {
113
+ l(!0);
114
+ const c = setTimeout(() => {
115
+ f(!1), l(!1), r.current && r.current.focus();
116
+ }, I);
117
+ return () => clearTimeout(c);
118
+ }
119
+ }, [e]), F(e && !w, () => {
120
+ t && t(!1);
121
+ }), A(i, e), /* @__PURE__ */ o.jsx(
122
+ k,
123
+ {
124
+ ref: i,
125
+ className: `${N({ placement: n })} transition-opacity duration-200 ease-in-out ` + (e && !m ? "opacity-100" : "opacity-0 pointer-events-none"),
126
+ onOverlayClick: (c) => {
127
+ c.target === i.current && !b && t && t(!1);
128
+ },
129
+ placement: n,
130
+ children: /* @__PURE__ */ o.jsx(
131
+ "div",
132
+ {
133
+ className: `${V({ size: a, placement: n })} transition-all duration-200 ease-in-out ` + (e && !m ? "opacity-100 scale-100" : "opacity-0 scale-95 pointer-events-none"),
134
+ role: "dialog",
135
+ ...g,
136
+ tabIndex: 0,
137
+ "aria-hidden": !e,
138
+ children: v
139
+ }
140
+ )
141
+ }
142
+ );
143
+ }, D = Object.assign(T, {
144
+ Header: E,
145
+ Body: R,
146
+ Footer: M
147
+ });
148
+ export {
149
+ D as M
150
+ };
@@ -1,4 +1,4 @@
1
- import { B as s, T as b } from "../tabs-BbOkYchB.js";
1
+ import { B as s, T as b } from "../tabs-DYcTvVao.js";
2
2
  export {
3
3
  s as Breadcrumbs,
4
4
  b as Tabs
@@ -1,8 +1,8 @@
1
- import { B as e, D as r } from "../bottom-sheet-Difan0U1.js";
2
- import { M as s, a as m } from "../menu-Bm-yPIMN.js";
1
+ import { B as e, D as r, M as t } from "../bottom-sheet-CHRSxXRE.js";
2
+ import { M } from "../modal-FqewbVts.js";
3
3
  export {
4
4
  e as BottomSheet,
5
5
  r as Drawer,
6
- s as Menu,
7
- m as Modal
6
+ t as Menu,
7
+ M as Modal
8
8
  };
@@ -1,19 +1,18 @@
1
- import { A as t, a as o, b as r, B as e, c as n, d as l, S as B, T as c, e as T } from "../tile-BjhJ5Mvl.js";
2
- import { B as d, a as u, C as A, b as x, I as C, T as I } from "../calendar-CUjVZ7Ap.js";
1
+ import { A as t, a as o, b as n, B as r, c as e, d as l, e as c, f as B, C as d, g as u, I as A, S as T, T as b, h as C, i as I } from "../tile-B9bt2AY6.js";
3
2
  export {
4
3
  t as Alert,
5
4
  o as Anchor,
6
- r as Avatar,
7
- e as Badge,
8
- n as Brand,
9
- d as Button,
10
- l as ButtonFloat,
11
- u as ButtonIcon,
12
- A as Calculator,
13
- x as Calendar,
14
- C as Icon,
15
- B as Snackbar,
16
- c as Table,
17
- I as Text,
18
- T as Tile
5
+ n as Avatar,
6
+ r as Badge,
7
+ e as Brand,
8
+ l as Button,
9
+ c as ButtonFloat,
10
+ B as ButtonIcon,
11
+ d as Calculator,
12
+ u as Calendar,
13
+ A as Icon,
14
+ T as Snackbar,
15
+ b as Table,
16
+ C as Text,
17
+ I as Tile
19
18
  };
@@ -1,4 +1,4 @@
1
- import { c as l, j as o, a as d } from "./index-DOdDlCoL.js";
1
+ import { a as l, j as o, c as d } from "./index-C1uJQB34.js";
2
2
  import * as m from "react";
3
3
  import u, { forwardRef as f } from "react";
4
4
  const p = l(
@@ -1,4 +1,4 @@
1
- import { c as d, j as o, a as u } from "./index-DOdDlCoL.js";
1
+ import { a as d, j as o, c as u } from "./index-C1uJQB34.js";
2
2
  import { forwardRef as f, createContext as x, useContext as g, useState as p, useLayoutEffect as y, useRef as h } from "react";
3
3
  const w = d(
4
4
  "flex items-center gap-2 text-sm text-tertiary",