@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,239 @@
|
|
|
1
|
+
function getSpacingClass(value) {
|
|
2
|
+
if ('auto' === value) return 'auto';
|
|
3
|
+
if ('full' === value) return 'full';
|
|
4
|
+
return value.toString().replace('.', '_');
|
|
5
|
+
}
|
|
6
|
+
function spacingToRem(value) {
|
|
7
|
+
if ('auto' === value) return 'auto';
|
|
8
|
+
if ('full' === value) return '100%';
|
|
9
|
+
return `${0.25 * value}rem`;
|
|
10
|
+
}
|
|
11
|
+
function getSizeClass(value) {
|
|
12
|
+
if ('string' == typeof value) {
|
|
13
|
+
if ('auto' === value || 'full' === value || 'screen' === value || 'min' === value || 'max' === value || 'fit' === value) return value;
|
|
14
|
+
if (value.includes('%')) return `[${value}]`;
|
|
15
|
+
if (value.includes('/')) return value.replace('/', '\\/');
|
|
16
|
+
}
|
|
17
|
+
return getSpacingClass(value);
|
|
18
|
+
}
|
|
19
|
+
const alignMap = {
|
|
20
|
+
start: 'items-start',
|
|
21
|
+
center: 'items-center',
|
|
22
|
+
end: 'items-end',
|
|
23
|
+
baseline: 'items-baseline',
|
|
24
|
+
stretch: 'items-stretch'
|
|
25
|
+
};
|
|
26
|
+
const justifyMap = {
|
|
27
|
+
start: 'justify-start',
|
|
28
|
+
center: 'justify-center',
|
|
29
|
+
end: 'justify-end',
|
|
30
|
+
between: 'justify-between',
|
|
31
|
+
around: 'justify-around',
|
|
32
|
+
evenly: 'justify-evenly'
|
|
33
|
+
};
|
|
34
|
+
const wrapMap = {
|
|
35
|
+
nowrap: 'flex-nowrap',
|
|
36
|
+
wrap: 'flex-wrap',
|
|
37
|
+
'wrap-reverse': 'flex-wrap-reverse'
|
|
38
|
+
};
|
|
39
|
+
const directionMap = {
|
|
40
|
+
row: 'flex-row',
|
|
41
|
+
'row-reverse': 'flex-row-reverse',
|
|
42
|
+
column: 'flex-col',
|
|
43
|
+
'column-reverse': 'flex-col-reverse'
|
|
44
|
+
};
|
|
45
|
+
const overflowMap = {
|
|
46
|
+
auto: 'auto',
|
|
47
|
+
hidden: 'hidden',
|
|
48
|
+
clip: 'clip',
|
|
49
|
+
visible: 'visible',
|
|
50
|
+
scroll: 'scroll'
|
|
51
|
+
};
|
|
52
|
+
const positionMap = {
|
|
53
|
+
static: 'static',
|
|
54
|
+
relative: 'relative',
|
|
55
|
+
absolute: 'absolute',
|
|
56
|
+
fixed: 'fixed',
|
|
57
|
+
sticky: 'sticky'
|
|
58
|
+
};
|
|
59
|
+
function mapSpacingClass(prefix, value) {
|
|
60
|
+
const suffix = getSpacingClass(value);
|
|
61
|
+
return `${prefix}-${suffix}`;
|
|
62
|
+
}
|
|
63
|
+
function getSpacingClasses(props) {
|
|
64
|
+
const classes = [];
|
|
65
|
+
if (void 0 !== props.p) classes.push(mapSpacingClass('p', props.p));
|
|
66
|
+
if (void 0 !== props.pt) classes.push(mapSpacingClass('pt', props.pt));
|
|
67
|
+
if (void 0 !== props.pb) classes.push(mapSpacingClass('pb', props.pb));
|
|
68
|
+
if (void 0 !== props.pl) classes.push(mapSpacingClass('pl', props.pl));
|
|
69
|
+
if (void 0 !== props.pr) classes.push(mapSpacingClass('pr', props.pr));
|
|
70
|
+
if (void 0 !== props.px && void 0 === props.pl && void 0 === props.pr) classes.push(mapSpacingClass('px', props.px));
|
|
71
|
+
if (void 0 !== props.py && void 0 === props.pt && void 0 === props.pb) classes.push(mapSpacingClass('py', props.py));
|
|
72
|
+
if (void 0 !== props.m) classes.push(mapSpacingClass('m', props.m));
|
|
73
|
+
if (void 0 !== props.mt) classes.push(mapSpacingClass('mt', props.mt));
|
|
74
|
+
if (void 0 !== props.mb) classes.push(mapSpacingClass('mb', props.mb));
|
|
75
|
+
if (void 0 !== props.ml) classes.push(mapSpacingClass('ml', props.ml));
|
|
76
|
+
if (void 0 !== props.mr) classes.push(mapSpacingClass('mr', props.mr));
|
|
77
|
+
if (void 0 !== props.mx && void 0 === props.ml && void 0 === props.mr) classes.push(mapSpacingClass('mx', props.mx));
|
|
78
|
+
if (void 0 !== props.my && void 0 === props.mt && void 0 === props.mb) classes.push(mapSpacingClass('my', props.my));
|
|
79
|
+
return classes;
|
|
80
|
+
}
|
|
81
|
+
function getSizeClasses(props) {
|
|
82
|
+
const classes = [];
|
|
83
|
+
if (void 0 !== props.w) classes.push(`w-${getSizeClass(props.w)}`);
|
|
84
|
+
if (void 0 !== props.h) classes.push(`h-${getSizeClass(props.h)}`);
|
|
85
|
+
if (void 0 !== props.maxW) classes.push(`max-w-${getSizeClass(props.maxW)}`);
|
|
86
|
+
if (void 0 !== props.minW) classes.push(`min-w-${getSizeClass(props.minW)}`);
|
|
87
|
+
if (void 0 !== props.maxH) classes.push(`max-h-${getSizeClass(props.maxH)}`);
|
|
88
|
+
if (void 0 !== props.minH) classes.push(`min-h-${getSizeClass(props.minH)}`);
|
|
89
|
+
return classes;
|
|
90
|
+
}
|
|
91
|
+
function getFlexClasses(props) {
|
|
92
|
+
const classes = [
|
|
93
|
+
'flex'
|
|
94
|
+
];
|
|
95
|
+
if (void 0 !== props.direction) classes.push(directionMap[props.direction]);
|
|
96
|
+
if (void 0 !== props.align) classes.push(alignMap[props.align]);
|
|
97
|
+
if (void 0 !== props.justify) classes.push(justifyMap[props.justify]);
|
|
98
|
+
if (void 0 !== props.wrap) classes.push(wrapMap[props.wrap]);
|
|
99
|
+
if (void 0 !== props.gap) classes.push(`gap-${getSpacingClass(props.gap)}`);
|
|
100
|
+
if (void 0 !== props.flex) if ('number' == typeof props.flex) classes.push(`flex-${props.flex}`);
|
|
101
|
+
else if ('auto' === props.flex || 'initial' === props.flex || 'none' === props.flex) classes.push(`flex-${props.flex}`);
|
|
102
|
+
else classes.push(`flex-[${props.flex}]`);
|
|
103
|
+
return classes;
|
|
104
|
+
}
|
|
105
|
+
function getOverflowClasses(props) {
|
|
106
|
+
const classes = [];
|
|
107
|
+
if (void 0 !== props.overflow) classes.push(`overflow-${overflowMap[props.overflow]}`);
|
|
108
|
+
if (void 0 !== props.overflowX) classes.push(`overflow-x-${overflowMap[props.overflowX]}`);
|
|
109
|
+
if (void 0 !== props.overflowY) classes.push(`overflow-y-${overflowMap[props.overflowY]}`);
|
|
110
|
+
return classes;
|
|
111
|
+
}
|
|
112
|
+
function getPositionClasses(props) {
|
|
113
|
+
const classes = [];
|
|
114
|
+
if (void 0 !== props.position) classes.push(positionMap[props.position]);
|
|
115
|
+
return classes;
|
|
116
|
+
}
|
|
117
|
+
function getGridClasses(props) {
|
|
118
|
+
const classes = [
|
|
119
|
+
'grid'
|
|
120
|
+
];
|
|
121
|
+
if (void 0 !== props.cols) if ('number' == typeof props.cols) classes.push(`grid-cols-${props.cols}`);
|
|
122
|
+
else classes.push(`grid-cols-[${props.cols}]`);
|
|
123
|
+
if (void 0 !== props.rows) if ('number' == typeof props.rows) classes.push(`grid-rows-${props.rows}`);
|
|
124
|
+
else classes.push(`grid-rows-[${props.rows}]`);
|
|
125
|
+
if (void 0 !== props.gap) classes.push(`gap-${getSpacingClass(props.gap)}`);
|
|
126
|
+
if (void 0 !== props.autoFlow) classes.push(`grid-flow-${props.autoFlow}`);
|
|
127
|
+
if (void 0 !== props.autoCols) classes.push(`auto-cols-${props.autoCols}`);
|
|
128
|
+
if (void 0 !== props.autoRows) classes.push(`auto-rows-${props.autoRows}`);
|
|
129
|
+
return classes;
|
|
130
|
+
}
|
|
131
|
+
function buildLayoutClasses(props) {
|
|
132
|
+
return [
|
|
133
|
+
...getFlexClasses(props),
|
|
134
|
+
...getSpacingClasses(props),
|
|
135
|
+
...getSizeClasses(props),
|
|
136
|
+
...getOverflowClasses(props),
|
|
137
|
+
...getPositionClasses(props)
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
const alignToCSS = {
|
|
141
|
+
start: 'flex-start',
|
|
142
|
+
center: 'center',
|
|
143
|
+
end: 'flex-end',
|
|
144
|
+
baseline: 'baseline',
|
|
145
|
+
stretch: 'stretch'
|
|
146
|
+
};
|
|
147
|
+
const justifyToCSS = {
|
|
148
|
+
start: 'flex-start',
|
|
149
|
+
center: 'center',
|
|
150
|
+
end: 'flex-end',
|
|
151
|
+
between: 'space-between',
|
|
152
|
+
around: 'space-around',
|
|
153
|
+
evenly: 'space-evenly'
|
|
154
|
+
};
|
|
155
|
+
const wrapToCSS = {
|
|
156
|
+
nowrap: 'nowrap',
|
|
157
|
+
wrap: 'wrap',
|
|
158
|
+
'wrap-reverse': 'wrap-reverse'
|
|
159
|
+
};
|
|
160
|
+
const directionToCSS = {
|
|
161
|
+
row: 'row',
|
|
162
|
+
'row-reverse': 'row-reverse',
|
|
163
|
+
column: 'column',
|
|
164
|
+
'column-reverse': 'column-reverse'
|
|
165
|
+
};
|
|
166
|
+
function sizeToCSS(value) {
|
|
167
|
+
if ('auto' === value) return 'auto';
|
|
168
|
+
if ('full' === value) return '100%';
|
|
169
|
+
if ('screen' === value) return '100vw';
|
|
170
|
+
if ('min' === value) return 'min-content';
|
|
171
|
+
if ('max' === value) return 'max-content';
|
|
172
|
+
if ('fit' === value) return 'fit-content';
|
|
173
|
+
if ('string' == typeof value) {
|
|
174
|
+
if (value.includes('%')) return value;
|
|
175
|
+
if (value.includes('/')) {
|
|
176
|
+
const [num, denom] = value.split('/').map(Number);
|
|
177
|
+
return `${num / denom * 100}%`;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return `${0.25 * value}rem`;
|
|
181
|
+
}
|
|
182
|
+
function buildLayoutStyles(props) {
|
|
183
|
+
const styles = {
|
|
184
|
+
display: 'flex'
|
|
185
|
+
};
|
|
186
|
+
if (void 0 !== props.direction) styles.flexDirection = directionToCSS[props.direction];
|
|
187
|
+
if (void 0 !== props.align) styles.alignItems = alignToCSS[props.align];
|
|
188
|
+
if (void 0 !== props.justify) styles.justifyContent = justifyToCSS[props.justify];
|
|
189
|
+
if (void 0 !== props.wrap) styles.flexWrap = wrapToCSS[props.wrap];
|
|
190
|
+
if (void 0 !== props.gap) styles.gap = spacingToRem(props.gap);
|
|
191
|
+
if (void 0 !== props.flex) styles.flex = props.flex;
|
|
192
|
+
if (void 0 !== props.w) styles.width = sizeToCSS(props.w);
|
|
193
|
+
if (void 0 !== props.h) styles.height = sizeToCSS(props.h);
|
|
194
|
+
if (void 0 !== props.maxW) styles.maxWidth = sizeToCSS(props.maxW);
|
|
195
|
+
if (void 0 !== props.minW) styles.minWidth = sizeToCSS(props.minW);
|
|
196
|
+
if (void 0 !== props.maxH) styles.maxHeight = sizeToCSS(props.maxH);
|
|
197
|
+
if (void 0 !== props.minH) styles.minHeight = sizeToCSS(props.minH);
|
|
198
|
+
if (void 0 !== props.overflow) styles.overflow = props.overflow;
|
|
199
|
+
if (void 0 !== props.overflowX) styles.overflowX = props.overflowX;
|
|
200
|
+
if (void 0 !== props.overflowY) styles.overflowY = props.overflowY;
|
|
201
|
+
if (void 0 !== props.position) styles.position = props.position;
|
|
202
|
+
if (void 0 !== props.p) styles.padding = spacingToRem(props.p);
|
|
203
|
+
if (void 0 !== props.pt) styles.paddingTop = spacingToRem(props.pt);
|
|
204
|
+
if (void 0 !== props.pb) styles.paddingBottom = spacingToRem(props.pb);
|
|
205
|
+
if (void 0 !== props.pl) styles.paddingLeft = spacingToRem(props.pl);
|
|
206
|
+
if (void 0 !== props.pr) styles.paddingRight = spacingToRem(props.pr);
|
|
207
|
+
if (void 0 !== props.px) {
|
|
208
|
+
if (void 0 === props.pl) styles.paddingLeft = spacingToRem(props.px);
|
|
209
|
+
if (void 0 === props.pr) styles.paddingRight = spacingToRem(props.px);
|
|
210
|
+
}
|
|
211
|
+
if (void 0 !== props.py) {
|
|
212
|
+
if (void 0 === props.pt) styles.paddingTop = spacingToRem(props.py);
|
|
213
|
+
if (void 0 === props.pb) styles.paddingBottom = spacingToRem(props.py);
|
|
214
|
+
}
|
|
215
|
+
if (void 0 !== props.m) styles.margin = spacingToRem(props.m);
|
|
216
|
+
if (void 0 !== props.mt) styles.marginTop = spacingToRem(props.mt);
|
|
217
|
+
if (void 0 !== props.mb) styles.marginBottom = spacingToRem(props.mb);
|
|
218
|
+
if (void 0 !== props.ml) styles.marginLeft = spacingToRem(props.ml);
|
|
219
|
+
if (void 0 !== props.mr) styles.marginRight = spacingToRem(props.mr);
|
|
220
|
+
if (void 0 !== props.mx) {
|
|
221
|
+
if (void 0 === props.ml) styles.marginLeft = spacingToRem(props.mx);
|
|
222
|
+
if (void 0 === props.mr) styles.marginRight = spacingToRem(props.mx);
|
|
223
|
+
}
|
|
224
|
+
if (void 0 !== props.my) {
|
|
225
|
+
if (void 0 === props.mt) styles.marginTop = spacingToRem(props.my);
|
|
226
|
+
if (void 0 === props.mb) styles.marginBottom = spacingToRem(props.my);
|
|
227
|
+
}
|
|
228
|
+
return styles;
|
|
229
|
+
}
|
|
230
|
+
function buildGridLayoutClasses(props) {
|
|
231
|
+
return [
|
|
232
|
+
...getGridClasses(props),
|
|
233
|
+
...getSpacingClasses(props),
|
|
234
|
+
...getSizeClasses(props),
|
|
235
|
+
...getOverflowClasses(props),
|
|
236
|
+
...getPositionClasses(props)
|
|
237
|
+
];
|
|
238
|
+
}
|
|
239
|
+
export { alignMap, buildGridLayoutClasses, buildLayoutClasses, buildLayoutStyles, directionMap, getFlexClasses, getGridClasses, getOverflowClasses, getPositionClasses, getSizeClass, getSizeClasses, getSpacingClass, getSpacingClasses, justifyMap, overflowMap, positionMap, spacingToRem, wrapMap };
|
|
@@ -0,0 +1,210 @@
|
|
|
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
|
+
MenubarPortal: ()=>MenubarPortal,
|
|
28
|
+
MenubarSeparator: ()=>MenubarSeparator,
|
|
29
|
+
MenubarGroup: ()=>MenubarGroup,
|
|
30
|
+
MenubarRadioItem: ()=>MenubarRadioItem,
|
|
31
|
+
Menubar: ()=>Menubar,
|
|
32
|
+
MenubarLabel: ()=>MenubarLabel,
|
|
33
|
+
MenubarContent: ()=>MenubarContent,
|
|
34
|
+
MenubarCheckboxItem: ()=>MenubarCheckboxItem,
|
|
35
|
+
MenubarItem: ()=>MenubarItem,
|
|
36
|
+
MenubarShortcut: ()=>MenubarShortcut,
|
|
37
|
+
MenubarSubContent: ()=>MenubarSubContent,
|
|
38
|
+
MenubarTrigger: ()=>MenubarTrigger,
|
|
39
|
+
MenubarMenu: ()=>MenubarMenu,
|
|
40
|
+
MenubarSub: ()=>MenubarSub,
|
|
41
|
+
MenubarRadioGroup: ()=>MenubarRadioGroup,
|
|
42
|
+
MenubarSubTrigger: ()=>MenubarSubTrigger
|
|
43
|
+
});
|
|
44
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
+
const react_menubar_namespaceObject = require("@radix-ui/react-menubar");
|
|
46
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
47
|
+
const external_react_namespaceObject = require("react");
|
|
48
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
49
|
+
function MenubarMenu({ ...props }) {
|
|
50
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Menu, {
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function MenubarGroup({ ...props }) {
|
|
55
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Group, {
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function MenubarPortal({ ...props }) {
|
|
60
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Portal, {
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function MenubarRadioGroup({ ...props }) {
|
|
65
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.RadioGroup, {
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function MenubarSub({ ...props }) {
|
|
70
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Sub, {
|
|
71
|
+
"data-slot": "menubar-sub",
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const Menubar = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Root, {
|
|
76
|
+
ref: ref,
|
|
77
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-10 items-center space-x-1 rounded-md border bg-background p-1', className),
|
|
78
|
+
...props
|
|
79
|
+
}));
|
|
80
|
+
Menubar.displayName = react_menubar_namespaceObject.Root.displayName;
|
|
81
|
+
const MenubarTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Trigger, {
|
|
82
|
+
ref: ref,
|
|
83
|
+
className: (0, index_cjs_namespaceObject.cn)('flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', className),
|
|
84
|
+
...props
|
|
85
|
+
}));
|
|
86
|
+
MenubarTrigger.displayName = react_menubar_namespaceObject.Trigger.displayName;
|
|
87
|
+
const MenubarSubTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, inset, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_menubar_namespaceObject.SubTrigger, {
|
|
88
|
+
ref: ref,
|
|
89
|
+
className: (0, index_cjs_namespaceObject.cn)('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', inset && 'pl-8', className),
|
|
90
|
+
...props,
|
|
91
|
+
children: [
|
|
92
|
+
children,
|
|
93
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronRight, {
|
|
94
|
+
className: "ml-auto h-4 w-4"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}));
|
|
98
|
+
MenubarSubTrigger.displayName = react_menubar_namespaceObject.SubTrigger.displayName;
|
|
99
|
+
const MenubarSubContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.SubContent, {
|
|
100
|
+
ref: ref,
|
|
101
|
+
className: (0, index_cjs_namespaceObject.cn)('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]', className),
|
|
102
|
+
...props
|
|
103
|
+
}));
|
|
104
|
+
MenubarSubContent.displayName = react_menubar_namespaceObject.SubContent.displayName;
|
|
105
|
+
const MenubarContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Portal, {
|
|
106
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Content, {
|
|
107
|
+
ref: ref,
|
|
108
|
+
align: align,
|
|
109
|
+
alignOffset: alignOffset,
|
|
110
|
+
sideOffset: sideOffset,
|
|
111
|
+
className: (0, index_cjs_namespaceObject.cn)('z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]', className),
|
|
112
|
+
...props
|
|
113
|
+
})
|
|
114
|
+
}));
|
|
115
|
+
MenubarContent.displayName = react_menubar_namespaceObject.Content.displayName;
|
|
116
|
+
const MenubarItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Item, {
|
|
117
|
+
ref: ref,
|
|
118
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className),
|
|
119
|
+
...props
|
|
120
|
+
}));
|
|
121
|
+
MenubarItem.displayName = react_menubar_namespaceObject.Item.displayName;
|
|
122
|
+
const MenubarCheckboxItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, checked, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_menubar_namespaceObject.CheckboxItem, {
|
|
123
|
+
ref: ref,
|
|
124
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className),
|
|
125
|
+
checked: checked,
|
|
126
|
+
...props,
|
|
127
|
+
children: [
|
|
128
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
129
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
130
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.ItemIndicator, {
|
|
131
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
|
|
132
|
+
className: "h-4 w-4"
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
children
|
|
137
|
+
]
|
|
138
|
+
}));
|
|
139
|
+
MenubarCheckboxItem.displayName = react_menubar_namespaceObject.CheckboxItem.displayName;
|
|
140
|
+
const MenubarRadioItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_menubar_namespaceObject.RadioItem, {
|
|
141
|
+
ref: ref,
|
|
142
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className),
|
|
143
|
+
...props,
|
|
144
|
+
children: [
|
|
145
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
146
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
147
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.ItemIndicator, {
|
|
148
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Circle, {
|
|
149
|
+
className: "h-2 w-2 fill-current"
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
}),
|
|
153
|
+
children
|
|
154
|
+
]
|
|
155
|
+
}));
|
|
156
|
+
MenubarRadioItem.displayName = react_menubar_namespaceObject.RadioItem.displayName;
|
|
157
|
+
const MenubarLabel = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Label, {
|
|
158
|
+
ref: ref,
|
|
159
|
+
className: (0, index_cjs_namespaceObject.cn)('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className),
|
|
160
|
+
...props
|
|
161
|
+
}));
|
|
162
|
+
MenubarLabel.displayName = react_menubar_namespaceObject.Label.displayName;
|
|
163
|
+
const MenubarSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_menubar_namespaceObject.Separator, {
|
|
164
|
+
ref: ref,
|
|
165
|
+
className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-muted', className),
|
|
166
|
+
...props
|
|
167
|
+
}));
|
|
168
|
+
MenubarSeparator.displayName = react_menubar_namespaceObject.Separator.displayName;
|
|
169
|
+
const MenubarShortcut = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
170
|
+
className: (0, index_cjs_namespaceObject.cn)('ml-auto text-xs tracking-widest text-muted-foreground', className),
|
|
171
|
+
...props
|
|
172
|
+
});
|
|
173
|
+
MenubarShortcut.displayname = 'MenubarShortcut';
|
|
174
|
+
exports.Menubar = __webpack_exports__.Menubar;
|
|
175
|
+
exports.MenubarCheckboxItem = __webpack_exports__.MenubarCheckboxItem;
|
|
176
|
+
exports.MenubarContent = __webpack_exports__.MenubarContent;
|
|
177
|
+
exports.MenubarGroup = __webpack_exports__.MenubarGroup;
|
|
178
|
+
exports.MenubarItem = __webpack_exports__.MenubarItem;
|
|
179
|
+
exports.MenubarLabel = __webpack_exports__.MenubarLabel;
|
|
180
|
+
exports.MenubarMenu = __webpack_exports__.MenubarMenu;
|
|
181
|
+
exports.MenubarPortal = __webpack_exports__.MenubarPortal;
|
|
182
|
+
exports.MenubarRadioGroup = __webpack_exports__.MenubarRadioGroup;
|
|
183
|
+
exports.MenubarRadioItem = __webpack_exports__.MenubarRadioItem;
|
|
184
|
+
exports.MenubarSeparator = __webpack_exports__.MenubarSeparator;
|
|
185
|
+
exports.MenubarShortcut = __webpack_exports__.MenubarShortcut;
|
|
186
|
+
exports.MenubarSub = __webpack_exports__.MenubarSub;
|
|
187
|
+
exports.MenubarSubContent = __webpack_exports__.MenubarSubContent;
|
|
188
|
+
exports.MenubarSubTrigger = __webpack_exports__.MenubarSubTrigger;
|
|
189
|
+
exports.MenubarTrigger = __webpack_exports__.MenubarTrigger;
|
|
190
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
191
|
+
"Menubar",
|
|
192
|
+
"MenubarCheckboxItem",
|
|
193
|
+
"MenubarContent",
|
|
194
|
+
"MenubarGroup",
|
|
195
|
+
"MenubarItem",
|
|
196
|
+
"MenubarLabel",
|
|
197
|
+
"MenubarMenu",
|
|
198
|
+
"MenubarPortal",
|
|
199
|
+
"MenubarRadioGroup",
|
|
200
|
+
"MenubarRadioItem",
|
|
201
|
+
"MenubarSeparator",
|
|
202
|
+
"MenubarShortcut",
|
|
203
|
+
"MenubarSub",
|
|
204
|
+
"MenubarSubContent",
|
|
205
|
+
"MenubarSubTrigger",
|
|
206
|
+
"MenubarTrigger"
|
|
207
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
208
|
+
Object.defineProperty(exports, '__esModule', {
|
|
209
|
+
value: true
|
|
210
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const MenubarShortcut: {
|
|
25
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayname: string;
|
|
27
|
+
};
|
|
28
|
+
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger } from "@radix-ui/react-menubar";
|
|
3
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
function MenubarMenu({ ...props }) {
|
|
7
|
+
return /*#__PURE__*/ jsx(Menu, {
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function MenubarGroup({ ...props }) {
|
|
12
|
+
return /*#__PURE__*/ jsx(Group, {
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function MenubarPortal({ ...props }) {
|
|
17
|
+
return /*#__PURE__*/ jsx(Portal, {
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function MenubarRadioGroup({ ...props }) {
|
|
22
|
+
return /*#__PURE__*/ jsx(RadioGroup, {
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function MenubarSub({ ...props }) {
|
|
27
|
+
return /*#__PURE__*/ jsx(Sub, {
|
|
28
|
+
"data-slot": "menubar-sub",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const Menubar = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: cn('flex h-10 items-center space-x-1 rounded-md border bg-background p-1', className),
|
|
35
|
+
...props
|
|
36
|
+
}));
|
|
37
|
+
Menubar.displayName = Root.displayName;
|
|
38
|
+
const MenubarTrigger = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Trigger, {
|
|
39
|
+
ref: ref,
|
|
40
|
+
className: cn('flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', className),
|
|
41
|
+
...props
|
|
42
|
+
}));
|
|
43
|
+
MenubarTrigger.displayName = Trigger.displayName;
|
|
44
|
+
const MenubarSubTrigger = /*#__PURE__*/ forwardRef(({ className, inset, children, ...props }, ref)=>/*#__PURE__*/ jsxs(SubTrigger, {
|
|
45
|
+
ref: ref,
|
|
46
|
+
className: cn('flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', inset && 'pl-8', className),
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
children,
|
|
50
|
+
/*#__PURE__*/ jsx(ChevronRight, {
|
|
51
|
+
className: "ml-auto h-4 w-4"
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}));
|
|
55
|
+
MenubarSubTrigger.displayName = SubTrigger.displayName;
|
|
56
|
+
const MenubarSubContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(SubContent, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]', className),
|
|
59
|
+
...props
|
|
60
|
+
}));
|
|
61
|
+
MenubarSubContent.displayName = SubContent.displayName;
|
|
62
|
+
const MenubarContent = /*#__PURE__*/ forwardRef(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref)=>/*#__PURE__*/ jsx(Portal, {
|
|
63
|
+
children: /*#__PURE__*/ jsx(Content, {
|
|
64
|
+
ref: ref,
|
|
65
|
+
align: align,
|
|
66
|
+
alignOffset: alignOffset,
|
|
67
|
+
sideOffset: sideOffset,
|
|
68
|
+
className: cn('z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-menubar-content-transform-origin]', className),
|
|
69
|
+
...props
|
|
70
|
+
})
|
|
71
|
+
}));
|
|
72
|
+
MenubarContent.displayName = Content.displayName;
|
|
73
|
+
const MenubarItem = /*#__PURE__*/ forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ jsx(Item, {
|
|
74
|
+
ref: ref,
|
|
75
|
+
className: cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className),
|
|
76
|
+
...props
|
|
77
|
+
}));
|
|
78
|
+
MenubarItem.displayName = Item.displayName;
|
|
79
|
+
const MenubarCheckboxItem = /*#__PURE__*/ forwardRef(({ className, children, checked, ...props }, ref)=>/*#__PURE__*/ jsxs(CheckboxItem, {
|
|
80
|
+
ref: ref,
|
|
81
|
+
className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className),
|
|
82
|
+
checked: checked,
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
/*#__PURE__*/ jsx("span", {
|
|
86
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
87
|
+
children: /*#__PURE__*/ jsx(ItemIndicator, {
|
|
88
|
+
children: /*#__PURE__*/ jsx(Check, {
|
|
89
|
+
className: "h-4 w-4"
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
children
|
|
94
|
+
]
|
|
95
|
+
}));
|
|
96
|
+
MenubarCheckboxItem.displayName = CheckboxItem.displayName;
|
|
97
|
+
const MenubarRadioItem = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(RadioItem, {
|
|
98
|
+
ref: ref,
|
|
99
|
+
className: cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className),
|
|
100
|
+
...props,
|
|
101
|
+
children: [
|
|
102
|
+
/*#__PURE__*/ jsx("span", {
|
|
103
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
104
|
+
children: /*#__PURE__*/ jsx(ItemIndicator, {
|
|
105
|
+
children: /*#__PURE__*/ jsx(Circle, {
|
|
106
|
+
className: "h-2 w-2 fill-current"
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
children
|
|
111
|
+
]
|
|
112
|
+
}));
|
|
113
|
+
MenubarRadioItem.displayName = RadioItem.displayName;
|
|
114
|
+
const MenubarLabel = /*#__PURE__*/ forwardRef(({ className, inset, ...props }, ref)=>/*#__PURE__*/ jsx(Label, {
|
|
115
|
+
ref: ref,
|
|
116
|
+
className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className),
|
|
117
|
+
...props
|
|
118
|
+
}));
|
|
119
|
+
MenubarLabel.displayName = Label.displayName;
|
|
120
|
+
const MenubarSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
|
|
121
|
+
ref: ref,
|
|
122
|
+
className: cn('-mx-1 my-1 h-px bg-muted', className),
|
|
123
|
+
...props
|
|
124
|
+
}));
|
|
125
|
+
MenubarSeparator.displayName = Separator.displayName;
|
|
126
|
+
const MenubarShortcut = ({ className, ...props })=>/*#__PURE__*/ jsx("span", {
|
|
127
|
+
className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className),
|
|
128
|
+
...props
|
|
129
|
+
});
|
|
130
|
+
MenubarShortcut.displayname = 'MenubarShortcut';
|
|
131
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|