@schandlergarcia/sf-web-components 1.1.2 → 1.1.4
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/dist/components/library/cards/ListCard.js +15 -15
- package/dist/components/library/cards/TableCard.js +22 -22
- package/dist/components/library/cards/TableCard.js.map +1 -1
- package/dist/components/library/cards/WidgetCard.js +4 -4
- package/dist/components/library/charts/D3Chart.js.map +1 -1
- package/dist/components/library/data/DataModeProvider.js +9 -9
- package/dist/components/library/data/DataModeProvider.js.map +1 -1
- package/dist/components/library/index.d.ts +17 -4
- package/dist/components/library/theme/AppThemeProvider.js +4 -4
- package/dist/components/library/theme/AppThemeProvider.js.map +1 -1
- package/dist/components/library/ui/Avatar.js +8 -8
- package/dist/components/library/ui/BreadcrumbExtras.d.ts +9 -0
- package/dist/components/library/ui/BreadcrumbExtras.js +109 -0
- package/dist/components/library/ui/BreadcrumbExtras.js.map +1 -0
- package/dist/components/library/ui/Card.d.ts +37 -11
- package/dist/components/library/ui/FieldGroup.d.ts +5 -0
- package/dist/components/library/ui/FieldGroup.js +19 -0
- package/dist/components/library/ui/FieldGroup.js.map +1 -0
- package/dist/components/library/ui/PaginationExtras.d.ts +11 -0
- package/dist/components/library/ui/PaginationExtras.js +138 -0
- package/dist/components/library/ui/PaginationExtras.js.map +1 -0
- package/dist/components/library/ui/alert.d.ts +21 -10
- package/dist/components/library/ui/alert.js +51 -56
- package/dist/components/library/ui/alert.js.map +1 -1
- package/dist/components/library/ui/card.js +72 -55
- package/dist/components/library/ui/card.js.map +1 -1
- package/dist/components/library/ui/checkbox.d.ts +4 -4
- package/dist/components/library/ui/checkbox.js +14 -26
- package/dist/components/library/ui/checkbox.js.map +1 -1
- package/dist/components/library/ui/collapsible.d.ts +5 -4
- package/dist/components/library/ui/collapsible.js +18 -24
- package/dist/components/library/ui/collapsible.js.map +1 -1
- package/dist/components/library/ui/datePicker.d.ts +10 -18
- package/dist/components/library/ui/datePicker.js +18 -85
- package/dist/components/library/ui/datePicker.js.map +1 -1
- package/dist/components/library/ui/dialog.d.ts +5 -7
- package/dist/components/library/ui/dialog.js +94 -108
- package/dist/components/library/ui/dialog.js.map +1 -1
- package/dist/components/library/ui/field.d.ts +6 -25
- package/dist/components/library/ui/field.js +52 -184
- package/dist/components/library/ui/field.js.map +1 -1
- package/dist/components/library/ui/label.d.ts +6 -4
- package/dist/components/library/ui/label.js +12 -15
- package/dist/components/library/ui/label.js.map +1 -1
- package/dist/components/library/ui/popover.d.ts +3 -7
- package/dist/components/library/ui/popover.js +24 -28
- package/dist/components/library/ui/popover.js.map +1 -1
- package/dist/components/library/ui/select.d.ts +5 -12
- package/dist/components/library/ui/select.js +79 -155
- package/dist/components/library/ui/select.js.map +1 -1
- package/dist/index.js +227 -153
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +25 -23
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +252 -257
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,151 +1,137 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Root as u, Close as i, Content as c, Description as g, Overlay as f, Portal as m, Title as p, Trigger as x } from "../../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
6
|
-
function z({
|
|
7
|
-
...a
|
|
8
|
-
}) {
|
|
9
|
-
return /* @__PURE__ */ o(u, { "data-slot": "dialog", ...a });
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Root as i, Close as a, Content as s, Description as c, Overlay as f, Portal as d, Title as g, Trigger as u } from "../../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
3
|
+
function D({ ...e }) {
|
|
4
|
+
return /* @__PURE__ */ t(i, { ...e });
|
|
10
5
|
}
|
|
11
|
-
function
|
|
12
|
-
...
|
|
13
|
-
}) {
|
|
14
|
-
return /* @__PURE__ */ o(x, { "data-slot": "dialog-trigger", ...a });
|
|
6
|
+
function v({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ t(u, { ...e });
|
|
15
8
|
}
|
|
16
|
-
function
|
|
17
|
-
...
|
|
18
|
-
}) {
|
|
19
|
-
return /* @__PURE__ */ o(m, { "data-slot": "dialog-portal", ...a });
|
|
9
|
+
function x({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ t(d, { ...e });
|
|
20
11
|
}
|
|
21
|
-
function
|
|
22
|
-
...
|
|
23
|
-
}) {
|
|
24
|
-
return /* @__PURE__ */ o(i, { "data-slot": "dialog-close", ...a });
|
|
12
|
+
function m({ ...e }) {
|
|
13
|
+
return /* @__PURE__ */ t(a, { ...e });
|
|
25
14
|
}
|
|
26
|
-
function
|
|
27
|
-
className:
|
|
28
|
-
...
|
|
15
|
+
function h({
|
|
16
|
+
className: e,
|
|
17
|
+
...o
|
|
29
18
|
}) {
|
|
30
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ t(
|
|
31
20
|
f,
|
|
32
21
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...t
|
|
22
|
+
className: [
|
|
23
|
+
"fixed inset-0 z-50 bg-black/50",
|
|
24
|
+
e
|
|
25
|
+
].filter(Boolean).join(" "),
|
|
26
|
+
...o
|
|
39
27
|
}
|
|
40
28
|
);
|
|
41
29
|
}
|
|
42
|
-
function
|
|
43
|
-
className:
|
|
44
|
-
children:
|
|
45
|
-
showCloseButton:
|
|
46
|
-
...
|
|
30
|
+
function b({
|
|
31
|
+
className: e,
|
|
32
|
+
children: o,
|
|
33
|
+
showCloseButton: r = !0,
|
|
34
|
+
...n
|
|
47
35
|
}) {
|
|
48
|
-
return /* @__PURE__ */ l(
|
|
49
|
-
/* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ l(x, { children: [
|
|
37
|
+
/* @__PURE__ */ t(h, {}),
|
|
50
38
|
/* @__PURE__ */ l(
|
|
51
|
-
|
|
39
|
+
s,
|
|
52
40
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
className: [
|
|
42
|
+
"fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-[90vw] max-w-[500px] -translate-x-1/2 -translate-y-1/2",
|
|
43
|
+
"rounded-lg border border-slate-200 bg-white p-6 shadow-lg",
|
|
44
|
+
"dark:border-slate-800 dark:bg-slate-900",
|
|
45
|
+
e
|
|
46
|
+
].filter(Boolean).join(" "),
|
|
47
|
+
...n,
|
|
59
48
|
children: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
) })
|
|
49
|
+
o,
|
|
50
|
+
r && /* @__PURE__ */ l(m, { className: "absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100", children: [
|
|
51
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: "Close" }),
|
|
52
|
+
/* @__PURE__ */ t("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ t(
|
|
53
|
+
"path",
|
|
54
|
+
{
|
|
55
|
+
d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
|
|
56
|
+
fill: "currentColor"
|
|
57
|
+
}
|
|
58
|
+
) })
|
|
59
|
+
] })
|
|
73
60
|
]
|
|
74
61
|
}
|
|
75
62
|
)
|
|
76
63
|
] });
|
|
77
64
|
}
|
|
78
|
-
function j({
|
|
79
|
-
|
|
65
|
+
function j({
|
|
66
|
+
className: e,
|
|
67
|
+
...o
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */ t(
|
|
80
70
|
"div",
|
|
81
71
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
className: [
|
|
73
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
74
|
+
e
|
|
75
|
+
].filter(Boolean).join(" "),
|
|
76
|
+
...o
|
|
85
77
|
}
|
|
86
78
|
);
|
|
87
79
|
}
|
|
88
|
-
function
|
|
89
|
-
className:
|
|
90
|
-
|
|
91
|
-
children: n,
|
|
92
|
-
...r
|
|
80
|
+
function w({
|
|
81
|
+
className: e,
|
|
82
|
+
...o
|
|
93
83
|
}) {
|
|
94
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ t(
|
|
95
85
|
"div",
|
|
96
86
|
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
...r,
|
|
103
|
-
children: [
|
|
104
|
-
n,
|
|
105
|
-
t && /* @__PURE__ */ o(i, { asChild: !0, children: /* @__PURE__ */ o(d, { variant: "outline", children: "Close" }) })
|
|
106
|
-
]
|
|
87
|
+
className: [
|
|
88
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
89
|
+
e
|
|
90
|
+
].filter(Boolean).join(" "),
|
|
91
|
+
...o
|
|
107
92
|
}
|
|
108
93
|
);
|
|
109
94
|
}
|
|
110
|
-
function
|
|
111
|
-
className:
|
|
112
|
-
...
|
|
95
|
+
function y({
|
|
96
|
+
className: e,
|
|
97
|
+
...o
|
|
113
98
|
}) {
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
-
|
|
99
|
+
return /* @__PURE__ */ t(
|
|
100
|
+
g,
|
|
116
101
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
102
|
+
className: [
|
|
103
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
104
|
+
e
|
|
105
|
+
].filter(Boolean).join(" "),
|
|
106
|
+
...o
|
|
120
107
|
}
|
|
121
108
|
);
|
|
122
109
|
}
|
|
123
|
-
function
|
|
124
|
-
className:
|
|
125
|
-
...
|
|
110
|
+
function L({
|
|
111
|
+
className: e,
|
|
112
|
+
...o
|
|
126
113
|
}) {
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
|
|
114
|
+
return /* @__PURE__ */ t(
|
|
115
|
+
c,
|
|
129
116
|
{
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
...t
|
|
117
|
+
className: [
|
|
118
|
+
"text-sm text-slate-500 dark:text-slate-400",
|
|
119
|
+
e
|
|
120
|
+
].filter(Boolean).join(" "),
|
|
121
|
+
...o
|
|
136
122
|
}
|
|
137
123
|
);
|
|
138
124
|
}
|
|
139
125
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
126
|
+
D as Dialog,
|
|
127
|
+
m as DialogClose,
|
|
128
|
+
b as DialogContent,
|
|
129
|
+
L as DialogDescription,
|
|
130
|
+
w as DialogFooter,
|
|
145
131
|
j as DialogHeader,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
132
|
+
h as DialogOverlay,
|
|
133
|
+
x as DialogPortal,
|
|
134
|
+
y as DialogTitle,
|
|
135
|
+
v as DialogTrigger
|
|
150
136
|
};
|
|
151
|
-
//# sourceMappingURL=
|
|
137
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../../src/components/library/ui/Dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n className={[\n \"fixed inset-0 z-50 bg-black/50\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & { showCloseButton?: boolean }) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={[\n \"fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-[90vw] max-w-[500px] -translate-x-1/2 -translate-y-1/2\",\n \"rounded-lg border border-slate-200 bg-white p-6 shadow-lg\",\n \"dark:border-slate-800 dark:bg-slate-900\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogClose className=\"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100\">\n <span className=\"sr-only\">Close</span>\n <svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\">\n <path\n d=\"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\"\n fill=\"currentColor\"\n />\n </svg>\n </DialogClose>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n className={[\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n className={[\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n className={[\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n className={[\n \"text-sm text-slate-500 dark:text-slate-400\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogClose,\n DialogOverlay,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"names":["Dialog","props","jsx","DialogPrimitive.Root","DialogTrigger","DialogPrimitive.Trigger","DialogPortal","DialogPrimitive.Portal","DialogClose","DialogPrimitive.Close","DialogOverlay","className","DialogPrimitive.Overlay","DialogContent","children","showCloseButton","jsxs","DialogPrimitive.Content","DialogHeader","DialogFooter","DialogTitle","DialogPrimitive.Title","DialogDescription","DialogPrimitive.Description"],"mappings":";;AAGA,SAASA,EAAO,EAAE,GAAGC,KAA4D;AAC/E,SAAO,gBAAAC,EAACC,GAAA,EAAsB,GAAGF,EAAA,CAAO;AAC1C;AAEA,SAASG,EAAc,EAAE,GAAGH,KAA+D;AACzF,SAAO,gBAAAC,EAACG,GAAA,EAAyB,GAAGJ,EAAA,CAAO;AAC7C;AAEA,SAASK,EAAa,EAAE,GAAGL,KAA8D;AACvF,SAAO,gBAAAC,EAACK,GAAA,EAAwB,GAAGN,EAAA,CAAO;AAC5C;AAEA,SAASO,EAAY,EAAE,GAAGP,KAA6D;AACrF,SAAO,gBAAAC,EAACO,GAAA,EAAuB,GAAGR,EAAA,CAAO;AAC3C;AAEA,SAASS,EAAc;AAAA,EACrB,WAAAC;AAAA,EACA,GAAGV;AACL,GAAyD;AACvD,SACE,gBAAAC;AAAA,IAACU;AAAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAD;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGV;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASY,EAAc;AAAA,EACrB,WAAAF;AAAA,EACA,UAAAG;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGd;AACL,GAAyF;AACvF,2BACGK,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAJ,EAACQ,GAAA,EAAc;AAAA,IACf,gBAAAM;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACAN;AAAA,QAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QACzB,GAAGV;AAAA,QAEH,UAAA;AAAA,UAAAa;AAAA,UACAC,KACC,gBAAAC,EAACR,GAAA,EAAY,WAAU,kEACrB,UAAA;AAAA,YAAA,gBAAAN,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,SAAK;AAAA,YAC/B,gBAAAA,EAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QACnD,UAAA,gBAAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,GAAE;AAAA,gBACF,MAAK;AAAA,cAAA;AAAA,YAAA,EACP,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,SAASgB,EAAa;AAAA,EACpB,WAAAP;AAAA,EACA,GAAGV;AACL,GAAgC;AAC9B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAS;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGV;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASkB,EAAa;AAAA,EACpB,WAAAR;AAAA,EACA,GAAGV;AACL,GAAgC;AAC9B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAS;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGV;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAY;AAAA,EACnB,WAAAT;AAAA,EACA,GAAGV;AACL,GAAuD;AACrD,SACE,gBAAAC;AAAA,IAACmB;AAAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAV;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGV;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASqB,EAAkB;AAAA,EACzB,WAAAX;AAAA,EACA,GAAGV;AACL,GAA6D;AAC3D,SACE,gBAAAC;AAAA,IAACqB;AAAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAZ;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGV;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
|
|
7
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare const fieldVariants: (props?: ({
|
|
10
|
-
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
11
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
-
declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
|
|
21
|
-
errors?: Array<{
|
|
22
|
-
message?: string;
|
|
23
|
-
} | undefined>;
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
-
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Field({ className, children, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function FieldLabel({ className, htmlFor, children, ...props }: React.ComponentProps<"label">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function FieldDescription({ className, children, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function FieldError({ className, children, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Field, FieldLabel, FieldDescription, FieldError, };
|
|
@@ -1,210 +1,78 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { Separator as p } from "./separator.js";
|
|
7
|
-
function k({ className: t, ...e }) {
|
|
8
|
-
return /* @__PURE__ */ a(
|
|
9
|
-
"fieldset",
|
|
10
|
-
{
|
|
11
|
-
"data-slot": "field-set",
|
|
12
|
-
className: l(
|
|
13
|
-
"gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",
|
|
14
|
-
t
|
|
15
|
-
),
|
|
16
|
-
...e
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function y({
|
|
21
|
-
className: t,
|
|
22
|
-
variant: e = "legend",
|
|
23
|
-
...o
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
function n({
|
|
3
|
+
className: e,
|
|
4
|
+
children: t,
|
|
5
|
+
...l
|
|
24
6
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
"legend",
|
|
27
|
-
{
|
|
28
|
-
"data-slot": "field-legend",
|
|
29
|
-
"data-variant": e,
|
|
30
|
-
className: l(
|
|
31
|
-
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
32
|
-
t
|
|
33
|
-
),
|
|
34
|
-
...o
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
function F({ className: t, ...e }) {
|
|
39
|
-
return /* @__PURE__ */ a(
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
40
8
|
"div",
|
|
41
9
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
10
|
+
className: [
|
|
11
|
+
"flex flex-col gap-1.5",
|
|
12
|
+
e
|
|
13
|
+
].filter(Boolean).join(" "),
|
|
14
|
+
...l,
|
|
15
|
+
children: t
|
|
48
16
|
}
|
|
49
17
|
);
|
|
50
18
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
57
|
-
horizontal: "flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
58
|
-
responsive: "flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
defaultVariants: {
|
|
62
|
-
orientation: "vertical"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
function L({
|
|
67
|
-
className: t,
|
|
68
|
-
orientation: e = "vertical",
|
|
69
|
-
...o
|
|
19
|
+
function i({
|
|
20
|
+
className: e,
|
|
21
|
+
htmlFor: t,
|
|
22
|
+
children: l,
|
|
23
|
+
...r
|
|
70
24
|
}) {
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
"
|
|
73
|
-
{
|
|
74
|
-
role: "group",
|
|
75
|
-
"data-slot": "field",
|
|
76
|
-
"data-orientation": e,
|
|
77
|
-
className: l(g({ orientation: e }), t),
|
|
78
|
-
...o
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
function S({ className: t, ...e }) {
|
|
83
|
-
return /* @__PURE__ */ a(
|
|
84
|
-
"div",
|
|
25
|
+
return /* @__PURE__ */ o(
|
|
26
|
+
"label",
|
|
85
27
|
{
|
|
86
|
-
|
|
87
|
-
className:
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
),
|
|
91
|
-
...
|
|
28
|
+
htmlFor: t,
|
|
29
|
+
className: [
|
|
30
|
+
"block text-sm font-medium text-slate-700 dark:text-slate-200",
|
|
31
|
+
e
|
|
32
|
+
].filter(Boolean).join(" "),
|
|
33
|
+
...r,
|
|
34
|
+
children: l
|
|
92
35
|
}
|
|
93
36
|
);
|
|
94
37
|
}
|
|
95
|
-
function
|
|
96
|
-
className:
|
|
97
|
-
|
|
38
|
+
function s({
|
|
39
|
+
className: e,
|
|
40
|
+
children: t,
|
|
41
|
+
...l
|
|
98
42
|
}) {
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
m,
|
|
101
|
-
{
|
|
102
|
-
"data-slot": "field-label",
|
|
103
|
-
className: l(
|
|
104
|
-
"has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug",
|
|
105
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
106
|
-
t
|
|
107
|
-
),
|
|
108
|
-
...e
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
function z({ className: t, ...e }) {
|
|
113
|
-
return /* @__PURE__ */ a(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
"data-slot": "field-label",
|
|
117
|
-
className: l(
|
|
118
|
-
"gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug",
|
|
119
|
-
t
|
|
120
|
-
),
|
|
121
|
-
...e
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
function E({ className: t, ...e }) {
|
|
126
|
-
return /* @__PURE__ */ a(
|
|
43
|
+
return /* @__PURE__ */ o(
|
|
127
44
|
"p",
|
|
128
45
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
),
|
|
136
|
-
...e
|
|
46
|
+
className: [
|
|
47
|
+
"text-xs text-slate-500 dark:text-slate-400",
|
|
48
|
+
e
|
|
49
|
+
].filter(Boolean).join(" "),
|
|
50
|
+
...l,
|
|
51
|
+
children: t
|
|
137
52
|
}
|
|
138
53
|
);
|
|
139
54
|
}
|
|
140
|
-
function
|
|
141
|
-
children: t,
|
|
55
|
+
function x({
|
|
142
56
|
className: e,
|
|
143
|
-
|
|
57
|
+
children: t,
|
|
58
|
+
...l
|
|
144
59
|
}) {
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
"
|
|
60
|
+
return /* @__PURE__ */ o(
|
|
61
|
+
"p",
|
|
147
62
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
className: l(
|
|
151
|
-
"-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative",
|
|
63
|
+
className: [
|
|
64
|
+
"text-xs text-red-600 dark:text-red-400",
|
|
152
65
|
e
|
|
153
|
-
),
|
|
154
|
-
...
|
|
155
|
-
children:
|
|
156
|
-
/* @__PURE__ */ a(p, { className: "absolute inset-0 top-1/2" }),
|
|
157
|
-
t && /* @__PURE__ */ a(
|
|
158
|
-
"span",
|
|
159
|
-
{
|
|
160
|
-
className: "text-muted-foreground px-2 bg-background relative mx-auto block w-fit",
|
|
161
|
-
"data-slot": "field-separator-content",
|
|
162
|
-
children: t
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
]
|
|
66
|
+
].filter(Boolean).join(" "),
|
|
67
|
+
...l,
|
|
68
|
+
children: t
|
|
166
69
|
}
|
|
167
70
|
);
|
|
168
71
|
}
|
|
169
|
-
function V({
|
|
170
|
-
className: t,
|
|
171
|
-
children: e,
|
|
172
|
-
errors: o,
|
|
173
|
-
...n
|
|
174
|
-
}) {
|
|
175
|
-
const i = u(() => {
|
|
176
|
-
if (e)
|
|
177
|
-
return e;
|
|
178
|
-
if (!o?.length)
|
|
179
|
-
return null;
|
|
180
|
-
const d = [
|
|
181
|
-
...new Map(o.map((r) => [r?.message, r])).values()
|
|
182
|
-
];
|
|
183
|
-
return d?.length == 1 ? d[0]?.message : /* @__PURE__ */ a("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: d.map(
|
|
184
|
-
(r, s) => r?.message && /* @__PURE__ */ a("li", { children: r.message }, s)
|
|
185
|
-
) });
|
|
186
|
-
}, [e, o]);
|
|
187
|
-
return i ? /* @__PURE__ */ a(
|
|
188
|
-
"div",
|
|
189
|
-
{
|
|
190
|
-
role: "alert",
|
|
191
|
-
"data-slot": "field-error",
|
|
192
|
-
className: l("text-destructive text-sm font-normal", t),
|
|
193
|
-
...n,
|
|
194
|
-
children: i
|
|
195
|
-
}
|
|
196
|
-
) : null;
|
|
197
|
-
}
|
|
198
72
|
export {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
F as FieldGroup,
|
|
204
|
-
j as FieldLabel,
|
|
205
|
-
y as FieldLegend,
|
|
206
|
-
M as FieldSeparator,
|
|
207
|
-
k as FieldSet,
|
|
208
|
-
z as FieldTitle
|
|
73
|
+
n as Field,
|
|
74
|
+
s as FieldDescription,
|
|
75
|
+
x as FieldError,
|
|
76
|
+
i as FieldLabel
|
|
209
77
|
};
|
|
210
|
-
//# sourceMappingURL=
|
|
78
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../src/components/library/ui/Field.tsx"],"sourcesContent":["import * as React from \"react\";\n\nfunction Field({\n className,\n children,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n className={[\n \"flex flex-col gap-1.5\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nfunction FieldLabel({\n className,\n htmlFor,\n children,\n ...props\n}: React.ComponentProps<\"label\">) {\n return (\n <label\n htmlFor={htmlFor}\n className={[\n \"block text-sm font-medium text-slate-700 dark:text-slate-200\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n >\n {children}\n </label>\n );\n}\n\nfunction FieldDescription({\n className,\n children,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n className={[\n \"text-xs text-slate-500 dark:text-slate-400\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n >\n {children}\n </p>\n );\n}\n\nfunction FieldError({\n className,\n children,\n ...props\n}: React.ComponentProps<\"p\">) {\n return (\n <p\n className={[\n \"text-xs text-red-600 dark:text-red-400\",\n className\n ].filter(Boolean).join(\" \")}\n {...props}\n >\n {children}\n </p>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n};\n"],"names":["Field","className","children","props","jsx","FieldLabel","htmlFor","FieldDescription","FieldError"],"mappings":";AAEA,SAASA,EAAM;AAAA,EACb,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAgC;AAC9B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAH;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASG,EAAW;AAAA,EAClB,WAAAJ;AAAA,EACA,SAAAK;AAAA,EACA,UAAAJ;AAAA,EACA,GAAGC;AACL,GAAkC;AAChC,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAAE;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACAL;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASK,EAAiB;AAAA,EACxB,WAAAN;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAA8B;AAC5B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAH;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAW;AAAA,EAClB,WAAAP;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAA8B;AAC5B,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACAH;AAAA,MAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MACzB,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export default function Label({ children, htmlFor, className, ...rest }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
htmlFor: any;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|