@dimasbaguspm/versaur 0.0.0 → 0.0.1

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 (68) hide show
  1. package/dist/index.js +6996 -66
  2. package/package.json +2 -10
  3. package/dist/alert-DzSPXqwS.js +0 -167
  4. package/dist/app-bar-B4nQkgdL.js +0 -92
  5. package/dist/avatar-Bsn24V6g.js +0 -91
  6. package/dist/badge-DqLCHm9q.js +0 -184
  7. package/dist/bottom-bar-DOQ3gVwW.js +0 -73
  8. package/dist/breadcrumbs-PJV3izUu.js +0 -59
  9. package/dist/button-C8OibEPE.js +0 -81
  10. package/dist/button-float-B8tdLJkX.js +0 -107
  11. package/dist/button-icon-CWji4cBA.js +0 -89
  12. package/dist/calendar-CkLj89o2.js +0 -112
  13. package/dist/checkbox-input-CSboebwt.js +0 -167
  14. package/dist/chip-input-C1PJPDFq.js +0 -189
  15. package/dist/cn-Ca4KprQ1.js +0 -2730
  16. package/dist/components/alert.js +0 -4
  17. package/dist/components/app-bar.js +0 -4
  18. package/dist/components/avatar.js +0 -4
  19. package/dist/components/badge.js +0 -4
  20. package/dist/components/bottom-bar.js +0 -4
  21. package/dist/components/breadcrumbs.js +0 -4
  22. package/dist/components/button-float.js +0 -4
  23. package/dist/components/button-icon.js +0 -4
  24. package/dist/components/button.js +0 -4
  25. package/dist/components/calendar.js +0 -4
  26. package/dist/components/checkbox-input.js +0 -4
  27. package/dist/components/chip-input.js +0 -4
  28. package/dist/components/date-single-picker-input.js +0 -4
  29. package/dist/components/drawer.js +0 -9
  30. package/dist/components/icon.js +0 -4
  31. package/dist/components/loading-indicator.js +0 -4
  32. package/dist/components/menu.js +0 -4
  33. package/dist/components/modal.js +0 -4
  34. package/dist/components/radio-input.js +0 -4
  35. package/dist/components/segment-multiple-input.js +0 -4
  36. package/dist/components/segment-single-input.js +0 -4
  37. package/dist/components/select-input.js +0 -4
  38. package/dist/components/skeleton.js +0 -4
  39. package/dist/components/snackbar.js +0 -4
  40. package/dist/components/switch-input.js +0 -7
  41. package/dist/components/tabs.js +0 -4
  42. package/dist/components/text-input.js +0 -4
  43. package/dist/components/text.js +0 -4
  44. package/dist/components/textarea-input.js +0 -4
  45. package/dist/components/tile.js +0 -4
  46. package/dist/components/top-bar.js +0 -4
  47. package/dist/date-single-picker-input--Ew0O9NQ.js +0 -252
  48. package/dist/drawer-DrnAR2a4.js +0 -218
  49. package/dist/helpers-CEDtBUGM.js +0 -37
  50. package/dist/hooks/index.js +0 -1
  51. package/dist/icon-D-lTZMHY.js +0 -44
  52. package/dist/index-DU1SCUkk.js +0 -329
  53. package/dist/loading-indicator-BZMnT5PA.js +0 -168
  54. package/dist/menu-BZvilMF7.js +0 -174
  55. package/dist/modal-BGAtqMl9.js +0 -149
  56. package/dist/radio-input-BRGoevZY.js +0 -173
  57. package/dist/segment-multiple-input-VwHCqFd6.js +0 -229
  58. package/dist/segment-single-input-Cqoo7-C2.js +0 -228
  59. package/dist/select-input-DCb0usvK.js +0 -108
  60. package/dist/skeleton-D4X5USf_.js +0 -59
  61. package/dist/snackbar-CYias-fJ.js +0 -79
  62. package/dist/switch-input-C5s1lvYh.js +0 -186
  63. package/dist/tabs-C8aRKfxS.js +0 -216
  64. package/dist/text-B7e-au41.js +0 -120
  65. package/dist/text-input-BsWvUk_H.js +0 -73
  66. package/dist/textarea-input-DZExXEE8.js +0 -102
  67. package/dist/tile-Du7YciCG.js +0 -51
  68. package/dist/top-bar-ErHvwR4K.js +0 -62
