@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,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
ScrollBar: ()=>ScrollBar,
|
|
29
|
+
ScrollArea: ()=>ScrollArea
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const react_scroll_area_namespaceObject = require("@radix-ui/react-scroll-area");
|
|
33
|
+
const external_react_namespaceObject = require("react");
|
|
34
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
35
|
+
const ScrollArea = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_scroll_area_namespaceObject.Root, {
|
|
36
|
+
ref: ref,
|
|
37
|
+
className: (0, index_cjs_namespaceObject.cn)('relative overflow-hidden', className),
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Viewport, {
|
|
41
|
+
className: "h-full w-full rounded-[inherit]",
|
|
42
|
+
children: children
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ScrollBar, {}),
|
|
45
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.Corner, {})
|
|
46
|
+
]
|
|
47
|
+
}));
|
|
48
|
+
ScrollArea.displayName = react_scroll_area_namespaceObject.Root.displayName;
|
|
49
|
+
const ScrollBar = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.ScrollAreaScrollbar, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
orientation: orientation,
|
|
52
|
+
className: (0, index_cjs_namespaceObject.cn)('flex touch-none select-none transition-colors', 'vertical' === orientation && 'h-full w-2.5 border-l border-l-transparent p-[1px]', 'horizontal' === orientation && 'h-2.5 flex-col border-t border-t-transparent p-[1px]', className),
|
|
53
|
+
...props,
|
|
54
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_scroll_area_namespaceObject.ScrollAreaThumb, {
|
|
55
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
56
|
+
})
|
|
57
|
+
}));
|
|
58
|
+
ScrollBar.displayName = react_scroll_area_namespaceObject.ScrollAreaScrollbar.displayName;
|
|
59
|
+
exports.ScrollArea = __webpack_exports__.ScrollArea;
|
|
60
|
+
exports.ScrollBar = __webpack_exports__.ScrollBar;
|
|
61
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
62
|
+
"ScrollArea",
|
|
63
|
+
"ScrollBar"
|
|
64
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
65
|
+
Object.defineProperty(exports, '__esModule', {
|
|
66
|
+
value: true
|
|
67
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Corner, Root, ScrollAreaScrollbar, ScrollAreaThumb, Viewport } from "@radix-ui/react-scroll-area";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
const ScrollArea = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Root, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: cn('relative overflow-hidden', className),
|
|
9
|
+
...props,
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ jsx(Viewport, {
|
|
12
|
+
className: "h-full w-full rounded-[inherit]",
|
|
13
|
+
children: children
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ jsx(ScrollBar, {}),
|
|
16
|
+
/*#__PURE__*/ jsx(Corner, {})
|
|
17
|
+
]
|
|
18
|
+
}));
|
|
19
|
+
ScrollArea.displayName = Root.displayName;
|
|
20
|
+
const ScrollBar = /*#__PURE__*/ forwardRef(({ className, orientation = 'vertical', ...props }, ref)=>/*#__PURE__*/ jsx(ScrollAreaScrollbar, {
|
|
21
|
+
ref: ref,
|
|
22
|
+
orientation: orientation,
|
|
23
|
+
className: cn('flex touch-none select-none transition-colors', 'vertical' === orientation && 'h-full w-2.5 border-l border-l-transparent p-[1px]', 'horizontal' === orientation && 'h-2.5 flex-col border-t border-t-transparent p-[1px]', className),
|
|
24
|
+
...props,
|
|
25
|
+
children: /*#__PURE__*/ jsx(ScrollAreaThumb, {
|
|
26
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
27
|
+
})
|
|
28
|
+
}));
|
|
29
|
+
ScrollBar.displayName = ScrollAreaScrollbar.displayName;
|
|
30
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
+
SearchWithSuggestions: ()=>SearchWithSuggestions,
|
|
28
|
+
Search: ()=>Search
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const external_button_cjs_namespaceObject = require("./button.cjs");
|
|
34
|
+
const external_command_cjs_namespaceObject = require("./command.cjs");
|
|
35
|
+
const external_input_cjs_namespaceObject = require("./input.cjs");
|
|
36
|
+
const external_popover_cjs_namespaceObject = require("./popover.cjs");
|
|
37
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
38
|
+
const Search = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, value, onChange, onClear, showClearButton = true, ...props }, ref)=>{
|
|
39
|
+
const handleClear = ()=>{
|
|
40
|
+
onChange?.('');
|
|
41
|
+
onClear?.();
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
44
|
+
className: "relative",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
47
|
+
className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_cjs_namespaceObject.Input, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
type: "search",
|
|
52
|
+
className: (0, index_cjs_namespaceObject.cn)('pl-8 pr-8', className),
|
|
53
|
+
value: value,
|
|
54
|
+
onChange: (e)=>onChange?.(e.target.value),
|
|
55
|
+
...props
|
|
56
|
+
}),
|
|
57
|
+
showClearButton && value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button, {
|
|
58
|
+
type: "button",
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
size: "icon",
|
|
61
|
+
className: "absolute right-0 top-0 h-full w-8 px-0 hover:bg-transparent",
|
|
62
|
+
onClick: handleClear,
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.X, {
|
|
65
|
+
className: "h-4 w-4"
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
68
|
+
className: "sr-only",
|
|
69
|
+
children: "Clear"
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
Search.displayName = 'Search';
|
|
77
|
+
const SearchWithSuggestions = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ value, onChange, placeholder = 'Search...', suggestions = [], onSelect, emptyMessage = 'No results found.', className }, ref)=>{
|
|
78
|
+
const [open, setOpen] = external_react_namespaceObject.useState(false);
|
|
79
|
+
const [searchValue, setSearchValue] = external_react_namespaceObject.useState(value || '');
|
|
80
|
+
external_react_namespaceObject.useEffect(()=>{
|
|
81
|
+
if (void 0 !== value) setSearchValue(value);
|
|
82
|
+
}, [
|
|
83
|
+
value
|
|
84
|
+
]);
|
|
85
|
+
const filteredSuggestions = suggestions.filter((suggestion)=>suggestion.toLowerCase().includes(searchValue.toLowerCase()));
|
|
86
|
+
const handleSelect = (selectedValue)=>{
|
|
87
|
+
setSearchValue(selectedValue);
|
|
88
|
+
onChange?.(selectedValue);
|
|
89
|
+
onSelect?.(selectedValue);
|
|
90
|
+
setOpen(false);
|
|
91
|
+
};
|
|
92
|
+
const handleInputChange = (newValue)=>{
|
|
93
|
+
setSearchValue(newValue);
|
|
94
|
+
onChange?.(newValue);
|
|
95
|
+
setOpen(newValue.length > 0);
|
|
96
|
+
};
|
|
97
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
98
|
+
ref: ref,
|
|
99
|
+
className: (0, index_cjs_namespaceObject.cn)('relative', className),
|
|
100
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
|
|
101
|
+
open: open && filteredSuggestions.length > 0,
|
|
102
|
+
onOpenChange: setOpen,
|
|
103
|
+
children: [
|
|
104
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
105
|
+
asChild: true,
|
|
106
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Search, {
|
|
108
|
+
value: searchValue,
|
|
109
|
+
onChange: handleInputChange,
|
|
110
|
+
onClear: ()=>{
|
|
111
|
+
setSearchValue('');
|
|
112
|
+
onChange?.('');
|
|
113
|
+
setOpen(false);
|
|
114
|
+
},
|
|
115
|
+
placeholder: placeholder
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
}),
|
|
119
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
120
|
+
className: "w-[--radix-popover-trigger-width] p-0",
|
|
121
|
+
align: "start",
|
|
122
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.Command, {
|
|
123
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandList, {
|
|
124
|
+
children: 0 === filteredSuggestions.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandEmpty, {
|
|
125
|
+
children: emptyMessage
|
|
126
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_command_cjs_namespaceObject.CommandGroup, {
|
|
127
|
+
children: filteredSuggestions.map((suggestion)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_command_cjs_namespaceObject.CommandItem, {
|
|
128
|
+
onSelect: ()=>handleSelect(suggestion),
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Search, {
|
|
131
|
+
className: "mr-2 h-4 w-4"
|
|
132
|
+
}),
|
|
133
|
+
suggestion
|
|
134
|
+
]
|
|
135
|
+
}, suggestion))
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
SearchWithSuggestions.displayName = 'SearchWithSuggestions';
|
|
145
|
+
exports.Search = __webpack_exports__.Search;
|
|
146
|
+
exports.SearchWithSuggestions = __webpack_exports__.SearchWithSuggestions;
|
|
147
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
148
|
+
"Search",
|
|
149
|
+
"SearchWithSuggestions"
|
|
150
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
151
|
+
Object.defineProperty(exports, '__esModule', {
|
|
152
|
+
value: true
|
|
153
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
onClear?: () => void;
|
|
6
|
+
showClearButton?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Search: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export interface SearchWithSuggestionsProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
suggestions?: string[];
|
|
14
|
+
onSelect?: (value: string) => void;
|
|
15
|
+
emptyMessage?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const SearchWithSuggestions: React.ForwardRefExoticComponent<SearchWithSuggestionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { Search, SearchWithSuggestions };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Search, X } from "lucide-react";
|
|
3
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { Command, CommandEmpty, CommandGroup, CommandItem, CommandList } from "./command.js";
|
|
6
|
+
import { Input } from "./input.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
|
+
import { cn } from "../../lib/index.js";
|
|
9
|
+
const search_Search = /*#__PURE__*/ forwardRef(({ className, value, onChange, onClear, showClearButton = true, ...props }, ref)=>{
|
|
10
|
+
const handleClear = ()=>{
|
|
11
|
+
onChange?.('');
|
|
12
|
+
onClear?.();
|
|
13
|
+
};
|
|
14
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
15
|
+
className: "relative",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsx(Search, {
|
|
18
|
+
className: "absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ jsx(Input, {
|
|
21
|
+
ref: ref,
|
|
22
|
+
type: "search",
|
|
23
|
+
className: cn('pl-8 pr-8', className),
|
|
24
|
+
value: value,
|
|
25
|
+
onChange: (e)=>onChange?.(e.target.value),
|
|
26
|
+
...props
|
|
27
|
+
}),
|
|
28
|
+
showClearButton && value && /*#__PURE__*/ jsxs(Button, {
|
|
29
|
+
type: "button",
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "icon",
|
|
32
|
+
className: "absolute right-0 top-0 h-full w-8 px-0 hover:bg-transparent",
|
|
33
|
+
onClick: handleClear,
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ jsx(X, {
|
|
36
|
+
className: "h-4 w-4"
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ jsx("span", {
|
|
39
|
+
className: "sr-only",
|
|
40
|
+
children: "Clear"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
search_Search.displayName = 'Search';
|
|
48
|
+
const SearchWithSuggestions = /*#__PURE__*/ forwardRef(({ value, onChange, placeholder = 'Search...', suggestions = [], onSelect, emptyMessage = 'No results found.', className }, ref)=>{
|
|
49
|
+
const [open, setOpen] = useState(false);
|
|
50
|
+
const [searchValue, setSearchValue] = useState(value || '');
|
|
51
|
+
useEffect(()=>{
|
|
52
|
+
if (void 0 !== value) setSearchValue(value);
|
|
53
|
+
}, [
|
|
54
|
+
value
|
|
55
|
+
]);
|
|
56
|
+
const filteredSuggestions = suggestions.filter((suggestion)=>suggestion.toLowerCase().includes(searchValue.toLowerCase()));
|
|
57
|
+
const handleSelect = (selectedValue)=>{
|
|
58
|
+
setSearchValue(selectedValue);
|
|
59
|
+
onChange?.(selectedValue);
|
|
60
|
+
onSelect?.(selectedValue);
|
|
61
|
+
setOpen(false);
|
|
62
|
+
};
|
|
63
|
+
const handleInputChange = (newValue)=>{
|
|
64
|
+
setSearchValue(newValue);
|
|
65
|
+
onChange?.(newValue);
|
|
66
|
+
setOpen(newValue.length > 0);
|
|
67
|
+
};
|
|
68
|
+
return /*#__PURE__*/ jsx("div", {
|
|
69
|
+
ref: ref,
|
|
70
|
+
className: cn('relative', className),
|
|
71
|
+
children: /*#__PURE__*/ jsxs(Popover, {
|
|
72
|
+
open: open && filteredSuggestions.length > 0,
|
|
73
|
+
onOpenChange: setOpen,
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ jsx(PopoverTrigger, {
|
|
76
|
+
asChild: true,
|
|
77
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
78
|
+
children: /*#__PURE__*/ jsx(search_Search, {
|
|
79
|
+
value: searchValue,
|
|
80
|
+
onChange: handleInputChange,
|
|
81
|
+
onClear: ()=>{
|
|
82
|
+
setSearchValue('');
|
|
83
|
+
onChange?.('');
|
|
84
|
+
setOpen(false);
|
|
85
|
+
},
|
|
86
|
+
placeholder: placeholder
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ jsx(PopoverContent, {
|
|
91
|
+
className: "w-[--radix-popover-trigger-width] p-0",
|
|
92
|
+
align: "start",
|
|
93
|
+
children: /*#__PURE__*/ jsx(Command, {
|
|
94
|
+
children: /*#__PURE__*/ jsx(CommandList, {
|
|
95
|
+
children: 0 === filteredSuggestions.length ? /*#__PURE__*/ jsx(CommandEmpty, {
|
|
96
|
+
children: emptyMessage
|
|
97
|
+
}) : /*#__PURE__*/ jsx(CommandGroup, {
|
|
98
|
+
children: filteredSuggestions.map((suggestion)=>/*#__PURE__*/ jsxs(CommandItem, {
|
|
99
|
+
onSelect: ()=>handleSelect(suggestion),
|
|
100
|
+
children: [
|
|
101
|
+
/*#__PURE__*/ jsx(Search, {
|
|
102
|
+
className: "mr-2 h-4 w-4"
|
|
103
|
+
}),
|
|
104
|
+
suggestion
|
|
105
|
+
]
|
|
106
|
+
}, suggestion))
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
SearchWithSuggestions.displayName = 'SearchWithSuggestions';
|
|
116
|
+
export { search_Search as Search, SearchWithSuggestions };
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
SelectItem: ()=>SelectItem,
|
|
28
|
+
SelectGroup: ()=>SelectGroup,
|
|
29
|
+
SelectLabel: ()=>SelectLabel,
|
|
30
|
+
SelectContent: ()=>SelectContent,
|
|
31
|
+
Select: ()=>Select,
|
|
32
|
+
SelectSeparator: ()=>SelectSeparator,
|
|
33
|
+
SelectTrigger: ()=>SelectTrigger,
|
|
34
|
+
SelectScrollUpButton: ()=>SelectScrollUpButton,
|
|
35
|
+
SelectScrollDownButton: ()=>SelectScrollDownButton,
|
|
36
|
+
SelectValue: ()=>SelectValue
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const react_select_namespaceObject = require("@radix-ui/react-select");
|
|
40
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
41
|
+
const external_react_namespaceObject = require("react");
|
|
42
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
43
|
+
const Select = react_select_namespaceObject.Root;
|
|
44
|
+
const SelectGroup = react_select_namespaceObject.Group;
|
|
45
|
+
const SelectValue = react_select_namespaceObject.Value;
|
|
46
|
+
const SelectTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Trigger, {
|
|
47
|
+
ref: ref,
|
|
48
|
+
className: (0, index_cjs_namespaceObject.cn)('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1', className),
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
children,
|
|
52
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Icon, {
|
|
53
|
+
asChild: true,
|
|
54
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
55
|
+
className: "h-4 w-4 opacity-50"
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}));
|
|
60
|
+
SelectTrigger.displayName = react_select_namespaceObject.Trigger.displayName;
|
|
61
|
+
const SelectScrollUpButton = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollUpButton, {
|
|
62
|
+
ref: ref,
|
|
63
|
+
className: (0, index_cjs_namespaceObject.cn)('flex cursor-default items-center justify-center py-1', className),
|
|
64
|
+
...props,
|
|
65
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUp, {
|
|
66
|
+
className: "h-4 w-4"
|
|
67
|
+
})
|
|
68
|
+
}));
|
|
69
|
+
SelectScrollUpButton.displayName = react_select_namespaceObject.ScrollUpButton.displayName;
|
|
70
|
+
const SelectScrollDownButton = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ScrollDownButton, {
|
|
71
|
+
ref: ref,
|
|
72
|
+
className: (0, index_cjs_namespaceObject.cn)('flex cursor-default items-center justify-center py-1', className),
|
|
73
|
+
...props,
|
|
74
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
75
|
+
className: "h-4 w-4"
|
|
76
|
+
})
|
|
77
|
+
}));
|
|
78
|
+
SelectScrollDownButton.displayName = react_select_namespaceObject.ScrollDownButton.displayName;
|
|
79
|
+
const SelectContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, position = 'popper', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Portal, {
|
|
80
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Content, {
|
|
81
|
+
ref: ref,
|
|
82
|
+
className: (0, index_cjs_namespaceObject.cn)('relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-select-content-transform-origin]', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
|
|
83
|
+
position: position,
|
|
84
|
+
...props,
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SelectScrollUpButton, {}),
|
|
87
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Viewport, {
|
|
88
|
+
className: (0, index_cjs_namespaceObject.cn)('p-1', 'popper' === position && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'),
|
|
89
|
+
children: children
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SelectScrollDownButton, {})
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
}));
|
|
95
|
+
SelectContent.displayName = react_select_namespaceObject.Content.displayName;
|
|
96
|
+
const SelectLabel = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Label, {
|
|
97
|
+
ref: ref,
|
|
98
|
+
className: (0, index_cjs_namespaceObject.cn)('py-1.5 pl-8 pr-2 text-sm font-semibold', className),
|
|
99
|
+
...props
|
|
100
|
+
}));
|
|
101
|
+
SelectLabel.displayName = react_select_namespaceObject.Label.displayName;
|
|
102
|
+
const SelectItem = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_select_namespaceObject.Item, {
|
|
103
|
+
ref: ref,
|
|
104
|
+
className: (0, index_cjs_namespaceObject.cn)('relative flex w-full 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),
|
|
105
|
+
...props,
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
108
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
109
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemIndicator, {
|
|
110
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
|
|
111
|
+
className: "h-4 w-4"
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.ItemText, {
|
|
116
|
+
children: children
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
}));
|
|
120
|
+
SelectItem.displayName = react_select_namespaceObject.Item.displayName;
|
|
121
|
+
const SelectSeparator = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_select_namespaceObject.Separator, {
|
|
122
|
+
ref: ref,
|
|
123
|
+
className: (0, index_cjs_namespaceObject.cn)('-mx-1 my-1 h-px bg-muted', className),
|
|
124
|
+
...props
|
|
125
|
+
}));
|
|
126
|
+
SelectSeparator.displayName = react_select_namespaceObject.Separator.displayName;
|
|
127
|
+
exports.Select = __webpack_exports__.Select;
|
|
128
|
+
exports.SelectContent = __webpack_exports__.SelectContent;
|
|
129
|
+
exports.SelectGroup = __webpack_exports__.SelectGroup;
|
|
130
|
+
exports.SelectItem = __webpack_exports__.SelectItem;
|
|
131
|
+
exports.SelectLabel = __webpack_exports__.SelectLabel;
|
|
132
|
+
exports.SelectScrollDownButton = __webpack_exports__.SelectScrollDownButton;
|
|
133
|
+
exports.SelectScrollUpButton = __webpack_exports__.SelectScrollUpButton;
|
|
134
|
+
exports.SelectSeparator = __webpack_exports__.SelectSeparator;
|
|
135
|
+
exports.SelectTrigger = __webpack_exports__.SelectTrigger;
|
|
136
|
+
exports.SelectValue = __webpack_exports__.SelectValue;
|
|
137
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
138
|
+
"Select",
|
|
139
|
+
"SelectContent",
|
|
140
|
+
"SelectGroup",
|
|
141
|
+
"SelectItem",
|
|
142
|
+
"SelectLabel",
|
|
143
|
+
"SelectScrollDownButton",
|
|
144
|
+
"SelectScrollUpButton",
|
|
145
|
+
"SelectSeparator",
|
|
146
|
+
"SelectTrigger",
|
|
147
|
+
"SelectValue"
|
|
148
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
149
|
+
Object.defineProperty(exports, '__esModule', {
|
|
150
|
+
value: true
|
|
151
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Content, Group, Icon, Item, ItemIndicator, ItemText, Label, Portal, Root, ScrollDownButton, ScrollUpButton, Separator, Trigger, Value, Viewport } from "@radix-ui/react-select";
|
|
3
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
const Select = Root;
|
|
7
|
+
const SelectGroup = Group;
|
|
8
|
+
const SelectValue = Value;
|
|
9
|
+
const SelectTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Trigger, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: cn('flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm [&>span]:line-clamp-1', className),
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
children,
|
|
15
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
16
|
+
asChild: true,
|
|
17
|
+
children: /*#__PURE__*/ jsx(ChevronDown, {
|
|
18
|
+
className: "h-4 w-4 opacity-50"
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
}));
|
|
23
|
+
SelectTrigger.displayName = Trigger.displayName;
|
|
24
|
+
const SelectScrollUpButton = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(ScrollUpButton, {
|
|
25
|
+
ref: ref,
|
|
26
|
+
className: cn('flex cursor-default items-center justify-center py-1', className),
|
|
27
|
+
...props,
|
|
28
|
+
children: /*#__PURE__*/ jsx(ChevronUp, {
|
|
29
|
+
className: "h-4 w-4"
|
|
30
|
+
})
|
|
31
|
+
}));
|
|
32
|
+
SelectScrollUpButton.displayName = ScrollUpButton.displayName;
|
|
33
|
+
const SelectScrollDownButton = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(ScrollDownButton, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: cn('flex cursor-default items-center justify-center py-1', className),
|
|
36
|
+
...props,
|
|
37
|
+
children: /*#__PURE__*/ jsx(ChevronDown, {
|
|
38
|
+
className: "h-4 w-4"
|
|
39
|
+
})
|
|
40
|
+
}));
|
|
41
|
+
SelectScrollDownButton.displayName = ScrollDownButton.displayName;
|
|
42
|
+
const SelectContent = /*#__PURE__*/ forwardRef(({ className, children, position = 'popper', ...props }, ref)=>/*#__PURE__*/ jsx(Portal, {
|
|
43
|
+
children: /*#__PURE__*/ jsxs(Content, {
|
|
44
|
+
ref: ref,
|
|
45
|
+
className: cn('relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-select-content-transform-origin]', 'popper' === position && 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className),
|
|
46
|
+
position: position,
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ jsx(SelectScrollUpButton, {}),
|
|
50
|
+
/*#__PURE__*/ jsx(Viewport, {
|
|
51
|
+
className: cn('p-1', 'popper' === position && 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'),
|
|
52
|
+
children: children
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ jsx(SelectScrollDownButton, {})
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
}));
|
|
58
|
+
SelectContent.displayName = Content.displayName;
|
|
59
|
+
const SelectLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Label, {
|
|
60
|
+
ref: ref,
|
|
61
|
+
className: cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className),
|
|
62
|
+
...props
|
|
63
|
+
}));
|
|
64
|
+
SelectLabel.displayName = Label.displayName;
|
|
65
|
+
const SelectItem = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(Item, {
|
|
66
|
+
ref: ref,
|
|
67
|
+
className: cn('relative flex w-full 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),
|
|
68
|
+
...props,
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsx("span", {
|
|
71
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
72
|
+
children: /*#__PURE__*/ jsx(ItemIndicator, {
|
|
73
|
+
children: /*#__PURE__*/ jsx(Check, {
|
|
74
|
+
className: "h-4 w-4"
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ jsx(ItemText, {
|
|
79
|
+
children: children
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}));
|
|
83
|
+
SelectItem.displayName = Item.displayName;
|
|
84
|
+
const SelectSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Separator, {
|
|
85
|
+
ref: ref,
|
|
86
|
+
className: cn('-mx-1 my-1 h-px bg-muted', className),
|
|
87
|
+
...props
|
|
88
|
+
}));
|
|
89
|
+
SelectSeparator.displayName = Separator.displayName;
|
|
90
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|