@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,78 @@
|
|
|
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
|
+
spinnerVariants: ()=>spinnerVariants,
|
|
28
|
+
Spinner: ()=>Spinner
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const external_class_variance_authority_namespaceObject = require("class-variance-authority");
|
|
33
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
34
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
35
|
+
const spinnerVariants = (0, external_class_variance_authority_namespaceObject.cva)('animate-spin text-muted-foreground', {
|
|
36
|
+
variants: {
|
|
37
|
+
size: {
|
|
38
|
+
sm: 'h-4 w-4',
|
|
39
|
+
default: 'h-6 w-6',
|
|
40
|
+
lg: 'h-8 w-8',
|
|
41
|
+
xl: 'h-12 w-12'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: 'default'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const Spinner = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, size, label = 'Loading', showLabel = false, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
49
|
+
ref: ref,
|
|
50
|
+
role: "status",
|
|
51
|
+
"aria-label": label,
|
|
52
|
+
className: (0, index_cjs_namespaceObject.cn)('flex items-center justify-center gap-2', className),
|
|
53
|
+
...props,
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Loader2, {
|
|
56
|
+
className: (0, index_cjs_namespaceObject.cn)(spinnerVariants({
|
|
57
|
+
size
|
|
58
|
+
}))
|
|
59
|
+
}),
|
|
60
|
+
showLabel ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
61
|
+
className: "text-sm text-muted-foreground",
|
|
62
|
+
children: label
|
|
63
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
64
|
+
className: "sr-only",
|
|
65
|
+
children: label
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}));
|
|
69
|
+
Spinner.displayName = 'Spinner';
|
|
70
|
+
exports.Spinner = __webpack_exports__.Spinner;
|
|
71
|
+
exports.spinnerVariants = __webpack_exports__.spinnerVariants;
|
|
72
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
73
|
+
"Spinner",
|
|
74
|
+
"spinnerVariants"
|
|
75
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
76
|
+
Object.defineProperty(exports, '__esModule', {
|
|
77
|
+
value: true
|
|
78
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const spinnerVariants: (props?: ({
|
|
4
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
|
|
7
|
+
label?: string;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { Spinner, spinnerVariants };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { Loader2 } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
const spinnerVariants = cva('animate-spin text-muted-foreground', {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: 'h-4 w-4',
|
|
10
|
+
default: 'h-6 w-6',
|
|
11
|
+
lg: 'h-8 w-8',
|
|
12
|
+
xl: 'h-12 w-12'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: 'default'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const Spinner = /*#__PURE__*/ forwardRef(({ className, size, label = 'Loading', showLabel = false, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
role: "status",
|
|
22
|
+
"aria-label": label,
|
|
23
|
+
className: cn('flex items-center justify-center gap-2', className),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ jsx(Loader2, {
|
|
27
|
+
className: cn(spinnerVariants({
|
|
28
|
+
size
|
|
29
|
+
}))
|
|
30
|
+
}),
|
|
31
|
+
showLabel ? /*#__PURE__*/ jsx("span", {
|
|
32
|
+
className: "text-sm text-muted-foreground",
|
|
33
|
+
children: label
|
|
34
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
35
|
+
className: "sr-only",
|
|
36
|
+
children: label
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}));
|
|
40
|
+
Spinner.displayName = 'Spinner';
|
|
41
|
+
export { Spinner, spinnerVariants };
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
StatsCard: ()=>StatsCard
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const external_card_cjs_namespaceObject = require("./card.cjs");
|
|
33
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
34
|
+
const StatsCard = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ title, value, description, icon, trend, variant = 'default', className, ...props }, ref)=>{
|
|
35
|
+
const variantStyles = {
|
|
36
|
+
default: '',
|
|
37
|
+
primary: 'border-primary/20 bg-primary/5',
|
|
38
|
+
success: 'border-green-500/20 bg-green-500/5',
|
|
39
|
+
warning: 'border-yellow-500/20 bg-yellow-500/5',
|
|
40
|
+
danger: 'border-red-500/20 bg-red-500/5'
|
|
41
|
+
};
|
|
42
|
+
const trendDirection = trend?.direction || (trend && trend.value >= 0 ? 'up' : 'down');
|
|
43
|
+
const TrendIcon = 'up' === trendDirection ? external_lucide_react_namespaceObject.TrendingUp : external_lucide_react_namespaceObject.TrendingDown;
|
|
44
|
+
const trendColorClass = 'up' === trendDirection ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400';
|
|
45
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_card_cjs_namespaceObject.Card, {
|
|
46
|
+
ref: ref,
|
|
47
|
+
className: (0, index_cjs_namespaceObject.cn)(variantStyles[variant], className),
|
|
48
|
+
...props,
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_card_cjs_namespaceObject.CardHeader, {
|
|
51
|
+
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_card_cjs_namespaceObject.CardTitle, {
|
|
54
|
+
className: "text-sm font-medium",
|
|
55
|
+
children: title
|
|
56
|
+
}),
|
|
57
|
+
icon && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
58
|
+
className: "text-muted-foreground",
|
|
59
|
+
children: icon
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_card_cjs_namespaceObject.CardContent, {
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
66
|
+
className: "text-2xl font-bold",
|
|
67
|
+
children: value
|
|
68
|
+
}),
|
|
69
|
+
(description || trend) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
70
|
+
className: "mt-1 flex items-center gap-2 text-xs text-muted-foreground",
|
|
71
|
+
children: [
|
|
72
|
+
trend && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
73
|
+
className: (0, index_cjs_namespaceObject.cn)('flex items-center gap-1 font-medium', trendColorClass),
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TrendIcon, {
|
|
76
|
+
className: "h-3 w-3"
|
|
77
|
+
}),
|
|
78
|
+
Math.abs(trend.value),
|
|
79
|
+
"%"
|
|
80
|
+
]
|
|
81
|
+
}),
|
|
82
|
+
description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
83
|
+
children: description
|
|
84
|
+
}),
|
|
85
|
+
trend?.label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
86
|
+
children: trend.label
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
StatsCard.displayName = 'StatsCard';
|
|
96
|
+
exports.StatsCard = __webpack_exports__.StatsCard;
|
|
97
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
98
|
+
"StatsCard"
|
|
99
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
100
|
+
Object.defineProperty(exports, '__esModule', {
|
|
101
|
+
value: true
|
|
102
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface StatsCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
trend?: {
|
|
8
|
+
value: number;
|
|
9
|
+
label?: string;
|
|
10
|
+
direction?: 'up' | 'down';
|
|
11
|
+
};
|
|
12
|
+
variant?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
13
|
+
}
|
|
14
|
+
declare const StatsCard: React.ForwardRefExoticComponent<StatsCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export { StatsCard };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TrendingDown, TrendingUp } from "lucide-react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { Card, CardContent, CardHeader, CardTitle } from "./card.js";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
const StatsCard = /*#__PURE__*/ forwardRef(({ title, value, description, icon, trend, variant = 'default', className, ...props }, ref)=>{
|
|
7
|
+
const variantStyles = {
|
|
8
|
+
default: '',
|
|
9
|
+
primary: 'border-primary/20 bg-primary/5',
|
|
10
|
+
success: 'border-green-500/20 bg-green-500/5',
|
|
11
|
+
warning: 'border-yellow-500/20 bg-yellow-500/5',
|
|
12
|
+
danger: 'border-red-500/20 bg-red-500/5'
|
|
13
|
+
};
|
|
14
|
+
const trendDirection = trend?.direction || (trend && trend.value >= 0 ? 'up' : 'down');
|
|
15
|
+
const TrendIcon = 'up' === trendDirection ? TrendingUp : TrendingDown;
|
|
16
|
+
const trendColorClass = 'up' === trendDirection ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400';
|
|
17
|
+
return /*#__PURE__*/ jsxs(Card, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
className: cn(variantStyles[variant], className),
|
|
20
|
+
...props,
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsxs(CardHeader, {
|
|
23
|
+
className: "flex flex-row items-center justify-between space-y-0 pb-2",
|
|
24
|
+
children: [
|
|
25
|
+
/*#__PURE__*/ jsx(CardTitle, {
|
|
26
|
+
className: "text-sm font-medium",
|
|
27
|
+
children: title
|
|
28
|
+
}),
|
|
29
|
+
icon && /*#__PURE__*/ jsx("div", {
|
|
30
|
+
className: "text-muted-foreground",
|
|
31
|
+
children: icon
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ jsxs(CardContent, {
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ jsx("div", {
|
|
38
|
+
className: "text-2xl font-bold",
|
|
39
|
+
children: value
|
|
40
|
+
}),
|
|
41
|
+
(description || trend) && /*#__PURE__*/ jsxs("div", {
|
|
42
|
+
className: "mt-1 flex items-center gap-2 text-xs text-muted-foreground",
|
|
43
|
+
children: [
|
|
44
|
+
trend && /*#__PURE__*/ jsxs("span", {
|
|
45
|
+
className: cn('flex items-center gap-1 font-medium', trendColorClass),
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsx(TrendIcon, {
|
|
48
|
+
className: "h-3 w-3"
|
|
49
|
+
}),
|
|
50
|
+
Math.abs(trend.value),
|
|
51
|
+
"%"
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
description && /*#__PURE__*/ jsx("span", {
|
|
55
|
+
children: description
|
|
56
|
+
}),
|
|
57
|
+
trend?.label && /*#__PURE__*/ jsx("span", {
|
|
58
|
+
children: trend.label
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
StatsCard.displayName = 'StatsCard';
|
|
68
|
+
export { StatsCard };
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
Stepper: ()=>Stepper
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
const Stepper = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ steps, currentStep, orientation = 'horizontal', onStepClick, clickableSteps = false, className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: (0, index_cjs_namespaceObject.cn)('flex', 'horizontal' === orientation ? 'flex-row items-start' : 'flex-col', className),
|
|
36
|
+
...props,
|
|
37
|
+
children: steps.map((step, index)=>{
|
|
38
|
+
const isCompleted = index < currentStep;
|
|
39
|
+
const isCurrent = index === currentStep;
|
|
40
|
+
const isClickable = clickableSteps && index <= currentStep;
|
|
41
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
44
|
+
className: (0, index_cjs_namespaceObject.cn)('flex shrink-0', 'horizontal' === orientation ? 'flex-col items-center' : 'flex-row items-start', 'vertical' === orientation && 'w-full'),
|
|
45
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
46
|
+
className: (0, index_cjs_namespaceObject.cn)('flex', 'horizontal' === orientation ? 'flex-col items-center' : 'flex-row items-start gap-4'),
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
|
|
49
|
+
type: "button",
|
|
50
|
+
"aria-label": isCompleted ? `Step ${index + 1} completed: ${step.title}` : `Step ${index + 1}: ${step.title}`,
|
|
51
|
+
onClick: ()=>{
|
|
52
|
+
if (isClickable && onStepClick) onStepClick(index);
|
|
53
|
+
},
|
|
54
|
+
disabled: !isClickable,
|
|
55
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors', isCompleted && 'border-primary bg-primary text-primary-foreground', isCurrent && 'border-primary bg-background text-primary', !isCompleted && !isCurrent && 'border-muted-foreground/25 bg-background text-muted-foreground', isClickable && 'cursor-pointer hover:border-primary', !isClickable && 'cursor-not-allowed'),
|
|
56
|
+
children: isCompleted ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
|
|
57
|
+
className: "h-5 w-5"
|
|
58
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
59
|
+
children: index + 1
|
|
60
|
+
})
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
63
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col', 'horizontal' === orientation ? 'mt-2 items-center text-center' : 'flex-1 justify-center'),
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
66
|
+
className: (0, index_cjs_namespaceObject.cn)('text-sm font-medium', isCurrent && 'text-foreground', !isCurrent && 'text-muted-foreground'),
|
|
67
|
+
children: step.title
|
|
68
|
+
}),
|
|
69
|
+
step.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
70
|
+
className: "text-xs text-muted-foreground",
|
|
71
|
+
children: step.description
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
index < steps.length - 1 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
79
|
+
className: (0, index_cjs_namespaceObject.cn)('horizontal' === orientation ? 'mt-5 flex h-[2px] flex-1 items-center' : 'ml-5 h-8 w-[2px]', 'bg-muted'),
|
|
80
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
81
|
+
className: (0, index_cjs_namespaceObject.cn)('transition-all', 'horizontal' === orientation ? 'h-full' : 'w-full', isCompleted ? 'bg-primary' : 'bg-transparent'),
|
|
82
|
+
style: {
|
|
83
|
+
width: 'horizontal' === orientation ? isCompleted ? '100%' : '0%' : '100%',
|
|
84
|
+
height: 'vertical' === orientation ? isCompleted ? '100%' : '0%' : '100%'
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
}, index);
|
|
90
|
+
})
|
|
91
|
+
}));
|
|
92
|
+
Stepper.displayName = 'Stepper';
|
|
93
|
+
exports.Stepper = __webpack_exports__.Stepper;
|
|
94
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
95
|
+
"Stepper"
|
|
96
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
97
|
+
Object.defineProperty(exports, '__esModule', {
|
|
98
|
+
value: true
|
|
99
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface Step {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
steps: Step[];
|
|
8
|
+
currentStep: number;
|
|
9
|
+
orientation?: 'horizontal' | 'vertical';
|
|
10
|
+
onStepClick?: (step: number) => void;
|
|
11
|
+
clickableSteps?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { Stepper };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check } from "lucide-react";
|
|
3
|
+
import { Fragment, forwardRef } from "react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
const Stepper = /*#__PURE__*/ forwardRef(({ steps, currentStep, orientation = 'horizontal', onStepClick, clickableSteps = false, className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
6
|
+
ref: ref,
|
|
7
|
+
className: cn('flex', 'horizontal' === orientation ? 'flex-row items-start' : 'flex-col', className),
|
|
8
|
+
...props,
|
|
9
|
+
children: steps.map((step, index)=>{
|
|
10
|
+
const isCompleted = index < currentStep;
|
|
11
|
+
const isCurrent = index === currentStep;
|
|
12
|
+
const isClickable = clickableSteps && index <= currentStep;
|
|
13
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsx("div", {
|
|
16
|
+
className: cn('flex shrink-0', 'horizontal' === orientation ? 'flex-col items-center' : 'flex-row items-start', 'vertical' === orientation && 'w-full'),
|
|
17
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
18
|
+
className: cn('flex', 'horizontal' === orientation ? 'flex-col items-center' : 'flex-row items-start gap-4'),
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ jsx("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
"aria-label": isCompleted ? `Step ${index + 1} completed: ${step.title}` : `Step ${index + 1}: ${step.title}`,
|
|
23
|
+
onClick: ()=>{
|
|
24
|
+
if (isClickable && onStepClick) onStepClick(index);
|
|
25
|
+
},
|
|
26
|
+
disabled: !isClickable,
|
|
27
|
+
className: cn('flex h-10 w-10 shrink-0 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors', isCompleted && 'border-primary bg-primary text-primary-foreground', isCurrent && 'border-primary bg-background text-primary', !isCompleted && !isCurrent && 'border-muted-foreground/25 bg-background text-muted-foreground', isClickable && 'cursor-pointer hover:border-primary', !isClickable && 'cursor-not-allowed'),
|
|
28
|
+
children: isCompleted ? /*#__PURE__*/ jsx(Check, {
|
|
29
|
+
className: "h-5 w-5"
|
|
30
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
31
|
+
children: index + 1
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ jsxs("div", {
|
|
35
|
+
className: cn('flex flex-col', 'horizontal' === orientation ? 'mt-2 items-center text-center' : 'flex-1 justify-center'),
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ jsx("span", {
|
|
38
|
+
className: cn('text-sm font-medium', isCurrent && 'text-foreground', !isCurrent && 'text-muted-foreground'),
|
|
39
|
+
children: step.title
|
|
40
|
+
}),
|
|
41
|
+
step.description && /*#__PURE__*/ jsx("span", {
|
|
42
|
+
className: "text-xs text-muted-foreground",
|
|
43
|
+
children: step.description
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
})
|
|
49
|
+
}),
|
|
50
|
+
index < steps.length - 1 && /*#__PURE__*/ jsx("div", {
|
|
51
|
+
className: cn('horizontal' === orientation ? 'mt-5 flex h-[2px] flex-1 items-center' : 'ml-5 h-8 w-[2px]', 'bg-muted'),
|
|
52
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
53
|
+
className: cn('transition-all', 'horizontal' === orientation ? 'h-full' : 'w-full', isCompleted ? 'bg-primary' : 'bg-transparent'),
|
|
54
|
+
style: {
|
|
55
|
+
width: 'horizontal' === orientation ? isCompleted ? '100%' : '0%' : '100%',
|
|
56
|
+
height: 'vertical' === orientation ? isCompleted ? '100%' : '0%' : '100%'
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}, index);
|
|
62
|
+
})
|
|
63
|
+
}));
|
|
64
|
+
Stepper.displayName = 'Stepper';
|
|
65
|
+
export { Stepper };
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
Switch: ()=>Switch
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const react_switch_namespaceObject = require("@radix-ui/react-switch");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
32
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
33
|
+
const Switch = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Root, {
|
|
34
|
+
className: (0, index_cjs_namespaceObject.cn)('peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-border', className),
|
|
35
|
+
...props,
|
|
36
|
+
ref: ref,
|
|
37
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Thumb, {
|
|
38
|
+
className: (0, index_cjs_namespaceObject.cn)('pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0')
|
|
39
|
+
})
|
|
40
|
+
}));
|
|
41
|
+
Switch.displayName = react_switch_namespaceObject.Root.displayName;
|
|
42
|
+
exports.Switch = __webpack_exports__.Switch;
|
|
43
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
44
|
+
"Switch"
|
|
45
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
46
|
+
Object.defineProperty(exports, '__esModule', {
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Root, Thumb } from "@radix-ui/react-switch";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { cn } from "../../lib/index.js";
|
|
5
|
+
const Switch = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
6
|
+
className: cn('peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-border', className),
|
|
7
|
+
...props,
|
|
8
|
+
ref: ref,
|
|
9
|
+
children: /*#__PURE__*/ jsx(Thumb, {
|
|
10
|
+
className: cn('pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0')
|
|
11
|
+
})
|
|
12
|
+
}));
|
|
13
|
+
Switch.displayName = Root.displayName;
|
|
14
|
+
export { Switch };
|