@yuno-payments/dashboard-design-system 0.0.15 → 0.0.16
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.
|
@@ -3,4 +3,5 @@ export { Badge, type BadgeProps } from './badge';
|
|
|
3
3
|
export { Button, type ButtonProps } from './button';
|
|
4
4
|
export { Checkbox, type CheckboxProps } from './checkbox';
|
|
5
5
|
export { Icon, type IconProps } from './icon';
|
|
6
|
-
export { Tooltip } from './tooltip';
|
|
6
|
+
export { Tooltip, type TooltipProps } from './tooltip';
|
|
7
|
+
export { Input, type InputProps } from './input';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { forwardRef as v, useId as h } from "react";
|
|
3
|
+
import { cva as m } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { Input as j } from "../../../vendor/shadcn/input.js";
|
|
5
|
+
import { cn as e } from "../../../lib/utils.js";
|
|
6
|
+
import { Label as I } from "../../../vendor/shadcn/label.js";
|
|
7
|
+
import { Button as N } from "../button/button.js";
|
|
8
|
+
const g = m("flex gap-2 w-full", {
|
|
9
|
+
variants: {
|
|
10
|
+
layout: {
|
|
11
|
+
vertical: "flex-col",
|
|
12
|
+
horizontal: "flex-row items-start gap-4"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
layout: "vertical"
|
|
17
|
+
}
|
|
18
|
+
}), y = m("text-sm", {
|
|
19
|
+
variants: {
|
|
20
|
+
layout: {
|
|
21
|
+
vertical: "",
|
|
22
|
+
horizontal: "mt-2"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
layout: "vertical"
|
|
27
|
+
}
|
|
28
|
+
}), b = v(
|
|
29
|
+
({ className: d, layout: i, label: o, description: r, error: a, id: p, button: l, disabled: n, ...f }, u) => {
|
|
30
|
+
const x = h(), s = p || x, c = !!a;
|
|
31
|
+
return /* @__PURE__ */ t.jsxs("div", { className: e(g({ layout: i })), children: [
|
|
32
|
+
o && /* @__PURE__ */ t.jsx(I, { htmlFor: s, className: e(y({ layout: i })), children: o }),
|
|
33
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
34
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
35
|
+
/* @__PURE__ */ t.jsx(
|
|
36
|
+
j,
|
|
37
|
+
{
|
|
38
|
+
ref: u,
|
|
39
|
+
id: s,
|
|
40
|
+
disabled: n,
|
|
41
|
+
className: e(
|
|
42
|
+
c && "border-destructive focus-visible:border-destructive",
|
|
43
|
+
d
|
|
44
|
+
),
|
|
45
|
+
"aria-invalid": c,
|
|
46
|
+
"aria-describedby": r || a ? `${s}-description` : void 0,
|
|
47
|
+
...f
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
l && /* @__PURE__ */ t.jsx(N, { disabled: n, ...l })
|
|
51
|
+
] }),
|
|
52
|
+
(r || a) && /* @__PURE__ */ t.jsx(
|
|
53
|
+
"p",
|
|
54
|
+
{
|
|
55
|
+
id: `${s}-description`,
|
|
56
|
+
className: e(
|
|
57
|
+
"text-sm",
|
|
58
|
+
a ? "text-destructive" : "text-muted-foreground"
|
|
59
|
+
),
|
|
60
|
+
children: a || r
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
b.displayName = "Input";
|
|
68
|
+
export {
|
|
69
|
+
b as Input
|
|
70
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { Avatar as e } from "./components/atoms/avatar/avatar.js";
|
|
3
|
-
import { Badge as
|
|
3
|
+
import { Badge as m } from "./components/atoms/badge/badge.js";
|
|
4
4
|
import { Button as f } from "./components/atoms/button/button.js";
|
|
5
5
|
import { Checkbox as c } from "./components/atoms/checkbox/checkbox.js";
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Tooltip as
|
|
6
|
+
import { Icon as n } from "./components/atoms/icon/icon.js";
|
|
7
|
+
import { Tooltip as B } from "./components/atoms/tooltip/tooltip.js";
|
|
8
|
+
import { Input as d } from "./components/atoms/input/input.js";
|
|
8
9
|
import { Breadcrumb as l } from "./components/molecules/breadcrumb/breadcrumb.js";
|
|
9
|
-
import { Dialog as
|
|
10
|
+
import { Dialog as h } from "./components/organisms/dialog/dialog.js";
|
|
10
11
|
export {
|
|
11
12
|
e as Avatar,
|
|
12
|
-
|
|
13
|
+
m as Badge,
|
|
13
14
|
l as Breadcrumb,
|
|
14
15
|
f as Button,
|
|
15
16
|
c as Checkbox,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
d as
|
|
17
|
+
h as Dialog,
|
|
18
|
+
n as Icon,
|
|
19
|
+
d as Input,
|
|
20
|
+
B as Tooltip
|
|
19
21
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as n } from "../../lib/utils.js";
|
|
4
|
+
function s({ className: e, type: i, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t.jsx(
|
|
6
|
+
"input",
|
|
7
|
+
{
|
|
8
|
+
type: i,
|
|
9
|
+
"data-slot": "input",
|
|
10
|
+
className: n(
|
|
11
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...r
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
s as Input
|
|
22
|
+
};
|