@oneplatformdev/ui 0.0.1-beta.98 → 0.1.2-1
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/README.md +4 -30
- package/package.json +35 -92
- package/src/globals.css +123 -0
- package/Accordion/Accordion.d.ts +0 -9
- package/Accordion/Accordion.mjs +0 -49
- package/Accordion/index.d.ts +0 -1
- package/Accordion/index.mjs +0 -7
- package/Accordion/package.json +0 -7
- package/Alert/Alert.d.ts +0 -7
- package/Alert/Alert.mjs +0 -37
- package/Alert/alertVariants.d.ts +0 -4
- package/Alert/alertVariants.mjs +0 -19
- package/Alert/index.d.ts +0 -1
- package/Alert/index.mjs +0 -6
- package/Alert/package.json +0 -7
- package/AlertDialog/AlertDialog.d.ts +0 -65
- package/AlertDialog/AlertDialog.mjs +0 -97
- package/AlertDialog/AlertDialog.types.d.ts +0 -53
- package/AlertDialog/AlertDialogRoot.d.ts +0 -21
- package/AlertDialog/AlertDialogRoot.mjs +0 -114
- package/AlertDialog/index.d.ts +0 -3
- package/AlertDialog/index.mjs +0 -16
- package/AlertDialog/package.json +0 -7
- package/AreaChart/AreaChart.d.ts +0 -4
- package/AreaChart/AreaChart.mjs +0 -27
- package/AreaChart/AreaChart.types.d.ts +0 -15
- package/AreaChart/index.d.ts +0 -2
- package/AreaChart/index.mjs +0 -4
- package/AreaChart/package.json +0 -7
- package/Aside/Aside.d.ts +0 -4
- package/Aside/Aside.mjs +0 -23
- package/Aside/Aside.types.d.ts +0 -18
- package/Aside/AsideSidebar.d.ts +0 -3
- package/Aside/AsideSidebar.mjs +0 -37
- package/Aside/index.d.ts +0 -3
- package/Aside/index.mjs +0 -7
- package/Aside/package.json +0 -7
- package/AspectRatio/AspectRatio.d.ts +0 -2
- package/AspectRatio/AspectRatio.mjs +0 -5
- package/AspectRatio/index.d.ts +0 -1
- package/AspectRatio/index.mjs +0 -5
- package/AspectRatio/package.json +0 -7
- package/Avatar/Avatar.d.ts +0 -5
- package/Avatar/Avatar.mjs +0 -42
- package/Avatar/index.d.ts +0 -1
- package/Avatar/index.mjs +0 -6
- package/Avatar/package.json +0 -7
- package/Badge/Badge.d.ts +0 -5
- package/Badge/Badge.mjs +0 -10
- package/Badge/Badge.types.d.ts +0 -5
- package/Badge/badgeVariants.d.ts +0 -3
- package/Badge/badgeVariants.mjs +0 -20
- package/Badge/index.d.ts +0 -3
- package/Badge/index.mjs +0 -6
- package/Badge/package.json +0 -7
- package/Breadcrumb/Breadcrumb.d.ts +0 -19
- package/Breadcrumb/Breadcrumb.mjs +0 -90
- package/Breadcrumb/index.d.ts +0 -1
- package/Breadcrumb/index.mjs +0 -10
- package/Breadcrumb/package.json +0 -7
- package/Button/Button.d.ts +0 -4
- package/Button/Button.mjs +0 -32
- package/Button/Button.types.d.ts +0 -8
- package/Button/buttonVariants.d.ts +0 -4
- package/Button/buttonVariants.mjs +0 -29
- package/Button/index.d.ts +0 -3
- package/Button/index.mjs +0 -7
- package/Button/package.json +0 -7
- package/ButtonIcon/ButtonIcon.d.ts +0 -3
- package/ButtonIcon/ButtonIcon.mjs +0 -29
- package/ButtonIcon/ButtonIcon.types.d.ts +0 -7
- package/ButtonIcon/buttonIconVariants.d.ts +0 -7
- package/ButtonIcon/buttonIconVariants.mjs +0 -139
- package/ButtonIcon/index.d.ts +0 -3
- package/ButtonIcon/index.mjs +0 -7
- package/ButtonIcon/package.json +0 -7
- package/Calendar/Calendar.d.ts +0 -8
- package/Calendar/Calendar.mjs +0 -64
- package/Calendar/index.d.ts +0 -1
- package/Calendar/index.mjs +0 -4
- package/Calendar/package.json +0 -7
- package/Card/Card.d.ts +0 -8
- package/Card/Card.mjs +0 -61
- package/Card/index.d.ts +0 -1
- package/Card/index.mjs +0 -9
- package/Card/package.json +0 -7
- package/Carousel/Carousel.d.ts +0 -18
- package/Carousel/Carousel.mjs +0 -168
- package/Carousel/index.d.ts +0 -1
- package/Carousel/index.mjs +0 -8
- package/Carousel/package.json +0 -7
- package/Chart/Chart.d.ts +0 -62
- package/Chart/Chart.mjs +0 -210
- package/Chart/index.d.ts +0 -1
- package/Chart/index.mjs +0 -9
- package/Chart/package.json +0 -7
- package/Checkbox/Checkbox.d.ts +0 -5
- package/Checkbox/Checkbox.mjs +0 -54
- package/Checkbox/Checkbox.types.d.ts +0 -10
- package/Checkbox/index.d.ts +0 -2
- package/Checkbox/index.mjs +0 -5
- package/Checkbox/package.json +0 -7
- package/Collapsible/Collapsible.d.ts +0 -5
- package/Collapsible/Collapsible.mjs +0 -7
- package/Collapsible/index.d.ts +0 -1
- package/Collapsible/index.mjs +0 -6
- package/Collapsible/package.json +0 -7
- package/Combobox/Combobox.d.ts +0 -4
- package/Combobox/Combobox.mjs +0 -15
- package/Combobox/Combobox.types.d.ts +0 -38
- package/Combobox/ComboboxOptionItem.d.ts +0 -5
- package/Combobox/ComboboxOptionItem.mjs +0 -67
- package/Combobox/ComboboxOptions.d.ts +0 -4
- package/Combobox/ComboboxOptions.mjs +0 -12
- package/Combobox/index.d.ts +0 -2
- package/Combobox/index.mjs +0 -4
- package/Combobox/package.json +0 -7
- package/Combobox-B0sHDL7X.js +0 -301
- package/Command/Command.d.ts +0 -80
- package/Command/Command.mjs +0 -116
- package/Command/index.d.ts +0 -1
- package/Command/index.mjs +0 -12
- package/Command/package.json +0 -7
- package/DataTable/DataTable.d.ts +0 -11
- package/DataTable/DataTable.mjs +0 -64
- package/DataTable/DataTable.types.d.ts +0 -11
- package/DataTable/DataTableColumnFilter.d.ts +0 -4
- package/DataTable/DataTableColumnFilter.mjs +0 -31
- package/DataTable/index.d.ts +0 -2
- package/DataTable/index.mjs +0 -4
- package/DataTable/package.json +0 -7
- package/DataTable/useDataTable.d.ts +0 -3
- package/DataTable/useDataTable.mjs +0 -30
- package/DatePicker/DatePicker.d.ts +0 -3
- package/DatePicker/DatePicker.mjs +0 -699
- package/DatePicker/DatePicker.types.d.ts +0 -5
- package/DatePicker/index.d.ts +0 -3
- package/DatePicker/index.mjs +0 -5
- package/DatePicker/package.json +0 -7
- package/Dialog/Dialog.d.ts +0 -21
- package/Dialog/Dialog.mjs +0 -117
- package/Dialog/index.d.ts +0 -1
- package/Dialog/index.mjs +0 -13
- package/Dialog/package.json +0 -7
- package/Drawer/Drawer.d.ts +0 -22
- package/Drawer/Drawer.mjs +0 -98
- package/Drawer/index.d.ts +0 -1
- package/Drawer/index.mjs +0 -13
- package/Drawer/package.json +0 -7
- package/DropdownMenu/DropdownMenu.d.ts +0 -27
- package/DropdownMenu/DropdownMenu.mjs +0 -148
- package/DropdownMenu/index.d.ts +0 -1
- package/DropdownMenu/index.mjs +0 -18
- package/DropdownMenu/package.json +0 -7
- package/Dropzone/Dropzone.d.ts +0 -22
- package/Dropzone/Dropzone.mjs +0 -152
- package/Dropzone/Dropzone.types.d.ts +0 -42
- package/Dropzone/DropzoneFilePreview.d.ts +0 -4
- package/Dropzone/DropzoneFilePreview.mjs +0 -9
- package/Dropzone/DropzoneSinglePickPreview.d.ts +0 -10
- package/Dropzone/DropzoneSinglePickPreview.mjs +0 -41
- package/Dropzone/DropzoneUtils.d.ts +0 -5
- package/Dropzone/DropzoneUtils.mjs +0 -24
- package/Dropzone/index.d.ts +0 -2
- package/Dropzone/index.mjs +0 -7
- package/Dropzone/package.json +0 -7
- package/DropzoneFilePreview-Dhtv8F4u.js +0 -67
- package/Form/Form.d.ts +0 -23
- package/Form/Form.mjs +0 -98
- package/Form/FormRenderControl.d.ts +0 -4
- package/Form/FormRenderControl.mjs +0 -21
- package/Form/FormRenderControl.types.d.ts +0 -16
- package/Form/index.d.ts +0 -3
- package/Form/index.mjs +0 -13
- package/Form/package.json +0 -7
- package/FormCheckbox/FormCheckbox.d.ts +0 -4
- package/FormCheckbox/FormCheckbox.mjs +0 -30
- package/FormCheckbox/FormCheckbox.types.d.ts +0 -7
- package/FormCheckbox/index.d.ts +0 -2
- package/FormCheckbox/index.mjs +0 -4
- package/FormCheckbox/package.json +0 -7
- package/FormCombobox/FormCombobox.d.ts +0 -4
- package/FormCombobox/FormCombobox.mjs +0 -26
- package/FormCombobox/FormCombobox.types.d.ts +0 -6
- package/FormCombobox/index.d.ts +0 -2
- package/FormCombobox/index.mjs +0 -4
- package/FormCombobox/package.json +0 -7
- package/FormDatePicker/FormDatePicker.d.ts +0 -4
- package/FormDatePicker/FormDatePicker.mjs +0 -29
- package/FormDatePicker/FormDatePicker.types.d.ts +0 -6
- package/FormDatePicker/index.d.ts +0 -3
- package/FormDatePicker/index.mjs +0 -5
- package/FormDatePicker/package.json +0 -7
- package/FormDropzone/FormDropzone.d.ts +0 -4
- package/FormDropzone/FormDropzone.mjs +0 -19
- package/FormDropzone/FormDropzone.types.d.ts +0 -6
- package/FormDropzone/index.d.ts +0 -2
- package/FormDropzone/index.mjs +0 -4
- package/FormDropzone/package.json +0 -7
- package/FormInput/FormInput.d.ts +0 -7
- package/FormInput/FormInput.mjs +0 -40
- package/FormInput/FormInput.types.d.ts +0 -6
- package/FormInput/index.d.ts +0 -2
- package/FormInput/index.mjs +0 -4
- package/FormInput/package.json +0 -7
- package/FormRadio/FormRadio.d.ts +0 -4
- package/FormRadio/FormRadio.mjs +0 -40
- package/FormRadio/FormRadio.types.d.ts +0 -6
- package/FormRadio/index.d.ts +0 -2
- package/FormRadio/index.mjs +0 -4
- package/FormRadio/package.json +0 -7
- package/FormSelect/FormSelect.d.ts +0 -4
- package/FormSelect/FormSelect.mjs +0 -40
- package/FormSelect/FormSelect.types.d.ts +0 -6
- package/FormSelect/index.d.ts +0 -2
- package/FormSelect/index.mjs +0 -4
- package/FormSelect/package.json +0 -7
- package/FormTextarea/FormTextarea.d.ts +0 -4
- package/FormTextarea/FormTextarea.mjs +0 -27
- package/FormTextarea/FormTextarea.types.d.ts +0 -6
- package/FormTextarea/index.d.ts +0 -2
- package/FormTextarea/index.mjs +0 -4
- package/FormTextarea/package.json +0 -7
- package/Header/Header.d.ts +0 -4
- package/Header/Header.mjs +0 -26
- package/Header/Header.types.d.ts +0 -3
- package/Header/index.d.ts +0 -2
- package/Header/index.mjs +0 -5
- package/Header/package.json +0 -7
- package/HoverCard/HoverCard.d.ts +0 -6
- package/HoverCard/HoverCard.mjs +0 -23
- package/HoverCard/index.d.ts +0 -1
- package/HoverCard/index.mjs +0 -6
- package/HoverCard/package.json +0 -7
- package/Input/Input.d.ts +0 -6
- package/Input/Input.mjs +0 -73
- package/Input/Input.types.d.ts +0 -17
- package/Input/index.d.ts +0 -3
- package/Input/index.mjs +0 -7
- package/Input/inputVariants.d.ts +0 -3
- package/Input/inputVariants.mjs +0 -24
- package/Input/package.json +0 -7
- package/InputOTP/InputOTP.d.ts +0 -34
- package/InputOTP/InputOTP.mjs +0 -48
- package/InputOTP/index.d.ts +0 -1
- package/InputOTP/index.mjs +0 -7
- package/InputOTP/package.json +0 -7
- package/Label/Label.d.ts +0 -5
- package/Label/Label.mjs +0 -17
- package/Label/index.d.ts +0 -2
- package/Label/index.mjs +0 -6
- package/Label/labelVariants.d.ts +0 -1
- package/Label/labelVariants.mjs +0 -10
- package/Label/package.json +0 -7
- package/LazyLoader/LazyLoader.d.ts +0 -20
- package/LazyLoader/LazyLoader.mjs +0 -8
- package/LazyLoader/index.d.ts +0 -1
- package/LazyLoader/index.mjs +0 -5
- package/LazyLoader/package.json +0 -7
- package/LoadingMask/LoadingMask.d.ts +0 -4
- package/LoadingMask/LoadingMask.mjs +0 -21
- package/LoadingMask/LoadingMask.types.d.ts +0 -5
- package/LoadingMask/RenderLoadingMask.d.ts +0 -3
- package/LoadingMask/RenderLoadingMask.mjs +0 -108
- package/LoadingMask/index.d.ts +0 -3
- package/LoadingMask/index.mjs +0 -6
- package/LoadingMask/package.json +0 -7
- package/LoadingProgress/LoadingProgress.d.ts +0 -4
- package/LoadingProgress/LoadingProgress.mjs +0 -37
- package/LoadingProgress/LoadingProgress.types.d.ts +0 -8
- package/LoadingProgress/index.d.ts +0 -3
- package/LoadingProgress/index.mjs +0 -6
- package/LoadingProgress/loadingProgressVariants.d.ts +0 -4
- package/LoadingProgress/loadingProgressVariants.mjs +0 -24
- package/LoadingProgress/package.json +0 -7
- package/Menubar/Menubar.d.ts +0 -28
- package/Menubar/Menubar.mjs +0 -175
- package/Menubar/index.d.ts +0 -1
- package/Menubar/index.mjs +0 -19
- package/Menubar/package.json +0 -7
- package/NavigationMenu/NavigationMenu.d.ts +0 -11
- package/NavigationMenu/NavigationMenu.mjs +0 -101
- package/NavigationMenu/index.d.ts +0 -2
- package/NavigationMenu/index.mjs +0 -13
- package/NavigationMenu/navigationMenuVariants.d.ts +0 -1
- package/NavigationMenu/navigationMenuVariants.mjs +0 -7
- package/NavigationMenu/package.json +0 -7
- package/Pagination/Pagination.d.ts +0 -28
- package/Pagination/Pagination.mjs +0 -106
- package/Pagination/index.d.ts +0 -1
- package/Pagination/index.mjs +0 -10
- package/Pagination/package.json +0 -7
- package/Popover/Popover.d.ts +0 -7
- package/Popover/Popover.mjs +0 -28
- package/Popover/index.d.ts +0 -1
- package/Popover/index.mjs +0 -7
- package/Popover/package.json +0 -7
- package/Progress/Progress.d.ts +0 -4
- package/Progress/Progress.mjs +0 -26
- package/Progress/index.d.ts +0 -1
- package/Progress/index.mjs +0 -4
- package/Progress/package.json +0 -7
- package/Radio/Radio.d.ts +0 -4
- package/Radio/Radio.mjs +0 -12
- package/Radio/Radio.types.d.ts +0 -11
- package/Radio/index.d.ts +0 -2
- package/Radio/index.mjs +0 -4
- package/Radio/package.json +0 -7
- package/RadioGroup/RadioGroup.d.ts +0 -11
- package/RadioGroup/RadioGroup.mjs +0 -49
- package/RadioGroup/index.d.ts +0 -1
- package/RadioGroup/index.mjs +0 -6
- package/RadioGroup/package.json +0 -7
- package/Resizable/Resizable.d.ts +0 -23
- package/Resizable/Resizable.mjs +0 -36
- package/Resizable/index.d.ts +0 -1
- package/Resizable/index.mjs +0 -6
- package/Resizable/package.json +0 -7
- package/ScrollArea/ScrollArea.d.ts +0 -5
- package/ScrollArea/ScrollArea.mjs +0 -51
- package/ScrollArea/index.d.ts +0 -1
- package/ScrollArea/index.mjs +0 -5
- package/ScrollArea/package.json +0 -7
- package/Search/Search.d.ts +0 -4
- package/Search/Search.mjs +0 -30
- package/Search/Search.types.d.ts +0 -6
- package/Search/index.d.ts +0 -3
- package/Search/index.mjs +0 -5
- package/Search/package.json +0 -7
- package/Select/Select.d.ts +0 -3
- package/Select/Select.mjs +0 -103
- package/Select/Select.types.d.ts +0 -37
- package/Select/SelectRoot.d.ts +0 -13
- package/Select/SelectRoot.mjs +0 -126
- package/Select/index.d.ts +0 -3
- package/Select/index.mjs +0 -15
- package/Select/package.json +0 -7
- package/Separator/Separator.d.ts +0 -4
- package/Separator/Separator.mjs +0 -24
- package/Separator/index.d.ts +0 -1
- package/Separator/index.mjs +0 -4
- package/Separator/package.json +0 -7
- package/Sheet/Sheet.d.ts +0 -28
- package/Sheet/Sheet.mjs +0 -110
- package/Sheet/index.d.ts +0 -1
- package/Sheet/index.mjs +0 -13
- package/Sheet/package.json +0 -7
- package/Sidebar/Sidebar.d.ts +0 -66
- package/Sidebar/Sidebar.mjs +0 -543
- package/Sidebar/index.d.ts +0 -1
- package/Sidebar/index.mjs +0 -27
- package/Sidebar/package.json +0 -7
- package/Skeleton/Skeleton.d.ts +0 -4
- package/Skeleton/Skeleton.mjs +0 -17
- package/Skeleton/index.d.ts +0 -1
- package/Skeleton/index.mjs +0 -4
- package/Skeleton/package.json +0 -7
- package/Slider/Slider.d.ts +0 -4
- package/Slider/Slider.mjs +0 -23
- package/Slider/index.d.ts +0 -1
- package/Slider/index.mjs +0 -4
- package/Slider/package.json +0 -7
- package/Sonner/Sonner.d.ts +0 -5
- package/Sonner/Sonner.mjs +0 -25
- package/Sonner/index.d.ts +0 -1
- package/Sonner/index.mjs +0 -4
- package/Sonner/package.json +0 -7
- package/Switch/Switch.d.ts +0 -4
- package/Switch/Switch.mjs +0 -27
- package/Switch/index.d.ts +0 -1
- package/Switch/index.mjs +0 -4
- package/Switch/package.json +0 -7
- package/Table/Table.d.ts +0 -10
- package/Table/Table.mjs +0 -90
- package/Table/index.d.ts +0 -1
- package/Table/index.mjs +0 -11
- package/Table/package.json +0 -7
- package/TablePagination/TablePagination.d.ts +0 -16
- package/TablePagination/TablePagination.mjs +0 -74
- package/TablePagination/index.d.ts +0 -1
- package/TablePagination/index.mjs +0 -4
- package/TablePagination/package.json +0 -7
- package/Tabs/Tabs.d.ts +0 -5
- package/Tabs/Tabs.mjs +0 -23
- package/Tabs/Tabs.types.d.ts +0 -12
- package/Tabs/TabsRoot.d.ts +0 -7
- package/Tabs/TabsRoot.mjs +0 -46
- package/Tabs/index.d.ts +0 -2
- package/Tabs/index.mjs +0 -10
- package/Tabs/package.json +0 -7
- package/Textarea/Textarea.d.ts +0 -4
- package/Textarea/Textarea.mjs +0 -74
- package/Textarea/Textarea.types.d.ts +0 -18
- package/Textarea/index.d.ts +0 -2
- package/Textarea/index.mjs +0 -4
- package/Textarea/package.json +0 -7
- package/Textarea/useAutosizeTextArea.d.ts +0 -3
- package/Textarea/useAutosizeTextArea.mjs +0 -20
- package/Theme/ThemeModeToggle.d.ts +0 -8
- package/Theme/ThemeModeToggle.mjs +0 -48
- package/Theme/ThemeProvider.d.ts +0 -4
- package/Theme/ThemeProvider.mjs +0 -27
- package/Theme/index.d.ts +0 -2
- package/Theme/index.mjs +0 -6
- package/Theme/package.json +0 -7
- package/Toast/Toast.d.ts +0 -13
- package/Toast/Toast.mjs +0 -80
- package/Toast/Toast.types.d.ts +0 -34
- package/Toast/index.d.ts +0 -3
- package/Toast/index.mjs +0 -15
- package/Toast/package.json +0 -7
- package/Toast/toast.constants.d.ts +0 -6
- package/Toast/toast.constants.mjs +0 -9
- package/Toast/toastVariants.d.ts +0 -3
- package/Toast/toastVariants.mjs +0 -21
- package/Toast/useToast.d.ts +0 -16
- package/Toast/useToast.mjs +0 -101
- package/Toaster/Toaster.d.ts +0 -1
- package/Toaster/Toaster.mjs +0 -22
- package/Toaster/index.d.ts +0 -1
- package/Toaster/index.mjs +0 -4
- package/Toaster/package.json +0 -7
- package/Toggle/Toggle.d.ts +0 -12
- package/Toggle/Toggle.mjs +0 -37
- package/Toggle/index.d.ts +0 -1
- package/Toggle/index.mjs +0 -5
- package/Toggle/package.json +0 -7
- package/ToggleGroup/ToggleGroup.d.ts +0 -12
- package/ToggleGroup/ToggleGroup.mjs +0 -41
- package/ToggleGroup/index.d.ts +0 -1
- package/ToggleGroup/index.mjs +0 -5
- package/ToggleGroup/package.json +0 -7
- package/Tooltip/Tooltip.d.ts +0 -4
- package/Tooltip/Tooltip.mjs +0 -12
- package/Tooltip/Tooltip.types.d.ts +0 -8
- package/Tooltip/TooltipRoot.d.ts +0 -7
- package/Tooltip/TooltipRoot.mjs +0 -23
- package/Tooltip/index.d.ts +0 -3
- package/Tooltip/index.mjs +0 -9
- package/Tooltip/package.json +0 -7
- package/index.css +0 -1
- package/index.d.ts +0 -68
- package/index.mjs +0 -367
- package/tailwind.config.mjs +0 -148
package/README.md
CHANGED
@@ -1,33 +1,7 @@
|
|
1
|
-
|
2
|
-
<p align="center">
|
3
|
-
<a href="https://github.com/oneplatformdev/core-web/tree/test" rel="noopener" target="_blank"><img width="150" height="133" src="https://github.com/oneplatformdev/core-web/blob/test/public/one_platform_demo_logo.png" alt="OnePlatform Dev"></a>
|
4
|
-
</p>
|
1
|
+
# ui
|
5
2
|
|
6
|
-
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
7
4
|
|
8
|
-
##
|
9
|
-
Install the package in your project directory with:
|
5
|
+
## Building
|
10
6
|
|
11
|
-
|
12
|
-
npm:
|
13
|
-
```bush
|
14
|
-
npm install @oneplatformdev/ui lucide-react
|
15
|
-
```
|
16
|
-
yarn:
|
17
|
-
```bush
|
18
|
-
yarn add @oneplatformdev/ui lucide-react
|
19
|
-
```
|
20
|
-
|
21
|
-
## Documentation (currently unavailable)
|
22
|
-
|
23
|
-
## Examples (currently unavailable)
|
24
|
-
|
25
|
-
## License
|
26
|
-
This project is licensed under the terms of the
|
27
|
-
[MIT license](./LICENSE).
|
28
|
-
|
29
|
-
## Usage
|
30
|
-
```tsx
|
31
|
-
import '@oneplatformdev/ui/index.css';
|
32
|
-
import { Button } from '@oneplatformdev/ui';
|
33
|
-
```
|
7
|
+
Run `nx build ui` to build the library.
|
package/package.json
CHANGED
@@ -1,103 +1,46 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oneplatformdev/ui",
|
3
|
-
"version": "0.
|
4
|
-
"description": "UI React Components.",
|
5
|
-
"author": "One Platform Development Team",
|
6
|
-
"keywords": [
|
7
|
-
"react",
|
8
|
-
"oneplatform",
|
9
|
-
"ui"
|
10
|
-
],
|
11
|
-
"license": "MIT",
|
12
|
-
"repository": {
|
13
|
-
"type": "git",
|
14
|
-
"url": "git+https://github.com/oneplatformdev/core-web.git",
|
15
|
-
"directory": "packages/ui"
|
16
|
-
},
|
17
|
-
"bugs": {
|
18
|
-
"url": "https://github.com/oneplatformdev/core/issues"
|
19
|
-
},
|
20
|
-
"homepage": "private package",
|
3
|
+
"version": "0.1.2-1",
|
21
4
|
"type": "module",
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"default": "./index.mjs",
|
26
|
-
"types": "./index.d.ts",
|
27
|
-
"scripts": {
|
28
|
-
"beta-version-patch": "npm version $(semver $npm_package_version -i prerelease --preid beta)",
|
29
|
-
"semver": "npm version $(semver $npm_package_version -i $release --preid $preid)"
|
30
|
-
},
|
5
|
+
"main": "./dist/index.js",
|
6
|
+
"module": "./dist/index.js",
|
7
|
+
"types": "./dist/index.d.ts",
|
31
8
|
"sideEffects": [
|
32
|
-
"
|
9
|
+
"./src/globals.css"
|
33
10
|
],
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
11
|
+
"exports": {
|
12
|
+
"./package.json": "./package.json",
|
13
|
+
"./styles.css": "./src/globals.css",
|
14
|
+
".": {
|
15
|
+
"types": "./dist/index.d.ts",
|
16
|
+
"import": "./dist/index.js",
|
17
|
+
"default": "./dist/index.js"
|
18
|
+
},
|
19
|
+
"./*": {
|
20
|
+
"types": "./dist/*.d.ts",
|
21
|
+
"import": "./dist/*.js",
|
22
|
+
"default": "./dist/*.js"
|
40
23
|
}
|
41
24
|
},
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
|
47
|
-
|
48
|
-
"
|
25
|
+
"files": [
|
26
|
+
"dist",
|
27
|
+
"src/globals.css",
|
28
|
+
"README.md"
|
29
|
+
],
|
30
|
+
"peerDependencies": {
|
31
|
+
"react": ">=18",
|
32
|
+
"react-dom": ">=18",
|
33
|
+
"tailwindcss": ">=4.0.0"
|
49
34
|
},
|
50
|
-
"
|
51
|
-
"@types/react":
|
52
|
-
|
53
|
-
|
54
|
-
"
|
55
|
-
"optional": true
|
56
|
-
}
|
35
|
+
"devDependencies": {
|
36
|
+
"@types/react": "^18.3.24",
|
37
|
+
"@types/react-dom": "^18.3.7",
|
38
|
+
"react": "^18.3.1",
|
39
|
+
"react-dom": "^18.3.1"
|
57
40
|
},
|
58
41
|
"dependencies": {
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"@oneplatformdev/utils": "
|
62
|
-
"@radix-ui/react-accordion": "^1.2.2",
|
63
|
-
"@radix-ui/react-alert-dialog": "^1.1.4",
|
64
|
-
"@radix-ui/react-aspect-ratio": "^1.1.1",
|
65
|
-
"@radix-ui/react-avatar": "^1.1.2",
|
66
|
-
"@radix-ui/react-checkbox": "^1.1.3",
|
67
|
-
"@radix-ui/react-collapsible": "^1.1.2",
|
68
|
-
"@radix-ui/react-dialog": "^1.1.4",
|
69
|
-
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
70
|
-
"@radix-ui/react-hover-card": "^1.1.4",
|
71
|
-
"@radix-ui/react-label": "^2.1.1",
|
72
|
-
"@radix-ui/react-menubar": "^1.1.4",
|
73
|
-
"@radix-ui/react-navigation-menu": "^1.2.3",
|
74
|
-
"@radix-ui/react-popover": "^1.1.4",
|
75
|
-
"@radix-ui/react-progress": "^1.1.1",
|
76
|
-
"@radix-ui/react-radio-group": "^1.2.2",
|
77
|
-
"@radix-ui/react-scroll-area": "^1.2.2",
|
78
|
-
"@radix-ui/react-select": "^2.1.4",
|
79
|
-
"@radix-ui/react-separator": "^1.1.1",
|
80
|
-
"@radix-ui/react-slider": "^1.2.2",
|
81
|
-
"@radix-ui/react-slot": "^1.1.1",
|
82
|
-
"@radix-ui/react-switch": "^1.1.2",
|
83
|
-
"@radix-ui/react-tabs": "^1.1.2",
|
84
|
-
"@radix-ui/react-toast": "^1.2.4",
|
85
|
-
"@radix-ui/react-toggle": "^1.1.1",
|
86
|
-
"@radix-ui/react-toggle-group": "^1.1.1",
|
87
|
-
"@radix-ui/react-tooltip": "^1.1.6",
|
88
|
-
"@tanstack/react-table": "^8.20.6",
|
89
|
-
"cmdk": "1.0.0",
|
90
|
-
"date-fns": "^4.1.0",
|
91
|
-
"embla-carousel-react": "^8.5.1",
|
92
|
-
"input-otp": "^1.4.1",
|
93
|
-
"next-themes": "^0.4.4",
|
94
|
-
"react-day-picker": "8.10.1",
|
95
|
-
"react-dropzone": "^14.3.5",
|
96
|
-
"react-hook-form": "^7.54.2",
|
97
|
-
"react-resizable-panels": "^2.1.7",
|
98
|
-
"recharts": "^2.15.0",
|
99
|
-
"sonner": "^1.7.1",
|
100
|
-
"vaul": "^1.1.2",
|
101
|
-
"zod": "^3.24.1"
|
42
|
+
"class-variance-authority": "^0.7.0",
|
43
|
+
"tslib": "^2.3.0",
|
44
|
+
"@oneplatformdev/utils": "0.1.1-7"
|
102
45
|
}
|
103
|
-
}
|
46
|
+
}
|
package/src/globals.css
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
@import "tailwindcss";
|
2
|
+
@import "tw-animate-css";
|
3
|
+
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
5
|
+
|
6
|
+
:root {
|
7
|
+
--background: oklch(1 0 0);
|
8
|
+
--foreground: oklch(0.145 0 0);
|
9
|
+
--card: oklch(1 0 0);
|
10
|
+
--card-foreground: oklch(0.145 0 0);
|
11
|
+
--popover: oklch(1 0 0);
|
12
|
+
--popover-foreground: oklch(0.145 0 0);
|
13
|
+
--primary: oklch(0.205 0 0);
|
14
|
+
--primary-foreground: oklch(0.985 0 0);
|
15
|
+
--secondary: oklch(0.97 0 0);
|
16
|
+
--secondary-foreground: oklch(0.205 0 0);
|
17
|
+
--muted: oklch(0.97 0 0);
|
18
|
+
--muted-foreground: oklch(0.556 0 0);
|
19
|
+
--accent: oklch(0.97 0 0);
|
20
|
+
--accent-foreground: oklch(0.205 0 0);
|
21
|
+
--destructive: oklch(0.577 0.245 27.325);
|
22
|
+
--destructive-foreground: oklch(0.577 0.245 27.325);
|
23
|
+
--border: oklch(0.922 0 0);
|
24
|
+
--input: oklch(0.922 0 0);
|
25
|
+
--ring: oklch(0.708 0 0);
|
26
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
27
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
28
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
29
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
30
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
31
|
+
--radius: 0.625rem;
|
32
|
+
--sidebar: oklch(0.985 0 0);
|
33
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
34
|
+
--sidebar-primary: oklch(0.205 0 0);
|
35
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
36
|
+
--sidebar-accent: oklch(0.97 0 0);
|
37
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
38
|
+
--sidebar-border: oklch(0.922 0 0);
|
39
|
+
--sidebar-ring: oklch(0.708 0 0);
|
40
|
+
}
|
41
|
+
|
42
|
+
.dark {
|
43
|
+
--background: oklch(0.145 0 0);
|
44
|
+
--foreground: oklch(0.985 0 0);
|
45
|
+
--card: oklch(0.145 0 0);
|
46
|
+
--card-foreground: oklch(0.985 0 0);
|
47
|
+
--popover: oklch(0.145 0 0);
|
48
|
+
--popover-foreground: oklch(0.985 0 0);
|
49
|
+
--primary: oklch(0.985 0 0);
|
50
|
+
--primary-foreground: oklch(0.205 0 0);
|
51
|
+
--secondary: oklch(0.269 0 0);
|
52
|
+
--secondary-foreground: oklch(0.985 0 0);
|
53
|
+
--muted: oklch(0.269 0 0);
|
54
|
+
--muted-foreground: oklch(0.708 0 0);
|
55
|
+
--accent: oklch(0.269 0 0);
|
56
|
+
--accent-foreground: oklch(0.985 0 0);
|
57
|
+
--destructive: oklch(0.396 0.141 25.723);
|
58
|
+
--destructive-foreground: oklch(0.637 0.237 25.331);
|
59
|
+
--border: oklch(0.269 0 0);
|
60
|
+
--input: oklch(0.269 0 0);
|
61
|
+
--ring: oklch(0.439 0 0);
|
62
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
63
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
64
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
65
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
66
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
67
|
+
--sidebar: oklch(0.205 0 0);
|
68
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
69
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
70
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
71
|
+
--sidebar-accent: oklch(0.269 0 0);
|
72
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
73
|
+
--sidebar-border: oklch(0.269 0 0);
|
74
|
+
--sidebar-ring: oklch(0.439 0 0);
|
75
|
+
}
|
76
|
+
|
77
|
+
@theme inline {
|
78
|
+
--color-background: var(--background);
|
79
|
+
--color-foreground: var(--foreground);
|
80
|
+
--color-card: var(--card);
|
81
|
+
--color-card-foreground: var(--card-foreground);
|
82
|
+
--color-popover: var(--popover);
|
83
|
+
--color-popover-foreground: var(--popover-foreground);
|
84
|
+
--color-primary: var(--primary);
|
85
|
+
--color-primary-foreground: var(--primary-foreground);
|
86
|
+
--color-secondary: var(--secondary);
|
87
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
88
|
+
--color-muted: var(--muted);
|
89
|
+
--color-muted-foreground: var(--muted-foreground);
|
90
|
+
--color-accent: var(--accent);
|
91
|
+
--color-accent-foreground: var(--accent-foreground);
|
92
|
+
--color-destructive: var(--destructive);
|
93
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
94
|
+
--color-border: var(--border);
|
95
|
+
--color-input: var(--input);
|
96
|
+
--color-ring: var(--ring);
|
97
|
+
--color-chart-1: var(--chart-1);
|
98
|
+
--color-chart-2: var(--chart-2);
|
99
|
+
--color-chart-3: var(--chart-3);
|
100
|
+
--color-chart-4: var(--chart-4);
|
101
|
+
--color-chart-5: var(--chart-5);
|
102
|
+
--radius-sm: calc(var(--radius) - 4px);
|
103
|
+
--radius-md: calc(var(--radius) - 2px);
|
104
|
+
--radius-lg: var(--radius);
|
105
|
+
--radius-xl: calc(var(--radius) + 4px);
|
106
|
+
--color-sidebar: var(--sidebar);
|
107
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
108
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
109
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
110
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
111
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
112
|
+
--color-sidebar-border: var(--sidebar-border);
|
113
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
114
|
+
}
|
115
|
+
|
116
|
+
@layer base {
|
117
|
+
* {
|
118
|
+
@apply border-border outline-ring/50;
|
119
|
+
}
|
120
|
+
body {
|
121
|
+
@apply bg-background text-foreground;
|
122
|
+
}
|
123
|
+
}
|
package/Accordion/Accordion.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
3
|
-
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
4
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
5
|
-
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
6
|
-
showChevron?: boolean;
|
7
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
8
|
-
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
9
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
package/Accordion/Accordion.mjs
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
2
|
-
import * as s from "react";
|
3
|
-
import * as e from "@radix-ui/react-accordion";
|
4
|
-
import { ChevronDown as l } from "lucide-react";
|
5
|
-
import { cn as c } from "@oneplatformdev/utils";
|
6
|
-
const w = e.Root, f = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ a(
|
7
|
-
e.Item,
|
8
|
-
{
|
9
|
-
ref: r,
|
10
|
-
className: c("border-b", t),
|
11
|
-
...o
|
12
|
-
}
|
13
|
-
));
|
14
|
-
f.displayName = "AccordionItem";
|
15
|
-
const p = s.forwardRef(({ className: t, children: o, showChevron: r = !0, ...i }, m) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ d(
|
16
|
-
e.Trigger,
|
17
|
-
{
|
18
|
-
ref: m,
|
19
|
-
className: c(
|
20
|
-
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all text-left [&[data-state=open]>svg]:rotate-180",
|
21
|
-
t
|
22
|
-
),
|
23
|
-
onKeyDown: (n) => {
|
24
|
-
n.key === " " && n.target === n.currentTarget && n.preventDefault();
|
25
|
-
},
|
26
|
-
...i,
|
27
|
-
children: [
|
28
|
-
o,
|
29
|
-
r && /* @__PURE__ */ a(l, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
30
|
-
]
|
31
|
-
}
|
32
|
-
) }));
|
33
|
-
p.displayName = e.Trigger.displayName;
|
34
|
-
const N = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(
|
35
|
-
e.Content,
|
36
|
-
{
|
37
|
-
ref: i,
|
38
|
-
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
39
|
-
...r,
|
40
|
-
children: /* @__PURE__ */ a("div", { className: c("pb-4 pt-0", t), children: o })
|
41
|
-
}
|
42
|
-
));
|
43
|
-
N.displayName = e.Content.displayName;
|
44
|
-
export {
|
45
|
-
w as Accordion,
|
46
|
-
N as AccordionContent,
|
47
|
-
f as AccordionItem,
|
48
|
-
p as AccordionTrigger
|
49
|
-
};
|
package/Accordion/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Accordion';
|
package/Accordion/index.mjs
DELETED
package/Accordion/package.json
DELETED
package/Alert/Alert.d.ts
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
2
|
-
import * as React from "react";
|
3
|
-
export declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
5
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
6
|
-
export declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
7
|
-
export declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
package/Alert/Alert.mjs
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
2
|
-
import * as i from "react";
|
3
|
-
import { cn as l } from "@oneplatformdev/utils";
|
4
|
-
import { alertVariants as m } from "./alertVariants.mjs";
|
5
|
-
const s = i.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ a(
|
6
|
-
"div",
|
7
|
-
{
|
8
|
-
ref: o,
|
9
|
-
role: "alert",
|
10
|
-
className: l(m({ variant: r }), e),
|
11
|
-
...t
|
12
|
-
}
|
13
|
-
));
|
14
|
-
s.displayName = "Alert";
|
15
|
-
const n = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
16
|
-
"h5",
|
17
|
-
{
|
18
|
-
ref: t,
|
19
|
-
className: l("mb-1 font-medium leading-none tracking-tight", e),
|
20
|
-
...r
|
21
|
-
}
|
22
|
-
));
|
23
|
-
n.displayName = "AlertTitle";
|
24
|
-
const d = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
25
|
-
"div",
|
26
|
-
{
|
27
|
-
ref: t,
|
28
|
-
className: l("text-sm [&_p]:leading-relaxed", e),
|
29
|
-
...r
|
30
|
-
}
|
31
|
-
));
|
32
|
-
d.displayName = "AlertDescription";
|
33
|
-
export {
|
34
|
-
s as Alert,
|
35
|
-
d as AlertDescription,
|
36
|
-
n as AlertTitle
|
37
|
-
};
|
package/Alert/alertVariants.d.ts
DELETED
package/Alert/alertVariants.mjs
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { cva as t } from "class-variance-authority";
|
2
|
-
const r = t(
|
3
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
4
|
-
{
|
5
|
-
variants: {
|
6
|
-
variant: {
|
7
|
-
default: "bg-background text-foreground",
|
8
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
9
|
-
}
|
10
|
-
},
|
11
|
-
defaultVariants: {
|
12
|
-
variant: "default"
|
13
|
-
}
|
14
|
-
}
|
15
|
-
);
|
16
|
-
export {
|
17
|
-
r as alertVariants,
|
18
|
-
r as default
|
19
|
-
};
|
package/Alert/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './Alert';
|
package/Alert/index.mjs
DELETED
package/Alert/package.json
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
import { AlertDialogProps } from './AlertDialog.types';
|
2
|
-
import { FC, PropsWithChildren } from 'react';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Component for show Alert Dialog.
|
6
|
-
* @public
|
7
|
-
* @see [Documentation](#)
|
8
|
-
* @example
|
9
|
-
* > Import:
|
10
|
-
* ```tsx
|
11
|
-
* import { AlertDialog } from '@oneplatformdev/ui/AlertDialog';
|
12
|
-
* ```
|
13
|
-
* > Simple example:
|
14
|
-
* ```tsx
|
15
|
-
* <AlertDialog
|
16
|
-
* trigger={'Trigger text'} // may be any ReactNode | Button | string
|
17
|
-
* variant='alert' // 'confirm' (default) | 'alert' | 'destructive'
|
18
|
-
* title='Dialog title'
|
19
|
-
* description='Description text...'
|
20
|
-
* />
|
21
|
-
* ```
|
22
|
-
* > Base example:
|
23
|
-
* ```tsx
|
24
|
-
* <AlertDialog
|
25
|
-
* trigger={<Button variant="outline">Simple Trigger</Button>}
|
26
|
-
* title='Dialog title'
|
27
|
-
* description='Description text...'
|
28
|
-
* onCancel={(event) => console.log(event, 'Cancel')}
|
29
|
-
* onConfirm={(event) => console.log(event, 'Confirm')}
|
30
|
-
* />
|
31
|
-
* ```
|
32
|
-
* > Trigger example: Button with icon children
|
33
|
-
* ```tsx
|
34
|
-
* <AlertDialog
|
35
|
-
* trigger={<Button variant="outline" size="icon"><PencilLine /></Button>}
|
36
|
-
* title="Dialog title with icon trigger"
|
37
|
-
* description="Description text..."
|
38
|
-
* onCancel={(event) => console.log(event, 'Cancel')}
|
39
|
-
* onConfirm={(event) => console.log(event, 'Confirm')}
|
40
|
-
* />
|
41
|
-
* ```
|
42
|
-
*
|
43
|
-
* > Full content example:
|
44
|
-
* ```tsx
|
45
|
-
* <AlertDialog trigger={<Button variant="outline">Full Content Trigger</Button>}>
|
46
|
-
* Full Content...
|
47
|
-
* </AlertDialog>
|
48
|
-
* ```
|
49
|
-
*
|
50
|
-
* > Full control example:
|
51
|
-
* ```tsx
|
52
|
-
* <AlertDialog
|
53
|
-
* open={true}
|
54
|
-
* onOpenChange={(nextState) => console.log(nextState)}
|
55
|
-
* trigger={<Button variant="outline">Control Trigger</Button>}
|
56
|
-
* header={<div>Custom Header</div>}
|
57
|
-
* footer={[
|
58
|
-
* <Button key='cancel' variant="outline" onClick={() => {}}>On Action</Button>,
|
59
|
-
* <Button key='action' variant="outline" onClick={() => {}}>On Action</Button>,
|
60
|
-
* ]}
|
61
|
-
* />
|
62
|
-
* ```
|
63
|
-
*/
|
64
|
-
export declare const AlertDialog: FC<PropsWithChildren<AlertDialogProps>>;
|
65
|
-
export default AlertDialog;
|
@@ -1,97 +0,0 @@
|
|
1
|
-
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
2
|
-
import { cloneElement as a, useId as j, Children as y } from "react";
|
3
|
-
import { AlertDialogRoot as E, AlertDialogContent as u, AlertDialogTrigger as v, AlertDialogHeader as f, AlertDialogTitle as B, AlertDialogDescription as R, AlertDialogFooter as A, AlertDialogAction as D, AlertDialogCancel as k } from "./AlertDialogRoot.mjs";
|
4
|
-
import { isValidReactElement as s } from "@oneplatformdev/utils";
|
5
|
-
const F = (o) => {
|
6
|
-
const { slotProps: e = {}, children: r } = o, i = e.trigger ?? {};
|
7
|
-
return s(r, v) ? a(
|
8
|
-
r,
|
9
|
-
{
|
10
|
-
...r.props || {},
|
11
|
-
...i
|
12
|
-
}
|
13
|
-
) : /* @__PURE__ */ t(v, { asChild: !0, children: r });
|
14
|
-
}, H = (o) => {
|
15
|
-
const {
|
16
|
-
title: e = "",
|
17
|
-
description: r = "",
|
18
|
-
slotProps: i = {},
|
19
|
-
children: l
|
20
|
-
} = o, n = i.header ?? {}, d = i.title ?? {}, c = i.description ?? {};
|
21
|
-
return l ? s(l, f) ? a(
|
22
|
-
l,
|
23
|
-
{ ...l.props || {}, ...n }
|
24
|
-
) : /* @__PURE__ */ t(f, { ...n, children: l }) : /* @__PURE__ */ g(f, { children: [
|
25
|
-
e && s(e, B) ? a(
|
26
|
-
e,
|
27
|
-
{ ...e.props || {}, ...d }
|
28
|
-
) : /* @__PURE__ */ t(B, { ...d, children: e }),
|
29
|
-
r && s(r, R) ? a(
|
30
|
-
r,
|
31
|
-
{ ...r.props || {}, ...c }
|
32
|
-
) : /* @__PURE__ */ t(R, { ...c, children: r })
|
33
|
-
] });
|
34
|
-
}, I = (o) => {
|
35
|
-
const {
|
36
|
-
slotProps: e = {},
|
37
|
-
children: r,
|
38
|
-
onCancel: i,
|
39
|
-
onConfirm: l,
|
40
|
-
cancelLabel: n = "Cancel",
|
41
|
-
actionLabel: d = "Continue",
|
42
|
-
variant: c = "confirm"
|
43
|
-
} = o, x = j(), m = e.footer ?? {}, T = e.cancelButton ?? {}, C = e.actionButton ?? {};
|
44
|
-
return r ? s(r, A) ? a(
|
45
|
-
r,
|
46
|
-
{ ...r.props || {}, ...m }
|
47
|
-
) : /* @__PURE__ */ t(A, { ...m, children: y.map(r, (p, b) => {
|
48
|
-
if (!p || !s(p)) return;
|
49
|
-
const h = p, P = a(h, { ...h.props || {}, key: h.key || `footer-${x}-action-${b}` });
|
50
|
-
return s(p, D) || s(p, k) ? P : /* @__PURE__ */ t(D, { asChild: !0, children: P });
|
51
|
-
}) }) : /* @__PURE__ */ g(A, { children: [
|
52
|
-
c !== "alert" && /* @__PURE__ */ t(
|
53
|
-
k,
|
54
|
-
{
|
55
|
-
variant: "ghost",
|
56
|
-
onClick: i,
|
57
|
-
...T,
|
58
|
-
children: n
|
59
|
-
}
|
60
|
-
),
|
61
|
-
/* @__PURE__ */ t(
|
62
|
-
D,
|
63
|
-
{
|
64
|
-
onClick: l,
|
65
|
-
...C,
|
66
|
-
variant: C.variant || c === "destructive" ? "destructive" : "default",
|
67
|
-
children: d
|
68
|
-
}
|
69
|
-
)
|
70
|
-
] });
|
71
|
-
}, w = (o) => {
|
72
|
-
const {
|
73
|
-
trigger: e,
|
74
|
-
header: r,
|
75
|
-
footer: i,
|
76
|
-
slotProps: l = {},
|
77
|
-
children: n,
|
78
|
-
...d
|
79
|
-
} = o, c = l.content ?? {};
|
80
|
-
return /* @__PURE__ */ g(E, { ...d, children: [
|
81
|
-
/* @__PURE__ */ t(F, { ...o, children: e }),
|
82
|
-
n ? s(n, u) ? a(
|
83
|
-
n,
|
84
|
-
{
|
85
|
-
...n.props || {},
|
86
|
-
...c
|
87
|
-
}
|
88
|
-
) : /* @__PURE__ */ t(u, { ...c, children: n }) : /* @__PURE__ */ g(u, { ...c, children: [
|
89
|
-
/* @__PURE__ */ t(H, { ...o, children: r }),
|
90
|
-
/* @__PURE__ */ t(I, { ...o, children: i })
|
91
|
-
] })
|
92
|
-
] });
|
93
|
-
};
|
94
|
-
export {
|
95
|
-
w as AlertDialog,
|
96
|
-
w as default
|
97
|
-
};
|