@uipath/apollo-wind 0.7.2-pr188.4865fad
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/LICENSE +21 -0
- package/README.md +188 -0
- package/dist/components/forms/data-fetcher.cjs +250 -0
- package/dist/components/forms/data-fetcher.d.ts +173 -0
- package/dist/components/forms/data-fetcher.js +207 -0
- package/dist/components/forms/demo-mocks.cjs +1031 -0
- package/dist/components/forms/demo-mocks.d.ts +10 -0
- package/dist/components/forms/demo-mocks.js +997 -0
- package/dist/components/forms/field-renderer.cjs +595 -0
- package/dist/components/forms/field-renderer.d.ts +14 -0
- package/dist/components/forms/field-renderer.js +561 -0
- package/dist/components/forms/form-designer.cjs +2314 -0
- package/dist/components/forms/form-designer.d.ts +1 -0
- package/dist/components/forms/form-designer.js +2280 -0
- package/dist/components/forms/form-examples.cjs +962 -0
- package/dist/components/forms/form-examples.d.ts +46 -0
- package/dist/components/forms/form-examples.js +907 -0
- package/dist/components/forms/form-plugins.cjs +225 -0
- package/dist/components/forms/form-plugins.d.ts +11 -0
- package/dist/components/forms/form-plugins.js +176 -0
- package/dist/components/forms/form-schema.cjs +56 -0
- package/dist/components/forms/form-schema.d.ts +324 -0
- package/dist/components/forms/form-schema.js +13 -0
- package/dist/components/forms/form-state-viewer.cjs +498 -0
- package/dist/components/forms/form-state-viewer.d.ts +15 -0
- package/dist/components/forms/form-state-viewer.js +464 -0
- package/dist/components/forms/index.cjs +103 -0
- package/dist/components/forms/index.d.ts +13 -0
- package/dist/components/forms/index.js +9 -0
- package/dist/components/forms/metadata-form.cjs +400 -0
- package/dist/components/forms/metadata-form.d.ts +16 -0
- package/dist/components/forms/metadata-form.js +366 -0
- package/dist/components/forms/rules-engine.cjs +343 -0
- package/dist/components/forms/rules-engine.d.ts +99 -0
- package/dist/components/forms/rules-engine.js +293 -0
- package/dist/components/forms/schema-serializer.cjs +250 -0
- package/dist/components/forms/schema-serializer.d.ts +27 -0
- package/dist/components/forms/schema-serializer.js +213 -0
- package/dist/components/forms/schema-viewer.cjs +157 -0
- package/dist/components/forms/schema-viewer.d.ts +29 -0
- package/dist/components/forms/schema-viewer.js +117 -0
- package/dist/components/forms/validation-converter.cjs +154 -0
- package/dist/components/forms/validation-converter.d.ts +42 -0
- package/dist/components/forms/validation-converter.js +114 -0
- package/dist/components/ui/accordion.cjs +82 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +39 -0
- package/dist/components/ui/alert-dialog.cjs +126 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +62 -0
- package/dist/components/ui/alert.cjs +77 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/alert.js +37 -0
- package/dist/components/ui/aspect-ratio.cjs +38 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/avatar.cjs +63 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/badge.cjs +63 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +26 -0
- package/dist/components/ui/breadcrumb.cjs +118 -0
- package/dist/components/ui/breadcrumb.d.ts +19 -0
- package/dist/components/ui/breadcrumb.js +66 -0
- package/dist/components/ui/button-group.cjs +68 -0
- package/dist/components/ui/button-group.d.ts +14 -0
- package/dist/components/ui/button-group.js +28 -0
- package/dist/components/ui/button.cjs +78 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +41 -0
- package/dist/components/ui/calendar.cjs +144 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/calendar.js +107 -0
- package/dist/components/ui/card.cjs +89 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.js +40 -0
- package/dist/components/ui/checkbox.cjs +52 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.js +18 -0
- package/dist/components/ui/collapsible.cjs +45 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/combobox.cjs +102 -0
- package/dist/components/ui/combobox.d.ts +15 -0
- package/dist/components/ui/combobox.js +68 -0
- package/dist/components/ui/command.cjs +131 -0
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/command.js +73 -0
- package/dist/components/ui/context-menu.cjs +173 -0
- package/dist/components/ui/context-menu.d.ts +27 -0
- package/dist/components/ui/context-menu.js +97 -0
- package/dist/components/ui/data-table.cjs +292 -0
- package/dist/components/ui/data-table.d.ts +23 -0
- package/dist/components/ui/data-table.js +252 -0
- package/dist/components/ui/date-picker.cjs +118 -0
- package/dist/components/ui/date-picker.d.ts +21 -0
- package/dist/components/ui/date-picker.js +81 -0
- package/dist/components/ui/datetime-picker.cjs +154 -0
- package/dist/components/ui/datetime-picker.d.ts +9 -0
- package/dist/components/ui/datetime-picker.js +120 -0
- package/dist/components/ui/dialog.cjs +159 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/dialog.js +98 -0
- package/dist/components/ui/drawer.cjs +116 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +55 -0
- package/dist/components/ui/dropdown-menu.cjs +174 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/dropdown-menu.js +98 -0
- package/dist/components/ui/editable-cell.cjs +256 -0
- package/dist/components/ui/editable-cell.d.ts +24 -0
- package/dist/components/ui/editable-cell.js +219 -0
- package/dist/components/ui/empty-state.cjs +73 -0
- package/dist/components/ui/empty-state.d.ts +16 -0
- package/dist/components/ui/empty-state.js +39 -0
- package/dist/components/ui/file-upload.cjs +236 -0
- package/dist/components/ui/file-upload.d.ts +10 -0
- package/dist/components/ui/file-upload.js +202 -0
- package/dist/components/ui/hover-card.cjs +55 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +15 -0
- package/dist/components/ui/index.cjs +546 -0
- package/dist/components/ui/index.d.ts +55 -0
- package/dist/components/ui/index.js +55 -0
- package/dist/components/ui/input.cjs +45 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +11 -0
- package/dist/components/ui/label.cjs +47 -0
- package/dist/components/ui/label.d.ts +7 -0
- package/dist/components/ui/label.js +13 -0
- package/dist/components/ui/layout/column.cjs +84 -0
- package/dist/components/ui/layout/column.d.ts +21 -0
- package/dist/components/ui/layout/column.js +50 -0
- package/dist/components/ui/layout/grid.cjs +101 -0
- package/dist/components/ui/layout/grid.d.ts +22 -0
- package/dist/components/ui/layout/grid.js +67 -0
- package/dist/components/ui/layout/index.cjs +44 -0
- package/dist/components/ui/layout/index.d.ts +7 -0
- package/dist/components/ui/layout/index.js +4 -0
- package/dist/components/ui/layout/row.cjs +84 -0
- package/dist/components/ui/layout/row.d.ts +21 -0
- package/dist/components/ui/layout/row.js +50 -0
- package/dist/components/ui/layout/types.cjs +18 -0
- package/dist/components/ui/layout/types.d.ts +149 -0
- package/dist/components/ui/layout/types.js +0 -0
- package/dist/components/ui/layout/utils.cjs +324 -0
- package/dist/components/ui/layout/utils.d.ts +76 -0
- package/dist/components/ui/layout/utils.js +239 -0
- package/dist/components/ui/menubar.cjs +210 -0
- package/dist/components/ui/menubar.d.ts +28 -0
- package/dist/components/ui/menubar.js +131 -0
- package/dist/components/ui/multi-select.cjs +187 -0
- package/dist/components/ui/multi-select.d.ts +18 -0
- package/dist/components/ui/multi-select.js +153 -0
- package/dist/components/ui/navigation-menu.cjs +122 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.js +64 -0
- package/dist/components/ui/pagination.cjs +131 -0
- package/dist/components/ui/pagination.d.ts +28 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.cjs +61 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.js +18 -0
- package/dist/components/ui/progress.cjs +51 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +17 -0
- package/dist/components/ui/radio-group.cjs +61 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/resizable.cjs +60 -0
- package/dist/components/ui/resizable.d.ts +23 -0
- package/dist/components/ui/resizable.js +20 -0
- package/dist/components/ui/scroll-area.cjs +67 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +30 -0
- package/dist/components/ui/search.cjs +153 -0
- package/dist/components/ui/search.d.ts +19 -0
- package/dist/components/ui/search.js +116 -0
- package/dist/components/ui/select.cjs +151 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/select.js +90 -0
- package/dist/components/ui/separator.cjs +47 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/sheet.cjs +142 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sheet.js +81 -0
- package/dist/components/ui/skeleton.cjs +43 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +9 -0
- package/dist/components/ui/slider.cjs +63 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +29 -0
- package/dist/components/ui/sonner.cjs +76 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.js +39 -0
- package/dist/components/ui/spinner.cjs +78 -0
- package/dist/components/ui/spinner.d.ts +11 -0
- package/dist/components/ui/spinner.js +41 -0
- package/dist/components/ui/stats-card.cjs +102 -0
- package/dist/components/ui/stats-card.d.ts +15 -0
- package/dist/components/ui/stats-card.js +68 -0
- package/dist/components/ui/stepper.cjs +99 -0
- package/dist/components/ui/stepper.d.ts +14 -0
- package/dist/components/ui/stepper.js +65 -0
- package/dist/components/ui/switch.cjs +48 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +14 -0
- package/dist/components/ui/table.cjs +110 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +55 -0
- package/dist/components/ui/tabs.cjs +67 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.js +24 -0
- package/dist/components/ui/textarea.cjs +44 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.js +10 -0
- package/dist/components/ui/toggle-group.cjs +73 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.js +36 -0
- package/dist/components/ui/toggle.cjs +71 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.cjs +58 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +15 -0
- package/dist/examples/admin-layout-example.d.ts +92 -0
- package/dist/examples/app-shell-example.d.ts +52 -0
- package/dist/examples/dashboard-example.d.ts +11 -0
- package/dist/examples/data-management-example.d.ts +1 -0
- package/dist/examples/flow-editor-layout-example.d.ts +22 -0
- package/dist/examples/flow-start-example.d.ts +30 -0
- package/dist/examples/form-builder-example.d.ts +1 -0
- package/dist/examples/new-project-example.d.ts +30 -0
- package/dist/examples/settings-example.d.ts +1 -0
- package/dist/examples/vscode-example.d.ts +80 -0
- package/dist/index.cjs +830 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +67 -0
- package/dist/lib/index.cjs +42 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +2 -0
- package/dist/lib/utils.cjs +70 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.js +30 -0
- package/dist/postcss.config.export.cjs +43 -0
- package/dist/postcss.config.export.js +9 -0
- package/dist/styles.css +6868 -0
- package/dist/tailwind.css +239 -0
- package/dist/tailwind.preset.cjs +77 -0
- package/dist/tailwind.preset.js +43 -0
- package/package.json +157 -0
- package/postcss.config.export.js +9 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ValidationConfig, FieldType } from './form-schema';
|
|
3
|
+
/**
|
|
4
|
+
* Validation Converter
|
|
5
|
+
*
|
|
6
|
+
* Converts JSON-serializable ValidationConfig to Zod schemas at runtime.
|
|
7
|
+
* This is the bridge between declarative validation config and runtime validation.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Convert a ValidationConfig to a Zod schema based on field type
|
|
11
|
+
*
|
|
12
|
+
* @param config - The validation configuration (JSON-serializable)
|
|
13
|
+
* @param fieldType - The field type to determine base schema
|
|
14
|
+
* @returns A Zod schema for runtime validation
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const schema = validationConfigToZod(
|
|
18
|
+
* { required: true, minLength: 2, email: true },
|
|
19
|
+
* "email"
|
|
20
|
+
* );
|
|
21
|
+
* // Returns: z.string().min(2).email()
|
|
22
|
+
*/
|
|
23
|
+
export declare function validationConfigToZod(config: ValidationConfig | undefined, fieldType: FieldType): z.ZodTypeAny;
|
|
24
|
+
/**
|
|
25
|
+
* Build a complete Zod object schema from field validations
|
|
26
|
+
*
|
|
27
|
+
* @param fields - Array of field metadata with validation configs
|
|
28
|
+
* @returns A Zod object schema for the entire form
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildZodSchemaFromFields(fields: Array<{
|
|
31
|
+
name: string;
|
|
32
|
+
type: FieldType;
|
|
33
|
+
validation?: ValidationConfig;
|
|
34
|
+
}>): z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
35
|
+
/**
|
|
36
|
+
* Merge multiple ValidationConfigs (for rule-based validation changes)
|
|
37
|
+
*
|
|
38
|
+
* @param base - Base validation config
|
|
39
|
+
* @param override - Override validation config from rule effects
|
|
40
|
+
* @returns Merged validation config
|
|
41
|
+
*/
|
|
42
|
+
export declare function mergeValidationConfigs(base: ValidationConfig | undefined, override: ValidationConfig | undefined): ValidationConfig | undefined;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
function validationConfigToZod(config, fieldType) {
|
|
3
|
+
let schema = getBaseSchemaForType(fieldType);
|
|
4
|
+
if (!config) return schema.optional();
|
|
5
|
+
schema = applyStringConstraints(schema, config, fieldType);
|
|
6
|
+
schema = applyNumberConstraints(schema, config, fieldType);
|
|
7
|
+
schema = applyArrayConstraints(schema, config, fieldType);
|
|
8
|
+
if (config.required) {
|
|
9
|
+
if (isStringType(fieldType) && !config.minLength) schema = schema.min(1, config.messages?.required || 'This field is required');
|
|
10
|
+
return schema;
|
|
11
|
+
}
|
|
12
|
+
return schema.optional();
|
|
13
|
+
}
|
|
14
|
+
function getBaseSchemaForType(fieldType) {
|
|
15
|
+
switch(fieldType){
|
|
16
|
+
case 'text':
|
|
17
|
+
case 'textarea':
|
|
18
|
+
return z.string();
|
|
19
|
+
case 'email':
|
|
20
|
+
return z.string().email();
|
|
21
|
+
case 'number':
|
|
22
|
+
case 'slider':
|
|
23
|
+
return z.coerce.number();
|
|
24
|
+
case 'checkbox':
|
|
25
|
+
case 'switch':
|
|
26
|
+
return z.boolean();
|
|
27
|
+
case 'select':
|
|
28
|
+
case 'radio':
|
|
29
|
+
return z.string();
|
|
30
|
+
case 'multiselect':
|
|
31
|
+
return z.array(z.string());
|
|
32
|
+
case 'date':
|
|
33
|
+
return z.coerce.date();
|
|
34
|
+
case 'datetime':
|
|
35
|
+
return z.coerce.date();
|
|
36
|
+
case 'file':
|
|
37
|
+
return z.any();
|
|
38
|
+
case 'custom':
|
|
39
|
+
return z.any();
|
|
40
|
+
default:
|
|
41
|
+
return z.string();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function isStringType(fieldType) {
|
|
45
|
+
return [
|
|
46
|
+
'text',
|
|
47
|
+
'textarea',
|
|
48
|
+
'email',
|
|
49
|
+
'select',
|
|
50
|
+
'radio'
|
|
51
|
+
].includes(fieldType);
|
|
52
|
+
}
|
|
53
|
+
function isNumberType(fieldType) {
|
|
54
|
+
return [
|
|
55
|
+
'number',
|
|
56
|
+
'slider'
|
|
57
|
+
].includes(fieldType);
|
|
58
|
+
}
|
|
59
|
+
function isArrayType(fieldType) {
|
|
60
|
+
return [
|
|
61
|
+
'multiselect'
|
|
62
|
+
].includes(fieldType);
|
|
63
|
+
}
|
|
64
|
+
function applyStringConstraints(schema, config, fieldType) {
|
|
65
|
+
if (!isStringType(fieldType)) return schema;
|
|
66
|
+
let stringSchema = schema;
|
|
67
|
+
if (null != config.minLength) stringSchema = stringSchema.min(config.minLength, config.messages?.minLength || `Must be at least ${config.minLength} characters`);
|
|
68
|
+
if (null != config.maxLength) stringSchema = stringSchema.max(config.maxLength, config.messages?.maxLength || `Must be at most ${config.maxLength} characters`);
|
|
69
|
+
if (config.pattern) try {
|
|
70
|
+
const regex = new RegExp(config.pattern);
|
|
71
|
+
stringSchema = stringSchema.regex(regex, config.messages?.pattern || 'Invalid format');
|
|
72
|
+
} catch {
|
|
73
|
+
console.warn(`Invalid regex pattern: ${config.pattern}`);
|
|
74
|
+
}
|
|
75
|
+
if (config.email && 'email' !== fieldType) stringSchema = stringSchema.email(config.messages?.email || 'Invalid email address');
|
|
76
|
+
if (config.url) stringSchema = stringSchema.url(config.messages?.url || 'Invalid URL');
|
|
77
|
+
return stringSchema;
|
|
78
|
+
}
|
|
79
|
+
function applyNumberConstraints(schema, config, fieldType) {
|
|
80
|
+
if (!isNumberType(fieldType)) return schema;
|
|
81
|
+
let numberSchema = schema;
|
|
82
|
+
if (config.integer) numberSchema = numberSchema.int(config.messages?.integer || 'Must be a whole number');
|
|
83
|
+
if (null != config.min) numberSchema = numberSchema.min(config.min, config.messages?.min || `Must be at least ${config.min}`);
|
|
84
|
+
if (null != config.max) numberSchema = numberSchema.max(config.max, config.messages?.max || `Must be at most ${config.max}`);
|
|
85
|
+
if (config.positive) numberSchema = numberSchema.positive(config.messages?.positive || 'Must be a positive number');
|
|
86
|
+
if (config.negative) numberSchema = numberSchema.negative(config.messages?.negative || 'Must be a negative number');
|
|
87
|
+
return numberSchema;
|
|
88
|
+
}
|
|
89
|
+
function applyArrayConstraints(schema, config, fieldType) {
|
|
90
|
+
if (!isArrayType(fieldType)) return schema;
|
|
91
|
+
let arraySchema = schema;
|
|
92
|
+
if (null != config.minItems) arraySchema = arraySchema.min(config.minItems, config.messages?.minItems || `Select at least ${config.minItems} item(s)`);
|
|
93
|
+
if (null != config.maxItems) arraySchema = arraySchema.max(config.maxItems, config.messages?.maxItems || `Select at most ${config.maxItems} item(s)`);
|
|
94
|
+
return arraySchema;
|
|
95
|
+
}
|
|
96
|
+
function buildZodSchemaFromFields(fields) {
|
|
97
|
+
const shape = {};
|
|
98
|
+
for (const field of fields)shape[field.name] = validationConfigToZod(field.validation, field.type);
|
|
99
|
+
return z.object(shape);
|
|
100
|
+
}
|
|
101
|
+
function mergeValidationConfigs(base, override) {
|
|
102
|
+
if (!base && !override) return;
|
|
103
|
+
if (!base) return override;
|
|
104
|
+
if (!override) return base;
|
|
105
|
+
return {
|
|
106
|
+
...base,
|
|
107
|
+
...override,
|
|
108
|
+
messages: {
|
|
109
|
+
...base.messages,
|
|
110
|
+
...override.messages
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export { buildZodSchemaFromFields, mergeValidationConfigs, validationConfigToZod };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
AccordionItem: ()=>AccordionItem,
|
|
29
|
+
Accordion: ()=>Accordion,
|
|
30
|
+
AccordionContent: ()=>AccordionContent,
|
|
31
|
+
AccordionTrigger: ()=>AccordionTrigger
|
|
32
|
+
});
|
|
33
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
+
const react_accordion_namespaceObject = require("@radix-ui/react-accordion");
|
|
35
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
36
|
+
const external_react_namespaceObject = require("react");
|
|
37
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
38
|
+
const Accordion = react_accordion_namespaceObject.Root;
|
|
39
|
+
const AccordionItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Item, {
|
|
40
|
+
ref: ref,
|
|
41
|
+
className: (0, index_cjs_namespaceObject.cn)('border-b', className),
|
|
42
|
+
...props
|
|
43
|
+
}));
|
|
44
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
45
|
+
const AccordionTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Header, {
|
|
46
|
+
className: "flex",
|
|
47
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_accordion_namespaceObject.Trigger, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-1 cursor-pointer items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', className),
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
children,
|
|
53
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
54
|
+
className: "h-4 w-4 shrink-0 transition-transform duration-200"
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
}));
|
|
59
|
+
AccordionTrigger.displayName = react_accordion_namespaceObject.Trigger.displayName;
|
|
60
|
+
const AccordionContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Content, {
|
|
61
|
+
ref: ref,
|
|
62
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down data-[state=open]:overflow-visible",
|
|
63
|
+
...props,
|
|
64
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
65
|
+
className: (0, index_cjs_namespaceObject.cn)('pb-4 pt-0', className),
|
|
66
|
+
children: children
|
|
67
|
+
})
|
|
68
|
+
}));
|
|
69
|
+
AccordionContent.displayName = react_accordion_namespaceObject.Content.displayName;
|
|
70
|
+
exports.Accordion = __webpack_exports__.Accordion;
|
|
71
|
+
exports.AccordionContent = __webpack_exports__.AccordionContent;
|
|
72
|
+
exports.AccordionItem = __webpack_exports__.AccordionItem;
|
|
73
|
+
exports.AccordionTrigger = __webpack_exports__.AccordionTrigger;
|
|
74
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
75
|
+
"Accordion",
|
|
76
|
+
"AccordionContent",
|
|
77
|
+
"AccordionItem",
|
|
78
|
+
"AccordionTrigger"
|
|
79
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
80
|
+
Object.defineProperty(exports, '__esModule', {
|
|
81
|
+
value: true
|
|
82
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Content, Header, Item, Root, Trigger } from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDown } from "lucide-react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { cn } from "../../lib/index.js";
|
|
7
|
+
const Accordion = Root;
|
|
8
|
+
const AccordionItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Item, {
|
|
9
|
+
ref: ref,
|
|
10
|
+
className: cn('border-b', className),
|
|
11
|
+
...props
|
|
12
|
+
}));
|
|
13
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
14
|
+
const AccordionTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsx(Header, {
|
|
15
|
+
className: "flex",
|
|
16
|
+
children: /*#__PURE__*/ jsxs(Trigger, {
|
|
17
|
+
ref: ref,
|
|
18
|
+
className: cn('flex flex-1 cursor-pointer items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [
|
|
21
|
+
children,
|
|
22
|
+
/*#__PURE__*/ jsx(ChevronDown, {
|
|
23
|
+
className: "h-4 w-4 shrink-0 transition-transform duration-200"
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
28
|
+
AccordionTrigger.displayName = Trigger.displayName;
|
|
29
|
+
const AccordionContent = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsx(Content, {
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down data-[state=open]:overflow-visible",
|
|
32
|
+
...props,
|
|
33
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
34
|
+
className: cn('pb-4 pt-0', className),
|
|
35
|
+
children: children
|
|
36
|
+
})
|
|
37
|
+
}));
|
|
38
|
+
AccordionContent.displayName = Content.displayName;
|
|
39
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
AlertDialogCancel: ()=>AlertDialogCancel,
|
|
28
|
+
AlertDialogContent: ()=>AlertDialogContent,
|
|
29
|
+
AlertDialogHeader: ()=>AlertDialogHeader,
|
|
30
|
+
AlertDialogOverlay: ()=>AlertDialogOverlay,
|
|
31
|
+
AlertDialogFooter: ()=>AlertDialogFooter,
|
|
32
|
+
AlertDialogTrigger: ()=>AlertDialogTrigger,
|
|
33
|
+
AlertDialogDescription: ()=>AlertDialogDescription,
|
|
34
|
+
AlertDialogTitle: ()=>AlertDialogTitle,
|
|
35
|
+
AlertDialog: ()=>AlertDialog,
|
|
36
|
+
AlertDialogPortal: ()=>AlertDialogPortal,
|
|
37
|
+
AlertDialogAction: ()=>AlertDialogAction
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const external_react_namespaceObject = require("react");
|
|
41
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
42
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
43
|
+
const react_alert_dialog_namespaceObject = require("@radix-ui/react-alert-dialog");
|
|
44
|
+
const AlertDialog = react_alert_dialog_namespaceObject.Root;
|
|
45
|
+
const AlertDialogTrigger = react_alert_dialog_namespaceObject.Trigger;
|
|
46
|
+
const AlertDialogPortal = react_alert_dialog_namespaceObject.Portal;
|
|
47
|
+
const AlertDialogOverlay = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Overlay, {
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className),
|
|
49
|
+
...props,
|
|
50
|
+
ref: ref
|
|
51
|
+
}));
|
|
52
|
+
AlertDialogOverlay.displayName = react_alert_dialog_namespaceObject.Overlay.displayName;
|
|
53
|
+
const AlertDialogContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(AlertDialogPortal, {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AlertDialogOverlay, {}),
|
|
56
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Content, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
className: (0, index_cjs_namespaceObject.cn)('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className),
|
|
59
|
+
...props
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}));
|
|
63
|
+
AlertDialogContent.displayName = react_alert_dialog_namespaceObject.Content.displayName;
|
|
64
|
+
const AlertDialogHeader = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
65
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col space-y-2 text-center sm:text-left', className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
69
|
+
const AlertDialogFooter = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
70
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className),
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
74
|
+
const AlertDialogTitle = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Title, {
|
|
75
|
+
ref: ref,
|
|
76
|
+
className: (0, index_cjs_namespaceObject.cn)('text-lg font-semibold', className),
|
|
77
|
+
...props
|
|
78
|
+
}));
|
|
79
|
+
AlertDialogTitle.displayName = react_alert_dialog_namespaceObject.Title.displayName;
|
|
80
|
+
const AlertDialogDescription = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Description, {
|
|
81
|
+
ref: ref,
|
|
82
|
+
className: (0, index_cjs_namespaceObject.cn)('text-sm text-muted-foreground', className),
|
|
83
|
+
...props
|
|
84
|
+
}));
|
|
85
|
+
AlertDialogDescription.displayName = react_alert_dialog_namespaceObject.Description.displayName;
|
|
86
|
+
const AlertDialogAction = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Action, {
|
|
87
|
+
ref: ref,
|
|
88
|
+
className: (0, index_cjs_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)(), className),
|
|
89
|
+
...props
|
|
90
|
+
}));
|
|
91
|
+
AlertDialogAction.displayName = react_alert_dialog_namespaceObject.Action.displayName;
|
|
92
|
+
const AlertDialogCancel = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_alert_dialog_namespaceObject.Cancel, {
|
|
93
|
+
ref: ref,
|
|
94
|
+
className: (0, index_cjs_namespaceObject.cn)((0, external_button_cjs_namespaceObject.buttonVariants)({
|
|
95
|
+
variant: 'outline'
|
|
96
|
+
}), 'mt-2 sm:mt-0', className),
|
|
97
|
+
...props
|
|
98
|
+
}));
|
|
99
|
+
AlertDialogCancel.displayName = react_alert_dialog_namespaceObject.Cancel.displayName;
|
|
100
|
+
exports.AlertDialog = __webpack_exports__.AlertDialog;
|
|
101
|
+
exports.AlertDialogAction = __webpack_exports__.AlertDialogAction;
|
|
102
|
+
exports.AlertDialogCancel = __webpack_exports__.AlertDialogCancel;
|
|
103
|
+
exports.AlertDialogContent = __webpack_exports__.AlertDialogContent;
|
|
104
|
+
exports.AlertDialogDescription = __webpack_exports__.AlertDialogDescription;
|
|
105
|
+
exports.AlertDialogFooter = __webpack_exports__.AlertDialogFooter;
|
|
106
|
+
exports.AlertDialogHeader = __webpack_exports__.AlertDialogHeader;
|
|
107
|
+
exports.AlertDialogOverlay = __webpack_exports__.AlertDialogOverlay;
|
|
108
|
+
exports.AlertDialogPortal = __webpack_exports__.AlertDialogPortal;
|
|
109
|
+
exports.AlertDialogTitle = __webpack_exports__.AlertDialogTitle;
|
|
110
|
+
exports.AlertDialogTrigger = __webpack_exports__.AlertDialogTrigger;
|
|
111
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
112
|
+
"AlertDialog",
|
|
113
|
+
"AlertDialogAction",
|
|
114
|
+
"AlertDialogCancel",
|
|
115
|
+
"AlertDialogContent",
|
|
116
|
+
"AlertDialogDescription",
|
|
117
|
+
"AlertDialogFooter",
|
|
118
|
+
"AlertDialogHeader",
|
|
119
|
+
"AlertDialogOverlay",
|
|
120
|
+
"AlertDialogPortal",
|
|
121
|
+
"AlertDialogTitle",
|
|
122
|
+
"AlertDialogTrigger"
|
|
123
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
124
|
+
Object.defineProperty(exports, '__esModule', {
|
|
125
|
+
value: true
|
|
126
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const AlertDialogHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const AlertDialogFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { buttonVariants } from "./button.js";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
import { Action, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-alert-dialog";
|
|
6
|
+
const AlertDialog = Root;
|
|
7
|
+
const AlertDialogTrigger = Trigger;
|
|
8
|
+
const AlertDialogPortal = Portal;
|
|
9
|
+
const AlertDialogOverlay = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Overlay, {
|
|
10
|
+
className: cn('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className),
|
|
11
|
+
...props,
|
|
12
|
+
ref: ref
|
|
13
|
+
}));
|
|
14
|
+
AlertDialogOverlay.displayName = Overlay.displayName;
|
|
15
|
+
const AlertDialogContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsxs(AlertDialogPortal, {
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsx(AlertDialogOverlay, {}),
|
|
18
|
+
/*#__PURE__*/ jsx(Content, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className),
|
|
21
|
+
...props
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}));
|
|
25
|
+
AlertDialogContent.displayName = Content.displayName;
|
|
26
|
+
const AlertDialogHeader = ({ className, ...props })=>/*#__PURE__*/ jsx("div", {
|
|
27
|
+
className: cn('flex flex-col space-y-2 text-center sm:text-left', className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
31
|
+
const AlertDialogFooter = ({ className, ...props })=>/*#__PURE__*/ jsx("div", {
|
|
32
|
+
className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
AlertDialogFooter.displayName = 'AlertDialogFooter';
|
|
36
|
+
const AlertDialogTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Title, {
|
|
37
|
+
ref: ref,
|
|
38
|
+
className: cn('text-lg font-semibold', className),
|
|
39
|
+
...props
|
|
40
|
+
}));
|
|
41
|
+
AlertDialogTitle.displayName = Title.displayName;
|
|
42
|
+
const AlertDialogDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Description, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
className: cn('text-sm text-muted-foreground', className),
|
|
45
|
+
...props
|
|
46
|
+
}));
|
|
47
|
+
AlertDialogDescription.displayName = Description.displayName;
|
|
48
|
+
const AlertDialogAction = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Action, {
|
|
49
|
+
ref: ref,
|
|
50
|
+
className: cn(buttonVariants(), className),
|
|
51
|
+
...props
|
|
52
|
+
}));
|
|
53
|
+
AlertDialogAction.displayName = Action.displayName;
|
|
54
|
+
const AlertDialogCancel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Cancel, {
|
|
55
|
+
ref: ref,
|
|
56
|
+
className: cn(buttonVariants({
|
|
57
|
+
variant: 'outline'
|
|
58
|
+
}), 'mt-2 sm:mt-0', className),
|
|
59
|
+
...props
|
|
60
|
+
}));
|
|
61
|
+
AlertDialogCancel.displayName = Cancel.displayName;
|
|
62
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
Alert: ()=>Alert,
|
|
28
|
+
AlertDescription: ()=>AlertDescription,
|
|
29
|
+
AlertTitle: ()=>AlertTitle
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_class_variance_authority_namespaceObject = require("class-variance-authority");
|
|
33
|
+
const external_react_namespaceObject = require("react");
|
|
34
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
35
|
+
const alertVariants = (0, external_class_variance_authority_namespaceObject.cva)('relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', {
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
default: 'bg-background text-foreground',
|
|
39
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: 'default'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const Alert = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, variant, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
47
|
+
ref: ref,
|
|
48
|
+
role: "alert",
|
|
49
|
+
className: (0, index_cjs_namespaceObject.cn)(alertVariants({
|
|
50
|
+
variant
|
|
51
|
+
}), className),
|
|
52
|
+
...props
|
|
53
|
+
}));
|
|
54
|
+
Alert.displayName = 'Alert';
|
|
55
|
+
const AlertTitle = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h5", {
|
|
56
|
+
ref: ref,
|
|
57
|
+
className: (0, index_cjs_namespaceObject.cn)('mb-1 font-medium leading-none tracking-tight', className),
|
|
58
|
+
...props
|
|
59
|
+
}));
|
|
60
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
61
|
+
const AlertDescription = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
62
|
+
ref: ref,
|
|
63
|
+
className: (0, index_cjs_namespaceObject.cn)('text-sm [&_p]:leading-relaxed', className),
|
|
64
|
+
...props
|
|
65
|
+
}));
|
|
66
|
+
AlertDescription.displayName = "AlertDescription";
|
|
67
|
+
exports.Alert = __webpack_exports__.Alert;
|
|
68
|
+
exports.AlertDescription = __webpack_exports__.AlertDescription;
|
|
69
|
+
exports.AlertTitle = __webpack_exports__.AlertTitle;
|
|
70
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
71
|
+
"Alert",
|
|
72
|
+
"AlertDescription",
|
|
73
|
+
"AlertTitle"
|
|
74
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
75
|
+
Object.defineProperty(exports, '__esModule', {
|
|
76
|
+
value: true
|
|
77
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
const alertVariants = cva('relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: 'bg-background text-foreground',
|
|
9
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
variant: 'default'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const Alert = /*#__PURE__*/ forwardRef(({ className, variant, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
17
|
+
ref: ref,
|
|
18
|
+
role: "alert",
|
|
19
|
+
className: cn(alertVariants({
|
|
20
|
+
variant
|
|
21
|
+
}), className),
|
|
22
|
+
...props
|
|
23
|
+
}));
|
|
24
|
+
Alert.displayName = 'Alert';
|
|
25
|
+
const AlertTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("h5", {
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: cn('mb-1 font-medium leading-none tracking-tight', className),
|
|
28
|
+
...props
|
|
29
|
+
}));
|
|
30
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
31
|
+
const AlertDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
32
|
+
ref: ref,
|
|
33
|
+
className: cn('text-sm [&_p]:leading-relaxed', className),
|
|
34
|
+
...props
|
|
35
|
+
}));
|
|
36
|
+
AlertDescription.displayName = "AlertDescription";
|
|
37
|
+
export { Alert, AlertDescription, AlertTitle };
|