@dimasbaguspm/versaur 0.0.0 → 0.0.2

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 (72) hide show
  1. package/dist/components/bottom-bar/bottom-bar.atoms.d.ts +1 -1
  2. package/dist/components/bottom-bar/bottom-bar.d.ts +1 -1
  3. package/dist/components/bottom-bar/types.d.ts +3 -2
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/index.js +6996 -66
  6. package/package.json +2 -10
  7. package/dist/alert-DzSPXqwS.js +0 -167
  8. package/dist/app-bar-B4nQkgdL.js +0 -92
  9. package/dist/avatar-Bsn24V6g.js +0 -91
  10. package/dist/badge-DqLCHm9q.js +0 -184
  11. package/dist/bottom-bar-DOQ3gVwW.js +0 -73
  12. package/dist/breadcrumbs-PJV3izUu.js +0 -59
  13. package/dist/button-C8OibEPE.js +0 -81
  14. package/dist/button-float-B8tdLJkX.js +0 -107
  15. package/dist/button-icon-CWji4cBA.js +0 -89
  16. package/dist/calendar-CkLj89o2.js +0 -112
  17. package/dist/checkbox-input-CSboebwt.js +0 -167
  18. package/dist/chip-input-C1PJPDFq.js +0 -189
  19. package/dist/cn-Ca4KprQ1.js +0 -2730
  20. package/dist/components/alert.js +0 -4
  21. package/dist/components/app-bar.js +0 -4
  22. package/dist/components/avatar.js +0 -4
  23. package/dist/components/badge.js +0 -4
  24. package/dist/components/bottom-bar.js +0 -4
  25. package/dist/components/breadcrumbs.js +0 -4
  26. package/dist/components/button-float.js +0 -4
  27. package/dist/components/button-icon.js +0 -4
  28. package/dist/components/button.js +0 -4
  29. package/dist/components/calendar.js +0 -4
  30. package/dist/components/checkbox-input.js +0 -4
  31. package/dist/components/chip-input.js +0 -4
  32. package/dist/components/date-single-picker-input.js +0 -4
  33. package/dist/components/drawer.js +0 -9
  34. package/dist/components/icon.js +0 -4
  35. package/dist/components/loading-indicator.js +0 -4
  36. package/dist/components/menu.js +0 -4
  37. package/dist/components/modal.js +0 -4
  38. package/dist/components/radio-input.js +0 -4
  39. package/dist/components/segment-multiple-input.js +0 -4
  40. package/dist/components/segment-single-input.js +0 -4
  41. package/dist/components/select-input.js +0 -4
  42. package/dist/components/skeleton.js +0 -4
  43. package/dist/components/snackbar.js +0 -4
  44. package/dist/components/switch-input.js +0 -7
  45. package/dist/components/tabs.js +0 -4
  46. package/dist/components/text-input.js +0 -4
  47. package/dist/components/text.js +0 -4
  48. package/dist/components/textarea-input.js +0 -4
  49. package/dist/components/tile.js +0 -4
  50. package/dist/components/top-bar.js +0 -4
  51. package/dist/date-single-picker-input--Ew0O9NQ.js +0 -252
  52. package/dist/drawer-DrnAR2a4.js +0 -218
  53. package/dist/helpers-CEDtBUGM.js +0 -37
  54. package/dist/hooks/index.js +0 -1
  55. package/dist/icon-D-lTZMHY.js +0 -44
  56. package/dist/index-DU1SCUkk.js +0 -329
  57. package/dist/loading-indicator-BZMnT5PA.js +0 -168
  58. package/dist/menu-BZvilMF7.js +0 -174
  59. package/dist/modal-BGAtqMl9.js +0 -149
  60. package/dist/radio-input-BRGoevZY.js +0 -173
  61. package/dist/segment-multiple-input-VwHCqFd6.js +0 -229
  62. package/dist/segment-single-input-Cqoo7-C2.js +0 -228
  63. package/dist/select-input-DCb0usvK.js +0 -108
  64. package/dist/skeleton-D4X5USf_.js +0 -59
  65. package/dist/snackbar-CYias-fJ.js +0 -79
  66. package/dist/switch-input-C5s1lvYh.js +0 -186
  67. package/dist/tabs-C8aRKfxS.js +0 -216
  68. package/dist/text-B7e-au41.js +0 -120
  69. package/dist/text-input-BsWvUk_H.js +0 -73
  70. package/dist/textarea-input-DZExXEE8.js +0 -102
  71. package/dist/tile-Du7YciCG.js +0 -51
  72. package/dist/top-bar-ErHvwR4K.js +0 -62
