@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,27 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider as n } from "next-themes";
|
|
3
|
+
function h(e) {
|
|
4
|
+
const {
|
|
5
|
+
children: r,
|
|
6
|
+
attribute: t = "class",
|
|
7
|
+
defaultTheme: s = "system",
|
|
8
|
+
enableSystem: i = !0,
|
|
9
|
+
disableTransitionOnChange: o = !0,
|
|
10
|
+
...a
|
|
11
|
+
} = e;
|
|
12
|
+
return /* @__PURE__ */ m(
|
|
13
|
+
n,
|
|
14
|
+
{
|
|
15
|
+
attribute: t,
|
|
16
|
+
defaultTheme: s,
|
|
17
|
+
enableSystem: i,
|
|
18
|
+
disableTransitionOnChange: o,
|
|
19
|
+
...a,
|
|
20
|
+
children: r
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
h as ThemeProvider,
|
|
26
|
+
h as default
|
|
27
|
+
};
|
package/Theme/index.d.ts
ADDED
package/Theme/index.mjs
ADDED
package/Toast/Toast.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
4
|
+
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
5
|
+
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
+
variant?: "default" | "destructive" | "success" | "info" | "update" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
9
|
+
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
|
package/Toast/Toast.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-toast";
|
|
4
|
+
import { X as c } from "lucide-react";
|
|
5
|
+
import { cn as a } from "@oneplatformdev/utils";
|
|
6
|
+
import { toastVariants as n } from "./toastVariants.mjs";
|
|
7
|
+
const h = e.Provider, m = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
|
|
8
|
+
e.Viewport,
|
|
9
|
+
{
|
|
10
|
+
ref: r,
|
|
11
|
+
className: a(
|
|
12
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
13
|
+
o
|
|
14
|
+
),
|
|
15
|
+
...t
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
m.displayName = e.Viewport.displayName;
|
|
19
|
+
const p = i.forwardRef(({ className: o, variant: t, ...r }, d) => /* @__PURE__ */ s(
|
|
20
|
+
e.Root,
|
|
21
|
+
{
|
|
22
|
+
ref: d,
|
|
23
|
+
className: a(n({ variant: t }), o),
|
|
24
|
+
...r
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
p.displayName = e.Root.displayName;
|
|
28
|
+
const u = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
|
|
29
|
+
e.Action,
|
|
30
|
+
{
|
|
31
|
+
ref: r,
|
|
32
|
+
className: a(
|
|
33
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
|
|
34
|
+
o
|
|
35
|
+
),
|
|
36
|
+
...t
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
u.displayName = e.Action.displayName;
|
|
40
|
+
const l = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
|
|
41
|
+
e.Close,
|
|
42
|
+
{
|
|
43
|
+
ref: r,
|
|
44
|
+
className: a(
|
|
45
|
+
"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
46
|
+
o
|
|
47
|
+
),
|
|
48
|
+
"toast-close": "",
|
|
49
|
+
...t,
|
|
50
|
+
children: /* @__PURE__ */ s(c, { className: "h-4 w-4" })
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
l.displayName = e.Close.displayName;
|
|
54
|
+
const f = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
|
|
55
|
+
e.Title,
|
|
56
|
+
{
|
|
57
|
+
ref: r,
|
|
58
|
+
className: a("text-sm font-semibold [&+div]:text-xs", o),
|
|
59
|
+
...t
|
|
60
|
+
}
|
|
61
|
+
));
|
|
62
|
+
f.displayName = e.Title.displayName;
|
|
63
|
+
const v = i.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ s(
|
|
64
|
+
e.Description,
|
|
65
|
+
{
|
|
66
|
+
ref: r,
|
|
67
|
+
className: a("text-sm opacity-90", o),
|
|
68
|
+
...t
|
|
69
|
+
}
|
|
70
|
+
));
|
|
71
|
+
v.displayName = e.Description.displayName;
|
|
72
|
+
export {
|
|
73
|
+
p as Toast,
|
|
74
|
+
u as ToastAction,
|
|
75
|
+
l as ToastClose,
|
|
76
|
+
v as ToastDescription,
|
|
77
|
+
h as ToastProvider,
|
|
78
|
+
f as ToastTitle,
|
|
79
|
+
m as ToastViewport
|
|
80
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { actionTypes } from './toast.constants';
|
|
2
|
+
import { Toast, ToastAction } from './Toast';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
6
|
+
export type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
7
|
+
type Nullable<T> = T | null | undefined;
|
|
8
|
+
export type ToasterToastVariant = Nullable<"default" | "destructive" | "success" | "info" | "update">;
|
|
9
|
+
export type ToasterToast = ToastProps & {
|
|
10
|
+
id: string;
|
|
11
|
+
variant?: ToasterToastVariant;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
action?: ToastActionElement;
|
|
15
|
+
};
|
|
16
|
+
export type ActionType = typeof actionTypes;
|
|
17
|
+
export type Action = {
|
|
18
|
+
type: ActionType["ADD_TOAST"];
|
|
19
|
+
toast: ToasterToast;
|
|
20
|
+
} | {
|
|
21
|
+
type: ActionType["UPDATE_TOAST"];
|
|
22
|
+
toast: Partial<ToasterToast>;
|
|
23
|
+
} | {
|
|
24
|
+
type: ActionType["DISMISS_TOAST"];
|
|
25
|
+
toastId?: ToasterToast["id"];
|
|
26
|
+
} | {
|
|
27
|
+
type: ActionType["REMOVE_TOAST"];
|
|
28
|
+
toastId?: ToasterToast["id"];
|
|
29
|
+
};
|
|
30
|
+
export interface State {
|
|
31
|
+
toasts: ToasterToast[];
|
|
32
|
+
}
|
|
33
|
+
export type TToast = Omit<ToasterToast, "id">;
|
|
34
|
+
export {};
|
package/Toast/index.d.ts
ADDED
package/Toast/index.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Toast as s, ToastAction as e, ToastClose as r, ToastDescription as a, ToastProvider as T, ToastTitle as i, ToastViewport as p } from "./Toast.mjs";
|
|
2
|
+
import { reducer as f, toast as u, useNotify as d, useToast as l } from "./useToast.mjs";
|
|
3
|
+
export {
|
|
4
|
+
s as Toast,
|
|
5
|
+
e as ToastAction,
|
|
6
|
+
r as ToastClose,
|
|
7
|
+
a as ToastDescription,
|
|
8
|
+
T as ToastProvider,
|
|
9
|
+
i as ToastTitle,
|
|
10
|
+
p as ToastViewport,
|
|
11
|
+
f as reducer,
|
|
12
|
+
u as toast,
|
|
13
|
+
d as useNotify,
|
|
14
|
+
l as useToast
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cva as t } from "class-variance-authority";
|
|
2
|
+
const a = t(
|
|
3
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border bg-background text-foreground",
|
|
8
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
9
|
+
success: "border bg-primary text-white",
|
|
10
|
+
info: "border bg-blue-400 text-white",
|
|
11
|
+
update: "border bg-orange-400 text-white"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "default"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
export {
|
|
20
|
+
a as toastVariants
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToasterToast, Action, State, TToast, ToasterToastVariant } from './Toast.types';
|
|
2
|
+
|
|
3
|
+
export declare const reducer: (state: State, action: Action) => State;
|
|
4
|
+
export declare function toast({ ...props }: TToast): {
|
|
5
|
+
id: string;
|
|
6
|
+
dismiss: () => void;
|
|
7
|
+
update: (props: ToasterToast) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function useToast(): {
|
|
10
|
+
toast: typeof toast;
|
|
11
|
+
dismiss: (toastId?: string) => void;
|
|
12
|
+
toasts: ToasterToast[];
|
|
13
|
+
};
|
|
14
|
+
export declare const useNotify: () => {
|
|
15
|
+
notifyToast: (message: string, variant?: ToasterToastVariant, description?: string) => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
const f = 1, p = 1e6;
|
|
3
|
+
let T = 0;
|
|
4
|
+
function A() {
|
|
5
|
+
return T = (T + 1) % Number.MAX_SAFE_INTEGER, T.toString();
|
|
6
|
+
}
|
|
7
|
+
const a = /* @__PURE__ */ new Map(), S = (t) => {
|
|
8
|
+
if (a.has(t))
|
|
9
|
+
return;
|
|
10
|
+
const s = setTimeout(() => {
|
|
11
|
+
a.delete(t), n({
|
|
12
|
+
type: "REMOVE_TOAST",
|
|
13
|
+
toastId: t
|
|
14
|
+
});
|
|
15
|
+
}, p);
|
|
16
|
+
a.set(t, s);
|
|
17
|
+
}, O = (t, s) => {
|
|
18
|
+
switch (s.type) {
|
|
19
|
+
case "ADD_TOAST":
|
|
20
|
+
return {
|
|
21
|
+
...t,
|
|
22
|
+
toasts: [s.toast, ...t.toasts].slice(0, f)
|
|
23
|
+
};
|
|
24
|
+
case "UPDATE_TOAST":
|
|
25
|
+
return {
|
|
26
|
+
...t,
|
|
27
|
+
toasts: t.toasts.map(
|
|
28
|
+
(e) => e.id === s.toast.id ? { ...e, ...s.toast } : e
|
|
29
|
+
)
|
|
30
|
+
};
|
|
31
|
+
case "DISMISS_TOAST": {
|
|
32
|
+
const { toastId: e } = s;
|
|
33
|
+
return e ? S(e) : t.toasts.forEach((o) => {
|
|
34
|
+
S(o.id);
|
|
35
|
+
}), {
|
|
36
|
+
...t,
|
|
37
|
+
toasts: t.toasts.map(
|
|
38
|
+
(o) => o.id === e || e === void 0 ? {
|
|
39
|
+
...o,
|
|
40
|
+
open: !1
|
|
41
|
+
} : o
|
|
42
|
+
)
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
case "REMOVE_TOAST":
|
|
46
|
+
return s.toastId === void 0 ? {
|
|
47
|
+
...t,
|
|
48
|
+
toasts: []
|
|
49
|
+
} : {
|
|
50
|
+
...t,
|
|
51
|
+
toasts: t.toasts.filter((e) => e.id !== s.toastId)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}, r = [];
|
|
55
|
+
let i = { toasts: [] };
|
|
56
|
+
function n(t) {
|
|
57
|
+
i = O(i, t), r.forEach((s) => {
|
|
58
|
+
s(i);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function d({ ...t }) {
|
|
62
|
+
const s = A(), e = (u) => n({
|
|
63
|
+
type: "UPDATE_TOAST",
|
|
64
|
+
toast: { ...u, id: s }
|
|
65
|
+
}), o = () => n({ type: "DISMISS_TOAST", toastId: s });
|
|
66
|
+
return n({
|
|
67
|
+
type: "ADD_TOAST",
|
|
68
|
+
toast: {
|
|
69
|
+
...t,
|
|
70
|
+
id: s,
|
|
71
|
+
open: !0,
|
|
72
|
+
onOpenChange: (u) => {
|
|
73
|
+
u || o();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}), {
|
|
77
|
+
id: s,
|
|
78
|
+
dismiss: o,
|
|
79
|
+
update: e
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function E() {
|
|
83
|
+
const [t, s] = c.useState(i);
|
|
84
|
+
return c.useEffect(() => (r.push(s), () => {
|
|
85
|
+
const e = r.indexOf(s);
|
|
86
|
+
e > -1 && r.splice(e, 1);
|
|
87
|
+
}), [t]), {
|
|
88
|
+
...t,
|
|
89
|
+
toast: d,
|
|
90
|
+
dismiss: (e) => n({ type: "DISMISS_TOAST", toastId: e })
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const _ = () => ({ notifyToast: (s, e, o) => {
|
|
94
|
+
d({ title: s, variant: e, description: o });
|
|
95
|
+
} });
|
|
96
|
+
export {
|
|
97
|
+
O as reducer,
|
|
98
|
+
d as toast,
|
|
99
|
+
_ as useNotify,
|
|
100
|
+
E as useToast
|
|
101
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useToast as c } from "../Toast/useToast.mjs";
|
|
3
|
+
import { ToastProvider as T, Toast as m, ToastTitle as d, ToastDescription as l, ToastClose as p, ToastViewport as f } from "../Toast/Toast.mjs";
|
|
4
|
+
function g() {
|
|
5
|
+
const { toasts: e } = c();
|
|
6
|
+
return /* @__PURE__ */ r(T, { children: [
|
|
7
|
+
e.map(function({ id: i, title: t, description: s, action: a, ...n }) {
|
|
8
|
+
return /* @__PURE__ */ r(m, { ...n, children: [
|
|
9
|
+
/* @__PURE__ */ r("div", { className: "grid gap-1", children: [
|
|
10
|
+
t && /* @__PURE__ */ o(d, { children: t }),
|
|
11
|
+
s && /* @__PURE__ */ o(l, { children: s })
|
|
12
|
+
] }),
|
|
13
|
+
a,
|
|
14
|
+
/* @__PURE__ */ o(p, {})
|
|
15
|
+
] }, i);
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ o(f, {})
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
g as Toaster
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toaster';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-toggle";
|
|
4
|
+
import { cva as d } from "class-variance-authority";
|
|
5
|
+
import { cn as m } from "@oneplatformdev/utils";
|
|
6
|
+
const g = d(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-transparent",
|
|
12
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-9 px-2 min-w-9",
|
|
16
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
17
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
), l = s.forwardRef(({ className: t, variant: o, size: n, ...r }, a) => /* @__PURE__ */ i(
|
|
26
|
+
e.Root,
|
|
27
|
+
{
|
|
28
|
+
ref: a,
|
|
29
|
+
className: m(g({ variant: o, size: n, className: t })),
|
|
30
|
+
...r
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
l.displayName = e.Root.displayName;
|
|
34
|
+
export {
|
|
35
|
+
l as Toggle,
|
|
36
|
+
g as toggleVariants
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toggle';
|
package/Toggle/index.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string>) & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ToggleGroupItem: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "outline" | null | undefined;
|
|
10
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-toggle-group";
|
|
4
|
+
import { cn as p } from "@oneplatformdev/utils";
|
|
5
|
+
import { toggleVariants as f } from "../Toggle/Toggle.mjs";
|
|
6
|
+
const c = e.createContext({
|
|
7
|
+
size: "default",
|
|
8
|
+
variant: "default"
|
|
9
|
+
}), g = e.forwardRef(({ className: o, variant: r, size: a, children: i, ...s }, m) => /* @__PURE__ */ n(
|
|
10
|
+
t.Root,
|
|
11
|
+
{
|
|
12
|
+
ref: m,
|
|
13
|
+
className: p("flex items-center justify-center gap-1", o),
|
|
14
|
+
...s,
|
|
15
|
+
children: /* @__PURE__ */ n(c.Provider, { value: { variant: r, size: a }, children: i })
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
g.displayName = t.Root.displayName;
|
|
19
|
+
const d = e.forwardRef(({ className: o, children: r, variant: a, size: i, ...s }, m) => {
|
|
20
|
+
const l = e.useContext(c);
|
|
21
|
+
return /* @__PURE__ */ n(
|
|
22
|
+
t.Item,
|
|
23
|
+
{
|
|
24
|
+
ref: m,
|
|
25
|
+
className: p(
|
|
26
|
+
f({
|
|
27
|
+
variant: l.variant || a,
|
|
28
|
+
size: l.size || i
|
|
29
|
+
}),
|
|
30
|
+
o
|
|
31
|
+
),
|
|
32
|
+
...s,
|
|
33
|
+
children: r
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
d.displayName = t.Item.displayName;
|
|
38
|
+
export {
|
|
39
|
+
g as ToggleGroup,
|
|
40
|
+
d as ToggleGroupItem
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToggleGroup';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipProvider as a, TooltipRoot as c, TooltipTrigger as d, TooltipContent as p } from "./TooltipRoot.mjs";
|
|
3
|
+
const m = (r) => {
|
|
4
|
+
const { trigger: t, children: e, message: i = "", delay: l = 100, ...n } = r;
|
|
5
|
+
return /* @__PURE__ */ o(a, { children: /* @__PURE__ */ s(c, { delayDuration: l, ...n, children: [
|
|
6
|
+
/* @__PURE__ */ o(d, { asChild: !0, children: t || e }),
|
|
7
|
+
/* @__PURE__ */ o(p, { className: "bg-gray-300 text-black", children: i })
|
|
8
|
+
] }) });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
m as Tooltip
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
+
declare const TooltipRoot: React.FC<TooltipPrimitive.TooltipProps>;
|
|
5
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-tooltip";
|
|
4
|
+
import { cn as s } from "@oneplatformdev/utils";
|
|
5
|
+
const p = o.Provider, f = o.Root, c = o.Trigger, m = d.forwardRef(({ className: e, sideOffset: i = 4, ...a }, r) => /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ t(
|
|
6
|
+
o.Content,
|
|
7
|
+
{
|
|
8
|
+
ref: r,
|
|
9
|
+
sideOffset: i,
|
|
10
|
+
className: s(
|
|
11
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...a
|
|
15
|
+
}
|
|
16
|
+
) }));
|
|
17
|
+
m.displayName = o.Content.displayName;
|
|
18
|
+
export {
|
|
19
|
+
m as TooltipContent,
|
|
20
|
+
p as TooltipProvider,
|
|
21
|
+
f as TooltipRoot,
|
|
22
|
+
c as TooltipTrigger
|
|
23
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TooltipContent as r, TooltipProvider as i, TooltipRoot as p, TooltipTrigger as T } from "./TooltipRoot.mjs";
|
|
2
|
+
import { Tooltip as l } from "./Tooltip.mjs";
|
|
3
|
+
export {
|
|
4
|
+
l as Tooltip,
|
|
5
|
+
r as TooltipContent,
|
|
6
|
+
i as TooltipProvider,
|
|
7
|
+
p as TooltipRoot,
|
|
8
|
+
T as TooltipTrigger
|
|
9
|
+
};
|