@askrjs/themes 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -13
- package/THEMING.md +24 -18
- package/dist/components/_internal/block-layout.d.ts +49 -0
- package/dist/components/_internal/block-layout.js +210 -0
- package/dist/components/_internal/block-layout.js.map +1 -0
- package/dist/components/alert/alert.js +2 -2
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/alert.types.d.ts +0 -1
- package/dist/components/aside/aside.d.ts +7 -0
- package/dist/components/aside/aside.js +16 -0
- package/dist/components/aside/aside.js.map +1 -0
- package/dist/components/aside/aside.types.d.ts +6 -0
- package/dist/components/aside/index.d.ts +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
- package/dist/components/badge/index.d.ts +1 -2
- package/dist/components/block/block.d.ts +2 -3
- package/dist/components/block/block.js +16 -46
- package/dist/components/block/block.js.map +1 -1
- package/dist/components/block/block.types.d.ts +13 -23
- package/dist/components/block/index.d.ts +3 -3
- package/dist/components/brand/brand.d.ts +9 -0
- package/dist/components/brand/brand.js +49 -0
- package/dist/components/brand/brand.js.map +1 -0
- package/dist/components/brand/brand.types.d.ts +31 -0
- package/dist/components/brand/index.d.ts +2 -0
- package/dist/components/card/card.d.ts +3 -3
- package/dist/components/card/card.js +6 -11
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card/card.types.d.ts +10 -12
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/catalog.d.ts +156 -0
- package/dist/components/catalog.js +723 -0
- package/dist/components/catalog.js.map +1 -0
- package/dist/components/container/container.d.ts +2 -3
- package/dist/components/container/container.js +8 -71
- package/dist/components/container/container.js.map +1 -1
- package/dist/components/container/container.types.d.ts +5 -24
- package/dist/components/container/index.d.ts +2 -3
- package/dist/components/empty-state/empty-state.js +34 -28
- package/dist/components/empty-state/empty-state.js.map +1 -1
- package/dist/components/empty-state/empty-state.types.d.ts +3 -6
- package/dist/components/field/field.js +4 -2
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/field.types.d.ts +1 -0
- package/dist/components/footer/footer.d.ts +13 -0
- package/dist/components/footer/footer.js +86 -0
- package/dist/components/footer/footer.js.map +1 -0
- package/dist/components/footer/footer.types.d.ts +37 -0
- package/dist/components/footer/index.d.ts +2 -0
- package/dist/components/grid/grid.d.ts +7 -0
- package/dist/components/grid/grid.js +76 -0
- package/dist/components/grid/grid.js.map +1 -0
- package/dist/components/grid/grid.types.d.ts +19 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/header/header.js +9 -6
- package/dist/components/header/header.js.map +1 -1
- package/dist/components/header/header.types.d.ts +5 -5
- package/dist/components/header/index.d.ts +2 -0
- package/dist/components/main/index.d.ts +2 -0
- package/dist/components/main/main.d.ts +7 -0
- package/dist/components/main/main.js +17 -0
- package/dist/components/main/main.js.map +1 -0
- package/dist/components/main/main.types.d.ts +6 -0
- package/dist/components/nav/index.d.ts +2 -2
- package/dist/components/nav/nav.d.ts +8 -6
- package/dist/components/nav/nav.js +93 -58
- package/dist/components/nav/nav.js.map +1 -1
- package/dist/components/nav/nav.types.d.ts +16 -20
- package/dist/components/navbar/index.d.ts +4 -5
- package/dist/components/navbar/navbar.d.ts +3 -38
- package/dist/components/navbar/navbar.js +103 -210
- package/dist/components/navbar/navbar.js.map +1 -1
- package/dist/components/navbar/navbar.types.d.ts +14 -24
- package/dist/components/page/index.d.ts +2 -0
- package/dist/components/page/page.d.ts +7 -0
- package/dist/components/page/page.js +22 -0
- package/dist/components/page/page.js.map +1 -0
- package/dist/components/page/page.types.d.ts +6 -0
- package/dist/components/page-header/index.d.ts +2 -0
- package/dist/components/page-header/page-header.d.ts +7 -0
- package/dist/components/page-header/page-header.js +37 -0
- package/dist/components/page-header/page-header.js.map +1 -0
- package/dist/components/page-header/page-header.types.d.ts +10 -0
- package/dist/components/section/index.d.ts +2 -3
- package/dist/components/section/section.d.ts +2 -3
- package/dist/components/section/section.js +7 -30
- package/dist/components/section/section.js.map +1 -1
- package/dist/components/section/section.types.d.ts +3 -20
- package/dist/components/separator/index.d.ts +1 -2
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/sidebar/sidebar.d.ts +17 -2
- package/dist/components/sidebar/sidebar.js +115 -225
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/sidebar/sidebar.types.d.ts +21 -23
- package/dist/components/skeleton/index.d.ts +1 -2
- package/dist/components/skeleton/skeleton.js +12 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/skeleton/skeleton.types.d.ts +2 -0
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/spinner.js +6 -3
- package/dist/components/spinner/spinner.js.map +1 -1
- package/dist/components/spinner/spinner.types.d.ts +3 -1
- package/dist/components/stat/index.d.ts +2 -0
- package/dist/components/stat/stat.d.ts +10 -0
- package/dist/components/stat/stat.js +52 -0
- package/dist/components/stat/stat.js.map +1 -0
- package/dist/components/stat/stat.types.d.ts +24 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/text.d.ts +7 -0
- package/dist/components/text/text.js +28 -0
- package/dist/components/text/text.js.map +1 -0
- package/dist/components/text/text.types.d.ts +26 -0
- package/dist/components/theme/theme.js +50 -8
- package/dist/components/theme/theme.js.map +1 -1
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/toolbar.d.ts +7 -0
- package/dist/components/toolbar/toolbar.js +30 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar.types.d.ts +9 -0
- package/dist/components.d.ts +60 -0
- package/dist/components.js +35 -0
- package/dist/controls.d.ts +2 -2
- package/dist/controls.js +3 -3
- package/dist/core.d.ts +36 -0
- package/dist/core.js +19 -0
- package/dist/navs.d.ts +3 -15
- package/dist/navs.js +2 -8
- package/dist/overlays.d.ts +2 -2
- package/dist/overlays.js +2 -2
- package/dist/surfaces.d.ts +10 -8
- package/dist/surfaces.js +6 -4
- package/dist/themes/default/index.css +3661 -3945
- package/package.json +235 -69
- package/src/components/_internal/block-layout.ts +354 -0
- package/src/components/alert/alert.tsx +1 -2
- package/src/components/alert/alert.types.ts +0 -1
- package/src/components/aside/aside.tsx +12 -0
- package/src/components/aside/aside.types.ts +3 -0
- package/src/components/aside/index.ts +2 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +1 -1
- package/src/components/badge/index.ts +0 -1
- package/src/components/block/block.a11y.ts +0 -6
- package/src/components/block/block.tsx +40 -56
- package/src/components/block/block.types.ts +59 -41
- package/src/components/block/index.ts +1 -10
- package/src/components/brand/brand.tsx +61 -0
- package/src/components/brand/brand.types.ts +39 -0
- package/src/components/brand/index.ts +2 -0
- package/src/components/card/card.tsx +6 -18
- package/src/components/card/card.types.ts +9 -11
- package/src/components/card/index.ts +2 -3
- package/src/components/catalog.tsx +713 -0
- package/src/components/container/container.a11y.ts +0 -5
- package/src/components/container/container.tsx +18 -128
- package/src/components/container/container.types.ts +3 -32
- package/src/components/container/index.ts +1 -8
- package/src/components/empty-state/empty-state.tsx +17 -35
- package/src/components/empty-state/empty-state.types.ts +3 -5
- package/src/components/field/field.tsx +3 -1
- package/src/components/field/field.types.ts +1 -0
- package/src/components/footer/footer.tsx +88 -0
- package/src/components/footer/footer.types.ts +40 -0
- package/src/components/footer/index.ts +10 -0
- package/src/components/grid/grid.tsx +113 -0
- package/src/components/grid/grid.types.ts +20 -0
- package/src/components/grid/index.ts +2 -0
- package/src/components/header/header.tsx +10 -7
- package/src/components/header/header.types.ts +4 -4
- package/src/components/header/index.ts +1 -2
- package/src/components/main/index.ts +2 -0
- package/src/components/main/main.tsx +12 -0
- package/src/components/main/main.types.ts +3 -0
- package/src/components/nav/index.ts +7 -9
- package/src/components/nav/nav.tsx +153 -110
- package/src/components/nav/nav.types.ts +26 -27
- package/src/components/navbar/index.ts +4 -11
- package/src/components/navbar/navbar.tsx +103 -265
- package/src/components/navbar/navbar.types.ts +16 -42
- package/src/components/page/index.ts +2 -0
- package/src/components/page/page.tsx +17 -0
- package/src/components/page/page.types.ts +3 -0
- package/src/components/page-header/index.ts +2 -0
- package/src/components/page-header/page-header.tsx +29 -0
- package/src/components/page-header/page-header.types.ts +7 -0
- package/src/components/section/index.ts +1 -7
- package/src/components/section/section.a11y.ts +0 -1
- package/src/components/section/section.tsx +9 -35
- package/src/components/section/section.types.ts +2 -22
- package/src/components/separator/index.ts +4 -9
- package/src/components/sidebar/index.ts +27 -5
- package/src/components/sidebar/sidebar.tsx +146 -336
- package/src/components/sidebar/sidebar.types.ts +21 -28
- package/src/components/skeleton/index.ts +1 -2
- package/src/components/skeleton/skeleton.tsx +33 -1
- package/src/components/skeleton/skeleton.types.ts +2 -0
- package/src/components/spinner/index.ts +1 -1
- package/src/components/spinner/spinner.tsx +7 -2
- package/src/components/spinner/spinner.types.ts +3 -0
- package/src/components/stat/index.ts +2 -0
- package/src/components/stat/stat.tsx +47 -0
- package/src/components/stat/stat.types.ts +24 -0
- package/src/components/text/index.ts +2 -0
- package/src/components/text/text.tsx +39 -0
- package/src/components/text/text.types.ts +35 -0
- package/src/components/theme/theme.tsx +83 -9
- package/src/components/toolbar/index.ts +2 -0
- package/src/components/toolbar/toolbar.tsx +24 -0
- package/src/components/toolbar/toolbar.types.ts +6 -0
- package/src/components.ts +289 -0
- package/src/controls.ts +69 -2
- package/src/core.ts +42 -0
- package/src/navs.ts +9 -24
- package/src/overlays.ts +101 -59
- package/src/parity.ts +125 -0
- package/src/surfaces.ts +60 -13
- package/src/themes/default/index.css +11 -14
- package/src/themes/default/styles/actions/button-group.css +6 -6
- package/src/themes/default/styles/actions/button.css +98 -60
- package/src/themes/default/styles/actions/toggle-group.css +61 -25
- package/src/themes/default/styles/base/text.css +87 -0
- package/src/themes/default/styles/base/typography.css +24 -117
- package/src/themes/default/styles/base/utilities.css +0 -250
- package/src/themes/default/styles/disclosure/accordion.css +35 -28
- package/src/themes/default/styles/display/alert.css +7 -7
- package/src/themes/default/styles/display/badge.css +8 -9
- package/src/themes/default/styles/display/card.css +10 -47
- package/src/themes/default/styles/display/catalog.css +753 -0
- package/src/themes/default/styles/display/coverage.css +30 -305
- package/src/themes/default/styles/display/progress-circle.css +2 -0
- package/src/themes/default/styles/display/scroll-area.css +29 -24
- package/src/themes/default/styles/display/spinner.css +38 -1
- package/src/themes/default/styles/display/stat.css +21 -0
- package/src/themes/default/styles/display/table.css +37 -12
- package/src/themes/default/styles/display/virtual-list.css +24 -13
- package/src/themes/default/styles/display/virtual-table.css +58 -36
- package/src/themes/default/styles/forms/checkbox.css +12 -21
- package/src/themes/default/styles/forms/input-group.css +2 -1
- package/src/themes/default/styles/forms/input.css +11 -12
- package/src/themes/default/styles/forms/radio-group.css +44 -27
- package/src/themes/default/styles/forms/select.css +27 -35
- package/src/themes/default/styles/forms/slider.css +61 -47
- package/src/themes/default/styles/forms/switch.css +18 -23
- package/src/themes/default/styles/forms/textarea.css +12 -12
- package/src/themes/default/styles/layout/block.css +96 -12
- package/src/themes/default/styles/layout/grid.css +78 -0
- package/src/themes/default/styles/layout/layout.css +502 -772
- package/src/themes/default/styles/layout/patterns.css +0 -155
- package/src/themes/default/styles/navigation/nav.css +104 -154
- package/src/themes/default/styles/overlays/alert-dialog.css +2 -2
- package/src/themes/default/styles/overlays/dialog.css +76 -22
- package/src/themes/default/styles/overlays/dropdown.css +108 -31
- package/src/themes/default/styles/overlays/hover-card.css +39 -17
- package/src/themes/default/styles/overlays/menubar.css +223 -0
- package/src/themes/default/styles/overlays/popover.css +69 -23
- package/src/themes/default/styles/overlays/toast.css +91 -33
- package/src/themes/default/styles/overlays/tooltip.css +88 -14
- package/src/themes/default/styles/shell/brand.css +48 -0
- package/src/themes/default/styles/shell/footer.css +72 -0
- package/src/themes/default/styles/shell/header.css +7 -50
- package/src/themes/default/styles/shell/navbar.css +226 -454
- package/src/themes/default/styles/shell/sidebar.css +243 -829
- package/src/themes/default/tokens.css +145 -98
- package/templates/theme/index.css +11 -14
- package/templates/theme/styles/actions/button-group.css +6 -6
- package/templates/theme/styles/actions/button.css +98 -60
- package/templates/theme/styles/actions/toggle-group.css +61 -25
- package/templates/theme/styles/base/text.css +87 -0
- package/templates/theme/styles/base/typography.css +24 -117
- package/templates/theme/styles/disclosure/accordion.css +35 -28
- package/templates/theme/styles/display/alert.css +7 -7
- package/templates/theme/styles/display/badge.css +8 -9
- package/templates/theme/styles/display/card.css +10 -47
- package/templates/theme/styles/display/catalog.css +753 -0
- package/templates/theme/styles/display/coverage.css +30 -305
- package/templates/theme/styles/display/scroll-area.css +29 -24
- package/templates/theme/styles/display/spinner.css +38 -1
- package/templates/theme/styles/display/stat.css +21 -0
- package/templates/theme/styles/display/table.css +37 -12
- package/templates/theme/styles/display/virtual-list.css +24 -13
- package/templates/theme/styles/display/virtual-table.css +58 -36
- package/templates/theme/styles/forms/checkbox.css +12 -21
- package/templates/theme/styles/forms/input.css +11 -12
- package/templates/theme/styles/forms/radio-group.css +44 -27
- package/templates/theme/styles/forms/select.css +27 -35
- package/templates/theme/styles/forms/slider.css +61 -47
- package/templates/theme/styles/forms/switch.css +18 -23
- package/templates/theme/styles/forms/textarea.css +12 -12
- package/templates/theme/styles/layout/block.css +96 -12
- package/templates/theme/styles/layout/grid.css +78 -0
- package/templates/theme/styles/layout/layout.css +676 -1
- package/templates/theme/styles/layout/patterns.css +0 -155
- package/templates/theme/styles/navigation/nav.css +104 -154
- package/templates/theme/styles/overlays/alert-dialog.css +2 -2
- package/templates/theme/styles/overlays/dialog.css +76 -22
- package/templates/theme/styles/overlays/dropdown.css +108 -31
- package/templates/theme/styles/overlays/hover-card.css +39 -17
- package/templates/theme/styles/overlays/menubar.css +223 -0
- package/templates/theme/styles/overlays/popover.css +69 -23
- package/templates/theme/styles/overlays/toast.css +80 -33
- package/templates/theme/styles/overlays/tooltip.css +88 -14
- package/templates/theme/styles/shell/brand.css +48 -0
- package/templates/theme/styles/shell/footer.css +72 -0
- package/templates/theme/styles/shell/header.css +7 -50
- package/templates/theme/styles/shell/navbar.css +226 -454
- package/templates/theme/styles/shell/sidebar.css +197 -779
- package/templates/theme/tokens.css +145 -98
- package/dist/components/_internal/box-layout.js +0 -116
- package/dist/components/_internal/box-layout.js.map +0 -1
- package/dist/components/_internal/layout.d.ts +0 -9
- package/dist/components/_internal/layout.js +0 -142
- package/dist/components/_internal/layout.js.map +0 -1
- package/dist/components/badge/badge.a11y.d.ts +0 -17
- package/dist/components/block/block.a11y.d.ts +0 -20
- package/dist/components/box/box.a11y.d.ts +0 -14
- package/dist/components/box/box.d.ts +0 -9
- package/dist/components/box/box.js +0 -36
- package/dist/components/box/box.js.map +0 -1
- package/dist/components/box/box.types.d.ts +0 -72
- package/dist/components/box/index.d.ts +0 -3
- package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +0 -17
- package/dist/components/breadcrumb/breadcrumb.a11y.js +0 -15
- package/dist/components/breadcrumb/breadcrumb.a11y.js.map +0 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts +0 -18
- package/dist/components/breadcrumb/breadcrumb.js +0 -113
- package/dist/components/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/components/breadcrumb/breadcrumb.types.d.ts +0 -65
- package/dist/components/breadcrumb/index.d.ts +0 -3
- package/dist/components/container/container.a11y.d.ts +0 -19
- package/dist/components/flex/flex.a11y.d.ts +0 -22
- package/dist/components/flex/flex.d.ts +0 -9
- package/dist/components/flex/flex.js +0 -115
- package/dist/components/flex/flex.js.map +0 -1
- package/dist/components/flex/flex.types.d.ts +0 -42
- package/dist/components/flex/index.d.ts +0 -3
- package/dist/components/header/header.a11y.d.ts +0 -14
- package/dist/components/header/header.a11y.js +0 -12
- package/dist/components/header/header.a11y.js.map +0 -1
- package/dist/components/inline/index.d.ts +0 -8
- package/dist/components/inline/index.js +0 -13
- package/dist/components/inline/index.js.map +0 -1
- package/dist/components/list-group/index.d.ts +0 -2
- package/dist/components/list-group/list-group.d.ts +0 -9
- package/dist/components/list-group/list-group.js +0 -43
- package/dist/components/list-group/list-group.js.map +0 -1
- package/dist/components/list-group/list-group.types.d.ts +0 -32
- package/dist/components/navbar/navbar-panel.js +0 -42
- package/dist/components/navbar/navbar-panel.js.map +0 -1
- package/dist/components/navbar/navbar.context.js +0 -13
- package/dist/components/navbar/navbar.context.js.map +0 -1
- package/dist/components/navbar/navbar.render.js +0 -26
- package/dist/components/navbar/navbar.render.js.map +0 -1
- package/dist/components/navbar/navbar.shared.js +0 -18
- package/dist/components/navbar/navbar.shared.js.map +0 -1
- package/dist/components/pagination/index.d.ts +0 -2
- package/dist/components/pagination/pagination.d.ts +0 -11
- package/dist/components/pagination/pagination.js +0 -95
- package/dist/components/pagination/pagination.js.map +0 -1
- package/dist/components/pagination/pagination.types.d.ts +0 -40
- package/dist/components/section/section.a11y.d.ts +0 -15
- package/dist/components/separator/separator.a11y.d.ts +0 -17
- package/dist/components/separator/separator.a11y.js +0 -15
- package/dist/components/separator/separator.a11y.js.map +0 -1
- package/dist/components/shell/index.d.ts +0 -3
- package/dist/components/shell/shell-nav.types.d.ts +0 -7
- package/dist/components/shell/shell-panel.js +0 -54
- package/dist/components/shell/shell-panel.js.map +0 -1
- package/dist/components/shell/shell-responsive.js +0 -141
- package/dist/components/shell/shell-responsive.js.map +0 -1
- package/dist/components/shell/shell.a11y.d.ts +0 -23
- package/dist/components/shell/shell.a11y.js +0 -23
- package/dist/components/shell/shell.a11y.js.map +0 -1
- package/dist/components/shell/shell.d.ts +0 -13
- package/dist/components/shell/shell.js +0 -69
- package/dist/components/shell/shell.js.map +0 -1
- package/dist/components/shell/shell.types.d.ts +0 -58
- package/dist/components/sidebar/sidebar-panel.d.ts +0 -7
- package/dist/components/sidebar/sidebar-panel.js +0 -49
- package/dist/components/sidebar/sidebar-panel.js.map +0 -1
- package/dist/components/sidebar/sidebar-toggle.d.ts +0 -7
- package/dist/components/sidebar/sidebar-toggle.js +0 -8
- package/dist/components/sidebar/sidebar-toggle.js.map +0 -1
- package/dist/components/sidebar/sidebar.context.js +0 -21
- package/dist/components/sidebar/sidebar.context.js.map +0 -1
- package/dist/components/sidebar/sidebar.shared.js +0 -12
- package/dist/components/sidebar/sidebar.shared.js.map +0 -1
- package/dist/components/skeleton/skeleton.a11y.d.ts +0 -16
- package/dist/components/spacer/index.d.ts +0 -3
- package/dist/components/spacer/spacer.a11y.d.ts +0 -17
- package/dist/components/spacer/spacer.d.ts +0 -8
- package/dist/components/spacer/spacer.js +0 -49
- package/dist/components/spacer/spacer.js.map +0 -1
- package/dist/components/spacer/spacer.types.d.ts +0 -26
- package/dist/components/stack/index.d.ts +0 -3
- package/dist/components/stack/stack.a11y.d.ts +0 -18
- package/dist/components/stack/stack.d.ts +0 -8
- package/dist/components/stack/stack.js +0 -16
- package/dist/components/stack/stack.js.map +0 -1
- package/dist/components/stack/stack.types.d.ts +0 -22
- package/dist/feedback.d.ts +0 -5
- package/dist/feedback.js +0 -4
- package/dist/layouts.d.ts +0 -25
- package/dist/layouts.js +0 -11
- package/dist/shells.d.ts +0 -16
- package/dist/shells.js +0 -11
- package/src/components/_internal/box-layout.ts +0 -164
- package/src/components/_internal/layout.ts +0 -202
- package/src/components/box/box.a11y.ts +0 -11
- package/src/components/box/box.tsx +0 -38
- package/src/components/box/box.types.ts +0 -76
- package/src/components/box/index.ts +0 -11
- package/src/components/breadcrumb/breadcrumb.a11y.ts +0 -15
- package/src/components/breadcrumb/breadcrumb.tsx +0 -123
- package/src/components/breadcrumb/breadcrumb.types.ts +0 -74
- package/src/components/breadcrumb/index.ts +0 -24
- package/src/components/flex/flex.a11y.ts +0 -19
- package/src/components/flex/flex.tsx +0 -162
- package/src/components/flex/flex.types.ts +0 -51
- package/src/components/flex/index.ts +0 -16
- package/src/components/inline/index.tsx +0 -28
- package/src/components/list-group/index.ts +0 -7
- package/src/components/list-group/list-group.tsx +0 -74
- package/src/components/list-group/list-group.types.ts +0 -32
- package/src/components/navbar/navbar-panel.tsx +0 -62
- package/src/components/navbar/navbar.context.ts +0 -22
- package/src/components/navbar/navbar.render.tsx +0 -32
- package/src/components/navbar/navbar.shared.ts +0 -21
- package/src/components/pagination/index.ts +0 -8
- package/src/components/pagination/pagination.tsx +0 -158
- package/src/components/pagination/pagination.types.ts +0 -41
- package/src/components/shell/index.ts +0 -16
- package/src/components/shell/shell-nav.types.ts +0 -3
- package/src/components/shell/shell-panel.tsx +0 -85
- package/src/components/shell/shell-responsive.tsx +0 -262
- package/src/components/shell/shell.a11y.ts +0 -20
- package/src/components/shell/shell.tsx +0 -74
- package/src/components/shell/shell.types.ts +0 -71
- package/src/components/sidebar/sidebar-panel.tsx +0 -67
- package/src/components/sidebar/sidebar-toggle.tsx +0 -5
- package/src/components/sidebar/sidebar.context.ts +0 -40
- package/src/components/sidebar/sidebar.shared.ts +0 -12
- package/src/components/spacer/index.ts +0 -9
- package/src/components/spacer/spacer.a11y.ts +0 -14
- package/src/components/spacer/spacer.tsx +0 -61
- package/src/components/spacer/spacer.types.ts +0 -31
- package/src/components/stack/index.ts +0 -3
- package/src/components/stack/stack.a11y.ts +0 -15
- package/src/components/stack/stack.tsx +0 -13
- package/src/components/stack/stack.types.ts +0 -22
- package/src/feedback.ts +0 -6
- package/src/layouts.ts +0 -19
- package/src/shells.ts +0 -13
- package/src/themes/default/styles/actions/toggle.css +0 -50
- package/src/themes/default/styles/disclosure/collapsible.css +0 -58
- package/src/themes/default/styles/display/list-group.css +0 -84
- package/src/themes/default/styles/forms/form.css +0 -5
- package/src/themes/default/styles/layout/responsive-layout.css +0 -230
- package/src/themes/default/styles/navigation/breadcrumb.css +0 -45
- package/src/themes/default/styles/navigation/menu.css +0 -203
- package/src/themes/default/styles/navigation/menubar.css +0 -255
- package/src/themes/default/styles/navigation/pagination.css +0 -91
- package/src/themes/default/styles/shell/theme.css +0 -37
- package/templates/theme/styles/actions/toggle.css +0 -50
- package/templates/theme/styles/disclosure/collapsible.css +0 -58
- package/templates/theme/styles/display/list-group.css +0 -84
- package/templates/theme/styles/forms/form.css +0 -5
- package/templates/theme/styles/layout/responsive-layout.css +0 -230
- package/templates/theme/styles/navigation/breadcrumb.css +0 -45
- package/templates/theme/styles/navigation/menu.css +0 -203
- package/templates/theme/styles/navigation/menubar.css +0 -255
- package/templates/theme/styles/navigation/pagination.css +0 -91
- package/templates/theme/styles/shell/theme.css +0 -37
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
import { Slot } from "@askrjs/askr/foundations";
|
|
2
|
+
import type { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
+
import { DialogContent } from "@askrjs/ui";
|
|
4
|
+
import { Block } from "./block";
|
|
5
|
+
import { classes } from "./_internal/classes";
|
|
6
|
+
import { mergeProps } from "./_internal/merge-props";
|
|
7
|
+
|
|
8
|
+
type CatalogElement = keyof JSX.IntrinsicElements;
|
|
9
|
+
|
|
10
|
+
export type CatalogComponentProps = Record<string, unknown> & {
|
|
11
|
+
as?: CatalogElement;
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
children?: unknown;
|
|
14
|
+
class?: string;
|
|
15
|
+
ref?: Ref<HTMLElement>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type CatalogDefaults = {
|
|
19
|
+
className?: string;
|
|
20
|
+
element?: CatalogElement;
|
|
21
|
+
role?: string;
|
|
22
|
+
slot: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function catalogPart(props: CatalogComponentProps, defaults: CatalogDefaults): JSX.Element {
|
|
26
|
+
const { as, asChild, children, class: className, ref, ...rest } = props;
|
|
27
|
+
const Element = (as ?? defaults.element ?? "div") as "div";
|
|
28
|
+
const finalProps = mergeProps(rest, {
|
|
29
|
+
ref,
|
|
30
|
+
class: classes(defaults.className, className),
|
|
31
|
+
"data-slot": defaults.slot,
|
|
32
|
+
role: defaults.role,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (asChild) {
|
|
36
|
+
return <Slot asChild {...finalProps} children={children as JSX.Element} />;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return <Element {...finalProps}>{children}</Element>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function buttonPart(props: CatalogComponentProps, slot: string, className?: string): JSX.Element {
|
|
43
|
+
const { children, ref, class: classProp, type = "button", ...rest } = props;
|
|
44
|
+
const finalProps = mergeProps(rest, {
|
|
45
|
+
ref,
|
|
46
|
+
class: classes(className, classProp),
|
|
47
|
+
"data-slot": slot,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<button type={type as "button" | "submit" | "reset"} {...finalProps}>
|
|
52
|
+
{children}
|
|
53
|
+
</button>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function normalizeLegacySpace(value: unknown): unknown {
|
|
58
|
+
if (value === "none") return "0";
|
|
59
|
+
if (value === "1") return "xs";
|
|
60
|
+
if (value === "2") return "xs";
|
|
61
|
+
if (value === "3") return "sm";
|
|
62
|
+
if (value === "4") return "md";
|
|
63
|
+
if (value === "5") return "lg";
|
|
64
|
+
if (value === "6") return "xl";
|
|
65
|
+
if (value === "8") return "2xl";
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function layoutAlias(props: CatalogComponentProps, defaults: Record<string, unknown>): JSX.Element {
|
|
70
|
+
const { gap, p, padding, style, wrap, ...rest } = props as CatalogComponentProps & {
|
|
71
|
+
gap?: unknown;
|
|
72
|
+
p?: unknown;
|
|
73
|
+
padding?: unknown;
|
|
74
|
+
style?: Record<string, unknown>;
|
|
75
|
+
wrap?: boolean | string;
|
|
76
|
+
};
|
|
77
|
+
const BlockComponent = Block as (blockProps: Record<string, unknown>) => JSX.Element;
|
|
78
|
+
const wrapStyle = wrap
|
|
79
|
+
? {
|
|
80
|
+
...style,
|
|
81
|
+
flexWrap: "wrap",
|
|
82
|
+
}
|
|
83
|
+
: style;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<BlockComponent
|
|
87
|
+
{...defaults}
|
|
88
|
+
{...rest}
|
|
89
|
+
gap={normalizeLegacySpace(gap)}
|
|
90
|
+
padding={padding ?? normalizeLegacySpace(p)}
|
|
91
|
+
style={wrapStyle}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function Box(props: CatalogComponentProps): JSX.Element {
|
|
97
|
+
return layoutAlias(props, {});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function Stack(props: CatalogComponentProps): JSX.Element {
|
|
101
|
+
return layoutAlias(props, { direction: "column" });
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function Inline(props: CatalogComponentProps): JSX.Element {
|
|
105
|
+
return layoutAlias(props, { direction: "row" });
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function Shell(props: CatalogComponentProps & { variant?: unknown }): JSX.Element {
|
|
109
|
+
const { variant: _variant, ...rest } = props;
|
|
110
|
+
void _variant;
|
|
111
|
+
return layoutAlias(rest, {});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function ShellNav(props: CatalogComponentProps): JSX.Element {
|
|
115
|
+
return layoutAlias(props, {});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function ShellMain(props: CatalogComponentProps): JSX.Element {
|
|
119
|
+
return layoutAlias(props, { as: "main", grow: true });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function AlertTitle(props: CatalogComponentProps): JSX.Element {
|
|
123
|
+
return catalogPart(props, { slot: "alert-title", element: "h3", className: "alert-title" });
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function AlertDescription(props: CatalogComponentProps): JSX.Element {
|
|
127
|
+
return catalogPart(props, {
|
|
128
|
+
slot: "alert-description",
|
|
129
|
+
element: "p",
|
|
130
|
+
className: "alert-description",
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function Breadcrumb(props: CatalogComponentProps): JSX.Element {
|
|
135
|
+
return catalogPart(props, { slot: "breadcrumb", element: "nav", role: "navigation" });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function BreadcrumbList(props: CatalogComponentProps): JSX.Element {
|
|
139
|
+
return catalogPart(props, { slot: "breadcrumb-list", element: "ol" });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function BreadcrumbItem(props: CatalogComponentProps): JSX.Element {
|
|
143
|
+
return catalogPart(props, { slot: "breadcrumb-item", element: "li" });
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function BreadcrumbLink(props: CatalogComponentProps): JSX.Element {
|
|
147
|
+
return catalogPart(props, { slot: "breadcrumb-link", element: "a" });
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function BreadcrumbPage(props: CatalogComponentProps): JSX.Element {
|
|
151
|
+
return catalogPart(
|
|
152
|
+
{ "aria-current": "page", ...props },
|
|
153
|
+
{
|
|
154
|
+
slot: "breadcrumb-page",
|
|
155
|
+
element: "span",
|
|
156
|
+
},
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function BreadcrumbSeparator(props: CatalogComponentProps): JSX.Element {
|
|
161
|
+
const { children = "/", ...rest } = props;
|
|
162
|
+
return catalogPart(
|
|
163
|
+
{ "aria-hidden": "true", children, ...rest },
|
|
164
|
+
{
|
|
165
|
+
slot: "breadcrumb-separator",
|
|
166
|
+
element: "li",
|
|
167
|
+
},
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function BreadcrumbEllipsis(props: CatalogComponentProps): JSX.Element {
|
|
172
|
+
const { children = "...", ...rest } = props;
|
|
173
|
+
return catalogPart(
|
|
174
|
+
{ "aria-hidden": "true", children, ...rest },
|
|
175
|
+
{
|
|
176
|
+
slot: "breadcrumb-ellipsis",
|
|
177
|
+
element: "span",
|
|
178
|
+
},
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function Calendar(props: CatalogComponentProps): JSX.Element {
|
|
183
|
+
return catalogPart(props, { slot: "calendar" });
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function CalendarHeader(props: CatalogComponentProps): JSX.Element {
|
|
187
|
+
return catalogPart(props, { slot: "calendar-header" });
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function CalendarCaption(props: CatalogComponentProps): JSX.Element {
|
|
191
|
+
return catalogPart(props, { slot: "calendar-caption" });
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function CalendarNav(props: CatalogComponentProps): JSX.Element {
|
|
195
|
+
return catalogPart(props, { slot: "calendar-nav" });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function CalendarPreviousButton(props: CatalogComponentProps): JSX.Element {
|
|
199
|
+
const { children = "Previous month", ...rest } = props;
|
|
200
|
+
return buttonPart(
|
|
201
|
+
{ "aria-label": "Previous month", children, ...rest },
|
|
202
|
+
"calendar-previous",
|
|
203
|
+
"btn btn-icon btn-ghost",
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function CalendarNextButton(props: CatalogComponentProps): JSX.Element {
|
|
208
|
+
const { children = "Next month", ...rest } = props;
|
|
209
|
+
return buttonPart(
|
|
210
|
+
{ "aria-label": "Next month", children, ...rest },
|
|
211
|
+
"calendar-next",
|
|
212
|
+
"btn btn-icon btn-ghost",
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function CalendarGrid(props: CatalogComponentProps): JSX.Element {
|
|
217
|
+
return catalogPart(props, { slot: "calendar-grid", role: "grid" });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function CalendarHead(props: CatalogComponentProps): JSX.Element {
|
|
221
|
+
return catalogPart(props, { slot: "calendar-head", role: "row" });
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function CalendarBody(props: CatalogComponentProps): JSX.Element {
|
|
225
|
+
return catalogPart(props, { slot: "calendar-body" });
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function CalendarRow(props: CatalogComponentProps): JSX.Element {
|
|
229
|
+
return catalogPart(props, { slot: "calendar-row", role: "row" });
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function CalendarCell(props: CatalogComponentProps): JSX.Element {
|
|
233
|
+
return catalogPart(props, { slot: "calendar-cell", role: "gridcell" });
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function CalendarDay(
|
|
237
|
+
props: CatalogComponentProps & {
|
|
238
|
+
disabled?: boolean;
|
|
239
|
+
outside?: boolean;
|
|
240
|
+
rangeEnd?: boolean;
|
|
241
|
+
rangeMiddle?: boolean;
|
|
242
|
+
rangeStart?: boolean;
|
|
243
|
+
selected?: boolean;
|
|
244
|
+
today?: boolean;
|
|
245
|
+
},
|
|
246
|
+
): JSX.Element {
|
|
247
|
+
const { disabled, outside, rangeEnd, rangeMiddle, rangeStart, selected, today, ...rest } = props;
|
|
248
|
+
return buttonPart(
|
|
249
|
+
{
|
|
250
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
251
|
+
"aria-selected": selected ? "true" : undefined,
|
|
252
|
+
"data-disabled": disabled ? "" : undefined,
|
|
253
|
+
"data-outside": outside ? "true" : undefined,
|
|
254
|
+
"data-range-end": rangeEnd ? "true" : undefined,
|
|
255
|
+
"data-range-middle": rangeMiddle ? "true" : undefined,
|
|
256
|
+
"data-range-start": rangeStart ? "true" : undefined,
|
|
257
|
+
"data-selected": selected ? "true" : undefined,
|
|
258
|
+
"data-today": today ? "true" : undefined,
|
|
259
|
+
...rest,
|
|
260
|
+
},
|
|
261
|
+
"calendar-day",
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function Carousel(props: CatalogComponentProps): JSX.Element {
|
|
266
|
+
return catalogPart(props, { slot: "carousel" });
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function CarouselContent(props: CatalogComponentProps): JSX.Element {
|
|
270
|
+
return catalogPart(props, { slot: "carousel-content" });
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export function CarouselItem(props: CatalogComponentProps): JSX.Element {
|
|
274
|
+
return catalogPart(props, { slot: "carousel-item" });
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export function CarouselPrevious(props: CatalogComponentProps): JSX.Element {
|
|
278
|
+
const { children = "Previous", ...rest } = props;
|
|
279
|
+
return buttonPart({ children, ...rest }, "carousel-previous", "btn btn-icon");
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export function CarouselNext(props: CatalogComponentProps): JSX.Element {
|
|
283
|
+
const { children = "Next", ...rest } = props;
|
|
284
|
+
return buttonPart({ children, ...rest }, "carousel-next", "btn btn-icon");
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export function Combobox(props: CatalogComponentProps): JSX.Element {
|
|
288
|
+
return catalogPart(props, { slot: "combobox" });
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function ComboboxInput(props: CatalogComponentProps): JSX.Element {
|
|
292
|
+
const { ref, class: className, ...rest } = props;
|
|
293
|
+
const finalProps = mergeProps(rest, {
|
|
294
|
+
ref,
|
|
295
|
+
class: classes("input", className),
|
|
296
|
+
"data-slot": "combobox-input",
|
|
297
|
+
role: "combobox",
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
return <input {...finalProps} />;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function ComboboxList(props: CatalogComponentProps): JSX.Element {
|
|
304
|
+
return catalogPart(props, { slot: "combobox-list", role: "listbox" });
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export function ComboboxOption(props: CatalogComponentProps): JSX.Element {
|
|
308
|
+
return catalogPart(props, { slot: "combobox-option", role: "option" });
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export function Command(props: CatalogComponentProps): JSX.Element {
|
|
312
|
+
return catalogPart(props, { slot: "command" });
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export function CommandDialog(props: CatalogComponentProps): JSX.Element {
|
|
316
|
+
return catalogPart(props, { slot: "command-dialog" });
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function CommandInput(props: CatalogComponentProps): JSX.Element {
|
|
320
|
+
const { ref, class: className, ...rest } = props;
|
|
321
|
+
const finalProps = mergeProps(rest, {
|
|
322
|
+
ref,
|
|
323
|
+
class: classes("input", className),
|
|
324
|
+
"data-slot": "command-input",
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
return <input {...finalProps} />;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export function CommandHeader(props: CatalogComponentProps): JSX.Element {
|
|
331
|
+
return catalogPart(props, { slot: "command-header" });
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export function CommandList(props: CatalogComponentProps): JSX.Element {
|
|
335
|
+
return catalogPart(props, { slot: "command-list", role: "listbox" });
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function CommandEmpty(props: CatalogComponentProps): JSX.Element {
|
|
339
|
+
return catalogPart(props, { slot: "command-empty" });
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export function CommandGroup(props: CatalogComponentProps): JSX.Element {
|
|
343
|
+
return catalogPart(props, { slot: "command-group", role: "group" });
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export function CommandGroupHeading(props: CatalogComponentProps): JSX.Element {
|
|
347
|
+
return catalogPart(props, { slot: "command-group-heading", element: "div" });
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export function CommandItem(
|
|
351
|
+
props: CatalogComponentProps & { active?: boolean; disabled?: boolean; selected?: boolean },
|
|
352
|
+
): JSX.Element {
|
|
353
|
+
const { active, disabled, selected, ...rest } = props;
|
|
354
|
+
return catalogPart(
|
|
355
|
+
{
|
|
356
|
+
"aria-disabled": disabled ? "true" : undefined,
|
|
357
|
+
"aria-selected": selected || active ? "true" : undefined,
|
|
358
|
+
"data-disabled": disabled ? "" : undefined,
|
|
359
|
+
"data-selected": selected || active ? "true" : undefined,
|
|
360
|
+
...rest,
|
|
361
|
+
},
|
|
362
|
+
{ slot: "command-item", role: "option" },
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export function CommandSeparator(props: CatalogComponentProps): JSX.Element {
|
|
367
|
+
return catalogPart(props, { slot: "command-separator", element: "div", role: "separator" });
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export function CommandShortcut(props: CatalogComponentProps): JSX.Element {
|
|
371
|
+
return catalogPart(props, { slot: "command-shortcut", element: "span" });
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export function DataTable(props: CatalogComponentProps): JSX.Element {
|
|
375
|
+
return catalogPart(props, { slot: "data-table" });
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export function DatePicker(props: CatalogComponentProps): JSX.Element {
|
|
379
|
+
return catalogPart(props, { slot: "date-picker" });
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export function DatePickerInput(props: CatalogComponentProps): JSX.Element {
|
|
383
|
+
const { ref, class: className, type = "date", ...rest } = props;
|
|
384
|
+
const finalProps = mergeProps(rest, {
|
|
385
|
+
ref,
|
|
386
|
+
class: classes("input", className),
|
|
387
|
+
"data-slot": "date-picker-input",
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
return <input type={type as string} {...finalProps} />;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export function Direction(props: CatalogComponentProps & { dir?: "ltr" | "rtl" }): JSX.Element {
|
|
394
|
+
const { dir = "ltr", ...rest } = props;
|
|
395
|
+
return catalogPart({ dir, ...rest }, { slot: "direction" });
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export function Empty(props: CatalogComponentProps): JSX.Element {
|
|
399
|
+
return catalogPart(props, { slot: "empty" });
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function EmptyHeader(props: CatalogComponentProps): JSX.Element {
|
|
403
|
+
return catalogPart(props, { slot: "empty-header" });
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export function EmptyTitle(props: CatalogComponentProps): JSX.Element {
|
|
407
|
+
return catalogPart(props, { slot: "empty-title", element: "h3" });
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export function EmptyDescription(props: CatalogComponentProps): JSX.Element {
|
|
411
|
+
return catalogPart(props, { slot: "empty-description", element: "p" });
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export function EmptyContent(props: CatalogComponentProps): JSX.Element {
|
|
415
|
+
return catalogPart(props, { slot: "empty-content" });
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export function EmptyMedia(props: CatalogComponentProps): JSX.Element {
|
|
419
|
+
return catalogPart(props, { slot: "empty-media" });
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export function FieldGroup(props: CatalogComponentProps): JSX.Element {
|
|
423
|
+
return catalogPart(props, { slot: "field-group" });
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export function FieldSet(props: CatalogComponentProps): JSX.Element {
|
|
427
|
+
return catalogPart(props, { slot: "field-set", element: "fieldset" });
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export function FieldLegend(props: CatalogComponentProps): JSX.Element {
|
|
431
|
+
return catalogPart(props, { slot: "field-legend", element: "legend" });
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
export function FieldLabel(props: CatalogComponentProps): JSX.Element {
|
|
435
|
+
return catalogPart(props, { slot: "field-label", element: "label", className: "label" });
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export function FieldDescription(props: CatalogComponentProps): JSX.Element {
|
|
439
|
+
return catalogPart(props, { slot: "field-description", element: "p", className: "field-hint" });
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export function FieldContent(props: CatalogComponentProps): JSX.Element {
|
|
443
|
+
return catalogPart(props, { slot: "field-content" });
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export function FieldTitle(props: CatalogComponentProps): JSX.Element {
|
|
447
|
+
return catalogPart(props, { slot: "field-title", element: "div" });
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export function FieldSeparator(props: CatalogComponentProps): JSX.Element {
|
|
451
|
+
return catalogPart(props, { slot: "field-separator", role: "separator" });
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export function InputOTP(props: CatalogComponentProps): JSX.Element {
|
|
455
|
+
return catalogPart(props, { slot: "input-otp", role: "group" });
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function InputOTPGroup(props: CatalogComponentProps): JSX.Element {
|
|
459
|
+
return catalogPart(props, { slot: "input-otp-group", role: "group" });
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export function InputOTPSlot(props: CatalogComponentProps): JSX.Element {
|
|
463
|
+
return catalogPart(props, { slot: "input-otp-slot", element: "span" });
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export function InputOTPSeparator(props: CatalogComponentProps): JSX.Element {
|
|
467
|
+
const { children = "-", ...rest } = props;
|
|
468
|
+
return catalogPart(
|
|
469
|
+
{ "aria-hidden": "true", children, ...rest },
|
|
470
|
+
{
|
|
471
|
+
slot: "input-otp-separator",
|
|
472
|
+
element: "span",
|
|
473
|
+
},
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export function Item(
|
|
478
|
+
props: CatalogComponentProps & {
|
|
479
|
+
active?: boolean;
|
|
480
|
+
size?: "default" | "sm" | "xs";
|
|
481
|
+
variant?: "default" | "outline" | "muted";
|
|
482
|
+
},
|
|
483
|
+
): JSX.Element {
|
|
484
|
+
const { active, size, variant, ...rest } = props;
|
|
485
|
+
return catalogPart(
|
|
486
|
+
{
|
|
487
|
+
"data-active": active ? "true" : undefined,
|
|
488
|
+
"data-size": size && size !== "default" ? size : undefined,
|
|
489
|
+
"data-variant": variant && variant !== "default" ? variant : undefined,
|
|
490
|
+
...rest,
|
|
491
|
+
},
|
|
492
|
+
{ slot: "item" },
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export function ItemGroup(props: CatalogComponentProps): JSX.Element {
|
|
497
|
+
return catalogPart(props, { slot: "item-group" });
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export function ItemHeader(props: CatalogComponentProps): JSX.Element {
|
|
501
|
+
return catalogPart(props, { slot: "item-header" });
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
export function ItemMedia(props: CatalogComponentProps): JSX.Element {
|
|
505
|
+
return catalogPart(props, { slot: "item-media" });
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export function ItemContent(props: CatalogComponentProps): JSX.Element {
|
|
509
|
+
return catalogPart(props, { slot: "item-content" });
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export function ItemTitle(props: CatalogComponentProps): JSX.Element {
|
|
513
|
+
return catalogPart(props, { slot: "item-title" });
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export function ItemDescription(props: CatalogComponentProps): JSX.Element {
|
|
517
|
+
return catalogPart(props, { slot: "item-description" });
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export function ItemActions(props: CatalogComponentProps): JSX.Element {
|
|
521
|
+
return catalogPart(props, { slot: "item-actions" });
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
export function ItemFooter(props: CatalogComponentProps): JSX.Element {
|
|
525
|
+
return catalogPart(props, { slot: "item-footer" });
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export function Kbd(props: CatalogComponentProps): JSX.Element {
|
|
529
|
+
return catalogPart(props, { slot: "kbd", element: "kbd" });
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export function NativeSelect(props: CatalogComponentProps): JSX.Element {
|
|
533
|
+
const { children, ref, class: className, ...rest } = props;
|
|
534
|
+
const finalProps = mergeProps(rest, {
|
|
535
|
+
ref,
|
|
536
|
+
class: classes("input", className),
|
|
537
|
+
"data-slot": "native-select",
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
return <select {...finalProps}>{children}</select>;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export function NavigationMenu(props: CatalogComponentProps): JSX.Element {
|
|
544
|
+
return catalogPart(props, { slot: "navigation-menu", element: "nav" });
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export function NavigationMenuList(props: CatalogComponentProps): JSX.Element {
|
|
548
|
+
return catalogPart(props, { slot: "navigation-menu-list", element: "ul" });
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export function NavigationMenuItem(props: CatalogComponentProps): JSX.Element {
|
|
552
|
+
return catalogPart(props, { slot: "navigation-menu-item", element: "li" });
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
export function NavigationMenuTrigger(props: CatalogComponentProps): JSX.Element {
|
|
556
|
+
return buttonPart(props, "navigation-menu-trigger", "nav-item");
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export function NavigationMenuContent(props: CatalogComponentProps): JSX.Element {
|
|
560
|
+
return catalogPart(props, { slot: "navigation-menu-content" });
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export function NavigationMenuLink(props: CatalogComponentProps): JSX.Element {
|
|
564
|
+
return catalogPart(props, { slot: "navigation-menu-link", element: "a" });
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
export function NavigationMenuViewport(props: CatalogComponentProps): JSX.Element {
|
|
568
|
+
return catalogPart(props, { slot: "navigation-menu-viewport" });
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
export function NavigationMenuIndicator(props: CatalogComponentProps): JSX.Element {
|
|
572
|
+
return catalogPart(props, { slot: "navigation-menu-indicator" });
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export function Pagination(props: CatalogComponentProps): JSX.Element {
|
|
576
|
+
return catalogPart(props, { slot: "pagination", element: "nav", role: "navigation" });
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export function PaginationContent(props: CatalogComponentProps): JSX.Element {
|
|
580
|
+
return catalogPart(props, { slot: "pagination-content", element: "ul" });
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export function PaginationItem(props: CatalogComponentProps): JSX.Element {
|
|
584
|
+
return catalogPart(props, { slot: "pagination-item", element: "li" });
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export function PaginationLink(props: CatalogComponentProps & { active?: boolean }): JSX.Element {
|
|
588
|
+
const { active, ...rest } = props;
|
|
589
|
+
return catalogPart(
|
|
590
|
+
{
|
|
591
|
+
"aria-current": active ? "page" : undefined,
|
|
592
|
+
"data-active": active ? "true" : undefined,
|
|
593
|
+
...rest,
|
|
594
|
+
},
|
|
595
|
+
{ slot: "pagination-link", element: "a" },
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
export function PaginationPrevious(props: CatalogComponentProps): JSX.Element {
|
|
600
|
+
const { children = "Previous", ...rest } = props;
|
|
601
|
+
return catalogPart({ children, ...rest }, { slot: "pagination-previous", element: "a" });
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export function PaginationNext(props: CatalogComponentProps): JSX.Element {
|
|
605
|
+
const { children = "Next", ...rest } = props;
|
|
606
|
+
return catalogPart({ children, ...rest }, { slot: "pagination-next", element: "a" });
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export function PaginationEllipsis(props: CatalogComponentProps): JSX.Element {
|
|
610
|
+
const { children = "...", ...rest } = props;
|
|
611
|
+
return catalogPart(
|
|
612
|
+
{ "aria-hidden": "true", children, ...rest },
|
|
613
|
+
{
|
|
614
|
+
slot: "pagination-ellipsis",
|
|
615
|
+
element: "span",
|
|
616
|
+
},
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export function ResizablePanelGroup(props: CatalogComponentProps): JSX.Element {
|
|
621
|
+
return catalogPart(props, { slot: "resizable-panel-group" });
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export function ResizablePanel(props: CatalogComponentProps): JSX.Element {
|
|
625
|
+
return catalogPart(props, { slot: "resizable-panel" });
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export function ResizableHandle(props: CatalogComponentProps): JSX.Element {
|
|
629
|
+
return catalogPart(props, { slot: "resizable-handle", role: "separator" });
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export function TabsList(props: CatalogComponentProps): JSX.Element {
|
|
633
|
+
return catalogPart(props, { slot: "tabs-list", role: "tablist" });
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
export function TabsTrigger(props: CatalogComponentProps): JSX.Element {
|
|
637
|
+
return buttonPart(props, "tabs-trigger", "tab");
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export function TabsContent(props: CatalogComponentProps): JSX.Element {
|
|
641
|
+
return catalogPart(props, { slot: "tabs-content", role: "tabpanel" });
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
export function SheetContent(
|
|
645
|
+
props: CatalogComponentProps & {
|
|
646
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
647
|
+
},
|
|
648
|
+
): JSX.Element {
|
|
649
|
+
const { side = "right", ...rest } = props;
|
|
650
|
+
return <DialogContent {...rest} data-side={side} data-slot="sheet-content" />;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export function SheetHeader(props: CatalogComponentProps): JSX.Element {
|
|
654
|
+
return catalogPart(props, { slot: "sheet-header" });
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export function SheetFooter(props: CatalogComponentProps): JSX.Element {
|
|
658
|
+
return catalogPart(props, { slot: "sheet-footer" });
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export function SheetTitle(props: CatalogComponentProps): JSX.Element {
|
|
662
|
+
return catalogPart(props, { slot: "sheet-title", element: "h2" });
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export function SheetDescription(props: CatalogComponentProps): JSX.Element {
|
|
666
|
+
return catalogPart(props, { slot: "sheet-description", element: "p" });
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
export function Toaster(props: CatalogComponentProps): JSX.Element {
|
|
670
|
+
return catalogPart(props, { slot: "sonner" });
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export const Sonner = Toaster;
|
|
674
|
+
|
|
675
|
+
export function Typography(props: CatalogComponentProps): JSX.Element {
|
|
676
|
+
return catalogPart(props, { slot: "typography" });
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export function TypographyH1(props: CatalogComponentProps): JSX.Element {
|
|
680
|
+
return catalogPart(props, { slot: "typography-h1", element: "h1" });
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export function TypographyH2(props: CatalogComponentProps): JSX.Element {
|
|
684
|
+
return catalogPart(props, { slot: "typography-h2", element: "h2" });
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export function TypographyH3(props: CatalogComponentProps): JSX.Element {
|
|
688
|
+
return catalogPart(props, { slot: "typography-h3", element: "h3" });
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
export function TypographyH4(props: CatalogComponentProps): JSX.Element {
|
|
692
|
+
return catalogPart(props, { slot: "typography-h4", element: "h4" });
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export function TypographyP(props: CatalogComponentProps): JSX.Element {
|
|
696
|
+
return catalogPart(props, { slot: "typography-p", element: "p" });
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export function TypographyBlockquote(props: CatalogComponentProps): JSX.Element {
|
|
700
|
+
return catalogPart(props, { slot: "typography-blockquote", element: "blockquote" });
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export function TypographyList(props: CatalogComponentProps): JSX.Element {
|
|
704
|
+
return catalogPart(props, { slot: "typography-list", element: "ul" });
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
export function TypographyLead(props: CatalogComponentProps): JSX.Element {
|
|
708
|
+
return catalogPart(props, { slot: "typography-lead", element: "p" });
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
export function TypographyMuted(props: CatalogComponentProps): JSX.Element {
|
|
712
|
+
return catalogPart(props, { slot: "typography-muted", element: "p" });
|
|
713
|
+
}
|