@@ -1,79 +0,0 @@
1
- import { c as i, j as a } from "./index-DU1SCUkk.js";
2
- import { forwardRef as d } from "react";
3
- import { c as l } from "./cn-Ca4KprQ1.js";
4
- import { B as m } from "./button-icon-CWji4cBA.js";
5
- import { X as g } from "lucide-react";
6
- const u = i(
7
- "flex items-center gap-2 px-4 py-2 rounded-sm w-fit max-w-sm relative bg-white shadow-sm",
8
- {
9
- variants: {
10
- color: {
11
- success: "text-success bg-success/5 border-l-4 border-success",
12
- info: "text-info bg-info/5 border-l-4 border-info",
13
- warning: "text-warning bg-warning/5 border-l-4 border-warning",
14
- danger: "text-danger bg-danger/5 border-l-4 border-danger"
15
- }
16
- },
17
- defaultVariants: {
18
- color: "success"
19
- }
20
- }
21
- );
22
- function b(s) {
23
- switch (s) {
24
- case "info":
25
- return "info-ghost";
26
- case "warning":
27
- return "warning-ghost";
28
- case "danger":
29
- return "danger-ghost";
30
- case "success":
31
- default:
32
- return "success-ghost";
33
- }
34
- }
35
- const x = ({
36
- children: s,
37
- ...r
38
- }) => /* @__PURE__ */ a.jsx(
39
- "span",
40
- {
41
- className: "flex-1 truncate text-base font-medium",
42
- "data-testid": "snackbar-text",
43
- ...r,
44
- children: s
45
- }
46
- ), f = ({
47
- children: s,
48
- ...r
49
- }) => /* @__PURE__ */ a.jsx("span", { className: "ml-2", "data-testid": "snackbar-action", ...r, children: s }), v = d(
50
- ({ children: s, action: r, onClose: t, color: e, className: n, ...o }, c) => /* @__PURE__ */ a.jsxs(
51
- "div",
52
- {
53
- ref: c,
54
- role: "status",
55
- "aria-live": "polite",
56
- className: l(u({ color: e }), n),
57
- ...o,
58
- children: [
59
- /* @__PURE__ */ a.jsx(x, { children: s }),
60
- r && /* @__PURE__ */ a.jsx(f, { children: r }),
61
- /* @__PURE__ */ a.jsx(
62
- m,
63
- {
64
- variant: b(e),
65
- size: "sm",
66
- shape: "rounded",
67
- "aria-label": "Close",
68
- onClick: t,
69
- className: "ml-2",
70
- children: /* @__PURE__ */ a.jsx(g, { size: 16 })
71
- }
72
- )
73
- ]
74
- }
75
- )
76
- );
77
- export {
78
- v as S
79
- };
@@ -1,186 +0,0 @@
1
- import { c as f, j as r } from "./index-DU1SCUkk.js";
2
- import N, { useState as S, useId as C } from "react";
3
- import { c as t } from "./cn-Ca4KprQ1.js";
4
- const I = f(
5
- "relative inline-flex items-center transition-colors duration-200",
6
- {
7
- variants: {
8
- color: {
9
- primary: "",
10
- secondary: "",
11
- tertiary: "",
12
- ghost: "",
13
- neutral: "",
14
- success: "",
15
- info: "",
16
- warning: "",
17
- danger: ""
18
- },
19
- size: {
20
- sm: "h-4 w-8",
21
- md: "h-5 w-10",
22
- lg: "h-6 w-12"
23
- },
24
- disabled: {
25
- true: "opacity-50 cursor-not-allowed",
26
- false: ""
27
- },
28
- checked: {
29
- true: "",
30
- false: ""
31
- }
32
- },
33
- defaultVariants: {
34
- color: "primary",
35
- size: "md",
36
- disabled: !1,
37
- checked: !1
38
- },
39
- compoundVariants: [
40
- { checked: !0, color: "primary", class: "bg-[var(--color-primary)]" },
41
- {
42
- checked: !0,
43
- color: "secondary",
44
- class: "bg-[var(--color-secondary)]"
45
- },
46
- { checked: !0, color: "tertiary", class: "bg-[var(--color-tertiary)]" },
47
- { checked: !0, color: "ghost", class: "bg-[var(--color-ghost)]" },
48
- { checked: !0, color: "neutral", class: "bg-[var(--color-neutral)]" },
49
- { checked: !0, color: "success", class: "bg-[var(--color-success)]" },
50
- { checked: !0, color: "info", class: "bg-[var(--color-info)]" },
51
- { checked: !0, color: "warning", class: "bg-[var(--color-warning)]" },
52
- { checked: !0, color: "danger", class: "bg-[var(--color-danger)]" },
53
- { checked: !1, class: "bg-white border border-slate-300" }
54
- ]
55
- }
56
- ), V = f(
57
- "absolute rounded-full transition-transform duration-200",
58
- {
59
- variants: {
60
- size: {
61
- sm: "h-3 w-3",
62
- md: "h-4 w-4",
63
- lg: "h-5 w-5"
64
- },
65
- checked: {
66
- true: "translate-x-full bg-white left-1.5",
67
- false: "bg-slate-300 left-0.5"
68
- }
69
- },
70
- defaultVariants: {
71
- size: "md",
72
- checked: !1
73
- }
74
- }
75
- ), z = ({
76
- color: e = "primary",
77
- size: s = "md",
78
- disabled: a = !1,
79
- className: c,
80
- checked: o
81
- }) => /* @__PURE__ */ r.jsx(
82
- "span",
83
- {
84
- className: t(
85
- I({ color: e, size: s, disabled: a, checked: o }),
86
- "rounded-full pointer-events-none",
87
- c
88
- ),
89
- "aria-hidden": "true"
90
- }
91
- ), R = ({ size: e = "md", checked: s = !1 }) => /* @__PURE__ */ r.jsx("span", { className: t(V({ size: e, checked: s })), "aria-hidden": "true" }), T = ({ label: e, htmlFor: s, placement: a = "top", disabled: c = !1 }) => e ? /* @__PURE__ */ r.jsx(
92
- "label",
93
- {
94
- htmlFor: s,
95
- className: t(
96
- "text-sm select-none font-medium text-foreground",
97
- a === "inline" ? "ml-2 mb-0" : "mb-1",
98
- c && "opacity-50 cursor-not-allowed"
99
- ),
100
- children: e
101
- }
102
- ) : null, _ = N.forwardRef(
103
- ({
104
- checked: e,
105
- defaultChecked: s,
106
- onCheckedChange: a,
107
- color: c = "primary",
108
- size: o = "md",
109
- label: d,
110
- labelPlacement: l = "top",
111
- disabled: n = !1,
112
- className: p,
113
- id: g,
114
- ariaLabel: k,
115
- ...b
116
- }, w) => {
117
- const [x, y] = S(
118
- s ?? !1
119
- ), v = C(), h = g || v, u = typeof e == "boolean", i = u ? e : x, j = (m) => {
120
- u || y(m.target.checked), a?.(m.target.checked);
121
- };
122
- return /* @__PURE__ */ r.jsxs(
123
- "div",
124
- {
125
- className: t(
126
- "flex flex-col",
127
- l === "inline" && "flex-row items-center",
128
- p
129
- ),
130
- children: [
131
- /* @__PURE__ */ r.jsx(
132
- T,
133
- {
134
- label: d,
135
- htmlFor: h,
136
- placement: l,
137
- disabled: n
138
- }
139
- ),
140
- /* @__PURE__ */ r.jsxs(
141
- "span",
142
- {
143
- className: t(
144
- "relative flex items-center",
145
- l === "inline" && "ml-2"
146
- ),
147
- children: [
148
- /* @__PURE__ */ r.jsx(
149
- "input",
150
- {
151
- ref: w,
152
- type: "checkbox",
153
- id: h,
154
- "aria-label": k || d,
155
- checked: i,
156
- disabled: n,
157
- onChange: j,
158
- className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",
159
- ...b
160
- }
161
- ),
162
- /* @__PURE__ */ r.jsx(
163
- z,
164
- {
165
- color: c,
166
- size: o,
167
- disabled: n,
168
- checked: i
169
- }
170
- ),
171
- /* @__PURE__ */ r.jsx(R, { size: o, checked: i })
172
- ]
173
- }
174
- )
175
- ]
176
- }
177
- );
178
- }
179
- );
180
- _.displayName = "SwitchInput";
181
- export {
182
- _ as S,
183
- z as a,
184
- R as b,
185
- T as c
186
- };
@@ -1,216 +0,0 @@
1
- import { c as l, j as c } from "./index-DU1SCUkk.js";
2
- import { createContext as g, useContext as v, useState as x, useLayoutEffect as m, useRef as y } from "react";
3
- import { c as u } from "./cn-Ca4KprQ1.js";
4
- const b = g(null), f = () => {
5
- const t = v(b);
6
- if (!t)
7
- throw new Error("useTabsContext must be used within a TabsProvider");
8
- return t;
9
- }, h = l(
10
- "inline-flex items-center justify-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none select-none px-4 py-2 text-base bg-transparent relative border-b-2 border-transparent",
11
- {
12
- variants: {
13
- active: {
14
- true: "font-medium",
15
- false: "font-normal"
16
- },
17
- color: {
18
- primary: "",
19
- secondary: "",
20
- tertiary: "",
21
- ghost: "",
22
- neutral: ""
23
- }
24
- },
25
- compoundVariants: [
26
- // Primary
27
- {
28
- color: "primary",
29
- active: !0,
30
- class: "text-coral border-coral"
31
- },
32
- {
33
- color: "primary",
34
- active: !1,
35
- class: "text-foreground hover:text-coral"
36
- },
37
- // Secondary
38
- {
39
- color: "secondary",
40
- active: !0,
41
- class: "text-sage border-sage"
42
- },
43
- {
44
- color: "secondary",
45
- active: !1,
46
- class: "text-foreground hover:text-sage"
47
- },
48
- // Tertiary
49
- {
50
- color: "tertiary",
51
- active: !0,
52
- class: "text-mist border-mist"
53
- },
54
- {
55
- color: "tertiary",
56
- active: !1,
57
- class: "text-foreground hover:text-mist"
58
- },
59
- // Ghost
60
- {
61
- color: "ghost",
62
- active: !0,
63
- class: "text-slate border-slate"
64
- },
65
- {
66
- color: "ghost",
67
- active: !1,
68
- class: "text-foreground hover:text-slate"
69
- },
70
- // Neutral
71
- {
72
- color: "neutral",
73
- active: !0,
74
- class: "text-foreground border-light-gray"
75
- },
76
- {
77
- color: "neutral",
78
- active: !1,
79
- class: "text-foreground hover:text-light-gray"
80
- }
81
- ],
82
- defaultVariants: {
83
- active: !1,
84
- color: "primary"
85
- }
86
- }
87
- ), p = l(
88
- "flex flex-row w-full border-b border-neutral overflow-x-auto whitespace-nowrap",
89
- {
90
- variants: {},
91
- defaultVariants: {}
92
- }
93
- ), T = l(
94
- "absolute bottom-0 h-0.5 rounded transition-all duration-300",
95
- {
96
- variants: {
97
- color: {
98
- primary: "bg-coral",
99
- secondary: "bg-sage",
100
- tertiary: "bg-mist",
101
- ghost: "bg-slate",
102
- neutral: "bg-light-gray"
103
- }
104
- },
105
- defaultVariants: {
106
- color: "primary"
107
- }
108
- }
109
- ), w = ({
110
- value: t,
111
- children: e,
112
- className: r,
113
- ...a
114
- }) => {
115
- const { activeTab: s, setActiveTab: n, color: i } = f(), o = s === t;
116
- return /* @__PURE__ */ c.jsx(
117
- "button",
118
- {
119
- role: "tab",
120
- id: `tabs-trigger-${t}`,
121
- "aria-selected": o,
122
- "aria-controls": `tabs-content-${t}`,
123
- tabIndex: o ? 0 : -1,
124
- className: u(
125
- h({
126
- active: o,
127
- color: i
128
- }),
129
- r
130
- ),
131
- onClick: () => n(t),
132
- type: "button",
133
- ...a,
134
- children: e
135
- }
136
- );
137
- }, j = ({
138
- left: t,
139
- width: e,
140
- className: r,
141
- ...a
142
- }) => {
143
- const { color: s } = f();
144
- return /* @__PURE__ */ c.jsx(
145
- "div",
146
- {
147
- "aria-hidden": !0,
148
- className: u(T({ color: s }), r),
149
- style: {
150
- left: t,
151
- width: e,
152
- pointerEvents: "none"
153
- },
154
- ...a
155
- }
156
- );
157
- };
158
- function V(t, e, r) {
159
- const [a, s] = x({
160
- left: 0,
161
- width: 0
162
- });
163
- return m(() => {
164
- if (!e.current) return;
165
- const n = e.current.querySelector(
166
- `#tabs-trigger-${t}`
167
- );
168
- if (n) {
169
- const { offsetLeft: i, offsetWidth: o } = n;
170
- s({ left: i, width: o }), n.scrollIntoView({
171
- behavior: "smooth",
172
- inline: "center",
173
- block: "nearest"
174
- });
175
- }
176
- }, [t, r, e]), a;
177
- }
178
- const C = ({
179
- value: t,
180
- onValueChange: e,
181
- children: r,
182
- className: a,
183
- color: s = "primary",
184
- ...n
185
- }) => {
186
- const i = {
187
- activeTab: t,
188
- setActiveTab: e,
189
- color: s
190
- }, o = y(null), d = V(t, o, r);
191
- return /* @__PURE__ */ c.jsx(b.Provider, { value: i, children: /* @__PURE__ */ c.jsxs(
192
- "div",
193
- {
194
- role: "tablist",
195
- className: u(p(), a),
196
- ref: o,
197
- style: { position: "relative" },
198
- ...n,
199
- children: [
200
- r,
201
- /* @__PURE__ */ c.jsx(
202
- j,
203
- {
204
- left: d.left,
205
- width: d.width
206
- }
207
- )
208
- ]
209
- }
210
- ) });
211
- }, E = Object.assign(C, {
212
- Trigger: w
213
- });
214
- export {
215
- E as T
216
- };
@@ -1,120 +0,0 @@
1
- import { c as d, j as g } from "./index-DU1SCUkk.js";
2
- import { forwardRef as p } from "react";
3
- import { c as h } from "./cn-Ca4KprQ1.js";
4
- const u = d("", {
5
- variants: {
6
- color: {
7
- primary: "text-primary",
8
- secondary: "text-secondary",
9
- tertiary: "text-tertiary",
10
- ghost: "text-ghost",
11
- neutral: "text-ghost",
12
- success: "text-success",
13
- info: "text-info",
14
- warning: "text-warning",
15
- danger: "text-danger"
16
- },
17
- hasUnderline: {
18
- true: "underline",
19
- false: ""
20
- },
21
- isCapitalize: {
22
- true: "capitalize",
23
- false: ""
24
- },
25
- align: {
26
- left: "text-left",
27
- center: "text-center",
28
- right: "text-right",
29
- justify: "text-justify"
30
- },
31
- italic: {
32
- true: "italic",
33
- false: ""
34
- },
35
- clamp: {
36
- 1: "line-clamp-1",
37
- 2: "line-clamp-2",
38
- 3: "line-clamp-3",
39
- 4: "line-clamp-4",
40
- 5: "line-clamp-5",
41
- none: ""
42
- },
43
- ellipsis: {
44
- true: "truncate",
45
- false: ""
46
- },
47
- as: {
48
- h1: "font-bold text-4xl leading-loose",
49
- h2: "font-semibold text-3xl leading-relaxed",
50
- h3: "font-medium text-2xl leading-relaxed",
51
- h4: "font-bold text-xl leading-normal",
52
- h5: "font-semibold text-lg leading-normal",
53
- h6: "font-medium text-base leading-normal",
54
- p: "font-normal text-base leading-normal",
55
- span: "font-normal text-base leading-normal",
56
- label: "font-normal text-xs leading-normal"
57
- }
58
- },
59
- defaultVariants: {
60
- color: "neutral",
61
- hasUnderline: !1,
62
- isCapitalize: !1,
63
- align: "left",
64
- italic: !1,
65
- clamp: "none",
66
- ellipsis: !1,
67
- as: "span"
68
- }
69
- }), T = p(
70
- ({
71
- as: e = "span",
72
- color: t = "ghost",
73
- hasUnderline: a = !1,
74
- isCapitalize: l = !1,
75
- align: n = "left",
76
- italic: s = !1,
77
- clamp: i = "none",
78
- ellipsis: r = !1,
79
- className: o,
80
- children: f,
81
- ...x
82
- }, c) => {
83
- const m = [
84
- "h1",
85
- "h2",
86
- "h3",
87
- "h4",
88
- "h5",
89
- "h6",
90
- "p",
91
- "span",
92
- "label"
93
- ].includes(e) ? e : "span";
94
- return /* @__PURE__ */ g.jsx(
95
- e,
96
- {
97
- ref: c,
98
- className: h(
99
- u({
100
- color: t,
101
- hasUnderline: a,
102
- isCapitalize: l,
103
- align: n,
104
- italic: s,
105
- clamp: i,
106
- ellipsis: r,
107
- // @ts-expect-error - `as` is not a valid variant
108
- as: m
109
- }),
110
- o
111
- ),
112
- ...x,
113
- children: f
114
- }
115
- );
116
- }
117
- );
118
- export {
119
- T
120
- };
@@ -1,73 +0,0 @@
1
- import { j as t } from "./index-DU1SCUkk.js";
2
- import l from "react";
3
- import { c as m } from "./cn-Ca4KprQ1.js";
4
- import { t as h } from "./helpers-CEDtBUGM.js";
5
- const v = l.forwardRef(
6
- ({
7
- variant: c = "primary",
8
- label: d,
9
- leftContent: s,
10
- rightContent: a,
11
- helperText: r,
12
- error: n,
13
- className: x,
14
- disabled: i,
15
- id: p,
16
- ...u
17
- }, f) => {
18
- const j = l.useId(), o = p || j, e = !!n;
19
- return /* @__PURE__ */ t.jsxs("div", { children: [
20
- /* @__PURE__ */ t.jsx(
21
- "label",
22
- {
23
- htmlFor: o,
24
- className: "block text-sm font-medium text-foreground mb-2",
25
- children: d
26
- }
27
- ),
28
- /* @__PURE__ */ t.jsxs("div", { className: m("relative w-full", x), children: [
29
- s && /* @__PURE__ */ t.jsx(
30
- "span",
31
- {
32
- className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
33
- "data-testid": "left-content",
34
- children: s
35
- }
36
- ),
37
- /* @__PURE__ */ t.jsx(
38
- "input",
39
- {
40
- ref: f,
41
- id: o,
42
- "aria-invalid": e,
43
- "aria-disabled": i,
44
- disabled: i,
45
- className: m(
46
- h({
47
- variant: e ? "danger" : c
48
- }),
49
- s ? "pl-9" : "pl-3",
50
- a ? "pr-9" : "pr-3",
51
- "h-10"
52
- ),
53
- ...u
54
- }
55
- ),
56
- a && /* @__PURE__ */ t.jsx(
57
- "span",
58
- {
59
- className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
60
- "data-testid": "right-content",
61
- children: a
62
- }
63
- )
64
- ] }),
65
- e && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: n }),
66
- !e && r && /* @__PURE__ */ t.jsx("div", { className: "mt-1 text-sm text-gray-600", children: r })
67
- ] });
68
- }
69
- );
70
- v.displayName = "TextInput";
71
- export {
72
- v as T
73
- };