@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,25 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as e } from "next-themes";
|
|
3
|
+
import { Toaster as s } from "sonner";
|
|
4
|
+
const p = ({ ...t }) => {
|
|
5
|
+
const { theme: o = "system" } = e();
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
theme: o,
|
|
10
|
+
className: "toaster group",
|
|
11
|
+
toastOptions: {
|
|
12
|
+
classNames: {
|
|
13
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
14
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
15
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
16
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
...t
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
p as Sonner
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sonner';
|
package/Sonner/index.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-switch";
|
|
4
|
+
import { cn as o } from "@oneplatformdev/utils";
|
|
5
|
+
const n = a.forwardRef(({ className: t, ...i }, s) => /* @__PURE__ */ r(
|
|
6
|
+
e.Root,
|
|
7
|
+
{
|
|
8
|
+
className: o(
|
|
9
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
10
|
+
t
|
|
11
|
+
),
|
|
12
|
+
...i,
|
|
13
|
+
ref: s,
|
|
14
|
+
children: /* @__PURE__ */ r(
|
|
15
|
+
e.Thumb,
|
|
16
|
+
{
|
|
17
|
+
className: o(
|
|
18
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
n.displayName = e.Root.displayName;
|
|
25
|
+
export {
|
|
26
|
+
n as Switch
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
package/Switch/index.mjs
ADDED
package/Table/Table.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
package/Table/Table.mjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { cn as r } from "@oneplatformdev/utils";
|
|
4
|
+
const d = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ t(
|
|
5
|
+
"table",
|
|
6
|
+
{
|
|
7
|
+
ref: o,
|
|
8
|
+
className: r("w-full caption-bottom text-sm", e),
|
|
9
|
+
...a
|
|
10
|
+
}
|
|
11
|
+
) }));
|
|
12
|
+
d.displayName = "Table";
|
|
13
|
+
const s = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t("thead", { ref: o, className: r("[&_tr]:border-b", e), ...a }));
|
|
14
|
+
s.displayName = "TableHeader";
|
|
15
|
+
const m = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
16
|
+
"tbody",
|
|
17
|
+
{
|
|
18
|
+
ref: o,
|
|
19
|
+
className: r("[&_tr:last-child]:border-0", e),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
));
|
|
23
|
+
m.displayName = "TableBody";
|
|
24
|
+
const b = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
25
|
+
"tfoot",
|
|
26
|
+
{
|
|
27
|
+
ref: o,
|
|
28
|
+
className: r(
|
|
29
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
30
|
+
e
|
|
31
|
+
),
|
|
32
|
+
...a
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
b.displayName = "TableFooter";
|
|
36
|
+
const c = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
37
|
+
"tr",
|
|
38
|
+
{
|
|
39
|
+
ref: o,
|
|
40
|
+
className: r(
|
|
41
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
42
|
+
e
|
|
43
|
+
),
|
|
44
|
+
...a
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
c.displayName = "TableRow";
|
|
48
|
+
const f = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
49
|
+
"th",
|
|
50
|
+
{
|
|
51
|
+
ref: o,
|
|
52
|
+
className: r(
|
|
53
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
54
|
+
e
|
|
55
|
+
),
|
|
56
|
+
...a
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
f.displayName = "TableHead";
|
|
60
|
+
const i = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
61
|
+
"td",
|
|
62
|
+
{
|
|
63
|
+
ref: o,
|
|
64
|
+
className: r(
|
|
65
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
66
|
+
e
|
|
67
|
+
),
|
|
68
|
+
...a
|
|
69
|
+
}
|
|
70
|
+
));
|
|
71
|
+
i.displayName = "TableCell";
|
|
72
|
+
const n = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
73
|
+
"caption",
|
|
74
|
+
{
|
|
75
|
+
ref: o,
|
|
76
|
+
className: r("mt-4 text-sm text-muted-foreground", e),
|
|
77
|
+
...a
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
n.displayName = "TableCaption";
|
|
81
|
+
export {
|
|
82
|
+
d as Table,
|
|
83
|
+
m as TableBody,
|
|
84
|
+
n as TableCaption,
|
|
85
|
+
i as TableCell,
|
|
86
|
+
b as TableFooter,
|
|
87
|
+
f as TableHead,
|
|
88
|
+
s as TableHeader,
|
|
89
|
+
c as TableRow
|
|
90
|
+
};
|
package/Table/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Table';
|
package/Table/index.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Table as l, TableBody as b, TableCaption as T, TableCell as o, TableFooter as r, TableHead as d, TableHeader as t, TableRow as p } from "./Table.mjs";
|
|
2
|
+
export {
|
|
3
|
+
l as Table,
|
|
4
|
+
b as TableBody,
|
|
5
|
+
T as TableCaption,
|
|
6
|
+
o as TableCell,
|
|
7
|
+
r as TableFooter,
|
|
8
|
+
d as TableHead,
|
|
9
|
+
t as TableHeader,
|
|
10
|
+
p as TableRow
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IProps {
|
|
4
|
+
limit: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
totalRows: number;
|
|
7
|
+
setLimit: (limit: number) => void;
|
|
8
|
+
setOffset: (offset: number) => void;
|
|
9
|
+
tRowsPerPage?: string;
|
|
10
|
+
tPrevious?: string;
|
|
11
|
+
tPage?: string;
|
|
12
|
+
tNext?: string;
|
|
13
|
+
tOf?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TablePagination: FC<IProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Button as i } from "../Button/Button.mjs";
|
|
3
|
+
import "../Button/buttonVariants.mjs";
|
|
4
|
+
import "../Select/SelectRoot.mjs";
|
|
5
|
+
import { Select as P } from "../Select/Select.mjs";
|
|
6
|
+
const y = ({
|
|
7
|
+
offset: l,
|
|
8
|
+
limit: a,
|
|
9
|
+
totalRows: s,
|
|
10
|
+
setLimit: p,
|
|
11
|
+
setOffset: t,
|
|
12
|
+
tRowsPerPage: d = "Rows per page",
|
|
13
|
+
tPrevious: u = "Previous",
|
|
14
|
+
tPage: x = "Page",
|
|
15
|
+
tNext: v = "Next",
|
|
16
|
+
tOf: h = "Of"
|
|
17
|
+
}) => {
|
|
18
|
+
const r = Math.ceil(l / a) + 1, o = Math.ceil(s / a), m = r === o, b = (e) => {
|
|
19
|
+
t(0), p(parseInt(e));
|
|
20
|
+
}, g = () => {
|
|
21
|
+
let e = l - a;
|
|
22
|
+
e < 0 && (e = 0), t(e);
|
|
23
|
+
}, N = () => {
|
|
24
|
+
let e = l + a;
|
|
25
|
+
e > s && (e = s - a), t(e);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ c("div", { className: "flex items-center justify-end space-x-2 py-4", children: [
|
|
28
|
+
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
|
|
29
|
+
/* @__PURE__ */ n("span", { className: "text-sm text-nowrap", children: d }),
|
|
30
|
+
/* @__PURE__ */ n(
|
|
31
|
+
P,
|
|
32
|
+
{
|
|
33
|
+
value: a == null ? void 0 : a.toString(),
|
|
34
|
+
options: [
|
|
35
|
+
{ value: "5", label: "5" },
|
|
36
|
+
{ value: "10", label: "10" },
|
|
37
|
+
{ value: "20", label: "20" },
|
|
38
|
+
{ value: "30", label: "30" },
|
|
39
|
+
{ value: "50", label: "50" }
|
|
40
|
+
],
|
|
41
|
+
onChange: b,
|
|
42
|
+
placeholder: "6",
|
|
43
|
+
nullable: !1
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ c("div", { className: "space-x-2", children: [
|
|
48
|
+
/* @__PURE__ */ n(
|
|
49
|
+
i,
|
|
50
|
+
{
|
|
51
|
+
variant: "outline",
|
|
52
|
+
size: "sm",
|
|
53
|
+
disabled: !l,
|
|
54
|
+
onClick: g,
|
|
55
|
+
children: u
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ n("span", { className: "text-sm", children: `${x} ${r} ${h} ${o}` }),
|
|
59
|
+
/* @__PURE__ */ n(
|
|
60
|
+
i,
|
|
61
|
+
{
|
|
62
|
+
variant: "outline",
|
|
63
|
+
size: "sm",
|
|
64
|
+
disabled: m,
|
|
65
|
+
onClick: N,
|
|
66
|
+
children: v
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] })
|
|
70
|
+
] });
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
y as TablePagination
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TablePagination';
|
package/Tabs/Tabs.d.ts
ADDED
package/Tabs/Tabs.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Children as p } from "react";
|
|
3
|
+
import { TabsContent as m, TabsRoot as b, TabsList as i, TabsTrigger as h } from "./TabsRoot.mjs";
|
|
4
|
+
const T = (a) => {
|
|
5
|
+
const { tabs: s = [], contents: t } = a;
|
|
6
|
+
return p.map(t, (n, r) => {
|
|
7
|
+
var l;
|
|
8
|
+
if (!n || !s[r]) return null;
|
|
9
|
+
const e = (l = s[r]) == null ? void 0 : l.value, u = n.props || {};
|
|
10
|
+
return /* @__PURE__ */ o(m, { value: e, ...u, children: n }, e);
|
|
11
|
+
});
|
|
12
|
+
}, f = (a) => {
|
|
13
|
+
const { tab: s, tabs: t = [], onChange: n, children: r } = a;
|
|
14
|
+
return /* @__PURE__ */ c(b, { value: s, onValueChange: n, children: [
|
|
15
|
+
/* @__PURE__ */ o(i, { className: "px-2 py-6 bg-[#E0E7FF] rounded-[6px]", children: t.map((e) => /* @__PURE__ */ o(h, { value: e.value, className: "h-8", children: e.label }, e.value)) }),
|
|
16
|
+
r,
|
|
17
|
+
!r && /* @__PURE__ */ o(T, { ...a })
|
|
18
|
+
] });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
T as TabRender,
|
|
22
|
+
f as Tabs
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
declare const TabsRoot: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { TabsRoot, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-tabs";
|
|
4
|
+
import { cn as n } from "@oneplatformdev/utils";
|
|
5
|
+
const m = e.Root, r = a.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ o(
|
|
6
|
+
e.List,
|
|
7
|
+
{
|
|
8
|
+
ref: s,
|
|
9
|
+
className: n(
|
|
10
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
11
|
+
i
|
|
12
|
+
),
|
|
13
|
+
...t
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
r.displayName = e.List.displayName;
|
|
17
|
+
const f = a.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ o(
|
|
18
|
+
e.Trigger,
|
|
19
|
+
{
|
|
20
|
+
ref: s,
|
|
21
|
+
className: n(
|
|
22
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
23
|
+
i
|
|
24
|
+
),
|
|
25
|
+
...t
|
|
26
|
+
}
|
|
27
|
+
));
|
|
28
|
+
f.displayName = e.Trigger.displayName;
|
|
29
|
+
const d = a.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ o(
|
|
30
|
+
e.Content,
|
|
31
|
+
{
|
|
32
|
+
ref: s,
|
|
33
|
+
className: n(
|
|
34
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
35
|
+
i
|
|
36
|
+
),
|
|
37
|
+
...t
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
d.displayName = e.Content.displayName;
|
|
41
|
+
export {
|
|
42
|
+
d as TabsContent,
|
|
43
|
+
r as TabsList,
|
|
44
|
+
m as TabsRoot,
|
|
45
|
+
f as TabsTrigger
|
|
46
|
+
};
|
package/Tabs/index.d.ts
ADDED
package/Tabs/index.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TabsContent as T, TabsList as a, TabsRoot as b, TabsTrigger as e } from "./TabsRoot.mjs";
|
|
2
|
+
import { TabRender as t, Tabs as n } from "./Tabs.mjs";
|
|
3
|
+
export {
|
|
4
|
+
t as TabRender,
|
|
5
|
+
n as Tabs,
|
|
6
|
+
T as TabsContent,
|
|
7
|
+
a as TabsList,
|
|
8
|
+
b as TabsRoot,
|
|
9
|
+
e as TabsTrigger
|
|
10
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsxs as u, Fragment as h, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { useId as w, useRef as z, useState as A, useImperativeHandle as F, useEffect as N } from "react";
|
|
4
|
+
import { cn as d } from "@oneplatformdev/utils";
|
|
5
|
+
import { useAutosizeTextArea as y } from "./useAutosizeTextArea.mjs";
|
|
6
|
+
const S = v.forwardRef(
|
|
7
|
+
(m, c) => {
|
|
8
|
+
const {
|
|
9
|
+
className: f,
|
|
10
|
+
value: r = "",
|
|
11
|
+
maxHeight: o = Number.MAX_SAFE_INTEGER,
|
|
12
|
+
minHeight: i = 0,
|
|
13
|
+
resizeble: x = !0,
|
|
14
|
+
counter: n = !1,
|
|
15
|
+
id: s = "",
|
|
16
|
+
...e
|
|
17
|
+
} = m, a = w(), t = z(null), [g, b] = A("");
|
|
18
|
+
return y({
|
|
19
|
+
textAreaRef: t,
|
|
20
|
+
triggerAutoSize: g,
|
|
21
|
+
maxHeight: o,
|
|
22
|
+
minHeight: i
|
|
23
|
+
}), F(c, () => ({
|
|
24
|
+
...t.current ?? {},
|
|
25
|
+
textArea: t.current,
|
|
26
|
+
focus: () => {
|
|
27
|
+
var l;
|
|
28
|
+
return (l = t == null ? void 0 : t.current) == null ? void 0 : l.focus();
|
|
29
|
+
},
|
|
30
|
+
maxHeight: o,
|
|
31
|
+
minHeight: i
|
|
32
|
+
})), N(() => {
|
|
33
|
+
b(r);
|
|
34
|
+
}, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(h, { children: [
|
|
35
|
+
/* @__PURE__ */ p(
|
|
36
|
+
"textarea",
|
|
37
|
+
{
|
|
38
|
+
id: s || a,
|
|
39
|
+
...e,
|
|
40
|
+
ref: t,
|
|
41
|
+
value: r,
|
|
42
|
+
className: d(
|
|
43
|
+
"flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm",
|
|
44
|
+
"rounded-[12px] border border-input bg-[#FCFCFC] shadow-none",
|
|
45
|
+
"placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
46
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
47
|
+
x ? "resize" : "resize-none !overflow-hidden",
|
|
48
|
+
n && "pb-2",
|
|
49
|
+
f
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
n && /* @__PURE__ */ u(
|
|
54
|
+
"label",
|
|
55
|
+
{
|
|
56
|
+
htmlFor: s || a,
|
|
57
|
+
className: d(
|
|
58
|
+
"w-full text-right inline-flex items-center justify-end",
|
|
59
|
+
"text-sm font-normal text-muted-foreground",
|
|
60
|
+
"leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
61
|
+
),
|
|
62
|
+
children: [
|
|
63
|
+
String(r || "").length,
|
|
64
|
+
" / ",
|
|
65
|
+
e == null ? void 0 : e.maxLength
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
S.displayName = "Textarea";
|
|
73
|
+
export {
|
|
74
|
+
S as Textarea
|
|
75
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps, RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IUseAutosizeTextAreaProps {
|
|
4
|
+
textAreaRef: RefObject<HTMLTextAreaElement | null>;
|
|
5
|
+
triggerAutoSize: string;
|
|
6
|
+
/**
|
|
7
|
+
* The minimum height of the textarea.
|
|
8
|
+
*/
|
|
9
|
+
minHeight?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The maximum height of the textarea.
|
|
12
|
+
*/
|
|
13
|
+
maxHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface TextareaProps extends ComponentProps<'textarea'>, Pick<IUseAutosizeTextAreaProps, 'minHeight' | 'maxHeight'> {
|
|
16
|
+
resizeble?: boolean;
|
|
17
|
+
counter?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
const u = ({
|
|
3
|
+
textAreaRef: r,
|
|
4
|
+
triggerAutoSize: l,
|
|
5
|
+
maxHeight: t = Number.MAX_SAFE_INTEGER,
|
|
6
|
+
minHeight: s = 0
|
|
7
|
+
}) => {
|
|
8
|
+
const [c, i] = f.useState(!0);
|
|
9
|
+
f.useEffect(() => {
|
|
10
|
+
const e = r.current;
|
|
11
|
+
if (e) {
|
|
12
|
+
c && (e.style.minHeight = `${s + 0}px`, t > s && (e.style.maxHeight = `${t}px`), i(!1)), e.style.height = `${s + 0}px`;
|
|
13
|
+
const o = e.scrollHeight;
|
|
14
|
+
o > t ? e.style.height = `${t}px` : e.style.height = `${o + 0}px`;
|
|
15
|
+
}
|
|
16
|
+
}, [r.current, l]);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
u as useAutosizeTextArea
|
|
20
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { SunMoon as h, Sun as u, Moon as p } from "lucide-react";
|
|
4
|
+
import { useTheme as l } from "next-themes";
|
|
5
|
+
import { Button as g } from "../Button/Button.mjs";
|
|
6
|
+
import "../Button/buttonVariants.mjs";
|
|
7
|
+
import { DropdownMenu as T, DropdownMenuTrigger as f, DropdownMenuContent as M, DropdownMenuItem as k } from "../DropdownMenu/DropdownMenu.mjs";
|
|
8
|
+
const y = {
|
|
9
|
+
system: h,
|
|
10
|
+
light: u,
|
|
11
|
+
dark: p
|
|
12
|
+
}, b = () => {
|
|
13
|
+
const { theme: r = "system" } = l(), o = d.useMemo(() => y[r], [r]);
|
|
14
|
+
return /* @__PURE__ */ n(c, { children: [
|
|
15
|
+
/* @__PURE__ */ e(
|
|
16
|
+
o,
|
|
17
|
+
{
|
|
18
|
+
className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0 text-[currentColor] dar:fill-current"
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
22
|
+
] });
|
|
23
|
+
}, I = (r) => {
|
|
24
|
+
const {
|
|
25
|
+
lightLabel: o = "Light",
|
|
26
|
+
darkLabel: a = "Dark",
|
|
27
|
+
systemLabel: s = "System"
|
|
28
|
+
} = r, { setTheme: m } = l();
|
|
29
|
+
return /* @__PURE__ */ n(T, { children: [
|
|
30
|
+
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ e(g, { variant: "outline", size: "icon", children: /* @__PURE__ */ e(b, {}) }) }),
|
|
31
|
+
/* @__PURE__ */ e(M, { align: "end", children: [
|
|
32
|
+
{ value: "system", label: s },
|
|
33
|
+
{ value: "light", label: o },
|
|
34
|
+
{ value: "dark", label: a }
|
|
35
|
+
].map(({ value: t, label: i }) => /* @__PURE__ */ e(
|
|
36
|
+
k,
|
|
37
|
+
{
|
|
38
|
+
onClick: () => m(t),
|
|
39
|
+
children: i
|
|
40
|
+
},
|
|
41
|
+
t
|
|
42
|
+
)) })
|
|
43
|
+
] });
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
I as ThemeModeToggle,
|
|
47
|
+
I as default
|
|
48
|
+
};
|