@dev-dga/react 0.3.0 → 0.5.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/CHANGELOG.md +74 -0
- package/README.md +9 -1
- package/dist/index.cjs +2428 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +690 -4
- package/dist/index.d.ts +690 -4
- package/dist/index.js +2308 -134
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -20,26 +20,140 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
Accordion: () => Accordion,
|
|
24
|
+
AccordionContent: () => AccordionContent,
|
|
25
|
+
AccordionItem: () => AccordionItem,
|
|
26
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
27
|
+
Alert: () => Alert,
|
|
28
|
+
AlertDescription: () => AlertDescription,
|
|
29
|
+
AlertTitle: () => AlertTitle,
|
|
30
|
+
Avatar: () => Avatar,
|
|
31
|
+
AvatarFallback: () => AvatarFallback,
|
|
32
|
+
AvatarGroup: () => AvatarGroup,
|
|
33
|
+
AvatarImage: () => AvatarImage,
|
|
34
|
+
Badge: () => Badge,
|
|
35
|
+
Breadcrumb: () => Breadcrumb,
|
|
36
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
37
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
38
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
39
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
40
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
41
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
23
42
|
Button: () => Button,
|
|
43
|
+
Card: () => Card,
|
|
44
|
+
CardContent: () => CardContent,
|
|
45
|
+
CardDescription: () => CardDescription,
|
|
46
|
+
CardFooter: () => CardFooter,
|
|
47
|
+
CardHeader: () => CardHeader,
|
|
48
|
+
CardImage: () => CardImage,
|
|
49
|
+
CardTitle: () => CardTitle,
|
|
24
50
|
Checkbox: () => Checkbox,
|
|
51
|
+
CircularProgress: () => CircularProgress,
|
|
52
|
+
Combobox: () => Combobox,
|
|
53
|
+
ComboboxGroup: () => ComboboxGroup,
|
|
54
|
+
ComboboxItem: () => ComboboxItem,
|
|
55
|
+
ComboboxSeparator: () => ComboboxSeparator,
|
|
25
56
|
DgaProvider: () => DgaProvider,
|
|
57
|
+
Divider: () => Divider,
|
|
58
|
+
Drawer: () => Drawer,
|
|
59
|
+
DrawerBody: () => DrawerBody,
|
|
60
|
+
DrawerClose: () => DrawerClose,
|
|
61
|
+
DrawerContent: () => DrawerContent,
|
|
62
|
+
DrawerDescription: () => DrawerDescription,
|
|
63
|
+
DrawerFooter: () => DrawerFooter,
|
|
64
|
+
DrawerHeader: () => DrawerHeader,
|
|
65
|
+
DrawerTitle: () => DrawerTitle,
|
|
66
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
67
|
+
DropdownMenu: () => DropdownMenu,
|
|
68
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
69
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
70
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
71
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
72
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
73
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
74
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
75
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
76
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
77
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
78
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
79
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
26
80
|
FieldMessage: () => FieldMessage,
|
|
27
81
|
Input: () => Input,
|
|
82
|
+
Modal: () => Modal,
|
|
83
|
+
ModalClose: () => ModalClose,
|
|
84
|
+
ModalContent: () => ModalContent,
|
|
85
|
+
ModalDescription: () => ModalDescription,
|
|
86
|
+
ModalFooter: () => ModalFooter,
|
|
87
|
+
ModalHeader: () => ModalHeader,
|
|
88
|
+
ModalTitle: () => ModalTitle,
|
|
89
|
+
ModalTrigger: () => ModalTrigger,
|
|
90
|
+
Pagination: () => Pagination,
|
|
91
|
+
PaginationContent: () => PaginationContent,
|
|
92
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
93
|
+
PaginationItem: () => PaginationItem,
|
|
94
|
+
PaginationLink: () => PaginationLink,
|
|
95
|
+
PaginationNext: () => PaginationNext,
|
|
96
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
97
|
+
Progress: () => Progress,
|
|
28
98
|
Radio: () => Radio,
|
|
29
99
|
RadioGroup: () => RadioGroup,
|
|
30
100
|
Select: () => Select,
|
|
31
101
|
SelectItem: () => SelectItem,
|
|
102
|
+
Skeleton: () => Skeleton,
|
|
103
|
+
Spinner: () => Spinner,
|
|
104
|
+
Step: () => Step,
|
|
105
|
+
StepDescription: () => StepDescription,
|
|
106
|
+
StepIndicator: () => StepIndicator,
|
|
107
|
+
StepTitle: () => StepTitle,
|
|
108
|
+
Steps: () => Steps,
|
|
32
109
|
Switch: () => Switch,
|
|
110
|
+
Tabs: () => Tabs,
|
|
111
|
+
TabsContent: () => TabsContent,
|
|
112
|
+
TabsList: () => TabsList,
|
|
113
|
+
TabsTrigger: () => TabsTrigger,
|
|
33
114
|
Textarea: () => Textarea,
|
|
115
|
+
Toaster: () => Toaster,
|
|
116
|
+
Tooltip: () => Tooltip,
|
|
117
|
+
TooltipContent: () => TooltipContent,
|
|
118
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
119
|
+
accordionVariants: () => accordionVariants,
|
|
120
|
+
alertVariants: () => alertVariants,
|
|
121
|
+
avatarVariants: () => avatarVariants,
|
|
122
|
+
badgeVariants: () => badgeVariants,
|
|
123
|
+
breadcrumbVariants: () => breadcrumbVariants,
|
|
34
124
|
buttonVariants: () => buttonVariants,
|
|
125
|
+
cardVariants: () => cardVariants,
|
|
35
126
|
checkboxVariants: () => checkboxVariants,
|
|
127
|
+
circularProgressVariants: () => circularProgressVariants,
|
|
36
128
|
cn: () => cn,
|
|
129
|
+
comboboxTriggerVariants: () => comboboxTriggerVariants,
|
|
130
|
+
comboboxVariants: () => comboboxVariants,
|
|
131
|
+
createToast: () => createToast,
|
|
132
|
+
createToastStore: () => createToastStore,
|
|
133
|
+
dividerVariants: () => dividerVariants,
|
|
134
|
+
drawerVariants: () => drawerVariants,
|
|
135
|
+
dropdownMenuVariants: () => dropdownMenuVariants,
|
|
37
136
|
inputVariants: () => inputVariants,
|
|
137
|
+
modalContentVariants: () => modalContentVariants,
|
|
138
|
+
paginationLinkVariants: () => paginationLinkVariants,
|
|
139
|
+
paginationVariants: () => paginationVariants,
|
|
140
|
+
progressVariants: () => progressVariants,
|
|
38
141
|
radioGroupVariants: () => radioGroupVariants,
|
|
39
142
|
radioVariants: () => radioVariants,
|
|
40
143
|
selectTriggerVariants: () => selectTriggerVariants,
|
|
144
|
+
skeletonVariants: () => skeletonVariants,
|
|
145
|
+
spinnerVariants: () => spinnerVariants,
|
|
146
|
+
stepVariants: () => stepVariants,
|
|
147
|
+
stepsVariants: () => stepsVariants,
|
|
41
148
|
switchVariants: () => switchVariants,
|
|
149
|
+
tabsListVariants: () => tabsListVariants,
|
|
150
|
+
tabsVariants: () => tabsVariants,
|
|
42
151
|
textareaVariants: () => textareaVariants,
|
|
152
|
+
toast: () => toast,
|
|
153
|
+
toastStore: () => toastStore,
|
|
154
|
+
toastVariants: () => toastVariants,
|
|
155
|
+
toastViewportVariants: () => toastViewportVariants,
|
|
156
|
+
tooltipContentVariants: () => tooltipContentVariants,
|
|
43
157
|
useDga: () => useDga,
|
|
44
158
|
useDir: () => useDir,
|
|
45
159
|
useFieldA11y: () => useFieldA11y
|
|
@@ -48,7 +162,8 @@ module.exports = __toCommonJS(src_exports);
|
|
|
48
162
|
|
|
49
163
|
// src/components/Button/Button.tsx
|
|
50
164
|
var import_react = require("react");
|
|
51
|
-
var
|
|
165
|
+
var import_radix_ui = require("radix-ui");
|
|
166
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
52
167
|
|
|
53
168
|
// src/utils/cn.ts
|
|
54
169
|
var import_clsx = require("clsx");
|
|
@@ -56,64 +171,20 @@ function cn(...inputs) {
|
|
|
56
171
|
return (0, import_clsx.clsx)(inputs);
|
|
57
172
|
}
|
|
58
173
|
|
|
59
|
-
// src/
|
|
174
|
+
// src/components/Spinner/Spinner.tsx
|
|
175
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
60
176
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
height: "1em",
|
|
68
|
-
viewBox: "0 0 24 24",
|
|
69
|
-
fill: "none",
|
|
70
|
-
stroke: "currentColor",
|
|
71
|
-
strokeWidth: "2",
|
|
72
|
-
strokeLinecap: "round",
|
|
73
|
-
strokeLinejoin: "round",
|
|
74
|
-
className: "ddga-spinner",
|
|
75
|
-
...props,
|
|
76
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
function Check(props) {
|
|
81
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
-
"svg",
|
|
83
|
-
{
|
|
84
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
-
width: "1em",
|
|
86
|
-
height: "1em",
|
|
87
|
-
viewBox: "0 0 24 24",
|
|
88
|
-
fill: "none",
|
|
89
|
-
stroke: "currentColor",
|
|
90
|
-
strokeWidth: "3",
|
|
91
|
-
strokeLinecap: "round",
|
|
92
|
-
strokeLinejoin: "round",
|
|
93
|
-
...props,
|
|
94
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
function Minus(props) {
|
|
99
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
|
-
"svg",
|
|
101
|
-
{
|
|
102
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
-
width: "1em",
|
|
104
|
-
height: "1em",
|
|
105
|
-
viewBox: "0 0 24 24",
|
|
106
|
-
fill: "none",
|
|
107
|
-
stroke: "currentColor",
|
|
108
|
-
strokeWidth: "3",
|
|
109
|
-
strokeLinecap: "round",
|
|
110
|
-
strokeLinejoin: "round",
|
|
111
|
-
...props,
|
|
112
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5 12h14" })
|
|
177
|
+
var spinnerVariants = (0, import_class_variance_authority.cva)("ddga-spinner", {
|
|
178
|
+
variants: {
|
|
179
|
+
size: {
|
|
180
|
+
sm: "ddga-spinner--sm",
|
|
181
|
+
md: "ddga-spinner--md",
|
|
182
|
+
lg: "ddga-spinner--lg"
|
|
113
183
|
}
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
function
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
function Spinner({ size, className, "aria-label": ariaLabel, ...props }) {
|
|
187
|
+
const hidden = props["aria-hidden"] === true || props["aria-hidden"] === "true";
|
|
117
188
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
189
|
"svg",
|
|
119
190
|
{
|
|
@@ -126,22 +197,31 @@ function ChevronDown(props) {
|
|
|
126
197
|
strokeWidth: "2",
|
|
127
198
|
strokeLinecap: "round",
|
|
128
199
|
strokeLinejoin: "round",
|
|
200
|
+
role: hidden ? void 0 : "status",
|
|
201
|
+
"aria-label": hidden ? void 0 : ariaLabel ?? "Loading",
|
|
202
|
+
"data-slot": "spinner",
|
|
203
|
+
className: cn(spinnerVariants({ size }), className),
|
|
129
204
|
...props,
|
|
130
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "
|
|
205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
|
|
131
206
|
}
|
|
132
207
|
);
|
|
133
208
|
}
|
|
134
209
|
|
|
135
210
|
// src/components/Button/Button.tsx
|
|
136
211
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
137
|
-
var buttonVariants = (0,
|
|
212
|
+
var buttonVariants = (0, import_class_variance_authority2.cva)("ddga-button", {
|
|
138
213
|
variants: {
|
|
139
214
|
variant: {
|
|
140
215
|
primary: "ddga-button--primary",
|
|
141
216
|
secondary: "ddga-button--secondary",
|
|
142
217
|
outline: "ddga-button--outline",
|
|
143
218
|
ghost: "ddga-button--ghost",
|
|
144
|
-
destructive: "ddga-button--destructive"
|
|
219
|
+
destructive: "ddga-button--destructive",
|
|
220
|
+
// Destructive sub-variants — match the DGA library's full destructive
|
|
221
|
+
// family (des-primary maps to plain `destructive` above).
|
|
222
|
+
"destructive-outline": "ddga-button--destructive-outline",
|
|
223
|
+
"destructive-subtle": "ddga-button--destructive-subtle",
|
|
224
|
+
"destructive-ghost": "ddga-button--destructive-ghost"
|
|
145
225
|
},
|
|
146
226
|
size: {
|
|
147
227
|
sm: "ddga-button--sm",
|
|
@@ -152,6 +232,16 @@ var buttonVariants = (0, import_class_variance_authority.cva)("ddga-button", {
|
|
|
152
232
|
},
|
|
153
233
|
fullWidth: {
|
|
154
234
|
true: "ddga-button--full-width"
|
|
235
|
+
},
|
|
236
|
+
/**
|
|
237
|
+
* Use on dark / branded colored backgrounds. Visually inverts non-filled
|
|
238
|
+
* variants (`outline`, `ghost`, destructive's outline/ghost forms) so
|
|
239
|
+
* text + border stay visible against the surface. Filled variants
|
|
240
|
+
* (`primary`, `secondary`, `destructive`, `destructive-subtle`) ignore
|
|
241
|
+
* it — they already carry their own background contrast.
|
|
242
|
+
*/
|
|
243
|
+
inverted: {
|
|
244
|
+
true: "ddga-button--inverted"
|
|
155
245
|
}
|
|
156
246
|
},
|
|
157
247
|
compoundVariants: [],
|
|
@@ -164,11 +254,13 @@ function Button({
|
|
|
164
254
|
variant,
|
|
165
255
|
size,
|
|
166
256
|
fullWidth,
|
|
257
|
+
inverted,
|
|
167
258
|
loading,
|
|
168
259
|
disabled,
|
|
169
260
|
startIcon,
|
|
170
261
|
endIcon,
|
|
171
262
|
iconFlip,
|
|
263
|
+
asChild,
|
|
172
264
|
className,
|
|
173
265
|
children,
|
|
174
266
|
type = "button",
|
|
@@ -182,16 +274,17 @@ function Button({
|
|
|
182
274
|
}
|
|
183
275
|
}
|
|
184
276
|
const isDisabled = disabled || loading;
|
|
277
|
+
const Comp = asChild ? import_radix_ui.Slot.Slot : "button";
|
|
185
278
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
186
|
-
|
|
279
|
+
Comp,
|
|
187
280
|
{
|
|
188
|
-
type,
|
|
189
|
-
|
|
281
|
+
...asChild ? {} : { type, disabled: isDisabled },
|
|
282
|
+
...asChild && isDisabled ? { tabIndex: -1 } : {},
|
|
190
283
|
"aria-disabled": isDisabled || void 0,
|
|
191
284
|
"aria-busy": loading || void 0,
|
|
192
285
|
"data-slot": "button",
|
|
193
286
|
className: cn(
|
|
194
|
-
buttonVariants({ variant, size, fullWidth }),
|
|
287
|
+
buttonVariants({ variant, size, fullWidth, inverted }),
|
|
195
288
|
loading && "ddga-button--loading",
|
|
196
289
|
className
|
|
197
290
|
),
|
|
@@ -199,7 +292,12 @@ function Button({
|
|
|
199
292
|
children: [
|
|
200
293
|
loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, { "aria-hidden": "true" }),
|
|
201
294
|
!loading && startIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cn("ddga-button__icon", iconFlip && "ddga-icon-flip"), "aria-hidden": "true", children: startIcon }),
|
|
202
|
-
|
|
295
|
+
asChild ? (
|
|
296
|
+
// children IS the consumer's single element (e.g. <Link>). Slottable
|
|
297
|
+
// marks where THAT element's original children should land , without
|
|
298
|
+
// it the icons would replace the link text entirely.
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_radix_ui.Slot.Slottable, { children })
|
|
300
|
+
) : children != null && children !== "" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ddga-button__text", children }),
|
|
203
301
|
!loading && endIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: cn("ddga-button__icon", iconFlip && "ddga-icon-flip"), "aria-hidden": "true", children: endIcon })
|
|
204
302
|
]
|
|
205
303
|
}
|
|
@@ -207,7 +305,7 @@ function Button({
|
|
|
207
305
|
}
|
|
208
306
|
|
|
209
307
|
// src/components/Input/Input.tsx
|
|
210
|
-
var
|
|
308
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
211
309
|
|
|
212
310
|
// src/field/use-field-a11y.ts
|
|
213
311
|
var import_react2 = require("react");
|
|
@@ -261,7 +359,7 @@ function FieldMessage({ id, variant, children }) {
|
|
|
261
359
|
|
|
262
360
|
// src/components/Input/Input.tsx
|
|
263
361
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
264
|
-
var inputVariants = (0,
|
|
362
|
+
var inputVariants = (0, import_class_variance_authority3.cva)("ddga-input", {
|
|
265
363
|
variants: {
|
|
266
364
|
size: {
|
|
267
365
|
sm: "ddga-input--sm",
|
|
@@ -345,9 +443,9 @@ function Input({
|
|
|
345
443
|
}
|
|
346
444
|
|
|
347
445
|
// src/components/Textarea/Textarea.tsx
|
|
348
|
-
var
|
|
446
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
349
447
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
350
|
-
var textareaVariants = (0,
|
|
448
|
+
var textareaVariants = (0, import_class_variance_authority4.cva)("ddga-textarea", {
|
|
351
449
|
variants: {
|
|
352
450
|
size: {
|
|
353
451
|
sm: "ddga-textarea--sm",
|
|
@@ -414,10 +512,193 @@ function Textarea({
|
|
|
414
512
|
}
|
|
415
513
|
|
|
416
514
|
// src/components/Checkbox/Checkbox.tsx
|
|
417
|
-
var
|
|
418
|
-
var
|
|
515
|
+
var import_radix_ui2 = require("radix-ui");
|
|
516
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
517
|
+
|
|
518
|
+
// src/internal/icons/index.tsx
|
|
419
519
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
420
|
-
|
|
520
|
+
function Check(props) {
|
|
521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
522
|
+
"svg",
|
|
523
|
+
{
|
|
524
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
525
|
+
width: "1em",
|
|
526
|
+
height: "1em",
|
|
527
|
+
viewBox: "0 0 24 24",
|
|
528
|
+
fill: "none",
|
|
529
|
+
stroke: "currentColor",
|
|
530
|
+
strokeWidth: "3",
|
|
531
|
+
strokeLinecap: "round",
|
|
532
|
+
strokeLinejoin: "round",
|
|
533
|
+
...props,
|
|
534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M20 6 9 17l-5-5" })
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
function Minus(props) {
|
|
539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
540
|
+
"svg",
|
|
541
|
+
{
|
|
542
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
543
|
+
width: "1em",
|
|
544
|
+
height: "1em",
|
|
545
|
+
viewBox: "0 0 24 24",
|
|
546
|
+
fill: "none",
|
|
547
|
+
stroke: "currentColor",
|
|
548
|
+
strokeWidth: "3",
|
|
549
|
+
strokeLinecap: "round",
|
|
550
|
+
strokeLinejoin: "round",
|
|
551
|
+
...props,
|
|
552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M5 12h14" })
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
function Info(props) {
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
558
|
+
"svg",
|
|
559
|
+
{
|
|
560
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
561
|
+
width: "1em",
|
|
562
|
+
height: "1em",
|
|
563
|
+
viewBox: "0 0 24 24",
|
|
564
|
+
fill: "none",
|
|
565
|
+
stroke: "currentColor",
|
|
566
|
+
strokeWidth: "2",
|
|
567
|
+
strokeLinecap: "round",
|
|
568
|
+
strokeLinejoin: "round",
|
|
569
|
+
...props,
|
|
570
|
+
children: [
|
|
571
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
572
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 16v-4" }),
|
|
573
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 8h.01" })
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
function AlertTriangle(props) {
|
|
579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
580
|
+
"svg",
|
|
581
|
+
{
|
|
582
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
583
|
+
width: "1em",
|
|
584
|
+
height: "1em",
|
|
585
|
+
viewBox: "0 0 24 24",
|
|
586
|
+
fill: "none",
|
|
587
|
+
stroke: "currentColor",
|
|
588
|
+
strokeWidth: "2",
|
|
589
|
+
strokeLinecap: "round",
|
|
590
|
+
strokeLinejoin: "round",
|
|
591
|
+
...props,
|
|
592
|
+
children: [
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
594
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 9v4" }),
|
|
595
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M12 17h.01" })
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
function AlertCircle(props) {
|
|
601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
602
|
+
"svg",
|
|
603
|
+
{
|
|
604
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
605
|
+
width: "1em",
|
|
606
|
+
height: "1em",
|
|
607
|
+
viewBox: "0 0 24 24",
|
|
608
|
+
fill: "none",
|
|
609
|
+
stroke: "currentColor",
|
|
610
|
+
strokeWidth: "2",
|
|
611
|
+
strokeLinecap: "round",
|
|
612
|
+
strokeLinejoin: "round",
|
|
613
|
+
...props,
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
616
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
617
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
function Close(props) {
|
|
623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
624
|
+
"svg",
|
|
625
|
+
{
|
|
626
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
627
|
+
width: "1em",
|
|
628
|
+
height: "1em",
|
|
629
|
+
viewBox: "0 0 24 24",
|
|
630
|
+
fill: "none",
|
|
631
|
+
stroke: "currentColor",
|
|
632
|
+
strokeWidth: "2",
|
|
633
|
+
strokeLinecap: "round",
|
|
634
|
+
strokeLinejoin: "round",
|
|
635
|
+
...props,
|
|
636
|
+
children: [
|
|
637
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M18 6 6 18" }),
|
|
638
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m6 6 12 12" })
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
function ChevronDown(props) {
|
|
644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
645
|
+
"svg",
|
|
646
|
+
{
|
|
647
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
648
|
+
width: "1em",
|
|
649
|
+
height: "1em",
|
|
650
|
+
viewBox: "0 0 24 24",
|
|
651
|
+
fill: "none",
|
|
652
|
+
stroke: "currentColor",
|
|
653
|
+
strokeWidth: "2",
|
|
654
|
+
strokeLinecap: "round",
|
|
655
|
+
strokeLinejoin: "round",
|
|
656
|
+
...props,
|
|
657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
658
|
+
}
|
|
659
|
+
);
|
|
660
|
+
}
|
|
661
|
+
function ChevronRight(props) {
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
663
|
+
"svg",
|
|
664
|
+
{
|
|
665
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
666
|
+
width: "1em",
|
|
667
|
+
height: "1em",
|
|
668
|
+
viewBox: "0 0 24 24",
|
|
669
|
+
fill: "none",
|
|
670
|
+
stroke: "currentColor",
|
|
671
|
+
strokeWidth: "2",
|
|
672
|
+
strokeLinecap: "round",
|
|
673
|
+
strokeLinejoin: "round",
|
|
674
|
+
...props,
|
|
675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "m9 18 6-6-6-6" })
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
function MoreHorizontal(props) {
|
|
680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
681
|
+
"svg",
|
|
682
|
+
{
|
|
683
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
684
|
+
width: "1em",
|
|
685
|
+
height: "1em",
|
|
686
|
+
viewBox: "0 0 24 24",
|
|
687
|
+
fill: "currentColor",
|
|
688
|
+
stroke: "none",
|
|
689
|
+
...props,
|
|
690
|
+
children: [
|
|
691
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "5", cy: "12", r: "1.5" }),
|
|
692
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
693
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { cx: "19", cy: "12", r: "1.5" })
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
700
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
701
|
+
var checkboxVariants = (0, import_class_variance_authority5.cva)("ddga-checkbox", {
|
|
421
702
|
variants: {
|
|
422
703
|
size: {
|
|
423
704
|
sm: "ddga-checkbox--sm",
|
|
@@ -452,45 +733,45 @@ function Checkbox({
|
|
|
452
733
|
"aria-label": props["aria-label"],
|
|
453
734
|
"aria-labelledby": props["aria-labelledby"]
|
|
454
735
|
});
|
|
455
|
-
return /* @__PURE__ */ (0,
|
|
456
|
-
/* @__PURE__ */ (0,
|
|
457
|
-
/* @__PURE__ */ (0,
|
|
458
|
-
|
|
736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { "data-slot": "checkbox-field", className: "ddga-field", children: [
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "ddga-checkbox-row", children: [
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
739
|
+
import_radix_ui2.Checkbox.Root,
|
|
459
740
|
{
|
|
460
741
|
...props,
|
|
461
742
|
...controlProps,
|
|
462
743
|
"data-slot": "checkbox",
|
|
463
744
|
required,
|
|
464
745
|
className: cn(checkboxVariants({ size, error: hasError }), className),
|
|
465
|
-
children: /* @__PURE__ */ (0,
|
|
466
|
-
|
|
746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
747
|
+
import_radix_ui2.Checkbox.Indicator,
|
|
467
748
|
{
|
|
468
749
|
"data-slot": "checkbox-indicator",
|
|
469
750
|
className: "ddga-checkbox__indicator",
|
|
470
751
|
children: [
|
|
471
|
-
/* @__PURE__ */ (0,
|
|
472
|
-
/* @__PURE__ */ (0,
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Check, { className: "ddga-checkbox__check", "aria-hidden": "true" }),
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Minus, { className: "ddga-checkbox__minus", "aria-hidden": "true" })
|
|
473
754
|
]
|
|
474
755
|
}
|
|
475
756
|
)
|
|
476
757
|
}
|
|
477
758
|
),
|
|
478
|
-
label && /* @__PURE__ */ (0,
|
|
759
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor: fieldId, className: "ddga-checkbox__label", children: [
|
|
479
760
|
label,
|
|
480
|
-
required && /* @__PURE__ */ (0,
|
|
761
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": "true", className: "ddga-checkbox__required", children: "*" })
|
|
481
762
|
] })
|
|
482
763
|
] }),
|
|
483
|
-
hasErrorMessage && /* @__PURE__ */ (0,
|
|
484
|
-
hasHelper && /* @__PURE__ */ (0,
|
|
764
|
+
hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
|
|
765
|
+
hasHelper && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
|
|
485
766
|
] });
|
|
486
767
|
}
|
|
487
768
|
|
|
488
769
|
// src/components/Radio/Radio.tsx
|
|
489
770
|
var import_react3 = require("react");
|
|
490
|
-
var
|
|
491
|
-
var
|
|
492
|
-
var
|
|
493
|
-
var radioGroupVariants = (0,
|
|
771
|
+
var import_radix_ui3 = require("radix-ui");
|
|
772
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
773
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
774
|
+
var radioGroupVariants = (0, import_class_variance_authority6.cva)("ddga-radio-group", {
|
|
494
775
|
variants: {
|
|
495
776
|
size: {
|
|
496
777
|
sm: "ddga-radio-group--sm",
|
|
@@ -509,7 +790,7 @@ var radioGroupVariants = (0, import_class_variance_authority5.cva)("ddga-radio-g
|
|
|
509
790
|
orientation: "vertical"
|
|
510
791
|
}
|
|
511
792
|
});
|
|
512
|
-
var radioVariants = (0,
|
|
793
|
+
var radioVariants = (0, import_class_variance_authority6.cva)("ddga-radio");
|
|
513
794
|
function RadioGroup({
|
|
514
795
|
id: externalId,
|
|
515
796
|
label,
|
|
@@ -534,13 +815,13 @@ function RadioGroup({
|
|
|
534
815
|
"aria-labelledby": props["aria-labelledby"]
|
|
535
816
|
});
|
|
536
817
|
const labelId = `${fieldId}-label`;
|
|
537
|
-
return /* @__PURE__ */ (0,
|
|
538
|
-
label && /* @__PURE__ */ (0,
|
|
818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-slot": "radio-group-field", className: "ddga-field", children: [
|
|
819
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { id: labelId, className: "ddga-radio-group__label", children: [
|
|
539
820
|
label,
|
|
540
|
-
required && /* @__PURE__ */ (0,
|
|
821
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { "aria-hidden": "true", className: "ddga-radio-group__required", children: "*" })
|
|
541
822
|
] }),
|
|
542
|
-
/* @__PURE__ */ (0,
|
|
543
|
-
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
824
|
+
import_radix_ui3.RadioGroup.Root,
|
|
544
825
|
{
|
|
545
826
|
...props,
|
|
546
827
|
"aria-invalid": controlProps["aria-invalid"],
|
|
@@ -553,40 +834,40 @@ function RadioGroup({
|
|
|
553
834
|
children
|
|
554
835
|
}
|
|
555
836
|
),
|
|
556
|
-
hasErrorMessage && /* @__PURE__ */ (0,
|
|
557
|
-
hasHelper && /* @__PURE__ */ (0,
|
|
837
|
+
hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
|
|
838
|
+
hasHelper && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
|
|
558
839
|
] });
|
|
559
840
|
}
|
|
560
841
|
function Radio({ id: externalId, label, className, ...props }) {
|
|
561
842
|
const generatedId = (0, import_react3.useId)();
|
|
562
843
|
const itemId = externalId ?? generatedId;
|
|
563
|
-
return /* @__PURE__ */ (0,
|
|
564
|
-
/* @__PURE__ */ (0,
|
|
565
|
-
|
|
844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "ddga-radio-row", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
846
|
+
import_radix_ui3.RadioGroup.Item,
|
|
566
847
|
{
|
|
567
848
|
...props,
|
|
568
849
|
id: itemId,
|
|
569
850
|
"data-slot": "radio",
|
|
570
851
|
className: cn(radioVariants(), className),
|
|
571
|
-
children: /* @__PURE__ */ (0,
|
|
572
|
-
|
|
852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
853
|
+
import_radix_ui3.RadioGroup.Indicator,
|
|
573
854
|
{
|
|
574
855
|
"data-slot": "radio-indicator",
|
|
575
856
|
className: "ddga-radio__indicator",
|
|
576
|
-
children: /* @__PURE__ */ (0,
|
|
857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ddga-radio__dot", "aria-hidden": "true" })
|
|
577
858
|
}
|
|
578
859
|
)
|
|
579
860
|
}
|
|
580
861
|
),
|
|
581
|
-
label && /* @__PURE__ */ (0,
|
|
862
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { htmlFor: itemId, className: "ddga-radio__label", children: label })
|
|
582
863
|
] });
|
|
583
864
|
}
|
|
584
865
|
|
|
585
866
|
// src/components/Switch/Switch.tsx
|
|
586
|
-
var
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var switchVariants = (0,
|
|
867
|
+
var import_radix_ui4 = require("radix-ui");
|
|
868
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
869
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
870
|
+
var switchVariants = (0, import_class_variance_authority7.cva)("ddga-switch", {
|
|
590
871
|
variants: {
|
|
591
872
|
size: {
|
|
592
873
|
sm: "ddga-switch--sm",
|
|
@@ -621,33 +902,33 @@ function Switch({
|
|
|
621
902
|
"aria-label": props["aria-label"],
|
|
622
903
|
"aria-labelledby": props["aria-labelledby"]
|
|
623
904
|
});
|
|
624
|
-
return /* @__PURE__ */ (0,
|
|
625
|
-
/* @__PURE__ */ (0,
|
|
626
|
-
/* @__PURE__ */ (0,
|
|
627
|
-
|
|
905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-slot": "switch-field", className: "ddga-field", children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "ddga-switch-row", children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
908
|
+
import_radix_ui4.Switch.Root,
|
|
628
909
|
{
|
|
629
910
|
...props,
|
|
630
911
|
...controlProps,
|
|
631
912
|
"data-slot": "switch",
|
|
632
913
|
required,
|
|
633
914
|
className: cn(switchVariants({ size, error: hasError }), className),
|
|
634
|
-
children: /* @__PURE__ */ (0,
|
|
915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_radix_ui4.Switch.Thumb, { "data-slot": "switch-thumb", className: "ddga-switch__thumb" })
|
|
635
916
|
}
|
|
636
917
|
),
|
|
637
|
-
label && /* @__PURE__ */ (0,
|
|
918
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { htmlFor: fieldId, className: "ddga-switch__label", children: [
|
|
638
919
|
label,
|
|
639
|
-
required && /* @__PURE__ */ (0,
|
|
920
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { "aria-hidden": "true", className: "ddga-switch__required", children: "*" })
|
|
640
921
|
] })
|
|
641
922
|
] }),
|
|
642
|
-
hasErrorMessage && /* @__PURE__ */ (0,
|
|
643
|
-
hasHelper && /* @__PURE__ */ (0,
|
|
923
|
+
hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
|
|
924
|
+
hasHelper && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
|
|
644
925
|
] });
|
|
645
926
|
}
|
|
646
927
|
|
|
647
928
|
// src/components/Select/Select.tsx
|
|
648
929
|
var import_react5 = require("react");
|
|
649
|
-
var
|
|
650
|
-
var
|
|
930
|
+
var import_radix_ui5 = require("radix-ui");
|
|
931
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
651
932
|
|
|
652
933
|
// src/providers/DgaContext.ts
|
|
653
934
|
var import_react4 = require("react");
|
|
@@ -661,8 +942,8 @@ function useDga() {
|
|
|
661
942
|
}
|
|
662
943
|
|
|
663
944
|
// src/components/Select/Select.tsx
|
|
664
|
-
var
|
|
665
|
-
var selectTriggerVariants = (0,
|
|
945
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
946
|
+
var selectTriggerVariants = (0, import_class_variance_authority8.cva)("ddga-select-trigger", {
|
|
666
947
|
variants: {
|
|
667
948
|
size: {
|
|
668
949
|
sm: "ddga-select-trigger--sm",
|
|
@@ -701,59 +982,1943 @@ function Select({
|
|
|
701
982
|
});
|
|
702
983
|
const ctx = (0, import_react5.useContext)(DgaContext);
|
|
703
984
|
const portalContainer = ctx?.rootEl ?? void 0;
|
|
704
|
-
return /* @__PURE__ */ (0,
|
|
705
|
-
label && /* @__PURE__ */ (0,
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { "data-slot": "select-field", className: "ddga-field", children: [
|
|
986
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { htmlFor: fieldId, className: "ddga-select__label", children: [
|
|
706
987
|
label,
|
|
707
|
-
required && /* @__PURE__ */ (0,
|
|
988
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { "aria-hidden": "true", className: "ddga-select__required", children: "*" })
|
|
708
989
|
] }),
|
|
709
|
-
/* @__PURE__ */ (0,
|
|
710
|
-
/* @__PURE__ */ (0,
|
|
711
|
-
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_radix_ui5.Select.Root, { required, ...rootProps, children: [
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
992
|
+
import_radix_ui5.Select.Trigger,
|
|
712
993
|
{
|
|
713
994
|
...controlProps,
|
|
714
995
|
"data-slot": "select-trigger",
|
|
715
996
|
className: cn(selectTriggerVariants({ size, error: hasError }), className),
|
|
716
997
|
children: [
|
|
717
|
-
/* @__PURE__ */ (0,
|
|
718
|
-
/* @__PURE__ */ (0,
|
|
998
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.Value, { placeholder }),
|
|
999
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.Icon, { asChild: true, className: "ddga-select__icon", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronDown, { "aria-hidden": "true" }) })
|
|
719
1000
|
]
|
|
720
1001
|
}
|
|
721
1002
|
),
|
|
722
|
-
/* @__PURE__ */ (0,
|
|
723
|
-
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1004
|
+
import_radix_ui5.Select.Content,
|
|
724
1005
|
{
|
|
725
1006
|
"data-slot": "select-content",
|
|
726
1007
|
className: "ddga-select-content",
|
|
727
1008
|
position: "popper",
|
|
728
1009
|
sideOffset: 4,
|
|
729
|
-
children: /* @__PURE__ */ (0,
|
|
1010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.Viewport, { className: "ddga-select-viewport", children })
|
|
730
1011
|
}
|
|
731
1012
|
) })
|
|
732
1013
|
] }),
|
|
733
|
-
hasErrorMessage && /* @__PURE__ */ (0,
|
|
734
|
-
hasHelper && /* @__PURE__ */ (0,
|
|
1014
|
+
hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
|
|
1015
|
+
hasHelper && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
|
|
735
1016
|
] });
|
|
736
1017
|
}
|
|
737
1018
|
function SelectItem({ className, children, ...props }) {
|
|
738
|
-
return /* @__PURE__ */ (0,
|
|
739
|
-
|
|
1019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1020
|
+
import_radix_ui5.Select.Item,
|
|
740
1021
|
{
|
|
741
1022
|
...props,
|
|
742
1023
|
"data-slot": "select-item",
|
|
743
1024
|
className: cn("ddga-select-item", className),
|
|
744
1025
|
children: [
|
|
745
|
-
/* @__PURE__ */ (0,
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.ItemText, { children }),
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_radix_ui5.Select.ItemIndicator, { className: "ddga-select-item__indicator", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Check, { className: "ddga-select-item__check", "aria-hidden": "true" }) })
|
|
747
1028
|
]
|
|
748
1029
|
}
|
|
749
1030
|
);
|
|
750
1031
|
}
|
|
751
1032
|
|
|
752
|
-
// src/
|
|
753
|
-
var
|
|
754
|
-
var
|
|
755
|
-
var
|
|
756
|
-
var
|
|
1033
|
+
// src/components/Card/Card.tsx
|
|
1034
|
+
var import_radix_ui6 = require("radix-ui");
|
|
1035
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1036
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1037
|
+
var cardVariants = (0, import_class_variance_authority9.cva)("ddga-card", {
|
|
1038
|
+
variants: {
|
|
1039
|
+
variant: {
|
|
1040
|
+
default: "ddga-card--default",
|
|
1041
|
+
outline: "ddga-card--outline",
|
|
1042
|
+
elevated: "ddga-card--elevated",
|
|
1043
|
+
filled: "ddga-card--filled",
|
|
1044
|
+
gradient: "ddga-card--gradient",
|
|
1045
|
+
ghost: "ddga-card--ghost"
|
|
1046
|
+
},
|
|
1047
|
+
padding: {
|
|
1048
|
+
sm: "ddga-card--padding-sm",
|
|
1049
|
+
md: "ddga-card--padding-md",
|
|
1050
|
+
lg: "ddga-card--padding-lg"
|
|
1051
|
+
},
|
|
1052
|
+
orientation: {
|
|
1053
|
+
vertical: "ddga-card--vertical",
|
|
1054
|
+
horizontal: "ddga-card--horizontal"
|
|
1055
|
+
},
|
|
1056
|
+
interactive: {
|
|
1057
|
+
true: "ddga-card--interactive"
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
defaultVariants: {
|
|
1061
|
+
variant: "default",
|
|
1062
|
+
padding: "md",
|
|
1063
|
+
orientation: "vertical"
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
function Card({
|
|
1067
|
+
variant,
|
|
1068
|
+
padding,
|
|
1069
|
+
orientation,
|
|
1070
|
+
interactive,
|
|
1071
|
+
asChild,
|
|
1072
|
+
className,
|
|
1073
|
+
...props
|
|
1074
|
+
}) {
|
|
1075
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "div";
|
|
1076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1077
|
+
Comp,
|
|
1078
|
+
{
|
|
1079
|
+
"data-slot": "card",
|
|
1080
|
+
"data-orientation": orientation ?? "vertical",
|
|
1081
|
+
className: cn(cardVariants({ variant, padding, orientation, interactive }), className),
|
|
1082
|
+
...props
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
function CardImage({ aspectRatio = "16/9", className, style, ...props }) {
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1088
|
+
"img",
|
|
1089
|
+
{
|
|
1090
|
+
"data-slot": "card-image",
|
|
1091
|
+
className: cn("ddga-card__image", className),
|
|
1092
|
+
style: {
|
|
1093
|
+
"--ddga-card-image-aspect": aspectRatio,
|
|
1094
|
+
...style
|
|
1095
|
+
},
|
|
1096
|
+
...props
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
function CardHeader({ asChild, className, ...props }) {
|
|
1101
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "div";
|
|
1102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Comp, { "data-slot": "card-header", className: cn("ddga-card__header", className), ...props });
|
|
1103
|
+
}
|
|
1104
|
+
function CardTitle({ asChild, className, ...props }) {
|
|
1105
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "h3";
|
|
1106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Comp, { "data-slot": "card-title", className: cn("ddga-card__title", className), ...props });
|
|
1107
|
+
}
|
|
1108
|
+
function CardDescription({ asChild, className, ...props }) {
|
|
1109
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "p";
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1111
|
+
Comp,
|
|
1112
|
+
{
|
|
1113
|
+
"data-slot": "card-description",
|
|
1114
|
+
className: cn("ddga-card__description", className),
|
|
1115
|
+
...props
|
|
1116
|
+
}
|
|
1117
|
+
);
|
|
1118
|
+
}
|
|
1119
|
+
function CardContent({ asChild, className, ...props }) {
|
|
1120
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "div";
|
|
1121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Comp, { "data-slot": "card-content", className: cn("ddga-card__content", className), ...props });
|
|
1122
|
+
}
|
|
1123
|
+
function CardFooter({ asChild, className, ...props }) {
|
|
1124
|
+
const Comp = asChild ? import_radix_ui6.Slot.Slot : "div";
|
|
1125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Comp, { "data-slot": "card-footer", className: cn("ddga-card__footer", className), ...props });
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// src/components/Badge/Badge.tsx
|
|
1129
|
+
var import_react6 = require("react");
|
|
1130
|
+
var import_radix_ui7 = require("radix-ui");
|
|
1131
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1132
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1133
|
+
var badgeVariants = (0, import_class_variance_authority10.cva)("ddga-badge", {
|
|
1134
|
+
variants: {
|
|
1135
|
+
variant: {
|
|
1136
|
+
// Solid family
|
|
1137
|
+
default: "ddga-badge--default",
|
|
1138
|
+
primary: "ddga-badge--primary",
|
|
1139
|
+
secondary: "ddga-badge--secondary",
|
|
1140
|
+
destructive: "ddga-badge--destructive",
|
|
1141
|
+
success: "ddga-badge--success",
|
|
1142
|
+
warning: "ddga-badge--warning",
|
|
1143
|
+
info: "ddga-badge--info",
|
|
1144
|
+
// Subtle family (tonal)
|
|
1145
|
+
"primary-subtle": "ddga-badge--primary-subtle",
|
|
1146
|
+
"secondary-subtle": "ddga-badge--secondary-subtle",
|
|
1147
|
+
"destructive-subtle": "ddga-badge--destructive-subtle",
|
|
1148
|
+
"success-subtle": "ddga-badge--success-subtle",
|
|
1149
|
+
"warning-subtle": "ddga-badge--warning-subtle",
|
|
1150
|
+
"info-subtle": "ddga-badge--info-subtle",
|
|
1151
|
+
// Outline
|
|
1152
|
+
outline: "ddga-badge--outline"
|
|
1153
|
+
},
|
|
1154
|
+
size: {
|
|
1155
|
+
sm: "ddga-badge--sm",
|
|
1156
|
+
md: "ddga-badge--md"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
defaultVariants: {
|
|
1160
|
+
variant: "default",
|
|
1161
|
+
size: "md"
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
function Badge({
|
|
1165
|
+
variant,
|
|
1166
|
+
size,
|
|
1167
|
+
asChild,
|
|
1168
|
+
dot,
|
|
1169
|
+
startIcon,
|
|
1170
|
+
endIcon,
|
|
1171
|
+
dismissible,
|
|
1172
|
+
open,
|
|
1173
|
+
onDismiss,
|
|
1174
|
+
closeLabel = "Dismiss",
|
|
1175
|
+
className,
|
|
1176
|
+
children,
|
|
1177
|
+
...props
|
|
1178
|
+
}) {
|
|
1179
|
+
const isControlled = open !== void 0;
|
|
1180
|
+
const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react6.useState)(true);
|
|
1181
|
+
const isOpen = isControlled ? open : uncontrolledOpen;
|
|
1182
|
+
if (process.env.NODE_ENV !== "production" && asChild && dismissible) {
|
|
1183
|
+
console.warn(
|
|
1184
|
+
"[Badge] `dismissible` is not supported with `asChild` because it would nest an interactive close button inside the consumer's element (invalid HTML). The close button will not render."
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
if (!isOpen) return null;
|
|
1188
|
+
const Comp = asChild ? import_radix_ui7.Slot.Slot : "span";
|
|
1189
|
+
const showClose = dismissible && !asChild;
|
|
1190
|
+
const handleDismiss = () => {
|
|
1191
|
+
if (!isControlled) setUncontrolledOpen(false);
|
|
1192
|
+
onDismiss?.();
|
|
1193
|
+
};
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props, children: [
|
|
1195
|
+
dot ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ddga-badge__dot", "aria-hidden": "true" }) : null,
|
|
1196
|
+
startIcon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ddga-badge__icon", "aria-hidden": "true", children: startIcon }) : null,
|
|
1197
|
+
asChild ? (
|
|
1198
|
+
// children IS the consumer's single element (e.g. <a>). Slottable marks
|
|
1199
|
+
// where THAT element's original children should land — without it the
|
|
1200
|
+
// dot/icons would replace the link text.
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui7.Slot.Slottable, { children })
|
|
1202
|
+
) : children,
|
|
1203
|
+
endIcon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ddga-badge__icon", "aria-hidden": "true", children: endIcon }) : null,
|
|
1204
|
+
showClose ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1205
|
+
"button",
|
|
1206
|
+
{
|
|
1207
|
+
type: "button",
|
|
1208
|
+
className: "ddga-badge__close",
|
|
1209
|
+
"aria-label": closeLabel,
|
|
1210
|
+
onClick: handleDismiss,
|
|
1211
|
+
"data-slot": "badge-close",
|
|
1212
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Close, { "aria-hidden": "true" })
|
|
1213
|
+
}
|
|
1214
|
+
) : null
|
|
1215
|
+
] });
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
// src/components/Divider/Divider.tsx
|
|
1219
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1220
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1221
|
+
var dividerVariants = (0, import_class_variance_authority11.cva)("ddga-divider", {
|
|
1222
|
+
variants: {
|
|
1223
|
+
orientation: {
|
|
1224
|
+
horizontal: "ddga-divider--horizontal",
|
|
1225
|
+
vertical: "ddga-divider--vertical"
|
|
1226
|
+
},
|
|
1227
|
+
variant: {
|
|
1228
|
+
solid: "ddga-divider--solid",
|
|
1229
|
+
dashed: "ddga-divider--dashed"
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
defaultVariants: {
|
|
1233
|
+
orientation: "horizontal",
|
|
1234
|
+
variant: "solid"
|
|
1235
|
+
}
|
|
1236
|
+
});
|
|
1237
|
+
function Divider({
|
|
1238
|
+
orientation = "horizontal",
|
|
1239
|
+
variant = "solid",
|
|
1240
|
+
labelPosition = "center",
|
|
1241
|
+
decorative = false,
|
|
1242
|
+
className,
|
|
1243
|
+
children,
|
|
1244
|
+
...props
|
|
1245
|
+
}) {
|
|
1246
|
+
const isLabeled = orientation === "horizontal" && children !== void 0 && children !== null && children !== "";
|
|
1247
|
+
const a11yProps = decorative ? { role: "none" } : {
|
|
1248
|
+
role: "separator",
|
|
1249
|
+
...orientation === "vertical" ? { "aria-orientation": "vertical" } : {}
|
|
1250
|
+
};
|
|
1251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1252
|
+
"div",
|
|
1253
|
+
{
|
|
1254
|
+
"data-slot": "divider",
|
|
1255
|
+
"data-orientation": orientation,
|
|
1256
|
+
className: cn(
|
|
1257
|
+
dividerVariants({ orientation, variant }),
|
|
1258
|
+
isLabeled && "ddga-divider--labeled",
|
|
1259
|
+
isLabeled && `ddga-divider--label-${labelPosition}`,
|
|
1260
|
+
className
|
|
1261
|
+
),
|
|
1262
|
+
...a11yProps,
|
|
1263
|
+
...props,
|
|
1264
|
+
children: isLabeled ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ddga-divider__label", children }) : null
|
|
1265
|
+
}
|
|
1266
|
+
);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
// src/components/Avatar/Avatar.tsx
|
|
1270
|
+
var import_react7 = require("react");
|
|
1271
|
+
var import_radix_ui8 = require("radix-ui");
|
|
1272
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1273
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1274
|
+
var avatarVariants = (0, import_class_variance_authority12.cva)("ddga-avatar", {
|
|
1275
|
+
variants: {
|
|
1276
|
+
size: {
|
|
1277
|
+
xs: "ddga-avatar--xs",
|
|
1278
|
+
sm: "ddga-avatar--sm",
|
|
1279
|
+
md: "ddga-avatar--md",
|
|
1280
|
+
lg: "ddga-avatar--lg",
|
|
1281
|
+
xl: "ddga-avatar--xl"
|
|
1282
|
+
},
|
|
1283
|
+
shape: {
|
|
1284
|
+
circle: "ddga-avatar--circle",
|
|
1285
|
+
square: "ddga-avatar--square"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
defaultVariants: {
|
|
1289
|
+
size: "md",
|
|
1290
|
+
shape: "circle"
|
|
1291
|
+
}
|
|
1292
|
+
});
|
|
1293
|
+
var fallbackVariants = (0, import_class_variance_authority12.cva)("ddga-avatar__fallback", {
|
|
1294
|
+
variants: {
|
|
1295
|
+
colorScheme: {
|
|
1296
|
+
default: "ddga-avatar__fallback--default",
|
|
1297
|
+
primary: "ddga-avatar__fallback--primary",
|
|
1298
|
+
secondary: "ddga-avatar__fallback--secondary",
|
|
1299
|
+
success: "ddga-avatar__fallback--success",
|
|
1300
|
+
warning: "ddga-avatar__fallback--warning",
|
|
1301
|
+
destructive: "ddga-avatar__fallback--destructive",
|
|
1302
|
+
info: "ddga-avatar__fallback--info"
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
defaultVariants: {
|
|
1306
|
+
colorScheme: "default"
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
function Avatar({ size, shape, status, statusLabel, className, children, ...props }) {
|
|
1310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1311
|
+
import_radix_ui8.Avatar.Root,
|
|
1312
|
+
{
|
|
1313
|
+
"data-slot": "avatar",
|
|
1314
|
+
"data-status": status,
|
|
1315
|
+
className: cn(avatarVariants({ size, shape }), className),
|
|
1316
|
+
...props,
|
|
1317
|
+
children: [
|
|
1318
|
+
children,
|
|
1319
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1320
|
+
"span",
|
|
1321
|
+
{
|
|
1322
|
+
className: cn("ddga-avatar__status", `ddga-avatar__status--${status}`),
|
|
1323
|
+
role: "status",
|
|
1324
|
+
"aria-label": statusLabel ?? status
|
|
1325
|
+
}
|
|
1326
|
+
) : null
|
|
1327
|
+
]
|
|
1328
|
+
}
|
|
1329
|
+
);
|
|
1330
|
+
}
|
|
1331
|
+
function AvatarImage({ className, ...props }) {
|
|
1332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1333
|
+
import_radix_ui8.Avatar.Image,
|
|
1334
|
+
{
|
|
1335
|
+
"data-slot": "avatar-image",
|
|
1336
|
+
className: cn("ddga-avatar__image", className),
|
|
1337
|
+
...props
|
|
1338
|
+
}
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
function AvatarFallback({ colorScheme, className, ...props }) {
|
|
1342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1343
|
+
import_radix_ui8.Avatar.Fallback,
|
|
1344
|
+
{
|
|
1345
|
+
"data-slot": "avatar-fallback",
|
|
1346
|
+
"data-color-scheme": colorScheme ?? "default",
|
|
1347
|
+
className: cn(fallbackVariants({ colorScheme }), className),
|
|
1348
|
+
...props
|
|
1349
|
+
}
|
|
1350
|
+
);
|
|
1351
|
+
}
|
|
1352
|
+
function AvatarGroup({ max, size, shape, className, children, ...props }) {
|
|
1353
|
+
const all = import_react7.Children.toArray(children).filter(import_react7.isValidElement);
|
|
1354
|
+
const visible = max !== void 0 && all.length > max ? all.slice(0, max) : all;
|
|
1355
|
+
const overflow = max !== void 0 ? Math.max(0, all.length - max) : 0;
|
|
1356
|
+
const cascaded = visible.map(
|
|
1357
|
+
(child, i) => (0, import_react7.cloneElement)(child, {
|
|
1358
|
+
key: child.key ?? i,
|
|
1359
|
+
size: child.props.size ?? size,
|
|
1360
|
+
shape: child.props.shape ?? shape
|
|
1361
|
+
})
|
|
1362
|
+
);
|
|
1363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { "data-slot": "avatar-group", className: cn("ddga-avatar-group", className), ...props, children: [
|
|
1364
|
+
cascaded,
|
|
1365
|
+
overflow > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Avatar, { size, shape, "aria-label": `${overflow} more`, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(AvatarFallback, { children: [
|
|
1366
|
+
"+",
|
|
1367
|
+
overflow
|
|
1368
|
+
] }) }) : null
|
|
1369
|
+
] });
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
1373
|
+
var import_react8 = require("react");
|
|
1374
|
+
var import_radix_ui9 = require("radix-ui");
|
|
1375
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1376
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1377
|
+
var tooltipContentVariants = (0, import_class_variance_authority13.cva)("ddga-tooltip", {
|
|
1378
|
+
variants: {
|
|
1379
|
+
size: {
|
|
1380
|
+
sm: "ddga-tooltip--sm",
|
|
1381
|
+
md: "ddga-tooltip--md"
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
defaultVariants: {
|
|
1385
|
+
size: "md"
|
|
1386
|
+
}
|
|
1387
|
+
});
|
|
1388
|
+
function Tooltip(props) {
|
|
1389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui9.Tooltip.Root, { ...props });
|
|
1390
|
+
}
|
|
1391
|
+
function TooltipTrigger({ className, ...props }) {
|
|
1392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui9.Tooltip.Trigger, { "data-slot": "tooltip-trigger", className, ...props });
|
|
1393
|
+
}
|
|
1394
|
+
function TooltipContent({
|
|
1395
|
+
size,
|
|
1396
|
+
arrow = true,
|
|
1397
|
+
sideOffset = 6,
|
|
1398
|
+
className,
|
|
1399
|
+
children,
|
|
1400
|
+
...props
|
|
1401
|
+
}) {
|
|
1402
|
+
const ctx = (0, import_react8.useContext)(DgaContext);
|
|
1403
|
+
const portalContainer = ctx?.rootEl ?? void 0;
|
|
1404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui9.Tooltip.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1405
|
+
import_radix_ui9.Tooltip.Content,
|
|
1406
|
+
{
|
|
1407
|
+
"data-slot": "tooltip-content",
|
|
1408
|
+
sideOffset,
|
|
1409
|
+
className: cn(tooltipContentVariants({ size }), className),
|
|
1410
|
+
...props,
|
|
1411
|
+
children: [
|
|
1412
|
+
children,
|
|
1413
|
+
arrow ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_radix_ui9.Tooltip.Arrow, { className: "ddga-tooltip__arrow" }) : null
|
|
1414
|
+
]
|
|
1415
|
+
}
|
|
1416
|
+
) });
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
// src/components/Alert/Alert.tsx
|
|
1420
|
+
var import_react9 = require("react");
|
|
1421
|
+
var import_radix_ui10 = require("radix-ui");
|
|
1422
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1423
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1424
|
+
var alertVariants = (0, import_class_variance_authority14.cva)("ddga-alert", {
|
|
1425
|
+
variants: {
|
|
1426
|
+
variant: {
|
|
1427
|
+
info: "ddga-alert--info",
|
|
1428
|
+
success: "ddga-alert--success",
|
|
1429
|
+
warning: "ddga-alert--warning",
|
|
1430
|
+
destructive: "ddga-alert--destructive"
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
defaultVariants: {
|
|
1434
|
+
variant: "info"
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
var DEFAULT_ICONS = {
|
|
1438
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Info, { "aria-hidden": "true" }),
|
|
1439
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Check, { "aria-hidden": "true" }),
|
|
1440
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertTriangle, { "aria-hidden": "true" }),
|
|
1441
|
+
destructive: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertCircle, { "aria-hidden": "true" })
|
|
1442
|
+
};
|
|
1443
|
+
function Alert({
|
|
1444
|
+
variant,
|
|
1445
|
+
asChild,
|
|
1446
|
+
icon,
|
|
1447
|
+
dismissible,
|
|
1448
|
+
open: controlledOpen,
|
|
1449
|
+
onDismiss,
|
|
1450
|
+
live,
|
|
1451
|
+
closeLabel = "Dismiss",
|
|
1452
|
+
className,
|
|
1453
|
+
children,
|
|
1454
|
+
...props
|
|
1455
|
+
}) {
|
|
1456
|
+
const [internalOpen, setInternalOpen] = (0, import_react9.useState)(true);
|
|
1457
|
+
const isControlled = controlledOpen !== void 0;
|
|
1458
|
+
const open = isControlled ? controlledOpen : internalOpen;
|
|
1459
|
+
if (!open) return null;
|
|
1460
|
+
const Comp = asChild ? import_radix_ui10.Slot.Slot : "div";
|
|
1461
|
+
const resolvedIcon = icon === false ? null : icon !== void 0 ? icon : DEFAULT_ICONS[variant ?? "info"];
|
|
1462
|
+
const liveProps = live === "assertive" ? { role: "alert", "aria-live": "assertive" } : live === "polite" ? { role: "status", "aria-live": "polite" } : {};
|
|
1463
|
+
function handleDismiss() {
|
|
1464
|
+
if (!isControlled) setInternalOpen(false);
|
|
1465
|
+
onDismiss?.();
|
|
1466
|
+
}
|
|
1467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1468
|
+
Comp,
|
|
1469
|
+
{
|
|
1470
|
+
"data-slot": "alert",
|
|
1471
|
+
"data-variant": variant ?? "info",
|
|
1472
|
+
className: cn(alertVariants({ variant }), className),
|
|
1473
|
+
...liveProps,
|
|
1474
|
+
...props,
|
|
1475
|
+
children: [
|
|
1476
|
+
resolvedIcon ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "ddga-alert__icon", children: resolvedIcon }) : null,
|
|
1477
|
+
asChild ? (
|
|
1478
|
+
// Slot mode: the consumer's element receives the children body.
|
|
1479
|
+
// Title/description are nested by the consumer.
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_radix_ui10.Slot.Slottable, { children })
|
|
1481
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ddga-alert__body", children }),
|
|
1482
|
+
dismissible ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1483
|
+
"button",
|
|
1484
|
+
{
|
|
1485
|
+
type: "button",
|
|
1486
|
+
className: "ddga-alert__close",
|
|
1487
|
+
"aria-label": closeLabel,
|
|
1488
|
+
onClick: handleDismiss,
|
|
1489
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Close, { "aria-hidden": "true" })
|
|
1490
|
+
}
|
|
1491
|
+
) : null
|
|
1492
|
+
]
|
|
1493
|
+
}
|
|
1494
|
+
);
|
|
1495
|
+
}
|
|
1496
|
+
function AlertTitle({ asChild, className, ...props }) {
|
|
1497
|
+
const Comp = asChild ? import_radix_ui10.Slot.Slot : "h5";
|
|
1498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Comp, { "data-slot": "alert-title", className: cn("ddga-alert__title", className), ...props });
|
|
1499
|
+
}
|
|
1500
|
+
function AlertDescription({ asChild, className, ...props }) {
|
|
1501
|
+
const Comp = asChild ? import_radix_ui10.Slot.Slot : "p";
|
|
1502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1503
|
+
Comp,
|
|
1504
|
+
{
|
|
1505
|
+
"data-slot": "alert-description",
|
|
1506
|
+
className: cn("ddga-alert__description", className),
|
|
1507
|
+
...props
|
|
1508
|
+
}
|
|
1509
|
+
);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
// src/components/Modal/Modal.tsx
|
|
1513
|
+
var import_react10 = require("react");
|
|
1514
|
+
var import_radix_ui11 = require("radix-ui");
|
|
1515
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1516
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1517
|
+
var modalContentVariants = (0, import_class_variance_authority15.cva)("ddga-modal", {
|
|
1518
|
+
variants: {
|
|
1519
|
+
size: {
|
|
1520
|
+
sm: "ddga-modal--sm",
|
|
1521
|
+
md: "ddga-modal--md",
|
|
1522
|
+
lg: "ddga-modal--lg",
|
|
1523
|
+
xl: "ddga-modal--xl",
|
|
1524
|
+
full: "ddga-modal--full"
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
1527
|
+
defaultVariants: {
|
|
1528
|
+
size: "md"
|
|
1529
|
+
}
|
|
1530
|
+
});
|
|
1531
|
+
function Modal(props) {
|
|
1532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_radix_ui11.Dialog.Root, { ...props });
|
|
1533
|
+
}
|
|
1534
|
+
function ModalTrigger({ className, ...props }) {
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_radix_ui11.Dialog.Trigger, { "data-slot": "modal-trigger", className, ...props });
|
|
1536
|
+
}
|
|
1537
|
+
function ModalContent({
|
|
1538
|
+
size,
|
|
1539
|
+
showCloseButton = true,
|
|
1540
|
+
closeLabel = "Close",
|
|
1541
|
+
className,
|
|
1542
|
+
children,
|
|
1543
|
+
...props
|
|
1544
|
+
}) {
|
|
1545
|
+
const ctx = (0, import_react10.useContext)(DgaContext);
|
|
1546
|
+
const portalContainer = ctx?.rootEl ?? void 0;
|
|
1547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_radix_ui11.Dialog.Portal, { container: portalContainer, children: [
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_radix_ui11.Dialog.Overlay, { className: "ddga-modal__overlay", "data-slot": "modal-overlay" }),
|
|
1549
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1550
|
+
import_radix_ui11.Dialog.Content,
|
|
1551
|
+
{
|
|
1552
|
+
"data-slot": "modal-content",
|
|
1553
|
+
className: cn(modalContentVariants({ size }), className),
|
|
1554
|
+
...props,
|
|
1555
|
+
children: [
|
|
1556
|
+
children,
|
|
1557
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1558
|
+
import_radix_ui11.Dialog.Close,
|
|
1559
|
+
{
|
|
1560
|
+
className: "ddga-modal__close",
|
|
1561
|
+
"aria-label": closeLabel,
|
|
1562
|
+
"data-slot": "modal-close-x",
|
|
1563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Close, { "aria-hidden": "true" })
|
|
1564
|
+
}
|
|
1565
|
+
) : null
|
|
1566
|
+
]
|
|
1567
|
+
}
|
|
1568
|
+
)
|
|
1569
|
+
] });
|
|
1570
|
+
}
|
|
1571
|
+
function ModalHeader({ asChild, className, ...props }) {
|
|
1572
|
+
const Comp = asChild ? import_radix_ui11.Slot.Slot : "div";
|
|
1573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Comp, { "data-slot": "modal-header", className: cn("ddga-modal__header", className), ...props });
|
|
1574
|
+
}
|
|
1575
|
+
function ModalTitle({ asChild, className, ...props }) {
|
|
1576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1577
|
+
import_radix_ui11.Dialog.Title,
|
|
1578
|
+
{
|
|
1579
|
+
asChild,
|
|
1580
|
+
"data-slot": "modal-title",
|
|
1581
|
+
className: cn("ddga-modal__title", className),
|
|
1582
|
+
...props
|
|
1583
|
+
}
|
|
1584
|
+
);
|
|
1585
|
+
}
|
|
1586
|
+
function ModalDescription({ asChild, className, ...props }) {
|
|
1587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1588
|
+
import_radix_ui11.Dialog.Description,
|
|
1589
|
+
{
|
|
1590
|
+
asChild,
|
|
1591
|
+
"data-slot": "modal-description",
|
|
1592
|
+
className: cn("ddga-modal__description", className),
|
|
1593
|
+
...props
|
|
1594
|
+
}
|
|
1595
|
+
);
|
|
1596
|
+
}
|
|
1597
|
+
function ModalFooter({ asChild, className, ...props }) {
|
|
1598
|
+
const Comp = asChild ? import_radix_ui11.Slot.Slot : "div";
|
|
1599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Comp, { "data-slot": "modal-footer", className: cn("ddga-modal__footer", className), ...props });
|
|
1600
|
+
}
|
|
1601
|
+
function ModalClose({ className, ...props }) {
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_radix_ui11.Dialog.Close, { "data-slot": "modal-close", className, ...props });
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
// src/components/Toast/Toast.tsx
|
|
1606
|
+
var import_react12 = require("react");
|
|
1607
|
+
var import_radix_ui12 = require("radix-ui");
|
|
1608
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
1609
|
+
|
|
1610
|
+
// src/components/Toast/toast-store.ts
|
|
1611
|
+
var import_react11 = require("react");
|
|
1612
|
+
var EXIT_ANIM_MS = 200;
|
|
1613
|
+
function createToastStore() {
|
|
1614
|
+
let toasts = [];
|
|
1615
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1616
|
+
let counter = 0;
|
|
1617
|
+
function emit() {
|
|
1618
|
+
for (const l of listeners) l();
|
|
1619
|
+
}
|
|
1620
|
+
function subscribe(listener) {
|
|
1621
|
+
listeners.add(listener);
|
|
1622
|
+
return () => {
|
|
1623
|
+
listeners.delete(listener);
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
function getSnapshot() {
|
|
1627
|
+
return toasts;
|
|
1628
|
+
}
|
|
1629
|
+
function nextId() {
|
|
1630
|
+
counter += 1;
|
|
1631
|
+
return `t${counter}`;
|
|
1632
|
+
}
|
|
1633
|
+
function add(variant, message, options = {}) {
|
|
1634
|
+
const id = options.id ?? nextId();
|
|
1635
|
+
const existing = toasts.findIndex((t) => t.id === id);
|
|
1636
|
+
const data = {
|
|
1637
|
+
id,
|
|
1638
|
+
variant,
|
|
1639
|
+
open: true,
|
|
1640
|
+
title: message,
|
|
1641
|
+
description: options.description,
|
|
1642
|
+
duration: options.duration,
|
|
1643
|
+
action: options.action,
|
|
1644
|
+
onDismiss: options.onDismiss
|
|
1645
|
+
};
|
|
1646
|
+
if (existing >= 0) {
|
|
1647
|
+
toasts = toasts.map((t, i) => i === existing ? data : t);
|
|
1648
|
+
} else {
|
|
1649
|
+
toasts = [...toasts, data];
|
|
1650
|
+
}
|
|
1651
|
+
emit();
|
|
1652
|
+
return id;
|
|
1653
|
+
}
|
|
1654
|
+
function dismiss(id) {
|
|
1655
|
+
if (id === void 0) {
|
|
1656
|
+
const ids = toasts.map((t) => t.id);
|
|
1657
|
+
toasts = toasts.map((t) => ({ ...t, open: false }));
|
|
1658
|
+
emit();
|
|
1659
|
+
setTimeout(() => {
|
|
1660
|
+
ids.forEach((id2) => remove(id2));
|
|
1661
|
+
}, EXIT_ANIM_MS);
|
|
1662
|
+
} else {
|
|
1663
|
+
toasts = toasts.map((t) => t.id === id ? { ...t, open: false } : t);
|
|
1664
|
+
emit();
|
|
1665
|
+
setTimeout(() => remove(id), EXIT_ANIM_MS);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
function remove(id) {
|
|
1669
|
+
const target = toasts.find((t) => t.id === id);
|
|
1670
|
+
toasts = toasts.filter((t) => t.id !== id);
|
|
1671
|
+
emit();
|
|
1672
|
+
target?.onDismiss?.();
|
|
1673
|
+
}
|
|
1674
|
+
function __reset() {
|
|
1675
|
+
toasts = [];
|
|
1676
|
+
counter = 0;
|
|
1677
|
+
emit();
|
|
1678
|
+
}
|
|
1679
|
+
return { subscribe, getSnapshot, add, dismiss, remove, __reset };
|
|
1680
|
+
}
|
|
1681
|
+
var toastStore = createToastStore();
|
|
1682
|
+
function createToast(store) {
|
|
1683
|
+
const fn = ((message, options) => store.add("default", message, options));
|
|
1684
|
+
fn.default = (message, options) => store.add("default", message, options);
|
|
1685
|
+
fn.info = (message, options) => store.add("info", message, options);
|
|
1686
|
+
fn.success = (message, options) => store.add("success", message, options);
|
|
1687
|
+
fn.warning = (message, options) => store.add("warning", message, options);
|
|
1688
|
+
fn.error = (message, options) => store.add("destructive", message, options);
|
|
1689
|
+
fn.destructive = fn.error;
|
|
1690
|
+
fn.dismiss = (id) => store.dismiss(id);
|
|
1691
|
+
return fn;
|
|
1692
|
+
}
|
|
1693
|
+
var toast = createToast(toastStore);
|
|
1694
|
+
|
|
1695
|
+
// src/components/Toast/Toast.tsx
|
|
1696
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1697
|
+
var toastVariants = (0, import_class_variance_authority16.cva)("ddga-toast", {
|
|
1698
|
+
variants: {
|
|
1699
|
+
variant: {
|
|
1700
|
+
default: "ddga-toast--default",
|
|
1701
|
+
info: "ddga-toast--info",
|
|
1702
|
+
success: "ddga-toast--success",
|
|
1703
|
+
warning: "ddga-toast--warning",
|
|
1704
|
+
destructive: "ddga-toast--destructive"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
defaultVariants: {
|
|
1708
|
+
variant: "default"
|
|
1709
|
+
}
|
|
1710
|
+
});
|
|
1711
|
+
var toastViewportVariants = (0, import_class_variance_authority16.cva)("ddga-toast-viewport", {
|
|
1712
|
+
variants: {
|
|
1713
|
+
position: {
|
|
1714
|
+
"top-start": "ddga-toast-viewport--top-start",
|
|
1715
|
+
"top-center": "ddga-toast-viewport--top-center",
|
|
1716
|
+
"top-end": "ddga-toast-viewport--top-end",
|
|
1717
|
+
"bottom-start": "ddga-toast-viewport--bottom-start",
|
|
1718
|
+
"bottom-center": "ddga-toast-viewport--bottom-center",
|
|
1719
|
+
"bottom-end": "ddga-toast-viewport--bottom-end"
|
|
1720
|
+
},
|
|
1721
|
+
containerized: {
|
|
1722
|
+
true: "ddga-toast-viewport--containerized"
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
defaultVariants: {
|
|
1726
|
+
position: "bottom-end"
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
var DEFAULT_ICONS2 = {
|
|
1730
|
+
default: null,
|
|
1731
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Info, { "aria-hidden": "true" }),
|
|
1732
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Check, { "aria-hidden": "true" }),
|
|
1733
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertTriangle, { "aria-hidden": "true" }),
|
|
1734
|
+
destructive: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlertCircle, { "aria-hidden": "true" })
|
|
1735
|
+
};
|
|
1736
|
+
function Toaster({
|
|
1737
|
+
position = "bottom-end",
|
|
1738
|
+
containerized = false,
|
|
1739
|
+
duration = 4e3,
|
|
1740
|
+
closeButton = true,
|
|
1741
|
+
closeLabel = "Dismiss",
|
|
1742
|
+
hideIcon = false,
|
|
1743
|
+
className,
|
|
1744
|
+
swipeDirection,
|
|
1745
|
+
store = toastStore
|
|
1746
|
+
}) {
|
|
1747
|
+
const toasts = (0, import_react12.useSyncExternalStore)(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
1748
|
+
const resolvedSwipe = swipeDirection ?? (position.startsWith("top") ? "up" : "down");
|
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_radix_ui12.Toast.Provider, { duration, swipeDirection: resolvedSwipe, children: [
|
|
1750
|
+
toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1751
|
+
ToastItem,
|
|
1752
|
+
{
|
|
1753
|
+
toast: t,
|
|
1754
|
+
store,
|
|
1755
|
+
closeButton,
|
|
1756
|
+
closeLabel,
|
|
1757
|
+
hideIcon
|
|
1758
|
+
},
|
|
1759
|
+
t.id
|
|
1760
|
+
)),
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1762
|
+
import_radix_ui12.Toast.Viewport,
|
|
1763
|
+
{
|
|
1764
|
+
"data-slot": "toast-viewport",
|
|
1765
|
+
"data-position": position,
|
|
1766
|
+
className: cn(toastViewportVariants({ position, containerized }), className)
|
|
1767
|
+
}
|
|
1768
|
+
)
|
|
1769
|
+
] });
|
|
1770
|
+
}
|
|
1771
|
+
function ToastItem({ toast: t, store, closeButton, closeLabel, hideIcon }) {
|
|
1772
|
+
const radixType = t.variant === "destructive" ? "foreground" : "background";
|
|
1773
|
+
const icon = hideIcon ? null : DEFAULT_ICONS2[t.variant];
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1775
|
+
import_radix_ui12.Toast.Root,
|
|
1776
|
+
{
|
|
1777
|
+
"data-slot": "toast",
|
|
1778
|
+
"data-variant": t.variant,
|
|
1779
|
+
className: toastVariants({ variant: t.variant }),
|
|
1780
|
+
open: t.open,
|
|
1781
|
+
type: radixType,
|
|
1782
|
+
duration: t.duration,
|
|
1783
|
+
onOpenChange: (open) => {
|
|
1784
|
+
if (!open) {
|
|
1785
|
+
store.dismiss(t.id);
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
children: [
|
|
1789
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ddga-toast__icon", children: icon }) : null,
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ddga-toast__body", children: [
|
|
1791
|
+
t.title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_radix_ui12.Toast.Title, { className: "ddga-toast__title", children: t.title }) : null,
|
|
1792
|
+
t.description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_radix_ui12.Toast.Description, { className: "ddga-toast__description", children: t.description }) : null,
|
|
1793
|
+
t.action ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1794
|
+
import_radix_ui12.Toast.Action,
|
|
1795
|
+
{
|
|
1796
|
+
className: "ddga-toast__action",
|
|
1797
|
+
altText: t.action.altText ?? (typeof t.action.label === "string" ? t.action.label : "Action"),
|
|
1798
|
+
onClick: () => {
|
|
1799
|
+
t.action?.onClick();
|
|
1800
|
+
store.dismiss(t.id);
|
|
1801
|
+
},
|
|
1802
|
+
children: t.action.label
|
|
1803
|
+
}
|
|
1804
|
+
) : null
|
|
1805
|
+
] }),
|
|
1806
|
+
closeButton ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_radix_ui12.Toast.Close, { className: "ddga-toast__close", "aria-label": closeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Close, { "aria-hidden": "true" }) }) : null
|
|
1807
|
+
]
|
|
1808
|
+
}
|
|
1809
|
+
);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
// src/components/Tabs/Tabs.tsx
|
|
1813
|
+
var import_radix_ui13 = require("radix-ui");
|
|
1814
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
1815
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1816
|
+
var tabsVariants = (0, import_class_variance_authority17.cva)("ddga-tabs", {
|
|
1817
|
+
variants: {
|
|
1818
|
+
variant: {
|
|
1819
|
+
line: "ddga-tabs--line",
|
|
1820
|
+
pill: "ddga-tabs--pill"
|
|
1821
|
+
},
|
|
1822
|
+
size: {
|
|
1823
|
+
sm: "ddga-tabs--sm",
|
|
1824
|
+
md: "ddga-tabs--md"
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
defaultVariants: {
|
|
1828
|
+
variant: "line",
|
|
1829
|
+
size: "md"
|
|
1830
|
+
}
|
|
1831
|
+
});
|
|
1832
|
+
var tabsListVariants = (0, import_class_variance_authority17.cva)("ddga-tabs__list", {
|
|
1833
|
+
variants: {
|
|
1834
|
+
fullWidth: {
|
|
1835
|
+
true: "ddga-tabs__list--full-width"
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
});
|
|
1839
|
+
function Tabs({ variant, size, className, ...props }) {
|
|
1840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1841
|
+
import_radix_ui13.Tabs.Root,
|
|
1842
|
+
{
|
|
1843
|
+
"data-slot": "tabs",
|
|
1844
|
+
className: cn(tabsVariants({ variant, size }), className),
|
|
1845
|
+
...props
|
|
1846
|
+
}
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1849
|
+
function TabsList({ fullWidth, className, ...props }) {
|
|
1850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1851
|
+
import_radix_ui13.Tabs.List,
|
|
1852
|
+
{
|
|
1853
|
+
"data-slot": "tabs-list",
|
|
1854
|
+
className: cn(tabsListVariants({ fullWidth }), className),
|
|
1855
|
+
...props
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
}
|
|
1859
|
+
function TabsTrigger({ className, ...props }) {
|
|
1860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1861
|
+
import_radix_ui13.Tabs.Trigger,
|
|
1862
|
+
{
|
|
1863
|
+
"data-slot": "tabs-trigger",
|
|
1864
|
+
className: cn("ddga-tabs__trigger", className),
|
|
1865
|
+
...props
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1869
|
+
function TabsContent({ className, ...props }) {
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1871
|
+
import_radix_ui13.Tabs.Content,
|
|
1872
|
+
{
|
|
1873
|
+
"data-slot": "tabs-content",
|
|
1874
|
+
className: cn("ddga-tabs__content", className),
|
|
1875
|
+
...props
|
|
1876
|
+
}
|
|
1877
|
+
);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1881
|
+
var import_radix_ui14 = require("radix-ui");
|
|
1882
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
1883
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1884
|
+
var breadcrumbVariants = (0, import_class_variance_authority18.cva)("ddga-breadcrumb", {
|
|
1885
|
+
variants: {
|
|
1886
|
+
size: {
|
|
1887
|
+
sm: "ddga-breadcrumb--sm",
|
|
1888
|
+
md: "ddga-breadcrumb--md"
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
defaultVariants: {
|
|
1892
|
+
size: "md"
|
|
1893
|
+
}
|
|
1894
|
+
});
|
|
1895
|
+
function Breadcrumb({ size, className, ...props }) {
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1897
|
+
"nav",
|
|
1898
|
+
{
|
|
1899
|
+
"aria-label": "Breadcrumb",
|
|
1900
|
+
"data-slot": "breadcrumb",
|
|
1901
|
+
className: cn(breadcrumbVariants({ size }), className),
|
|
1902
|
+
...props
|
|
1903
|
+
}
|
|
1904
|
+
);
|
|
1905
|
+
}
|
|
1906
|
+
function BreadcrumbList({ className, ...props }) {
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ol", { "data-slot": "breadcrumb-list", className: cn("ddga-breadcrumb__list", className), ...props });
|
|
1908
|
+
}
|
|
1909
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("li", { "data-slot": "breadcrumb-item", className: cn("ddga-breadcrumb__item", className), ...props });
|
|
1911
|
+
}
|
|
1912
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
1913
|
+
const Comp = asChild ? import_radix_ui14.Slot.Slot : "a";
|
|
1914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1915
|
+
Comp,
|
|
1916
|
+
{
|
|
1917
|
+
"data-slot": "breadcrumb-link",
|
|
1918
|
+
className: cn("ddga-breadcrumb__link", className),
|
|
1919
|
+
...props
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
function BreadcrumbPage({ asChild, className, ...props }) {
|
|
1924
|
+
const Comp = asChild ? import_radix_ui14.Slot.Slot : "span";
|
|
1925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1926
|
+
Comp,
|
|
1927
|
+
{
|
|
1928
|
+
"aria-current": "page",
|
|
1929
|
+
"data-slot": "breadcrumb-page",
|
|
1930
|
+
className: cn("ddga-breadcrumb__page", className),
|
|
1931
|
+
...props
|
|
1932
|
+
}
|
|
1933
|
+
);
|
|
1934
|
+
}
|
|
1935
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
1936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1937
|
+
"li",
|
|
1938
|
+
{
|
|
1939
|
+
role: "presentation",
|
|
1940
|
+
"aria-hidden": "true",
|
|
1941
|
+
"data-slot": "breadcrumb-separator",
|
|
1942
|
+
className: cn("ddga-breadcrumb__separator", className),
|
|
1943
|
+
...props,
|
|
1944
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronRight, {})
|
|
1945
|
+
}
|
|
1946
|
+
);
|
|
1947
|
+
}
|
|
1948
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1950
|
+
"span",
|
|
1951
|
+
{
|
|
1952
|
+
role: "presentation",
|
|
1953
|
+
"aria-hidden": "true",
|
|
1954
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
1955
|
+
className: cn("ddga-breadcrumb__ellipsis", className),
|
|
1956
|
+
...props,
|
|
1957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MoreHorizontal, {})
|
|
1958
|
+
}
|
|
1959
|
+
);
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
// src/components/Pagination/Pagination.tsx
|
|
1963
|
+
var import_radix_ui15 = require("radix-ui");
|
|
1964
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
1965
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1966
|
+
var paginationVariants = (0, import_class_variance_authority19.cva)("ddga-pagination", {
|
|
1967
|
+
variants: {
|
|
1968
|
+
size: {
|
|
1969
|
+
sm: "ddga-pagination--sm",
|
|
1970
|
+
md: "ddga-pagination--md"
|
|
1971
|
+
}
|
|
1972
|
+
},
|
|
1973
|
+
defaultVariants: {
|
|
1974
|
+
size: "md"
|
|
1975
|
+
}
|
|
1976
|
+
});
|
|
1977
|
+
var paginationLinkVariants = (0, import_class_variance_authority19.cva)("ddga-pagination__link", {
|
|
1978
|
+
variants: {
|
|
1979
|
+
isActive: {
|
|
1980
|
+
true: "ddga-pagination__link--active"
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
function Pagination({ size, className, ...props }) {
|
|
1985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1986
|
+
"nav",
|
|
1987
|
+
{
|
|
1988
|
+
"aria-label": "pagination",
|
|
1989
|
+
"data-slot": "pagination",
|
|
1990
|
+
className: cn(paginationVariants({ size }), className),
|
|
1991
|
+
...props
|
|
1992
|
+
}
|
|
1993
|
+
);
|
|
1994
|
+
}
|
|
1995
|
+
function PaginationContent({ className, ...props }) {
|
|
1996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1997
|
+
"ul",
|
|
1998
|
+
{
|
|
1999
|
+
"data-slot": "pagination-content",
|
|
2000
|
+
className: cn("ddga-pagination__content", className),
|
|
2001
|
+
...props
|
|
2002
|
+
}
|
|
2003
|
+
);
|
|
2004
|
+
}
|
|
2005
|
+
function PaginationItem({ className, ...props }) {
|
|
2006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { "data-slot": "pagination-item", className: cn("ddga-pagination__item", className), ...props });
|
|
2007
|
+
}
|
|
2008
|
+
function PaginationLink({ asChild, isActive, className, ...props }) {
|
|
2009
|
+
const Comp = asChild ? import_radix_ui15.Slot.Slot : "a";
|
|
2010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2011
|
+
Comp,
|
|
2012
|
+
{
|
|
2013
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2014
|
+
"data-slot": "pagination-link",
|
|
2015
|
+
"data-active": isActive ? "" : void 0,
|
|
2016
|
+
className: cn(paginationLinkVariants({ isActive }), className),
|
|
2017
|
+
...props
|
|
2018
|
+
}
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
function PaginationPrevious({
|
|
2022
|
+
label = "Previous",
|
|
2023
|
+
className,
|
|
2024
|
+
children,
|
|
2025
|
+
asChild,
|
|
2026
|
+
...props
|
|
2027
|
+
}) {
|
|
2028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2029
|
+
PaginationLink,
|
|
2030
|
+
{
|
|
2031
|
+
asChild,
|
|
2032
|
+
"aria-label": label,
|
|
2033
|
+
"data-slot": "pagination-previous",
|
|
2034
|
+
className: cn("ddga-pagination__nav", "ddga-pagination__nav--previous", className),
|
|
2035
|
+
...props,
|
|
2036
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--previous" }),
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label })
|
|
2039
|
+
] })
|
|
2040
|
+
}
|
|
2041
|
+
);
|
|
2042
|
+
}
|
|
2043
|
+
function PaginationNext({
|
|
2044
|
+
label = "Next",
|
|
2045
|
+
className,
|
|
2046
|
+
children,
|
|
2047
|
+
asChild,
|
|
2048
|
+
...props
|
|
2049
|
+
}) {
|
|
2050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2051
|
+
PaginationLink,
|
|
2052
|
+
{
|
|
2053
|
+
asChild,
|
|
2054
|
+
"aria-label": label,
|
|
2055
|
+
"data-slot": "pagination-next",
|
|
2056
|
+
className: cn("ddga-pagination__nav", "ddga-pagination__nav--next", className),
|
|
2057
|
+
...props,
|
|
2058
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: label }),
|
|
2060
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronRight, { className: "ddga-pagination__nav-icon ddga-pagination__nav-icon--next" })
|
|
2061
|
+
] })
|
|
2062
|
+
}
|
|
2063
|
+
);
|
|
2064
|
+
}
|
|
2065
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
2066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2067
|
+
"span",
|
|
2068
|
+
{
|
|
2069
|
+
role: "presentation",
|
|
2070
|
+
"aria-hidden": "true",
|
|
2071
|
+
"data-slot": "pagination-ellipsis",
|
|
2072
|
+
className: cn("ddga-pagination__ellipsis", className),
|
|
2073
|
+
...props,
|
|
2074
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MoreHorizontal, {})
|
|
2075
|
+
}
|
|
2076
|
+
);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
// src/components/Accordion/Accordion.tsx
|
|
2080
|
+
var import_radix_ui16 = require("radix-ui");
|
|
2081
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
2082
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2083
|
+
var accordionVariants = (0, import_class_variance_authority20.cva)("ddga-accordion", {
|
|
2084
|
+
variants: {
|
|
2085
|
+
size: {
|
|
2086
|
+
sm: "ddga-accordion--sm",
|
|
2087
|
+
md: "ddga-accordion--md"
|
|
2088
|
+
}
|
|
2089
|
+
},
|
|
2090
|
+
defaultVariants: {
|
|
2091
|
+
size: "md"
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
function Accordion({ size, className, ...props }) {
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2096
|
+
import_radix_ui16.Accordion.Root,
|
|
2097
|
+
{
|
|
2098
|
+
"data-slot": "accordion",
|
|
2099
|
+
className: cn(accordionVariants({ size }), className),
|
|
2100
|
+
...props
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
function AccordionItem({ className, ...props }) {
|
|
2105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2106
|
+
import_radix_ui16.Accordion.Item,
|
|
2107
|
+
{
|
|
2108
|
+
"data-slot": "accordion-item",
|
|
2109
|
+
className: cn("ddga-accordion__item", className),
|
|
2110
|
+
...props
|
|
2111
|
+
}
|
|
2112
|
+
);
|
|
2113
|
+
}
|
|
2114
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
2115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_radix_ui16.Accordion.Header, { className: "ddga-accordion__header", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2116
|
+
import_radix_ui16.Accordion.Trigger,
|
|
2117
|
+
{
|
|
2118
|
+
"data-slot": "accordion-trigger",
|
|
2119
|
+
className: cn("ddga-accordion__trigger", className),
|
|
2120
|
+
...props,
|
|
2121
|
+
children: [
|
|
2122
|
+
children,
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2124
|
+
ChevronDown,
|
|
2125
|
+
{
|
|
2126
|
+
"aria-hidden": "true",
|
|
2127
|
+
className: "ddga-accordion__chevron",
|
|
2128
|
+
"data-slot": "accordion-chevron"
|
|
2129
|
+
}
|
|
2130
|
+
)
|
|
2131
|
+
]
|
|
2132
|
+
}
|
|
2133
|
+
) });
|
|
2134
|
+
}
|
|
2135
|
+
function AccordionContent({ className, children, ...props }) {
|
|
2136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2137
|
+
import_radix_ui16.Accordion.Content,
|
|
2138
|
+
{
|
|
2139
|
+
"data-slot": "accordion-content",
|
|
2140
|
+
className: cn("ddga-accordion__content", className),
|
|
2141
|
+
...props,
|
|
2142
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ddga-accordion__content-inner", children })
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
// src/components/Steps/Steps.tsx
|
|
2148
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
2149
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2150
|
+
var stepsVariants = (0, import_class_variance_authority21.cva)("ddga-steps", {
|
|
2151
|
+
variants: {
|
|
2152
|
+
size: {
|
|
2153
|
+
sm: "ddga-steps--sm",
|
|
2154
|
+
md: "ddga-steps--md"
|
|
2155
|
+
},
|
|
2156
|
+
orientation: {
|
|
2157
|
+
horizontal: "ddga-steps--horizontal",
|
|
2158
|
+
vertical: "ddga-steps--vertical"
|
|
2159
|
+
}
|
|
2160
|
+
},
|
|
2161
|
+
defaultVariants: {
|
|
2162
|
+
size: "md",
|
|
2163
|
+
orientation: "horizontal"
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2166
|
+
var stepVariants = (0, import_class_variance_authority21.cva)("ddga-steps__step", {
|
|
2167
|
+
variants: {
|
|
2168
|
+
state: {
|
|
2169
|
+
completed: "ddga-steps__step--completed",
|
|
2170
|
+
current: "ddga-steps__step--current",
|
|
2171
|
+
upcoming: "ddga-steps__step--upcoming"
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
defaultVariants: {
|
|
2175
|
+
state: "upcoming"
|
|
2176
|
+
}
|
|
2177
|
+
});
|
|
2178
|
+
function Steps({ size, orientation, className, ...props }) {
|
|
2179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2180
|
+
"ol",
|
|
2181
|
+
{
|
|
2182
|
+
"data-slot": "steps",
|
|
2183
|
+
"data-orientation": orientation ?? "horizontal",
|
|
2184
|
+
className: cn(stepsVariants({ size, orientation }), className),
|
|
2185
|
+
...props
|
|
2186
|
+
}
|
|
2187
|
+
);
|
|
2188
|
+
}
|
|
2189
|
+
function Step({ state, className, ...props }) {
|
|
2190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2191
|
+
"li",
|
|
2192
|
+
{
|
|
2193
|
+
"aria-current": state === "current" ? "step" : void 0,
|
|
2194
|
+
"data-slot": "step",
|
|
2195
|
+
"data-state": state ?? "upcoming",
|
|
2196
|
+
className: cn(stepVariants({ state }), className),
|
|
2197
|
+
...props
|
|
2198
|
+
}
|
|
2199
|
+
);
|
|
2200
|
+
}
|
|
2201
|
+
function StepIndicator({ step, className, ...props }) {
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2203
|
+
"span",
|
|
2204
|
+
{
|
|
2205
|
+
"aria-hidden": "true",
|
|
2206
|
+
"data-slot": "step-indicator",
|
|
2207
|
+
className: cn("ddga-steps__indicator", className),
|
|
2208
|
+
...props,
|
|
2209
|
+
children: [
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Check, { className: "ddga-steps__indicator-check" }),
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "ddga-steps__indicator-number", children: step })
|
|
2212
|
+
]
|
|
2213
|
+
}
|
|
2214
|
+
);
|
|
2215
|
+
}
|
|
2216
|
+
function StepTitle({ className, ...props }) {
|
|
2217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "data-slot": "step-title", className: cn("ddga-steps__title", className), ...props });
|
|
2218
|
+
}
|
|
2219
|
+
function StepDescription({ className, ...props }) {
|
|
2220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2221
|
+
"span",
|
|
2222
|
+
{
|
|
2223
|
+
"data-slot": "step-description",
|
|
2224
|
+
className: cn("ddga-steps__description", className),
|
|
2225
|
+
...props
|
|
2226
|
+
}
|
|
2227
|
+
);
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
2231
|
+
var import_class_variance_authority22 = require("class-variance-authority");
|
|
2232
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2233
|
+
var skeletonVariants = (0, import_class_variance_authority22.cva)("ddga-skeleton", {
|
|
2234
|
+
variants: {
|
|
2235
|
+
shape: {
|
|
2236
|
+
text: "ddga-skeleton--text",
|
|
2237
|
+
circle: "ddga-skeleton--circle",
|
|
2238
|
+
rectangle: "ddga-skeleton--rectangle"
|
|
2239
|
+
},
|
|
2240
|
+
animation: {
|
|
2241
|
+
pulse: "ddga-skeleton--pulse",
|
|
2242
|
+
wave: "ddga-skeleton--wave",
|
|
2243
|
+
none: "ddga-skeleton--none"
|
|
2244
|
+
}
|
|
2245
|
+
},
|
|
2246
|
+
defaultVariants: {
|
|
2247
|
+
shape: "text",
|
|
2248
|
+
animation: "pulse"
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
function Skeleton({ shape, animation, width, height, className, style, ...props }) {
|
|
2252
|
+
const sizeStyle = {
|
|
2253
|
+
...width !== void 0 ? { width: typeof width === "number" ? `${width}px` : width } : null,
|
|
2254
|
+
...height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : null,
|
|
2255
|
+
...style
|
|
2256
|
+
};
|
|
2257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2258
|
+
"div",
|
|
2259
|
+
{
|
|
2260
|
+
"data-slot": "skeleton",
|
|
2261
|
+
"aria-hidden": "true",
|
|
2262
|
+
className: cn(skeletonVariants({ shape, animation }), className),
|
|
2263
|
+
style: sizeStyle,
|
|
2264
|
+
...props
|
|
2265
|
+
}
|
|
2266
|
+
);
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
// src/components/Progress/Progress.tsx
|
|
2270
|
+
var import_radix_ui17 = require("radix-ui");
|
|
2271
|
+
var import_class_variance_authority23 = require("class-variance-authority");
|
|
2272
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2273
|
+
var progressVariants = (0, import_class_variance_authority23.cva)("ddga-progress", {
|
|
2274
|
+
variants: {
|
|
2275
|
+
size: {
|
|
2276
|
+
sm: "ddga-progress--sm",
|
|
2277
|
+
md: "ddga-progress--md",
|
|
2278
|
+
lg: "ddga-progress--lg"
|
|
2279
|
+
},
|
|
2280
|
+
color: {
|
|
2281
|
+
primary: "ddga-progress--primary",
|
|
2282
|
+
success: "ddga-progress--success",
|
|
2283
|
+
warning: "ddga-progress--warning",
|
|
2284
|
+
destructive: "ddga-progress--destructive"
|
|
2285
|
+
}
|
|
2286
|
+
},
|
|
2287
|
+
defaultVariants: {
|
|
2288
|
+
size: "md",
|
|
2289
|
+
color: "primary"
|
|
2290
|
+
}
|
|
2291
|
+
});
|
|
2292
|
+
var circularProgressVariants = (0, import_class_variance_authority23.cva)("ddga-circular-progress", {
|
|
2293
|
+
variants: {
|
|
2294
|
+
size: {
|
|
2295
|
+
sm: "ddga-circular-progress--sm",
|
|
2296
|
+
md: "ddga-circular-progress--md",
|
|
2297
|
+
lg: "ddga-circular-progress--lg"
|
|
2298
|
+
},
|
|
2299
|
+
color: {
|
|
2300
|
+
primary: "ddga-circular-progress--primary",
|
|
2301
|
+
success: "ddga-circular-progress--success",
|
|
2302
|
+
warning: "ddga-circular-progress--warning",
|
|
2303
|
+
destructive: "ddga-circular-progress--destructive"
|
|
2304
|
+
}
|
|
2305
|
+
},
|
|
2306
|
+
defaultVariants: {
|
|
2307
|
+
size: "md",
|
|
2308
|
+
color: "primary"
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2311
|
+
function Progress({ value = null, max = 100, size, color, className, ...props }) {
|
|
2312
|
+
const isIndeterminate = value === null;
|
|
2313
|
+
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
|
|
2314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2315
|
+
import_radix_ui17.Progress.Root,
|
|
2316
|
+
{
|
|
2317
|
+
"data-slot": "progress",
|
|
2318
|
+
value,
|
|
2319
|
+
max,
|
|
2320
|
+
className: cn(progressVariants({ size, color }), className),
|
|
2321
|
+
...props,
|
|
2322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2323
|
+
import_radix_ui17.Progress.Indicator,
|
|
2324
|
+
{
|
|
2325
|
+
"data-slot": "progress-indicator",
|
|
2326
|
+
className: "ddga-progress__indicator",
|
|
2327
|
+
style: isIndeterminate ? void 0 : { transform: `translateX(${pct - 100}%)` }
|
|
2328
|
+
}
|
|
2329
|
+
)
|
|
2330
|
+
}
|
|
2331
|
+
);
|
|
2332
|
+
}
|
|
2333
|
+
var CIRCULAR_SIZES = { sm: 32, md: 48, lg: 72 };
|
|
2334
|
+
var CIRCULAR_DEFAULT_THICKNESS = { sm: 4, md: 5, lg: 6 };
|
|
2335
|
+
function CircularProgress({
|
|
2336
|
+
value = null,
|
|
2337
|
+
max = 100,
|
|
2338
|
+
size,
|
|
2339
|
+
color,
|
|
2340
|
+
thickness,
|
|
2341
|
+
showLabel = false,
|
|
2342
|
+
className,
|
|
2343
|
+
...props
|
|
2344
|
+
}) {
|
|
2345
|
+
const isIndeterminate = value === null;
|
|
2346
|
+
const sizeKey = size ?? "md";
|
|
2347
|
+
const diameter = CIRCULAR_SIZES[sizeKey];
|
|
2348
|
+
const strokeWidth = thickness ?? CIRCULAR_DEFAULT_THICKNESS[sizeKey];
|
|
2349
|
+
const radius = (diameter - strokeWidth) / 2;
|
|
2350
|
+
const circumference = 2 * Math.PI * radius;
|
|
2351
|
+
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / max * 100));
|
|
2352
|
+
const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - pct / 100);
|
|
2353
|
+
const state = isIndeterminate ? "indeterminate" : value >= max ? "complete" : "loading";
|
|
2354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2355
|
+
"div",
|
|
2356
|
+
{
|
|
2357
|
+
"data-slot": "circular-progress",
|
|
2358
|
+
"data-state": state,
|
|
2359
|
+
role: "progressbar",
|
|
2360
|
+
"aria-valuemin": 0,
|
|
2361
|
+
"aria-valuemax": max,
|
|
2362
|
+
"aria-valuenow": isIndeterminate ? void 0 : value,
|
|
2363
|
+
className: cn(circularProgressVariants({ size, color }), className),
|
|
2364
|
+
style: { inlineSize: diameter, blockSize: diameter },
|
|
2365
|
+
...props,
|
|
2366
|
+
children: [
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2368
|
+
"svg",
|
|
2369
|
+
{
|
|
2370
|
+
className: "ddga-circular-progress__svg",
|
|
2371
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
2372
|
+
width: diameter,
|
|
2373
|
+
height: diameter,
|
|
2374
|
+
"aria-hidden": "true",
|
|
2375
|
+
focusable: "false",
|
|
2376
|
+
children: [
|
|
2377
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2378
|
+
"circle",
|
|
2379
|
+
{
|
|
2380
|
+
className: "ddga-circular-progress__track",
|
|
2381
|
+
cx: diameter / 2,
|
|
2382
|
+
cy: diameter / 2,
|
|
2383
|
+
r: radius,
|
|
2384
|
+
fill: "none",
|
|
2385
|
+
strokeWidth
|
|
2386
|
+
}
|
|
2387
|
+
),
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2389
|
+
"circle",
|
|
2390
|
+
{
|
|
2391
|
+
className: "ddga-circular-progress__indicator",
|
|
2392
|
+
cx: diameter / 2,
|
|
2393
|
+
cy: diameter / 2,
|
|
2394
|
+
r: radius,
|
|
2395
|
+
fill: "none",
|
|
2396
|
+
strokeWidth,
|
|
2397
|
+
strokeLinecap: "round",
|
|
2398
|
+
strokeDasharray: circumference,
|
|
2399
|
+
strokeDashoffset: dashOffset,
|
|
2400
|
+
transform: `rotate(-90 ${diameter / 2} ${diameter / 2})`
|
|
2401
|
+
}
|
|
2402
|
+
)
|
|
2403
|
+
]
|
|
2404
|
+
}
|
|
2405
|
+
),
|
|
2406
|
+
showLabel && !isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "ddga-circular-progress__label", "aria-hidden": "true", children: [
|
|
2407
|
+
Math.round(pct),
|
|
2408
|
+
"%"
|
|
2409
|
+
] }) : null
|
|
2410
|
+
]
|
|
2411
|
+
}
|
|
2412
|
+
);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2416
|
+
var import_react13 = require("react");
|
|
2417
|
+
var import_radix_ui18 = require("radix-ui");
|
|
2418
|
+
var import_class_variance_authority24 = require("class-variance-authority");
|
|
2419
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2420
|
+
var dropdownMenuVariants = (0, import_class_variance_authority24.cva)("ddga-dropdown-menu", {
|
|
2421
|
+
variants: {
|
|
2422
|
+
size: {
|
|
2423
|
+
sm: "ddga-dropdown-menu--sm",
|
|
2424
|
+
md: "ddga-dropdown-menu--md"
|
|
2425
|
+
}
|
|
2426
|
+
},
|
|
2427
|
+
defaultVariants: {
|
|
2428
|
+
size: "md"
|
|
2429
|
+
}
|
|
2430
|
+
});
|
|
2431
|
+
function DropdownMenu(props) {
|
|
2432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Root, { ...props });
|
|
2433
|
+
}
|
|
2434
|
+
function DropdownMenuTrigger(props) {
|
|
2435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
2436
|
+
}
|
|
2437
|
+
function DropdownMenuContent({
|
|
2438
|
+
size,
|
|
2439
|
+
className,
|
|
2440
|
+
sideOffset = 6,
|
|
2441
|
+
...props
|
|
2442
|
+
}) {
|
|
2443
|
+
const ctx = (0, import_react13.useContext)(DgaContext);
|
|
2444
|
+
const portalContainer = ctx?.rootEl ?? void 0;
|
|
2445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2446
|
+
import_radix_ui18.DropdownMenu.Content,
|
|
2447
|
+
{
|
|
2448
|
+
"data-slot": "dropdown-menu-content",
|
|
2449
|
+
sideOffset,
|
|
2450
|
+
className: cn(dropdownMenuVariants({ size }), className),
|
|
2451
|
+
...props
|
|
2452
|
+
}
|
|
2453
|
+
) });
|
|
2454
|
+
}
|
|
2455
|
+
function DropdownMenuItem({
|
|
2456
|
+
className,
|
|
2457
|
+
destructive,
|
|
2458
|
+
startIcon,
|
|
2459
|
+
shortcut,
|
|
2460
|
+
children,
|
|
2461
|
+
...props
|
|
2462
|
+
}) {
|
|
2463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2464
|
+
import_radix_ui18.DropdownMenu.Item,
|
|
2465
|
+
{
|
|
2466
|
+
"data-slot": "dropdown-menu-item",
|
|
2467
|
+
"data-destructive": destructive ? "" : void 0,
|
|
2468
|
+
className: cn("ddga-dropdown-menu__item", className),
|
|
2469
|
+
...props,
|
|
2470
|
+
children: [
|
|
2471
|
+
startIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__label", children }),
|
|
2473
|
+
shortcut ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__shortcut", "aria-hidden": "true", children: shortcut }) : null
|
|
2474
|
+
]
|
|
2475
|
+
}
|
|
2476
|
+
);
|
|
2477
|
+
}
|
|
2478
|
+
function DropdownMenuCheckboxItem({
|
|
2479
|
+
className,
|
|
2480
|
+
children,
|
|
2481
|
+
onSelect,
|
|
2482
|
+
...props
|
|
2483
|
+
}) {
|
|
2484
|
+
const handleSelect = onSelect ?? ((event) => {
|
|
2485
|
+
event.preventDefault();
|
|
2486
|
+
});
|
|
2487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2488
|
+
import_radix_ui18.DropdownMenu.CheckboxItem,
|
|
2489
|
+
{
|
|
2490
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
2491
|
+
className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--checkable", className),
|
|
2492
|
+
onSelect: handleSelect,
|
|
2493
|
+
...props,
|
|
2494
|
+
children: [
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Check, { className: "ddga-dropdown-menu__indicator-icon" }) }) }),
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__label", children })
|
|
2497
|
+
]
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
}
|
|
2501
|
+
function DropdownMenuRadioGroup(props) {
|
|
2502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
2503
|
+
}
|
|
2504
|
+
function DropdownMenuRadioItem({
|
|
2505
|
+
className,
|
|
2506
|
+
children,
|
|
2507
|
+
onSelect,
|
|
2508
|
+
...props
|
|
2509
|
+
}) {
|
|
2510
|
+
const handleSelect = onSelect ?? ((event) => {
|
|
2511
|
+
event.preventDefault();
|
|
2512
|
+
});
|
|
2513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2514
|
+
import_radix_ui18.DropdownMenu.RadioItem,
|
|
2515
|
+
{
|
|
2516
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
2517
|
+
className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--checkable", className),
|
|
2518
|
+
onSelect: handleSelect,
|
|
2519
|
+
...props,
|
|
2520
|
+
children: [
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__indicator", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__radio-dot" }) }) }),
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__label", children })
|
|
2523
|
+
]
|
|
2524
|
+
}
|
|
2525
|
+
);
|
|
2526
|
+
}
|
|
2527
|
+
function DropdownMenuLabel({ className, ...props }) {
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2529
|
+
import_radix_ui18.DropdownMenu.Label,
|
|
2530
|
+
{
|
|
2531
|
+
"data-slot": "dropdown-menu-label",
|
|
2532
|
+
className: cn("ddga-dropdown-menu__group-label", className),
|
|
2533
|
+
...props
|
|
2534
|
+
}
|
|
2535
|
+
);
|
|
2536
|
+
}
|
|
2537
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
2538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2539
|
+
import_radix_ui18.DropdownMenu.Separator,
|
|
2540
|
+
{
|
|
2541
|
+
"data-slot": "dropdown-menu-separator",
|
|
2542
|
+
className: cn("ddga-dropdown-menu__separator", className),
|
|
2543
|
+
...props
|
|
2544
|
+
}
|
|
2545
|
+
);
|
|
2546
|
+
}
|
|
2547
|
+
function DropdownMenuGroup(props) {
|
|
2548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
2549
|
+
}
|
|
2550
|
+
function DropdownMenuSub(props) {
|
|
2551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Sub, { ...props });
|
|
2552
|
+
}
|
|
2553
|
+
function DropdownMenuSubTrigger({
|
|
2554
|
+
className,
|
|
2555
|
+
startIcon,
|
|
2556
|
+
children,
|
|
2557
|
+
...props
|
|
2558
|
+
}) {
|
|
2559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2560
|
+
import_radix_ui18.DropdownMenu.SubTrigger,
|
|
2561
|
+
{
|
|
2562
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
2563
|
+
className: cn("ddga-dropdown-menu__item", "ddga-dropdown-menu__item--sub", className),
|
|
2564
|
+
...props,
|
|
2565
|
+
children: [
|
|
2566
|
+
startIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__icon", "aria-hidden": "true", children: startIcon }) : null,
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ddga-dropdown-menu__label", children }),
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronRight, { className: "ddga-dropdown-menu__sub-chevron", "aria-hidden": "true" })
|
|
2569
|
+
]
|
|
2570
|
+
}
|
|
2571
|
+
);
|
|
2572
|
+
}
|
|
2573
|
+
function DropdownMenuSubContent({ size, className, ...props }) {
|
|
2574
|
+
const ctx = (0, import_react13.useContext)(DgaContext);
|
|
2575
|
+
const portalContainer = ctx?.rootEl ?? void 0;
|
|
2576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_radix_ui18.DropdownMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2577
|
+
import_radix_ui18.DropdownMenu.SubContent,
|
|
2578
|
+
{
|
|
2579
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
2580
|
+
className: cn(dropdownMenuVariants({ size }), className),
|
|
2581
|
+
...props
|
|
2582
|
+
}
|
|
2583
|
+
) });
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
// src/components/Drawer/Drawer.tsx
|
|
2587
|
+
var import_react14 = require("react");
|
|
2588
|
+
var import_radix_ui19 = require("radix-ui");
|
|
2589
|
+
var import_class_variance_authority25 = require("class-variance-authority");
|
|
2590
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2591
|
+
var drawerVariants = (0, import_class_variance_authority25.cva)("ddga-drawer", {
|
|
2592
|
+
variants: {
|
|
2593
|
+
side: {
|
|
2594
|
+
start: "ddga-drawer--start",
|
|
2595
|
+
end: "ddga-drawer--end",
|
|
2596
|
+
top: "ddga-drawer--top",
|
|
2597
|
+
bottom: "ddga-drawer--bottom"
|
|
2598
|
+
},
|
|
2599
|
+
size: {
|
|
2600
|
+
sm: "ddga-drawer--sm",
|
|
2601
|
+
md: "ddga-drawer--md",
|
|
2602
|
+
lg: "ddga-drawer--lg",
|
|
2603
|
+
full: "ddga-drawer--full"
|
|
2604
|
+
}
|
|
2605
|
+
},
|
|
2606
|
+
defaultVariants: {
|
|
2607
|
+
side: "end",
|
|
2608
|
+
size: "md"
|
|
2609
|
+
}
|
|
2610
|
+
});
|
|
2611
|
+
function Drawer(props) {
|
|
2612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_radix_ui19.Dialog.Root, { ...props });
|
|
2613
|
+
}
|
|
2614
|
+
function DrawerTrigger({ className, ...props }) {
|
|
2615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_radix_ui19.Dialog.Trigger, { "data-slot": "drawer-trigger", className, ...props });
|
|
2616
|
+
}
|
|
2617
|
+
function DrawerContent({
|
|
2618
|
+
side,
|
|
2619
|
+
size,
|
|
2620
|
+
showCloseButton = true,
|
|
2621
|
+
closeLabel = "Close",
|
|
2622
|
+
className,
|
|
2623
|
+
children,
|
|
2624
|
+
...props
|
|
2625
|
+
}) {
|
|
2626
|
+
const ctx = (0, import_react14.useContext)(DgaContext);
|
|
2627
|
+
const portalContainer = ctx?.rootEl ?? void 0;
|
|
2628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_radix_ui19.Dialog.Portal, { container: portalContainer, children: [
|
|
2629
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_radix_ui19.Dialog.Overlay, { className: "ddga-drawer__overlay", "data-slot": "drawer-overlay" }),
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2631
|
+
import_radix_ui19.Dialog.Content,
|
|
2632
|
+
{
|
|
2633
|
+
"data-slot": "drawer-content",
|
|
2634
|
+
className: cn(drawerVariants({ side, size }), className),
|
|
2635
|
+
...props,
|
|
2636
|
+
children: [
|
|
2637
|
+
children,
|
|
2638
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2639
|
+
import_radix_ui19.Dialog.Close,
|
|
2640
|
+
{
|
|
2641
|
+
className: "ddga-drawer__close",
|
|
2642
|
+
"aria-label": closeLabel,
|
|
2643
|
+
"data-slot": "drawer-close-x",
|
|
2644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Close, { "aria-hidden": "true" })
|
|
2645
|
+
}
|
|
2646
|
+
) : null
|
|
2647
|
+
]
|
|
2648
|
+
}
|
|
2649
|
+
)
|
|
2650
|
+
] });
|
|
2651
|
+
}
|
|
2652
|
+
function DrawerHeader({ asChild, className, ...props }) {
|
|
2653
|
+
const Comp = asChild ? import_radix_ui19.Slot.Slot : "div";
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Comp, { "data-slot": "drawer-header", className: cn("ddga-drawer__header", className), ...props });
|
|
2655
|
+
}
|
|
2656
|
+
function DrawerTitle({ asChild, className, ...props }) {
|
|
2657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2658
|
+
import_radix_ui19.Dialog.Title,
|
|
2659
|
+
{
|
|
2660
|
+
asChild,
|
|
2661
|
+
"data-slot": "drawer-title",
|
|
2662
|
+
className: cn("ddga-drawer__title", className),
|
|
2663
|
+
...props
|
|
2664
|
+
}
|
|
2665
|
+
);
|
|
2666
|
+
}
|
|
2667
|
+
function DrawerDescription({ asChild, className, ...props }) {
|
|
2668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2669
|
+
import_radix_ui19.Dialog.Description,
|
|
2670
|
+
{
|
|
2671
|
+
asChild,
|
|
2672
|
+
"data-slot": "drawer-description",
|
|
2673
|
+
className: cn("ddga-drawer__description", className),
|
|
2674
|
+
...props
|
|
2675
|
+
}
|
|
2676
|
+
);
|
|
2677
|
+
}
|
|
2678
|
+
function DrawerBody({ asChild, className, ...props }) {
|
|
2679
|
+
const Comp = asChild ? import_radix_ui19.Slot.Slot : "div";
|
|
2680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Comp, { "data-slot": "drawer-body", className: cn("ddga-drawer__body", className), ...props });
|
|
2681
|
+
}
|
|
2682
|
+
function DrawerFooter({ asChild, className, ...props }) {
|
|
2683
|
+
const Comp = asChild ? import_radix_ui19.Slot.Slot : "div";
|
|
2684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Comp, { "data-slot": "drawer-footer", className: cn("ddga-drawer__footer", className), ...props });
|
|
2685
|
+
}
|
|
2686
|
+
function DrawerClose({ className, ...props }) {
|
|
2687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_radix_ui19.Dialog.Close, { "data-slot": "drawer-close", className, ...props });
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
// src/components/Combobox/Combobox.tsx
|
|
2691
|
+
var import_react15 = require("react");
|
|
2692
|
+
var import_cmdk = require("cmdk");
|
|
2693
|
+
var import_radix_ui20 = require("radix-ui");
|
|
2694
|
+
var import_class_variance_authority26 = require("class-variance-authority");
|
|
2695
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2696
|
+
var comboboxTriggerVariants = (0, import_class_variance_authority26.cva)("ddga-combobox-trigger", {
|
|
2697
|
+
variants: {
|
|
2698
|
+
size: {
|
|
2699
|
+
sm: "ddga-combobox-trigger--sm",
|
|
2700
|
+
md: "ddga-combobox-trigger--md"
|
|
2701
|
+
},
|
|
2702
|
+
error: {
|
|
2703
|
+
true: "ddga-combobox-trigger--error"
|
|
2704
|
+
}
|
|
2705
|
+
},
|
|
2706
|
+
defaultVariants: {
|
|
2707
|
+
size: "md"
|
|
2708
|
+
}
|
|
2709
|
+
});
|
|
2710
|
+
var comboboxVariants = comboboxTriggerVariants;
|
|
2711
|
+
var ComboboxContext = (0, import_react15.createContext)(null);
|
|
2712
|
+
function useComboboxContext(component) {
|
|
2713
|
+
const ctx = (0, import_react15.useContext)(ComboboxContext);
|
|
2714
|
+
if (!ctx) {
|
|
2715
|
+
throw new Error(`<${component}> must be rendered inside <Combobox>.`);
|
|
2716
|
+
}
|
|
2717
|
+
return ctx;
|
|
2718
|
+
}
|
|
2719
|
+
function Combobox({
|
|
2720
|
+
value: controlledValue,
|
|
2721
|
+
defaultValue,
|
|
2722
|
+
onValueChange,
|
|
2723
|
+
open: controlledOpen,
|
|
2724
|
+
defaultOpen,
|
|
2725
|
+
onOpenChange,
|
|
2726
|
+
label,
|
|
2727
|
+
helperText,
|
|
2728
|
+
errorMessage,
|
|
2729
|
+
error,
|
|
2730
|
+
required,
|
|
2731
|
+
disabled,
|
|
2732
|
+
size,
|
|
2733
|
+
placeholder,
|
|
2734
|
+
searchPlaceholder = "Search\u2026",
|
|
2735
|
+
emptyMessage = "No results.",
|
|
2736
|
+
getLabel,
|
|
2737
|
+
id: externalId,
|
|
2738
|
+
className,
|
|
2739
|
+
children,
|
|
2740
|
+
"aria-label": ariaLabel,
|
|
2741
|
+
"aria-labelledby": ariaLabelledBy
|
|
2742
|
+
}) {
|
|
2743
|
+
const [internalValue, setInternalValue] = (0, import_react15.useState)(defaultValue);
|
|
2744
|
+
const isControlled = controlledValue !== void 0;
|
|
2745
|
+
const value = isControlled ? controlledValue : internalValue;
|
|
2746
|
+
const [internalOpen, setInternalOpen] = (0, import_react15.useState)(defaultOpen ?? false);
|
|
2747
|
+
const isOpenControlled = controlledOpen !== void 0;
|
|
2748
|
+
const open = isOpenControlled ? controlledOpen : internalOpen;
|
|
2749
|
+
const setOpen = (0, import_react15.useCallback)(
|
|
2750
|
+
(next) => {
|
|
2751
|
+
if (!isOpenControlled) setInternalOpen(next);
|
|
2752
|
+
onOpenChange?.(next);
|
|
2753
|
+
},
|
|
2754
|
+
[isOpenControlled, onOpenChange]
|
|
2755
|
+
);
|
|
2756
|
+
const select = (0, import_react15.useCallback)(
|
|
2757
|
+
(next) => {
|
|
2758
|
+
if (!isControlled) setInternalValue(next);
|
|
2759
|
+
onValueChange?.(next);
|
|
2760
|
+
setOpen(false);
|
|
2761
|
+
},
|
|
2762
|
+
[isControlled, onValueChange, setOpen]
|
|
2763
|
+
);
|
|
2764
|
+
const ctx = (0, import_react15.useMemo)(() => ({ value, select }), [value, select]);
|
|
2765
|
+
const itemLabels = (0, import_react15.useMemo)(() => {
|
|
2766
|
+
const map = /* @__PURE__ */ new Map();
|
|
2767
|
+
const visit = (nodes) => {
|
|
2768
|
+
import_react15.Children.forEach(nodes, (child) => {
|
|
2769
|
+
if (!(0, import_react15.isValidElement)(child)) return;
|
|
2770
|
+
const childProps = child.props;
|
|
2771
|
+
if (typeof childProps.value === "string") {
|
|
2772
|
+
map.set(childProps.value, childProps.children);
|
|
2773
|
+
} else if (childProps.children) {
|
|
2774
|
+
visit(childProps.children);
|
|
2775
|
+
}
|
|
2776
|
+
});
|
|
2777
|
+
};
|
|
2778
|
+
visit(children);
|
|
2779
|
+
return map;
|
|
2780
|
+
}, [children]);
|
|
2781
|
+
const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } = useFieldA11y({
|
|
2782
|
+
name: "Combobox",
|
|
2783
|
+
id: externalId,
|
|
2784
|
+
label,
|
|
2785
|
+
error,
|
|
2786
|
+
errorMessage,
|
|
2787
|
+
helperText,
|
|
2788
|
+
"aria-label": ariaLabel,
|
|
2789
|
+
"aria-labelledby": ariaLabelledBy
|
|
2790
|
+
});
|
|
2791
|
+
const providerCtx = (0, import_react15.useContext)(DgaContext);
|
|
2792
|
+
const portalContainer = providerCtx?.rootEl ?? void 0;
|
|
2793
|
+
const triggerLabel = (0, import_react15.useMemo)(() => {
|
|
2794
|
+
if (value === void 0) return null;
|
|
2795
|
+
if (getLabel) return getLabel(value);
|
|
2796
|
+
return itemLabels.get(value) ?? null;
|
|
2797
|
+
}, [value, getLabel, itemLabels]);
|
|
2798
|
+
const searchId = (0, import_react15.useId)();
|
|
2799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ComboboxContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "data-slot": "combobox-field", className: "ddga-field", children: [
|
|
2800
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { htmlFor: fieldId, className: "ddga-combobox__label", children: [
|
|
2801
|
+
label,
|
|
2802
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { "aria-hidden": "true", className: "ddga-combobox__required", children: "*" })
|
|
2803
|
+
] }),
|
|
2804
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_radix_ui20.Popover.Root, { open, onOpenChange: setOpen, children: [
|
|
2805
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_radix_ui20.Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2806
|
+
"button",
|
|
2807
|
+
{
|
|
2808
|
+
type: "button",
|
|
2809
|
+
...controlProps,
|
|
2810
|
+
"aria-required": required || void 0,
|
|
2811
|
+
disabled,
|
|
2812
|
+
"data-slot": "combobox-trigger",
|
|
2813
|
+
className: cn(comboboxTriggerVariants({ size, error: hasError }), className),
|
|
2814
|
+
children: [
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ddga-combobox__value", children: triggerLabel ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ddga-combobox__placeholder", children: placeholder }) }),
|
|
2816
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronDown, { "aria-hidden": "true", className: "ddga-combobox__icon" })
|
|
2817
|
+
]
|
|
2818
|
+
}
|
|
2819
|
+
) }),
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_radix_ui20.Popover.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2821
|
+
import_radix_ui20.Popover.Content,
|
|
2822
|
+
{
|
|
2823
|
+
"data-slot": "combobox-content",
|
|
2824
|
+
className: "ddga-combobox-content",
|
|
2825
|
+
sideOffset: 4,
|
|
2826
|
+
align: "start",
|
|
2827
|
+
"aria-label": ariaLabel ?? (typeof label === "string" ? label : "Options"),
|
|
2828
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2829
|
+
style: { inlineSize: "var(--radix-popover-trigger-width)" },
|
|
2830
|
+
onOpenAutoFocus: (event) => {
|
|
2831
|
+
event.preventDefault();
|
|
2832
|
+
},
|
|
2833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2834
|
+
import_cmdk.Command,
|
|
2835
|
+
{
|
|
2836
|
+
id: searchId,
|
|
2837
|
+
"data-slot": "combobox-command",
|
|
2838
|
+
className: "ddga-combobox-command",
|
|
2839
|
+
children: [
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2841
|
+
import_cmdk.Command.Input,
|
|
2842
|
+
{
|
|
2843
|
+
autoFocus: true,
|
|
2844
|
+
placeholder: searchPlaceholder,
|
|
2845
|
+
"data-slot": "combobox-input",
|
|
2846
|
+
className: "ddga-combobox-input"
|
|
2847
|
+
}
|
|
2848
|
+
),
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_cmdk.Command.List, { "data-slot": "combobox-list", className: "ddga-combobox-list", children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_cmdk.Command.Empty, { "data-slot": "combobox-empty", className: "ddga-combobox-empty", children: emptyMessage }),
|
|
2851
|
+
children
|
|
2852
|
+
] })
|
|
2853
|
+
]
|
|
2854
|
+
}
|
|
2855
|
+
)
|
|
2856
|
+
}
|
|
2857
|
+
) })
|
|
2858
|
+
] }),
|
|
2859
|
+
hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FieldMessage, { id: errorId, variant: "error", children: errorMessage }),
|
|
2860
|
+
hasHelper && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FieldMessage, { id: helperId, variant: "helper", children: helperText })
|
|
2861
|
+
] }) });
|
|
2862
|
+
}
|
|
2863
|
+
function ComboboxItem({
|
|
2864
|
+
value,
|
|
2865
|
+
keywords,
|
|
2866
|
+
disabled,
|
|
2867
|
+
onSelect,
|
|
2868
|
+
className,
|
|
2869
|
+
children,
|
|
2870
|
+
...props
|
|
2871
|
+
}) {
|
|
2872
|
+
const { value: selectedValue, select } = useComboboxContext("ComboboxItem");
|
|
2873
|
+
const isSelected = selectedValue === value;
|
|
2874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2875
|
+
import_cmdk.Command.Item,
|
|
2876
|
+
{
|
|
2877
|
+
value,
|
|
2878
|
+
keywords,
|
|
2879
|
+
disabled,
|
|
2880
|
+
onSelect: (v) => {
|
|
2881
|
+
onSelect?.(v);
|
|
2882
|
+
select(v);
|
|
2883
|
+
},
|
|
2884
|
+
"data-slot": "combobox-item",
|
|
2885
|
+
"data-active": isSelected ? "" : void 0,
|
|
2886
|
+
className: cn("ddga-combobox-item", className),
|
|
2887
|
+
...props,
|
|
2888
|
+
children: [
|
|
2889
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ddga-combobox-item__check", "aria-hidden": "true", children: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Check, {}) : null }),
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ddga-combobox-item__label", children })
|
|
2891
|
+
]
|
|
2892
|
+
}
|
|
2893
|
+
);
|
|
2894
|
+
}
|
|
2895
|
+
function ComboboxGroup({ className, heading, ...props }) {
|
|
2896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2897
|
+
import_cmdk.Command.Group,
|
|
2898
|
+
{
|
|
2899
|
+
heading,
|
|
2900
|
+
"data-slot": "combobox-group",
|
|
2901
|
+
className: cn("ddga-combobox-group", className),
|
|
2902
|
+
...props
|
|
2903
|
+
}
|
|
2904
|
+
);
|
|
2905
|
+
}
|
|
2906
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
2907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2908
|
+
import_cmdk.Command.Separator,
|
|
2909
|
+
{
|
|
2910
|
+
"data-slot": "combobox-separator",
|
|
2911
|
+
className: cn("ddga-combobox-separator", className),
|
|
2912
|
+
...props
|
|
2913
|
+
}
|
|
2914
|
+
);
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
// src/providers/DgaProvider.tsx
|
|
2918
|
+
var import_react16 = require("react");
|
|
2919
|
+
var import_radix_ui21 = require("radix-ui");
|
|
2920
|
+
var import_tokens = require("@dev-dga/tokens");
|
|
2921
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
757
2922
|
function DgaProvider({
|
|
758
2923
|
dir = "ltr",
|
|
759
2924
|
locale,
|
|
@@ -764,17 +2929,17 @@ function DgaProvider({
|
|
|
764
2929
|
style: consumerStyle,
|
|
765
2930
|
children
|
|
766
2931
|
}) {
|
|
767
|
-
const parentCtx = (0,
|
|
2932
|
+
const parentCtx = (0, import_react16.useContext)(DgaContext);
|
|
768
2933
|
const isNested = parentCtx !== null;
|
|
769
|
-
const [rootEl, setRootEl] = (0,
|
|
2934
|
+
const [rootEl, setRootEl] = (0, import_react16.useState)(null);
|
|
770
2935
|
const resolvedLocale = locale ?? (dir === "rtl" ? "ar" : "en");
|
|
771
|
-
const ctxValue = (0,
|
|
2936
|
+
const ctxValue = (0, import_react16.useMemo)(
|
|
772
2937
|
() => ({ dir, locale: resolvedLocale, mode, rootEl }),
|
|
773
2938
|
[dir, resolvedLocale, mode, rootEl]
|
|
774
2939
|
);
|
|
775
|
-
const themeVars = (0,
|
|
776
|
-
const inner = /* @__PURE__ */ (0,
|
|
777
|
-
return /* @__PURE__ */ (0,
|
|
2940
|
+
const themeVars = (0, import_react16.useMemo)(() => theme ? (0, import_tokens.buildTheme)(theme) : null, [theme]);
|
|
2941
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_radix_ui21.Direction.Provider, { dir, children });
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DgaContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
778
2943
|
Component,
|
|
779
2944
|
{
|
|
780
2945
|
ref: setRootEl,
|
|
@@ -784,7 +2949,7 @@ function DgaProvider({
|
|
|
784
2949
|
"data-theme": mode,
|
|
785
2950
|
className,
|
|
786
2951
|
style: { colorScheme: mode, ...themeVars ?? {}, ...consumerStyle },
|
|
787
|
-
children: isNested ? inner : /* @__PURE__ */ (0,
|
|
2952
|
+
children: isNested ? inner : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_radix_ui21.Tooltip.Provider, { delayDuration: 300, skipDelayDuration: 100, children: inner })
|
|
788
2953
|
}
|
|
789
2954
|
) });
|
|
790
2955
|
}
|
|
@@ -795,26 +2960,140 @@ function useDir() {
|
|
|
795
2960
|
}
|
|
796
2961
|
// Annotate the CommonJS export names for ESM import in node:
|
|
797
2962
|
0 && (module.exports = {
|
|
2963
|
+
Accordion,
|
|
2964
|
+
AccordionContent,
|
|
2965
|
+
AccordionItem,
|
|
2966
|
+
AccordionTrigger,
|
|
2967
|
+
Alert,
|
|
2968
|
+
AlertDescription,
|
|
2969
|
+
AlertTitle,
|
|
2970
|
+
Avatar,
|
|
2971
|
+
AvatarFallback,
|
|
2972
|
+
AvatarGroup,
|
|
2973
|
+
AvatarImage,
|
|
2974
|
+
Badge,
|
|
2975
|
+
Breadcrumb,
|
|
2976
|
+
BreadcrumbEllipsis,
|
|
2977
|
+
BreadcrumbItem,
|
|
2978
|
+
BreadcrumbLink,
|
|
2979
|
+
BreadcrumbList,
|
|
2980
|
+
BreadcrumbPage,
|
|
2981
|
+
BreadcrumbSeparator,
|
|
798
2982
|
Button,
|
|
2983
|
+
Card,
|
|
2984
|
+
CardContent,
|
|
2985
|
+
CardDescription,
|
|
2986
|
+
CardFooter,
|
|
2987
|
+
CardHeader,
|
|
2988
|
+
CardImage,
|
|
2989
|
+
CardTitle,
|
|
799
2990
|
Checkbox,
|
|
2991
|
+
CircularProgress,
|
|
2992
|
+
Combobox,
|
|
2993
|
+
ComboboxGroup,
|
|
2994
|
+
ComboboxItem,
|
|
2995
|
+
ComboboxSeparator,
|
|
800
2996
|
DgaProvider,
|
|
2997
|
+
Divider,
|
|
2998
|
+
Drawer,
|
|
2999
|
+
DrawerBody,
|
|
3000
|
+
DrawerClose,
|
|
3001
|
+
DrawerContent,
|
|
3002
|
+
DrawerDescription,
|
|
3003
|
+
DrawerFooter,
|
|
3004
|
+
DrawerHeader,
|
|
3005
|
+
DrawerTitle,
|
|
3006
|
+
DrawerTrigger,
|
|
3007
|
+
DropdownMenu,
|
|
3008
|
+
DropdownMenuCheckboxItem,
|
|
3009
|
+
DropdownMenuContent,
|
|
3010
|
+
DropdownMenuGroup,
|
|
3011
|
+
DropdownMenuItem,
|
|
3012
|
+
DropdownMenuLabel,
|
|
3013
|
+
DropdownMenuRadioGroup,
|
|
3014
|
+
DropdownMenuRadioItem,
|
|
3015
|
+
DropdownMenuSeparator,
|
|
3016
|
+
DropdownMenuSub,
|
|
3017
|
+
DropdownMenuSubContent,
|
|
3018
|
+
DropdownMenuSubTrigger,
|
|
3019
|
+
DropdownMenuTrigger,
|
|
801
3020
|
FieldMessage,
|
|
802
3021
|
Input,
|
|
3022
|
+
Modal,
|
|
3023
|
+
ModalClose,
|
|
3024
|
+
ModalContent,
|
|
3025
|
+
ModalDescription,
|
|
3026
|
+
ModalFooter,
|
|
3027
|
+
ModalHeader,
|
|
3028
|
+
ModalTitle,
|
|
3029
|
+
ModalTrigger,
|
|
3030
|
+
Pagination,
|
|
3031
|
+
PaginationContent,
|
|
3032
|
+
PaginationEllipsis,
|
|
3033
|
+
PaginationItem,
|
|
3034
|
+
PaginationLink,
|
|
3035
|
+
PaginationNext,
|
|
3036
|
+
PaginationPrevious,
|
|
3037
|
+
Progress,
|
|
803
3038
|
Radio,
|
|
804
3039
|
RadioGroup,
|
|
805
3040
|
Select,
|
|
806
3041
|
SelectItem,
|
|
3042
|
+
Skeleton,
|
|
3043
|
+
Spinner,
|
|
3044
|
+
Step,
|
|
3045
|
+
StepDescription,
|
|
3046
|
+
StepIndicator,
|
|
3047
|
+
StepTitle,
|
|
3048
|
+
Steps,
|
|
807
3049
|
Switch,
|
|
3050
|
+
Tabs,
|
|
3051
|
+
TabsContent,
|
|
3052
|
+
TabsList,
|
|
3053
|
+
TabsTrigger,
|
|
808
3054
|
Textarea,
|
|
3055
|
+
Toaster,
|
|
3056
|
+
Tooltip,
|
|
3057
|
+
TooltipContent,
|
|
3058
|
+
TooltipTrigger,
|
|
3059
|
+
accordionVariants,
|
|
3060
|
+
alertVariants,
|
|
3061
|
+
avatarVariants,
|
|
3062
|
+
badgeVariants,
|
|
3063
|
+
breadcrumbVariants,
|
|
809
3064
|
buttonVariants,
|
|
3065
|
+
cardVariants,
|
|
810
3066
|
checkboxVariants,
|
|
3067
|
+
circularProgressVariants,
|
|
811
3068
|
cn,
|
|
3069
|
+
comboboxTriggerVariants,
|
|
3070
|
+
comboboxVariants,
|
|
3071
|
+
createToast,
|
|
3072
|
+
createToastStore,
|
|
3073
|
+
dividerVariants,
|
|
3074
|
+
drawerVariants,
|
|
3075
|
+
dropdownMenuVariants,
|
|
812
3076
|
inputVariants,
|
|
3077
|
+
modalContentVariants,
|
|
3078
|
+
paginationLinkVariants,
|
|
3079
|
+
paginationVariants,
|
|
3080
|
+
progressVariants,
|
|
813
3081
|
radioGroupVariants,
|
|
814
3082
|
radioVariants,
|
|
815
3083
|
selectTriggerVariants,
|
|
3084
|
+
skeletonVariants,
|
|
3085
|
+
spinnerVariants,
|
|
3086
|
+
stepVariants,
|
|
3087
|
+
stepsVariants,
|
|
816
3088
|
switchVariants,
|
|
3089
|
+
tabsListVariants,
|
|
3090
|
+
tabsVariants,
|
|
817
3091
|
textareaVariants,
|
|
3092
|
+
toast,
|
|
3093
|
+
toastStore,
|
|
3094
|
+
toastVariants,
|
|
3095
|
+
toastViewportVariants,
|
|
3096
|
+
tooltipContentVariants,
|
|
818
3097
|
useDga,
|
|
819
3098
|
useDir,
|
|
820
3099
|
useFieldA11y
|