@dimasbaguspm/versaur 0.0.0
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/README.md +81 -0
- package/dist/alert-DzSPXqwS.js +167 -0
- package/dist/app-bar-B4nQkgdL.js +92 -0
- package/dist/avatar-Bsn24V6g.js +91 -0
- package/dist/badge-DqLCHm9q.js +184 -0
- package/dist/bottom-bar-DOQ3gVwW.js +73 -0
- package/dist/breadcrumbs-PJV3izUu.js +59 -0
- package/dist/button-C8OibEPE.js +81 -0
- package/dist/button-float-B8tdLJkX.js +107 -0
- package/dist/button-icon-CWji4cBA.js +89 -0
- package/dist/calendar-CkLj89o2.js +112 -0
- package/dist/checkbox-input-CSboebwt.js +167 -0
- package/dist/chip-input-C1PJPDFq.js +189 -0
- package/dist/cn-Ca4KprQ1.js +2730 -0
- package/dist/components/alert/alert.atoms.d.ts +6 -0
- package/dist/components/alert/alert.d.ts +31 -0
- package/dist/components/alert/alert.stories.d.ts +42 -0
- package/dist/components/alert/helpers.d.ts +14 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/types.d.ts +50 -0
- package/dist/components/alert.js +4 -0
- package/dist/components/app-bar/app-bar.atoms.d.ts +21 -0
- package/dist/components/app-bar/app-bar.d.ts +8 -0
- package/dist/components/app-bar/app-bar.stories.d.ts +19 -0
- package/dist/components/app-bar/helpers.d.ts +6 -0
- package/dist/components/app-bar/index.d.ts +2 -0
- package/dist/components/app-bar/types.d.ts +39 -0
- package/dist/components/app-bar.js +4 -0
- package/dist/components/avatar/avatar.atoms.d.ts +13 -0
- package/dist/components/avatar/avatar.d.ts +24 -0
- package/dist/components/avatar/avatar.stories.d.ts +42 -0
- package/dist/components/avatar/helpers.d.ts +14 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/types.d.ts +46 -0
- package/dist/components/avatar.js +4 -0
- package/dist/components/badge/badge.d.ts +24 -0
- package/dist/components/badge/badge.stories.d.ts +46 -0
- package/dist/components/badge/helpers.d.ts +10 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/types.d.ts +44 -0
- package/dist/components/badge.js +4 -0
- package/dist/components/bottom-bar/bottom-bar.atoms.d.ts +2 -0
- package/dist/components/bottom-bar/bottom-bar.d.ts +4 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +6 -0
- package/dist/components/bottom-bar/helpers.d.ts +7 -0
- package/dist/components/bottom-bar/index.d.ts +2 -0
- package/dist/components/bottom-bar/types.d.ts +32 -0
- package/dist/components/bottom-bar.js +4 -0
- package/dist/components/breadcrumbs/breadcrumbs.atoms.d.ts +9 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +16 -0
- package/dist/components/breadcrumbs/breadcrumbs.stories.d.ts +7 -0
- package/dist/components/breadcrumbs/helpers.d.ts +7 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/types.d.ts +21 -0
- package/dist/components/breadcrumbs.js +4 -0
- package/dist/components/button/button.d.ts +3 -0
- package/dist/components/button/button.stories.d.ts +50 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/types.d.ts +30 -0
- package/dist/components/button-float/button-float.d.ts +8 -0
- package/dist/components/button-float/button-float.stories.d.ts +27 -0
- package/dist/components/button-float/helpers.d.ts +4 -0
- package/dist/components/button-float/index.d.ts +2 -0
- package/dist/components/button-float/types.d.ts +31 -0
- package/dist/components/button-float.js +4 -0
- package/dist/components/button-icon/button-icon.d.ts +3 -0
- package/dist/components/button-icon/button-icon.stories.d.ts +45 -0
- package/dist/components/button-icon/index.d.ts +2 -0
- package/dist/components/button-icon/types.d.ts +48 -0
- package/dist/components/button-icon.js +4 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calendar/calendar.d.ts +8 -0
- package/dist/components/calendar/calendar.stories.d.ts +6 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/types.d.ts +20 -0
- package/dist/components/calendar.js +4 -0
- package/dist/components/checkbox-input/checkbox-input.atoms.d.ts +9 -0
- package/dist/components/checkbox-input/checkbox-input.d.ts +5 -0
- package/dist/components/checkbox-input/checkbox-input.stories.d.ts +44 -0
- package/dist/components/checkbox-input/context.d.ts +10 -0
- package/dist/components/checkbox-input/helpers.d.ts +11 -0
- package/dist/components/checkbox-input/index.d.ts +2 -0
- package/dist/components/checkbox-input/types.d.ts +46 -0
- package/dist/components/checkbox-input.js +4 -0
- package/dist/components/chip-input/chip-input.atoms.d.ts +10 -0
- package/dist/components/chip-input/chip-input.d.ts +5 -0
- package/dist/components/chip-input/chip-input.stories.d.ts +12 -0
- package/dist/components/chip-input/context.d.ts +11 -0
- package/dist/components/chip-input/helpers.d.ts +4 -0
- package/dist/components/chip-input/index.d.ts +2 -0
- package/dist/components/chip-input/types.d.ts +51 -0
- package/dist/components/chip-input.js +4 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.atoms.d.ts +13 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.d.ts +10 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.docked.d.ts +14 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.docked.stories.d.ts +10 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.modal.d.ts +15 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.modal.stories.d.ts +10 -0
- package/dist/components/date-single-picker-input/helpers.d.ts +3 -0
- package/dist/components/date-single-picker-input/index.d.ts +2 -0
- package/dist/components/date-single-picker-input/types.d.ts +75 -0
- package/dist/components/date-single-picker-input/use-date-single-picker.d.ts +10 -0
- package/dist/components/date-single-picker-input.js +4 -0
- package/dist/components/drawer/context.d.ts +11 -0
- package/dist/components/drawer/drawer.atoms.d.ts +23 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.stories.d.ts +41 -0
- package/dist/components/drawer/helpers.d.ts +39 -0
- package/dist/components/drawer/index.d.ts +10 -0
- package/dist/components/drawer/types.d.ts +93 -0
- package/dist/components/drawer.js +9 -0
- package/dist/components/icon/helpers.d.ts +4 -0
- package/dist/components/icon/icon.d.ts +8 -0
- package/dist/components/icon/icon.stories.d.ts +39 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/types.d.ts +13 -0
- package/dist/components/icon.js +4 -0
- package/dist/components/index.d.ts +29 -0
- package/dist/components/loading-indicator/helpers.d.ts +9 -0
- package/dist/components/loading-indicator/index.d.ts +1 -0
- package/dist/components/loading-indicator/loading-indicator.atoms.d.ts +10 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator.stories.d.ts +16 -0
- package/dist/components/loading-indicator/types.d.ts +29 -0
- package/dist/components/loading-indicator.js +4 -0
- package/dist/components/menu/context.d.ts +13 -0
- package/dist/components/menu/helpers.d.ts +8 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.atoms.d.ts +14 -0
- package/dist/components/menu/menu.d.ts +7 -0
- package/dist/components/menu/menu.stories.d.ts +22 -0
- package/dist/components/menu/types.d.ts +36 -0
- package/dist/components/menu/use-menu.d.ts +3 -0
- package/dist/components/menu.js +4 -0
- package/dist/components/modal/helpers.d.ts +7 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/modal.atoms.d.ts +8 -0
- package/dist/components/modal/modal.d.ts +7 -0
- package/dist/components/modal/modal.stories.d.ts +13 -0
- package/dist/components/modal/types.d.ts +48 -0
- package/dist/components/modal/use-escape-close.d.ts +6 -0
- package/dist/components/modal/use-focus-trap.d.ts +6 -0
- package/dist/components/modal.js +4 -0
- package/dist/components/radio-input/context.d.ts +11 -0
- package/dist/components/radio-input/helpers.d.ts +11 -0
- package/dist/components/radio-input/index.d.ts +2 -0
- package/dist/components/radio-input/radio-input.atoms.d.ts +9 -0
- package/dist/components/radio-input/radio-input.d.ts +5 -0
- package/dist/components/radio-input/radio-input.stories.d.ts +74 -0
- package/dist/components/radio-input/types.d.ts +54 -0
- package/dist/components/radio-input.js +4 -0
- package/dist/components/segment-multiple-input/context.d.ts +12 -0
- package/dist/components/segment-multiple-input/helpers.d.ts +15 -0
- package/dist/components/segment-multiple-input/index.d.ts +2 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.atoms.d.ts +12 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.d.ts +7 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.stories.d.ts +66 -0
- package/dist/components/segment-multiple-input/types.d.ts +55 -0
- package/dist/components/segment-multiple-input.js +4 -0
- package/dist/components/segment-single-input/context.d.ts +12 -0
- package/dist/components/segment-single-input/helpers.d.ts +15 -0
- package/dist/components/segment-single-input/index.d.ts +2 -0
- package/dist/components/segment-single-input/segment-single-input.atoms.d.ts +11 -0
- package/dist/components/segment-single-input/segment-single-input.d.ts +7 -0
- package/dist/components/segment-single-input/segment-single-input.stories.d.ts +57 -0
- package/dist/components/segment-single-input/types.d.ts +55 -0
- package/dist/components/segment-single-input.js +4 -0
- package/dist/components/select-input/helpers.d.ts +3 -0
- package/dist/components/select-input/index.d.ts +2 -0
- package/dist/components/select-input/select-input.d.ts +9 -0
- package/dist/components/select-input/select-input.stories.d.ts +50 -0
- package/dist/components/select-input/types.d.ts +29 -0
- package/dist/components/select-input.js +4 -0
- package/dist/components/skeleton/helpers.d.ts +6 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +6 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +25 -0
- package/dist/components/skeleton/types.d.ts +17 -0
- package/dist/components/skeleton.js +4 -0
- package/dist/components/snackbar/helpers.d.ts +8 -0
- package/dist/components/snackbar/index.d.ts +2 -0
- package/dist/components/snackbar/snackbar.atoms.d.ts +10 -0
- package/dist/components/snackbar/snackbar.d.ts +6 -0
- package/dist/components/snackbar/snackbar.stories.d.ts +8 -0
- package/dist/components/snackbar/types.d.ts +40 -0
- package/dist/components/snackbar.js +4 -0
- package/dist/components/switch-input/helpers.d.ts +18 -0
- package/dist/components/switch-input/index.d.ts +3 -0
- package/dist/components/switch-input/switch-input.atoms.d.ts +28 -0
- package/dist/components/switch-input/switch-input.d.ts +6 -0
- package/dist/components/switch-input/switch-input.stories.d.ts +10 -0
- package/dist/components/switch-input/types.d.ts +49 -0
- package/dist/components/switch-input.js +7 -0
- package/dist/components/tabs/context.d.ts +3 -0
- package/dist/components/tabs/helpers.d.ts +8 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.atoms.d.ts +10 -0
- package/dist/components/tabs/tabs.d.ts +5 -0
- package/dist/components/tabs/tabs.stories.d.ts +17 -0
- package/dist/components/tabs/types.d.ts +41 -0
- package/dist/components/tabs/use-tab-indicator.d.ts +13 -0
- package/dist/components/tabs.js +4 -0
- package/dist/components/text/helpers.d.ts +18 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/text.d.ts +7 -0
- package/dist/components/text/text.stories.d.ts +14 -0
- package/dist/components/text/types.d.ts +30 -0
- package/dist/components/text-input/helpers.d.ts +3 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/text-input.d.ts +9 -0
- package/dist/components/text-input/text-input.stories.d.ts +20 -0
- package/dist/components/text-input/types.d.ts +33 -0
- package/dist/components/text-input.js +4 -0
- package/dist/components/text.js +4 -0
- package/dist/components/textarea-input/helpers.d.ts +4 -0
- package/dist/components/textarea-input/index.d.ts +2 -0
- package/dist/components/textarea-input/textarea-input.d.ts +10 -0
- package/dist/components/textarea-input/textarea-input.stories.d.ts +50 -0
- package/dist/components/textarea-input/types.d.ts +40 -0
- package/dist/components/textarea-input.js +4 -0
- package/dist/components/tile/helpers.d.ts +8 -0
- package/dist/components/tile/index.d.ts +2 -0
- package/dist/components/tile/tile.d.ts +11 -0
- package/dist/components/tile/tile.stories.d.ts +35 -0
- package/dist/components/tile/types.d.ts +23 -0
- package/dist/components/tile.js +4 -0
- package/dist/components/top-bar/helpers.d.ts +26 -0
- package/dist/components/top-bar/index.d.ts +2 -0
- package/dist/components/top-bar/top-bar.atoms.d.ts +6 -0
- package/dist/components/top-bar/top-bar.d.ts +8 -0
- package/dist/components/top-bar/top-bar.stories.d.ts +15 -0
- package/dist/components/top-bar/types.d.ts +38 -0
- package/dist/components/top-bar.js +4 -0
- package/dist/date-single-picker-input--Ew0O9NQ.js +252 -0
- package/dist/drawer-DrnAR2a4.js +218 -0
- package/dist/helpers-CEDtBUGM.js +37 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/icon-D-lTZMHY.js +44 -0
- package/dist/index-DU1SCUkk.js +329 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +68 -0
- package/dist/loading-indicator-BZMnT5PA.js +168 -0
- package/dist/menu-BZvilMF7.js +174 -0
- package/dist/modal-BGAtqMl9.js +149 -0
- package/dist/radio-input-BRGoevZY.js +173 -0
- package/dist/segment-multiple-input-VwHCqFd6.js +229 -0
- package/dist/segment-single-input-Cqoo7-C2.js +228 -0
- package/dist/select-input-DCb0usvK.js +108 -0
- package/dist/skeleton-D4X5USf_.js +59 -0
- package/dist/snackbar-CYias-fJ.js +79 -0
- package/dist/styles.css +115 -0
- package/dist/switch-input-C5s1lvYh.js +186 -0
- package/dist/tabs-C8aRKfxS.js +216 -0
- package/dist/text-B7e-au41.js +120 -0
- package/dist/text-input-BsWvUk_H.js +73 -0
- package/dist/textarea-input-DZExXEE8.js +102 -0
- package/dist/tile-Du7YciCG.js +51 -0
- package/dist/top-bar-ErHvwR4K.js +62 -0
- package/package.json +97 -0
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { c as I, j as r } from "./index-DU1SCUkk.js";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { c as u } from "./cn-Ca4KprQ1.js";
|
|
4
|
+
const N = I(
|
|
5
|
+
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
// Core variants using Versaur color system
|
|
10
|
+
primary: "border-coral/30 text-foreground focus:border-coral focus:ring-coral/20",
|
|
11
|
+
secondary: "border-sage/30 text-foreground focus:border-sage focus:ring-sage/20",
|
|
12
|
+
tertiary: "border-mist/30 text-foreground focus:border-mist focus:ring-mist/20",
|
|
13
|
+
ghost: "border-slate/30 text-foreground focus:border-slate focus:ring-slate/20",
|
|
14
|
+
neutral: "border-gray-300 text-foreground focus:border-gray-400 focus:ring-gray-400/20",
|
|
15
|
+
// Outline variants
|
|
16
|
+
"primary-outline": "border-coral text-foreground focus:border-coral focus:ring-coral/20",
|
|
17
|
+
"secondary-outline": "border-sage text-foreground focus:border-sage focus:ring-sage/20",
|
|
18
|
+
"tertiary-outline": "border-mist text-foreground focus:border-mist focus:ring-mist/20",
|
|
19
|
+
"ghost-outline": "border-slate text-foreground focus:border-slate focus:ring-slate/20",
|
|
20
|
+
"neutral-outline": "border-gray-400 text-foreground focus:border-gray-500 focus:ring-gray-500/20",
|
|
21
|
+
// Semantic variants
|
|
22
|
+
success: "border-success/30 text-foreground focus:border-success focus:ring-success/20",
|
|
23
|
+
"success-outline": "border-success text-foreground focus:border-success focus:ring-success/20",
|
|
24
|
+
info: "border-info/30 text-foreground focus:border-info focus:ring-info/20",
|
|
25
|
+
"info-outline": "border-info text-foreground focus:border-info focus:ring-info/20",
|
|
26
|
+
warning: "border-warning/30 text-foreground focus:border-warning focus:ring-warning/20",
|
|
27
|
+
"warning-outline": "border-warning text-foreground focus:border-warning focus:ring-warning/20",
|
|
28
|
+
danger: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
|
|
29
|
+
"danger-outline": "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20"
|
|
30
|
+
},
|
|
31
|
+
fieldSizing: {
|
|
32
|
+
content: "field-sizing-content resize-none",
|
|
33
|
+
fixed: "resize-y"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "primary",
|
|
38
|
+
fieldSizing: "fixed"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
), R = c.forwardRef(
|
|
42
|
+
({
|
|
43
|
+
variant: f = "primary",
|
|
44
|
+
label: g,
|
|
45
|
+
helperText: n,
|
|
46
|
+
error: t,
|
|
47
|
+
className: l,
|
|
48
|
+
disabled: s,
|
|
49
|
+
id: b,
|
|
50
|
+
minRows: a = 3,
|
|
51
|
+
maxRows: x,
|
|
52
|
+
fieldSizing: e = "fixed",
|
|
53
|
+
style: m,
|
|
54
|
+
rows: y,
|
|
55
|
+
...p
|
|
56
|
+
}, v) => {
|
|
57
|
+
const w = c.useId(), i = b || w, o = !!t, h = y || a, d = e === "content" ? void 0 : x, j = {
|
|
58
|
+
...e === "content" && { fieldSizing: "content" },
|
|
59
|
+
...d && {
|
|
60
|
+
maxHeight: `${d * 1.5}rem`
|
|
61
|
+
// Approximate line height
|
|
62
|
+
},
|
|
63
|
+
...m
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ r.jsxs("div", { children: [
|
|
66
|
+
/* @__PURE__ */ r.jsx(
|
|
67
|
+
"label",
|
|
68
|
+
{
|
|
69
|
+
htmlFor: i,
|
|
70
|
+
className: "block text-sm font-medium text-foreground mb-2",
|
|
71
|
+
children: g
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ r.jsx("div", { className: u("relative w-full", l), children: /* @__PURE__ */ r.jsx(
|
|
75
|
+
"textarea",
|
|
76
|
+
{
|
|
77
|
+
ref: v,
|
|
78
|
+
id: i,
|
|
79
|
+
rows: h,
|
|
80
|
+
"aria-invalid": o,
|
|
81
|
+
"aria-disabled": s,
|
|
82
|
+
disabled: s,
|
|
83
|
+
style: j,
|
|
84
|
+
className: u(
|
|
85
|
+
N({
|
|
86
|
+
variant: o ? "danger" : f,
|
|
87
|
+
fieldSizing: e
|
|
88
|
+
}),
|
|
89
|
+
"px-3 py-2"
|
|
90
|
+
),
|
|
91
|
+
...p
|
|
92
|
+
}
|
|
93
|
+
) }),
|
|
94
|
+
o && /* @__PURE__ */ r.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: t }),
|
|
95
|
+
!o && n && /* @__PURE__ */ r.jsx("div", { className: "mt-1 text-sm text-gray-600", children: n })
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
R.displayName = "TextAreaInput";
|
|
100
|
+
export {
|
|
101
|
+
R as T
|
|
102
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { c as s, j as b } from "./index-DU1SCUkk.js";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { c as g } from "./cn-Ca4KprQ1.js";
|
|
4
|
+
const i = s(
|
|
5
|
+
// Base classes
|
|
6
|
+
"block transition-colors duration-200",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
white: "bg-white border border-gray-200 text-gray-900",
|
|
11
|
+
neutral: "bg-gray-50 border border-gray-200 text-gray-900",
|
|
12
|
+
primary: "bg-coral-50 border border-coral-200 text-coral-900",
|
|
13
|
+
secondary: "bg-sage-50 border border-sage-200 text-sage-900",
|
|
14
|
+
tertiary: "bg-mist-50 border border-mist-200 text-mist-900",
|
|
15
|
+
ghost: "bg-transparent border border-slate-200 text-slate-900",
|
|
16
|
+
success: "bg-green-50 border border-green-200 text-green-900",
|
|
17
|
+
info: "bg-blue-50 border border-blue-200 text-blue-900",
|
|
18
|
+
warning: "bg-orange-50 border border-orange-200 text-orange-900",
|
|
19
|
+
danger: "bg-red-50 border border-red-200 text-red-900"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
xs: "p-2",
|
|
23
|
+
sm: "p-3",
|
|
24
|
+
md: "p-4",
|
|
25
|
+
lg: "p-6",
|
|
26
|
+
xl: "p-8"
|
|
27
|
+
},
|
|
28
|
+
shape: {
|
|
29
|
+
rounded: "rounded-lg",
|
|
30
|
+
square: "rounded-none"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "white",
|
|
35
|
+
size: "md",
|
|
36
|
+
shape: "rounded"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
), c = n(
|
|
40
|
+
({ variant: r = "white", size: e = "md", shape: t = "rounded", className: o, ...a }, d) => /* @__PURE__ */ b.jsx(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: d,
|
|
44
|
+
className: g(i({ variant: r, size: e, shape: t }), o),
|
|
45
|
+
...a
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
export {
|
|
50
|
+
c as T
|
|
51
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { c as s, j as n } from "./index-DU1SCUkk.js";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
const l = s(
|
|
4
|
+
"w-full flex items-center px-6 py-2 border-b border-neutral bg-white",
|
|
5
|
+
{
|
|
6
|
+
variants: {},
|
|
7
|
+
defaultVariants: {}
|
|
8
|
+
}
|
|
9
|
+
), p = s("flex items-center gap-3 min-w-0 flex-1"), m = s("flex items-center gap-2 ml-auto"), f = s(
|
|
10
|
+
"px-2.5 py-1.5 rounded-md text-xs font-sm cursor-pointer transition-colors",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
active: {
|
|
14
|
+
true: "bg-coral/10 text-coral",
|
|
15
|
+
false: "hover:bg-coral/10"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
active: !1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
), u = s("flex items-center gap-2 ml-4"), x = s("flex items-center gap-2 mr-4"), v = i(
|
|
23
|
+
function({ children: a, className: r, ...t }, e) {
|
|
24
|
+
return /* @__PURE__ */ n.jsx("nav", { ref: e, className: u({ className: r }), ...t, children: a });
|
|
25
|
+
}
|
|
26
|
+
), d = i(
|
|
27
|
+
function({ children: a, className: r, ...t }, e) {
|
|
28
|
+
return /* @__PURE__ */ n.jsx("div", { ref: e, className: x({ className: r }), ...t, children: a });
|
|
29
|
+
}
|
|
30
|
+
), B = i(
|
|
31
|
+
function({ children: a, className: r, ...t }, e) {
|
|
32
|
+
return /* @__PURE__ */ n.jsx("div", { ref: e, className: p({ className: r }), ...t, children: a });
|
|
33
|
+
}
|
|
34
|
+
), g = i(
|
|
35
|
+
function({ children: a, className: r, ...t }, e) {
|
|
36
|
+
return /* @__PURE__ */ n.jsx("div", { ref: e, className: m({ className: r }), ...t, children: a });
|
|
37
|
+
}
|
|
38
|
+
), T = i(
|
|
39
|
+
function({ children: a, className: r, active: t, ...e }, c) {
|
|
40
|
+
return /* @__PURE__ */ n.jsx(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: c,
|
|
44
|
+
className: f({ active: t, className: r }),
|
|
45
|
+
"aria-current": t ? "page" : void 0,
|
|
46
|
+
...e,
|
|
47
|
+
children: a
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
), N = i(
|
|
52
|
+
({ children: o, className: a, ...r }, t) => /* @__PURE__ */ n.jsx("header", { ref: t, className: l({ className: a }), ...r, children: o })
|
|
53
|
+
), b = Object.assign(N, {
|
|
54
|
+
Leading: B,
|
|
55
|
+
Trailing: g,
|
|
56
|
+
NavItem: T,
|
|
57
|
+
Nav: v,
|
|
58
|
+
Actions: d
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
b as T
|
|
62
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dimasbaguspm/versaur",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "React UI library with Tailwind CSS",
|
|
5
|
+
"author": "Dimas Bagus Prayogo Mukti<dimas.bagus.pm@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"packageManager": "yarn@4.9.2",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./components/*": {
|
|
18
|
+
"import": "./dist/components/*.js",
|
|
19
|
+
"types": "./dist/components/*/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./hooks/*": {
|
|
22
|
+
"import": "./dist/hooks/*.js",
|
|
23
|
+
"types": "./dist/hooks/*/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./styles": "./dist/styles.css"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc && vite build",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"lint": "eslint .",
|
|
34
|
+
"lint:fix": "eslint . --fix",
|
|
35
|
+
"format": "prettier --write .",
|
|
36
|
+
"format:check": "prettier --check .",
|
|
37
|
+
"test": "vitest",
|
|
38
|
+
"storybook": "storybook dev -p 6006",
|
|
39
|
+
"build-storybook": "storybook build"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"react",
|
|
43
|
+
"ui",
|
|
44
|
+
"components",
|
|
45
|
+
"tailwind"
|
|
46
|
+
],
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"lucide-react": ">=0.525.0",
|
|
49
|
+
"react": ">=18.0.0",
|
|
50
|
+
"react-dom": ">=18.0.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@eslint/js": "9.31.0",
|
|
54
|
+
"@storybook/addon-docs": "8.6.14",
|
|
55
|
+
"@storybook/addon-essentials": "8.6.14",
|
|
56
|
+
"@storybook/addon-interactions": "8.6.14",
|
|
57
|
+
"@storybook/addon-links": "8.6.14",
|
|
58
|
+
"@storybook/addon-onboarding": "8.6.14",
|
|
59
|
+
"@storybook/blocks": "8.6.14",
|
|
60
|
+
"@storybook/react": "8.6.14",
|
|
61
|
+
"@storybook/react-vite": "8.6.14",
|
|
62
|
+
"@storybook/test": "8.6.14",
|
|
63
|
+
"@tailwindcss/vite": "4.1.11",
|
|
64
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
65
|
+
"@testing-library/react": "16.3.0",
|
|
66
|
+
"@testing-library/user-event": "14.6.1",
|
|
67
|
+
"@types/node": "24.0.13",
|
|
68
|
+
"@types/react": "19.1.8",
|
|
69
|
+
"@types/react-dom": "19.1.6",
|
|
70
|
+
"@vitejs/plugin-react": "4.6.0",
|
|
71
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
72
|
+
"@vitest/ui": "3.2.4",
|
|
73
|
+
"autoprefixer": "10.4.21",
|
|
74
|
+
"class-variance-authority": "0.7.1",
|
|
75
|
+
"clsx": "2.1.1",
|
|
76
|
+
"eslint": "9.31.0",
|
|
77
|
+
"eslint-config-prettier": "9.1.0",
|
|
78
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
79
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
80
|
+
"eslint-plugin-react-refresh": "0.4.20",
|
|
81
|
+
"eslint-plugin-storybook": "9.0.16",
|
|
82
|
+
"globals": "16.3.0",
|
|
83
|
+
"jsdom": "26.1.0",
|
|
84
|
+
"lucide-react": "0.525.0",
|
|
85
|
+
"prettier": "3.5.1",
|
|
86
|
+
"react": "19.1.0",
|
|
87
|
+
"react-dom": "19.1.0",
|
|
88
|
+
"storybook": "8.6.14",
|
|
89
|
+
"tailwind-merge": "3.3.1",
|
|
90
|
+
"tailwindcss": "4.1.11",
|
|
91
|
+
"typescript": "5.8.3",
|
|
92
|
+
"typescript-eslint": "8.36.0",
|
|
93
|
+
"vite": "7.0.4",
|
|
94
|
+
"vite-plugin-dts": "4.5.4",
|
|
95
|
+
"vitest": "3.2.4"
|
|
96
|
+
}
|
|
97
|
+
}
|