@oneplatformdev/ui 0.1.99-beta.3 → 0.1.99-beta.300
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/.storybook/Wrappers.js.map +1 -1
- package/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +48 -26
- package/Accordion/Accordion.js.map +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/alertVariants.js.map +1 -1
- package/AlertDialog/AlertDialog.js.map +1 -1
- package/AlertDialog/AlertDialog.stories.js +66 -24
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +25 -25
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/AreaChart/AreaChart.js.map +1 -1
- package/Aside/Aside.js.map +1 -1
- package/Aside/AsideSidebar.js.map +1 -1
- package/AspectRatio/AspectRatio.js.map +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Badge/Badge.js.map +1 -1
- package/Badge/badgeVariants.d.ts +1 -1
- package/Badge/badgeVariants.js.map +1 -1
- package/Breadcrumb/Breadcrumb.js.map +1 -1
- package/Button/Button.d.ts +6 -6
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +46 -45
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js +57 -62
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.types.d.ts +24 -1
- package/Button/Button.types.d.ts.map +1 -1
- package/Button/Button.utils.d.ts +3 -0
- package/Button/Button.utils.d.ts.map +1 -0
- package/Button/Button.utils.js +14 -0
- package/Button/Button.utils.js.map +1 -0
- package/Button/ButtonCounterBadge.d.ts +7 -0
- package/Button/ButtonCounterBadge.d.ts.map +1 -0
- package/Button/ButtonCounterBadge.js +20 -0
- package/Button/ButtonCounterBadge.js.map +1 -0
- package/Button/buttonVariants.d.ts +11 -20
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +108 -12
- package/Button/buttonVariants.js.map +1 -1
- package/Button/index.d.ts +1 -0
- package/Button/index.d.ts.map +1 -1
- package/Button/index.js +6 -3
- package/Button/index.js.map +1 -1
- package/ButtonIcon/ButtonIcon.d.ts +30 -19
- package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/ButtonIcon/ButtonIcon.js +69 -46
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js +123 -78
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/ButtonIcon.types.d.ts +2 -1
- package/ButtonIcon/ButtonIcon.types.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts +2 -2
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +9 -7
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +3502 -1536
- package/Calendar/Calendar.js +0 -1
- package/Calendar/Calendar.js.map +1 -1
- package/Card/Card.d.ts.map +1 -1
- package/Card/Card.js +22 -21
- package/Card/Card.js.map +1 -1
- package/Carousel/Carousel.js +6 -7
- package/Carousel/Carousel.js.map +1 -1
- package/Chart/Chart.js.map +1 -1
- package/Checkbox/Checkbox.d.ts.map +1 -1
- package/Checkbox/Checkbox.js +36 -35
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js +108 -0
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Checkbox/Checkbox.types.d.ts +2 -1
- package/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/Collapsible/Collapsible.js.map +1 -1
- package/Combobox/Combobox.d.ts +4 -2
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +222 -195
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +347 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/Combobox.types.d.ts +88 -24
- package/Combobox/Combobox.types.d.ts.map +1 -1
- package/Combobox/Combobox.types.js +4 -1
- package/Combobox/Combobox.types.js.map +1 -1
- package/Combobox/ComboboxOptionItem.d.ts +5 -3
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.js +80 -23
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxRenderContent.d.ts +28 -0
- package/Combobox/ComboboxRenderContent.d.ts.map +1 -0
- package/Combobox/ComboboxRenderContent.js +142 -0
- package/Combobox/ComboboxRenderContent.js.map +1 -0
- package/Combobox/ComboboxRenderOptions.d.ts +4 -0
- package/Combobox/ComboboxRenderOptions.d.ts.map +1 -0
- package/Combobox/ComboboxRenderOptions.js +53 -0
- package/Combobox/ComboboxRenderOptions.js.map +1 -0
- package/Combobox/ComboboxRenderTrigger.d.ts +18 -0
- package/Combobox/ComboboxRenderTrigger.d.ts.map +1 -0
- package/Combobox/ComboboxRenderTrigger.js +118 -0
- package/Combobox/ComboboxRenderTrigger.js.map +1 -0
- package/Command/Command.d.ts +6 -1
- package/Command/Command.d.ts.map +1 -1
- package/Command/Command.js +63 -46
- package/Command/Command.js.map +1 -1
- package/ContextPopover/ContextDropdownMenu.d.ts +12 -0
- package/ContextPopover/ContextDropdownMenu.d.ts.map +1 -0
- package/ContextPopover/ContextDropdownMenu.js +41 -0
- package/ContextPopover/ContextDropdownMenu.js.map +1 -0
- package/ContextPopover/ContextPopover.d.ts +12 -0
- package/ContextPopover/ContextPopover.d.ts.map +1 -0
- package/ContextPopover/ContextPopover.js +34 -0
- package/ContextPopover/ContextPopover.js.map +1 -0
- package/ContextPopover/index.d.ts +4 -0
- package/ContextPopover/index.d.ts.map +1 -0
- package/ContextPopover/index.js +9 -0
- package/ContextPopover/index.js.map +1 -0
- package/ContextPopover/useContextPopoverHandler.d.ts +14 -0
- package/ContextPopover/useContextPopoverHandler.d.ts.map +1 -0
- package/ContextPopover/useContextPopoverHandler.js +21 -0
- package/ContextPopover/useContextPopoverHandler.js.map +1 -0
- package/DataTable/DataTable.js +14 -15
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTableColumnFilter.js +6 -7
- package/DataTable/DataTableColumnFilter.js.map +1 -1
- package/DataTable/useDataTable.js.map +1 -1
- package/DatePicker/DatePicker.d.ts.map +1 -1
- package/DatePicker/DatePicker.js +31 -30
- package/DatePicker/DatePicker.js.map +1 -1
- package/Dialog/Dialog.d.ts +4 -1
- package/Dialog/Dialog.d.ts.map +1 -1
- package/Dialog/Dialog.js +84 -42
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +108 -0
- package/Dialog/Dialog.stories.js.map +1 -0
- package/Dialog/Dialog.types.d.ts +4 -0
- package/Dialog/Dialog.types.d.ts.map +1 -0
- package/Dialog/Dialog.types.js +2 -0
- package/Dialog/Dialog.types.js.map +1 -0
- package/Dialog/DialogOverlayScope.js.map +1 -1
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.d.ts.map +1 -1
- package/Dialog/useDialogClosePosition.d.ts +11 -0
- package/Dialog/useDialogClosePosition.d.ts.map +1 -0
- package/Dialog/useDialogClosePosition.js +50 -0
- package/Dialog/useDialogClosePosition.js.map +1 -0
- package/Drawer/Drawer.js.map +1 -1
- package/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/DropdownMenu/DropdownMenu.js +33 -20
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/Dropzone/Dropzone.d.ts.map +1 -1
- package/Dropzone/Dropzone.js +493 -132
- package/Dropzone/Dropzone.js.map +1 -1
- package/Dropzone/Dropzone.stories.js +387 -0
- package/Dropzone/Dropzone.stories.js.map +1 -0
- package/Dropzone/Dropzone.types.d.ts +29 -1
- package/Dropzone/Dropzone.types.d.ts.map +1 -1
- package/Dropzone/Dropzone.types.js +32 -9
- package/Dropzone/Dropzone.types.js.map +1 -1
- package/Dropzone/DropzoneCoverPreview.d.ts +14 -0
- package/Dropzone/DropzoneCoverPreview.d.ts.map +1 -0
- package/Dropzone/DropzoneCoverPreview.js +56 -0
- package/Dropzone/DropzoneCoverPreview.js.map +1 -0
- package/Dropzone/DropzoneFileCard.d.ts +17 -0
- package/Dropzone/DropzoneFileCard.d.ts.map +1 -0
- package/Dropzone/DropzoneFileCard.js +39 -0
- package/Dropzone/DropzoneFileCard.js.map +1 -0
- package/Dropzone/DropzoneFilePreview.d.ts.map +1 -1
- package/Dropzone/DropzoneFilePreview.js +46 -26
- package/Dropzone/DropzoneFilePreview.js.map +1 -1
- package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -2
- package/Dropzone/DropzoneSinglePickPreview.d.ts.map +1 -1
- package/Dropzone/DropzoneSinglePickPreview.js +206 -22
- package/Dropzone/DropzoneSinglePickPreview.js.map +1 -1
- package/Dropzone/DropzoneUtils.d.ts +1 -0
- package/Dropzone/DropzoneUtils.d.ts.map +1 -1
- package/Dropzone/DropzoneUtils.js +17 -6
- package/Dropzone/DropzoneUtils.js.map +1 -1
- package/Dropzone/icons/file-csv.svg.js +5 -0
- package/Dropzone/icons/file-csv.svg.js.map +1 -0
- package/Dropzone/icons/file-doc.svg.js +5 -0
- package/Dropzone/icons/file-doc.svg.js.map +1 -0
- package/Dropzone/icons/file-docx.svg.js +5 -0
- package/Dropzone/icons/file-docx.svg.js.map +1 -0
- package/Dropzone/icons/file-jpg.svg.js +5 -0
- package/Dropzone/icons/file-jpg.svg.js.map +1 -0
- package/Dropzone/icons/file-pdf.svg.js +5 -0
- package/Dropzone/icons/file-pdf.svg.js.map +1 -0
- package/Dropzone/icons/file-png.svg.js +5 -0
- package/Dropzone/icons/file-png.svg.js.map +1 -0
- package/Dropzone/icons/file-ppt.svg.js +5 -0
- package/Dropzone/icons/file-ppt.svg.js.map +1 -0
- package/Dropzone/icons/file-pptx.svg.js +5 -0
- package/Dropzone/icons/file-pptx.svg.js.map +1 -0
- package/Dropzone/icons/file-rar.svg.js +5 -0
- package/Dropzone/icons/file-rar.svg.js.map +1 -0
- package/Dropzone/icons/file-svg.svg.js +5 -0
- package/Dropzone/icons/file-svg.svg.js.map +1 -0
- package/Dropzone/icons/file-webp.svg.js +5 -0
- package/Dropzone/icons/file-webp.svg.js.map +1 -0
- package/Dropzone/icons/file-xls.svg.js +5 -0
- package/Dropzone/icons/file-xls.svg.js.map +1 -0
- package/Dropzone/icons/file-xlsx.svg.js +5 -0
- package/Dropzone/icons/file-xlsx.svg.js.map +1 -0
- package/Dropzone/icons/file-zip.svg.js +5 -0
- package/Dropzone/icons/file-zip.svg.js.map +1 -0
- package/Dropzone/index.js +8 -5
- package/Form/Form.d.ts.map +1 -1
- package/Form/Form.js +28 -29
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.d.ts +1 -1
- package/Form/FormRenderControl.d.ts.map +1 -1
- package/Form/FormRenderControl.js +54 -14
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/FormRenderControl.types.d.ts +6 -2
- package/Form/FormRenderControl.types.d.ts.map +1 -1
- package/Form/Form_old.js +4 -5
- package/Form/Form_old.js.map +1 -1
- package/FormCheckbox/FormCheckbox.js +4 -4
- package/FormCheckbox/FormCheckbox.js.map +1 -1
- package/FormCombobox/FormCombobox.d.ts +4 -2
- package/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.js +29 -16
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormCombobox/FormCombobox.types.d.ts +6 -2
- package/FormCombobox/FormCombobox.types.d.ts.map +1 -1
- package/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/FormDatePicker/FormDatePicker.js +18 -16
- package/FormDatePicker/FormDatePicker.js.map +1 -1
- package/FormDropzone/FormDropzone.d.ts.map +1 -1
- package/FormDropzone/FormDropzone.js +13 -11
- package/FormDropzone/FormDropzone.js.map +1 -1
- package/FormInput/FormInput.d.ts.map +1 -1
- package/FormInput/FormInput.js +47 -27
- package/FormInput/FormInput.js.map +1 -1
- package/FormInput/FormInput.stories.js +80 -0
- package/FormInput/FormInput.stories.js.map +1 -0
- package/FormInput/FormInput.types.d.ts +1 -0
- package/FormInput/FormInput.types.d.ts.map +1 -1
- package/FormRadio/FormRadio.js.map +1 -1
- package/FormSelect/FormSelect.d.ts.map +1 -1
- package/FormSelect/FormSelect.js +19 -18
- package/FormSelect/FormSelect.js.map +1 -1
- package/FormTextarea/FormTextarea.d.ts.map +1 -1
- package/FormTextarea/FormTextarea.js +15 -12
- package/FormTextarea/FormTextarea.js.map +1 -1
- package/Header/Header.js.map +1 -1
- package/HoverCard/HoverCard.js.map +1 -1
- package/InfoBlock/InfoBlock.d.ts +7 -0
- package/InfoBlock/InfoBlock.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.js +28 -0
- package/InfoBlock/InfoBlock.js.map +1 -0
- package/InfoBlock/InfoBlock.stories.js +50 -0
- package/InfoBlock/InfoBlock.stories.js.map +1 -0
- package/InfoBlock/InfoBlock.types.d.ts +9 -0
- package/InfoBlock/InfoBlock.types.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.types.js +2 -0
- package/InfoBlock/InfoBlock.types.js.map +1 -0
- package/InfoBlock/index.d.ts +3 -0
- package/InfoBlock/index.d.ts.map +1 -0
- package/InfoBlock/index.js +5 -0
- package/InfoBlock/index.js.map +1 -0
- package/InfoBlock/infoBlockVariants.d.ts +6 -0
- package/InfoBlock/infoBlockVariants.d.ts.map +1 -0
- package/InfoBlock/infoBlockVariants.js +27 -0
- package/InfoBlock/infoBlockVariants.js.map +1 -0
- package/Input/Input.d.ts.map +1 -1
- package/Input/Input.js +105 -54
- package/Input/Input.js.map +1 -1
- package/Input/Input.stories.js +225 -0
- package/Input/Input.stories.js.map +1 -0
- package/Input/Input.types.d.ts +5 -0
- package/Input/Input.types.d.ts.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +5 -4
- package/Input/inputVariants.js.map +1 -1
- package/InputOTP/InputOTP.d.ts.map +1 -1
- package/InputOTP/InputOTP.js.map +1 -1
- package/LICENSE +21 -21
- package/Label/Label.js.map +1 -1
- package/Label/labelVariants.js.map +1 -1
- package/LazyLoader/LazyLoader.js +4 -5
- package/LazyLoader/LazyLoader.js.map +1 -1
- package/LoadedIcon/LoadedIcon.d.ts.map +1 -1
- package/LoadedIcon/LoadedIcon.js +3 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/LoadingMask/LoadingMask.d.ts +1 -2
- package/LoadingMask/LoadingMask.d.ts.map +1 -1
- package/LoadingMask/LoadingMask.js +8 -8
- package/LoadingMask/LoadingMask.js.map +1 -1
- package/LoadingMask/LoadingMask.types.d.ts +1 -0
- package/LoadingMask/LoadingMask.types.d.ts.map +1 -1
- package/LoadingMask/RenderLoadingMask.js.map +1 -1
- package/LoadingProgress/LoadingProgress.js.map +1 -1
- package/LoadingProgress/loadingProgressVariants.js.map +1 -1
- package/Menubar/Menubar.js.map +1 -1
- package/NavigationMenu/NavigationMenu.js.map +1 -1
- package/NavigationMenu/navigationMenuVariants.js.map +1 -1
- package/Pagination/Pagination.js +0 -1
- package/Pagination/Pagination.js.map +1 -1
- package/Popover/Popover.d.ts +3 -1
- package/Popover/Popover.d.ts.map +1 -1
- package/Popover/Popover.js +15 -10
- package/Popover/Popover.js.map +1 -1
- package/Progress/Progress.js.map +1 -1
- package/README.md +7 -7
- package/Radio/Radio.js.map +1 -1
- package/RadioGroup/RadioGroup.js.map +1 -1
- package/Resizable/Resizable.d.ts +5 -20
- package/Resizable/Resizable.d.ts.map +1 -1
- package/Resizable/Resizable.js +48 -31
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js +140 -0
- package/Resizable/Resizable.stories.js.map +1 -0
- package/ScrollArea/ScrollArea.d.ts +5 -1
- package/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/ScrollArea/ScrollArea.js +23 -17
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/Search/Search.d.ts.map +1 -1
- package/Search/Search.js +40 -31
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js +17 -0
- package/Search/Search.stories.js.map +1 -0
- package/Select/Select.d.ts.map +1 -1
- package/Select/Select.js +53 -49
- package/Select/Select.js.map +1 -1
- package/Select/Select.stories.js.map +1 -1
- package/Select/Select.types.d.ts +4 -0
- package/Select/Select.types.d.ts.map +1 -1
- package/Select/SelectRoot.d.ts.map +1 -1
- package/Select/SelectRoot.js +79 -66
- package/Select/SelectRoot.js.map +1 -1
- package/Separator/Separator.js.map +1 -1
- package/Sheet/Sheet.js.map +1 -1
- package/Sidebar/Sidebar.js +20 -21
- package/Sidebar/Sidebar.js.map +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Slider/Slider.js.map +1 -1
- package/Sonner/Sonner.js.map +1 -1
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.d.ts.map +1 -1
- package/Switch/Switch.js +19 -9
- package/Switch/Switch.js.map +1 -1
- package/Switch/Switch.stories.js +62 -0
- package/Switch/Switch.stories.js.map +1 -0
- package/Table/Table.js.map +1 -1
- package/TablePagination/TablePagination.js +17 -21
- package/TablePagination/TablePagination.js.map +1 -1
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/TabsRoot.js.map +1 -1
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +52 -47
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js +12 -0
- package/Textarea/Textarea.stories.js.map +1 -0
- package/Textarea/Textarea.types.d.ts +3 -1
- package/Textarea/Textarea.types.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.d.ts +1 -1
- package/Textarea/useAutosizeTextArea.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.js.map +1 -1
- package/Theme/ThemeModeToggle.js +3 -4
- package/Theme/ThemeModeToggle.js.map +1 -1
- package/Theme/ThemeProvider.js.map +1 -1
- package/Toast/Toast.d.ts +1 -1
- package/Toast/Toast.js.map +1 -1
- package/Toast/toast.constants.js.map +1 -1
- package/Toast/toastVariants.d.ts +1 -1
- package/Toast/toastVariants.js.map +1 -1
- package/Toast/useToast.js.map +1 -1
- package/Toaster/Toaster.js.map +1 -1
- package/Toggle/Toggle.js.map +1 -1
- package/ToggleGroup/ToggleGroup.js.map +1 -1
- package/Tooltip/QuestionMarkIcon.svg.js +6 -0
- package/Tooltip/QuestionMarkIcon.svg.js.map +1 -0
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +52 -32
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.types.d.ts +10 -0
- package/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/Tooltip/TooltipRoot.js.map +1 -1
- package/Tooltip/tooltipVariants.d.ts +4 -0
- package/Tooltip/tooltipVariants.d.ts.map +1 -0
- package/Tooltip/tooltipVariants.js +23 -0
- package/Tooltip/tooltipVariants.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +357 -343
- package/index.js.map +1 -1
- package/package.json +13 -6
- package/styles.css +1 -0
- package/vite-env.d.js +2 -0
- package/vite-env.d.js.map +1 -0
- package/vite-env.d.ts +7 -0
- package/Button/Button.s.d.ts +0 -83
- package/Button/Button.s.d.ts.map +0 -1
- package/Button/Button.s.js +0 -163
- package/Button/Button.s.js.map +0 -1
- package/Combobox/ComboboxOptions.d.ts +0 -4
- package/Combobox/ComboboxOptions.d.ts.map +0 -1
- package/Combobox/ComboboxOptions.js +0 -65
- package/Combobox/ComboboxOptions.js.map +0 -1
package/Menubar/Menubar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menubar.js","sources":["../../src/Menubar/Menubar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu;\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group;\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal;\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub;\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-xs\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"],"names":["MenubarMenu","MenubarPrimitive","MenubarGroup","MenubarPortal","MenubarSub","MenubarRadioGroup","Menubar","React","className","props","ref","jsx","cn","MenubarTrigger","MenubarSubTrigger","inset","children","jsxs","ChevronRight","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","Check","MenubarRadioItem","Circle","MenubarLabel","MenubarSeparator","MenubarSh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EAAiB,UAAU;AAE1D,MAAM+B,IAAkB,CAAC;AAAA,EACvB,WAAAxB;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AAAA;AAIVuB,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"Menubar.js","sources":["../../src/Menubar/Menubar.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\r\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu;\r\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group;\r\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal;\r\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub;\r\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup;\r\n\r\nconst Menubar = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-xs\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubar.displayName = MenubarPrimitive.Root.displayName\r\n\r\nconst MenubarTrigger = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\r\n\r\nconst MenubarSubTrigger = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n <MenubarPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronRight className=\"ml-auto h-4 w-4\" />\r\n </MenubarPrimitive.SubTrigger>\r\n))\r\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\r\n\r\nconst MenubarSubContent = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\r\n\r\nconst MenubarContent = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\r\n>(\r\n (\r\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\r\n ref\r\n ) => (\r\n <MenubarPrimitive.Portal>\r\n <MenubarPrimitive.Content\r\n ref={ref}\r\n align={align}\r\n alignOffset={alignOffset}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n </MenubarPrimitive.Portal>\r\n )\r\n)\r\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\r\n\r\nconst MenubarItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n <MenubarPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\r\n\r\nconst MenubarCheckboxItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\r\n>(({ className, children, checked, ...props }, ref) => (\r\n <MenubarPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n className\r\n )}\r\n checked={checked}\r\n {...props}\r\n >\r\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <MenubarPrimitive.ItemIndicator>\r\n <Check className=\"h-4 w-4\" />\r\n </MenubarPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </MenubarPrimitive.CheckboxItem>\r\n))\r\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\r\n\r\nconst MenubarRadioItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\r\n>(({ className, children, ...props }, ref) => (\r\n <MenubarPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <MenubarPrimitive.ItemIndicator>\r\n <Circle className=\"h-4 w-4 fill-current\" />\r\n </MenubarPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </MenubarPrimitive.RadioItem>\r\n))\r\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\r\n\r\nconst MenubarLabel = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n <MenubarPrimitive.Label\r\n ref={ref}\r\n className={cn(\r\n \"px-2 py-1.5 text-sm font-semibold\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\r\n\r\nconst MenubarSeparator = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\r\n {...props}\r\n />\r\n))\r\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\r\n\r\nconst MenubarShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\r\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\nMenubarShortcut.displayname = \"MenubarShortcut\"\r\n\r\nexport {\r\n Menubar,\r\n MenubarMenu,\r\n MenubarTrigger,\r\n MenubarContent,\r\n MenubarItem,\r\n MenubarSeparator,\r\n MenubarLabel,\r\n MenubarCheckboxItem,\r\n MenubarRadioGroup,\r\n MenubarRadioItem,\r\n MenubarPortal,\r\n MenubarSubContent,\r\n MenubarSubTrigger,\r\n MenubarGroup,\r\n MenubarSub,\r\n MenubarShortcut,\r\n}\r\n"],"names":["MenubarMenu","MenubarPrimitive","MenubarGroup","MenubarPortal","MenubarSub","MenubarRadioGroup","Menubar","React","className","props","ref","jsx","cn","MenubarTrigger","MenubarSubTrigger","inset","children","jsxs","ChevronRight","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","Check","MenubarRadioItem","Circle","MenubarLabel","MenubarSeparator","MenubarShortcut"],"mappings":";;;;;AAQA,MAAMA,IAA4CC,EAAiB,MAC7DC,IAA8CD,EAAiB,OAC/DE,IAAgDF,EAAiB,QACjEG,IAA0CH,EAAiB,KAC3DI,IAAwDJ,EAAiB,YAEzEK,IAAUC,EAAM,WAGp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A,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AAAA;AAIVuB,EAAgB,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenu.js","sources":["../../src/NavigationMenu/NavigationMenu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport { navigationMenuVariants } from './navigationMenuVariants';\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuVariants(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDown\n className=\"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n}\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","NavigationMenuTrigger","navigationMenuVariants","ChevronDown","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator"],"mappings":";;;;;;AAOA,MAAMA,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,wBACAM,GAAA,CAAA,CAAuB;AAAA,IAAA;AAAA,EAAA;AAC1B,CACD;AACDT,EAAe,cAAcO,EAAwB,KAAK;AAE1D,MAAMG,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAM;AAAA,EAACJ,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,EAAA;AACN,CACD;AACDM,EAAmB,cAAcH,EAAwB,KAAK;AAE9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AF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEJ,UAAA,gBAAAO,EAAC,OAAA,EAAI,WAAU,yEAAA,CAAyE;AAAA,EAAA;AAC1F,CACD;AACDO,EAAwB,cACtBX,EAAwB,UAAU;"}
|
|
1
|
+
{"version":3,"file":"NavigationMenu.js","sources":["../../src/NavigationMenu/NavigationMenu.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\r\nimport { ChevronDown } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\";\r\nimport { navigationMenuVariants } from './navigationMenuVariants';\r\n\r\nconst NavigationMenu = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\r\n>(({ className, children, ...props }, ref) => (\r\n <NavigationMenuPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <NavigationMenuViewport />\r\n </NavigationMenuPrimitive.Root>\r\n))\r\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\r\n\r\nconst NavigationMenuList = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\r\n>(({ className, ...props }, ref) => (\r\n <NavigationMenuPrimitive.List\r\n ref={ref}\r\n className={cn(\r\n \"group flex flex-1 list-none items-center justify-center space-x-1\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\r\n\r\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\r\n\r\nconst NavigationMenuTrigger = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\r\n>(({ className, children, ...props }, ref) => (\r\n <NavigationMenuPrimitive.Trigger\r\n ref={ref}\r\n className={cn(navigationMenuVariants(), \"group\", className)}\r\n {...props}\r\n >\r\n {children}{\" \"}\r\n <ChevronDown\r\n className=\"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\r\n aria-hidden=\"true\"\r\n />\r\n </NavigationMenuPrimitive.Trigger>\r\n))\r\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\r\n\r\nconst NavigationMenuContent = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\r\n>(({ className, ...props }, ref) => (\r\n <NavigationMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\r\n\r\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\r\n\r\nconst NavigationMenuViewport = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\r\n>(({ className, ...props }, ref) => (\r\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\r\n <NavigationMenuPrimitive.Viewport\r\n className={cn(\r\n \"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)\",\r\n className\r\n )}\r\n ref={ref}\r\n {...props}\r\n />\r\n </div>\r\n))\r\nNavigationMenuViewport.displayName =\r\n NavigationMenuPrimitive.Viewport.displayName\r\n\r\nconst NavigationMenuIndicator = React.forwardRef<\r\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\r\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\r\n>(({ className, ...props }, ref) => (\r\n <NavigationMenuPrimitive.Indicator\r\n ref={ref}\r\n className={cn(\r\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\r\n </NavigationMenuPrimitive.Indicator>\r\n))\r\nNavigationMenuIndicator.displayName =\r\n NavigationMenuPrimitive.Indicator.displayName\r\n\r\nexport {\r\n NavigationMenu,\r\n NavigationMenuList,\r\n NavigationMenuItem,\r\n NavigationMenuContent,\r\n NavigationMenuTrigger,\r\n NavigationMenuLink,\r\n NavigationMenuIndicator,\r\n NavigationMenuViewport,\r\n}\r\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","NavigationMenuTrigger","navigationMenuVariants","ChevronDown","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator"],"mappings":";;;;;;AAOA,MAAMA,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA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MAC1B,gBAAAM,EAAC,OAAA,EAAI,WAAWH,EAAG,8CAA8C,GAC/D,UAAA,gBAAAG;AAAA,EAACJ,EAAwB;AAAA,EAAxB;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAEF,KAAAG;AAAA,IACC,GAAGD;AAAA,EAAA;AACN,GACF,CACD;AACDK,EAAuB,cACrBF,EAAwB,SAAS;AAEnC,MAAMW,IAA0BjB,EAAM,WAGpC,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAM;AAAA,EAACJ,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEJ,UAAA,gBAAAO,EAAC,OAAA,EAAI,WAAU,yEAAA,CAAyE;AAAA,EAAA;AAC1F,CACD;AACDO,EAAwB,cACtBX,EAAwB,UAAU;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigationMenuVariants.js","sources":["../../src/NavigationMenu/navigationMenuVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const navigationMenuVariants = cva(\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50\"\n)\n"],"names":["navigationMenuVariants","cva"],"mappings":";AAEO,MAAMA,IAAyBC;AAAA,EACpC;AACF;"}
|
|
1
|
+
{"version":3,"file":"navigationMenuVariants.js","sources":["../../src/NavigationMenu/navigationMenuVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\r\n\r\nexport const navigationMenuVariants = cva(\r\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50\"\r\n)\r\n"],"names":["navigationMenuVariants","cva"],"mappings":";AAEO,MAAMA,IAAyBC;AAAA,EACpC;AACF;"}
|
package/Pagination/Pagination.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { ChevronLeft as m, ChevronRight as c, MoreHorizontal as p } from "lucide-react";
|
|
4
4
|
import { cn as n } from "@oneplatformdev/utils";
|
|
5
|
-
import "../Button/Button.js";
|
|
6
5
|
import { buttonVariants as g } from "../Button/buttonVariants.js";
|
|
7
6
|
const d = ({ className: i, ...a }) => /* @__PURE__ */ e(
|
|
8
7
|
"nav",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport { ButtonProps, buttonVariants } from \"../Button\";\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline-solid\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n}\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","jsxs","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","MoreHorizontal"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\";\r\nimport { ButtonProps, buttonVariants } from \"../Button\";\r\n\r\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\r\n <nav\r\n role=\"navigation\"\r\n aria-label=\"pagination\"\r\n className={cn(\"mx-auto flex w-full justify-center\", className)}\r\n {...props}\r\n />\r\n)\r\nPagination.displayName = \"Pagination\"\r\n\r\nconst PaginationContent = React.forwardRef<\r\n HTMLUListElement,\r\n React.ComponentProps<\"ul\">\r\n>(({ className, ...props }, ref) => (\r\n <ul\r\n ref={ref}\r\n className={cn(\"flex flex-row items-center gap-1\", className)}\r\n {...props}\r\n />\r\n))\r\nPaginationContent.displayName = \"PaginationContent\"\r\n\r\nconst PaginationItem = React.forwardRef<\r\n HTMLLIElement,\r\n React.ComponentProps<\"li\">\r\n>(({ className, ...props }, ref) => (\r\n <li ref={ref} className={cn(\"\", className)} {...props} />\r\n))\r\nPaginationItem.displayName = \"PaginationItem\"\r\n\r\ntype PaginationLinkProps = {\r\n isActive?: boolean\r\n} & Pick<ButtonProps, \"size\"> &\r\n React.ComponentProps<\"a\">\r\n\r\nconst PaginationLink = ({\r\n className,\r\n isActive,\r\n size = \"icon\",\r\n ...props\r\n}: PaginationLinkProps) => (\r\n <a\r\n aria-current={isActive ? \"page\" : undefined}\r\n className={cn(\r\n buttonVariants({\r\n variant: isActive ? \"outline-solid\" : \"ghost\",\r\n size,\r\n }),\r\n className\r\n )}\r\n {...props}\r\n />\r\n)\r\nPaginationLink.displayName = \"PaginationLink\"\r\n\r\nconst PaginationPrevious = ({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to previous page\"\r\n size=\"default\"\r\n className={cn(\"gap-1 pl-2.5\", className)}\r\n {...props}\r\n >\r\n <ChevronLeft className=\"h-4 w-4\" />\r\n <span>Previous</span>\r\n </PaginationLink>\r\n)\r\nPaginationPrevious.displayName = \"PaginationPrevious\"\r\n\r\nconst PaginationNext = ({\r\n className,\r\n ...props\r\n}: React.ComponentProps<typeof PaginationLink>) => (\r\n <PaginationLink\r\n aria-label=\"Go to next page\"\r\n size=\"default\"\r\n className={cn(\"gap-1 pr-2.5\", className)}\r\n {...props}\r\n >\r\n <span>Next</span>\r\n <ChevronRight className=\"h-4 w-4\" />\r\n </PaginationLink>\r\n)\r\nPaginationNext.displayName = \"PaginationNext\"\r\n\r\nconst PaginationEllipsis = ({\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"span\">) => (\r\n <span\r\n aria-hidden\r\n className={cn(\"flex h-9 w-9 items-center justify-center\", className)}\r\n {...props}\r\n >\r\n <MoreHorizontal className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">More pages</span>\r\n </span>\r\n)\r\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\r\n\r\nexport {\r\n Pagination,\r\n PaginationContent,\r\n PaginationLink,\r\n PaginationItem,\r\n PaginationPrevious,\r\n PaginationNext,\r\n PaginationEllipsis,\r\n}\r\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","jsxs","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","MoreHorizontal"],"mappings":";;;;;AAMA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,QAClC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,IAC5D,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAEzB,MAAMK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAASK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;A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,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,UAAA,OAAA,CAAI;AAAA,MACV,gBAAAA,EAACc,GAAA,EAAa,WAAU,UAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AACpC;AAEFD,EAAe,cAAc;AAE7B,MAAME,IAAqB,CAAC;AAAA,EAC1B,WAAAjB;AAAA,EACA,GAAGC;AACL,MACE,gBAAAY;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAW;AAAA,IACX,WAAWV,EAAG,4CAA4CH,CAAS;AAAA,IAClE,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAC,EAACgB,GAAA,EAAe,WAAU,UAAA,CAAU;AAAA,MACpC,gBAAAhB,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AACtC;AAEFe,EAAmB,cAAc;"}
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import * as React from "react";
|
|
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>
|
|
5
|
+
declare function PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
6
|
+
container?: HTMLElement | null;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPrimitive };
|
|
8
10
|
//# sourceMappingURL=Popover.d.ts.map
|
package/Popover/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IACrF,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAChC,2CA+BA;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAE7E;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAA"}
|
package/Popover/Popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-popover";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
3
|
+
import { cn as p } from "@oneplatformdev/utils";
|
|
4
|
+
function c({
|
|
5
5
|
...o
|
|
6
6
|
}) {
|
|
7
7
|
return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
|
|
@@ -11,23 +11,28 @@ function f({
|
|
|
11
11
|
}) {
|
|
12
12
|
return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function g(o) {
|
|
15
15
|
const {
|
|
16
16
|
className: r,
|
|
17
17
|
align: a = "center",
|
|
18
18
|
sideOffset: n = 4,
|
|
19
19
|
style: i,
|
|
20
|
-
|
|
20
|
+
container: d,
|
|
21
|
+
...s
|
|
21
22
|
} = o;
|
|
22
|
-
return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(
|
|
23
|
+
return /* @__PURE__ */ t(e.Portal, { container: d, children: /* @__PURE__ */ t(
|
|
23
24
|
e.Content,
|
|
24
25
|
{
|
|
25
26
|
"data-slot": "popover-content",
|
|
26
27
|
align: a,
|
|
27
28
|
sideOffset: n,
|
|
28
|
-
...
|
|
29
|
-
className:
|
|
30
|
-
"
|
|
29
|
+
...s,
|
|
30
|
+
className: p(
|
|
31
|
+
"text-popover-foreground",
|
|
32
|
+
"w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",
|
|
33
|
+
"border p-4 bg-popover rounded-lg",
|
|
34
|
+
"shadow-[1px_1px_10px_rgba(6,8,13,0.06)]",
|
|
35
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50",
|
|
31
36
|
r
|
|
32
37
|
),
|
|
33
38
|
style: {
|
|
@@ -43,9 +48,9 @@ function u({
|
|
|
43
48
|
return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
|
|
44
49
|
}
|
|
45
50
|
export {
|
|
46
|
-
|
|
51
|
+
c as Popover,
|
|
47
52
|
u as PopoverAnchor,
|
|
48
|
-
|
|
53
|
+
g as PopoverContent,
|
|
49
54
|
e as PopoverPrimitive,
|
|
50
55
|
f as PopoverTrigger
|
|
51
56
|
};
|
package/Popover/Popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Popover({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n const {\n className,\n align = \"center\",\n sideOffset = 4,\n style,\n ...rest\n } = props;\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n {...rest}\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nfunction Popover({\r\n ...props\r\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\r\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\r\n}\r\n\r\nfunction PopoverTrigger({\r\n ...props\r\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\r\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\r\n}\r\n\r\nfunction PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content> & {\r\n container?: HTMLElement | null;\r\n}) {\r\n const {\r\n className,\r\n align = \"center\",\r\n sideOffset = 4,\r\n style,\r\n container,\r\n ...rest\r\n } = props;\r\n return (\r\n <PopoverPrimitive.Portal container={container}>\r\n <PopoverPrimitive.Content\r\n data-slot=\"popover-content\"\r\n align={align}\r\n sideOffset={sideOffset}\r\n {...rest}\r\n className={cn(\r\n \"text-popover-foreground\",\r\n 'w-72 origin-(--radix-popover-content-transform-origin) outline-hidden',\r\n 'border p-4 bg-popover rounded-lg',\r\n 'shadow-[1px_1px_10px_rgba(6,8,13,0.06)]',\r\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50',\r\n className\r\n )}\r\n style={{\r\n pointerEvents: 'auto',\r\n ...(style || {}),\r\n }}\r\n />\r\n </PopoverPrimitive.Portal>\r\n )\r\n}\r\n\r\nfunction PopoverAnchor({\r\n ...props\r\n }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\r\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\r\n}\r\n\r\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPrimitive }\r\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","style","container","rest","jsx","cn","PopoverAnchor"],"mappings":";;;AAOA,SAASA,EAAQ;AAAA,EACE,GAAGC;AACL,GAAuD;AACtE,2BAAQC,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGD,GAAO;AAC/D;AAEA,SAASE,EAAe;AAAA,EACE,GAAGF;AACL,GAA0D;AAChF,2BAAQC,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGD,GAAO;AAC1E;AAEA,SAASG,EAAeH,GAErB;AACD,QAAM;AAAA,IACJ,WAAAI;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,YAAAC,IAAa;AAAA,IACb,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDT;AACJ,SACE,gBAAAU,EAACT,EAAiB,QAAjB,EAAwB,WAAAO,GACvB,UAAA,gBAAAE;AAAA,IAACT,EAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,OAAAI;AAAA,MACA,YAAAC;AAAA,MACC,GAAGG;AAAA,MACJ,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAP;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,eAAe;AAAA,QACf,GAAIG,KAAS,CAAA;AAAA,MAAC;AAAA,IAChB;AAAA,EAAA,GAEJ;AAEJ;AAEA,SAASK,EAAc;AAAA,EACE,GAAGZ;AACL,GAAyD;AAC9E,2BAAQC,EAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;"}
|
package/Progress/Progress.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","sources":["../../src/Progress/Progress.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Progress(props: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n const { className, value, ...rest } = props;\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n className={cn(\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\n className\n )}\n {...rest}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress, ProgressPrimitive }\n"],"names":["Progress","props","className","value","rest","jsx","ProgressPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAASC,GAA4D;AAC5E,QAAM,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,MAASH;AACtC,SACE,gBAAAI;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAkB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,WAAW,eAAe,OAAOH,KAAS,EAAE,KAAA;AAAA,QAAK;AAAA,MAAA;AAAA,IAC5D;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"Progress.js","sources":["../../src/Progress/Progress.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nfunction Progress(props: React.ComponentProps<typeof ProgressPrimitive.Root>) {\r\n const { className, value, ...rest } = props;\r\n return (\r\n <ProgressPrimitive.Root\r\n data-slot=\"progress\"\r\n className={cn(\r\n \"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\",\r\n className\r\n )}\r\n {...rest}\r\n >\r\n <ProgressPrimitive.Indicator\r\n data-slot=\"progress-indicator\"\r\n className=\"bg-primary h-full w-full flex-1 transition-all\"\r\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\r\n />\r\n </ProgressPrimitive.Root>\r\n )\r\n}\r\n\r\nexport { Progress, ProgressPrimitive }\r\n"],"names":["Progress","props","className","value","rest","jsx","ProgressPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAASC,GAA4D;AAC5E,QAAM,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,MAASH;AACtC,SACE,gBAAAI;AAAA,IAACC,EAAkB;AAAA,IAAlB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAkB;AAAA,QAAlB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,WAAW,eAAe,OAAOH,KAAS,EAAE,KAAA;AAAA,QAAK;AAAA,MAAA;AAAA,IAC5D;AAAA,EAAA;AAGN;"}
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @oneplatformdev/ui
|
|
2
|
-
|
|
3
|
-
This library was generated with [Nx](https://nx.dev).
|
|
4
|
-
|
|
5
|
-
## Running unit tests
|
|
6
|
-
|
|
7
|
-
Run `nx test @oneplatformdev/ui` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
1
|
+
# @oneplatformdev/ui
|
|
2
|
+
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test @oneplatformdev/ui` to execute the unit tests via [Vitest](https://vitest.dev/).
|
package/Radio/Radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../src/Radio/Radio.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { RadioProps } from './Radio.types';\n\nimport { RadioGroup, RadioGroupLabel } from '../RadioGroup/RadioGroup';\n\nexport const Radio: FC<RadioProps> = (props) => {\n const { options = [], renderOption, ...rest } = props;\n return (\n <RadioGroup {...rest}>\n {options.map((option) => {\n const defaultRender = (\n <RadioGroupLabel key={option.value} {...option} />\n );\n if (!renderOption || typeof renderOption !== 'function') {\n return defaultRender;\n }\n if (!renderOption?.(option, RadioGroupLabel)) return defaultRender;\n return renderOption?.(option, RadioGroupLabel);\n })}\n </RadioGroup>\n );\n};\n"],"names":["Radio","props","options","renderOption","rest","RadioGroup","option","defaultRender","jsx","RadioGroupLabel"],"mappings":";;AAMO,MAAMA,IAAwB,CAACC,MAAU;AAC9C,QAAM,EAAE,SAAAC,IAAU,CAAA,GAAI,cAAAC,GAAc,GAAGC,MAASH;AAChD,2BACGI,GAAA,EAAY,GAAGD,GACb,UAAAF,EAAQ,IAAI,CAACI,MAAW;AACvB,UAAMC,IACJ,gBAAAC,EAACC,GAAA,EAAoC,GAAGH,EAAA,GAAlBA,EAAO,KAAmB;AAKlD,WAHI,CAACH,KAAgB,OAAOA,KAAiB,cAGzC,CAACA,IAAeG,GAAQG,CAAe,IAAUF,IAC9CJ,IAAeG,GAAQG,CAAe;AAAA,EAC/C,CAAC,EAAA,CACH;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":["../../src/Radio/Radio.tsx"],"sourcesContent":["import { FC } from 'react';\r\n\r\nimport { RadioProps } from './Radio.types';\r\n\r\nimport { RadioGroup, RadioGroupLabel } from '../RadioGroup/RadioGroup';\r\n\r\nexport const Radio: FC<RadioProps> = (props) => {\r\n const { options = [], renderOption, ...rest } = props;\r\n return (\r\n <RadioGroup {...rest}>\r\n {options.map((option) => {\r\n const defaultRender = (\r\n <RadioGroupLabel key={option.value} {...option} />\r\n );\r\n if (!renderOption || typeof renderOption !== 'function') {\r\n return defaultRender;\r\n }\r\n if (!renderOption?.(option, RadioGroupLabel)) return defaultRender;\r\n return renderOption?.(option, RadioGroupLabel);\r\n })}\r\n </RadioGroup>\r\n );\r\n};\r\n"],"names":["Radio","props","options","renderOption","rest","RadioGroup","option","defaultRender","jsx","RadioGroupLabel"],"mappings":";;AAMO,MAAMA,IAAwB,CAACC,MAAU;AAC9C,QAAM,EAAE,SAAAC,IAAU,CAAA,GAAI,cAAAC,GAAc,GAAGC,MAASH;AAChD,2BACGI,GAAA,EAAY,GAAGD,GACb,UAAAF,EAAQ,IAAI,CAACI,MAAW;AACvB,UAAMC,IACJ,gBAAAC,EAACC,GAAA,EAAoC,GAAGH,EAAA,GAAlBA,EAAO,KAAmB;AAKlD,WAHI,CAACH,KAAgB,OAAOA,KAAiB,cAGzC,CAACA,IAAeG,GAAQG,CAAe,IAAUF,IAC9CJ,IAAeG,GAAQG,CAAe;AAAA,EAC/C,CAAC,EAAA,CACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sources":["../../src/RadioGroup/RadioGroup.tsx"],"sourcesContent":["'use client';\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\nimport * as React from 'react';\nimport { PropsWithChildren } from 'react';\n\nimport { cn } from '@oneplatformdev/utils';\n\nimport { Label } from '../Label/Label';\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn('grid gap-0', className)}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square size-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center \">\n <Circle className=\"size-2.5 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nconst RadioGroupLabel = React.forwardRef<\n HTMLLabelElement,\n PropsWithChildren<{label: React.ReactNode; value: string}>\n>(({ value, label, children }, ref) => {\n return (\n <Label\n ref={ref}\n htmlFor={value}\n className='flex w-full items-start gap-3 font-normal py-3 cursor-pointer'\n >\n <RadioGroupItem value={value} id={value}/>\n <div className='flex flex-col w-full gap-3'>\n <span className='flex flex-col justify-start leading-[16px]'>{label}</span>\n {children}\n </div>\n </Label>\n );\n});\nRadioGroupLabel.displayName = 'RadioGroupLabel';\n\nexport { RadioGroup, RadioGroupItem, RadioGroupLabel };\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive","cn","RadioGroupItem","Circle","RadioGroupLabel","value","label","children","jsxs","Label"],"mappings":";;;;;;AAWA,MAAMA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,WAAWC,EAAG,cAAcL,CAAS;AAAA,IACpC,GAAGC;AAAA,IACJ,KAAAC;AAAA,EAAA;AAAA,CAGL;AACDJ,EAAW,cAAcM,EAAoB,KAAK;AAElD,MAAME,IAAiBP,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEJ,UAAA,gBAAAE,EAACC,EAAoB,WAApB,EAA8B,WAAU,qCACvC,UAAA,gBAAAD,EAACI,GAAA,EAAO,WAAU,wBAAA,CAAwB,EAAA,CAC5C;AAAA,EAAA;AAAA,CAGL;AACDD,EAAe,cAAcF,EAAoB,KAAK;AAEtD,MAAMI,IAAkBT,EAAM,WAG5B,CAAC,EAAE,OAAAU,GAAO,OAAAC,GAAO,UAAAC,EAAA,GAAYT,MAE3B,gBAAAU;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAX;AAAA,IACA,SAASO;AAAA,IACT,WAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAN,EAACG,GAAA,EAAe,OAAAG,GAAc,IAAIA,EAAA,CAAM;AAAA,MACxC,gBAAAG,EAAC,OAAA,EAAI,WAAU,8BACb,UAAA;AAAA,QAAA,gBAAAT,EAAC,QAAA,EAAK,WAAU,8CAA8C,UAAAO,GAAM;AAAA,QACnEC;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAAA,CAGL;AACDH,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../../src/RadioGroup/RadioGroup.tsx"],"sourcesContent":["'use client';\r\n\r\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\r\nimport { Circle } from 'lucide-react';\r\nimport * as React from 'react';\r\nimport { PropsWithChildren } from 'react';\r\n\r\nimport { cn } from '@oneplatformdev/utils';\r\n\r\nimport { Label } from '../Label/Label';\r\n\r\nconst RadioGroup = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Root\r\n className={cn('grid gap-0', className)}\r\n {...props}\r\n ref={ref}\r\n />\r\n );\r\n});\r\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\r\n\r\nconst RadioGroupItem = React.forwardRef<\r\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\r\n>(({ className, ...props }, ref) => {\r\n return (\r\n <RadioGroupPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"aspect-square size-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center \">\r\n <Circle className=\"size-2.5 fill-primary\" />\r\n </RadioGroupPrimitive.Indicator>\r\n </RadioGroupPrimitive.Item>\r\n );\r\n});\r\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\r\n\r\nconst RadioGroupLabel = React.forwardRef<\r\n HTMLLabelElement,\r\n PropsWithChildren<{label: React.ReactNode; value: string}>\r\n>(({ value, label, children }, ref) => {\r\n return (\r\n <Label\r\n ref={ref}\r\n htmlFor={value}\r\n className='flex w-full items-start gap-3 font-normal py-3 cursor-pointer'\r\n >\r\n <RadioGroupItem value={value} id={value}/>\r\n <div className='flex flex-col w-full gap-3'>\r\n <span className='flex flex-col justify-start leading-[16px]'>{label}</span>\r\n {children}\r\n </div>\r\n </Label>\r\n );\r\n});\r\nRadioGroupLabel.displayName = 'RadioGroupLabel';\r\n\r\nexport { RadioGroup, RadioGroupItem, RadioGroupLabel };\r\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive","cn","RadioGroupItem","Circle","RadioGroupLabel","value","label","children","jsxs","Label"],"mappings":";;;;;;AAWA,MAAMA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,WAAWC,EAAG,cAAcL,CAAS;AAAA,IACpC,GAAGC;AAAA,IACJ,KAAAC;AAAA,EAAA;AAAA,CAGL;AACDJ,EAAW,cAAcM,EAAoB,KAAK;AAElD,MAAME,IAAiBP,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEJ,UAAA,gBAAAE,EAACC,EAAoB,WAApB,EAA8B,WAAU,qCACvC,UAAA,gBAAAD,EAACI,GAAA,EAAO,WAAU,wBAAA,CAAwB,EAAA,CAC5C;AAAA,EAAA;AAAA,CAGL;AACDD,EAAe,cAAcF,EAAoB,KAAK;AAEtD,MAAMI,IAAkBT,EAAM,WAG5B,CAAC,EAAE,OAAAU,GAAO,OAAAC,GAAO,UAAAC,EAAA,GAAYT,MAE3B,gBAAAU;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAX;AAAA,IACA,SAASO;AAAA,IACT,WAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAN,EAACG,GAAA,EAAe,OAAAG,GAAc,IAAIA,EAAA,CAAM;AAAA,MACxC,gBAAAG,EAAC,OAAA,EAAI,WAAU,8BACb,UAAA;AAAA,QAAA,gBAAAT,EAAC,QAAA,EAAK,WAAU,8CAA8C,UAAAO,GAAM;AAAA,QACnEC;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAAA,CAGL;AACDH,EAAgB,cAAc;"}
|
package/Resizable/Resizable.d.ts
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
-
declare
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
collapsedSize?: number | undefined;
|
|
6
|
-
collapsible?: boolean | undefined;
|
|
7
|
-
defaultSize?: number | undefined;
|
|
8
|
-
id?: string;
|
|
9
|
-
maxSize?: number | undefined;
|
|
10
|
-
minSize?: number | undefined;
|
|
11
|
-
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
-
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
-
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
-
order?: number;
|
|
15
|
-
style?: object;
|
|
16
|
-
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
children?: import('react').ReactNode | undefined;
|
|
19
|
-
} & import('react').RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
-
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
3
|
+
declare function ResizablePanelGroup({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ResizablePanel({ ...props }: React.ComponentProps<typeof ResizablePrimitive.Panel>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ResizableHandle(props: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
21
6
|
withHandle?: boolean;
|
|
22
|
-
})
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
8
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
24
9
|
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/Resizable/Resizable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../src/Resizable/Resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAA;AAI5D,iBAAS,mBAAmB,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,2CAWzF;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,2CAE/E;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,GAAG;IAClG,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,2CAwBA;AAED,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
|
package/Resizable/Resizable.js
CHANGED
|
@@ -1,37 +1,54 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { GripVerticalIcon as c } from "lucide-react";
|
|
3
3
|
import * as t from "react-resizable-panels";
|
|
4
4
|
import { cn as i } from "@oneplatformdev/utils";
|
|
5
|
-
|
|
6
|
-
className:
|
|
5
|
+
function u({
|
|
6
|
+
className: e,
|
|
7
7
|
...r
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
t.PanelGroup,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "resizable-panel-group",
|
|
13
|
+
className: i(
|
|
14
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
15
|
+
e
|
|
16
|
+
),
|
|
17
|
+
...r
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function b({
|
|
22
|
+
...e
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ a(t.Panel, { "data-slot": "resizable-panel", ...e });
|
|
25
|
+
}
|
|
26
|
+
function v(e) {
|
|
27
|
+
const {
|
|
28
|
+
withHandle: r,
|
|
29
|
+
className: l,
|
|
30
|
+
children: n,
|
|
31
|
+
...o
|
|
32
|
+
} = e;
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
34
|
+
t.PanelResizeHandle,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "resizable-handle",
|
|
37
|
+
className: i(
|
|
38
|
+
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
39
|
+
l
|
|
40
|
+
),
|
|
41
|
+
...o,
|
|
42
|
+
children: [
|
|
43
|
+
n,
|
|
44
|
+
r && /* @__PURE__ */ a("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ a(c, { className: "size-2.5" }) })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
32
49
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
v as ResizableHandle,
|
|
51
|
+
b as ResizablePanel,
|
|
52
|
+
u as ResizablePanelGroup
|
|
36
53
|
};
|
|
37
54
|
//# sourceMappingURL=Resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.js","sources":["../../src/Resizable/Resizable.tsx"],"sourcesContent":["\"use client\"\n\nimport {
|
|
1
|
+
{"version":3,"file":"Resizable.js","sources":["../../src/Resizable/Resizable.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { GripVerticalIcon } from \"lucide-react\"\r\nimport * as ResizablePrimitive from \"react-resizable-panels\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nfunction ResizablePanelGroup({\r\n className,\r\n ...props\r\n }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\r\n return (\r\n <ResizablePrimitive.PanelGroup\r\n data-slot=\"resizable-panel-group\"\r\n className={cn(\r\n \"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction ResizablePanel({\r\n ...props\r\n }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\r\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\r\n}\r\n\r\nfunction ResizableHandle(props: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\r\n withHandle?: boolean\r\n}) {\r\n const {\r\n withHandle,\r\n className,\r\n children,\r\n ...rest\r\n } = props;\r\n return (\r\n <ResizablePrimitive.PanelResizeHandle\r\n data-slot=\"resizable-handle\"\r\n className={cn(\r\n \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\r\n className\r\n )}\r\n {...rest}\r\n >\r\n {children}\r\n {withHandle && (\r\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border\">\r\n <GripVerticalIcon className=\"size-2.5\" />\r\n </div>\r\n )}\r\n </ResizablePrimitive.PanelResizeHandle>\r\n )\r\n}\r\n\r\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle }\r\n"],"names":["ResizablePanelGroup","className","props","jsx","ResizablePrimitive","cn","ResizablePanel","ResizableHandle","withHandle","children","rest","jsxs","GripVerticalIcon"],"mappings":";;;;AAQA,SAASA,EAAoB;AAAA,EACE,WAAAC;AAAA,EACA,GAAGC;AACL,GAA+D;AAC1F,SACE,gBAAAC;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASI,EAAe;AAAA,EACE,GAAGJ;AACL,GAA0D;AAChF,2BAAQE,EAAmB,OAAnB,EAAyB,aAAU,mBAAmB,GAAGF,GAAO;AAC1E;AAEA,SAASK,EAAgBL,GAEtB;AACD,QAAM;AAAA,IACJ,YAAAM;AAAA,IACA,WAAAP;AAAA,IACA,UAAAQ;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR;AACJ,SACE,gBAAAS;AAAA,IAACP,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGS;AAAA,MAEH,UAAA;AAAA,QAAAD;AAAA,QACAD,uBACE,OAAA,EAAI,WAAU,6EACb,UAAA,gBAAAL,EAACS,GAAA,EAAiB,WAAU,WAAA,CAAW,EAAA,CACzC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { ResizablePanelGroup as r, ResizablePanel as l, ResizableHandle as n } from "./Resizable.js";
|
|
4
|
+
const b = {
|
|
5
|
+
title: "ui/Resizable",
|
|
6
|
+
component: r,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen"
|
|
9
|
+
},
|
|
10
|
+
decorators: [
|
|
11
|
+
(a) => /* @__PURE__ */ e("div", { className: "p-6", children: /* @__PURE__ */ e("div", { className: "h-[420px] w-[920px] overflow-hidden rounded-xl border bg-background shadow-sm", children: /* @__PURE__ */ e(a, {}) }) })
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
function i({
|
|
15
|
+
label: a,
|
|
16
|
+
subtle: d
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: [
|
|
22
|
+
"h-full w-full",
|
|
23
|
+
"flex items-center justify-center",
|
|
24
|
+
"text-sm font-medium",
|
|
25
|
+
"select-none",
|
|
26
|
+
d ? "bg-muted/30" : "bg-muted/50"
|
|
27
|
+
].join(" "),
|
|
28
|
+
children: a
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
const z = {
|
|
33
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
34
|
+
/* @__PURE__ */ e(l, { defaultSize: 50, children: /* @__PURE__ */ e(i, { label: "Left (50%)" }) }),
|
|
35
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
36
|
+
/* @__PURE__ */ e(l, { defaultSize: 50, children: /* @__PURE__ */ e(i, { label: "Right (50%)", subtle: !0 }) })
|
|
37
|
+
] })
|
|
38
|
+
}, f = {
|
|
39
|
+
render: () => /* @__PURE__ */ t(r, { direction: "vertical", children: [
|
|
40
|
+
/* @__PURE__ */ e(l, { defaultSize: 60, children: /* @__PURE__ */ e(i, { label: "Top (60%)" }) }),
|
|
41
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
42
|
+
/* @__PURE__ */ e(l, { defaultSize: 40, children: /* @__PURE__ */ e(i, { label: "Bottom (40%)", subtle: !0 }) })
|
|
43
|
+
] })
|
|
44
|
+
}, S = {
|
|
45
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
46
|
+
/* @__PURE__ */ e(l, { defaultSize: 35, children: /* @__PURE__ */ e(i, { label: "Sidebar (35%)" }) }),
|
|
47
|
+
/* @__PURE__ */ e(n, {}),
|
|
48
|
+
/* @__PURE__ */ e(l, { defaultSize: 65, children: /* @__PURE__ */ e(i, { label: "Content (65%)", subtle: !0 }) })
|
|
49
|
+
] })
|
|
50
|
+
}, m = {
|
|
51
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
52
|
+
/* @__PURE__ */ e(l, { defaultSize: 33, children: /* @__PURE__ */ e(i, { label: "A (33%)" }) }),
|
|
53
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
54
|
+
/* @__PURE__ */ e(l, { defaultSize: 34, children: /* @__PURE__ */ e(i, { label: "B (34%)", subtle: !0 }) }),
|
|
55
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
56
|
+
/* @__PURE__ */ e(l, { defaultSize: 33, children: /* @__PURE__ */ e(i, { label: "C (33%)" }) })
|
|
57
|
+
] })
|
|
58
|
+
}, p = {
|
|
59
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
60
|
+
/* @__PURE__ */ e(l, { defaultSize: 20, minSize: 12, children: /* @__PURE__ */ e(i, { label: "Nav (20%)" }) }),
|
|
61
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
62
|
+
/* @__PURE__ */ e(l, { defaultSize: 55, minSize: 30, children: /* @__PURE__ */ e(i, { label: "Main (55%)", subtle: !0 }) }),
|
|
63
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
64
|
+
/* @__PURE__ */ e(l, { defaultSize: 25, minSize: 12, children: /* @__PURE__ */ e(i, { label: "Details (25%)" }) })
|
|
65
|
+
] })
|
|
66
|
+
}, x = {
|
|
67
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
68
|
+
/* @__PURE__ */ e(l, { defaultSize: 30, minSize: 20, maxSize: 40, children: /* @__PURE__ */ e(i, { label: "Left (min 20 / max 40)" }) }),
|
|
69
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
70
|
+
/* @__PURE__ */ e(l, { defaultSize: 70, minSize: 60, maxSize: 80, children: /* @__PURE__ */ e(i, { label: "Right (min 60 / max 80)", subtle: !0 }) })
|
|
71
|
+
] })
|
|
72
|
+
}, w = {
|
|
73
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
74
|
+
/* @__PURE__ */ e(
|
|
75
|
+
l,
|
|
76
|
+
{
|
|
77
|
+
defaultSize: 22,
|
|
78
|
+
minSize: 12,
|
|
79
|
+
collapsible: !0,
|
|
80
|
+
collapsedSize: 4,
|
|
81
|
+
children: /* @__PURE__ */ e(i, { label: "Sidebar (collapsible)" })
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
85
|
+
/* @__PURE__ */ e(l, { defaultSize: 78, minSize: 50, children: /* @__PURE__ */ e(i, { label: "Main content", subtle: !0 }) })
|
|
86
|
+
] })
|
|
87
|
+
}, H = {
|
|
88
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
89
|
+
/* @__PURE__ */ e(l, { defaultSize: 50, children: /* @__PURE__ */ e(i, { label: "Left (fixed)" }) }),
|
|
90
|
+
/* @__PURE__ */ e(n, { withHandle: !0, disabled: !0 }),
|
|
91
|
+
/* @__PURE__ */ e(l, { defaultSize: 50, children: /* @__PURE__ */ e(i, { label: "Right (fixed)", subtle: !0 }) })
|
|
92
|
+
] })
|
|
93
|
+
}, g = {
|
|
94
|
+
render: () => /* @__PURE__ */ t(r, { direction: "horizontal", children: [
|
|
95
|
+
/* @__PURE__ */ e(l, { defaultSize: 45, minSize: 25, children: /* @__PURE__ */ t(r, { direction: "vertical", children: [
|
|
96
|
+
/* @__PURE__ */ e(l, { defaultSize: 55, minSize: 20, children: /* @__PURE__ */ e(i, { label: "Left / Top" }) }),
|
|
97
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
98
|
+
/* @__PURE__ */ e(l, { defaultSize: 45, minSize: 20, children: /* @__PURE__ */ e(i, { label: "Left / Bottom", subtle: !0 }) })
|
|
99
|
+
] }) }),
|
|
100
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
101
|
+
/* @__PURE__ */ e(l, { defaultSize: 55, minSize: 30, children: /* @__PURE__ */ e(i, { label: "Right (single)", subtle: !0 }) })
|
|
102
|
+
] })
|
|
103
|
+
}, y = {
|
|
104
|
+
render: () => /* @__PURE__ */ e(() => {
|
|
105
|
+
const [d, u] = c.useState([]);
|
|
106
|
+
return /* @__PURE__ */ t("div", { className: "h-full w-full", children: [
|
|
107
|
+
/* @__PURE__ */ t("div", { className: "border-b px-3 py-2 text-xs text-muted-foreground", children: [
|
|
108
|
+
"Layout:",
|
|
109
|
+
" ",
|
|
110
|
+
d.length ? d.map((o) => Math.round(o)).join(" / ") : "— (move handle)"
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ e("div", { className: "h-[calc(100%-33px)]", children: /* @__PURE__ */ t(
|
|
113
|
+
r,
|
|
114
|
+
{
|
|
115
|
+
direction: "horizontal",
|
|
116
|
+
onLayout: (o) => u(o),
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ e(l, { defaultSize: 40, minSize: 20, children: /* @__PURE__ */ e(i, { label: "Left" }) }),
|
|
119
|
+
/* @__PURE__ */ e(n, { withHandle: !0 }),
|
|
120
|
+
/* @__PURE__ */ e(l, { defaultSize: 60, minSize: 20, children: /* @__PURE__ */ e(i, { label: "Right", subtle: !0 }) })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
) })
|
|
124
|
+
] });
|
|
125
|
+
}, {})
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
w as CollapsibleSidebar,
|
|
129
|
+
H as DisabledHandle,
|
|
130
|
+
S as HandleWithoutGrip,
|
|
131
|
+
z as HorizontalTwoPanels,
|
|
132
|
+
y as LayoutDebug,
|
|
133
|
+
x as MinMaxConstraints,
|
|
134
|
+
g as NestedResizable,
|
|
135
|
+
m as ThreePanelsEqual,
|
|
136
|
+
p as ThreePanelsSidebarLayout,
|
|
137
|
+
f as VerticalTwoPanels,
|
|
138
|
+
b as default
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=Resizable.stories.js.map
|