@szum-tech/design-system 2.7.0 → 3.1.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/dist/chunk-2Y2ZCPNV.cjs +61 -0
- package/dist/chunk-3376ZTRC.cjs +2 -0
- package/dist/{chunk-S5BN23O7.cjs → chunk-3KMXFN6M.cjs} +14 -20
- package/dist/chunk-5AA4IE2T.cjs +27 -0
- package/dist/chunk-5F2Y65JH.js +32 -0
- package/dist/chunk-6BSR3O2J.js +53 -0
- package/dist/chunk-BYXBJQAS.js +1 -0
- package/dist/{chunk-XIPREW2R.js → chunk-DP7UEOTA.js} +173 -176
- package/dist/chunk-HCHVDUI6.cjs +34 -0
- package/dist/chunk-HD7ZDQWW.js +173 -0
- package/dist/chunk-I3RSTJP6.js +20 -0
- package/dist/chunk-I7AV5IQO.cjs +33 -0
- package/dist/chunk-N4O2GO6V.cjs +204 -0
- package/dist/chunk-NGVFYKAT.js +29 -0
- package/dist/chunk-NU5UQPBX.cjs +25 -0
- package/dist/chunk-OQCNPNPS.js +23 -0
- package/dist/chunk-S3ANEJJ7.cjs +22 -0
- package/dist/chunk-U4AWAABZ.js +4901 -0
- package/dist/chunk-UGSNASZM.js +25 -0
- package/dist/{chunk-EIXSMEDP.cjs → chunk-UIOBJSKZ.cjs} +1 -3
- package/dist/{chunk-I5P2HH5Z.js → chunk-WJSS32MY.js} +13 -19
- package/dist/{chunk-GEACYHTU.js → chunk-XJIUGEPN.js} +1 -3
- package/dist/chunk-Y6EVJSAH.cjs +4928 -0
- package/dist/{chunk-D3MOZUNH.cjs → chunk-ZV4467OW.cjs} +176 -185
- package/dist/components/alert-dialog/index.cjs +1 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/avatar/index.cjs +5 -4
- package/dist/components/avatar/index.d.cts +5 -19
- package/dist/components/avatar/index.d.ts +5 -19
- package/dist/components/avatar/index.js +2 -1
- package/dist/components/badge/index.cjs +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/button/index.cjs +23 -3
- package/dist/components/button/index.d.cts +8 -15
- package/dist/components/button/index.d.ts +8 -15
- package/dist/components/button/index.js +22 -2
- package/dist/components/card/index.cjs +12 -7
- package/dist/components/card/index.d.cts +8 -5
- package/dist/components/card/index.d.ts +8 -5
- package/dist/components/card/index.js +2 -1
- package/dist/components/checkbox/index.cjs +12 -0
- package/dist/components/checkbox/index.d.cts +8 -0
- package/dist/components/checkbox/index.d.ts +8 -0
- package/dist/components/checkbox/index.js +3 -0
- package/dist/components/dialog/index.cjs +1 -0
- package/dist/components/dialog/index.d.cts +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/field/index.cjs +50 -0
- package/dist/components/field/index.d.cts +50 -0
- package/dist/components/field/index.d.ts +50 -0
- package/dist/components/field/index.js +5 -0
- package/dist/components/header/index.cjs +1 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/index.cjs +157 -125
- package/dist/components/index.d.cts +7 -8
- package/dist/components/index.d.ts +7 -8
- package/dist/components/index.js +14 -14
- package/dist/components/input/index.cjs +3 -2
- package/dist/components/input/index.d.cts +2 -4
- package/dist/components/input/index.d.ts +2 -4
- package/dist/components/input/index.js +2 -1
- package/dist/components/item/index.cjs +13 -12
- package/dist/components/item/index.d.cts +7 -7
- package/dist/components/item/index.d.ts +7 -7
- package/dist/components/item/index.js +3 -2
- package/dist/components/label/index.cjs +3 -2
- package/dist/components/label/index.js +2 -1
- package/dist/components/select/index.cjs +20 -3
- package/dist/components/select/index.d.cts +20 -6
- package/dist/components/select/index.d.ts +20 -6
- package/dist/components/select/index.js +2 -1
- package/dist/components/separator/index.cjs +3 -2
- package/dist/components/separator/index.js +2 -1
- package/dist/components/sheet/index.cjs +1 -0
- package/dist/components/sheet/index.d.cts +1 -1
- package/dist/components/sheet/index.d.ts +1 -1
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/spinner/index.cjs +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/stepper/index.cjs +33 -33
- package/dist/components/stepper/index.js +14 -14
- package/dist/components/textarea/index.cjs +4 -2
- package/dist/components/textarea/index.d.cts +2 -2
- package/dist/components/textarea/index.d.ts +2 -2
- package/dist/components/textarea/index.js +3 -1
- package/dist/components/tooltip/index.cjs +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/contexts/index.cjs +1 -0
- package/dist/contexts/index.js +1 -0
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/icons/index.cjs +89 -18
- package/dist/icons/index.js +88 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +8 -9
- package/tailwind/global.css +12 -8
- package/tailwind/palette.css +149 -204
- package/tailwind/typography.css +33 -57
- package/dist/chunk-36YD6ICC.js +0 -70
- package/dist/chunk-4NO6IM75.cjs +0 -40
- package/dist/chunk-5BTQ6BQA.js +0 -24
- package/dist/chunk-5PBHBOXI.js +0 -30
- package/dist/chunk-EU7G37IS.js +0 -36
- package/dist/chunk-FPFRA5Q6.cjs +0 -31
- package/dist/chunk-FVSO3RHT.cjs +0 -17
- package/dist/chunk-G6VXQ7DJ.cjs +0 -63
- package/dist/chunk-IAI7BIAG.js +0 -31
- package/dist/chunk-K4TRAPRN.cjs +0 -341
- package/dist/chunk-MI3CQBHC.js +0 -60
- package/dist/chunk-OIWEXHFE.cjs +0 -33
- package/dist/chunk-P4J2TTH7.cjs +0 -32
- package/dist/chunk-UKWZ5BHD.cjs +0 -93
- package/dist/chunk-VZKTT6CG.js +0 -15
- package/dist/chunk-XTO7CMIM.js +0 -88
- package/dist/chunk-YJFJLF7Y.js +0 -319
- package/dist/chunk-ZZ3EBGSD.cjs +0 -72
- package/dist/components/form/index.cjs +0 -55
- package/dist/components/form/index.d.cts +0 -32
- package/dist/components/form/index.d.ts +0 -32
- package/dist/components/form/index.js +0 -22
- package/dist/components/helper-text/index.cjs +0 -10
- package/dist/components/helper-text/index.d.cts +0 -18
- package/dist/components/helper-text/index.d.ts +0 -18
- package/dist/components/helper-text/index.js +0 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { Label } from './chunk-I3RSTJP6.js';
|
|
2
|
+
import { Separator } from './chunk-XJIUGEPN.js';
|
|
3
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
|
+
var fieldVariants = cva("group/field flex w-full gap-3 data-[invalid=true]:text-error", {
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
12
|
+
horizontal: [
|
|
13
|
+
"flex-row items-center",
|
|
14
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
15
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
16
|
+
],
|
|
17
|
+
responsive: [
|
|
18
|
+
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
19
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
20
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
orientation: "vertical"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
role: "group",
|
|
33
|
+
"data-slot": "field",
|
|
34
|
+
"data-orientation": orientation,
|
|
35
|
+
className: cn(fieldVariants({ orientation }), className),
|
|
36
|
+
...props
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function FieldContent({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "field-content",
|
|
45
|
+
className: cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
46
|
+
...props
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function FieldDescription({ className, ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
"p",
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "field-description",
|
|
55
|
+
className: cn(
|
|
56
|
+
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
57
|
+
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
58
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
66
|
+
const content = React.useMemo(() => {
|
|
67
|
+
if (children) {
|
|
68
|
+
return children;
|
|
69
|
+
}
|
|
70
|
+
if (!errors?.length) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
74
|
+
if (uniqueErrors?.length == 1) {
|
|
75
|
+
return uniqueErrors[0]?.message;
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)) });
|
|
78
|
+
}, [children, errors]);
|
|
79
|
+
if (!content) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
return /* @__PURE__ */ jsx("div", { role: "alert", "data-slot": "field-error", className: cn("text-error text-sm font-normal", className), ...props, children: content });
|
|
83
|
+
}
|
|
84
|
+
function FieldGroup({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "field-group",
|
|
89
|
+
className: cn(
|
|
90
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function FieldLabel({ className, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsx(
|
|
99
|
+
Label,
|
|
100
|
+
{
|
|
101
|
+
"data-slot": "field-label",
|
|
102
|
+
className: cn(
|
|
103
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
104
|
+
"has-[>[data-slot=field]]:border-border has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
105
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
"legend",
|
|
115
|
+
{
|
|
116
|
+
"data-slot": "field-legend",
|
|
117
|
+
"data-variant": variant,
|
|
118
|
+
className: cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
|
|
119
|
+
...props
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
124
|
+
return /* @__PURE__ */ jsxs(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-slot": "field-separator",
|
|
128
|
+
"data-content": !!children,
|
|
129
|
+
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
130
|
+
...props,
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
133
|
+
children ? /* @__PURE__ */ jsx(
|
|
134
|
+
"span",
|
|
135
|
+
{
|
|
136
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
137
|
+
"data-slot": "field-separator-content",
|
|
138
|
+
children
|
|
139
|
+
}
|
|
140
|
+
) : null
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function FieldSet({ className, ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
"fieldset",
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "field-set",
|
|
150
|
+
className: cn(
|
|
151
|
+
"flex flex-col gap-6",
|
|
152
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
153
|
+
className
|
|
154
|
+
),
|
|
155
|
+
...props
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
function FieldTitle({ className, ...props }) {
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
161
|
+
"div",
|
|
162
|
+
{
|
|
163
|
+
"data-slot": "field-label",
|
|
164
|
+
className: cn(
|
|
165
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
166
|
+
className
|
|
167
|
+
),
|
|
168
|
+
...props
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Label as Label$1 } from 'radix-ui';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Label({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Label$1.Root,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "label",
|
|
10
|
+
className: cn(
|
|
11
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none",
|
|
12
|
+
"group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Label };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var radixUi = require('radix-ui');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function Avatar({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
radixUi.Avatar.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "avatar",
|
|
12
|
+
className: chunkH2BWO3SI_cjs.cn("relative flex size-8 shrink-0 overflow-hidden rounded", className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function AvatarImage({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Avatar.Image, { "data-slot": "avatar-image", className: chunkH2BWO3SI_cjs.cn("aspect-square size-full", className), ...props });
|
|
19
|
+
}
|
|
20
|
+
function AvatarFallback({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
radixUi.Avatar.Fallback,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "avatar-fallback",
|
|
25
|
+
className: chunkH2BWO3SI_cjs.cn("bg-muted flex size-full items-center justify-center rounded-full", className),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.Avatar = Avatar;
|
|
32
|
+
exports.AvatarFallback = AvatarFallback;
|
|
33
|
+
exports.AvatarImage = AvatarImage;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkS3ANEJJ7_cjs = require('./chunk-S3ANEJJ7.cjs');
|
|
4
|
+
var chunkUIOBJSKZ_cjs = require('./chunk-UIOBJSKZ.cjs');
|
|
5
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
|
|
30
|
+
var fieldVariants = classVarianceAuthority.cva("group/field flex w-full gap-3 data-[invalid=true]:text-error", {
|
|
31
|
+
variants: {
|
|
32
|
+
orientation: {
|
|
33
|
+
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
34
|
+
horizontal: [
|
|
35
|
+
"flex-row items-center",
|
|
36
|
+
"[&>[data-slot=field-label]]:flex-auto",
|
|
37
|
+
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
38
|
+
],
|
|
39
|
+
responsive: [
|
|
40
|
+
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
41
|
+
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
42
|
+
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
orientation: "vertical"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
function Field({ className, orientation = "vertical", ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
role: "group",
|
|
55
|
+
"data-slot": "field",
|
|
56
|
+
"data-orientation": orientation,
|
|
57
|
+
className: chunkH2BWO3SI_cjs.cn(fieldVariants({ orientation }), className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
function FieldContent({ className, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "field-content",
|
|
67
|
+
className: chunkH2BWO3SI_cjs.cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function FieldDescription({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
+
"p",
|
|
75
|
+
{
|
|
76
|
+
"data-slot": "field-description",
|
|
77
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
78
|
+
"text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
79
|
+
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
80
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
function FieldError({ className, children, errors, ...props }) {
|
|
88
|
+
const content = React__namespace.useMemo(() => {
|
|
89
|
+
if (children) {
|
|
90
|
+
return children;
|
|
91
|
+
}
|
|
92
|
+
if (!errors?.length) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
96
|
+
if (uniqueErrors?.length == 1) {
|
|
97
|
+
return uniqueErrors[0]?.message;
|
|
98
|
+
}
|
|
99
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.message }, index)) });
|
|
100
|
+
}, [children, errors]);
|
|
101
|
+
if (!content) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "alert", "data-slot": "field-error", className: chunkH2BWO3SI_cjs.cn("text-error text-sm font-normal", className), ...props, children: content });
|
|
105
|
+
}
|
|
106
|
+
function FieldGroup({ className, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "field-group",
|
|
111
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
112
|
+
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
113
|
+
className
|
|
114
|
+
),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function FieldLabel({ className, ...props }) {
|
|
120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
chunkS3ANEJJ7_cjs.Label,
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "field-label",
|
|
124
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
125
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
126
|
+
"has-[>[data-slot=field]]:border-border has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4",
|
|
127
|
+
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
128
|
+
className
|
|
129
|
+
),
|
|
130
|
+
...props
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function FieldLegend({ className, variant = "legend", ...props }) {
|
|
135
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136
|
+
"legend",
|
|
137
|
+
{
|
|
138
|
+
"data-slot": "field-legend",
|
|
139
|
+
"data-variant": variant,
|
|
140
|
+
className: chunkH2BWO3SI_cjs.cn("mb-3 font-medium", "data-[variant=legend]:text-base", "data-[variant=label]:text-sm", className),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function FieldSeparator({ children, className, ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "field-separator",
|
|
150
|
+
"data-content": !!children,
|
|
151
|
+
className: chunkH2BWO3SI_cjs.cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
152
|
+
...props,
|
|
153
|
+
children: [
|
|
154
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkUIOBJSKZ_cjs.Separator, { className: "absolute inset-0 top-1/2" }),
|
|
155
|
+
children ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
156
|
+
"span",
|
|
157
|
+
{
|
|
158
|
+
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
159
|
+
"data-slot": "field-separator-content",
|
|
160
|
+
children
|
|
161
|
+
}
|
|
162
|
+
) : null
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function FieldSet({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
169
|
+
"fieldset",
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "field-set",
|
|
172
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
173
|
+
"flex flex-col gap-6",
|
|
174
|
+
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
175
|
+
className
|
|
176
|
+
),
|
|
177
|
+
...props
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
function FieldTitle({ className, ...props }) {
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "field-label",
|
|
186
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
187
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",
|
|
188
|
+
className
|
|
189
|
+
),
|
|
190
|
+
...props
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
exports.Field = Field;
|
|
196
|
+
exports.FieldContent = FieldContent;
|
|
197
|
+
exports.FieldDescription = FieldDescription;
|
|
198
|
+
exports.FieldError = FieldError;
|
|
199
|
+
exports.FieldGroup = FieldGroup;
|
|
200
|
+
exports.FieldLabel = FieldLabel;
|
|
201
|
+
exports.FieldLegend = FieldLegend;
|
|
202
|
+
exports.FieldSeparator = FieldSeparator;
|
|
203
|
+
exports.FieldSet = FieldSet;
|
|
204
|
+
exports.FieldTitle = FieldTitle;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { Avatar as Avatar$1 } from 'radix-ui';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Avatar({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Avatar$1.Root,
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "avatar",
|
|
10
|
+
className: cn("relative flex size-8 shrink-0 overflow-hidden rounded", className),
|
|
11
|
+
...props
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function AvatarImage({ className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Avatar$1.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full", className), ...props });
|
|
17
|
+
}
|
|
18
|
+
function AvatarFallback({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
Avatar$1.Fallback,
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "avatar-fallback",
|
|
23
|
+
className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Avatar, AvatarFallback, AvatarImage };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
|
|
6
|
+
function Textarea({ className, invalid = false, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8
|
+
"textarea",
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "textarea",
|
|
11
|
+
"aria-invalid": props["aria-invalid"] || invalid,
|
|
12
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
13
|
+
"border-input dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
|
|
14
|
+
"placeholder:text-muted-foreground",
|
|
15
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
"aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error",
|
|
17
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
exports.Textarea = Textarea;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from './chunk-ZD2QRAOX.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function Textarea({ className, invalid = false, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"textarea",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "textarea",
|
|
9
|
+
"aria-invalid": props["aria-invalid"] || invalid,
|
|
10
|
+
className: cn(
|
|
11
|
+
"border-input dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
|
|
12
|
+
"placeholder:text-muted-foreground",
|
|
13
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
"aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error",
|
|
15
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { Textarea };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
|
|
4
|
+
var radixUi = require('radix-ui');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function Label({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
radixUi.Label.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "label",
|
|
12
|
+
className: chunkH2BWO3SI_cjs.cn(
|
|
13
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none",
|
|
14
|
+
"group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.Label = Label;
|