@@ -1,189 +0,0 @@
1
- import { c as w, j as e } from "./index-DU1SCUkk.js";
2
- import x, { createContext as N, useContext as I } from "react";
3
- import { c as f } from "./cn-Ca4KprQ1.js";
4
- import { Check as k } from "lucide-react";
5
- const v = N(
6
- null
7
- ), O = () => {
8
- const s = I(v);
9
- if (!s)
10
- throw new Error("useChipInputContext must be used within ChipInputContext");
11
- return s;
12
- }, R = w(
13
- "inline-flex items-center px-2 py-1 text-xs bg-neutral rounded-full font-medium transition-colors duration-200 cursor-pointer border border-slate-100",
14
- {
15
- variants: {
16
- variant: {
17
- primary: [
18
- "hover:bg-coral/10",
19
- "hover:border-coral/30",
20
- "focus:border-coral/30",
21
- "data-[selected=true]:bg-coral/10",
22
- "data-[selected=true]:border-coral"
23
- ].join(" "),
24
- secondary: [
25
- "hover:bg-sage/10",
26
- "hover:border-sage/30",
27
- "focus:border-sage/30",
28
- "data-[selected=true]:bg-sage/10",
29
- "data-[selected=true]:border-sage"
30
- ].join(" "),
31
- tertiary: [
32
- "hover:bg-mist/10",
33
- "hover:border-mist/30",
34
- "focus:border-mist/30",
35
- "data-[selected=true]:bg-mist/10",
36
- "data-[selected=true]:border-mist"
37
- ].join(" "),
38
- ghost: [
39
- "hover:bg-slate/10",
40
- "hover:border-slate/30",
41
- "focus:border-slate/30",
42
- "data-[selected=true]:bg-slate/10",
43
- "data-[selected=true]:border-slate"
44
- ].join(" "),
45
- neutral: [
46
- "hover:bg-gray/10",
47
- "hover:border-gray/30",
48
- "focus:border-gray/30",
49
- "data-[selected=true]:bg-gray/10",
50
- "data-[selected=true]:border-gray"
51
- ].join(" "),
52
- success: [
53
- "hover:bg-success/10",
54
- "hover:border-success/30",
55
- "focus:border-success/30",
56
- "data-[selected=true]:bg-success/10",
57
- "data-[selected=true]:border-success"
58
- ].join(" "),
59
- info: [
60
- "hover:bg-info/10",
61
- "hover:border-info/30",
62
- "focus:border-info/30",
63
- "data-[selected=true]:bg-info/10",
64
- "data-[selected=true]:border-info"
65
- ].join(" "),
66
- warning: [
67
- "hover:bg-warning/10",
68
- "hover:border-warning/30",
69
- "focus:border-warning/30",
70
- "data-[selected=true]:bg-warning/10",
71
- "data-[selected=true]:border-warning"
72
- ].join(" "),
73
- danger: [
74
- "hover:bg-danger/10",
75
- "hover:border-danger/30",
76
- "focus:border-danger/30",
77
- "data-[selected=true]:bg-danger/10",
78
- "data-[selected=true]:border-danger"
79
- ].join(" ")
80
- },
81
- selected: {
82
- true: "",
83
- false: ""
84
- }
85
- },
86
- defaultVariants: {
87
- variant: "primary",
88
- selected: !1
89
- }
90
- }
91
- ), j = x.forwardRef(({ children: s, className: d, disabled: c, id: i, value: o, ...l }, g) => {
92
- const a = O(), b = x.useId(), u = i || b, n = c || a.disabled, r = a.error ? "danger" : a.variant || "primary", t = a.value?.includes(o) ?? !1, h = (y) => {
93
- if (!n) {
94
- const p = a.value || [];
95
- let m;
96
- t ? m = p.filter((C) => C !== o) : m = [...p, o], a.onChange?.(m);
97
- }
98
- l.onChange?.(y);
99
- };
100
- return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
101
- /* @__PURE__ */ e.jsx(
102
- "input",
103
- {
104
- ref: g,
105
- type: "checkbox",
106
- id: u,
107
- name: `${a.name}[]`,
108
- value: o,
109
- checked: t,
110
- disabled: n,
111
- onChange: h,
112
- className: "sr-only",
113
- ...l
114
- }
115
- ),
116
- /* @__PURE__ */ e.jsx(
117
- "label",
118
- {
119
- htmlFor: u,
120
- "data-selected": t,
121
- className: f(
122
- R({
123
- variant: r,
124
- selected: t
125
- }),
126
- n && "opacity-50 cursor-not-allowed pointer-events-none",
127
- d
128
- ),
129
- children: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
130
- /* @__PURE__ */ e.jsx(
131
- "span",
132
- {
133
- className: f(
134
- "flex items-center",
135
- "transition-transform transition-opacity duration-200",
136
- t ? "opacity-100 scale-100 mr-1" : "opacity-0 scale-75"
137
- ),
138
- "aria-hidden": "true",
139
- children: t && /* @__PURE__ */ e.jsx(
140
- k,
141
- {
142
- size: 16,
143
- className: r === "primary" ? "text-coral" : r === "secondary" ? "text-sage" : r === "tertiary" ? "text-mist" : r === "ghost" ? "text-slate" : r === "success" ? "text-success" : r === "info" ? "text-info" : r === "warning" ? "text-warning" : r === "danger" ? "text-danger" : "text-coral"
144
- }
145
- )
146
- }
147
- ),
148
- s
149
- ] })
150
- }
151
- )
152
- ] });
153
- });
154
- j.displayName = "ChipOption";
155
- const V = x.forwardRef(
156
- ({
157
- variant: s = "primary",
158
- label: d,
159
- helperText: c,
160
- error: i,
161
- className: o,
162
- disabled: l,
163
- name: g,
164
- value: a = [],
165
- onChange: b,
166
- children: u,
167
- ...n
168
- }, r) => {
169
- const t = !!i, h = {
170
- variant: s,
171
- disabled: l,
172
- error: t,
173
- name: g,
174
- value: a,
175
- onChange: b
176
- };
177
- return /* @__PURE__ */ e.jsx(v.Provider, { value: h, children: /* @__PURE__ */ e.jsxs("div", { ref: r, className: f("w-full", o), ...n, children: [
178
- d && /* @__PURE__ */ e.jsx("div", { className: "block text-sm font-medium text-foreground mb-3", children: d }),
179
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-2", children: u }),
180
- t && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-danger", role: "alert", children: i }),
181
- !t && c && /* @__PURE__ */ e.jsx("div", { className: "mt-2 text-sm text-gray-600", children: c })
182
- ] }) });
183
- }
184
- ), B = Object.assign(V, {
185
- Option: j
186
- });
187
- export {
188
- B as C
189
- };