@jbpark/ui-kit 5.2.0 → 5.4.0
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/dist/Button.d.mts +1 -19
- package/dist/Button.d.mts.map +1 -1
- package/dist/Button.mjs +2 -4
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.d.mts +1 -10
- package/dist/Card.d.mts.map +1 -1
- package/dist/Card.mjs +1 -2
- package/dist/Card.mjs.map +1 -1
- package/dist/Layout.d.mts +5 -6
- package/dist/Layout.d.mts.map +1 -1
- package/dist/Layout.mjs +1 -2
- package/dist/Layout.mjs.map +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/Menu.mjs +1 -2
- package/dist/Reveals.d.mts +2 -3
- package/dist/Reveals.d.mts.map +1 -1
- package/dist/Reveals.mjs +1 -2
- package/dist/Reveals.mjs.map +1 -1
- package/dist/Space.d.mts +1 -17
- package/dist/Space.d.mts.map +1 -1
- package/dist/Space.mjs +1 -2
- package/dist/Space.mjs.map +1 -1
- package/dist/Tag.d.mts +1 -9
- package/dist/Tag.d.mts.map +1 -1
- package/dist/Tag.mjs +1 -2
- package/dist/Tag.mjs.map +1 -1
- package/dist/Typography.d.mts +5 -6
- package/dist/Typography.d.mts.map +1 -1
- package/dist/Typography.mjs +1 -2
- package/dist/Typography.mjs.map +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +6 -11
- package/dist/components/atoms/checkbox/checkbox.d.mts +2 -17
- package/dist/components/atoms/checkbox/checkbox.d.mts.map +1 -1
- package/dist/components/atoms/checkbox/checkbox.mjs +2 -4
- package/dist/components/atoms/checkbox/checkbox.mjs.map +1 -1
- package/dist/components/atoms/checkbox/group.d.mts +2 -16
- package/dist/components/atoms/checkbox/group.d.mts.map +1 -1
- package/dist/components/atoms/checkbox/group.mjs +4 -5
- package/dist/components/atoms/checkbox/group.mjs.map +1 -1
- package/dist/components/atoms/checkbox/index.d.mts +3 -4
- package/dist/components/atoms/checkbox/index.d.mts.map +1 -1
- package/dist/components/atoms/checkbox/index.mjs +1 -2
- package/dist/components/atoms/checkbox/index.mjs.map +1 -1
- package/dist/components/atoms/color-picker.d.mts +2 -15
- package/dist/components/atoms/color-picker.d.mts.map +1 -1
- package/dist/components/atoms/color-picker.mjs +2 -4
- package/dist/components/atoms/color-picker.mjs.map +1 -1
- package/dist/components/atoms/date-picker.d.mts +2 -11
- package/dist/components/atoms/date-picker.d.mts.map +1 -1
- package/dist/components/atoms/date-picker.mjs +2 -4
- package/dist/components/atoms/date-picker.mjs.map +1 -1
- package/dist/components/atoms/float-button/back-top.d.mts +2 -10
- package/dist/components/atoms/float-button/back-top.d.mts.map +1 -1
- package/dist/components/atoms/float-button/back-top.mjs +4 -5
- package/dist/components/atoms/float-button/back-top.mjs.map +1 -1
- package/dist/components/atoms/float-button/float-button.d.mts +2 -8
- package/dist/components/atoms/float-button/float-button.d.mts.map +1 -1
- package/dist/components/atoms/float-button/float-button.mjs +1 -2
- package/dist/components/atoms/float-button/float-button.mjs.map +1 -1
- package/dist/components/atoms/float-button/index.d.mts +3 -4
- package/dist/components/atoms/float-button/index.d.mts.map +1 -1
- package/dist/components/atoms/float-button/index.mjs +1 -2
- package/dist/components/atoms/float-button/index.mjs.map +1 -1
- package/dist/components/atoms/index.d.mts +13 -12
- package/dist/components/atoms/input/index.d.mts +4 -5
- package/dist/components/atoms/input/index.d.mts.map +1 -1
- package/dist/components/atoms/input/index.mjs +2 -3
- package/dist/components/atoms/input/index.mjs.map +1 -1
- package/dist/components/atoms/input/input.d.mts +2 -7
- package/dist/components/atoms/input/input.d.mts.map +1 -1
- package/dist/components/atoms/input/input.mjs +1 -2
- package/dist/components/atoms/input/input.mjs.map +1 -1
- package/dist/components/atoms/input/search.d.mts +2 -15
- package/dist/components/atoms/input/search.d.mts.map +1 -1
- package/dist/components/atoms/input/search.mjs +2 -4
- package/dist/components/atoms/input/search.mjs.map +1 -1
- package/dist/components/atoms/input/text-area.d.mts +2 -8
- package/dist/components/atoms/input/text-area.d.mts.map +1 -1
- package/dist/components/atoms/input/text-area.mjs +1 -2
- package/dist/components/atoms/input/text-area.mjs.map +1 -1
- package/dist/components/atoms/option-group.d.mts +1 -1
- package/dist/components/atoms/option-group.d.mts.map +1 -1
- package/dist/components/atoms/option-group.mjs +1 -1
- package/dist/components/atoms/option-group.mjs.map +1 -1
- package/dist/components/atoms/popover.d.mts +2 -14
- package/dist/components/atoms/popover.d.mts.map +1 -1
- package/dist/components/atoms/popover.mjs +1 -2
- package/dist/components/atoms/popover.mjs.map +1 -1
- package/dist/components/atoms/progress.d.mts +2 -10
- package/dist/components/atoms/progress.d.mts.map +1 -1
- package/dist/components/atoms/progress.mjs +1 -2
- package/dist/components/atoms/progress.mjs.map +1 -1
- package/dist/components/atoms/radio/context.mjs +2 -4
- package/dist/components/atoms/radio/context.mjs.map +1 -1
- package/dist/components/atoms/radio/group.d.mts +2 -19
- package/dist/components/atoms/radio/group.d.mts.map +1 -1
- package/dist/components/atoms/radio/group.mjs +2 -4
- package/dist/components/atoms/radio/group.mjs.map +1 -1
- package/dist/components/atoms/radio/index.d.mts +3 -4
- package/dist/components/atoms/radio/index.d.mts.map +1 -1
- package/dist/components/atoms/radio/index.mjs +1 -2
- package/dist/components/atoms/radio/index.mjs.map +1 -1
- package/dist/components/atoms/radio/radio.d.mts +2 -18
- package/dist/components/atoms/radio/radio.d.mts.map +1 -1
- package/dist/components/atoms/radio/radio.mjs +2 -4
- package/dist/components/atoms/radio/radio.mjs.map +1 -1
- package/dist/components/atoms/select.d.mts +2 -10
- package/dist/components/atoms/select.d.mts.map +1 -1
- package/dist/components/atoms/select.mjs +2 -3
- package/dist/components/atoms/select.mjs.map +1 -1
- package/dist/components/atoms/skeleton/button.d.mts +2 -7
- package/dist/components/atoms/skeleton/button.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/button.mjs +1 -2
- package/dist/components/atoms/skeleton/button.mjs.map +1 -1
- package/dist/components/atoms/skeleton/index.d.mts +4 -5
- package/dist/components/atoms/skeleton/index.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/index.mjs +2 -3
- package/dist/components/atoms/skeleton/index.mjs.map +1 -1
- package/dist/components/atoms/skeleton/node.d.mts +2 -7
- package/dist/components/atoms/skeleton/node.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/node.mjs +1 -2
- package/dist/components/atoms/skeleton/node.mjs.map +1 -1
- package/dist/components/atoms/skeleton/skeleton.d.mts +2 -20
- package/dist/components/atoms/skeleton/skeleton.d.mts.map +1 -1
- package/dist/components/atoms/skeleton/skeleton.mjs +2 -4
- package/dist/components/atoms/skeleton/skeleton.mjs.map +1 -1
- package/dist/components/atoms/spin.d.mts +2 -10
- package/dist/components/atoms/spin.d.mts.map +1 -1
- package/dist/components/atoms/spin.mjs +2 -4
- package/dist/components/atoms/spin.mjs.map +1 -1
- package/dist/components/atoms/switch.d.mts +2 -14
- package/dist/components/atoms/switch.d.mts.map +1 -1
- package/dist/components/atoms/switch.mjs +4 -6
- package/dist/components/atoms/switch.mjs.map +1 -1
- package/dist/components/atoms/typography/link.d.mts +2 -10
- package/dist/components/atoms/typography/link.d.mts.map +1 -1
- package/dist/components/atoms/typography/link.mjs +1 -2
- package/dist/components/atoms/typography/link.mjs.map +1 -1
- package/dist/components/atoms/typography/paragraph.d.mts +2 -8
- package/dist/components/atoms/typography/paragraph.d.mts.map +1 -1
- package/dist/components/atoms/typography/paragraph.mjs +1 -2
- package/dist/components/atoms/typography/paragraph.mjs.map +1 -1
- package/dist/components/atoms/typography/text.d.mts +2 -10
- package/dist/components/atoms/typography/text.d.mts.map +1 -1
- package/dist/components/atoms/typography/text.mjs +1 -2
- package/dist/components/atoms/typography/text.mjs.map +1 -1
- package/dist/components/atoms/typography/title.d.mts +2 -9
- package/dist/components/atoms/typography/title.d.mts.map +1 -1
- package/dist/components/atoms/typography/title.mjs +1 -2
- package/dist/components/atoms/typography/title.mjs.map +1 -1
- package/dist/components/atoms/typography/typography.d.mts +2 -7
- package/dist/components/atoms/typography/typography.d.mts.map +1 -1
- package/dist/components/atoms/typography/typography.mjs +1 -2
- package/dist/components/atoms/typography/typography.mjs.map +1 -1
- package/dist/components/molecules/collapse.d.mts +2 -14
- package/dist/components/molecules/collapse.d.mts.map +1 -1
- package/dist/components/molecules/collapse.mjs +4 -6
- package/dist/components/molecules/collapse.mjs.map +1 -1
- package/dist/components/molecules/dropdown.d.mts +2 -15
- package/dist/components/molecules/dropdown.d.mts.map +1 -1
- package/dist/components/molecules/dropdown.mjs +2 -4
- package/dist/components/molecules/dropdown.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +7 -7
- package/dist/components/molecules/marquees/index.d.mts +3 -4
- package/dist/components/molecules/marquees/index.d.mts.map +1 -1
- package/dist/components/molecules/marquees/index.mjs +2 -3
- package/dist/components/molecules/marquees/index.mjs.map +1 -1
- package/dist/components/molecules/marquees/item.d.mts +2 -11
- package/dist/components/molecules/marquees/item.d.mts.map +1 -1
- package/dist/components/molecules/marquees/item.mjs +14 -19
- package/dist/components/molecules/marquees/item.mjs.map +1 -1
- package/dist/components/molecules/marquees/marquees.d.mts +2 -11
- package/dist/components/molecules/marquees/marquees.d.mts.map +1 -1
- package/dist/components/molecules/marquees/marquees.mjs +10 -20
- package/dist/components/molecules/marquees/marquees.mjs.map +1 -1
- package/dist/components/molecules/marquees/use-pause-on-hover.mjs +26 -0
- package/dist/components/molecules/marquees/use-pause-on-hover.mjs.map +1 -0
- package/dist/components/molecules/menu/item/item.mjs +2 -4
- package/dist/components/molecules/menu/item/item.mjs.map +1 -1
- package/dist/components/molecules/menu/item/label.mjs +1 -2
- package/dist/components/molecules/menu/item/label.mjs.map +1 -1
- package/dist/components/molecules/menu/menu.d.mts +2 -17
- package/dist/components/molecules/menu/menu.d.mts.map +1 -1
- package/dist/components/molecules/menu/menu.mjs +2 -4
- package/dist/components/molecules/menu/menu.mjs.map +1 -1
- package/dist/components/molecules/reveals/item.d.mts +2 -15
- package/dist/components/molecules/reveals/item.d.mts.map +1 -1
- package/dist/components/molecules/reveals/item.mjs +2 -4
- package/dist/components/molecules/reveals/item.mjs.map +1 -1
- package/dist/components/molecules/reveals/reveals.d.mts +2 -18
- package/dist/components/molecules/reveals/reveals.d.mts.map +1 -1
- package/dist/components/molecules/reveals/reveals.mjs +2 -3
- package/dist/components/molecules/reveals/reveals.mjs.map +1 -1
- package/dist/components/molecules/splitter/index.d.mts +3 -4
- package/dist/components/molecules/splitter/index.d.mts.map +1 -1
- package/dist/components/molecules/splitter/index.mjs +1 -2
- package/dist/components/molecules/splitter/index.mjs.map +1 -1
- package/dist/components/molecules/splitter/panel.d.mts +2 -8
- package/dist/components/molecules/splitter/panel.d.mts.map +1 -1
- package/dist/components/molecules/splitter/panel.mjs +1 -2
- package/dist/components/molecules/splitter/panel.mjs.map +1 -1
- package/dist/components/molecules/splitter/splitter.d.mts +2 -14
- package/dist/components/molecules/splitter/splitter.d.mts.map +1 -1
- package/dist/components/molecules/splitter/splitter.mjs +2 -4
- package/dist/components/molecules/splitter/splitter.mjs.map +1 -1
- package/dist/components/molecules/upload.d.mts +2 -15
- package/dist/components/molecules/upload.d.mts.map +1 -1
- package/dist/components/molecules/upload.mjs +2 -4
- package/dist/components/molecules/upload.mjs.map +1 -1
- package/dist/components/organisms/drawer.d.mts +2 -25
- package/dist/components/organisms/drawer.d.mts.map +1 -1
- package/dist/components/organisms/drawer.mjs +2 -4
- package/dist/components/organisms/drawer.mjs.map +1 -1
- package/dist/components/organisms/imperative-stack.mjs +9 -11
- package/dist/components/organisms/imperative-stack.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +6 -5
- package/dist/components/organisms/list/index.d.mts +3 -4
- package/dist/components/organisms/list/index.d.mts.map +1 -1
- package/dist/components/organisms/list/index.mjs +1 -2
- package/dist/components/organisms/list/index.mjs.map +1 -1
- package/dist/components/organisms/list/item.d.mts +2 -8
- package/dist/components/organisms/list/item.d.mts.map +1 -1
- package/dist/components/organisms/list/item.mjs +1 -2
- package/dist/components/organisms/list/item.mjs.map +1 -1
- package/dist/components/organisms/list/list.d.mts +3 -20
- package/dist/components/organisms/list/list.d.mts.map +1 -1
- package/dist/components/organisms/list/list.mjs +3 -5
- package/dist/components/organisms/list/list.mjs.map +1 -1
- package/dist/components/organisms/modal.d.mts +2 -22
- package/dist/components/organisms/modal.d.mts.map +1 -1
- package/dist/components/organisms/modal.mjs +3 -5
- package/dist/components/organisms/modal.mjs.map +1 -1
- package/dist/components/organisms/swiper/index.d.mts +3 -4
- package/dist/components/organisms/swiper/index.d.mts.map +1 -1
- package/dist/components/organisms/swiper/index.mjs +2 -3
- package/dist/components/organisms/swiper/index.mjs.map +1 -1
- package/dist/components/organisms/swiper/slide.d.mts +2 -8
- package/dist/components/organisms/swiper/slide.d.mts.map +1 -1
- package/dist/components/organisms/swiper/slide.mjs +2 -4
- package/dist/components/organisms/swiper/slide.mjs.map +1 -1
- package/dist/components/organisms/swiper/swiper.d.mts +2 -15
- package/dist/components/organisms/swiper/swiper.d.mts.map +1 -1
- package/dist/components/organisms/swiper/swiper.mjs +2 -4
- package/dist/components/organisms/swiper/swiper.mjs.map +1 -1
- package/dist/components/organisms/toast.d.mts +2 -13
- package/dist/components/organisms/toast.d.mts.map +1 -1
- package/dist/components/organisms/toast.mjs +2 -4
- package/dist/components/organisms/toast.mjs.map +1 -1
- package/dist/components/templates/container.d.mts +2 -10
- package/dist/components/templates/container.d.mts.map +1 -1
- package/dist/components/templates/container.mjs +1 -2
- package/dist/components/templates/container.mjs.map +1 -1
- package/dist/components/templates/empty.d.mts +2 -11
- package/dist/components/templates/empty.d.mts.map +1 -1
- package/dist/components/templates/empty.mjs +1 -2
- package/dist/components/templates/empty.mjs.map +1 -1
- package/dist/components/templates/grid/col.d.mts +2 -17
- package/dist/components/templates/grid/col.d.mts.map +1 -1
- package/dist/components/templates/grid/col.mjs +2 -4
- package/dist/components/templates/grid/col.mjs.map +1 -1
- package/dist/components/templates/grid/row-context.mjs +1 -2
- package/dist/components/templates/grid/row-context.mjs.map +1 -1
- package/dist/components/templates/grid/row.d.mts +2 -13
- package/dist/components/templates/grid/row.d.mts.map +1 -1
- package/dist/components/templates/grid/row.mjs +2 -4
- package/dist/components/templates/grid/row.mjs.map +1 -1
- package/dist/components/templates/layout/content.d.mts +2 -9
- package/dist/components/templates/layout/content.d.mts.map +1 -1
- package/dist/components/templates/layout/content.mjs +1 -2
- package/dist/components/templates/layout/content.mjs.map +1 -1
- package/dist/components/templates/layout/footer.d.mts +2 -8
- package/dist/components/templates/layout/footer.d.mts.map +1 -1
- package/dist/components/templates/layout/footer.mjs +1 -2
- package/dist/components/templates/layout/footer.mjs.map +1 -1
- package/dist/components/templates/layout/header.d.mts +2 -9
- package/dist/components/templates/layout/header.d.mts.map +1 -1
- package/dist/components/templates/layout/header.mjs +1 -2
- package/dist/components/templates/layout/header.mjs.map +1 -1
- package/dist/components/templates/layout/layout.d.mts +2 -8
- package/dist/components/templates/layout/layout.d.mts.map +1 -1
- package/dist/components/templates/layout/layout.mjs +1 -2
- package/dist/components/templates/layout/layout.mjs.map +1 -1
- package/dist/components/templates/layout/sider-context.mjs +1 -2
- package/dist/components/templates/layout/sider-context.mjs.map +1 -1
- package/dist/components/templates/layout/sider.d.mts +2 -21
- package/dist/components/templates/layout/sider.d.mts.map +1 -1
- package/dist/components/templates/layout/sider.mjs +2 -4
- package/dist/components/templates/layout/sider.mjs.map +1 -1
- package/dist/components/templates/page-header.d.mts +2 -14
- package/dist/components/templates/page-header.d.mts.map +1 -1
- package/dist/components/templates/page-header.mjs +2 -4
- package/dist/components/templates/page-header.mjs.map +1 -1
- package/dist/components/templates/result.d.mts +2 -13
- package/dist/components/templates/result.d.mts.map +1 -1
- package/dist/components/templates/result.mjs +1 -2
- package/dist/components/templates/result.mjs.map +1 -1
- package/dist/core/accordion.d.mts +5 -22
- package/dist/core/accordion.d.mts.map +1 -1
- package/dist/core/accordion.mjs +3 -5
- package/dist/core/accordion.mjs.map +1 -1
- package/dist/core/badge.d.mts +4 -13
- package/dist/core/badge.d.mts.map +1 -1
- package/dist/core/badge.mjs +2 -3
- package/dist/core/badge.mjs.map +1 -1
- package/dist/core/button.d.mts +5 -15
- package/dist/core/button.d.mts.map +1 -1
- package/dist/core/button.mjs +1 -2
- package/dist/core/button.mjs.map +1 -1
- package/dist/core/calendar.d.mts +4 -21
- package/dist/core/calendar.d.mts.map +1 -1
- package/dist/core/calendar.mjs +3 -5
- package/dist/core/calendar.mjs.map +1 -1
- package/dist/core/checkbox.d.mts +2 -8
- package/dist/core/checkbox.d.mts.map +1 -1
- package/dist/core/checkbox.mjs +3 -5
- package/dist/core/checkbox.mjs.map +1 -1
- package/dist/core/dialog.d.mts +12 -48
- package/dist/core/dialog.d.mts.map +1 -1
- package/dist/core/dialog.mjs +3 -5
- package/dist/core/dialog.mjs.map +1 -1
- package/dist/core/drawer.d.mts +11 -46
- package/dist/core/drawer.d.mts.map +1 -1
- package/dist/core/drawer.mjs +3 -5
- package/dist/core/drawer.mjs.map +1 -1
- package/dist/core/field.d.mts +15 -54
- package/dist/core/field.d.mts.map +1 -1
- package/dist/core/field.mjs +3 -5
- package/dist/core/field.mjs.map +1 -1
- package/dist/core/input.d.mts +2 -9
- package/dist/core/input.d.mts.map +1 -1
- package/dist/core/input.mjs +2 -3
- package/dist/core/input.mjs.map +1 -1
- package/dist/core/label.d.mts +1 -7
- package/dist/core/label.d.mts.map +1 -1
- package/dist/core/label.mjs +2 -4
- package/dist/core/label.mjs.map +1 -1
- package/dist/core/popover.d.mts +9 -33
- package/dist/core/popover.d.mts.map +1 -1
- package/dist/core/popover.mjs +3 -5
- package/dist/core/popover.mjs.map +1 -1
- package/dist/core/progress.d.mts +2 -11
- package/dist/core/progress.d.mts.map +1 -1
- package/dist/core/progress.mjs +3 -5
- package/dist/core/progress.mjs.map +1 -1
- package/dist/core/radio-group.d.mts +4 -15
- package/dist/core/radio-group.d.mts.map +1 -1
- package/dist/core/radio-group.mjs +3 -5
- package/dist/core/radio-group.mjs.map +1 -1
- package/dist/core/resizable.d.mts +5 -17
- package/dist/core/resizable.d.mts.map +1 -1
- package/dist/core/resizable.mjs +3 -5
- package/dist/core/resizable.mjs.map +1 -1
- package/dist/core/select.d.mts +13 -50
- package/dist/core/select.d.mts.map +1 -1
- package/dist/core/select.mjs +3 -5
- package/dist/core/select.mjs.map +1 -1
- package/dist/core/separator.d.mts +2 -10
- package/dist/core/separator.d.mts.map +1 -1
- package/dist/core/separator.mjs +2 -4
- package/dist/core/separator.mjs.map +1 -1
- package/dist/core/skeleton.d.mts +2 -8
- package/dist/core/skeleton.d.mts.map +1 -1
- package/dist/core/skeleton.mjs +2 -3
- package/dist/core/skeleton.mjs.map +1 -1
- package/dist/core/switch.d.mts +3 -12
- package/dist/core/switch.d.mts.map +1 -1
- package/dist/core/switch.mjs +3 -5
- package/dist/core/switch.mjs.map +1 -1
- package/dist/core/textarea.d.mts +2 -8
- package/dist/core/textarea.d.mts.map +1 -1
- package/dist/core/textarea.mjs +2 -3
- package/dist/core/textarea.mjs.map +1 -1
- package/dist/core.mjs +1 -2
- package/dist/index.d.mts +31 -33
- package/dist/index.mjs +2 -3
- package/dist/providers/config/config.d.mts +2 -14
- package/dist/providers/config/config.d.mts.map +1 -1
- package/dist/providers/config/config.mjs +5 -6
- package/dist/providers/config/config.mjs.map +1 -1
- package/dist/providers/config/context.d.mts +0 -2
- package/dist/providers/config/context.d.mts.map +1 -1
- package/dist/providers/config/context.mjs +2 -4
- package/dist/providers/config/context.mjs.map +1 -1
- package/dist/providers/config/registry.d.mts +2 -7
- package/dist/providers/config/registry.d.mts.map +1 -1
- package/dist/providers/config/registry.mjs +2 -4
- package/dist/providers/config/registry.mjs.map +1 -1
- package/dist/providers/config/types.d.mts.map +1 -1
- package/dist/providers.d.mts +1 -2
- package/dist/providers.mjs +1 -2
- package/dist/style.css +1013 -1868
- package/dist/utils.d.mts +0 -1
- package/dist/utils.d.mts.map +1 -1
- package/dist/utils.mjs +1 -2
- package/dist/utils.mjs.map +1 -1
- package/package.json +29 -28
- package/dist/components/templates/grid/index.d.mts +0 -2
- package/dist/components/templates/index.d.mts +0 -13
- package/dist/providers/config/index.d.mts +0 -4
- package/dist/style.css.map +0 -1
- package/dist/style.mjs +0 -1
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { SwiperSlideProps } from "swiper/react";
|
|
3
|
-
|
|
4
2
|
//#region src/components/organisms/swiper/slide.d.ts
|
|
5
3
|
declare const Slide: {
|
|
6
|
-
({
|
|
7
|
-
children,
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: SwiperSlideProps): react_jsx_runtime0.JSX.Element;
|
|
4
|
+
({ children, className, ...props }: SwiperSlideProps): import("react").JSX.Element;
|
|
11
5
|
displayName: string;
|
|
12
6
|
};
|
|
13
7
|
//#endregion
|
|
14
|
-
export { Slide };
|
|
8
|
+
export { Slide as default };
|
|
15
9
|
//# sourceMappingURL=slide.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slide.d.mts","names":[],"sources":["../../../../src/components/organisms/swiper/slide.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slide.d.mts","names":[],"sources":["../../../../src/components/organisms/swiper/slide.tsx"],"mappings":";;cAMM;KAA4C,UAAA,cAAA,SAAA,mCAAgB,IAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../../utils.mjs";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { SwiperSlide } from "swiper/react";
|
|
6
|
-
|
|
7
5
|
//#region src/components/organisms/swiper/slide.tsx
|
|
8
6
|
const Slide = ({ children, className, ...props }) => {
|
|
9
7
|
return /* @__PURE__ */ jsx(SwiperSlide, {
|
|
@@ -13,7 +11,7 @@ const Slide = ({ children, className, ...props }) => {
|
|
|
13
11
|
});
|
|
14
12
|
};
|
|
15
13
|
Slide.displayName = "SwiperSlide";
|
|
16
|
-
|
|
17
14
|
//#endregion
|
|
18
15
|
export { Slide as default };
|
|
16
|
+
|
|
19
17
|
//# sourceMappingURL=slide.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slide.mjs","names":[],"sources":["../../../../src/components/organisms/swiper/slide.tsx"],"sourcesContent":["'use client';\n\nimport { SwiperSlide, type SwiperSlideProps } from 'swiper/react';\n\nimport { cn } from '@repo/ui/utils';\n\nconst Slide = ({ children, className, ...props }: SwiperSlideProps) => {\n return (\n <SwiperSlide className={cn(className)} {...props}>\n {children}\n </SwiperSlide>\n );\n};\n\nSlide.displayName = 'SwiperSlide';\n\nexport default Slide;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slide.mjs","names":[],"sources":["../../../../src/components/organisms/swiper/slide.tsx"],"sourcesContent":["'use client';\n\nimport { SwiperSlide, type SwiperSlideProps } from 'swiper/react';\n\nimport { cn } from '@repo/ui/utils';\n\nconst Slide = ({ children, className, ...props }: SwiperSlideProps) => {\n return (\n <SwiperSlide className={cn(className)} {...props}>\n {children}\n </SwiperSlide>\n );\n};\n\nSlide.displayName = 'SwiperSlide';\n\nexport default Slide;\n"],"mappings":";;;;;AAMA,MAAM,SAAS,EAAE,UAAU,WAAW,GAAG,YAA8B;CACrE,OACE,oBAAC,aAAD;EAAa,WAAW,GAAG,SAAS;EAAG,GAAI;EACxC;CACU,CAAA;AAEjB;AAEA,MAAM,cAAc"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { SwiperProps } from "swiper/react";
|
|
3
2
|
import "swiper/css";
|
|
4
3
|
import { SwiperModule, SwiperOptions } from "swiper/types";
|
|
5
|
-
|
|
6
4
|
//#region src/components/organisms/swiper/swiper.d.ts
|
|
7
5
|
interface Props<T> extends SwiperProps {
|
|
8
6
|
loading?: boolean;
|
|
@@ -27,18 +25,7 @@ interface Props<T> extends SwiperProps {
|
|
|
27
25
|
data: T[];
|
|
28
26
|
renderItem(item: T, key: number): React.ReactNode;
|
|
29
27
|
}
|
|
30
|
-
declare const Swiper$1: <T>({
|
|
31
|
-
loading,
|
|
32
|
-
loader,
|
|
33
|
-
options,
|
|
34
|
-
modules,
|
|
35
|
-
data,
|
|
36
|
-
style,
|
|
37
|
-
className,
|
|
38
|
-
renderItem,
|
|
39
|
-
loadingClassName,
|
|
40
|
-
...props
|
|
41
|
-
}: Props<T>) => react_jsx_runtime0.JSX.Element;
|
|
28
|
+
declare const Swiper$1: <T>({ loading, loader, options, modules, data, style, className, renderItem, loadingClassName, ...props }: Props<T>) => import("react").JSX.Element;
|
|
42
29
|
//#endregion
|
|
43
|
-
export { Props, Swiper$1 as
|
|
30
|
+
export { Props, Swiper$1 as default };
|
|
44
31
|
//# sourceMappingURL=swiper.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swiper.d.mts","names":[],"sources":["../../../../src/components/organisms/swiper/swiper.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"swiper.d.mts","names":[],"sources":["../../../../src/components/organisms/swiper/swiper.tsx"],"mappings":";;;;UA+BiB,MAAM,WAAW;EAChC;EACA,SAAS,MAAM;EACf;EACA,UAAU;;;;;;;;;;;;;;;EAeV,UAAU;EACV,MAAM;EACN,WAAW,MAAM,GAAG,cAAc,MAAM;;cAGpC,WAAU,KAAI,SAAA,QAAA,SAAA,SAAA,MAAA,OAAA,WAAA,YAAA,qBAAA,SAWjB,MAAM,uBAAE,IAAA"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../../utils.mjs";
|
|
4
3
|
import Spin from "../../atoms/spin.mjs";
|
|
5
4
|
import { cloneElement, isValidElement } from "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { Swiper } from "swiper/react";
|
|
8
7
|
import "swiper/css";
|
|
9
|
-
|
|
10
8
|
//#region src/components/organisms/swiper/swiper.tsx
|
|
11
9
|
/**
|
|
12
10
|
* Baseline Swiper options. `navigation` / `autoplay` are inert unless the
|
|
@@ -50,7 +48,7 @@ const Swiper$1 = ({ loading, loader, options = {}, modules = [], data = [], styl
|
|
|
50
48
|
})
|
|
51
49
|
});
|
|
52
50
|
};
|
|
53
|
-
|
|
54
51
|
//#endregion
|
|
55
52
|
export { Swiper$1 as default, initialOptions };
|
|
53
|
+
|
|
56
54
|
//# sourceMappingURL=swiper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swiper.mjs","names":["Swiper","SwiperCore"],"sources":["../../../../src/components/organisms/swiper/swiper.tsx"],"sourcesContent":["'use client';\n\nimport { cloneElement, isValidElement } from 'react';\n\nimport { Swiper as SwiperCore, SwiperProps } from 'swiper/react';\nimport { SwiperModule, SwiperOptions } from 'swiper/types';\n\nimport { cn } from '@repo/ui/utils';\n\nimport 'swiper/css';\n\nimport { Spin } from '../../atoms';\n\n/**\n * Baseline Swiper options. `navigation` / `autoplay` are inert unless the\n * matching modules are passed through the `modules` prop — see the README next\n * to this file.\n */\nexport const initialOptions: SwiperOptions = {\n loop: false,\n spaceBetween: 8,\n slidesPerView: 'auto',\n navigation: false,\n autoplay: {\n delay: 2500,\n disableOnInteraction: false,\n },\n};\n\nconst initialStyle = { width: '100%', maxWidth: '100vw', overflow: 'hidden' };\n\nexport interface Props<T> extends SwiperProps {\n loading?: boolean;\n loader?: React.ReactNode;\n loadingClassName?: string;\n options?: SwiperOptions;\n /**\n * Swiper feature modules to activate. Nothing is bundled by default — import\n * the modules you need from `swiper/modules` together with their stylesheets\n * (`swiper/css/<module>`) and pass them here.\n *\n * @example\n * import { Autoplay, Navigation } from 'swiper/modules';\n * import 'swiper/css/autoplay';\n * import 'swiper/css/navigation';\n *\n * <Swiper modules={[Autoplay, Navigation]} ... />\n *\n * @default []\n */\n modules?: SwiperModule[];\n data: T[];\n renderItem(item: T, key: number): React.ReactNode;\n}\n\nconst Swiper = <T,>({\n loading,\n loader,\n options = {},\n modules = [],\n data = [],\n style,\n className,\n renderItem,\n loadingClassName,\n ...props\n}: Props<T>) => {\n if (loading) {\n // `{...props}` isn't spread here (unlike the non-loading branch) —\n // SwiperProps carries a lot of Swiper.js-specific config/callbacks\n // (spaceBetween, slidesPerView, onSwiper, etc.) that aren't valid DOM\n // attributes, so blindly spreading them onto a plain placeholder div\n // would trigger React's unknown-DOM-attribute warnings. className/\n // style are the two that actually matter for this div and are safe.\n return (\n <div className={cn('h-32', className, loadingClassName)} style={style}>\n {loader ?? <Spin spinning />}\n </div>\n );\n }\n\n return (\n <SwiperCore\n modules={modules}\n {...initialOptions}\n {...options}\n style={{ ...initialStyle, ...style }}\n className={className}\n {...props}\n >\n {data.map((item: T, i) => {\n const node = renderItem(item, i);\n // Fall back to an index key only when the consumer's renderItem\n // didn't already set one — cloning (rather than wrapping in a\n // Fragment) keeps the returned element a direct child of\n // SwiperCore, which swiper/react's slide detection relies on.\n return isValidElement(node) && node.key == null\n ? cloneElement(node, { key: i })\n : node;\n })}\n </SwiperCore>\n );\n};\n\nexport default Swiper;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"swiper.mjs","names":["Swiper","SwiperCore"],"sources":["../../../../src/components/organisms/swiper/swiper.tsx"],"sourcesContent":["'use client';\n\nimport { cloneElement, isValidElement } from 'react';\n\nimport { Swiper as SwiperCore, SwiperProps } from 'swiper/react';\nimport { SwiperModule, SwiperOptions } from 'swiper/types';\n\nimport { cn } from '@repo/ui/utils';\n\nimport 'swiper/css';\n\nimport { Spin } from '../../atoms';\n\n/**\n * Baseline Swiper options. `navigation` / `autoplay` are inert unless the\n * matching modules are passed through the `modules` prop — see the README next\n * to this file.\n */\nexport const initialOptions: SwiperOptions = {\n loop: false,\n spaceBetween: 8,\n slidesPerView: 'auto',\n navigation: false,\n autoplay: {\n delay: 2500,\n disableOnInteraction: false,\n },\n};\n\nconst initialStyle = { width: '100%', maxWidth: '100vw', overflow: 'hidden' };\n\nexport interface Props<T> extends SwiperProps {\n loading?: boolean;\n loader?: React.ReactNode;\n loadingClassName?: string;\n options?: SwiperOptions;\n /**\n * Swiper feature modules to activate. Nothing is bundled by default — import\n * the modules you need from `swiper/modules` together with their stylesheets\n * (`swiper/css/<module>`) and pass them here.\n *\n * @example\n * import { Autoplay, Navigation } from 'swiper/modules';\n * import 'swiper/css/autoplay';\n * import 'swiper/css/navigation';\n *\n * <Swiper modules={[Autoplay, Navigation]} ... />\n *\n * @default []\n */\n modules?: SwiperModule[];\n data: T[];\n renderItem(item: T, key: number): React.ReactNode;\n}\n\nconst Swiper = <T,>({\n loading,\n loader,\n options = {},\n modules = [],\n data = [],\n style,\n className,\n renderItem,\n loadingClassName,\n ...props\n}: Props<T>) => {\n if (loading) {\n // `{...props}` isn't spread here (unlike the non-loading branch) —\n // SwiperProps carries a lot of Swiper.js-specific config/callbacks\n // (spaceBetween, slidesPerView, onSwiper, etc.) that aren't valid DOM\n // attributes, so blindly spreading them onto a plain placeholder div\n // would trigger React's unknown-DOM-attribute warnings. className/\n // style are the two that actually matter for this div and are safe.\n return (\n <div className={cn('h-32', className, loadingClassName)} style={style}>\n {loader ?? <Spin spinning />}\n </div>\n );\n }\n\n return (\n <SwiperCore\n modules={modules}\n {...initialOptions}\n {...options}\n style={{ ...initialStyle, ...style }}\n className={className}\n {...props}\n >\n {data.map((item: T, i) => {\n const node = renderItem(item, i);\n // Fall back to an index key only when the consumer's renderItem\n // didn't already set one — cloning (rather than wrapping in a\n // Fragment) keeps the returned element a direct child of\n // SwiperCore, which swiper/react's slide detection relies on.\n return isValidElement(node) && node.key == null\n ? cloneElement(node, { key: i })\n : node;\n })}\n </SwiperCore>\n );\n};\n\nexport default Swiper;\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAa,iBAAgC;CAC3C,MAAM;CACN,cAAc;CACd,eAAe;CACf,YAAY;CACZ,UAAU;EACR,OAAO;EACP,sBAAsB;CACxB;AACF;AAEA,MAAM,eAAe;CAAE,OAAO;CAAQ,UAAU;CAAS,UAAU;AAAS;AA0B5E,MAAMA,YAAc,EAClB,SACA,QACA,UAAU,CAAC,GACX,UAAU,CAAC,GACX,OAAO,CAAC,GACR,OACA,WACA,YACA,kBACA,GAAG,YACW;CACd,IAAI,SAOF,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,QAAQ,WAAW,gBAAgB;EAAU;EAC7D,UAAA,UAAU,oBAAC,MAAD,EAAM,UAAA,KAAU,CAAA;CACxB,CAAA;CAIT,OACE,oBAACC,QAAD;EACW;EACT,GAAI;EACJ,GAAI;EACJ,OAAO;GAAE,GAAG;GAAc,GAAG;EAAM;EACxB;EACX,GAAI;EAEH,UAAA,KAAK,KAAK,MAAS,MAAM;GACxB,MAAM,OAAO,WAAW,MAAM,CAAC;GAK/B,OAAO,eAAe,IAAI,KAAK,KAAK,OAAO,OACvC,aAAa,MAAM,EAAE,KAAK,EAAE,CAAC,IAC7B;EACN,CAAC;CACS,CAAA;AAEhB"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/organisms/toast.d.ts
|
|
4
2
|
type ToastType = 'info' | 'success' | 'error' | 'warning';
|
|
5
3
|
interface Props {
|
|
@@ -18,16 +16,7 @@ interface StaticProps extends Props {
|
|
|
18
16
|
container?: HTMLElement;
|
|
19
17
|
}
|
|
20
18
|
declare const Toast: {
|
|
21
|
-
({
|
|
22
|
-
type,
|
|
23
|
-
title,
|
|
24
|
-
description,
|
|
25
|
-
icon,
|
|
26
|
-
closable,
|
|
27
|
-
action,
|
|
28
|
-
className,
|
|
29
|
-
onClose
|
|
30
|
-
}: Props): react_jsx_runtime0.JSX.Element;
|
|
19
|
+
({ type, title, description, icon, closable, action, className, onClose }: Props): import("react").JSX.Element;
|
|
31
20
|
destroy: (id?: string) => void;
|
|
32
21
|
destroyAll(): void;
|
|
33
22
|
info(title: React.ReactNode, props?: TriggerOptions): string | undefined;
|
|
@@ -37,5 +26,5 @@ declare const Toast: {
|
|
|
37
26
|
};
|
|
38
27
|
type TriggerOptions = Omit<StaticProps, 'type' | 'title'>;
|
|
39
28
|
//#endregion
|
|
40
|
-
export { StaticProps, Toast };
|
|
29
|
+
export { Props, type StaticProps as ToastOptions, Toast as default };
|
|
41
30
|
//# sourceMappingURL=toast.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.mts","names":[],"sources":["../../../src/components/organisms/toast.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.d.mts","names":[],"sources":["../../../src/components/organisms/toast.tsx"],"mappings":";KAkBK;UAEY;EACf,OAAO;EACP,OAAO,MAAM;EACb,cAAc,MAAM;EACpB,OAAO,MAAM;EACb;EACA,SAAS,MAAM;EACf;EACA;;UAGQ,oBAAoB;EAC5B;EACA;EACA,YAAY;;cAUR;KASH,MAAA,OAAA,aAAA,MAAA,UAAA,QAAA,WAAA,WAAA,wBAAK,IAAA;;;EAoHa,KAAA,OAAA,MAAM,WAAS,QAAU;EAEtB,QAAA,OAAA,MAAM,WAAS,QAAU;EAE3B,MAAA,OAAA,MAAM,WAAS,QAAU;EAEvB,QAAA,OAAA,MAAM,WAAS,QAAU;;KAR5C,iBAAiB,KAAK"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../utils.mjs";
|
|
4
3
|
import { DEFAULT_LOCALE, useConfig } from "../../providers/config/context.mjs";
|
|
5
4
|
import Button from "../../Button.mjs";
|
|
@@ -9,7 +8,6 @@ import { useState } from "react";
|
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useTimeout } from "@jbpark/use-hooks";
|
|
11
10
|
import { createPortal } from "react-dom";
|
|
12
|
-
|
|
13
11
|
//#region src/components/organisms/toast.tsx
|
|
14
12
|
const TYPE_ICONS = {
|
|
15
13
|
info: /* @__PURE__ */ jsx(Info, { className: "text-blue-400" }),
|
|
@@ -121,7 +119,7 @@ Toast.warning = (title, props) => toastStack.render({
|
|
|
121
119
|
title,
|
|
122
120
|
...props
|
|
123
121
|
});
|
|
124
|
-
|
|
125
122
|
//#endregion
|
|
126
123
|
export { Toast as default };
|
|
124
|
+
|
|
127
125
|
//# sourceMappingURL=toast.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.mjs","names":[],"sources":["../../../src/components/organisms/toast.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { useTimeout } from '@jbpark/use-hooks';\nimport { Check, Info, OctagonAlert, OctagonX, X } from 'lucide-react';\n\nimport { DEFAULT_LOCALE, useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport Button from '../atoms/button';\nimport {\n type ImperativeStack,\n createImperativeStack,\n isBrowser,\n} from './imperative-stack';\n\ntype ToastType = 'info' | 'success' | 'error' | 'warning';\n\nexport interface Props {\n type?: ToastType;\n title: React.ReactNode;\n description?: React.ReactNode;\n icon?: React.ReactNode;\n closable?: boolean;\n action?: React.ReactNode;\n className?: string;\n onClose?: () => void;\n}\n\ninterface StaticProps extends Props {\n id?: string;\n duration?: number;\n container?: HTMLElement;\n}\n\nconst TYPE_ICONS: Record<ToastType, React.ReactNode> = {\n info: <Info className=\"text-blue-400\" />,\n success: <Check className=\"text-green-400\" />,\n error: <OctagonX className=\"text-red-400\" />,\n warning: <OctagonAlert className=\"text-yellow-400\" />,\n};\n\nconst Toast = ({\n type,\n title,\n description,\n icon,\n closable = true,\n action,\n className,\n onClose,\n}: Props) => {\n const { locale } = useConfig();\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n className={cn(\n 'pointer-events-auto flex w-80 items-start gap-3 rounded-lg',\n 'bg-background text-foreground border p-4 shadow-lg',\n className,\n //\n )}\n >\n {(icon || type) && (\n <div className=\"mt-0.5 shrink-0 [&_svg]:size-5\">\n {icon || (type && TYPE_ICONS[type])}\n </div>\n )}\n <div className=\"flex-1 space-y-1\">\n <p className=\"text-sm font-medium\">{title}</p>\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n {action && <div className=\"pt-1\">{action}</div>}\n </div>\n {closable && (\n <Button\n type=\"text\"\n shape=\"circle\"\n size=\"small\"\n aria-label={locale.close ?? DEFAULT_LOCALE.close}\n icon={<X />}\n onClick={onClose}\n />\n )}\n </div>\n );\n};\n\nconst DEFAULT_DURATION = 4000;\n\nconst StaticToast = ({\n id,\n duration = DEFAULT_DURATION,\n container,\n onClose,\n ...props\n}: StaticProps & { id: string }): React.ReactPortal | null => {\n const [visible, setVisible] = useState(true);\n\n const close = () => {\n onClose?.();\n setVisible(false);\n setTimeout(() => {\n toastStack.destroy(id);\n }, 200);\n };\n\n const { reset, clear } = useTimeout(close, duration || null);\n\n if (!isBrowser) {\n return null;\n }\n\n return createPortal(\n <div\n className={cn(\n 'transition-all duration-200',\n visible ? 'opacity-100' : 'translate-x-2 opacity-0',\n )}\n // Without this, a toast with a closable/action button (or one the\n // user is mid-read on) could auto-dismiss itself out from under\n // them — hovering or focusing anything inside pauses the timer,\n // moving away restarts it from the full duration.\n onMouseEnter={clear}\n onMouseLeave={reset}\n onFocus={clear}\n onBlur={reset}\n >\n <Toast {...props} onClose={close} />\n </div>,\n toastStack.getRootElement(container)!,\n );\n};\n\nconst toastStack: ImperativeStack<StaticProps> =\n createImperativeStack<StaticProps>({\n createRootElement: () => {\n const el = document.createElement('div');\n el.setAttribute('role', 'region');\n // Plain DOM, created outside any React tree — no Config to read a\n // locale override from until #226 gives the imperative stack a way\n // to inherit one.\n el.setAttribute('aria-label', 'Notifications');\n el.style.zIndex = '10000';\n el.style.position = 'fixed';\n el.style.right = '0';\n el.style.bottom = '0';\n el.style.display = 'flex';\n el.style.flexDirection = 'column-reverse';\n el.style.gap = '8px';\n el.style.padding = '16px';\n el.style.pointerEvents = 'none';\n return el;\n },\n StackItem: StaticToast,\n });\n\nToast.destroy = toastStack.destroy;\n\nToast.destroyAll = () => {\n toastStack.destroy();\n};\n\ntype TriggerOptions = Omit<StaticProps, 'type' | 'title'>;\n\nToast.info = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'info', title, ...props });\nToast.success = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'success', title, ...props });\nToast.error = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'error', title, ...props });\nToast.warning = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'warning', title, ...props });\n\nexport default Toast;\nexport type { StaticProps as ToastOptions };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.mjs","names":[],"sources":["../../../src/components/organisms/toast.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { createPortal } from 'react-dom';\n\nimport { useTimeout } from '@jbpark/use-hooks';\nimport { Check, Info, OctagonAlert, OctagonX, X } from 'lucide-react';\n\nimport { DEFAULT_LOCALE, useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport Button from '../atoms/button';\nimport {\n type ImperativeStack,\n createImperativeStack,\n isBrowser,\n} from './imperative-stack';\n\ntype ToastType = 'info' | 'success' | 'error' | 'warning';\n\nexport interface Props {\n type?: ToastType;\n title: React.ReactNode;\n description?: React.ReactNode;\n icon?: React.ReactNode;\n closable?: boolean;\n action?: React.ReactNode;\n className?: string;\n onClose?: () => void;\n}\n\ninterface StaticProps extends Props {\n id?: string;\n duration?: number;\n container?: HTMLElement;\n}\n\nconst TYPE_ICONS: Record<ToastType, React.ReactNode> = {\n info: <Info className=\"text-blue-400\" />,\n success: <Check className=\"text-green-400\" />,\n error: <OctagonX className=\"text-red-400\" />,\n warning: <OctagonAlert className=\"text-yellow-400\" />,\n};\n\nconst Toast = ({\n type,\n title,\n description,\n icon,\n closable = true,\n action,\n className,\n onClose,\n}: Props) => {\n const { locale } = useConfig();\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n className={cn(\n 'pointer-events-auto flex w-80 items-start gap-3 rounded-lg',\n 'bg-background text-foreground border p-4 shadow-lg',\n className,\n //\n )}\n >\n {(icon || type) && (\n <div className=\"mt-0.5 shrink-0 [&_svg]:size-5\">\n {icon || (type && TYPE_ICONS[type])}\n </div>\n )}\n <div className=\"flex-1 space-y-1\">\n <p className=\"text-sm font-medium\">{title}</p>\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n {action && <div className=\"pt-1\">{action}</div>}\n </div>\n {closable && (\n <Button\n type=\"text\"\n shape=\"circle\"\n size=\"small\"\n aria-label={locale.close ?? DEFAULT_LOCALE.close}\n icon={<X />}\n onClick={onClose}\n />\n )}\n </div>\n );\n};\n\nconst DEFAULT_DURATION = 4000;\n\nconst StaticToast = ({\n id,\n duration = DEFAULT_DURATION,\n container,\n onClose,\n ...props\n}: StaticProps & { id: string }): React.ReactPortal | null => {\n const [visible, setVisible] = useState(true);\n\n const close = () => {\n onClose?.();\n setVisible(false);\n setTimeout(() => {\n toastStack.destroy(id);\n }, 200);\n };\n\n const { reset, clear } = useTimeout(close, duration || null);\n\n if (!isBrowser) {\n return null;\n }\n\n return createPortal(\n <div\n className={cn(\n 'transition-all duration-200',\n visible ? 'opacity-100' : 'translate-x-2 opacity-0',\n )}\n // Without this, a toast with a closable/action button (or one the\n // user is mid-read on) could auto-dismiss itself out from under\n // them — hovering or focusing anything inside pauses the timer,\n // moving away restarts it from the full duration.\n onMouseEnter={clear}\n onMouseLeave={reset}\n onFocus={clear}\n onBlur={reset}\n >\n <Toast {...props} onClose={close} />\n </div>,\n toastStack.getRootElement(container)!,\n );\n};\n\nconst toastStack: ImperativeStack<StaticProps> =\n createImperativeStack<StaticProps>({\n createRootElement: () => {\n const el = document.createElement('div');\n el.setAttribute('role', 'region');\n // Plain DOM, created outside any React tree — no Config to read a\n // locale override from until #226 gives the imperative stack a way\n // to inherit one.\n el.setAttribute('aria-label', 'Notifications');\n el.style.zIndex = '10000';\n el.style.position = 'fixed';\n el.style.right = '0';\n el.style.bottom = '0';\n el.style.display = 'flex';\n el.style.flexDirection = 'column-reverse';\n el.style.gap = '8px';\n el.style.padding = '16px';\n el.style.pointerEvents = 'none';\n return el;\n },\n StackItem: StaticToast,\n });\n\nToast.destroy = toastStack.destroy;\n\nToast.destroyAll = () => {\n toastStack.destroy();\n};\n\ntype TriggerOptions = Omit<StaticProps, 'type' | 'title'>;\n\nToast.info = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'info', title, ...props });\nToast.success = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'success', title, ...props });\nToast.error = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'error', title, ...props });\nToast.warning = (title: React.ReactNode, props?: TriggerOptions) =>\n toastStack.render({ type: 'warning', title, ...props });\n\nexport default Toast;\nexport type { StaticProps as ToastOptions };\n"],"mappings":";;;;;;;;;;;AAqCA,MAAM,aAAiD;CACrD,MAAM,oBAAC,MAAD,EAAM,WAAU,gBAAiB,CAAA;CACvC,SAAS,oBAAC,OAAD,EAAO,WAAU,iBAAkB,CAAA;CAC5C,OAAO,oBAAC,UAAD,EAAU,WAAU,eAAgB,CAAA;CAC3C,SAAS,oBAAC,cAAD,EAAc,WAAU,kBAAmB,CAAA;AACtD;AAEA,MAAM,SAAS,EACb,MACA,OACA,aACA,MACA,WAAW,MACX,QACA,WACA,cACW;CACX,MAAM,EAAE,WAAW,UAAU;CAE7B,OACE,qBAAC,OAAD;EACE,MAAM,SAAS,UAAU,UAAU;EACnC,WAAW,GACT,8DACA,sDACA,SAEF;EAPF,UAAA;IASI,QAAQ,SACR,oBAAC,OAAD;IAAK,WAAU;IACZ,UAAA,QAAS,QAAQ,WAAW;GAC1B,CAAA;GAEP,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,oBAAC,KAAD;MAAG,WAAU;MAAuB,UAAA;KAAS,CAAA;KAC5C,eACC,oBAAC,KAAD;MAAG,WAAU;MAAiC,UAAA;KAAe,CAAA;KAE9D,UAAU,oBAAC,OAAD;MAAK,WAAU;MAAQ,UAAA;KAAY,CAAA;IAC3C;;GACJ,YACC,oBAAC,QAAD;IACE,MAAK;IACL,OAAM;IACN,MAAK;IACL,cAAY,OAAO,SAAS,eAAe;IAC3C,MAAM,oBAAC,GAAD,CAAI,CAAA;IACV,SAAS;GACV,CAAA;EAEA;;AAET;AAEA,MAAM,mBAAmB;AAEzB,MAAM,eAAe,EACnB,IACA,WAAW,kBACX,WACA,SACA,GAAG,YACyD;CAC5D,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAE3C,MAAM,cAAc;EAClB,UAAU;EACV,WAAW,KAAK;EAChB,iBAAiB;GACf,WAAW,QAAQ,EAAE;EACvB,GAAG,GAAG;CACR;CAEA,MAAM,EAAE,OAAO,UAAU,WAAW,OAAO,YAAY,IAAI;CAE3D,IAAI,CAAC,WACH,OAAO;CAGT,OAAO,aACL,oBAAC,OAAD;EACE,WAAW,GACT,+BACA,UAAU,gBAAgB,yBAC5B;EAKA,cAAc;EACd,cAAc;EACd,SAAS;EACT,QAAQ;EAER,UAAA,oBAAC,OAAD;GAAO,GAAI;GAAO,SAAS;EAAQ,CAAA;CAChC,CAAA,GACL,WAAW,eAAe,SAAS,CACrC;AACF;AAEA,MAAM,aACJ,sBAAmC;CACjC,yBAAyB;EACvB,MAAM,KAAK,SAAS,cAAc,KAAK;EACvC,GAAG,aAAa,QAAQ,QAAQ;EAIhC,GAAG,aAAa,cAAc,eAAe;EAC7C,GAAG,MAAM,SAAS;EAClB,GAAG,MAAM,WAAW;EACpB,GAAG,MAAM,QAAQ;EACjB,GAAG,MAAM,SAAS;EAClB,GAAG,MAAM,UAAU;EACnB,GAAG,MAAM,gBAAgB;EACzB,GAAG,MAAM,MAAM;EACf,GAAG,MAAM,UAAU;EACnB,GAAG,MAAM,gBAAgB;EACzB,OAAO;CACT;CACA,WAAW;AACb,CAAC;AAEH,MAAM,UAAU,WAAW;AAE3B,MAAM,mBAAmB;CACvB,WAAW,QAAQ;AACrB;AAIA,MAAM,QAAQ,OAAwB,UACpC,WAAW,OAAO;CAAE,MAAM;CAAQ;CAAO,GAAG;AAAM,CAAC;AACrD,MAAM,WAAW,OAAwB,UACvC,WAAW,OAAO;CAAE,MAAM;CAAW;CAAO,GAAG;AAAM,CAAC;AACxD,MAAM,SAAS,OAAwB,UACrC,WAAW,OAAO;CAAE,MAAM;CAAS;CAAO,GAAG;AAAM,CAAC;AACtD,MAAM,WAAW,OAAwB,UACvC,WAAW,OAAO;CAAE,MAAM;CAAW;CAAO,GAAG;AAAM,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/templates/container.d.ts
|
|
4
2
|
type MaxWidth = '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full' | 'none';
|
|
5
3
|
interface Props extends React.ComponentProps<'div'> {
|
|
@@ -7,13 +5,7 @@ interface Props extends React.ComponentProps<'div'> {
|
|
|
7
5
|
padded?: boolean;
|
|
8
6
|
asChild?: boolean;
|
|
9
7
|
}
|
|
10
|
-
declare const Container: ({
|
|
11
|
-
className,
|
|
12
|
-
maxWidth,
|
|
13
|
-
padded,
|
|
14
|
-
asChild,
|
|
15
|
-
...props
|
|
16
|
-
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
8
|
+
declare const Container: ({ className, maxWidth, padded, asChild, ...props }: Props) => import("react").JSX.Element;
|
|
17
9
|
//#endregion
|
|
18
|
-
export {
|
|
10
|
+
export { Props, Container as default };
|
|
19
11
|
//# sourceMappingURL=container.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.mts","names":[],"sources":["../../../src/components/templates/container.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.d.mts","names":[],"sources":["../../../src/components/templates/container.tsx"],"mappings":";KAIK;UAmCY,cAAc,MAAM;EACnC,WAAW;EACX;EACA;;cAMI,cAAa,WAAA,UAAA,QAAA,YAAA,SAMhB,0BAAK,IAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../utils.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
|
|
5
4
|
//#region src/components/templates/container.tsx
|
|
6
5
|
const MAX_WIDTH_CLASSES = {
|
|
7
6
|
"3xs": "max-w-3xs",
|
|
@@ -26,7 +25,7 @@ const Container = ({ className, maxWidth = "7xl", padded = true, asChild = false
|
|
|
26
25
|
...props
|
|
27
26
|
});
|
|
28
27
|
};
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
export { Container as default };
|
|
30
|
+
|
|
32
31
|
//# sourceMappingURL=container.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.mjs","names":[],"sources":["../../../src/components/templates/container.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '@repo/ui/utils';\n\ntype MaxWidth =\n | '3xs'\n | '2xs'\n | 'xs'\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'\n | '2xl'\n | '3xl'\n | '4xl'\n | '5xl'\n | '6xl'\n | '7xl'\n | 'full'\n | 'none';\n\nconst MAX_WIDTH_CLASSES: Record<MaxWidth, string> = {\n '3xs': 'max-w-3xs',\n '2xs': 'max-w-2xs',\n xs: 'max-w-xs',\n sm: 'max-w-sm',\n md: 'max-w-md',\n lg: 'max-w-lg',\n xl: 'max-w-xl',\n '2xl': 'max-w-2xl',\n '3xl': 'max-w-3xl',\n '4xl': 'max-w-4xl',\n '5xl': 'max-w-5xl',\n '6xl': 'max-w-6xl',\n '7xl': 'max-w-7xl',\n full: 'max-w-full',\n none: 'max-w-none',\n};\n\nexport interface Props extends React.ComponentProps<'div'> {\n maxWidth?: MaxWidth;\n padded?: boolean;\n asChild?: boolean;\n}\n\n// Standardizes the `mx-auto max-w-7xl px-4` wrapper every app in this\n// monorepo was rewriting by hand inside Content — one place to change the\n// page's content width/gutters instead of N call sites.\nconst Container = ({\n className,\n maxWidth = '7xl',\n padded = true,\n asChild = false,\n ...props\n}: Props) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n className={cn(\n 'mx-auto w-full',\n MAX_WIDTH_CLASSES[maxWidth],\n padded && 'px-4 sm:px-6 lg:px-8',\n className,\n //\n )}\n {...props}\n />\n );\n};\n\nexport default Container;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.mjs","names":[],"sources":["../../../src/components/templates/container.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '@repo/ui/utils';\n\ntype MaxWidth =\n | '3xs'\n | '2xs'\n | 'xs'\n | 'sm'\n | 'md'\n | 'lg'\n | 'xl'\n | '2xl'\n | '3xl'\n | '4xl'\n | '5xl'\n | '6xl'\n | '7xl'\n | 'full'\n | 'none';\n\nconst MAX_WIDTH_CLASSES: Record<MaxWidth, string> = {\n '3xs': 'max-w-3xs',\n '2xs': 'max-w-2xs',\n xs: 'max-w-xs',\n sm: 'max-w-sm',\n md: 'max-w-md',\n lg: 'max-w-lg',\n xl: 'max-w-xl',\n '2xl': 'max-w-2xl',\n '3xl': 'max-w-3xl',\n '4xl': 'max-w-4xl',\n '5xl': 'max-w-5xl',\n '6xl': 'max-w-6xl',\n '7xl': 'max-w-7xl',\n full: 'max-w-full',\n none: 'max-w-none',\n};\n\nexport interface Props extends React.ComponentProps<'div'> {\n maxWidth?: MaxWidth;\n padded?: boolean;\n asChild?: boolean;\n}\n\n// Standardizes the `mx-auto max-w-7xl px-4` wrapper every app in this\n// monorepo was rewriting by hand inside Content — one place to change the\n// page's content width/gutters instead of N call sites.\nconst Container = ({\n className,\n maxWidth = '7xl',\n padded = true,\n asChild = false,\n ...props\n}: Props) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n className={cn(\n 'mx-auto w-full',\n MAX_WIDTH_CLASSES[maxWidth],\n padded && 'px-4 sm:px-6 lg:px-8',\n className,\n //\n )}\n {...props}\n />\n );\n};\n\nexport default Container;\n"],"mappings":";;;;AAqBA,MAAM,oBAA8C;CAClD,OAAO;CACP,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;AACR;AAWA,MAAM,aAAa,EACjB,WACA,WAAW,OACX,SAAS,MACT,UAAU,OACV,GAAG,YACQ;CAGX,OACE,oBAHW,UAAU,OAAO,OAG5B;EACE,WAAW,GACT,kBACA,kBAAkB,WAClB,UAAU,wBACV,SAEF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/templates/empty.d.ts
|
|
4
2
|
interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
5
3
|
icon?: React.ReactNode;
|
|
@@ -7,14 +5,7 @@ interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {
|
|
|
7
5
|
description?: React.ReactNode;
|
|
8
6
|
action?: React.ReactNode;
|
|
9
7
|
}
|
|
10
|
-
declare const Empty: ({
|
|
11
|
-
icon,
|
|
12
|
-
title,
|
|
13
|
-
description,
|
|
14
|
-
action,
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
8
|
+
declare const Empty: ({ icon, title, description, action, className, ...props }: Props) => import("react").JSX.Element;
|
|
18
9
|
//#endregion
|
|
19
|
-
export {
|
|
10
|
+
export { Props, Empty as default };
|
|
20
11
|
//# sourceMappingURL=empty.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../src/components/templates/empty.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.d.mts","names":[],"sources":["../../../src/components/templates/empty.tsx"],"mappings":";UAIiB,cAAc,KAAK,MAAM;EACxC,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,cAAc,MAAM;EACpB,SAAS,MAAM;;cAQX,UAAS,MAAA,OAAA,aAAA,QAAA,cAAA,SAOZ,0BAAK,IAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cn } from "../../utils.mjs";
|
|
2
2
|
import { Inbox } from "lucide-react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
4
|
//#region src/components/templates/empty.tsx
|
|
6
5
|
const Empty = ({ icon, title, description = "No data", action, className, ...props }) => {
|
|
7
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -28,7 +27,7 @@ const Empty = ({ icon, title, description = "No data", action, className, ...pro
|
|
|
28
27
|
]
|
|
29
28
|
});
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
//#endregion
|
|
33
31
|
export { Empty as default };
|
|
32
|
+
|
|
34
33
|
//# sourceMappingURL=empty.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.mjs","names":[],"sources":["../../../src/components/templates/empty.tsx"],"sourcesContent":["import { Inbox } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nexport interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {\n icon?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n}\n\n// The counterpart List's `empty` prop was asking for — List/Upload/Swiper\n// each render arbitrary content for their empty state today with nothing\n// in the library actually meant to go there. Pairs with Skeleton the same\n// way Skeleton pairs with real content: one placeholder for \"nothing\n// loaded yet\", one for \"loaded, and there's nothing\".\nconst Empty = ({\n icon,\n title,\n description = 'No data',\n action,\n className,\n ...props\n}: Props) => {\n return (\n <div\n role=\"status\"\n className={cn(\n 'flex flex-col items-center justify-center gap-3 py-12 text-center',\n className,\n //\n )}\n {...props}\n >\n <div className=\"text-muted-foreground [&_svg]:size-12\">\n {icon ?? <Inbox />}\n </div>\n {title && <p className=\"text-sm font-medium\">{title}</p>}\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n {action && <div className=\"mt-1\">{action}</div>}\n </div>\n );\n};\n\nexport default Empty;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"empty.mjs","names":[],"sources":["../../../src/components/templates/empty.tsx"],"sourcesContent":["import { Inbox } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nexport interface Props extends Omit<React.ComponentProps<'div'>, 'title'> {\n icon?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n}\n\n// The counterpart List's `empty` prop was asking for — List/Upload/Swiper\n// each render arbitrary content for their empty state today with nothing\n// in the library actually meant to go there. Pairs with Skeleton the same\n// way Skeleton pairs with real content: one placeholder for \"nothing\n// loaded yet\", one for \"loaded, and there's nothing\".\nconst Empty = ({\n icon,\n title,\n description = 'No data',\n action,\n className,\n ...props\n}: Props) => {\n return (\n <div\n role=\"status\"\n className={cn(\n 'flex flex-col items-center justify-center gap-3 py-12 text-center',\n className,\n //\n )}\n {...props}\n >\n <div className=\"text-muted-foreground [&_svg]:size-12\">\n {icon ?? <Inbox />}\n </div>\n {title && <p className=\"text-sm font-medium\">{title}</p>}\n {description && (\n <p className=\"text-muted-foreground text-sm\">{description}</p>\n )}\n {action && <div className=\"mt-1\">{action}</div>}\n </div>\n );\n};\n\nexport default Empty;\n"],"mappings":";;;;AAgBA,MAAM,SAAS,EACb,MACA,OACA,cAAc,WACd,QACA,WACA,GAAG,YACQ;CACX,OACE,qBAAC,OAAD;EACE,MAAK;EACL,WAAW,GACT,qEACA,SAEF;EACA,GAAI;EAPN,UAAA;GASE,oBAAC,OAAD;IAAK,WAAU;IACZ,UAAA,QAAQ,oBAAC,OAAD,CAAQ,CAAA;GACd,CAAA;GACJ,SAAS,oBAAC,KAAD;IAAG,WAAU;IAAuB,UAAA;GAAS,CAAA;GACtD,eACC,oBAAC,KAAD;IAAG,WAAU;IAAiC,UAAA;GAAe,CAAA;GAE9D,UAAU,oBAAC,OAAD;IAAK,WAAU;IAAQ,UAAA;GAAY,CAAA;EAC3C;;AAET"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/templates/grid/col.d.ts
|
|
4
2
|
interface ResponsiveColSpan {
|
|
5
3
|
span?: number;
|
|
@@ -16,20 +14,7 @@ interface Props extends React.ComponentProps<'div'> {
|
|
|
16
14
|
xl?: ColSpanProp;
|
|
17
15
|
'2xl'?: ColSpanProp;
|
|
18
16
|
}
|
|
19
|
-
declare const Col: ({
|
|
20
|
-
span,
|
|
21
|
-
offset,
|
|
22
|
-
xs,
|
|
23
|
-
sm,
|
|
24
|
-
md,
|
|
25
|
-
lg,
|
|
26
|
-
xl,
|
|
27
|
-
"2xl": xxl,
|
|
28
|
-
className,
|
|
29
|
-
style,
|
|
30
|
-
children,
|
|
31
|
-
...props
|
|
32
|
-
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
17
|
+
declare const Col: ({ span, offset, xs, sm, md, lg, xl, "2xl": xxl, className, style, children, ...props }: Props) => import("react").JSX.Element;
|
|
33
18
|
//#endregion
|
|
34
|
-
export {
|
|
19
|
+
export { Props, Col as default };
|
|
35
20
|
//# sourceMappingURL=col.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col.d.mts","names":[],"sources":["../../../../src/components/templates/grid/col.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"col.d.mts","names":[],"sources":["../../../../src/components/templates/grid/col.tsx"],"mappings":";UAUU;EACR;EACA;;KAGG,uBAAuB;UAEX,cAAc,MAAM;EACnC;EACA;EACA,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,QAAQ;;cAsDJ,QAAO,MAAA,QAAA,IAAA,IAAA,IAAA,IAAA,WAAA,KAAA,WAAA,OAAA,aAAA,SAaV,0BAAK,IAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../../utils.mjs";
|
|
4
3
|
import { useRowContext } from "./row-context.mjs";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
5
|
//#region src/components/templates/grid/col.tsx
|
|
8
6
|
const TOTAL_COLUMNS = 24;
|
|
9
7
|
const BREAKPOINT_ORDER = [
|
|
@@ -69,7 +67,7 @@ const Col = ({ span = TOTAL_COLUMNS, offset = 0, xs, sm, md, lg, xl, "2xl": xxl,
|
|
|
69
67
|
children
|
|
70
68
|
});
|
|
71
69
|
};
|
|
72
|
-
|
|
73
70
|
//#endregion
|
|
74
71
|
export { Col as default };
|
|
72
|
+
|
|
75
73
|
//# sourceMappingURL=col.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col.mjs","names":[],"sources":["../../../../src/components/templates/grid/col.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { type Breakpoint, useRowContext } from './row-context';\n\nconst TOTAL_COLUMNS = 24;\n\nconst BREAKPOINT_ORDER: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];\n\ninterface ResponsiveColSpan {\n span?: number;\n offset?: number;\n}\n\ntype ColSpanProp = number | ResponsiveColSpan;\n\nexport interface Props extends React.ComponentProps<'div'> {\n span?: number;\n offset?: number;\n xs?: ColSpanProp;\n sm?: ColSpanProp;\n md?: ColSpanProp;\n lg?: ColSpanProp;\n xl?: ColSpanProp;\n '2xl'?: ColSpanProp;\n}\n\nconst resolveColSpan = (value: ColSpanProp | undefined) =>\n typeof value === 'number' ? { span: value } : value;\n\n// Mobile-first cascade, run once per breakpoint tier (not just the\n// \"current\" one) — each tier's entry is what a `<Col span={24} md={12} />`\n// effectively resolves to *at and above* that tier, letting each defined\n// prop override the last. `globals.css`'s `[data-slot='col']` rules read\n// one of these six values per tier, switched by a real `@media` query —\n// see the comment on the returned CSS custom properties below for why.\nconst resolveEffectiveValuesByTier = (\n span: number,\n offset: number,\n responsiveProps: Partial<Record<Breakpoint, ColSpanProp | undefined>>,\n) => {\n let effectiveSpan = span;\n let effectiveOffset = offset;\n const spans = {} as Record<Breakpoint, number>;\n const offsets = {} as Record<Breakpoint, number>;\n\n for (const bp of BREAKPOINT_ORDER) {\n const resolved = resolveColSpan(responsiveProps[bp]);\n\n if (resolved?.span !== undefined) {\n effectiveSpan = resolved.span;\n }\n if (resolved?.offset !== undefined) {\n effectiveOffset = resolved.offset;\n }\n\n spans[bp] = effectiveSpan;\n offsets[bp] = effectiveOffset;\n }\n\n return { spans, offsets };\n};\n\n// 24-column system (matches Ant Design's Row/Col, a familiar mental model\n// for anyone coming from it). The actual `flex-basis`/`max-width`/\n// `margin-left` math lives in `globals.css` (`[data-slot='col']`), driven\n// by real `@media` queries — this component's only job is resolving each\n// breakpoint tier's effective span/offset (pure prop math, no `window`\n// access) and handing them over as CSS custom properties. That's what\n// makes the responsive behavior work from the very first (server-rendered)\n// paint: previously this picked one \"current\" tier via `useResponsiveSize`\n// (which measures the viewport client-side, so it can't know the real\n// value until after mount) and baked only *that* into an inline style,\n// so SSR output — and the first client paint, before that measurement\n// effect ran — was always the same-as-`useResponsiveSize`'s SSR-safe 'xs'\n// guess, regardless of the real viewport. Handing over all six tiers and\n// letting CSS pick lets the browser resolve the right one immediately,\n// with no JS and no resize listener needed at all.\nconst Col = ({\n span = TOTAL_COLUMNS,\n offset = 0,\n xs,\n sm,\n md,\n lg,\n xl,\n '2xl': xxl,\n className,\n style,\n children,\n ...props\n}: Props) => {\n const { gutterX } = useRowContext();\n\n const responsiveProps: Partial<Record<Breakpoint, ColSpanProp | undefined>> =\n { xs, sm, md, lg, xl, '2xl': xxl };\n\n const { spans, offsets } = resolveEffectiveValuesByTier(\n span,\n offset,\n responsiveProps,\n );\n\n const cssVars = {\n '--col-span-xs': spans.xs,\n '--col-span-sm': spans.sm,\n '--col-span-md': spans.md,\n '--col-span-lg': spans.lg,\n '--col-span-xl': spans.xl,\n '--col-span-2xl': spans['2xl'],\n '--col-offset-xs': offsets.xs,\n '--col-offset-sm': offsets.sm,\n '--col-offset-md': offsets.md,\n '--col-offset-lg': offsets.lg,\n '--col-offset-xl': offsets.xl,\n '--col-offset-2xl': offsets['2xl'],\n } as React.CSSProperties;\n\n return (\n <div\n data-slot=\"col\"\n className={cn('box-border shrink-0 grow-0', className)}\n style={{\n ...cssVars,\n paddingLeft: gutterX ? gutterX / 2 : undefined,\n paddingRight: gutterX ? gutterX / 2 : undefined,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default Col;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"col.mjs","names":[],"sources":["../../../../src/components/templates/grid/col.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { type Breakpoint, useRowContext } from './row-context';\n\nconst TOTAL_COLUMNS = 24;\n\nconst BREAKPOINT_ORDER: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];\n\ninterface ResponsiveColSpan {\n span?: number;\n offset?: number;\n}\n\ntype ColSpanProp = number | ResponsiveColSpan;\n\nexport interface Props extends React.ComponentProps<'div'> {\n span?: number;\n offset?: number;\n xs?: ColSpanProp;\n sm?: ColSpanProp;\n md?: ColSpanProp;\n lg?: ColSpanProp;\n xl?: ColSpanProp;\n '2xl'?: ColSpanProp;\n}\n\nconst resolveColSpan = (value: ColSpanProp | undefined) =>\n typeof value === 'number' ? { span: value } : value;\n\n// Mobile-first cascade, run once per breakpoint tier (not just the\n// \"current\" one) — each tier's entry is what a `<Col span={24} md={12} />`\n// effectively resolves to *at and above* that tier, letting each defined\n// prop override the last. `globals.css`'s `[data-slot='col']` rules read\n// one of these six values per tier, switched by a real `@media` query —\n// see the comment on the returned CSS custom properties below for why.\nconst resolveEffectiveValuesByTier = (\n span: number,\n offset: number,\n responsiveProps: Partial<Record<Breakpoint, ColSpanProp | undefined>>,\n) => {\n let effectiveSpan = span;\n let effectiveOffset = offset;\n const spans = {} as Record<Breakpoint, number>;\n const offsets = {} as Record<Breakpoint, number>;\n\n for (const bp of BREAKPOINT_ORDER) {\n const resolved = resolveColSpan(responsiveProps[bp]);\n\n if (resolved?.span !== undefined) {\n effectiveSpan = resolved.span;\n }\n if (resolved?.offset !== undefined) {\n effectiveOffset = resolved.offset;\n }\n\n spans[bp] = effectiveSpan;\n offsets[bp] = effectiveOffset;\n }\n\n return { spans, offsets };\n};\n\n// 24-column system (matches Ant Design's Row/Col, a familiar mental model\n// for anyone coming from it). The actual `flex-basis`/`max-width`/\n// `margin-left` math lives in `globals.css` (`[data-slot='col']`), driven\n// by real `@media` queries — this component's only job is resolving each\n// breakpoint tier's effective span/offset (pure prop math, no `window`\n// access) and handing them over as CSS custom properties. That's what\n// makes the responsive behavior work from the very first (server-rendered)\n// paint: previously this picked one \"current\" tier via `useResponsiveSize`\n// (which measures the viewport client-side, so it can't know the real\n// value until after mount) and baked only *that* into an inline style,\n// so SSR output — and the first client paint, before that measurement\n// effect ran — was always the same-as-`useResponsiveSize`'s SSR-safe 'xs'\n// guess, regardless of the real viewport. Handing over all six tiers and\n// letting CSS pick lets the browser resolve the right one immediately,\n// with no JS and no resize listener needed at all.\nconst Col = ({\n span = TOTAL_COLUMNS,\n offset = 0,\n xs,\n sm,\n md,\n lg,\n xl,\n '2xl': xxl,\n className,\n style,\n children,\n ...props\n}: Props) => {\n const { gutterX } = useRowContext();\n\n const responsiveProps: Partial<Record<Breakpoint, ColSpanProp | undefined>> =\n { xs, sm, md, lg, xl, '2xl': xxl };\n\n const { spans, offsets } = resolveEffectiveValuesByTier(\n span,\n offset,\n responsiveProps,\n );\n\n const cssVars = {\n '--col-span-xs': spans.xs,\n '--col-span-sm': spans.sm,\n '--col-span-md': spans.md,\n '--col-span-lg': spans.lg,\n '--col-span-xl': spans.xl,\n '--col-span-2xl': spans['2xl'],\n '--col-offset-xs': offsets.xs,\n '--col-offset-sm': offsets.sm,\n '--col-offset-md': offsets.md,\n '--col-offset-lg': offsets.lg,\n '--col-offset-xl': offsets.xl,\n '--col-offset-2xl': offsets['2xl'],\n } as React.CSSProperties;\n\n return (\n <div\n data-slot=\"col\"\n className={cn('box-border shrink-0 grow-0', className)}\n style={{\n ...cssVars,\n paddingLeft: gutterX ? gutterX / 2 : undefined,\n paddingRight: gutterX ? gutterX / 2 : undefined,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nexport default Col;\n"],"mappings":";;;;;AAMA,MAAM,gBAAgB;AAEtB,MAAM,mBAAiC;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;AAAK;AAoB3E,MAAM,kBAAkB,UACtB,OAAO,UAAU,WAAW,EAAE,MAAM,MAAM,IAAI;AAQhD,MAAM,gCACJ,MACA,QACA,oBACG;CACH,IAAI,gBAAgB;CACpB,IAAI,kBAAkB;CACtB,MAAM,QAAQ,CAAC;CACf,MAAM,UAAU,CAAC;CAEjB,KAAK,MAAM,MAAM,kBAAkB;EACjC,MAAM,WAAW,eAAe,gBAAgB,GAAG;EAEnD,IAAI,UAAU,SAAS,KAAA,GACrB,gBAAgB,SAAS;EAE3B,IAAI,UAAU,WAAW,KAAA,GACvB,kBAAkB,SAAS;EAG7B,MAAM,MAAM;EACZ,QAAQ,MAAM;CAChB;CAEA,OAAO;EAAE;EAAO;CAAQ;AAC1B;AAiBA,MAAM,OAAO,EACX,OAAO,eACP,SAAS,GACT,IACA,IACA,IACA,IACA,IACA,OAAO,KACP,WACA,OACA,UACA,GAAG,YACQ;CACX,MAAM,EAAE,YAAY,cAAc;CAKlC,MAAM,EAAE,OAAO,YAAY,6BACzB,MACA,QACA;EALE;EAAI;EAAI;EAAI;EAAI;EAAI,OAAO;CAKf,CAChB;CAEA,MAAM,UAAU;EACd,iBAAiB,MAAM;EACvB,iBAAiB,MAAM;EACvB,iBAAiB,MAAM;EACvB,iBAAiB,MAAM;EACvB,iBAAiB,MAAM;EACvB,kBAAkB,MAAM;EACxB,mBAAmB,QAAQ;EAC3B,mBAAmB,QAAQ;EAC3B,mBAAmB,QAAQ;EAC3B,mBAAmB,QAAQ;EAC3B,mBAAmB,QAAQ;EAC3B,oBAAoB,QAAQ;CAC9B;CAEA,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,8BAA8B,SAAS;EACrD,OAAO;GACL,GAAG;GACH,aAAa,UAAU,UAAU,IAAI,KAAA;GACrC,cAAc,UAAU,UAAU,IAAI,KAAA;GACtC,GAAG;EACL;EACA,GAAI;EAEH;CACE,CAAA;AAET"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/templates/grid/row-context.ts
|
|
4
3
|
const RowContext = createContext({
|
|
5
4
|
gutterX: 0,
|
|
6
5
|
gutterY: 0
|
|
7
6
|
});
|
|
8
7
|
const useRowContext = () => useContext(RowContext);
|
|
9
|
-
|
|
10
8
|
//#endregion
|
|
11
9
|
export { RowContext, useRowContext };
|
|
10
|
+
|
|
12
11
|
//# sourceMappingURL=row-context.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row-context.mjs","names":[],"sources":["../../../../src/components/templates/grid/row-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nexport interface RowContextValue {\n gutterX: number;\n gutterY: number;\n}\n\n// Defaults assume Col is used without a Row (not the intended usage, but\n// shouldn't crash).\nexport const RowContext = createContext<RowContextValue>({\n gutterX: 0,\n gutterY: 0,\n});\n\nexport const useRowContext = () => useContext(RowContext);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"row-context.mjs","names":[],"sources":["../../../../src/components/templates/grid/row-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nexport interface RowContextValue {\n gutterX: number;\n gutterY: number;\n}\n\n// Defaults assume Col is used without a Row (not the intended usage, but\n// shouldn't crash).\nexport const RowContext = createContext<RowContextValue>({\n gutterX: 0,\n gutterY: 0,\n});\n\nexport const useRowContext = () => useContext(RowContext);\n"],"mappings":";;AAWA,MAAa,aAAa,cAA+B;CACvD,SAAS;CACT,SAAS;AACX,CAAC;AAED,MAAa,sBAAsB,WAAW,UAAU"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/templates/grid/row.d.ts
|
|
4
2
|
declare const ALIGN_CLASSES: {
|
|
5
3
|
top: string;
|
|
@@ -21,16 +19,7 @@ interface Props extends React.ComponentProps<'div'> {
|
|
|
21
19
|
justify?: keyof typeof JUSTIFY_CLASSES;
|
|
22
20
|
wrap?: boolean;
|
|
23
21
|
}
|
|
24
|
-
declare const Row: ({
|
|
25
|
-
gutter,
|
|
26
|
-
align,
|
|
27
|
-
justify,
|
|
28
|
-
wrap,
|
|
29
|
-
className,
|
|
30
|
-
style,
|
|
31
|
-
children,
|
|
32
|
-
...props
|
|
33
|
-
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
22
|
+
declare const Row: ({ gutter, align, justify, wrap, className, style, children, ...props }: Props) => import("react").JSX.Element;
|
|
34
23
|
//#endregion
|
|
35
|
-
export { Props, Row };
|
|
24
|
+
export { Props, Row as default };
|
|
36
25
|
//# sourceMappingURL=row.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.mts","names":[],"sources":["../../../../src/components/templates/grid/row.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"row.d.mts","names":[],"sources":["../../../../src/components/templates/grid/row.tsx"],"mappings":";cAQM;;;;;;cAOA;;;;;;;;UASW,cAAc,MAAM;EACnC;EACA,qBAAqB;EACrB,uBAAuB;EACvB;;cAGI,QAAO,QAAA,OAAA,SAAA,MAAA,WAAA,OAAA,aAAA,SASV,0BAAK,IAAA"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../../utils.mjs";
|
|
4
3
|
import { RowContext } from "./row-context.mjs";
|
|
5
4
|
import { useMemo } from "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
6
|
//#region src/components/templates/grid/row.tsx
|
|
9
7
|
const ALIGN_CLASSES = {
|
|
10
8
|
top: "items-start",
|
|
@@ -41,7 +39,7 @@ const Row = ({ gutter = 0, align, justify, wrap = true, className, style, childr
|
|
|
41
39
|
})
|
|
42
40
|
});
|
|
43
41
|
};
|
|
44
|
-
|
|
45
42
|
//#endregion
|
|
46
43
|
export { Row as default };
|
|
44
|
+
|
|
47
45
|
//# sourceMappingURL=row.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.mjs","names":[],"sources":["../../../../src/components/templates/grid/row.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { RowContext } from './row-context';\n\nconst ALIGN_CLASSES = {\n top: 'items-start',\n middle: 'items-center',\n bottom: 'items-end',\n stretch: 'items-stretch',\n};\n\nconst JUSTIFY_CLASSES = {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n 'space-around': 'justify-around',\n 'space-between': 'justify-between',\n 'space-evenly': 'justify-evenly',\n};\n\nexport interface Props extends React.ComponentProps<'div'> {\n gutter?: number | [number, number];\n align?: keyof typeof ALIGN_CLASSES;\n justify?: keyof typeof JUSTIFY_CLASSES;\n wrap?: boolean;\n}\n\nconst Row = ({\n gutter = 0,\n align,\n justify,\n wrap = true,\n className,\n style,\n children,\n ...props\n}: Props) => {\n const [gutterX, gutterY] = Array.isArray(gutter) ? gutter : [gutter, 0];\n\n const contextValue = useMemo(\n () => ({ gutterX, gutterY }),\n [gutterX, gutterY],\n );\n\n return (\n <RowContext.Provider value={contextValue}>\n <div\n className={cn(\n 'flex',\n wrap && 'flex-wrap',\n align && ALIGN_CLASSES[align],\n justify && JUSTIFY_CLASSES[justify],\n className,\n //\n )}\n style={{\n // Negative margin + Col's matching padding is the classic\n // gutter technique — unlike a plain `gap`, it doesn't break the\n // percentage-width math when several Cols are meant to sum to\n // exactly 100% of the row. Vertical gutter has no such\n // constraint (it only affects spacing *between* wrapped rows),\n // so it uses native `row-gap` directly.\n marginLeft: gutterX ? -gutterX / 2 : undefined,\n marginRight: gutterX ? -gutterX / 2 : undefined,\n rowGap: gutterY || undefined,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n </RowContext.Provider>\n );\n};\n\nexport default Row;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"row.mjs","names":[],"sources":["../../../../src/components/templates/grid/row.tsx"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { RowContext } from './row-context';\n\nconst ALIGN_CLASSES = {\n top: 'items-start',\n middle: 'items-center',\n bottom: 'items-end',\n stretch: 'items-stretch',\n};\n\nconst JUSTIFY_CLASSES = {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n 'space-around': 'justify-around',\n 'space-between': 'justify-between',\n 'space-evenly': 'justify-evenly',\n};\n\nexport interface Props extends React.ComponentProps<'div'> {\n gutter?: number | [number, number];\n align?: keyof typeof ALIGN_CLASSES;\n justify?: keyof typeof JUSTIFY_CLASSES;\n wrap?: boolean;\n}\n\nconst Row = ({\n gutter = 0,\n align,\n justify,\n wrap = true,\n className,\n style,\n children,\n ...props\n}: Props) => {\n const [gutterX, gutterY] = Array.isArray(gutter) ? gutter : [gutter, 0];\n\n const contextValue = useMemo(\n () => ({ gutterX, gutterY }),\n [gutterX, gutterY],\n );\n\n return (\n <RowContext.Provider value={contextValue}>\n <div\n className={cn(\n 'flex',\n wrap && 'flex-wrap',\n align && ALIGN_CLASSES[align],\n justify && JUSTIFY_CLASSES[justify],\n className,\n //\n )}\n style={{\n // Negative margin + Col's matching padding is the classic\n // gutter technique — unlike a plain `gap`, it doesn't break the\n // percentage-width math when several Cols are meant to sum to\n // exactly 100% of the row. Vertical gutter has no such\n // constraint (it only affects spacing *between* wrapped rows),\n // so it uses native `row-gap` directly.\n marginLeft: gutterX ? -gutterX / 2 : undefined,\n marginRight: gutterX ? -gutterX / 2 : undefined,\n rowGap: gutterY || undefined,\n ...style,\n }}\n {...props}\n >\n {children}\n </div>\n </RowContext.Provider>\n );\n};\n\nexport default Row;\n"],"mappings":";;;;;;AAQA,MAAM,gBAAgB;CACpB,KAAK;CACL,QAAQ;CACR,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,kBAAkB;CACtB,OAAO;CACP,KAAK;CACL,QAAQ;CACR,gBAAgB;CAChB,iBAAiB;CACjB,gBAAgB;AAClB;AASA,MAAM,OAAO,EACX,SAAS,GACT,OACA,SACA,OAAO,MACP,WACA,OACA,UACA,GAAG,YACQ;CACX,MAAM,CAAC,SAAS,WAAW,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,QAAQ,CAAC;CAEtE,MAAM,eAAe,eACZ;EAAE;EAAS;CAAQ,IAC1B,CAAC,SAAS,OAAO,CACnB;CAEA,OACE,oBAAC,WAAW,UAAZ;EAAqB,OAAO;EAC1B,UAAA,oBAAC,OAAD;GACE,WAAW,GACT,QACA,QAAQ,aACR,SAAS,cAAc,QACvB,WAAW,gBAAgB,UAC3B,SAEF;GACA,OAAO;IAOL,YAAY,UAAU,CAAC,UAAU,IAAI,KAAA;IACrC,aAAa,UAAU,CAAC,UAAU,IAAI,KAAA;IACtC,QAAQ,WAAW,KAAA;IACnB,GAAG;GACL;GACA,GAAI;GAEH;EACE,CAAA;CACc,CAAA;AAEzB"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/templates/layout/content.d.ts
|
|
4
2
|
interface Props extends React.ComponentProps<'main'> {
|
|
5
3
|
asChild?: boolean;
|
|
6
4
|
}
|
|
7
|
-
declare const Content: ({
|
|
8
|
-
children,
|
|
9
|
-
className,
|
|
10
|
-
asChild,
|
|
11
|
-
...props
|
|
12
|
-
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
5
|
+
declare const Content: ({ children, className, asChild, ...props }: Props) => import("react").JSX.Element;
|
|
13
6
|
//#endregion
|
|
14
|
-
export {
|
|
7
|
+
export { Props, Content as default };
|
|
15
8
|
//# sourceMappingURL=content.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/templates/layout/content.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.d.mts","names":[],"sources":["../../../../src/components/templates/layout/content.tsx"],"mappings":";UAMiB,cAAc,MAAM;EACnC;;cAGI,YAAW,UAAA,WAAA,YAAA,SAAoD,0BAAK,IAAA"}
|
|
@@ -2,7 +2,6 @@ import { cn } from "../../../utils.mjs";
|
|
|
2
2
|
import { SiderRegistryContext } from "./sider-context.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
|
|
6
5
|
//#region src/components/templates/layout/content.tsx
|
|
7
6
|
const Content = ({ children, className, asChild = false, ...props }) => {
|
|
8
7
|
return /* @__PURE__ */ jsx(asChild ? Slot : "main", {
|
|
@@ -14,7 +13,7 @@ const Content = ({ children, className, asChild = false, ...props }) => {
|
|
|
14
13
|
})
|
|
15
14
|
});
|
|
16
15
|
};
|
|
17
|
-
|
|
18
16
|
//#endregion
|
|
19
17
|
export { Content as default };
|
|
18
|
+
|
|
20
19
|
//# sourceMappingURL=content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/templates/layout/content.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { SiderRegistryContext } from './sider-context';\n\nexport interface Props extends React.ComponentProps<'main'> {\n asChild?: boolean;\n}\n\nconst Content = ({ children, className, asChild = false, ...props }: Props) => {\n // Only one <main> landmark should exist per page — a Layout nested\n // inside a page that already has its own <main> (or a Content nested\n // inside another Content) needs a way to opt out of rendering a second\n // one. asChild + Slot (same pattern as core/button.tsx and\n // core/badge.tsx) merges these props/classes onto the caller's own\n // element instead.\n const Comp = asChild ? Slot : 'main';\n\n return (\n <Comp\n className={cn(\n 'min-w-0 shrink grow basis-auto',\n // basis-auto (not basis-0) sizes Content from its actual content\n // height first, so flex-grow only adds extra space when content is\n // shorter than the viewport — when content is taller, Content\n // keeps its natural (larger) height instead of clipping to\n // available space and pushes Footer below it. min-h-0 is\n // intentionally omitted here: with basis-auto, the default\n // min-height:auto (content-based) is what makes that possible; on\n // the Sider row's cross axis it's harmless since min-height there\n // governs stretch, not main-axis growth.\n className,\n )}\n {...props}\n >\n {/* Reset the registry to null so a `Sider` used inside `Content`\n (e.g. a detail page's own sub-navigation) doesn't register\n against the ancestor `Layout` and flip its axis to flex-row —\n a genuinely nested `Layout` already gets its own fresh registry,\n this only guards the \"Sider with no intervening Layout\" case. */}\n <SiderRegistryContext.Provider value={null}>\n {children}\n </SiderRegistryContext.Provider>\n </Comp>\n );\n};\n\nexport default Content;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.mjs","names":[],"sources":["../../../../src/components/templates/layout/content.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\n\nimport { cn } from '@repo/ui/utils';\n\nimport { SiderRegistryContext } from './sider-context';\n\nexport interface Props extends React.ComponentProps<'main'> {\n asChild?: boolean;\n}\n\nconst Content = ({ children, className, asChild = false, ...props }: Props) => {\n // Only one <main> landmark should exist per page — a Layout nested\n // inside a page that already has its own <main> (or a Content nested\n // inside another Content) needs a way to opt out of rendering a second\n // one. asChild + Slot (same pattern as core/button.tsx and\n // core/badge.tsx) merges these props/classes onto the caller's own\n // element instead.\n const Comp = asChild ? Slot : 'main';\n\n return (\n <Comp\n className={cn(\n 'min-w-0 shrink grow basis-auto',\n // basis-auto (not basis-0) sizes Content from its actual content\n // height first, so flex-grow only adds extra space when content is\n // shorter than the viewport — when content is taller, Content\n // keeps its natural (larger) height instead of clipping to\n // available space and pushes Footer below it. min-h-0 is\n // intentionally omitted here: with basis-auto, the default\n // min-height:auto (content-based) is what makes that possible; on\n // the Sider row's cross axis it's harmless since min-height there\n // governs stretch, not main-axis growth.\n className,\n )}\n {...props}\n >\n {/* Reset the registry to null so a `Sider` used inside `Content`\n (e.g. a detail page's own sub-navigation) doesn't register\n against the ancestor `Layout` and flip its axis to flex-row —\n a genuinely nested `Layout` already gets its own fresh registry,\n this only guards the \"Sider with no intervening Layout\" case. */}\n <SiderRegistryContext.Provider value={null}>\n {children}\n </SiderRegistryContext.Provider>\n </Comp>\n );\n};\n\nexport default Content;\n"],"mappings":";;;;;AAUA,MAAM,WAAW,EAAE,UAAU,WAAW,UAAU,OAAO,GAAG,YAAmB;CAS7E,OACE,oBAHW,UAAU,OAAO,QAG5B;EACE,WAAW,GACT,kCAUA,SACF;EACA,GAAI;EAOJ,UAAA,oBAAC,qBAAqB,UAAtB;GAA+B,OAAO;GACnC;EAC4B,CAAA;CAC3B,CAAA;AAEV"}
|