@jbpark/ui-kit 2.9.1 → 2.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +14 -13
- package/README.md +14 -13
- package/dist/Button.d.mts +1 -1
- package/dist/Button.d.mts.map +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.d.mts +1 -1
- package/dist/Card.d.mts.map +1 -1
- package/dist/Card.mjs +1 -1
- package/dist/Card.mjs.map +1 -1
- package/dist/Layout.d.mts +13 -44
- package/dist/Layout.d.mts.map +1 -1
- package/dist/Layout.mjs +7 -16
- package/dist/Layout.mjs.map +1 -1
- package/dist/Menu.d.mts +2 -62
- package/dist/Menu.mjs +2 -68
- package/dist/Reveals.d.mts +6 -38
- package/dist/Reveals.d.mts.map +1 -1
- package/dist/Reveals.mjs +4 -23
- package/dist/Reveals.mjs.map +1 -1
- package/dist/Space.d.mts +1 -1
- package/dist/Space.d.mts.map +1 -1
- package/dist/Space.mjs +2 -2
- package/dist/Space.mjs.map +1 -1
- package/dist/Tag.d.mts +2 -2
- package/dist/Tag.d.mts.map +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/Tag.mjs.map +1 -1
- package/dist/Typography.d.mts +13 -36
- package/dist/Typography.d.mts.map +1 -1
- package/dist/Typography.mjs +7 -12
- package/dist/Typography.mjs.map +1 -1
- package/dist/components/atoms/checkbox/checkbox.d.mts +32 -0
- package/dist/components/atoms/checkbox/checkbox.d.mts.map +1 -0
- package/dist/components/atoms/{Checkbox/index.mjs → checkbox/checkbox.mjs} +2 -4
- package/dist/components/atoms/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/atoms/{Checkbox/Group/index.d.mts → checkbox/group.d.mts} +14 -4
- package/dist/components/atoms/checkbox/group.d.mts.map +1 -0
- package/dist/components/atoms/{Checkbox/Group/index.mjs → checkbox/group.mjs} +6 -4
- package/dist/components/atoms/checkbox/group.mjs.map +1 -0
- package/dist/components/atoms/checkbox/index.d.mts +11 -0
- package/dist/components/atoms/checkbox/index.d.mts.map +1 -0
- package/dist/components/atoms/checkbox/index.mjs +10 -0
- package/dist/components/atoms/checkbox/index.mjs.map +1 -0
- package/dist/components/atoms/{ColorPicker/index.d.mts → color-picker.d.mts} +2 -2
- package/dist/components/atoms/color-picker.d.mts.map +1 -0
- package/dist/components/atoms/{ColorPicker/index.mjs → color-picker.mjs} +4 -4
- package/dist/components/atoms/color-picker.mjs.map +1 -0
- package/dist/components/atoms/float-button/back-top.d.mts +18 -0
- package/dist/components/atoms/float-button/back-top.d.mts.map +1 -0
- package/dist/components/atoms/{FloatButton/BackTop/index.mjs → float-button/back-top.mjs} +6 -4
- package/dist/components/atoms/float-button/back-top.mjs.map +1 -0
- package/dist/components/atoms/float-button/float-button.d.mts +13 -0
- package/dist/components/atoms/float-button/float-button.d.mts.map +1 -0
- package/dist/components/atoms/{FloatButton/index.mjs → float-button/float-button.mjs} +2 -4
- package/dist/components/atoms/float-button/float-button.mjs.map +1 -0
- package/dist/components/atoms/float-button/index.d.mts +11 -0
- package/dist/components/atoms/float-button/index.d.mts.map +1 -0
- package/dist/components/atoms/float-button/index.mjs +10 -0
- package/dist/components/atoms/float-button/index.mjs.map +1 -0
- package/dist/components/atoms/index.d.mts +11 -11
- package/dist/components/atoms/index.mjs +11 -11
- package/dist/components/atoms/input/index.d.mts +13 -0
- package/dist/components/atoms/input/index.d.mts.map +1 -0
- package/dist/components/atoms/input/index.mjs +12 -0
- package/dist/components/atoms/input/index.mjs.map +1 -0
- package/dist/components/atoms/input/input.d.mts +9 -0
- package/dist/components/atoms/input/input.d.mts.map +1 -0
- package/dist/components/atoms/{Input/index.mjs → input/input.mjs} +2 -6
- package/dist/components/atoms/input/input.mjs.map +1 -0
- package/dist/components/atoms/input/search.d.mts +28 -0
- package/dist/components/atoms/input/search.d.mts.map +1 -0
- package/dist/components/atoms/{Input/Search/index.mjs → input/search.mjs} +6 -6
- package/dist/components/atoms/input/search.mjs.map +1 -0
- package/dist/components/atoms/input/text-area.d.mts +11 -0
- package/dist/components/atoms/input/text-area.d.mts.map +1 -0
- package/dist/components/atoms/{Input/TextArea/index.mjs → input/text-area.mjs} +5 -5
- package/dist/components/atoms/input/text-area.mjs.map +1 -0
- package/dist/components/atoms/{Popover/index.d.mts → popover.d.mts} +2 -2
- package/dist/components/atoms/popover.d.mts.map +1 -0
- package/dist/components/atoms/{Popover/index.mjs → popover.mjs} +6 -6
- package/dist/components/atoms/popover.mjs.map +1 -0
- package/dist/components/atoms/{Progress/index.d.mts → progress.d.mts} +2 -2
- package/dist/components/atoms/progress.d.mts.map +1 -0
- package/dist/components/atoms/{Progress/index.mjs → progress.mjs} +5 -5
- package/dist/components/atoms/progress.mjs.map +1 -0
- package/dist/components/atoms/{Radio/Group/index.d.mts → radio/group.d.mts} +18 -4
- package/dist/components/atoms/radio/group.d.mts.map +1 -0
- package/dist/components/atoms/{Radio/Group/index.mjs → radio/group.mjs} +7 -5
- package/dist/components/atoms/radio/group.mjs.map +1 -0
- package/dist/components/atoms/radio/index.d.mts +11 -0
- package/dist/components/atoms/radio/index.d.mts.map +1 -0
- package/dist/components/atoms/radio/index.mjs +10 -0
- package/dist/components/atoms/radio/index.mjs.map +1 -0
- package/dist/components/atoms/radio/radio.d.mts +34 -0
- package/dist/components/atoms/radio/radio.d.mts.map +1 -0
- package/dist/components/atoms/{Radio/index.mjs → radio/radio.mjs} +2 -4
- package/dist/components/atoms/radio/radio.mjs.map +1 -0
- package/dist/components/atoms/{Select/index.d.mts → select.d.mts} +4 -4
- package/dist/components/atoms/select.d.mts.map +1 -0
- package/dist/components/atoms/{Select/index.mjs → select.mjs} +5 -5
- package/dist/components/atoms/select.mjs.map +1 -0
- package/dist/components/atoms/skeleton/button.d.mts +11 -0
- package/dist/components/atoms/skeleton/button.d.mts.map +1 -0
- package/dist/components/atoms/{Skeleton/Button/index.mjs → skeleton/button.mjs} +4 -4
- package/dist/components/atoms/{Skeleton/Button/index.mjs.map → skeleton/button.mjs.map} +1 -1
- package/dist/components/atoms/skeleton/index.d.mts +13 -0
- package/dist/components/atoms/skeleton/index.d.mts.map +1 -0
- package/dist/components/atoms/skeleton/index.mjs +12 -0
- package/dist/components/atoms/skeleton/index.mjs.map +1 -0
- package/dist/components/atoms/skeleton/node.d.mts +11 -0
- package/dist/components/atoms/skeleton/node.d.mts.map +1 -0
- package/dist/components/atoms/{Skeleton/Node/index.mjs → skeleton/node.mjs} +4 -4
- package/dist/components/atoms/skeleton/node.mjs.map +1 -0
- package/dist/components/atoms/{Skeleton/index.d.mts → skeleton/skeleton.d.mts} +19 -31
- package/dist/components/atoms/skeleton/skeleton.d.mts.map +1 -0
- package/dist/components/atoms/{Skeleton/index.mjs → skeleton/skeleton.mjs} +2 -6
- package/dist/components/atoms/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/atoms/{Spin/index.d.mts → spin.d.mts} +2 -2
- package/dist/components/atoms/spin.d.mts.map +1 -0
- package/dist/components/atoms/{Spin/index.mjs → spin.mjs} +3 -3
- package/dist/components/atoms/spin.mjs.map +1 -0
- package/dist/components/atoms/{Switch/index.d.mts → switch.d.mts} +2 -2
- package/dist/components/atoms/switch.d.mts.map +1 -0
- package/dist/components/atoms/{Switch/index.mjs → switch.mjs} +5 -5
- package/dist/components/atoms/switch.mjs.map +1 -0
- package/dist/components/atoms/{Typography/Link/index.d.mts → typography/link.d.mts} +3 -3
- package/dist/components/atoms/typography/link.d.mts.map +1 -0
- package/dist/components/atoms/{Typography/Link/index.mjs → typography/link.mjs} +3 -3
- package/dist/components/atoms/typography/link.mjs.map +1 -0
- package/dist/components/atoms/{Typography/Paragraph/index.d.mts → typography/paragraph.d.mts} +3 -3
- package/dist/components/atoms/typography/paragraph.d.mts.map +1 -0
- package/dist/components/atoms/{Typography/Paragraph/index.mjs → typography/paragraph.mjs} +3 -3
- package/dist/components/atoms/typography/paragraph.mjs.map +1 -0
- package/dist/components/atoms/{Typography/Text/index.d.mts → typography/text.d.mts} +3 -3
- package/dist/components/atoms/typography/text.d.mts.map +1 -0
- package/dist/components/atoms/{Typography/Text/index.mjs → typography/text.mjs} +3 -3
- package/dist/components/atoms/typography/text.mjs.map +1 -0
- package/dist/components/atoms/{Typography/Title/index.d.mts → typography/title.d.mts} +3 -3
- package/dist/components/atoms/typography/title.d.mts.map +1 -0
- package/dist/components/atoms/{Typography/Title/index.mjs → typography/title.mjs} +3 -3
- package/dist/components/atoms/typography/title.mjs.map +1 -0
- package/dist/components/atoms/typography/typography.d.mts +11 -0
- package/dist/components/atoms/typography/typography.d.mts.map +1 -0
- package/dist/components/atoms/typography/typography.mjs +13 -0
- package/dist/components/atoms/typography/typography.mjs.map +1 -0
- package/dist/components/molecules/{Collapse/index.d.mts → collapse.d.mts} +2 -2
- package/dist/components/molecules/collapse.d.mts.map +1 -0
- package/dist/components/molecules/{Collapse/index.mjs → collapse.mjs} +5 -5
- package/dist/components/molecules/collapse.mjs.map +1 -0
- package/dist/components/molecules/{Dropdown/index.d.mts → dropdown.d.mts} +4 -3
- package/dist/components/molecules/dropdown.d.mts.map +1 -0
- package/dist/components/molecules/{Dropdown/index.mjs → dropdown.mjs} +5 -4
- package/dist/components/molecules/dropdown.mjs.map +1 -0
- package/dist/components/molecules/index.d.mts +6 -5
- package/dist/components/molecules/index.mjs +6 -5
- package/dist/components/molecules/marquees/index.d.mts +11 -0
- package/dist/components/molecules/marquees/index.d.mts.map +1 -0
- package/dist/components/molecules/marquees/index.mjs +10 -0
- package/dist/components/molecules/marquees/index.mjs.map +1 -0
- package/dist/components/molecules/marquees/item.d.mts +25 -0
- package/dist/components/molecules/marquees/item.d.mts.map +1 -0
- package/dist/components/molecules/{Marquees/Item/index.mjs → marquees/item.mjs} +4 -2
- package/dist/components/molecules/marquees/item.mjs.map +1 -0
- package/dist/components/molecules/marquees/marquees.d.mts +21 -0
- package/dist/components/molecules/marquees/marquees.d.mts.map +1 -0
- package/dist/components/molecules/{Marquees/index.mjs → marquees/marquees.mjs} +3 -4
- package/dist/components/molecules/marquees/marquees.mjs.map +1 -0
- package/dist/components/molecules/menu/item/index.mjs +3 -0
- package/dist/components/molecules/{Menu/Item/index.mjs → menu/item/item.mjs} +6 -4
- package/dist/components/molecules/menu/item/item.mjs.map +1 -0
- package/dist/components/molecules/{Menu/Item/Label/index.mjs → menu/item/label.mjs} +4 -4
- package/dist/components/molecules/menu/item/label.mjs.map +1 -0
- package/dist/components/molecules/menu/menu.d.mts +62 -0
- package/dist/components/molecules/menu/menu.d.mts.map +1 -0
- package/dist/components/molecules/menu/menu.mjs +70 -0
- package/dist/components/molecules/menu/menu.mjs.map +1 -0
- package/dist/components/molecules/{Reveals/Item/index.d.mts → reveals/item.d.mts} +2 -2
- package/dist/components/molecules/reveals/item.d.mts.map +1 -0
- package/dist/components/molecules/{Reveals/Item/index.mjs → reveals/item.mjs} +3 -3
- package/dist/components/molecules/reveals/item.mjs.map +1 -0
- package/dist/components/molecules/reveals/reveals.d.mts +29 -0
- package/dist/components/molecules/reveals/reveals.d.mts.map +1 -0
- package/dist/components/molecules/reveals/reveals.mjs +28 -0
- package/dist/components/molecules/reveals/reveals.mjs.map +1 -0
- package/dist/components/molecules/splitter/index.d.mts +11 -0
- package/dist/components/molecules/splitter/index.d.mts.map +1 -0
- package/dist/components/molecules/splitter/index.mjs +10 -0
- package/dist/components/molecules/splitter/index.mjs.map +1 -0
- package/dist/components/molecules/splitter/panel.d.mts +17 -0
- package/dist/components/molecules/splitter/panel.d.mts.map +1 -0
- package/dist/components/molecules/splitter/panel.mjs +18 -0
- package/dist/components/molecules/splitter/panel.mjs.map +1 -0
- package/dist/components/molecules/splitter/splitter.d.mts +30 -0
- package/dist/components/molecules/splitter/splitter.d.mts.map +1 -0
- package/dist/components/molecules/{Splitter/index.mjs → splitter/splitter.mjs} +7 -14
- package/dist/components/molecules/splitter/splitter.mjs.map +1 -0
- package/dist/components/organisms/{Drawer/index.d.mts → drawer.d.mts} +2 -2
- package/dist/components/organisms/drawer.d.mts.map +1 -0
- package/dist/components/organisms/{Drawer/index.mjs → drawer.mjs} +6 -6
- package/dist/components/organisms/drawer.mjs.map +1 -0
- package/dist/components/organisms/index.d.mts +4 -4
- package/dist/components/organisms/index.mjs +4 -4
- package/dist/components/organisms/list/index.d.mts +11 -0
- package/dist/components/organisms/list/index.d.mts.map +1 -0
- package/dist/components/organisms/list/index.mjs +10 -0
- package/dist/components/organisms/list/index.mjs.map +1 -0
- package/dist/components/organisms/list/item.d.mts +11 -0
- package/dist/components/organisms/list/item.d.mts.map +1 -0
- package/dist/components/organisms/{List/Item/index.mjs → list/item.mjs} +3 -3
- package/dist/components/organisms/list/item.mjs.map +1 -0
- package/dist/components/organisms/{List/index.d.mts → list/list.d.mts} +17 -24
- package/dist/components/organisms/list/list.d.mts.map +1 -0
- package/dist/components/organisms/{List/index.mjs → list/list.mjs} +3 -5
- package/dist/components/organisms/list/list.mjs.map +1 -0
- package/dist/components/organisms/{Modal/index.d.mts → modal.d.mts} +2 -2
- package/dist/components/organisms/modal.d.mts.map +1 -0
- package/dist/components/organisms/{Modal/index.mjs → modal.mjs} +6 -6
- package/dist/components/organisms/modal.mjs.map +1 -0
- package/dist/components/organisms/swiper/index.d.mts +11 -0
- package/dist/components/organisms/swiper/index.d.mts.map +1 -0
- package/dist/components/organisms/swiper/index.mjs +10 -0
- package/dist/components/organisms/swiper/index.mjs.map +1 -0
- package/dist/components/organisms/swiper/slide.d.mts +15 -0
- package/dist/components/organisms/swiper/slide.d.mts.map +1 -0
- package/dist/components/organisms/{Swiper/Slide/index.mjs → swiper/slide.mjs} +5 -3
- package/dist/components/organisms/swiper/slide.mjs.map +1 -0
- package/dist/components/organisms/{Swiper/index.d.mts → swiper/swiper.d.mts} +12 -23
- package/dist/components/organisms/swiper/swiper.d.mts.map +1 -0
- package/dist/components/organisms/{Swiper/index.mjs → swiper/swiper.mjs} +5 -7
- package/dist/components/organisms/swiper/swiper.mjs.map +1 -0
- package/dist/components/templates/layout/content.d.mts +12 -0
- package/dist/components/templates/layout/content.d.mts.map +1 -0
- package/dist/components/templates/{Layout/Content/index.mjs → layout/content.mjs} +3 -3
- package/dist/components/templates/layout/content.mjs.map +1 -0
- package/dist/components/templates/layout/footer.d.mts +12 -0
- package/dist/components/templates/layout/footer.d.mts.map +1 -0
- package/dist/components/templates/{Layout/Footer/index.mjs → layout/footer.mjs} +3 -3
- package/dist/components/templates/layout/footer.mjs.map +1 -0
- package/dist/components/templates/layout/header.d.mts +12 -0
- package/dist/components/templates/layout/header.d.mts.map +1 -0
- package/dist/components/templates/{Layout/Header/index.mjs → layout/header.mjs} +3 -3
- package/dist/components/templates/layout/header.mjs.map +1 -0
- package/dist/components/templates/layout/layout.d.mts +12 -0
- package/dist/components/templates/layout/layout.d.mts.map +1 -0
- package/dist/components/templates/layout/layout.mjs +18 -0
- package/dist/components/templates/layout/layout.mjs.map +1 -0
- package/dist/components/templates/layout/sider.d.mts +34 -0
- package/dist/components/templates/layout/sider.d.mts.map +1 -0
- package/dist/components/templates/{Layout/Sider/index.mjs → layout/sider.mjs} +3 -3
- package/dist/components/templates/layout/sider.mjs.map +1 -0
- package/dist/core/button.d.mts +2 -2
- package/dist/core/dialog.mjs.map +1 -1
- package/dist/index.d.mts +20 -20
- package/dist/index.mjs +20 -20
- package/dist/style.css +0 -4
- package/package.json +1 -1
- package/dist/Menu.d.mts.map +0 -1
- package/dist/Menu.mjs.map +0 -1
- package/dist/components/atoms/Checkbox/Group/index.d.mts.map +0 -1
- package/dist/components/atoms/Checkbox/Group/index.mjs.map +0 -1
- package/dist/components/atoms/Checkbox/index.d.mts +0 -44
- package/dist/components/atoms/Checkbox/index.d.mts.map +0 -1
- package/dist/components/atoms/Checkbox/index.mjs.map +0 -1
- package/dist/components/atoms/ColorPicker/index.d.mts.map +0 -1
- package/dist/components/atoms/ColorPicker/index.mjs.map +0 -1
- package/dist/components/atoms/FloatButton/BackTop/index.d.mts +0 -12
- package/dist/components/atoms/FloatButton/BackTop/index.d.mts.map +0 -1
- package/dist/components/atoms/FloatButton/BackTop/index.mjs.map +0 -1
- package/dist/components/atoms/FloatButton/index.d.mts +0 -22
- package/dist/components/atoms/FloatButton/index.d.mts.map +0 -1
- package/dist/components/atoms/FloatButton/index.mjs.map +0 -1
- package/dist/components/atoms/Input/Search/index.d.mts +0 -15
- package/dist/components/atoms/Input/Search/index.d.mts.map +0 -1
- package/dist/components/atoms/Input/Search/index.mjs.map +0 -1
- package/dist/components/atoms/Input/TextArea/index.d.mts +0 -1
- package/dist/components/atoms/Input/TextArea/index.mjs.map +0 -1
- package/dist/components/atoms/Input/index.d.mts +0 -31
- package/dist/components/atoms/Input/index.d.mts.map +0 -1
- package/dist/components/atoms/Input/index.mjs.map +0 -1
- package/dist/components/atoms/Popover/index.d.mts.map +0 -1
- package/dist/components/atoms/Popover/index.mjs.map +0 -1
- package/dist/components/atoms/Progress/index.d.mts.map +0 -1
- package/dist/components/atoms/Progress/index.mjs.map +0 -1
- package/dist/components/atoms/Radio/Group/index.d.mts.map +0 -1
- package/dist/components/atoms/Radio/Group/index.mjs.map +0 -1
- package/dist/components/atoms/Radio/index.d.mts +0 -50
- package/dist/components/atoms/Radio/index.d.mts.map +0 -1
- package/dist/components/atoms/Radio/index.mjs.map +0 -1
- package/dist/components/atoms/Select/index.d.mts.map +0 -1
- package/dist/components/atoms/Select/index.mjs.map +0 -1
- package/dist/components/atoms/Skeleton/Button/index.d.mts +0 -2
- package/dist/components/atoms/Skeleton/Node/index.d.mts +0 -2
- package/dist/components/atoms/Skeleton/Node/index.mjs.map +0 -1
- package/dist/components/atoms/Skeleton/index.d.mts.map +0 -1
- package/dist/components/atoms/Skeleton/index.mjs.map +0 -1
- package/dist/components/atoms/Spin/index.d.mts.map +0 -1
- package/dist/components/atoms/Spin/index.mjs.map +0 -1
- package/dist/components/atoms/Switch/index.d.mts.map +0 -1
- package/dist/components/atoms/Switch/index.mjs.map +0 -1
- package/dist/components/atoms/Typography/Link/index.d.mts.map +0 -1
- package/dist/components/atoms/Typography/Link/index.mjs.map +0 -1
- package/dist/components/atoms/Typography/Paragraph/index.d.mts.map +0 -1
- package/dist/components/atoms/Typography/Paragraph/index.mjs.map +0 -1
- package/dist/components/atoms/Typography/Text/index.d.mts.map +0 -1
- package/dist/components/atoms/Typography/Text/index.mjs.map +0 -1
- package/dist/components/atoms/Typography/Title/index.d.mts.map +0 -1
- package/dist/components/atoms/Typography/Title/index.mjs.map +0 -1
- package/dist/components/molecules/Collapse/index.d.mts.map +0 -1
- package/dist/components/molecules/Collapse/index.mjs.map +0 -1
- package/dist/components/molecules/Dropdown/index.d.mts.map +0 -1
- package/dist/components/molecules/Dropdown/index.mjs.map +0 -1
- package/dist/components/molecules/Marquees/Item/index.d.mts +0 -17
- package/dist/components/molecules/Marquees/Item/index.d.mts.map +0 -1
- package/dist/components/molecules/Marquees/Item/index.mjs.map +0 -1
- package/dist/components/molecules/Marquees/index.d.mts +0 -31
- package/dist/components/molecules/Marquees/index.d.mts.map +0 -1
- package/dist/components/molecules/Marquees/index.mjs.map +0 -1
- package/dist/components/molecules/Menu/Item/Label/index.mjs.map +0 -1
- package/dist/components/molecules/Menu/Item/index.mjs.map +0 -1
- package/dist/components/molecules/Reveals/Item/index.d.mts.map +0 -1
- package/dist/components/molecules/Reveals/Item/index.mjs.map +0 -1
- package/dist/components/molecules/Splitter/index.d.mts +0 -31
- package/dist/components/molecules/Splitter/index.d.mts.map +0 -1
- package/dist/components/molecules/Splitter/index.mjs.map +0 -1
- package/dist/components/organisms/Drawer/index.d.mts.map +0 -1
- package/dist/components/organisms/Drawer/index.mjs.map +0 -1
- package/dist/components/organisms/List/Item/index.mjs.map +0 -1
- package/dist/components/organisms/List/index.d.mts.map +0 -1
- package/dist/components/organisms/List/index.mjs.map +0 -1
- package/dist/components/organisms/Modal/index.d.mts.map +0 -1
- package/dist/components/organisms/Modal/index.mjs.map +0 -1
- package/dist/components/organisms/Swiper/Slide/index.mjs.map +0 -1
- package/dist/components/organisms/Swiper/index.d.mts.map +0 -1
- package/dist/components/organisms/Swiper/index.mjs.map +0 -1
- package/dist/components/templates/Layout/Content/index.d.mts +0 -7
- package/dist/components/templates/Layout/Content/index.d.mts.map +0 -1
- package/dist/components/templates/Layout/Content/index.mjs.map +0 -1
- package/dist/components/templates/Layout/Footer/index.d.mts +0 -7
- package/dist/components/templates/Layout/Footer/index.d.mts.map +0 -1
- package/dist/components/templates/Layout/Footer/index.mjs.map +0 -1
- package/dist/components/templates/Layout/Header/index.d.mts +0 -7
- package/dist/components/templates/Layout/Header/index.d.mts.map +0 -1
- package/dist/components/templates/Layout/Header/index.mjs.map +0 -1
- package/dist/components/templates/Layout/Sider/index.d.mts +0 -19
- package/dist/components/templates/Layout/Sider/index.d.mts.map +0 -1
- package/dist/components/templates/Layout/Sider/index.mjs.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import { useEffect, useRef, useState } from "react";
|
|
2
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { useGSAP } from "@gsap/react";
|
|
4
6
|
import { gsap } from "gsap";
|
|
5
7
|
|
|
6
|
-
//#region src/components/molecules/
|
|
8
|
+
//#region src/components/molecules/marquees/item.tsx
|
|
7
9
|
const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = false, pauseOnHover = false, children }) => {
|
|
8
10
|
const itemRefs = useRef([]);
|
|
9
11
|
const containerRef = useRef(null);
|
|
@@ -100,4 +102,4 @@ const Item = ({ width: _width, speed = 100, autoFill = false, pause: _pause = fa
|
|
|
100
102
|
|
|
101
103
|
//#endregion
|
|
102
104
|
export { Item as default };
|
|
103
|
-
//# sourceMappingURL=
|
|
105
|
+
//# sourceMappingURL=item.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/item.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useGSAP } from '@gsap/react';\nimport { gsap } from 'gsap';\n\nexport interface ItemProps {\n key?: React.Key;\n speed?: number;\n autoFill?: boolean | number;\n pause?: boolean;\n pauseOnHover?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface Props\n extends Omit<React.ComponentPropsWithoutRef<'div'>, 'key'>, ItemProps {\n width: string | number;\n}\n\nconst Item = ({\n width: _width,\n speed = 100,\n autoFill = false,\n pause: _pause = false,\n pauseOnHover = false,\n children,\n}: Props) => {\n const itemRefs = useRef<HTMLDivElement[]>([]);\n const containerRef = useRef<HTMLDivElement>(null);\n const tweenRef = useRef<gsap.core.Tween | null>(null);\n\n const [width, setWidth] = useState<string | number>(_width);\n const [pause, setPause] = useState(false);\n const [repeatCount, setRepeatCount] = useState(\n autoFill ? (typeof autoFill === 'boolean' ? 100 : autoFill) : 0,\n );\n\n const isPaused = _pause || pause;\n\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (\n !autoFill ||\n !children ||\n !itemRefs.current[0] ||\n typeof width === 'string'\n ) {\n return;\n }\n\n const itemWidth = itemRefs.current[0].offsetWidth;\n\n if (itemWidth >= width) {\n setWidth(itemWidth);\n setRepeatCount(0);\n return;\n }\n\n let totalWidth = 0;\n let repeatCount = 0;\n\n while (totalWidth < width) {\n totalWidth += itemWidth;\n repeatCount += 1;\n }\n\n setWidth(totalWidth);\n setRepeatCount(repeatCount - 1);\n }, [autoFill, width, children]);\n\n useEffect(() => {\n setWidth(_width);\n }, [_width]);\n\n useGSAP(\n () => {\n if (!containerRef.current || typeof width === 'string') {\n return;\n }\n\n if (tweenRef.current) {\n tweenRef.current.kill();\n }\n\n tweenRef.current = gsap.fromTo(\n containerRef.current,\n { x: 0 },\n {\n x: -width,\n duration: width / speed,\n repeat: -1,\n ease: 'linear',\n },\n );\n\n return () => {\n tweenRef.current?.kill();\n };\n },\n {\n scope: containerRef,\n dependencies: [width, speed],\n },\n );\n\n useEffect(() => {\n if (!tweenRef.current) {\n return;\n }\n\n if (isPaused) {\n tweenRef.current.pause();\n } else {\n tweenRef.current.play();\n }\n }, [isPaused]);\n\n useEffect(() => {\n setRepeatCount(\n autoFill ? (typeof autoFill === 'boolean' ? 100 : autoFill) : 0,\n );\n }, [autoFill]);\n\n useEffect(() => {\n const onResize = () => {\n if (!tweenRef.current || !containerRef.current) {\n return;\n }\n tweenRef.current.pause();\n };\n\n window.addEventListener('resize', onResize);\n\n return () => {\n window.removeEventListener('resize', onResize);\n };\n }, []);\n\n return (\n <div\n className=\"flex overflow-hidden\"\n {...hoverEvents}\n //\n >\n <div ref={containerRef} className=\"flex flex-nowrap\">\n {[...Array(2)].map((_, index) => (\n <div\n key={index}\n style={{ minWidth: width }}\n className=\"flex flex-nowrap\"\n >\n <div\n ref={el => {\n if (el) {\n itemRefs.current[index] = el;\n }\n }}\n >\n {children}\n </div>\n {[\n ...Array(typeof autoFill === 'number' ? autoFill : repeatCount),\n ].map((_, i) => (\n <div key={i}>{children}</div>\n ))}\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;;AAqBA,MAAM,QAAQ,EACZ,OAAO,QACP,QAAQ,KACR,WAAW,OACX,OAAO,SAAS,OAChB,eAAe,OACf,eACW;CACX,MAAM,WAAW,OAAyB,EAAE,CAAC;CAC7C,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,WAAW,OAA+B,KAAK;CAErD,MAAM,CAAC,OAAO,YAAY,SAA0B,OAAO;CAC3D,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CACzC,MAAM,CAAC,aAAa,kBAAkB,SACpC,WAAY,OAAO,aAAa,YAAY,MAAM,WAAY,EAC/D;CAED,MAAM,WAAW,UAAU;CAE3B,MAAM,cAAc,eAChB;EACE,oBAAoB;AAClB,YAAS,KAAK;;EAEhB,oBAAoB;AAClB,YAAS,MAAM;;EAElB,GACD,EAAE;AAEN,iBAAgB;AACd,MACE,CAAC,YACD,CAAC,YACD,CAAC,SAAS,QAAQ,MAClB,OAAO,UAAU,SAEjB;EAGF,MAAM,YAAY,SAAS,QAAQ,GAAG;AAEtC,MAAI,aAAa,OAAO;AACtB,YAAS,UAAU;AACnB,kBAAe,EAAE;AACjB;;EAGF,IAAI,aAAa;EACjB,IAAI,cAAc;AAElB,SAAO,aAAa,OAAO;AACzB,iBAAc;AACd,kBAAe;;AAGjB,WAAS,WAAW;AACpB,iBAAe,cAAc,EAAE;IAC9B;EAAC;EAAU;EAAO;EAAS,CAAC;AAE/B,iBAAgB;AACd,WAAS,OAAO;IACf,CAAC,OAAO,CAAC;AAEZ,eACQ;AACJ,MAAI,CAAC,aAAa,WAAW,OAAO,UAAU,SAC5C;AAGF,MAAI,SAAS,QACX,UAAS,QAAQ,MAAM;AAGzB,WAAS,UAAU,KAAK,OACtB,aAAa,SACb,EAAE,GAAG,GAAG,EACR;GACE,GAAG,CAAC;GACJ,UAAU,QAAQ;GAClB,QAAQ;GACR,MAAM;GACP,CACF;AAED,eAAa;AACX,YAAS,SAAS,MAAM;;IAG5B;EACE,OAAO;EACP,cAAc,CAAC,OAAO,MAAM;EAC7B,CACF;AAED,iBAAgB;AACd,MAAI,CAAC,SAAS,QACZ;AAGF,MAAI,SACF,UAAS,QAAQ,OAAO;MAExB,UAAS,QAAQ,MAAM;IAExB,CAAC,SAAS,CAAC;AAEd,iBAAgB;AACd,iBACE,WAAY,OAAO,aAAa,YAAY,MAAM,WAAY,EAC/D;IACA,CAAC,SAAS,CAAC;AAEd,iBAAgB;EACd,MAAM,iBAAiB;AACrB,OAAI,CAAC,SAAS,WAAW,CAAC,aAAa,QACrC;AAEF,YAAS,QAAQ,OAAO;;AAG1B,SAAO,iBAAiB,UAAU,SAAS;AAE3C,eAAa;AACX,UAAO,oBAAoB,UAAU,SAAS;;IAE/C,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,WAAU;EACV,GAAI;YAGJ,oBAAC;GAAI,KAAK;GAAc,WAAU;aAC/B,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,KAAK,GAAG,UACrB,qBAAC;IAEC,OAAO,EAAE,UAAU,OAAO;IAC1B,WAAU;eAEV,oBAAC;KACC,MAAK,OAAM;AACT,UAAI,GACF,UAAS,QAAQ,SAAS;;KAI7B;MACG,EACL,CACC,GAAG,MAAM,OAAO,aAAa,WAAW,WAAW,YAAY,CAChE,CAAC,KAAK,GAAG,MACR,oBAAC,SAAa,YAAJ,EAAmB,CAC7B;MAjBG,MAkBD,CACN;IACE;GACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ItemProps } from "./item.mjs";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/marquees/marquees.d.ts
|
|
5
|
+
interface Props extends React.ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
speed?: number;
|
|
7
|
+
autoFill?: boolean | number;
|
|
8
|
+
pauseOnHover?: boolean;
|
|
9
|
+
items?: ItemProps[];
|
|
10
|
+
}
|
|
11
|
+
declare const Marquees: ({
|
|
12
|
+
className,
|
|
13
|
+
items,
|
|
14
|
+
speed,
|
|
15
|
+
pauseOnHover,
|
|
16
|
+
autoFill,
|
|
17
|
+
...props
|
|
18
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Marquees, Props };
|
|
21
|
+
//# sourceMappingURL=marquees.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marquees.d.mts","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"mappings":";;;;UAUiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,KAAA;EACA,QAAA;EACA,YAAA;EACA,KAAA,GAAQ,SAAA;AAAA;AAAA,cAGJ,QAAA;EAAY,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GAOf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../../utils.mjs";
|
|
4
|
-
import Item from "./
|
|
4
|
+
import Item from "./item.mjs";
|
|
5
5
|
import { useEffect, useRef, useState } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useResponsiveSize, useThrottle } from "@jbpark/use-hooks";
|
|
8
8
|
|
|
9
|
-
//#region src/components/molecules/
|
|
9
|
+
//#region src/components/molecules/marquees/marquees.tsx
|
|
10
10
|
const Marquees = ({ className, items, speed, pauseOnHover = true, autoFill = true, ...props }) => {
|
|
11
11
|
const [width, setWidth] = useState("100vw");
|
|
12
12
|
const [padding, setPadding] = useState(0);
|
|
@@ -56,8 +56,7 @@ const Marquees = ({ className, items, speed, pauseOnHover = true, autoFill = tru
|
|
|
56
56
|
})
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
Marquees.Item = Item;
|
|
60
59
|
|
|
61
60
|
//#endregion
|
|
62
61
|
export { Marquees as default };
|
|
63
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=marquees.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marquees.mjs","names":[],"sources":["../../../../src/components/molecules/marquees/marquees.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useResponsiveSize, useThrottle } from '@jbpark/use-hooks';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Item, { type ItemProps } from './item';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n speed?: number;\n autoFill?: boolean | number;\n pauseOnHover?: boolean;\n items?: ItemProps[];\n}\n\nconst Marquees = ({\n className,\n items,\n speed,\n pauseOnHover = true,\n autoFill = true,\n ...props\n}: Props) => {\n const [width, setWidth] = useState<string | number>(\n '100vw',\n //\n );\n const [padding, setPadding] = useState(0);\n const [pause, setPause] = useState(false);\n\n const throttledWidth = useThrottle(width, 200);\n\n const { size } = useResponsiveSize<HTMLDivElement>();\n const containerRef = useRef<HTMLDivElement | null>(null);\n const hoverEvents = pauseOnHover\n ? {\n onMouseEnter: () => {\n setPause(true);\n },\n onMouseLeave: () => {\n setPause(false);\n },\n }\n : {};\n\n useEffect(() => {\n if (!size.width || !containerRef.current) {\n return;\n }\n\n const computedStyle = getComputedStyle(containerRef.current);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n\n setPadding(paddingLeft + paddingRight);\n\n setWidth(size.width);\n }, [size]);\n\n useEffect(() => {\n const onScroll = () => {\n setWidth(document.body.scrollWidth);\n };\n\n window.addEventListener('scroll', onScroll);\n\n return () => {\n window.removeEventListener('scroll', onScroll);\n };\n }, []);\n\n return (\n <div\n ref={containerRef}\n className={cn(\n className,\n //\n )}\n {...hoverEvents}\n {...props}\n >\n <div\n className={cn(\n 'flex flex-col gap-y-5',\n 'overflow-hidden',\n 'whitespace-nowrap',\n 'bg-inherit',\n //\n )}\n style={{\n width:\n typeof throttledWidth === 'number'\n ? throttledWidth - padding\n : throttledWidth,\n }}\n >\n {items?.map(({ children, key: itemKey, ...item }: ItemProps, key) => (\n <Item\n key={itemKey || key}\n width={throttledWidth}\n pause={pause}\n speed={speed}\n autoFill={autoFill}\n {...item}\n >\n {children}\n </Item>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Marquees;\n"],"mappings":";;;;;;;;;AAiBA,MAAM,YAAY,EAChB,WACA,OACA,OACA,eAAe,MACf,WAAW,MACX,GAAG,YACQ;CACX,MAAM,CAAC,OAAO,YAAY,SACxB,QAED;CACD,MAAM,CAAC,SAAS,cAAc,SAAS,EAAE;CACzC,MAAM,CAAC,OAAO,YAAY,SAAS,MAAM;CAEzC,MAAM,iBAAiB,YAAY,OAAO,IAAI;CAE9C,MAAM,EAAE,SAAS,mBAAmC;CACpD,MAAM,eAAe,OAA8B,KAAK;CACxD,MAAM,cAAc,eAChB;EACE,oBAAoB;AAClB,YAAS,KAAK;;EAEhB,oBAAoB;AAClB,YAAS,MAAM;;EAElB,GACD,EAAE;AAEN,iBAAgB;AACd,MAAI,CAAC,KAAK,SAAS,CAAC,aAAa,QAC/B;EAGF,MAAM,gBAAgB,iBAAiB,aAAa,QAAQ;AAI5D,cAHoB,WAAW,cAAc,YAAY,IAAI,MACxC,WAAW,cAAc,aAAa,IAAI,GAEzB;AAEtC,WAAS,KAAK,MAAM;IACnB,CAAC,KAAK,CAAC;AAEV,iBAAgB;EACd,MAAM,iBAAiB;AACrB,YAAS,SAAS,KAAK,YAAY;;AAGrC,SAAO,iBAAiB,UAAU,SAAS;AAE3C,eAAa;AACX,UAAO,oBAAoB,UAAU,SAAS;;IAE/C,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,KAAK;EACL,WAAW,GACT,UAED;EACD,GAAI;EACJ,GAAI;YAEJ,oBAAC;GACC,WAAW,GACT,yBACA,mBACA,qBACA,aAED;GACD,OAAO,EACL,OACE,OAAO,mBAAmB,WACtB,iBAAiB,UACjB,gBACP;aAEA,OAAO,KAAK,EAAE,UAAU,KAAK,SAAS,GAAG,QAAmB,QAC3D,oBAAC;IAEC,OAAO;IACA;IACA;IACG;IACV,GAAI;IAEH;MAPI,WAAW,IAQX,CACP;IACE;GACF"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import { cn } from "../../../../utils.mjs";
|
|
2
|
-
import Label from "./
|
|
3
|
-
import { MENU_CLASSNAMES } from "
|
|
4
|
+
import Label from "./label.mjs";
|
|
5
|
+
import { MENU_CLASSNAMES } from "../menu.mjs";
|
|
4
6
|
import { ChevronDown } from "lucide-react";
|
|
5
7
|
import { createElement, useRef, useState } from "react";
|
|
6
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { AnimatePresence, motion } from "motion/react";
|
|
8
10
|
|
|
9
|
-
//#region src/components/molecules/
|
|
11
|
+
//#region src/components/molecules/menu/item/item.tsx
|
|
10
12
|
const OFFSET = [8, 8];
|
|
11
13
|
const INLINE_OFFSET = 16;
|
|
12
14
|
const STYLES = {
|
|
@@ -119,4 +121,4 @@ const Item = ({ itemKey, keyPath, root = false, mode, label, children, selectedK
|
|
|
119
121
|
|
|
120
122
|
//#endregion
|
|
121
123
|
export { Item as default };
|
|
122
|
-
//# sourceMappingURL=
|
|
124
|
+
//# sourceMappingURL=item.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.mjs","names":[],"sources":["../../../../../src/components/molecules/menu/item/item.tsx"],"sourcesContent":["'use client';\n\nimport { useRef, useState } from 'react';\n\nimport { ChevronDown } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { MENU_CLASSNAMES, MenuItem, Props } from '../menu';\nimport Label from './label';\n\ninterface ItemProps extends Props, MenuItem {\n itemKey: React.Key;\n keyPath: React.Key[];\n root?: boolean;\n}\nconst OFFSET: [number, number] = [8, 8];\nconst INLINE_OFFSET = 16;\n\nconst STYLES = {\n hover: {\n classes: ['hover:underline', 'hover:underline-offset-8'],\n },\n open: {\n classes: ['underline', 'underline-offset-8'],\n },\n} as const;\n\nconst getItemClasses = (\n root: boolean,\n isHorizontal: boolean,\n isInline: boolean,\n hasChildren: boolean,\n customClasses?: string,\n) =>\n cn(\n 'px-4 py-2',\n 'cursor-pointer',\n 'whitespace-nowrap',\n root && isHorizontal ? 'inline-flex' : 'flex',\n ...(root\n ? [\n 'h-full',\n 'rounded-none border-transparent',\n hasChildren && 'hover:border-current',\n isHorizontal ? 'border-b-2' : 'border-r-2',\n isInline && 'border-none',\n ]\n : ['rounded-md', ...STYLES.hover.classes]),\n customClasses,\n );\n\nconst Item = ({\n itemKey,\n keyPath,\n root = false,\n mode,\n label,\n children,\n selectedKeys = [],\n selectionMap,\n classNames,\n styles,\n offset = OFFSET,\n inlineOffset = INLINE_OFFSET,\n onClick,\n onSelect,\n ...props\n}: ItemProps) => {\n const [open, setOpen] = useState<boolean>(false);\n\n const itemRef = useRef<HTMLLIElement | null>(null);\n\n const isHorizontal = mode === 'horizontal';\n const isInline = mode === 'inline';\n\n const [left, top] = offset;\n\n const selected = selectionMap?.get(itemKey) ?? false;\n\n const item = {\n ...props,\n label,\n key: itemKey,\n children,\n };\n\n const itemClassNames = getItemClasses(\n root,\n isHorizontal,\n isInline,\n !!children?.length,\n root ? classNames?.rootItem : classNames?.item,\n );\n\n const childrenContainerClassNames = cn(\n isInline ? 'relative overflow-hidden' : 'absolute min-w-[200px]',\n !isInline && root && isHorizontal\n ? 'left-0 top-full pt-2 pl-0'\n : !isInline\n ? 'left-full top-0 pl-2 pt-0'\n : 'pl-4',\n );\n\n const childrenContainerStyle = isInline\n ? {\n paddingLeft: inlineOffset,\n }\n : root && isHorizontal\n ? {\n paddingTop: top,\n }\n : {\n paddingLeft: left,\n };\n\n return (\n <li\n ref={itemRef}\n className={cn(\n 'group',\n 'relative',\n root && isHorizontal ? 'inline-block' : 'block',\n )}\n onMouseEnter={() => {\n if (isInline) {\n return;\n }\n setOpen(true);\n }}\n onMouseLeave={() => {\n if (isInline) {\n return;\n }\n setOpen(false);\n }}\n >\n <div\n role=\"menuitem\"\n aria-expanded={children?.length ? open : undefined}\n aria-haspopup={children?.length ? 'menu' : undefined}\n aria-selected={selected}\n className={cn(\n itemClassNames,\n ...(selected\n ? root\n ? ['border-current']\n : [...STYLES.open.classes, ...STYLES.hover.classes]\n : root && !!children?.length\n ? ['group-hover:border-current']\n : []),\n //\n )}\n style={root ? styles?.rootItem : styles?.item}\n onClick={e => {\n e.stopPropagation();\n\n if (isInline) {\n setOpen(!open);\n }\n\n const params = {\n domEvent: e,\n key: itemKey,\n keyPath,\n item,\n };\n\n onClick?.(params);\n\n if (!selected) {\n onSelect?.(params);\n }\n }}\n >\n <div\n className={cn(\n 'w-full',\n 'inline-flex items-center justify-between',\n //\n )}\n >\n <Label className={cn(classNames?.label)} style={styles?.label}>\n {label}\n </Label>\n {!root && !isInline && !!children?.length && (\n <ChevronDown className={cn('-rotate-90')} />\n )}\n {isInline && !!children?.length && (\n <ChevronDown\n className={cn(\n 'transition-all',\n open ? '-rotate-180' : 'rotate-0',\n )}\n />\n )}\n </div>\n </div>\n <AnimatePresence>\n {!!children?.length && open && (\n <motion.div\n className={cn(\n childrenContainerClassNames,\n //\n )}\n style={childrenContainerStyle}\n initial={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n animate={isInline ? { height: 'auto', opacity: 1 } : { opacity: 1 }}\n exit={isInline ? { height: 0, opacity: 0 } : { opacity: 0 }}\n transition={{ duration: 0.2 }}\n >\n <ul\n className={cn(\n MENU_CLASSNAMES,\n isInline && 'shadow-none',\n classNames?.subMenu,\n //\n )}\n style={styles?.subMenu}\n >\n {children.map(child => (\n <Item\n {...child}\n key={child.key}\n itemKey={child.key}\n keyPath={[...keyPath, child.key]}\n selectionMap={selectionMap}\n mode={mode}\n selectedKeys={selectedKeys}\n classNames={classNames}\n styles={styles}\n offset={offset}\n inlineOffset={inlineOffset}\n onClick={onClick}\n onSelect={onSelect}\n />\n ))}\n </ul>\n </motion.div>\n )}\n </AnimatePresence>\n </li>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;;;;;AAiBA,MAAM,SAA2B,CAAC,GAAG,EAAE;AACvC,MAAM,gBAAgB;AAEtB,MAAM,SAAS;CACb,OAAO,EACL,SAAS,CAAC,mBAAmB,2BAA2B,EACzD;CACD,MAAM,EACJ,SAAS,CAAC,aAAa,qBAAqB,EAC7C;CACF;AAED,MAAM,kBACJ,MACA,cACA,UACA,aACA,kBAEA,GACE,aACA,kBACA,qBACA,QAAQ,eAAe,gBAAgB,QACvC,GAAI,OACA;CACE;CACA;CACA,eAAe;CACf,eAAe,eAAe;CAC9B,YAAY;CACb,GACD,CAAC,cAAc,GAAG,OAAO,MAAM,QAAQ,EAC3C,cACD;AAEH,MAAM,QAAQ,EACZ,SACA,SACA,OAAO,OACP,MACA,OACA,UACA,eAAe,EAAE,EACjB,cACA,YACA,QACA,SAAS,QACT,eAAe,eACf,SACA,UACA,GAAG,YACY;CACf,MAAM,CAAC,MAAM,WAAW,SAAkB,MAAM;CAEhD,MAAM,UAAU,OAA6B,KAAK;CAElD,MAAM,eAAe,SAAS;CAC9B,MAAM,WAAW,SAAS;CAE1B,MAAM,CAAC,MAAM,OAAO;CAEpB,MAAM,WAAW,cAAc,IAAI,QAAQ,IAAI;CAE/C,MAAM,OAAO;EACX,GAAG;EACH;EACA,KAAK;EACL;EACD;CAED,MAAM,iBAAiB,eACrB,MACA,cACA,UACA,CAAC,CAAC,UAAU,QACZ,OAAO,YAAY,WAAW,YAAY,KAC3C;CAED,MAAM,8BAA8B,GAClC,WAAW,6BAA6B,0BACxC,CAAC,YAAY,QAAQ,eACjB,8BACA,CAAC,WACC,8BACA,OACP;CAED,MAAM,yBAAyB,WAC3B,EACE,aAAa,cACd,GACD,QAAQ,eACN,EACE,YAAY,KACb,GACD,EACE,aAAa,MACd;AAEP,QACE,qBAAC;EACC,KAAK;EACL,WAAW,GACT,SACA,YACA,QAAQ,eAAe,iBAAiB,QACzC;EACD,oBAAoB;AAClB,OAAI,SACF;AAEF,WAAQ,KAAK;;EAEf,oBAAoB;AAClB,OAAI,SACF;AAEF,WAAQ,MAAM;;aAGhB,oBAAC;GACC,MAAK;GACL,iBAAe,UAAU,SAAS,OAAO;GACzC,iBAAe,UAAU,SAAS,SAAS;GAC3C,iBAAe;GACf,WAAW,GACT,gBACA,GAAI,WACA,OACE,CAAC,iBAAiB,GAClB,CAAC,GAAG,OAAO,KAAK,SAAS,GAAG,OAAO,MAAM,QAAQ,GACnD,QAAQ,CAAC,CAAC,UAAU,SAClB,CAAC,6BAA6B,GAC9B,EAAE,CAET;GACD,OAAO,OAAO,QAAQ,WAAW,QAAQ;GACzC,UAAS,MAAK;AACZ,MAAE,iBAAiB;AAEnB,QAAI,SACF,SAAQ,CAAC,KAAK;IAGhB,MAAM,SAAS;KACb,UAAU;KACV,KAAK;KACL;KACA;KACD;AAED,cAAU,OAAO;AAEjB,QAAI,CAAC,SACH,YAAW,OAAO;;aAItB,qBAAC;IACC,WAAW,GACT,UACA,2CAED;;KAED,oBAAC;MAAM,WAAW,GAAG,YAAY,MAAM;MAAE,OAAO,QAAQ;gBACrD;OACK;KACP,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,UAAU,UACjC,oBAAC,eAAY,WAAW,GAAG,aAAa,GAAI;KAE7C,YAAY,CAAC,CAAC,UAAU,UACvB,oBAAC,eACC,WAAW,GACT,kBACA,OAAO,gBAAgB,WACxB,GACD;;KAEA;IACF,EACN,oBAAC,6BACE,CAAC,CAAC,UAAU,UAAU,QACrB,oBAAC,OAAO;GACN,WAAW,GACT,4BAED;GACD,OAAO;GACP,SAAS,WAAW;IAAE,QAAQ;IAAG,SAAS;IAAG,GAAG,EAAE,SAAS,GAAG;GAC9D,SAAS,WAAW;IAAE,QAAQ;IAAQ,SAAS;IAAG,GAAG,EAAE,SAAS,GAAG;GACnE,MAAM,WAAW;IAAE,QAAQ;IAAG,SAAS;IAAG,GAAG,EAAE,SAAS,GAAG;GAC3D,YAAY,EAAE,UAAU,IAAK;aAE7B,oBAAC;IACC,WAAW,GACT,iBACA,YAAY,eACZ,YAAY,QAEb;IACD,OAAO,QAAQ;cAEd,SAAS,KAAI,UACZ,8BAAC;KACC,GAAI;KACJ,KAAK,MAAM;KACX,SAAS,MAAM;KACf,SAAS,CAAC,GAAG,SAAS,MAAM,IAAI;KAClB;KACR;KACQ;KACF;KACJ;KACA;KACM;KACL;KACC;MACV,CACF;KACC;IACM,GAEC;GACf"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cn } from "
|
|
2
|
-
import Typography from "
|
|
1
|
+
import { cn } from "../../../../utils.mjs";
|
|
2
|
+
import Typography from "../../../../Typography.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
//#region src/components/molecules/
|
|
5
|
+
//#region src/components/molecules/menu/item/label.tsx
|
|
6
6
|
const Label = ({ children, className, ...props }) => {
|
|
7
7
|
if (typeof children === "string") return /* @__PURE__ */ jsx(Typography.Text, {
|
|
8
8
|
className: cn(className),
|
|
@@ -14,4 +14,4 @@ const Label = ({ children, className, ...props }) => {
|
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Label as default };
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=label.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.mjs","names":[],"sources":["../../../../../src/components/molecules/menu/item/label.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nimport Typography from '../../../atoms/typography';\n\ninterface Props extends React.ComponentPropsWithoutRef<\n typeof Typography.Text\n> {}\n\nconst Label = ({ children, className, ...props }: Props) => {\n if (typeof children === 'string') {\n return (\n <Typography.Text className={cn(className)} {...props}>\n {children}\n </Typography.Text>\n );\n }\n\n return children;\n};\n\nexport default Label;\n"],"mappings":";;;;;AAQA,MAAM,SAAS,EAAE,UAAU,WAAW,GAAG,YAAmB;AAC1D,KAAI,OAAO,aAAa,SACtB,QACE,oBAAC,WAAW;EAAK,WAAW,GAAG,UAAU;EAAE,GAAI;EAC5C;GACe;AAItB,QAAO"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/molecules/menu/menu.d.ts
|
|
4
|
+
interface MenuItem {
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
key: React.Key;
|
|
7
|
+
type?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
children?: MenuItem[];
|
|
10
|
+
}
|
|
11
|
+
interface Props {
|
|
12
|
+
mode?: 'horizontal' | 'vertical' | 'inline';
|
|
13
|
+
selectedKeys?: React.Key[];
|
|
14
|
+
defaultSelectedKeys?: React.Key[];
|
|
15
|
+
selectionMap?: SelectionMap;
|
|
16
|
+
offset?: [number, number];
|
|
17
|
+
inlineOffset?: number;
|
|
18
|
+
classNames?: {
|
|
19
|
+
rootItem?: string;
|
|
20
|
+
subMenu?: string;
|
|
21
|
+
item?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
};
|
|
24
|
+
styles?: {
|
|
25
|
+
rootItem?: React.CSSProperties;
|
|
26
|
+
subMenu?: React.CSSProperties;
|
|
27
|
+
item?: React.CSSProperties;
|
|
28
|
+
label?: React.CSSProperties;
|
|
29
|
+
};
|
|
30
|
+
onClick?: ClickEventHandler;
|
|
31
|
+
onSelect?: ClickEventHandler;
|
|
32
|
+
}
|
|
33
|
+
interface MenuProps extends Props, Omit<React.ComponentPropsWithoutRef<'ul'>, 'onClick' | 'onSelect'> {
|
|
34
|
+
items?: MenuItem[];
|
|
35
|
+
}
|
|
36
|
+
type ClickEventHandler = (params: {
|
|
37
|
+
domEvent: React.MouseEvent;
|
|
38
|
+
key: React.Key;
|
|
39
|
+
keyPath: React.Key[];
|
|
40
|
+
item: MenuItem;
|
|
41
|
+
}) => void;
|
|
42
|
+
declare const MENU_CLASSNAMES: string[];
|
|
43
|
+
type SelectionMap = ReadonlyMap<React.Key, boolean>;
|
|
44
|
+
declare const buildSelectionMap: (items: MenuItem[], selectedKeysSet: ReadonlySet<React.Key>) => SelectionMap;
|
|
45
|
+
declare const findKey: (menu: MenuItem, targetKeys: ReadonlySet<React.Key>) => boolean;
|
|
46
|
+
declare const Menu: ({
|
|
47
|
+
items,
|
|
48
|
+
mode,
|
|
49
|
+
defaultSelectedKeys,
|
|
50
|
+
selectedKeys: _selectedKeys,
|
|
51
|
+
className,
|
|
52
|
+
classNames,
|
|
53
|
+
styles,
|
|
54
|
+
offset,
|
|
55
|
+
inlineOffset,
|
|
56
|
+
onClick,
|
|
57
|
+
onSelect: _onSelect,
|
|
58
|
+
...props
|
|
59
|
+
}: MenuProps) => react_jsx_runtime0.JSX.Element;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { ClickEventHandler, MENU_CLASSNAMES, Menu, MenuItem, MenuProps, Props, SelectionMap, buildSelectionMap, findKey };
|
|
62
|
+
//# sourceMappingURL=menu.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.mts","names":[],"sources":["../../../../src/components/molecules/menu/menu.tsx"],"mappings":";;;UAQiB,QAAA;EACf,KAAA,EAAO,KAAA,CAAM,SAAA;EACb,GAAA,EAAK,KAAA,CAAM,GAAA;EACX,IAAA;EACA,IAAA;EACA,QAAA,GAAW,QAAA;AAAA;AAAA,UAGI,KAAA;EACf,IAAA;EACA,YAAA,GAAe,KAAA,CAAM,GAAA;EACrB,mBAAA,GAAsB,KAAA,CAAM,GAAA;EAC5B,YAAA,GAAe,YAAA;EACf,MAAA;EACA,YAAA;EACA,UAAA;IACE,QAAA;IACA,OAAA;IACA,IAAA;IACA,KAAA;EAAA;EAGF,MAAA;IACE,QAAA,GAAW,KAAA,CAAM,aAAA;IACjB,OAAA,GAAU,KAAA,CAAM,aAAA;IAChB,IAAA,GAAO,KAAA,CAAM,aAAA;IACb,KAAA,GAAQ,KAAA,CAAM,aAAA;EAAA;EAGhB,OAAA,GAAU,iBAAA;EACV,QAAA,GAAW,iBAAA;AAAA;AAAA,UAGI,SAAA,SAEb,KAAA,EACA,IAAA,CAAK,KAAA,CAAM,wBAAA;EACb,KAAA,GAAQ,QAAA;AAAA;AAAA,KAGE,iBAAA,IAAqB,MAAA;EAC/B,QAAA,EAAU,KAAA,CAAM,UAAA;EAChB,GAAA,EAAK,KAAA,CAAM,GAAA;EACX,OAAA,EAAS,KAAA,CAAM,GAAA;EACf,IAAA,EAAM,QAAA;AAAA;AAAA,cAGK,eAAA;AAAA,KAQD,YAAA,GAAe,WAAA,CAAY,KAAA,CAAM,GAAA;AAAA,cAEhC,iBAAA,GACX,KAAA,EAAO,QAAA,IACP,eAAA,EAAiB,WAAA,CAAY,KAAA,CAAM,GAAA,MAClC,YAAA;AAAA,cAeU,OAAA,GACX,IAAA,EAAM,QAAA,EACN,UAAA,EAAY,WAAA,CAAY,KAAA,CAAM,GAAA;AAAA,cAiB1B,IAAA;EAAQ,KAAA;EAAA,IAAA;EAAA,mBAAA;EAAA,YAAA,EAAA,aAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAA,MAAA;EAAA,YAAA;EAAA,OAAA;EAAA,QAAA,EAAA,SAAA;EAAA,GAAA;AAAA,GAaX,SAAA,KAAS,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../utils.mjs";
|
|
4
|
+
import Item from "./item/item.mjs";
|
|
5
|
+
import "./item/index.mjs";
|
|
6
|
+
import { createElement, useMemo, useState } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/molecules/menu/menu.tsx
|
|
10
|
+
const MENU_CLASSNAMES = [
|
|
11
|
+
"p-0",
|
|
12
|
+
"bg-white",
|
|
13
|
+
"shadow-md",
|
|
14
|
+
"rounded-md"
|
|
15
|
+
];
|
|
16
|
+
const buildSelectionMap = (items, selectedKeysSet) => {
|
|
17
|
+
const map = /* @__PURE__ */ new Map();
|
|
18
|
+
const dfs = (node) => {
|
|
19
|
+
const self = selectedKeysSet.has(node.key);
|
|
20
|
+
const hasSelectedChild = node.children?.some((child) => dfs(child)) ?? false;
|
|
21
|
+
const isSelected = self || hasSelectedChild;
|
|
22
|
+
map.set(node.key, isSelected);
|
|
23
|
+
return isSelected;
|
|
24
|
+
};
|
|
25
|
+
items.forEach(dfs);
|
|
26
|
+
return map;
|
|
27
|
+
};
|
|
28
|
+
const findKey = (menu, targetKeys) => {
|
|
29
|
+
if (targetKeys.has(menu.key)) return true;
|
|
30
|
+
if (menu.children && Array.isArray(menu.children)) {
|
|
31
|
+
for (const child of menu.children) if (findKey(child, targetKeys)) return true;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
};
|
|
35
|
+
const Menu = ({ items, mode = "vertical", defaultSelectedKeys = [], selectedKeys: _selectedKeys, className, classNames, styles, offset, inlineOffset, onClick, onSelect: _onSelect, ...props }) => {
|
|
36
|
+
const controlled = _selectedKeys !== void 0;
|
|
37
|
+
const [uncontrolledSelectedKeys, setUncontrolledSelectedKeys] = useState(defaultSelectedKeys ?? []);
|
|
38
|
+
const selectedKeys = controlled ? _selectedKeys : uncontrolledSelectedKeys;
|
|
39
|
+
const selectedKeysSet = useMemo(() => new Set(selectedKeys ?? []), [selectedKeys]);
|
|
40
|
+
const selectionMap = useMemo(() => buildSelectionMap(items ?? [], selectedKeysSet), [items, selectedKeysSet]);
|
|
41
|
+
const onSelect = (params) => {
|
|
42
|
+
if (!controlled) setUncontrolledSelectedKeys([params.key]);
|
|
43
|
+
_onSelect?.(params);
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
46
|
+
role: "menu",
|
|
47
|
+
className: cn(MENU_CLASSNAMES, mode === "horizontal" ? "flex" : "inline-block", className),
|
|
48
|
+
...props,
|
|
49
|
+
children: items?.map((item) => /* @__PURE__ */ createElement(Item, {
|
|
50
|
+
root: true,
|
|
51
|
+
...item,
|
|
52
|
+
key: item.key,
|
|
53
|
+
itemKey: item.key,
|
|
54
|
+
keyPath: [item.key],
|
|
55
|
+
selectedKeys,
|
|
56
|
+
selectionMap,
|
|
57
|
+
mode,
|
|
58
|
+
classNames,
|
|
59
|
+
styles,
|
|
60
|
+
offset,
|
|
61
|
+
inlineOffset,
|
|
62
|
+
onClick,
|
|
63
|
+
onSelect
|
|
64
|
+
}))
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { MENU_CLASSNAMES, buildSelectionMap, Menu as default, findKey };
|
|
70
|
+
//# sourceMappingURL=menu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.mjs","names":[],"sources":["../../../../src/components/molecules/menu/menu.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo, useState } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Item from './item';\n\nexport interface MenuItem {\n label: React.ReactNode;\n key: React.Key;\n type?: string;\n path?: string;\n children?: MenuItem[];\n}\n\nexport interface Props {\n mode?: 'horizontal' | 'vertical' | 'inline';\n selectedKeys?: React.Key[];\n defaultSelectedKeys?: React.Key[];\n selectionMap?: SelectionMap;\n offset?: [number, number];\n inlineOffset?: number;\n classNames?: {\n rootItem?: string;\n subMenu?: string;\n item?: string;\n label?: string;\n // open?: string;\n };\n styles?: {\n rootItem?: React.CSSProperties;\n subMenu?: React.CSSProperties;\n item?: React.CSSProperties;\n label?: React.CSSProperties;\n // open?: React.CSSProperties;\n };\n onClick?: ClickEventHandler;\n onSelect?: ClickEventHandler;\n}\n\nexport interface MenuProps\n extends\n Props,\n Omit<React.ComponentPropsWithoutRef<'ul'>, 'onClick' | 'onSelect'> {\n items?: MenuItem[];\n}\n\nexport type ClickEventHandler = (params: {\n domEvent: React.MouseEvent;\n key: React.Key;\n keyPath: React.Key[];\n item: MenuItem;\n}) => void;\n\nexport const MENU_CLASSNAMES = [\n 'p-0',\n 'bg-white',\n 'shadow-md',\n 'rounded-md',\n //\n];\n\nexport type SelectionMap = ReadonlyMap<React.Key, boolean>;\n\nexport const buildSelectionMap = (\n items: MenuItem[],\n selectedKeysSet: ReadonlySet<React.Key>,\n): SelectionMap => {\n const map = new Map<React.Key, boolean>();\n\n const dfs = (node: MenuItem): boolean => {\n const self = selectedKeysSet.has(node.key);\n const hasSelectedChild = node.children?.some(child => dfs(child)) ?? false;\n const isSelected = self || hasSelectedChild;\n map.set(node.key, isSelected);\n return isSelected;\n };\n\n items.forEach(dfs);\n return map;\n};\n\nexport const findKey = (\n menu: MenuItem,\n targetKeys: ReadonlySet<React.Key>,\n): boolean => {\n if (targetKeys.has(menu.key)) {\n return true;\n }\n\n if (menu.children && Array.isArray(menu.children)) {\n for (const child of menu.children) {\n if (findKey(child, targetKeys)) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst Menu = ({\n items,\n mode = 'vertical',\n defaultSelectedKeys = [],\n selectedKeys: _selectedKeys,\n className,\n classNames,\n styles,\n offset,\n inlineOffset,\n onClick,\n onSelect: _onSelect,\n ...props\n}: MenuProps) => {\n const controlled = _selectedKeys !== undefined;\n const [uncontrolledSelectedKeys, setUncontrolledSelectedKeys] = useState<\n React.Key[]\n >(defaultSelectedKeys ?? []);\n\n const selectedKeys = controlled\n ? (_selectedKeys as React.Key[])\n : uncontrolledSelectedKeys;\n\n const selectedKeysSet = useMemo(\n () => new Set<React.Key>(selectedKeys ?? []),\n [selectedKeys],\n );\n\n const selectionMap = useMemo(\n () => buildSelectionMap(items ?? [], selectedKeysSet),\n [items, selectedKeysSet],\n );\n\n const onSelect = (params: {\n domEvent: React.MouseEvent;\n key: React.Key;\n keyPath: React.Key[];\n item: MenuItem;\n }) => {\n if (!controlled) {\n setUncontrolledSelectedKeys([params.key]);\n }\n _onSelect?.(params);\n };\n\n return (\n <ul\n role=\"menu\"\n className={cn(\n MENU_CLASSNAMES,\n mode === 'horizontal' ? 'flex' : 'inline-block',\n className,\n )}\n {...props}\n >\n {items?.map(item => (\n <Item\n root\n {...item}\n key={item.key}\n itemKey={item.key}\n keyPath={[item.key]}\n selectedKeys={selectedKeys}\n selectionMap={selectionMap}\n mode={mode}\n classNames={classNames}\n styles={styles}\n offset={offset}\n inlineOffset={inlineOffset}\n onClick={onClick}\n onSelect={onSelect}\n />\n ))}\n </ul>\n );\n};\n\nexport default Menu;\n"],"mappings":";;;;;;;;;AAuDA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CAED;AAID,MAAa,qBACX,OACA,oBACiB;CACjB,MAAM,sBAAM,IAAI,KAAyB;CAEzC,MAAM,OAAO,SAA4B;EACvC,MAAM,OAAO,gBAAgB,IAAI,KAAK,IAAI;EAC1C,MAAM,mBAAmB,KAAK,UAAU,MAAK,UAAS,IAAI,MAAM,CAAC,IAAI;EACrE,MAAM,aAAa,QAAQ;AAC3B,MAAI,IAAI,KAAK,KAAK,WAAW;AAC7B,SAAO;;AAGT,OAAM,QAAQ,IAAI;AAClB,QAAO;;AAGT,MAAa,WACX,MACA,eACY;AACZ,KAAI,WAAW,IAAI,KAAK,IAAI,CAC1B,QAAO;AAGT,KAAI,KAAK,YAAY,MAAM,QAAQ,KAAK,SAAS,EAC/C;OAAK,MAAM,SAAS,KAAK,SACvB,KAAI,QAAQ,OAAO,WAAW,CAC5B,QAAO;;AAKb,QAAO;;AAGT,MAAM,QAAQ,EACZ,OACA,OAAO,YACP,sBAAsB,EAAE,EACxB,cAAc,eACd,WACA,YACA,QACA,QACA,cACA,SACA,UAAU,WACV,GAAG,YACY;CACf,MAAM,aAAa,kBAAkB;CACrC,MAAM,CAAC,0BAA0B,+BAA+B,SAE9D,uBAAuB,EAAE,CAAC;CAE5B,MAAM,eAAe,aAChB,gBACD;CAEJ,MAAM,kBAAkB,cAChB,IAAI,IAAe,gBAAgB,EAAE,CAAC,EAC5C,CAAC,aAAa,CACf;CAED,MAAM,eAAe,cACb,kBAAkB,SAAS,EAAE,EAAE,gBAAgB,EACrD,CAAC,OAAO,gBAAgB,CACzB;CAED,MAAM,YAAY,WAKZ;AACJ,MAAI,CAAC,WACH,6BAA4B,CAAC,OAAO,IAAI,CAAC;AAE3C,cAAY,OAAO;;AAGrB,QACE,oBAAC;EACC,MAAK;EACL,WAAW,GACT,iBACA,SAAS,eAAe,SAAS,gBACjC,UACD;EACD,GAAI;YAEH,OAAO,KAAI,SACV,8BAAC;GACC;GACA,GAAI;GACJ,KAAK,KAAK;GACV,SAAS,KAAK;GACd,SAAS,CAAC,KAAK,IAAI;GACL;GACA;GACR;GACM;GACJ;GACA;GACM;GACL;GACC;IACV,CACF;GACC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
import { MotionProps } from "motion/react";
|
|
3
3
|
|
|
4
|
-
//#region src/components/molecules/
|
|
4
|
+
//#region src/components/molecules/reveals/item.d.ts
|
|
5
5
|
declare const effectVariants: {
|
|
6
6
|
fadeIn: {
|
|
7
7
|
offscreen: {
|
|
@@ -57,4 +57,4 @@ declare const Item: ({
|
|
|
57
57
|
}: ItemProps) => react_jsx_runtime0.JSX.Element;
|
|
58
58
|
//#endregion
|
|
59
59
|
export { Item, ItemProps };
|
|
60
|
-
//# sourceMappingURL=
|
|
60
|
+
//# sourceMappingURL=item.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.mts","names":[],"sources":["../../../../src/components/molecules/reveals/item.tsx"],"mappings":";;;;cAMM,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAeW,SAAA;EACf,MAAA,gBAAsB,cAAA;EACtB,KAAA;EACA,IAAA;EACA,QAAA;EACA,SAAA;EACA,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,QAAA,GAAW,WAAA;EACX,QAAA,GAAW,WAAA;EACX,UAAA,GAAa,WAAA;AAAA;AAAA,cAGT,IAAA;EAAQ,MAAA;EAAA,QAAA;EAAA,IAAA;EAAA,QAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,UAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAWX,SAAA,KAAS,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../../utils.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { motion } from "motion/react";
|
|
6
6
|
|
|
7
|
-
//#region src/components/molecules/
|
|
7
|
+
//#region src/components/molecules/reveals/item.tsx
|
|
8
8
|
const effectVariants = {
|
|
9
9
|
fadeIn: {
|
|
10
10
|
offscreen: { opacity: 0 },
|
|
@@ -64,4 +64,4 @@ const Item = ({ effect = "fadeInUp", children, once, viewport, variants, duratio
|
|
|
64
64
|
|
|
65
65
|
//#endregion
|
|
66
66
|
export { Item as default };
|
|
67
|
-
//# sourceMappingURL=
|
|
67
|
+
//# sourceMappingURL=item.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.mjs","names":[],"sources":["../../../../src/components/molecules/reveals/item.tsx"],"sourcesContent":["'use client';\n\nimport { type MotionProps, motion } from 'motion/react';\n\nimport { cn } from '@repo/ui/utils';\n\nconst effectVariants = {\n fadeIn: {\n offscreen: { opacity: 0 },\n onscreen: { opacity: 1 },\n },\n fadeInUp: {\n offscreen: { opacity: 0, y: 50 },\n onscreen: { opacity: 1, y: 0 },\n },\n slideInUp: {\n offscreen: { opacity: 1, y: 50 },\n onscreen: { opacity: 1, y: 0 },\n },\n};\n\nexport interface ItemProps {\n effect?: keyof typeof effectVariants;\n delay?: number;\n once?: boolean;\n duration?: number;\n className?: string;\n children?: React.ReactNode;\n viewport?: MotionProps['viewport'];\n variants?: MotionProps['variants'];\n transition?: MotionProps['transition'];\n}\n\nconst Item = ({\n effect = 'fadeInUp',\n children,\n once,\n viewport,\n variants,\n duration,\n delay,\n transition,\n className,\n ...props\n}: ItemProps) => {\n return (\n <motion.div\n initial=\"offscreen\"\n whileInView=\"onscreen\"\n viewport={{ once, ...viewport }}\n variants={{\n offscreen: {\n ...effectVariants[effect].offscreen,\n ...variants?.offscreen,\n transition: {\n duration: 0,\n },\n },\n onscreen: {\n ...effectVariants[effect].onscreen,\n ...variants?.onscreen,\n transition: {\n duration,\n ease: 'easeOut',\n delay,\n ...transition,\n },\n },\n }}\n className={cn(\n 'flex h-full items-center justify-center',\n className,\n //\n )}\n {...props}\n >\n {children}\n </motion.div>\n );\n};\n\nexport default Item;\n"],"mappings":";;;;;;;AAMA,MAAM,iBAAiB;CACrB,QAAQ;EACN,WAAW,EAAE,SAAS,GAAG;EACzB,UAAU,EAAE,SAAS,GAAG;EACzB;CACD,UAAU;EACR,WAAW;GAAE,SAAS;GAAG,GAAG;GAAI;EAChC,UAAU;GAAE,SAAS;GAAG,GAAG;GAAG;EAC/B;CACD,WAAW;EACT,WAAW;GAAE,SAAS;GAAG,GAAG;GAAI;EAChC,UAAU;GAAE,SAAS;GAAG,GAAG;GAAG;EAC/B;CACF;AAcD,MAAM,QAAQ,EACZ,SAAS,YACT,UACA,MACA,UACA,UACA,UACA,OACA,YACA,WACA,GAAG,YACY;AACf,QACE,oBAAC,OAAO;EACN,SAAQ;EACR,aAAY;EACZ,UAAU;GAAE;GAAM,GAAG;GAAU;EAC/B,UAAU;GACR,WAAW;IACT,GAAG,eAAe,QAAQ;IAC1B,GAAG,UAAU;IACb,YAAY,EACV,UAAU,GACX;IACF;GACD,UAAU;IACR,GAAG,eAAe,QAAQ;IAC1B,GAAG,UAAU;IACb,YAAY;KACV;KACA,MAAM;KACN;KACA,GAAG;KACJ;IACF;GACF;EACD,WAAW,GACT,2CACA,UAED;EACD,GAAI;EAEH;GACU"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ItemProps } from "./item.mjs";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/reveals/reveals.d.ts
|
|
5
|
+
interface Props extends React.ComponentPropsWithoutRef<'div'>, ItemProps {
|
|
6
|
+
cascade?: number;
|
|
7
|
+
classNames?: {
|
|
8
|
+
root?: string;
|
|
9
|
+
item?: string;
|
|
10
|
+
};
|
|
11
|
+
once?: boolean;
|
|
12
|
+
items?: ItemProps[];
|
|
13
|
+
}
|
|
14
|
+
declare const DURATION = 0.6;
|
|
15
|
+
declare const DELAY = 0;
|
|
16
|
+
declare const CASCADE = 0.1;
|
|
17
|
+
declare const Reveals: ({
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
classNames,
|
|
21
|
+
items,
|
|
22
|
+
cascade,
|
|
23
|
+
duration,
|
|
24
|
+
delay,
|
|
25
|
+
...props
|
|
26
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CASCADE, DELAY, DURATION, Props, Reveals };
|
|
29
|
+
//# sourceMappingURL=reveals.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveals.d.mts","names":[],"sources":["../../../../src/components/molecules/reveals/reveals.tsx"],"mappings":";;;;UAMiB,KAAA,SACP,KAAA,CAAM,wBAAA,SAAiC,SAAA;EAC/C,OAAA;EACA,UAAA;IACE,IAAA;IACA,IAAA;EAAA;EAEF,IAAA;EACA,KAAA,GAAQ,SAAA;AAAA;AAAA,cAGG,QAAA;AAAA,cACA,KAAA;AAAA,cACA,OAAA;AAAA,cAEP,OAAA;EAAW,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,KAAA;EAAA,OAAA;EAAA,QAAA;EAAA,KAAA;EAAA,GAAA;AAAA,GASd,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from "../../../utils.mjs";
|
|
2
|
+
import Item from "./item.mjs";
|
|
3
|
+
import { Children } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/molecules/reveals/reveals.tsx
|
|
7
|
+
const DURATION = .6;
|
|
8
|
+
const DELAY = 0;
|
|
9
|
+
const CASCADE = .1;
|
|
10
|
+
const Reveals = ({ children, className, classNames, items = [], cascade = CASCADE, duration = DURATION, delay = DELAY, ...props }) => {
|
|
11
|
+
const renderItems = (items) => items.map((item, index) => /* @__PURE__ */ jsx(Item, {
|
|
12
|
+
duration,
|
|
13
|
+
delay: delay + cascade * index,
|
|
14
|
+
className: cn(item.className, classNames?.item),
|
|
15
|
+
...props,
|
|
16
|
+
...item,
|
|
17
|
+
children: item.children
|
|
18
|
+
}, index));
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: cn("flex gap-5", className, classNames?.root),
|
|
21
|
+
...props,
|
|
22
|
+
children: renderItems(children ? Children.toArray(children).map((child) => ({ children: child })) : items)
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { CASCADE, DELAY, DURATION, Reveals as default };
|
|
28
|
+
//# sourceMappingURL=reveals.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveals.mjs","names":[],"sources":["../../../../src/components/molecules/reveals/reveals.tsx"],"sourcesContent":["import { Children } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Item, { type ItemProps } from './item';\n\nexport interface Props\n extends React.ComponentPropsWithoutRef<'div'>, ItemProps {\n cascade?: number;\n classNames?: {\n root?: string;\n item?: string;\n };\n once?: boolean;\n items?: ItemProps[];\n}\n\nexport const DURATION = 0.6;\nexport const DELAY = 0;\nexport const CASCADE = 0.1;\n\nconst Reveals = ({\n children,\n className,\n classNames,\n items = [],\n cascade = CASCADE,\n duration = DURATION,\n delay = DELAY,\n ...props\n}: Props) => {\n const renderItems = (items: ItemProps[]) =>\n items.map((item, index) => (\n <Item\n key={index}\n duration={duration}\n delay={delay + cascade * index}\n className={cn(\n item.className,\n classNames?.item,\n //\n )}\n {...props}\n {...item}\n //\n >\n {item.children}\n </Item>\n ));\n\n return (\n <div\n className={cn(\n 'flex gap-5',\n className,\n classNames?.root,\n //\n )}\n {...props}\n >\n {renderItems(\n children\n ? Children.toArray(children).map(child => ({\n children: child,\n }))\n : items,\n )}\n </div>\n );\n};\n\nexport default Reveals;\n"],"mappings":";;;;;;AAiBA,MAAa,WAAW;AACxB,MAAa,QAAQ;AACrB,MAAa,UAAU;AAEvB,MAAM,WAAW,EACf,UACA,WACA,YACA,QAAQ,EAAE,EACV,UAAU,SACV,WAAW,UACX,QAAQ,OACR,GAAG,YACQ;CACX,MAAM,eAAe,UACnB,MAAM,KAAK,MAAM,UACf,oBAAC;EAEW;EACV,OAAO,QAAQ,UAAU;EACzB,WAAW,GACT,KAAK,WACL,YAAY,KAEb;EACD,GAAI;EACJ,GAAI;YAGH,KAAK;IAZD,MAaA,CACP;AAEJ,QACE,oBAAC;EACC,WAAW,GACT,cACA,WACA,YAAY,KAEb;EACD,GAAI;YAEH,YACC,WACI,SAAS,QAAQ,SAAS,CAAC,KAAI,WAAU,EACvC,UAAU,OACX,EAAE,GACH,MACL;GACG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Panel, Props } from "./panel.mjs";
|
|
2
|
+
import { Props as Props$1, Splitter as Splitter$1 } from "./splitter.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/splitter/index.d.ts
|
|
5
|
+
type SplitterComponent = typeof Splitter$1 & {
|
|
6
|
+
Panel: typeof Panel;
|
|
7
|
+
};
|
|
8
|
+
declare const Splitter: SplitterComponent;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Splitter };
|
|
11
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/splitter/index.ts"],"mappings":";;;;KAGK,iBAAA,UAA2B,UAAA;EAAiB,KAAA,SAAc,KAAA;AAAA;AAAA,cAEzD,QAAA,EAA2B,iBAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Panel from "./panel.mjs";
|
|
2
|
+
import Splitter$1 from "./splitter.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/splitter/index.ts
|
|
5
|
+
const Splitter = Splitter$1;
|
|
6
|
+
Splitter.Panel = Panel;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Splitter as default };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["SplitterImpl"],"sources":["../../../../src/components/molecules/splitter/index.ts"],"sourcesContent":["import Panel, { type Props as SplitterPanelProps } from './panel';\nimport SplitterImpl, { type Props } from './splitter';\n\ntype SplitterComponent = typeof SplitterImpl & { Panel: typeof Panel };\n\nconst Splitter = SplitterImpl as SplitterComponent;\n\nSplitter.Panel = Panel;\n\nexport default Splitter;\nexport type { Props, SplitterPanelProps };\n"],"mappings":";;;;AAKA,MAAM,WAAWA;AAEjB,SAAS,QAAQ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResizablePanel as ResizablePanel$1 } from "../../../core/resizable.mjs";
|
|
2
|
+
import "../../../core.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/molecules/splitter/panel.d.ts
|
|
6
|
+
declare const ResizablePanel: typeof ResizablePanel$1;
|
|
7
|
+
interface Props extends React.ComponentProps<typeof ResizablePanel> {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Panel: ({
|
|
11
|
+
children,
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Panel, Props };
|
|
17
|
+
//# sourceMappingURL=panel.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.mts","names":[],"sources":["../../../../src/components/molecules/splitter/panel.tsx"],"mappings":";;;;;cAGQ,cAAA,SAAc,gBAAA;AAAA,UAEL,KAAA,SAAc,KAAA,CAAM,cAAA,QAAsB,cAAA;EACzD,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,cAGZ,KAAA;EAAS,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAAmC,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn } from "../../../utils.mjs";
|
|
2
|
+
import { resizable_exports } from "../../../core/resizable.mjs";
|
|
3
|
+
import "../../../core.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/molecules/splitter/panel.tsx
|
|
7
|
+
const { ResizablePanel } = resizable_exports;
|
|
8
|
+
const Panel = ({ children, className, ...props }) => {
|
|
9
|
+
return /* @__PURE__ */ jsx(ResizablePanel, {
|
|
10
|
+
className: cn("min-h-0 min-w-0 overflow-auto", className),
|
|
11
|
+
...props,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Panel as default };
|
|
18
|
+
//# sourceMappingURL=panel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.mjs","names":["resizable"],"sources":["../../../../src/components/molecules/splitter/panel.tsx"],"sourcesContent":["import { resizable } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { ResizablePanel } = resizable;\n\nexport interface Props extends React.ComponentProps<typeof ResizablePanel> {\n children: React.ReactNode;\n}\n\nconst Panel = ({ children, className, ...props }: Props) => {\n return (\n <ResizablePanel\n className={cn('min-h-0 min-w-0 overflow-auto', className)}\n {...props}\n >\n {children}\n </ResizablePanel>\n );\n};\n\nexport default Panel;\n"],"mappings":";;;;;;AAGA,MAAM,EAAE,mBAAmBA;AAM3B,MAAM,SAAS,EAAE,UAAU,WAAW,GAAG,YAAmB;AAC1D,QACE,oBAAC;EACC,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;EAEH;GACc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ResizablePanelGroup as ResizablePanelGroup$1 } from "../../../core/resizable.mjs";
|
|
2
|
+
import "../../../core.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/molecules/splitter/splitter.d.ts
|
|
6
|
+
declare const ResizablePanelGroup: typeof ResizablePanelGroup$1;
|
|
7
|
+
type SplitterLayout = Parameters<NonNullable<React.ComponentProps<typeof ResizablePanelGroup>['onLayoutChanged']>>[0];
|
|
8
|
+
interface Props extends Omit<React.ComponentProps<typeof ResizablePanelGroup>, 'children' | 'orientation' | 'onLayoutChange' | 'onLayoutChanged' | 'onResize'> {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
orientation?: 'horizontal' | 'vertical';
|
|
11
|
+
withHandle?: boolean;
|
|
12
|
+
handle?: React.ReactNode;
|
|
13
|
+
handleClassName?: string;
|
|
14
|
+
onResize?: (layout: SplitterLayout) => void;
|
|
15
|
+
onResizeEnd?: (layout: SplitterLayout) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const Splitter: ({
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
orientation,
|
|
21
|
+
withHandle,
|
|
22
|
+
handle,
|
|
23
|
+
handleClassName,
|
|
24
|
+
onResize,
|
|
25
|
+
onResizeEnd,
|
|
26
|
+
...props
|
|
27
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Props, Splitter };
|
|
30
|
+
//# sourceMappingURL=splitter.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.d.mts","names":[],"sources":["../../../../src/components/molecules/splitter/splitter.tsx"],"mappings":";;;;;cAOyB,mBAAA,SAAmB,qBAAA;AAAA,KAEvC,cAAA,GAAiB,UAAA,CACpB,WAAA,CACE,KAAA,CAAM,cAAA,QAAsB,mBAAA;AAAA,UAIf,KAAA,SAAc,IAAA,CAC7B,KAAA,CAAM,cAAA,QAAsB,mBAAA;EAG5B,QAAA,EAAU,KAAA,CAAM,SAAA;EAChB,WAAA;EACA,UAAA;EACA,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,eAAA;EACA,QAAA,IAAY,MAAA,EAAQ,cAAA;EACpB,WAAA,IAAe,MAAA,EAAQ,cAAA;AAAA;AAAA,cAGnB,QAAA;EAAY,QAAA;EAAA,SAAA;EAAA,WAAA;EAAA,UAAA;EAAA,MAAA;EAAA,eAAA;EAAA,QAAA;EAAA,WAAA;EAAA,GAAA;AAAA,GAUf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -6,16 +6,9 @@ import "../../../core.mjs";
|
|
|
6
6
|
import { Children, Fragment } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
|
-
//#region src/components/molecules/
|
|
10
|
-
const { ResizableHandle,
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */ jsx(ResizablePanel, {
|
|
13
|
-
className: cn("min-h-0 min-w-0 overflow-auto", className),
|
|
14
|
-
...props,
|
|
15
|
-
children
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
const Splitter = (({ children, className, orientation = "horizontal", withHandle = true, handle, handleClassName, onResize, onResizeEnd, ...props }) => {
|
|
9
|
+
//#region src/components/molecules/splitter/splitter.tsx
|
|
10
|
+
const { ResizableHandle, ResizablePanelGroup } = resizable_exports;
|
|
11
|
+
const Splitter = ({ children, className, orientation = "horizontal", withHandle = true, handle, handleClassName, onResize, onResizeEnd, ...props }) => {
|
|
19
12
|
const panels = Children.toArray(children);
|
|
20
13
|
return /* @__PURE__ */ jsx(ResizablePanelGroup, {
|
|
21
14
|
className: cn("border-border/60 h-full w-full rounded-lg border", className),
|
|
@@ -24,14 +17,14 @@ const Splitter = (({ children, className, orientation = "horizontal", withHandle
|
|
|
24
17
|
onLayoutChanged: onResizeEnd,
|
|
25
18
|
...props,
|
|
26
19
|
children: panels.map((panel, index) => /* @__PURE__ */ jsxs(Fragment, { children: [panel, index < panels.length - 1 && /* @__PURE__ */ jsx(ResizableHandle, {
|
|
27
|
-
className: cn(
|
|
20
|
+
className: cn(`hover:bg-border/80 data-separator-active:bg-border
|
|
21
|
+
transition-colors`, handleClassName),
|
|
28
22
|
withHandle: withHandle && handle === void 0,
|
|
29
23
|
children: handle
|
|
30
24
|
})] }, index))
|
|
31
25
|
});
|
|
32
|
-
}
|
|
33
|
-
Splitter.Panel = SplitterPanel;
|
|
26
|
+
};
|
|
34
27
|
|
|
35
28
|
//#endregion
|
|
36
29
|
export { Splitter as default };
|
|
37
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=splitter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.mjs","names":["resizable"],"sources":["../../../../src/components/molecules/splitter/splitter.tsx"],"sourcesContent":["'use client';\n\nimport { Children, Fragment } from 'react';\n\nimport { resizable } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { ResizableHandle, ResizablePanelGroup } = resizable;\n\ntype SplitterLayout = Parameters<\n NonNullable<\n React.ComponentProps<typeof ResizablePanelGroup>['onLayoutChanged']\n >\n>[0];\n\nexport interface Props extends Omit<\n React.ComponentProps<typeof ResizablePanelGroup>,\n 'children' | 'orientation' | 'onLayoutChange' | 'onLayoutChanged' | 'onResize'\n> {\n children: React.ReactNode;\n orientation?: 'horizontal' | 'vertical';\n withHandle?: boolean;\n handle?: React.ReactNode;\n handleClassName?: string;\n onResize?: (layout: SplitterLayout) => void;\n onResizeEnd?: (layout: SplitterLayout) => void;\n}\n\nconst Splitter = ({\n children,\n className,\n orientation = 'horizontal',\n withHandle = true,\n handle,\n handleClassName,\n onResize,\n onResizeEnd,\n ...props\n}: Props) => {\n const panels = Children.toArray(children);\n\n return (\n <ResizablePanelGroup\n className={cn(\n 'border-border/60 h-full w-full rounded-lg border',\n className,\n )}\n orientation={orientation}\n onLayoutChange={onResize}\n onLayoutChanged={onResizeEnd}\n {...props}\n >\n {panels.map((panel, index) => (\n <Fragment key={index}>\n {panel}\n {index < panels.length - 1 && (\n <ResizableHandle\n className={cn(\n `hover:bg-border/80 data-separator-active:bg-border\n transition-colors`,\n handleClassName,\n )}\n withHandle={withHandle && handle === undefined}\n >\n {handle}\n </ResizableHandle>\n )}\n </Fragment>\n ))}\n </ResizablePanelGroup>\n );\n};\n\nexport default Splitter;\n"],"mappings":";;;;;;;;;AAOA,MAAM,EAAE,iBAAiB,wBAAwBA;AAqBjD,MAAM,YAAY,EAChB,UACA,WACA,cAAc,cACd,aAAa,MACb,QACA,iBACA,UACA,aACA,GAAG,YACQ;CACX,MAAM,SAAS,SAAS,QAAQ,SAAS;AAEzC,QACE,oBAAC;EACC,WAAW,GACT,oDACA,UACD;EACY;EACb,gBAAgB;EAChB,iBAAiB;EACjB,GAAI;YAEH,OAAO,KAAK,OAAO,UAClB,qBAAC,uBACE,OACA,QAAQ,OAAO,SAAS,KACvB,oBAAC;GACC,WAAW,GACT;oCAEA,gBACD;GACD,YAAY,cAAc,WAAW;aAEpC;IACe,KAZP,MAcJ,CACX;GACkB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
|
-
//#region src/components/organisms/
|
|
3
|
+
//#region src/components/organisms/drawer.d.ts
|
|
4
4
|
interface Props {
|
|
5
5
|
open: boolean;
|
|
6
6
|
children?: React.ReactNode;
|
|
@@ -56,4 +56,4 @@ declare const Drawer: ({
|
|
|
56
56
|
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { Drawer, Props };
|
|
59
|
-
//# sourceMappingURL=
|
|
59
|
+
//# sourceMappingURL=drawer.d.mts.map
|