@oneplatformdev/ui 0.0.1-beta.100
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/Accordion/Accordion.d.ts +9 -0
- package/Accordion/Accordion.mjs +49 -0
- package/Accordion/index.d.ts +1 -0
- package/Accordion/index.mjs +7 -0
- package/Accordion/package.json +7 -0
- package/Alert/Alert.d.ts +7 -0
- package/Alert/Alert.mjs +37 -0
- package/Alert/alertVariants.d.ts +4 -0
- package/Alert/alertVariants.mjs +19 -0
- package/Alert/index.d.ts +1 -0
- package/Alert/index.mjs +6 -0
- package/Alert/package.json +7 -0
- package/AlertDialog/AlertDialog.d.ts +65 -0
- package/AlertDialog/AlertDialog.mjs +97 -0
- package/AlertDialog/AlertDialog.types.d.ts +53 -0
- package/AlertDialog/AlertDialogRoot.d.ts +21 -0
- package/AlertDialog/AlertDialogRoot.mjs +114 -0
- package/AlertDialog/index.d.ts +3 -0
- package/AlertDialog/index.mjs +16 -0
- package/AlertDialog/package.json +7 -0
- package/AreaChart/AreaChart.d.ts +4 -0
- package/AreaChart/AreaChart.mjs +27 -0
- package/AreaChart/AreaChart.types.d.ts +15 -0
- package/AreaChart/index.d.ts +2 -0
- package/AreaChart/index.mjs +4 -0
- package/AreaChart/package.json +7 -0
- package/Aside/Aside.d.ts +4 -0
- package/Aside/Aside.mjs +23 -0
- package/Aside/Aside.types.d.ts +18 -0
- package/Aside/AsideSidebar.d.ts +3 -0
- package/Aside/AsideSidebar.mjs +37 -0
- package/Aside/index.d.ts +3 -0
- package/Aside/index.mjs +7 -0
- package/Aside/package.json +7 -0
- package/AspectRatio/AspectRatio.d.ts +2 -0
- package/AspectRatio/AspectRatio.mjs +5 -0
- package/AspectRatio/index.d.ts +1 -0
- package/AspectRatio/index.mjs +5 -0
- package/AspectRatio/package.json +7 -0
- package/Avatar/Avatar.d.ts +5 -0
- package/Avatar/Avatar.mjs +42 -0
- package/Avatar/index.d.ts +1 -0
- package/Avatar/index.mjs +6 -0
- package/Avatar/package.json +7 -0
- package/Badge/Badge.d.ts +5 -0
- package/Badge/Badge.mjs +10 -0
- package/Badge/Badge.types.d.ts +5 -0
- package/Badge/badgeVariants.d.ts +3 -0
- package/Badge/badgeVariants.mjs +20 -0
- package/Badge/index.d.ts +3 -0
- package/Badge/index.mjs +6 -0
- package/Badge/package.json +7 -0
- package/Breadcrumb/Breadcrumb.d.ts +19 -0
- package/Breadcrumb/Breadcrumb.mjs +90 -0
- package/Breadcrumb/index.d.ts +1 -0
- package/Breadcrumb/index.mjs +10 -0
- package/Breadcrumb/package.json +7 -0
- package/Button/Button.d.ts +4 -0
- package/Button/Button.mjs +32 -0
- package/Button/Button.types.d.ts +8 -0
- package/Button/buttonVariants.d.ts +4 -0
- package/Button/buttonVariants.mjs +29 -0
- package/Button/index.d.ts +3 -0
- package/Button/index.mjs +7 -0
- package/Button/package.json +7 -0
- package/ButtonIcon/ButtonIcon.d.ts +3 -0
- package/ButtonIcon/ButtonIcon.mjs +29 -0
- package/ButtonIcon/ButtonIcon.types.d.ts +7 -0
- package/ButtonIcon/buttonIconVariants.d.ts +7 -0
- package/ButtonIcon/buttonIconVariants.mjs +139 -0
- package/ButtonIcon/index.d.ts +3 -0
- package/ButtonIcon/index.mjs +7 -0
- package/ButtonIcon/package.json +7 -0
- package/Calendar/Calendar.d.ts +8 -0
- package/Calendar/Calendar.mjs +64 -0
- package/Calendar/index.d.ts +1 -0
- package/Calendar/index.mjs +4 -0
- package/Calendar/package.json +7 -0
- package/Card/Card.d.ts +8 -0
- package/Card/Card.mjs +61 -0
- package/Card/index.d.ts +1 -0
- package/Card/index.mjs +9 -0
- package/Card/package.json +7 -0
- package/Carousel/Carousel.d.ts +18 -0
- package/Carousel/Carousel.mjs +168 -0
- package/Carousel/index.d.ts +1 -0
- package/Carousel/index.mjs +8 -0
- package/Carousel/package.json +7 -0
- package/Chart/Chart.d.ts +62 -0
- package/Chart/Chart.mjs +210 -0
- package/Chart/index.d.ts +1 -0
- package/Chart/index.mjs +9 -0
- package/Chart/package.json +7 -0
- package/Checkbox/Checkbox.d.ts +5 -0
- package/Checkbox/Checkbox.mjs +54 -0
- package/Checkbox/Checkbox.types.d.ts +10 -0
- package/Checkbox/index.d.ts +2 -0
- package/Checkbox/index.mjs +5 -0
- package/Checkbox/package.json +7 -0
- package/Collapsible/Collapsible.d.ts +5 -0
- package/Collapsible/Collapsible.mjs +7 -0
- package/Collapsible/index.d.ts +1 -0
- package/Collapsible/index.mjs +6 -0
- package/Collapsible/package.json +7 -0
- package/Combobox/Combobox.d.ts +4 -0
- package/Combobox/Combobox.mjs +15 -0
- package/Combobox/Combobox.types.d.ts +38 -0
- package/Combobox/ComboboxOptionItem.d.ts +5 -0
- package/Combobox/ComboboxOptionItem.mjs +67 -0
- package/Combobox/ComboboxOptions.d.ts +4 -0
- package/Combobox/ComboboxOptions.mjs +12 -0
- package/Combobox/index.d.ts +2 -0
- package/Combobox/index.mjs +4 -0
- package/Combobox/package.json +7 -0
- package/Combobox-Dfbnw0oF.js +303 -0
- package/Command/Command.d.ts +80 -0
- package/Command/Command.mjs +116 -0
- package/Command/index.d.ts +1 -0
- package/Command/index.mjs +12 -0
- package/Command/package.json +7 -0
- package/DataTable/DataTable.d.ts +11 -0
- package/DataTable/DataTable.mjs +64 -0
- package/DataTable/DataTable.types.d.ts +11 -0
- package/DataTable/DataTableColumnFilter.d.ts +4 -0
- package/DataTable/DataTableColumnFilter.mjs +31 -0
- package/DataTable/index.d.ts +2 -0
- package/DataTable/index.mjs +4 -0
- package/DataTable/package.json +7 -0
- package/DataTable/useDataTable.d.ts +3 -0
- package/DataTable/useDataTable.mjs +30 -0
- package/DatePicker/DatePicker.d.ts +3 -0
- package/DatePicker/DatePicker.mjs +699 -0
- package/DatePicker/DatePicker.types.d.ts +5 -0
- package/DatePicker/index.d.ts +3 -0
- package/DatePicker/index.mjs +5 -0
- package/DatePicker/package.json +7 -0
- package/Dialog/Dialog.d.ts +21 -0
- package/Dialog/Dialog.mjs +117 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.mjs +13 -0
- package/Dialog/package.json +7 -0
- package/Drawer/Drawer.d.ts +22 -0
- package/Drawer/Drawer.mjs +98 -0
- package/Drawer/index.d.ts +1 -0
- package/Drawer/index.mjs +13 -0
- package/Drawer/package.json +7 -0
- package/DropdownMenu/DropdownMenu.d.ts +27 -0
- package/DropdownMenu/DropdownMenu.mjs +148 -0
- package/DropdownMenu/index.d.ts +1 -0
- package/DropdownMenu/index.mjs +18 -0
- package/DropdownMenu/package.json +7 -0
- package/Dropzone/Dropzone.d.ts +22 -0
- package/Dropzone/Dropzone.mjs +152 -0
- package/Dropzone/Dropzone.types.d.ts +42 -0
- package/Dropzone/DropzoneFilePreview.d.ts +4 -0
- package/Dropzone/DropzoneFilePreview.mjs +9 -0
- package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
- package/Dropzone/DropzoneSinglePickPreview.mjs +41 -0
- package/Dropzone/DropzoneUtils.d.ts +5 -0
- package/Dropzone/DropzoneUtils.mjs +24 -0
- package/Dropzone/index.d.ts +2 -0
- package/Dropzone/index.mjs +7 -0
- package/Dropzone/package.json +7 -0
- package/DropzoneFilePreview-Dhtv8F4u.js +67 -0
- package/Form/Form.d.ts +23 -0
- package/Form/Form.mjs +98 -0
- package/Form/FormRenderControl.d.ts +4 -0
- package/Form/FormRenderControl.mjs +21 -0
- package/Form/FormRenderControl.types.d.ts +16 -0
- package/Form/index.d.ts +3 -0
- package/Form/index.mjs +13 -0
- package/Form/package.json +7 -0
- package/FormCheckbox/FormCheckbox.d.ts +4 -0
- package/FormCheckbox/FormCheckbox.mjs +30 -0
- package/FormCheckbox/FormCheckbox.types.d.ts +7 -0
- package/FormCheckbox/index.d.ts +2 -0
- package/FormCheckbox/index.mjs +4 -0
- package/FormCheckbox/package.json +7 -0
- package/FormCombobox/FormCombobox.d.ts +4 -0
- package/FormCombobox/FormCombobox.mjs +26 -0
- package/FormCombobox/FormCombobox.types.d.ts +6 -0
- package/FormCombobox/index.d.ts +2 -0
- package/FormCombobox/index.mjs +4 -0
- package/FormCombobox/package.json +7 -0
- package/FormDatePicker/FormDatePicker.d.ts +4 -0
- package/FormDatePicker/FormDatePicker.mjs +29 -0
- package/FormDatePicker/FormDatePicker.types.d.ts +6 -0
- package/FormDatePicker/index.d.ts +3 -0
- package/FormDatePicker/index.mjs +5 -0
- package/FormDatePicker/package.json +7 -0
- package/FormDropzone/FormDropzone.d.ts +4 -0
- package/FormDropzone/FormDropzone.mjs +19 -0
- package/FormDropzone/FormDropzone.types.d.ts +6 -0
- package/FormDropzone/index.d.ts +2 -0
- package/FormDropzone/index.mjs +4 -0
- package/FormDropzone/package.json +7 -0
- package/FormInput/FormInput.d.ts +7 -0
- package/FormInput/FormInput.mjs +44 -0
- package/FormInput/FormInput.types.d.ts +6 -0
- package/FormInput/index.d.ts +2 -0
- package/FormInput/index.mjs +4 -0
- package/FormInput/package.json +7 -0
- package/FormRadio/FormRadio.d.ts +4 -0
- package/FormRadio/FormRadio.mjs +40 -0
- package/FormRadio/FormRadio.types.d.ts +6 -0
- package/FormRadio/index.d.ts +2 -0
- package/FormRadio/index.mjs +4 -0
- package/FormRadio/package.json +7 -0
- package/FormSelect/FormSelect.d.ts +4 -0
- package/FormSelect/FormSelect.mjs +40 -0
- package/FormSelect/FormSelect.types.d.ts +6 -0
- package/FormSelect/index.d.ts +2 -0
- package/FormSelect/index.mjs +4 -0
- package/FormSelect/package.json +7 -0
- package/FormTextarea/FormTextarea.d.ts +4 -0
- package/FormTextarea/FormTextarea.mjs +27 -0
- package/FormTextarea/FormTextarea.types.d.ts +6 -0
- package/FormTextarea/index.d.ts +2 -0
- package/FormTextarea/index.mjs +4 -0
- package/FormTextarea/package.json +7 -0
- package/Header/Header.d.ts +4 -0
- package/Header/Header.mjs +26 -0
- package/Header/Header.types.d.ts +3 -0
- package/Header/index.d.ts +2 -0
- package/Header/index.mjs +5 -0
- package/Header/package.json +7 -0
- package/HoverCard/HoverCard.d.ts +6 -0
- package/HoverCard/HoverCard.mjs +23 -0
- package/HoverCard/index.d.ts +1 -0
- package/HoverCard/index.mjs +6 -0
- package/HoverCard/package.json +7 -0
- package/Input/Input.d.ts +6 -0
- package/Input/Input.mjs +73 -0
- package/Input/Input.types.d.ts +17 -0
- package/Input/index.d.ts +3 -0
- package/Input/index.mjs +7 -0
- package/Input/inputVariants.d.ts +3 -0
- package/Input/inputVariants.mjs +24 -0
- package/Input/package.json +7 -0
- package/InputOTP/InputOTP.d.ts +34 -0
- package/InputOTP/InputOTP.mjs +48 -0
- package/InputOTP/index.d.ts +1 -0
- package/InputOTP/index.mjs +7 -0
- package/InputOTP/package.json +7 -0
- package/Label/Label.d.ts +5 -0
- package/Label/Label.mjs +17 -0
- package/Label/index.d.ts +2 -0
- package/Label/index.mjs +6 -0
- package/Label/labelVariants.d.ts +1 -0
- package/Label/labelVariants.mjs +10 -0
- package/Label/package.json +7 -0
- package/LazyLoader/LazyLoader.d.ts +20 -0
- package/LazyLoader/LazyLoader.mjs +8 -0
- package/LazyLoader/index.d.ts +1 -0
- package/LazyLoader/index.mjs +5 -0
- package/LazyLoader/package.json +7 -0
- package/LoadingMask/LoadingMask.d.ts +4 -0
- package/LoadingMask/LoadingMask.mjs +21 -0
- package/LoadingMask/LoadingMask.types.d.ts +5 -0
- package/LoadingMask/RenderLoadingMask.d.ts +3 -0
- package/LoadingMask/RenderLoadingMask.mjs +108 -0
- package/LoadingMask/index.d.ts +3 -0
- package/LoadingMask/index.mjs +6 -0
- package/LoadingMask/package.json +7 -0
- package/LoadingProgress/LoadingProgress.d.ts +4 -0
- package/LoadingProgress/LoadingProgress.mjs +37 -0
- package/LoadingProgress/LoadingProgress.types.d.ts +8 -0
- package/LoadingProgress/index.d.ts +3 -0
- package/LoadingProgress/index.mjs +6 -0
- package/LoadingProgress/loadingProgressVariants.d.ts +4 -0
- package/LoadingProgress/loadingProgressVariants.mjs +24 -0
- package/LoadingProgress/package.json +7 -0
- package/Menubar/Menubar.d.ts +28 -0
- package/Menubar/Menubar.mjs +175 -0
- package/Menubar/index.d.ts +1 -0
- package/Menubar/index.mjs +19 -0
- package/Menubar/package.json +7 -0
- package/NavigationMenu/NavigationMenu.d.ts +11 -0
- package/NavigationMenu/NavigationMenu.mjs +101 -0
- package/NavigationMenu/index.d.ts +2 -0
- package/NavigationMenu/index.mjs +13 -0
- package/NavigationMenu/navigationMenuVariants.d.ts +1 -0
- package/NavigationMenu/navigationMenuVariants.mjs +7 -0
- package/NavigationMenu/package.json +7 -0
- package/Pagination/Pagination.d.ts +28 -0
- package/Pagination/Pagination.mjs +106 -0
- package/Pagination/index.d.ts +1 -0
- package/Pagination/index.mjs +10 -0
- package/Pagination/package.json +7 -0
- package/Popover/Popover.d.ts +7 -0
- package/Popover/Popover.mjs +28 -0
- package/Popover/index.d.ts +1 -0
- package/Popover/index.mjs +7 -0
- package/Popover/package.json +7 -0
- package/Progress/Progress.d.ts +4 -0
- package/Progress/Progress.mjs +26 -0
- package/Progress/index.d.ts +1 -0
- package/Progress/index.mjs +4 -0
- package/Progress/package.json +7 -0
- package/README.md +33 -0
- package/Radio/Radio.d.ts +4 -0
- package/Radio/Radio.mjs +12 -0
- package/Radio/Radio.types.d.ts +11 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.mjs +4 -0
- package/Radio/package.json +7 -0
- package/RadioGroup/RadioGroup.d.ts +11 -0
- package/RadioGroup/RadioGroup.mjs +49 -0
- package/RadioGroup/index.d.ts +1 -0
- package/RadioGroup/index.mjs +6 -0
- package/RadioGroup/package.json +7 -0
- package/Resizable/Resizable.d.ts +23 -0
- package/Resizable/Resizable.mjs +36 -0
- package/Resizable/index.d.ts +1 -0
- package/Resizable/index.mjs +6 -0
- package/Resizable/package.json +7 -0
- package/ScrollArea/ScrollArea.d.ts +5 -0
- package/ScrollArea/ScrollArea.mjs +51 -0
- package/ScrollArea/index.d.ts +1 -0
- package/ScrollArea/index.mjs +5 -0
- package/ScrollArea/package.json +7 -0
- package/Search/Search.d.ts +4 -0
- package/Search/Search.mjs +30 -0
- package/Search/Search.types.d.ts +6 -0
- package/Search/index.d.ts +3 -0
- package/Search/index.mjs +5 -0
- package/Search/package.json +7 -0
- package/Select/Select.d.ts +3 -0
- package/Select/Select.mjs +103 -0
- package/Select/Select.types.d.ts +37 -0
- package/Select/SelectRoot.d.ts +13 -0
- package/Select/SelectRoot.mjs +126 -0
- package/Select/index.d.ts +3 -0
- package/Select/index.mjs +15 -0
- package/Select/package.json +7 -0
- package/Separator/Separator.d.ts +4 -0
- package/Separator/Separator.mjs +24 -0
- package/Separator/index.d.ts +1 -0
- package/Separator/index.mjs +4 -0
- package/Separator/package.json +7 -0
- package/Sheet/Sheet.d.ts +28 -0
- package/Sheet/Sheet.mjs +110 -0
- package/Sheet/index.d.ts +1 -0
- package/Sheet/index.mjs +13 -0
- package/Sheet/package.json +7 -0
- package/Sidebar/Sidebar.d.ts +66 -0
- package/Sidebar/Sidebar.mjs +543 -0
- package/Sidebar/index.d.ts +1 -0
- package/Sidebar/index.mjs +27 -0
- package/Sidebar/package.json +7 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.mjs +17 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.mjs +4 -0
- package/Skeleton/package.json +7 -0
- package/Slider/Slider.d.ts +4 -0
- package/Slider/Slider.mjs +23 -0
- package/Slider/index.d.ts +1 -0
- package/Slider/index.mjs +4 -0
- package/Slider/package.json +7 -0
- package/Sonner/Sonner.d.ts +5 -0
- package/Sonner/Sonner.mjs +25 -0
- package/Sonner/index.d.ts +1 -0
- package/Sonner/index.mjs +4 -0
- package/Sonner/package.json +7 -0
- package/Switch/Switch.d.ts +4 -0
- package/Switch/Switch.mjs +27 -0
- package/Switch/index.d.ts +1 -0
- package/Switch/index.mjs +4 -0
- package/Switch/package.json +7 -0
- package/Table/Table.d.ts +10 -0
- package/Table/Table.mjs +90 -0
- package/Table/index.d.ts +1 -0
- package/Table/index.mjs +11 -0
- package/Table/package.json +7 -0
- package/TablePagination/TablePagination.d.ts +16 -0
- package/TablePagination/TablePagination.mjs +74 -0
- package/TablePagination/index.d.ts +1 -0
- package/TablePagination/index.mjs +4 -0
- package/TablePagination/package.json +7 -0
- package/Tabs/Tabs.d.ts +5 -0
- package/Tabs/Tabs.mjs +23 -0
- package/Tabs/Tabs.types.d.ts +12 -0
- package/Tabs/TabsRoot.d.ts +7 -0
- package/Tabs/TabsRoot.mjs +46 -0
- package/Tabs/index.d.ts +2 -0
- package/Tabs/index.mjs +10 -0
- package/Tabs/package.json +7 -0
- package/Textarea/Textarea.d.ts +4 -0
- package/Textarea/Textarea.mjs +75 -0
- package/Textarea/Textarea.types.d.ts +18 -0
- package/Textarea/index.d.ts +2 -0
- package/Textarea/index.mjs +4 -0
- package/Textarea/package.json +7 -0
- package/Textarea/useAutosizeTextArea.d.ts +3 -0
- package/Textarea/useAutosizeTextArea.mjs +20 -0
- package/Theme/ThemeModeToggle.d.ts +8 -0
- package/Theme/ThemeModeToggle.mjs +48 -0
- package/Theme/ThemeProvider.d.ts +4 -0
- package/Theme/ThemeProvider.mjs +27 -0
- package/Theme/index.d.ts +2 -0
- package/Theme/index.mjs +6 -0
- package/Theme/package.json +7 -0
- package/Toast/Toast.d.ts +13 -0
- package/Toast/Toast.mjs +80 -0
- package/Toast/Toast.types.d.ts +34 -0
- package/Toast/index.d.ts +3 -0
- package/Toast/index.mjs +15 -0
- package/Toast/package.json +7 -0
- package/Toast/toast.constants.d.ts +6 -0
- package/Toast/toast.constants.mjs +9 -0
- package/Toast/toastVariants.d.ts +3 -0
- package/Toast/toastVariants.mjs +21 -0
- package/Toast/useToast.d.ts +16 -0
- package/Toast/useToast.mjs +101 -0
- package/Toaster/Toaster.d.ts +1 -0
- package/Toaster/Toaster.mjs +22 -0
- package/Toaster/index.d.ts +1 -0
- package/Toaster/index.mjs +4 -0
- package/Toaster/package.json +7 -0
- package/Toggle/Toggle.d.ts +12 -0
- package/Toggle/Toggle.mjs +37 -0
- package/Toggle/index.d.ts +1 -0
- package/Toggle/index.mjs +5 -0
- package/Toggle/package.json +7 -0
- package/ToggleGroup/ToggleGroup.d.ts +12 -0
- package/ToggleGroup/ToggleGroup.mjs +41 -0
- package/ToggleGroup/index.d.ts +1 -0
- package/ToggleGroup/index.mjs +5 -0
- package/ToggleGroup/package.json +7 -0
- package/Tooltip/Tooltip.d.ts +4 -0
- package/Tooltip/Tooltip.mjs +12 -0
- package/Tooltip/Tooltip.types.d.ts +8 -0
- package/Tooltip/TooltipRoot.d.ts +7 -0
- package/Tooltip/TooltipRoot.mjs +23 -0
- package/Tooltip/index.d.ts +3 -0
- package/Tooltip/index.mjs +9 -0
- package/Tooltip/package.json +7 -0
- package/index.css +1 -0
- package/index.d.ts +68 -0
- package/index.mjs +367 -0
- package/package.json +103 -0
- package/tailwind.config.mjs +148 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import f, { forwardRef as y, useState as V, useRef as W, useEffect as X, useCallback as g, useLayoutEffect as H } from "react";
|
|
3
|
+
import { LoadingMask as J } from "./LoadingMask/LoadingMask.mjs";
|
|
4
|
+
import "./LoadingMask/RenderLoadingMask.mjs";
|
|
5
|
+
import { Popover as K, PopoverTrigger as Q, PopoverContent as Y } from "./Popover/Popover.mjs";
|
|
6
|
+
import { Button as _ } from "./Button/Button.mjs";
|
|
7
|
+
import "./Button/buttonVariants.mjs";
|
|
8
|
+
import { CommandItem as Z, Command as $, CommandInput as ee, CommandList as te, CommandGroup as oe, CommandEmpty as F } from "./Command/Command.mjs";
|
|
9
|
+
import { cn as p } from "@oneplatformdev/utils";
|
|
10
|
+
import { useDebounceCallback as re } from "@oneplatformdev/hooks";
|
|
11
|
+
import { Check as ae, ChevronDownIcon as ie, X as ne, ChevronsUpDown as le } from "lucide-react";
|
|
12
|
+
import { Collapsible as se, CollapsibleTrigger as pe, CollapsibleContent as me } from "./Collapsible/Collapsible.mjs";
|
|
13
|
+
import "./Accordion/Accordion.mjs";
|
|
14
|
+
import "./Alert/Alert.mjs";
|
|
15
|
+
import "./AlertDialog/AlertDialogRoot.mjs";
|
|
16
|
+
import "recharts";
|
|
17
|
+
import "./Chart/Chart.mjs";
|
|
18
|
+
import "./Sidebar/Sidebar.mjs";
|
|
19
|
+
import "@radix-ui/react-aspect-ratio";
|
|
20
|
+
import "./Avatar/Avatar.mjs";
|
|
21
|
+
import "./Badge/badgeVariants.mjs";
|
|
22
|
+
import "./Breadcrumb/Breadcrumb.mjs";
|
|
23
|
+
import "./ButtonIcon/ButtonIcon.mjs";
|
|
24
|
+
import "./ButtonIcon/buttonIconVariants.mjs";
|
|
25
|
+
import "./Calendar/Calendar.mjs";
|
|
26
|
+
import "./Card/Card.mjs";
|
|
27
|
+
import "./Carousel/Carousel.mjs";
|
|
28
|
+
import "./Checkbox/Checkbox.mjs";
|
|
29
|
+
import "@radix-ui/react-collapsible";
|
|
30
|
+
import "./DropdownMenu/DropdownMenu.mjs";
|
|
31
|
+
import "./Table/Table.mjs";
|
|
32
|
+
import "@tanstack/react-table";
|
|
33
|
+
import "./DatePicker/DatePicker.mjs";
|
|
34
|
+
import "./Dialog/Dialog.mjs";
|
|
35
|
+
import "./Drawer/Drawer.mjs";
|
|
36
|
+
import "./Form/Form.mjs";
|
|
37
|
+
import "./FormInput/FormInput.mjs";
|
|
38
|
+
import "./Select/SelectRoot.mjs";
|
|
39
|
+
import "./Textarea/Textarea.mjs";
|
|
40
|
+
import "./Separator/Separator.mjs";
|
|
41
|
+
import "./HoverCard/HoverCard.mjs";
|
|
42
|
+
import "./Input/Input.mjs";
|
|
43
|
+
import "./InputOTP/InputOTP.mjs";
|
|
44
|
+
import "./Label/Label.mjs";
|
|
45
|
+
import "./Label/labelVariants.mjs";
|
|
46
|
+
import "./LoadingProgress/loadingProgressVariants.mjs";
|
|
47
|
+
import "./Menubar/Menubar.mjs";
|
|
48
|
+
import "./NavigationMenu/NavigationMenu.mjs";
|
|
49
|
+
import "./NavigationMenu/navigationMenuVariants.mjs";
|
|
50
|
+
import "./Pagination/Pagination.mjs";
|
|
51
|
+
import "./Progress/Progress.mjs";
|
|
52
|
+
import "./RadioGroup/RadioGroup.mjs";
|
|
53
|
+
import "react-resizable-panels";
|
|
54
|
+
import "./ScrollArea/ScrollArea.mjs";
|
|
55
|
+
import "./Sheet/Sheet.mjs";
|
|
56
|
+
import "./Slider/Slider.mjs";
|
|
57
|
+
import "next-themes";
|
|
58
|
+
import "sonner";
|
|
59
|
+
import "./Switch/Switch.mjs";
|
|
60
|
+
import "./Tabs/TabsRoot.mjs";
|
|
61
|
+
import "./Toast/Toast.mjs";
|
|
62
|
+
import "./Toggle/Toggle.mjs";
|
|
63
|
+
import "./ToggleGroup/ToggleGroup.mjs";
|
|
64
|
+
import "./Tooltip/TooltipRoot.mjs";
|
|
65
|
+
import "./Dropzone/Dropzone.mjs";
|
|
66
|
+
const ce = 8, I = y((n, l) => {
|
|
67
|
+
const { children: t, setOpen: m, option: o, onChangeOption: i, value: c = "", deep: a = 0 } = n;
|
|
68
|
+
return /* @__PURE__ */ s(
|
|
69
|
+
Z,
|
|
70
|
+
{
|
|
71
|
+
ref: l,
|
|
72
|
+
value: o.value,
|
|
73
|
+
onSelect: () => {
|
|
74
|
+
c === o.value ? i == null || i({ value: "", label: "" }) : i == null || i(o), m(!1);
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
paddingLeft: (a + 1) * ce
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
t,
|
|
81
|
+
/* @__PURE__ */ e(
|
|
82
|
+
"span",
|
|
83
|
+
{
|
|
84
|
+
className: p(
|
|
85
|
+
"overflow-hidden whitespace-wrap text-ellipsis line-clamp-2"
|
|
86
|
+
),
|
|
87
|
+
children: o.label
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
ae,
|
|
92
|
+
{
|
|
93
|
+
className: p(
|
|
94
|
+
"ml-auto",
|
|
95
|
+
c === o.value ? "opacity-100" : "opacity-0"
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
o.value
|
|
102
|
+
);
|
|
103
|
+
}), M = y((n, l) => {
|
|
104
|
+
var c;
|
|
105
|
+
const { option: t, deep: m = 0 } = n, [o, i] = V(!0);
|
|
106
|
+
return (c = t == null ? void 0 : t.items) != null && c.length ? /* @__PURE__ */ s(
|
|
107
|
+
se,
|
|
108
|
+
{
|
|
109
|
+
ref: l,
|
|
110
|
+
open: o,
|
|
111
|
+
onOpenChange: i,
|
|
112
|
+
"data-opened": o,
|
|
113
|
+
className: p("group/collapsible"),
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ e(I, { ...n, children: /* @__PURE__ */ e(pe, { asChild: !0, children: /* @__PURE__ */ s(
|
|
116
|
+
_,
|
|
117
|
+
{
|
|
118
|
+
onClick: (a) => {
|
|
119
|
+
a == null || a.preventDefault(), a == null || a.stopPropagation(), i((d) => !d);
|
|
120
|
+
},
|
|
121
|
+
type: "button",
|
|
122
|
+
variant: "ghost",
|
|
123
|
+
size: "sm",
|
|
124
|
+
className: p("aspect-square size-6", "transition-transform"),
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ e(
|
|
127
|
+
ie,
|
|
128
|
+
{
|
|
129
|
+
className: p(
|
|
130
|
+
"!size-5",
|
|
131
|
+
"transition-transform",
|
|
132
|
+
o && "rotate-180"
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle" })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
) }) }),
|
|
140
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-0", children: t == null ? void 0 : t.items.map((a) => /* @__PURE__ */ e(
|
|
141
|
+
M,
|
|
142
|
+
{
|
|
143
|
+
...n,
|
|
144
|
+
deep: m + 1,
|
|
145
|
+
option: a
|
|
146
|
+
},
|
|
147
|
+
a.value
|
|
148
|
+
)) }) })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
) : /* @__PURE__ */ e(I, { ...n, ref: l });
|
|
152
|
+
}), de = y((n, l) => {
|
|
153
|
+
const { options: t = [], ...m } = n;
|
|
154
|
+
return /* @__PURE__ */ e("div", { ref: l, className: "flex flex-col gap-0", children: t.map((o) => /* @__PURE__ */ e(M, { ...m, option: o }, o.value)) });
|
|
155
|
+
}), St = y(
|
|
156
|
+
(n, l) => {
|
|
157
|
+
var j;
|
|
158
|
+
const {
|
|
159
|
+
value: t,
|
|
160
|
+
onChange: m,
|
|
161
|
+
placeholder: o,
|
|
162
|
+
disabled: i,
|
|
163
|
+
searchLabel: c = "Type to search...",
|
|
164
|
+
fetchOptions: a,
|
|
165
|
+
options: d,
|
|
166
|
+
emptyLabel: L = "No options",
|
|
167
|
+
emptyAction: b,
|
|
168
|
+
onMount: P
|
|
169
|
+
} = n, w = W(!1), [u, v] = f.useState(!1), [C, T] = f.useState(""), [N, x] = f.useState([]), [S, k] = f.useState(), [O, h] = f.useState(!1);
|
|
170
|
+
X(() => {
|
|
171
|
+
d != null && d.length && x(d);
|
|
172
|
+
}, [d]);
|
|
173
|
+
const R = async () => {
|
|
174
|
+
u || (E(), T(""));
|
|
175
|
+
}, E = g(async (r) => {
|
|
176
|
+
h(!0);
|
|
177
|
+
try {
|
|
178
|
+
const D = await a(r);
|
|
179
|
+
x(D);
|
|
180
|
+
} catch (D) {
|
|
181
|
+
console.error("Unexpected error while get option:", D);
|
|
182
|
+
} finally {
|
|
183
|
+
h(!1);
|
|
184
|
+
}
|
|
185
|
+
}, []), q = re(E, 1e3, {
|
|
186
|
+
leading: !1,
|
|
187
|
+
trailing: !0
|
|
188
|
+
}), B = g((r) => {
|
|
189
|
+
h(!0), T(r), q(r);
|
|
190
|
+
}, []), z = g((r) => {
|
|
191
|
+
m(r.value), k(r), h(!1);
|
|
192
|
+
}, []), G = g(() => {
|
|
193
|
+
z({ value: "", label: "" }), k(void 0), h(!1);
|
|
194
|
+
}, []), U = g(() => {
|
|
195
|
+
if (!P) {
|
|
196
|
+
w.current = !0;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
P({ setOptions: x, search: C || "", open: u, setOpen: v }).finally(
|
|
200
|
+
() => {
|
|
201
|
+
w.current = !0;
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
}, []);
|
|
205
|
+
return H(() => (U(), () => {
|
|
206
|
+
w.current = !1;
|
|
207
|
+
}), []), /* @__PURE__ */ e("div", { className: "w-full", ref: l, children: /* @__PURE__ */ s(
|
|
208
|
+
K,
|
|
209
|
+
{
|
|
210
|
+
open: u,
|
|
211
|
+
onOpenChange: (r) => {
|
|
212
|
+
v(r), r && R();
|
|
213
|
+
},
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ e(Q, { asChild: !0, className: "border-input", children: /* @__PURE__ */ s(
|
|
216
|
+
_,
|
|
217
|
+
{
|
|
218
|
+
variant: "outline",
|
|
219
|
+
role: "combobox",
|
|
220
|
+
size: "lg",
|
|
221
|
+
"aria-expanded": u,
|
|
222
|
+
className: p(
|
|
223
|
+
"w-full justify-between font-normal text-sm bg-transparent relative p-3",
|
|
224
|
+
"border border-border",
|
|
225
|
+
u && "border-2 outline-none ring-1 ring-ring",
|
|
226
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
227
|
+
),
|
|
228
|
+
disabled: i,
|
|
229
|
+
children: [
|
|
230
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: t ? ((j = N.find((r) => r.value === t)) == null ? void 0 : j.label) || (S == null ? void 0 : S.label) : /* @__PURE__ */ e("span", { className: "text-gray-400", children: o }) }),
|
|
231
|
+
t ? /* @__PURE__ */ e(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
className: p(
|
|
235
|
+
"absolute top-0 right-1",
|
|
236
|
+
"flex items-center justify-center",
|
|
237
|
+
"w-9 aspect-square [&_svg]:size-5",
|
|
238
|
+
"opacity-50 cursor-pointer hover:opacity-100"
|
|
239
|
+
),
|
|
240
|
+
onClick: (r) => {
|
|
241
|
+
r.stopPropagation(), G();
|
|
242
|
+
},
|
|
243
|
+
children: /* @__PURE__ */ e(ne, {})
|
|
244
|
+
}
|
|
245
|
+
) : /* @__PURE__ */ e(le, { className: "opacity-50 w-4 h-4" })
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
) }),
|
|
249
|
+
/* @__PURE__ */ e(
|
|
250
|
+
Y,
|
|
251
|
+
{
|
|
252
|
+
className: "w-[var(--radix-popper-anchor-width)] max-w-none p-0",
|
|
253
|
+
align: "start",
|
|
254
|
+
children: /* @__PURE__ */ s($, { shouldFilter: !1, children: [
|
|
255
|
+
/* @__PURE__ */ e(
|
|
256
|
+
ee,
|
|
257
|
+
{
|
|
258
|
+
placeholder: c,
|
|
259
|
+
value: C,
|
|
260
|
+
onValueChange: B
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ s(
|
|
264
|
+
oe,
|
|
265
|
+
{
|
|
266
|
+
className: p(!N.length && "p-0 shadow-none"),
|
|
267
|
+
children: [
|
|
268
|
+
O && /* @__PURE__ */ e(J, { fullWidth: !0 }),
|
|
269
|
+
!O && !!C && /* @__PURE__ */ e(A, { children: b ? /* @__PURE__ */ s(F, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
|
|
270
|
+
/* @__PURE__ */ e("span", { children: L }),
|
|
271
|
+
typeof b == "function" ? b({
|
|
272
|
+
setOptions: x,
|
|
273
|
+
search: C || "",
|
|
274
|
+
open: u,
|
|
275
|
+
setOpen: v
|
|
276
|
+
}) : b
|
|
277
|
+
] }) : /* @__PURE__ */ e(F, { children: L }) }),
|
|
278
|
+
!O && /* @__PURE__ */ e(
|
|
279
|
+
de,
|
|
280
|
+
{
|
|
281
|
+
value: t,
|
|
282
|
+
options: N,
|
|
283
|
+
onChangeOption: z,
|
|
284
|
+
setOpen: v
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
) })
|
|
290
|
+
] })
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
) });
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
export {
|
|
299
|
+
St as C,
|
|
300
|
+
I as a,
|
|
301
|
+
M as b,
|
|
302
|
+
de as c
|
|
303
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
} & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
10
|
+
label?: string;
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
disablePointerSelection?: boolean;
|
|
18
|
+
vimBindings?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
22
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
23
|
+
} & {
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
|
|
26
|
+
value?: string;
|
|
27
|
+
onValueChange?: (search: string) => void;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
} & {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
36
|
+
label?: string;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
} & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
48
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
49
|
+
} & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
52
|
+
heading?: React.ReactNode;
|
|
53
|
+
value?: string;
|
|
54
|
+
forceMount?: boolean;
|
|
55
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
} & {
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
61
|
+
alwaysRender?: boolean;
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
+
} & {
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
onSelect?: (value: string) => void;
|
|
72
|
+
value?: string;
|
|
73
|
+
keywords?: string[];
|
|
74
|
+
forceMount?: boolean;
|
|
75
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const CommandShortcut: {
|
|
77
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
displayName: string;
|
|
79
|
+
};
|
|
80
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { Command as t } from "cmdk";
|
|
4
|
+
import { Search as p } from "lucide-react";
|
|
5
|
+
import { cn as r } from "@oneplatformdev/utils";
|
|
6
|
+
import { Dialog as i, DialogContent as l } from "../Dialog/Dialog.mjs";
|
|
7
|
+
const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
|
|
8
|
+
t,
|
|
9
|
+
{
|
|
10
|
+
ref: d,
|
|
11
|
+
className: r(
|
|
12
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...a
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
n.displayName = t.displayName;
|
|
19
|
+
const C = ({ children: e, ...a }) => /* @__PURE__ */ o(i, { ...a, children: /* @__PURE__ */ o(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), c = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
20
|
+
/* @__PURE__ */ o(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
21
|
+
/* @__PURE__ */ o(
|
|
22
|
+
t.Input,
|
|
23
|
+
{
|
|
24
|
+
ref: d,
|
|
25
|
+
className: r(
|
|
26
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
27
|
+
e
|
|
28
|
+
),
|
|
29
|
+
...a
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] }));
|
|
33
|
+
c.displayName = t.Input.displayName;
|
|
34
|
+
const u = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
|
|
35
|
+
t.List,
|
|
36
|
+
{
|
|
37
|
+
ref: d,
|
|
38
|
+
className: r("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
39
|
+
...a
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
u.displayName = t.List.displayName;
|
|
43
|
+
const f = m.forwardRef((e, a) => /* @__PURE__ */ o(
|
|
44
|
+
t.Empty,
|
|
45
|
+
{
|
|
46
|
+
ref: a,
|
|
47
|
+
className: "py-6 text-center text-sm",
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
f.displayName = t.Empty.displayName;
|
|
52
|
+
const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
|
|
53
|
+
t.Group,
|
|
54
|
+
{
|
|
55
|
+
ref: d,
|
|
56
|
+
className: r(
|
|
57
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
58
|
+
e
|
|
59
|
+
),
|
|
60
|
+
...a
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
g.displayName = t.Group.displayName;
|
|
64
|
+
const x = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
|
|
65
|
+
t.Separator,
|
|
66
|
+
{
|
|
67
|
+
ref: d,
|
|
68
|
+
className: r("-mx-1 h-px bg-border", e),
|
|
69
|
+
...a
|
|
70
|
+
}
|
|
71
|
+
));
|
|
72
|
+
x.displayName = t.Separator.displayName;
|
|
73
|
+
const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
|
|
74
|
+
t.Item,
|
|
75
|
+
{
|
|
76
|
+
ref: d,
|
|
77
|
+
className: r(
|
|
78
|
+
"relative flex gap-2 select-none items-center rounded-sm",
|
|
79
|
+
"min-h-8 px-2 py-1",
|
|
80
|
+
"[&>span]:py-1",
|
|
81
|
+
"text-sm text-[#666A78] font-medium leading-[1.12]",
|
|
82
|
+
"data-[selected=true]:bg-accent",
|
|
83
|
+
"data-[selected=true]:text-[#191F35] hover:text-[#191F35]",
|
|
84
|
+
"outline-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
85
|
+
"cursor-pointer",
|
|
86
|
+
e
|
|
87
|
+
),
|
|
88
|
+
...a
|
|
89
|
+
}
|
|
90
|
+
));
|
|
91
|
+
h.displayName = t.Item.displayName;
|
|
92
|
+
const y = ({
|
|
93
|
+
className: e,
|
|
94
|
+
...a
|
|
95
|
+
}) => /* @__PURE__ */ o(
|
|
96
|
+
"span",
|
|
97
|
+
{
|
|
98
|
+
className: r(
|
|
99
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
100
|
+
e
|
|
101
|
+
),
|
|
102
|
+
...a
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
y.displayName = "CommandShortcut";
|
|
106
|
+
export {
|
|
107
|
+
n as Command,
|
|
108
|
+
C as CommandDialog,
|
|
109
|
+
f as CommandEmpty,
|
|
110
|
+
g as CommandGroup,
|
|
111
|
+
c as CommandInput,
|
|
112
|
+
h as CommandItem,
|
|
113
|
+
u as CommandList,
|
|
114
|
+
x as CommandSeparator,
|
|
115
|
+
y as CommandShortcut
|
|
116
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Command';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command as a, CommandDialog as n, CommandEmpty as d, CommandGroup as C, CommandInput as t, CommandItem as r, CommandList as p, CommandSeparator as e, CommandShortcut as u } from "./Command.mjs";
|
|
2
|
+
export {
|
|
3
|
+
a as Command,
|
|
4
|
+
n as CommandDialog,
|
|
5
|
+
d as CommandEmpty,
|
|
6
|
+
C as CommandGroup,
|
|
7
|
+
t as CommandInput,
|
|
8
|
+
r as CommandItem,
|
|
9
|
+
p as CommandList,
|
|
10
|
+
e as CommandSeparator,
|
|
11
|
+
u as CommandShortcut
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, FC } from 'react';
|
|
2
|
+
import { Table as ReactTable } from '@tanstack/react-table';
|
|
3
|
+
|
|
4
|
+
interface IProps {
|
|
5
|
+
table: ReactTable<any>;
|
|
6
|
+
ToolBar?: React.ReactNode;
|
|
7
|
+
tColumns?: string;
|
|
8
|
+
tNoResults?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const DataTable: FC<IProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Button as h } from "../Button/Button.mjs";
|
|
3
|
+
import "../Button/buttonVariants.mjs";
|
|
4
|
+
import { DropdownMenu as p, DropdownMenuTrigger as g, DropdownMenuContent as u, DropdownMenuCheckboxItem as C } from "../DropdownMenu/DropdownMenu.mjs";
|
|
5
|
+
import { Table as f, TableHeader as w, TableRow as t, TableHead as x, TableBody as b, TableCell as d } from "../Table/Table.mjs";
|
|
6
|
+
import { flexRender as a } from "@tanstack/react-table";
|
|
7
|
+
import { ChevronDown as D } from "lucide-react";
|
|
8
|
+
const y = ({
|
|
9
|
+
table: r,
|
|
10
|
+
ToolBar: s,
|
|
11
|
+
tColumns: c = "Columns",
|
|
12
|
+
tNoResults: m = "No results"
|
|
13
|
+
}) => {
|
|
14
|
+
var o;
|
|
15
|
+
return /* @__PURE__ */ i("div", { className: "w-full", children: [
|
|
16
|
+
/* @__PURE__ */ i("div", { className: "flex items-center py-4", children: [
|
|
17
|
+
s,
|
|
18
|
+
/* @__PURE__ */ i(p, { children: [
|
|
19
|
+
/* @__PURE__ */ l(g, { asChild: !0, children: /* @__PURE__ */ i(h, { variant: "outline", className: "ml-auto", children: [
|
|
20
|
+
c,
|
|
21
|
+
" ",
|
|
22
|
+
/* @__PURE__ */ l(D, { className: "ml-2 h-4 w-4" })
|
|
23
|
+
] }) }),
|
|
24
|
+
/* @__PURE__ */ l(u, { align: "end", children: r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
|
|
25
|
+
C,
|
|
26
|
+
{
|
|
27
|
+
className: "capitalize",
|
|
28
|
+
checked: e.getIsVisible(),
|
|
29
|
+
onCheckedChange: (n) => e.toggleVisibility(!!n),
|
|
30
|
+
children: e.id
|
|
31
|
+
},
|
|
32
|
+
e.id
|
|
33
|
+
)) })
|
|
34
|
+
] })
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(f, { children: [
|
|
37
|
+
/* @__PURE__ */ l(w, { children: r.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((n) => /* @__PURE__ */ l(x, { children: n.isPlaceholder ? null : a(
|
|
38
|
+
n.column.columnDef.header,
|
|
39
|
+
n.getContext()
|
|
40
|
+
) }, n.id)) }, e.id)) }),
|
|
41
|
+
/* @__PURE__ */ l(b, { children: (o = r.getRowModel().rows) != null && o.length ? r.getRowModel().rows.map((e) => /* @__PURE__ */ l(
|
|
42
|
+
t,
|
|
43
|
+
{
|
|
44
|
+
"data-state": e.getIsSelected() && "selected",
|
|
45
|
+
children: e.getVisibleCells().map((n) => /* @__PURE__ */ l(d, { children: a(
|
|
46
|
+
n.column.columnDef.cell,
|
|
47
|
+
n.getContext()
|
|
48
|
+
) }, n.id))
|
|
49
|
+
},
|
|
50
|
+
e.id
|
|
51
|
+
)) : /* @__PURE__ */ l(t, { children: /* @__PURE__ */ l(
|
|
52
|
+
d,
|
|
53
|
+
{
|
|
54
|
+
colSpan: r.getAllColumns().length,
|
|
55
|
+
className: "h-24 text-center",
|
|
56
|
+
children: m
|
|
57
|
+
}
|
|
58
|
+
) }) })
|
|
59
|
+
] }) })
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
y as DataTable
|
|
64
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Table as ReactTable } from '@tanstack/react-table';
|
|
3
|
+
|
|
4
|
+
export interface DataTableProps {
|
|
5
|
+
table: ReactTable<any>;
|
|
6
|
+
ToolBar?: React.ReactNode;
|
|
7
|
+
/** Columns label*/
|
|
8
|
+
columnsLabel?: string;
|
|
9
|
+
/** No Result label*/
|
|
10
|
+
noResultLabel?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as n, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as m } from "lucide-react";
|
|
3
|
+
import { useMemo as s } from "react";
|
|
4
|
+
import { Button as d } from "../Button/Button.mjs";
|
|
5
|
+
import "../Button/buttonVariants.mjs";
|
|
6
|
+
import { DropdownMenuCheckboxItem as c, DropdownMenu as u, DropdownMenuTrigger as h, DropdownMenuContent as p } from "../DropdownMenu/DropdownMenu.mjs";
|
|
7
|
+
const x = (i) => {
|
|
8
|
+
const {
|
|
9
|
+
table: r,
|
|
10
|
+
columnsLabel: l = "Columns"
|
|
11
|
+
} = i, o = s(() => r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ n(
|
|
12
|
+
c,
|
|
13
|
+
{
|
|
14
|
+
className: "capitalize",
|
|
15
|
+
checked: e.getIsVisible(),
|
|
16
|
+
onCheckedChange: (a) => e.toggleVisibility(!!a),
|
|
17
|
+
children: e.id
|
|
18
|
+
},
|
|
19
|
+
e.id
|
|
20
|
+
)), [r]);
|
|
21
|
+
return o.length ? /* @__PURE__ */ t(u, { children: [
|
|
22
|
+
/* @__PURE__ */ n(h, { asChild: !0, children: /* @__PURE__ */ t(d, { variant: "outline", className: "ml-auto", children: [
|
|
23
|
+
l,
|
|
24
|
+
/* @__PURE__ */ n(m, { className: "ml-2 h-4 w-4" })
|
|
25
|
+
] }) }),
|
|
26
|
+
/* @__PURE__ */ n(p, { align: "end", children: o })
|
|
27
|
+
] }) : null;
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
x as DataTableColumnFilter
|
|
31
|
+
};
|