@askrjs/themes 0.0.8 → 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/_internal/jsx.js.map +1 -1
- package/dist/components/_internal/style.js +25 -1
- package/dist/components/_internal/style.js.map +1 -1
- 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 +102 -198
- 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 -211
- 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 +97 -18
- 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 +3691 -3959
- package/package.json +239 -73
- package/src/components/_internal/block-layout.ts +354 -0
- package/src/components/_internal/jsx.ts +18 -6
- package/src/components/_internal/style.ts +42 -4
- 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 +104 -251
- 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 +145 -317
- 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 +163 -21
- 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/avatar.css +7 -1
- package/src/themes/default/styles/display/badge.css +10 -10
- 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 +39 -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 +33 -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 -453
- 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/avatar.css +7 -1
- package/templates/theme/styles/display/badge.css +10 -10
- 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 +39 -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 +33 -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 -453
- 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 -147
- 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 -118
- 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 -211
- 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 -246
- 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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flex.js","names":[],"sources":["../../../src/components/flex/flex.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutClass,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveAlignValue,\n resolveJustifyValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { FlexAsChildProps, FlexDivProps, FlexSpanProps } from \"./flex.types\";\n\nconst SPACE_TOKENS = new Set([\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"2xl\",\n \"3xl\",\n]);\n\nfunction isResponsiveObject(value: unknown): boolean {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction isCssCoveredSpaceValue(value: unknown): value is string {\n return typeof value === \"string\" && SPACE_TOKENS.has(value.trim());\n}\n\nfunction isCssCoveredDirectionValue(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n [\"row\", \"column\", \"row-reverse\", \"column-reverse\"].includes(value.trim())\n );\n}\n\nfunction isCssCoveredAlignValue(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n [\"start\", \"end\", \"center\", \"stretch\", \"baseline\"].includes(value.trim())\n );\n}\n\nfunction isCssCoveredJustifyValue(value: unknown): value is string {\n return typeof value === \"string\" && [\"start\", \"end\", \"center\", \"between\"].includes(value.trim());\n}\n\nfunction isCssCoveredWrapValue(value: unknown): value is string {\n return typeof value === \"string\" && [\"wrap\", \"nowrap\", \"wrap-reverse\"].includes(value.trim());\n}\n\nfunction serializeStaticThemeValue<T>(\n value: T | Partial<Record<\"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\", T>> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (isResponsiveValue(value)) return undefined;\n return serializeResponsiveValueIf(value, predicate);\n}\n\nconst SLOTS = {\n root: \"flex\",\n} as const;\n\nexport function Flex(props: FlexDivProps): JSX.Element;\nexport function Flex(props: FlexSpanProps): JSX.Element;\nexport function Flex(props: FlexAsChildProps): JSX.Element;\nexport function Flex(props: FlexDivProps | FlexSpanProps | FlexAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const {\n asChild,\n children,\n direction = \"row\",\n gap,\n gapX,\n gapY,\n align,\n justify,\n wrap,\n collapseBelow,\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const rootSlot =\n typeof (passthroughProps as Record<string, unknown>)[\"data-slot\"] === \"string\"\n ? String((passthroughProps as Record<string, unknown>)[\"data-slot\"])\n : SLOTS.root;\n const layoutStyle: Record<string, string | number> = {};\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n if (boxProps.display !== undefined) {\n setResponsiveStyleVar(layoutStyle, \"display\", boxProps.display, (value) => value);\n }\n if (\n direction !== \"row\" &&\n (!isCssCoveredDirectionValue(direction) || isResponsiveObject(direction))\n ) {\n setResponsiveStyleVar(layoutStyle, \"flex-direction\", direction, (value) => value);\n }\n if (!isCssCoveredSpaceValue(gap) || isResponsiveObject(gap)) {\n setResponsiveStyleVar(layoutStyle, \"gap\", gap, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapX) || isResponsiveObject(gapX)) {\n setResponsiveStyleVar(layoutStyle, \"column-gap\", gapX, resolveSpaceValue);\n }\n if (!isCssCoveredSpaceValue(gapY) || isResponsiveObject(gapY)) {\n setResponsiveStyleVar(layoutStyle, \"row-gap\", gapY, resolveSpaceValue);\n }\n if (!isCssCoveredAlignValue(align) || isResponsiveObject(align)) {\n setResponsiveStyleVar(layoutStyle, \"align-items\", align, resolveAlignValue);\n }\n if (!isCssCoveredJustifyValue(justify) || isResponsiveObject(justify)) {\n setResponsiveStyleVar(layoutStyle, \"justify-content\", justify, resolveJustifyValue);\n }\n if (!isCssCoveredWrapValue(wrap) || isResponsiveObject(wrap)) {\n setResponsiveStyleVar(layoutStyle, \"flex-wrap\", wrap, (value) => value);\n }\n\n const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": rootSlot,\n \"data-ak-layout\": \"true\",\n \"data-direction\": serializeStaticThemeValue(direction, isCssCoveredDirectionValue),\n \"data-gap\": serializeStaticThemeValue(gap, isCssCoveredSpaceValue),\n \"data-gap-x\": serializeStaticThemeValue(gapX, isCssCoveredSpaceValue),\n \"data-gap-y\": serializeStaticThemeValue(gapY, isCssCoveredSpaceValue),\n \"data-align\": serializeStaticThemeValue(align, isCssCoveredAlignValue),\n \"data-justify\": serializeStaticThemeValue(justify, isCssCoveredJustifyValue),\n \"data-wrap\": serializeStaticThemeValue(wrap, isCssCoveredWrapValue),\n \"data-collapse-below\": collapseBelow,\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children as JSX.Element} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{children}</span>;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAiBA,MAAM,eAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,SAAS,mBAAmB,OAAyB;CACnD,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,uBAAuB,OAAiC;CAC/D,OAAO,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,KAAK,CAAC;AACnE;AAEA,SAAS,2BAA2B,OAAiC;CACnE,OACE,OAAO,UAAU,YACjB;EAAC;EAAO;EAAU;EAAe;CAAgB,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC;AAE5E;AAEA,SAAS,uBAAuB,OAAiC;CAC/D,OACE,OAAO,UAAU,YACjB;EAAC;EAAS;EAAO;EAAU;EAAW;CAAU,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC;AAE3E;AAEA,SAAS,yBAAyB,OAAiC;CACjE,OAAO,OAAO,UAAU,YAAY;EAAC;EAAS;EAAO;EAAU;CAAS,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC;AACjG;AAEA,SAAS,sBAAsB,OAAiC;CAC9D,OAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;CAAc,CAAC,CAAC,SAAS,MAAM,KAAK,CAAC;AAC9F;AAEA,SAAS,0BACP,OACA,WACoB;CACpB,IAAI,kBAAkB,KAAK,GAAG,OAAO,KAAA;CACrC,OAAO,2BAA2B,OAAO,SAAS;AACpD;AAEA,MAAM,QAAQ,EACZ,MAAM,OACR;AAKA,SAAgB,KAAK,OAAwD;CAC3E,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;CACtC,MAAM,EACJ,SACA,UACA,YAAY,OACZ,KACA,MACA,MACA,OACA,SACA,MACA,eACA,KACA,OAAO,WACP,GAAG,SACD;CAEJ,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,IAAI;CACrE,MAAM,WACJ,OAAQ,iBAA6C,iBAAiB,WAClE,OAAQ,iBAA6C,YAAY,IACjE,MAAM;CACZ,MAAM,cAA+C,CAAC;CACtD,qBAAqB,aAAa,QAAQ;CAE1C,IAAI,SAAS,YAAY,KAAA,GACvB,sBAAsB,aAAa,WAAW,SAAS,UAAU,UAAU,KAAK;CAElF,IACE,cAAc,UACb,CAAC,2BAA2B,SAAS,KAAK,mBAAmB,SAAS,IAEvE,sBAAsB,aAAa,kBAAkB,YAAY,UAAU,KAAK;CAElF,IAAI,CAAC,uBAAuB,GAAG,KAAK,mBAAmB,GAAG,GACxD,sBAAsB,aAAa,OAAO,KAAK,iBAAiB;CAElE,IAAI,CAAC,uBAAuB,IAAI,KAAK,mBAAmB,IAAI,GAC1D,sBAAsB,aAAa,cAAc,MAAM,iBAAiB;CAE1E,IAAI,CAAC,uBAAuB,IAAI,KAAK,mBAAmB,IAAI,GAC1D,sBAAsB,aAAa,WAAW,MAAM,iBAAiB;CAEvE,IAAI,CAAC,uBAAuB,KAAK,KAAK,mBAAmB,KAAK,GAC5D,sBAAsB,aAAa,eAAe,OAAO,iBAAiB;CAE5E,IAAI,CAAC,yBAAyB,OAAO,KAAK,mBAAmB,OAAO,GAClE,sBAAsB,aAAa,mBAAmB,SAAS,mBAAmB;CAEpF,IAAI,CAAC,sBAAsB,IAAI,KAAK,mBAAmB,IAAI,GACzD,sBAAsB,aAAa,aAAa,OAAO,UAAU,KAAK;CAGxE,MAAM,cAAc,mBAAmB,aAAa,SAAS;CAE7D,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,kBAAkB,0BAA0B,WAAW,0BAA0B;EACjF,YAAY,0BAA0B,KAAK,sBAAsB;EACjE,cAAc,0BAA0B,MAAM,sBAAsB;EACpE,cAAc,0BAA0B,MAAM,sBAAsB;EACpE,cAAc,0BAA0B,OAAO,sBAAsB;EACrE,gBAAgB,0BAA0B,SAAS,wBAAwB;EAC3E,aAAa,0BAA0B,MAAM,qBAAqB;EAClE,uBAAuB;EACvB,GAAI,cAAc,EAAE,OAAO,YAAY,IAAI,CAAC;CAC9C,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAA0B,CAAA;CAG3E,IAAI,OAAO,QACT,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;CAAe,CAAA;CAG/C,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;CAAc,CAAA;AAC7C"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types.js";
|
|
2
|
-
import { JSXElement } from "@askrjs/askr/foundations";
|
|
3
|
-
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
4
|
-
|
|
5
|
-
//#region src/components/flex/flex.types.d.ts
|
|
6
|
-
type FlexOwnProps = BoxLayoutOwnProps & {
|
|
7
|
-
direction?: LayoutResponsive<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
8
|
-
gap?: LayoutResponsive<string | number>;
|
|
9
|
-
gapX?: LayoutResponsive<string | number>;
|
|
10
|
-
gapY?: LayoutResponsive<string | number>;
|
|
11
|
-
align?: LayoutResponsive<string>;
|
|
12
|
-
justify?: LayoutResponsive<string>;
|
|
13
|
-
wrap?: LayoutResponsive<"wrap" | "nowrap" | "wrap-reverse">;
|
|
14
|
-
/**
|
|
15
|
-
* Compatibility breakpoint helper. Prefer responsive `direction` instead.
|
|
16
|
-
*/
|
|
17
|
-
collapseBelow?: string;
|
|
18
|
-
as?: "div" | "span";
|
|
19
|
-
children?: unknown;
|
|
20
|
-
};
|
|
21
|
-
type FlexNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & FlexOwnProps & {
|
|
22
|
-
as?: "div";
|
|
23
|
-
asChild?: false;
|
|
24
|
-
ref?: Ref<HTMLDivElement>;
|
|
25
|
-
};
|
|
26
|
-
type FlexSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & FlexOwnProps & {
|
|
27
|
-
as: "span";
|
|
28
|
-
asChild?: false;
|
|
29
|
-
ref?: Ref<HTMLSpanElement>;
|
|
30
|
-
};
|
|
31
|
-
type FlexAsChildProps = Omit<FlexOwnProps, "as"> & {
|
|
32
|
-
asChild: true;
|
|
33
|
-
children: JSXElement;
|
|
34
|
-
ref?: Ref<unknown>;
|
|
35
|
-
style?: JSX.IntrinsicElements["div"]["style"];
|
|
36
|
-
};
|
|
37
|
-
type FlexDivProps = FlexNativeProps;
|
|
38
|
-
type FlexProps = FlexDivProps | FlexSpanProps | FlexAsChildProps;
|
|
39
|
-
type InlineProps = FlexProps;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps };
|
|
42
|
-
//# sourceMappingURL=flex.types.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/components/header/header.a11y.d.ts
|
|
2
|
-
declare const HEADER_A11Y_CONTRACT: {
|
|
3
|
-
readonly DATA_ATTRIBUTES: {
|
|
4
|
-
readonly slot: "data-slot";
|
|
5
|
-
readonly position: "data-position";
|
|
6
|
-
};
|
|
7
|
-
readonly SLOT_VALUES: {
|
|
8
|
-
readonly root: "header";
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { HEADER_A11Y_CONTRACT, HeaderA11yContract };
|
|
14
|
-
//# sourceMappingURL=header.a11y.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region src/components/header/header.a11y.ts
|
|
2
|
-
const HEADER_A11Y_CONTRACT = {
|
|
3
|
-
DATA_ATTRIBUTES: {
|
|
4
|
-
slot: "data-slot",
|
|
5
|
-
position: "data-position"
|
|
6
|
-
},
|
|
7
|
-
SLOT_VALUES: { root: "header" }
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { HEADER_A11Y_CONTRACT };
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=header.a11y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.a11y.js","names":[],"sources":["../../../src/components/header/header.a11y.ts"],"sourcesContent":["export const HEADER_A11Y_CONTRACT = {\n DATA_ATTRIBUTES: {\n slot: \"data-slot\" as const,\n position: \"data-position\" as const,\n },\n SLOT_VALUES: {\n root: \"header\" as const,\n },\n} as const;\n\nexport type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;\n"],"mappings":";AAAA,MAAa,uBAAuB;CAClC,iBAAiB;EACf,MAAM;EACN,UAAU;CACZ;CACA,aAAa,EACX,MAAM,SACR;AACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FlexAsChildProps, FlexDivProps, FlexNativeProps, FlexOwnProps, FlexProps, FlexSpanProps, InlineProps } from "../flex/flex.types.js";
|
|
2
|
-
import { Flex } from "../flex/flex.js";
|
|
3
|
-
import { FLEX_A11Y_CONTRACT, FlexA11yContract } from "../flex/flex.a11y.js";
|
|
4
|
-
//#region src/components/inline/index.d.ts
|
|
5
|
-
declare function Inline(props: InlineProps): JSX.Element;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { Inline };
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Flex } from "../flex/flex.js";
|
|
2
|
-
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
|
-
//#region src/components/inline/index.tsx
|
|
4
|
-
function Inline(props) {
|
|
5
|
-
return /* @__PURE__ */ jsx(Flex, {
|
|
6
|
-
...props,
|
|
7
|
-
"data-slot": "inline"
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Inline };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/inline/index.tsx"],"sourcesContent":["import { Flex } from \"../flex\";\nimport type { InlineProps } from \"../flex\";\n\nexport function Inline(props: InlineProps): JSX.Element {\n return <Flex {...(props as Record<string, unknown>)} data-slot=\"inline\" />;\n}\n\nexport { Flex };\nexport {\n FLEX_A11Y_CONTRACT,\n FLEX_A11Y_CONTRACT as INLINE_A11Y_CONTRACT,\n type FlexA11yContract,\n type FlexA11yContract as InlineA11yContract,\n} from \"../flex/flex.a11y\";\nexport type {\n FlexProps,\n FlexOwnProps,\n FlexNativeProps,\n FlexDivProps,\n FlexSpanProps,\n FlexAsChildProps,\n FlexProps as InlineProps,\n FlexOwnProps as InlineOwnProps,\n FlexNativeProps as InlineNativeProps,\n FlexDivProps as InlineDivProps,\n FlexSpanProps as InlineSpanProps,\n FlexAsChildProps as InlineAsChildProps,\n} from \"../flex/flex.types\";\n"],"mappings":";;;AAGA,SAAgB,OAAO,OAAiC;CACtD,OAAO,oBAAC,MAAD;EAAM,GAAK;EAAmC,aAAU;CAAU,CAAA;AAC3E"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ListGroupItemAsChildProps, ListGroupItemProps, ListGroupProps } from "./list-group.types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/components/list-group/list-group.d.ts
|
|
4
|
-
declare function ListGroup(props: ListGroupProps): JSX.Element;
|
|
5
|
-
declare function ListGroupItem(props: ListGroupItemProps): JSX.Element;
|
|
6
|
-
declare function ListGroupItem(props: ListGroupItemAsChildProps): JSX.Element;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { ListGroup, ListGroupItem };
|
|
9
|
-
//# sourceMappingURL=list-group.d.ts.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { classes } from "../_internal/classes.js";
|
|
2
|
-
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
|
-
import { Slot } from "@askrjs/askr/foundations";
|
|
4
|
-
import { mergeProps } from "@askrjs/askr/foundations/utilities";
|
|
5
|
-
//#region src/components/list-group/list-group.tsx
|
|
6
|
-
function ListGroup(props) {
|
|
7
|
-
const { children, class: className, flush = false, orientation = "vertical", ref, ...rest } = props;
|
|
8
|
-
return /* @__PURE__ */ jsx("ul", {
|
|
9
|
-
...rest,
|
|
10
|
-
ref,
|
|
11
|
-
class: classes("list-group", flush ? "list-group-flush" : void 0, orientation === "horizontal" ? "list-group-horizontal" : void 0, className),
|
|
12
|
-
"data-flush": flush ? "true" : "false",
|
|
13
|
-
"data-orientation": orientation,
|
|
14
|
-
"data-slot": "list-group",
|
|
15
|
-
children
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function ListGroupItem(props) {
|
|
19
|
-
const { action = false, active = false, asChild, children, disabled = false, ref, class: className, ...rest } = props;
|
|
20
|
-
const finalProps = mergeProps(rest, {
|
|
21
|
-
class: classes("list-group-item", action ? "list-group-item-action" : void 0, active ? "active" : void 0, disabled ? "disabled" : void 0, className),
|
|
22
|
-
ref,
|
|
23
|
-
"aria-current": active ? "page" : void 0,
|
|
24
|
-
"aria-disabled": disabled ? "true" : void 0,
|
|
25
|
-
"data-action": action ? "true" : void 0,
|
|
26
|
-
"data-active": active ? "true" : void 0,
|
|
27
|
-
"data-disabled": disabled ? "true" : void 0,
|
|
28
|
-
"data-slot": "list-group-item"
|
|
29
|
-
});
|
|
30
|
-
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
31
|
-
asChild: true,
|
|
32
|
-
...finalProps,
|
|
33
|
-
children
|
|
34
|
-
});
|
|
35
|
-
return /* @__PURE__ */ jsx("li", {
|
|
36
|
-
...finalProps,
|
|
37
|
-
children
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { ListGroup, ListGroupItem };
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=list-group.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-group.js","names":[],"sources":["../../../src/components/list-group/list-group.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"@askrjs/askr/foundations/utilities\";\nimport { classes } from \"../_internal/classes\";\nimport type {\n ListGroupItemAsChildProps,\n ListGroupItemProps,\n ListGroupProps,\n} from \"./list-group.types\";\n\nexport function ListGroup(props: ListGroupProps): JSX.Element {\n const {\n children,\n class: className,\n flush = false,\n orientation = \"vertical\",\n ref,\n ...rest\n } = props;\n\n return (\n <ul\n {...rest}\n ref={ref}\n class={classes(\n \"list-group\",\n flush ? \"list-group-flush\" : undefined,\n orientation === \"horizontal\" ? \"list-group-horizontal\" : undefined,\n className,\n )}\n data-flush={flush ? \"true\" : \"false\"}\n data-orientation={orientation}\n data-slot=\"list-group\"\n >\n {children}\n </ul>\n );\n}\n\nexport function ListGroupItem(props: ListGroupItemProps): JSX.Element;\nexport function ListGroupItem(props: ListGroupItemAsChildProps): JSX.Element;\nexport function ListGroupItem(props: ListGroupItemProps | ListGroupItemAsChildProps): JSX.Element {\n const {\n action = false,\n active = false,\n asChild,\n children,\n disabled = false,\n ref,\n class: className,\n ...rest\n } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\n \"list-group-item\",\n action ? \"list-group-item-action\" : undefined,\n active ? \"active\" : undefined,\n disabled ? \"disabled\" : undefined,\n className,\n ),\n ref,\n \"aria-current\": active ? \"page\" : undefined,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-action\": action ? \"true\" : undefined,\n \"data-active\": active ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"true\" : undefined,\n \"data-slot\": \"list-group-item\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <li {...finalProps}>{children}</li>;\n}\n"],"mappings":";;;;;AASA,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EACJ,UACA,OAAO,WACP,QAAQ,OACR,cAAc,YACd,KACA,GAAG,SACD;CAEJ,OACE,oBAAC,MAAD;EACE,GAAI;EACC;EACL,OAAO,QACL,cACA,QAAQ,qBAAqB,KAAA,GAC7B,gBAAgB,eAAe,0BAA0B,KAAA,GACzD,SACF;EACA,cAAY,QAAQ,SAAS;EAC7B,oBAAkB;EAClB,aAAU;EAET;CACC,CAAA;AAER;AAIA,SAAgB,cAAc,OAAoE;CAChG,MAAM,EACJ,SAAS,OACT,SAAS,OACT,SACA,UACA,WAAW,OACX,KACA,OAAO,WACP,GAAG,SACD;CACJ,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QACL,mBACA,SAAS,2BAA2B,KAAA,GACpC,SAAS,WAAW,KAAA,GACpB,WAAW,aAAa,KAAA,GACxB,SACF;EACA;EACA,gBAAgB,SAAS,SAAS,KAAA;EAClC,iBAAiB,WAAW,SAAS,KAAA;EACrC,eAAe,SAAS,SAAS,KAAA;EACjC,eAAe,SAAS,SAAS,KAAA;EACjC,iBAAiB,WAAW,SAAS,KAAA;EACrC,aAAa;CACf,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;CAAa,CAAA;AAC3C"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { JSXElement } from "@askrjs/askr/foundations";
|
|
2
|
-
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
-
|
|
4
|
-
//#region src/components/list-group/list-group.types.d.ts
|
|
5
|
-
type ListGroupOrientation = "vertical" | "horizontal";
|
|
6
|
-
type UlProps = Omit<JSX.IntrinsicElements["ul"], "children" | "ref">;
|
|
7
|
-
type LiProps = Omit<JSX.IntrinsicElements["li"], "children" | "ref">;
|
|
8
|
-
type ListGroupProps = UlProps & {
|
|
9
|
-
children?: unknown;
|
|
10
|
-
flush?: boolean;
|
|
11
|
-
orientation?: ListGroupOrientation;
|
|
12
|
-
ref?: Ref<HTMLUListElement>;
|
|
13
|
-
};
|
|
14
|
-
type ListGroupItemProps = LiProps & {
|
|
15
|
-
action?: boolean;
|
|
16
|
-
active?: boolean;
|
|
17
|
-
asChild?: false;
|
|
18
|
-
children?: unknown;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
ref?: Ref<HTMLLIElement>;
|
|
21
|
-
};
|
|
22
|
-
type ListGroupItemAsChildProps = LiProps & {
|
|
23
|
-
action?: boolean;
|
|
24
|
-
active?: boolean;
|
|
25
|
-
asChild: true;
|
|
26
|
-
children: JSXElement;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
ref?: Ref<unknown>;
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
31
|
-
export { ListGroupItemAsChildProps, ListGroupItemProps, ListGroupOrientation, ListGroupProps };
|
|
32
|
-
//# sourceMappingURL=list-group.types.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { renderShellPanel } from "../shell/shell-panel.js";
|
|
2
|
-
import { NavbarResponsiveContext } from "./navbar.context.js";
|
|
3
|
-
import { readContext } from "@askrjs/askr";
|
|
4
|
-
//#region src/components/navbar/navbar-panel.tsx
|
|
5
|
-
const DEFAULT_NAVBAR_RESPONSIVE_CONTEXT = {
|
|
6
|
-
active: () => false,
|
|
7
|
-
collapseLabel: () => "Menu",
|
|
8
|
-
closePanel: () => void 0,
|
|
9
|
-
panelId: () => void 0,
|
|
10
|
-
panelOpen: () => false,
|
|
11
|
-
togglePanel: () => void 0
|
|
12
|
-
};
|
|
13
|
-
function NavbarPanel(props) {
|
|
14
|
-
const { active: activeProp, brand, children, class: className, collapseLabel: collapseLabelProp, onClose, open: openProp, panelId: panelIdProp, ref, ...rest } = props;
|
|
15
|
-
const responsive = activeProp === void 0 || collapseLabelProp === void 0 || onClose === void 0 || openProp === void 0 || panelIdProp === void 0 ? (() => {
|
|
16
|
-
try {
|
|
17
|
-
return readContext(NavbarResponsiveContext);
|
|
18
|
-
} catch {
|
|
19
|
-
return DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;
|
|
20
|
-
}
|
|
21
|
-
})() : DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;
|
|
22
|
-
const active = activeProp ?? responsive.active();
|
|
23
|
-
const open = openProp ?? responsive.panelOpen();
|
|
24
|
-
const panelId = panelIdProp ?? responsive.panelId();
|
|
25
|
-
return renderShellPanel({
|
|
26
|
-
active,
|
|
27
|
-
brand,
|
|
28
|
-
children,
|
|
29
|
-
className,
|
|
30
|
-
collapseLabel: collapseLabelProp ?? responsive.collapseLabel(),
|
|
31
|
-
onClose: onClose ?? responsive.closePanel,
|
|
32
|
-
open,
|
|
33
|
-
panelId,
|
|
34
|
-
prefix: "navbar",
|
|
35
|
-
ref,
|
|
36
|
-
rest
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
export { NavbarPanel };
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=navbar-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-panel.js","names":[],"sources":["../../../src/components/navbar/navbar-panel.tsx"],"sourcesContent":["import { readContext } from \"@askrjs/askr\";\nimport { renderShellPanel } from \"../shell/shell-panel\";\nimport { NavbarResponsiveContext } from \"./navbar.context\";\nimport type { NavbarPanelProps } from \"./navbar.types\";\n\nconst DEFAULT_NAVBAR_RESPONSIVE_CONTEXT = {\n active: () => false,\n collapseLabel: () => \"Menu\",\n closePanel: () => undefined,\n panelId: () => undefined,\n panelOpen: () => false,\n togglePanel: () => undefined,\n};\n\nexport function NavbarPanel(props: NavbarPanelProps): JSX.Element | null {\n const {\n active: activeProp,\n brand,\n children,\n class: className,\n collapseLabel: collapseLabelProp,\n onClose,\n open: openProp,\n panelId: panelIdProp,\n ref,\n ...rest\n } = props;\n const needsResponsiveContext =\n activeProp === undefined ||\n collapseLabelProp === undefined ||\n onClose === undefined ||\n openProp === undefined ||\n panelIdProp === undefined;\n const responsive = needsResponsiveContext\n ? (() => {\n try {\n return readContext(NavbarResponsiveContext);\n } catch {\n return DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;\n }\n })()\n : DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;\n const active = activeProp ?? responsive.active();\n const open = openProp ?? responsive.panelOpen();\n const panelId = panelIdProp ?? responsive.panelId();\n const collapseLabel = collapseLabelProp ?? responsive.collapseLabel();\n const closePanel = onClose ?? responsive.closePanel;\n\n return renderShellPanel({\n active,\n brand,\n children,\n className,\n collapseLabel,\n onClose: closePanel,\n open,\n panelId,\n prefix: \"navbar\",\n ref,\n rest,\n });\n}\n"],"mappings":";;;;AAKA,MAAM,oCAAoC;CACxC,cAAc;CACd,qBAAqB;CACrB,kBAAkB,KAAA;CAClB,eAAe,KAAA;CACf,iBAAiB;CACjB,mBAAmB,KAAA;AACrB;AAEA,SAAgB,YAAY,OAA6C;CACvE,MAAM,EACJ,QAAQ,YACR,OACA,UACA,OAAO,WACP,eAAe,mBACf,SACA,MAAM,UACN,SAAS,aACT,KACA,GAAG,SACD;CAOJ,MAAM,aALJ,eAAe,KAAA,KACf,sBAAsB,KAAA,KACtB,YAAY,KAAA,KACZ,aAAa,KAAA,KACb,gBAAgB,KAAA,WAEP;EACL,IAAI;GACF,OAAO,YAAY,uBAAuB;EAC5C,QAAQ;GACN,OAAO;EACT;CACF,EAAA,CAAG,IACH;CACJ,MAAM,SAAS,cAAc,WAAW,OAAO;CAC/C,MAAM,OAAO,YAAY,WAAW,UAAU;CAC9C,MAAM,UAAU,eAAe,WAAW,QAAQ;CAIlD,OAAO,iBAAiB;EACtB;EACA;EACA;EACA;EACA,eARoB,qBAAqB,WAAW,cAAc;EASlE,SARiB,WAAW,WAAW;EASvC;EACA;EACA,QAAQ;EACR;EACA;CACF,CAAC;AACH"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineContext } from "@askrjs/askr";
|
|
2
|
-
const NavbarResponsiveContext = defineContext({
|
|
3
|
-
active: () => false,
|
|
4
|
-
collapseLabel: () => "Menu",
|
|
5
|
-
closePanel: () => void 0,
|
|
6
|
-
panelId: () => void 0,
|
|
7
|
-
panelOpen: () => false,
|
|
8
|
-
togglePanel: () => void 0
|
|
9
|
-
});
|
|
10
|
-
//#endregion
|
|
11
|
-
export { NavbarResponsiveContext };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=navbar.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.context.js","names":[],"sources":["../../../src/components/navbar/navbar.context.ts"],"sourcesContent":["import { defineContext } from \"@askrjs/askr\";\n\nexport type NavbarResponsiveContextValue = {\n active: () => boolean;\n collapseLabel: () => string;\n closePanel: () => void;\n panelId: () => string | undefined;\n panelOpen: () => boolean;\n togglePanel: () => void;\n};\n\nconst defaultResponsiveContext: NavbarResponsiveContextValue = {\n active: () => false,\n collapseLabel: () => \"Menu\",\n closePanel: () => undefined,\n panelId: () => undefined,\n panelOpen: () => false,\n togglePanel: () => undefined,\n};\n\nexport const NavbarResponsiveContext =\n defineContext<NavbarResponsiveContextValue>(defaultResponsiveContext);\n"],"mappings":";AAoBA,MAAa,0BACX,cAA4C;CAT5C,cAAc;CACd,qBAAqB;CACrB,kBAAkB,KAAA;CAClB,eAAe,KAAA;CACf,iBAAiB;CACjB,mBAAmB,KAAA;AAIyB,CAAwB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "@askrjs/askr/jsx-runtime";
|
|
2
|
-
//#region src/components/navbar/navbar.render.tsx
|
|
3
|
-
function renderNavbarCollapseContents(collapseLabel, collapseIcon, collapseIconPlacement) {
|
|
4
|
-
const icon = /* @__PURE__ */ jsx("span", {
|
|
5
|
-
"data-slot": "navbar-toggle-icon",
|
|
6
|
-
"aria-hidden": "true",
|
|
7
|
-
children: collapseIcon ?? /* @__PURE__ */ jsxs("span", {
|
|
8
|
-
class: "navbar-toggle-glyph",
|
|
9
|
-
"data-slot": "navbar-toggle-glyph",
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */ jsx("span", {}),
|
|
12
|
-
/* @__PURE__ */ jsx("span", {}),
|
|
13
|
-
/* @__PURE__ */ jsx("span", {})
|
|
14
|
-
]
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
const label = /* @__PURE__ */ jsx("span", {
|
|
18
|
-
"data-slot": "navbar-toggle-label",
|
|
19
|
-
children: collapseLabel
|
|
20
|
-
});
|
|
21
|
-
return collapseIconPlacement === "end" ? /* @__PURE__ */ jsxs(Fragment, { children: [label, icon] }) : /* @__PURE__ */ jsxs(Fragment, { children: [icon, label] });
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { renderNavbarCollapseContents };
|
|
25
|
-
|
|
26
|
-
//# sourceMappingURL=navbar.render.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.render.js","names":[],"sources":["../../../src/components/navbar/navbar.render.tsx"],"sourcesContent":["import type { CollapseIconPlacement } from \"../shell/shell-nav.types\";\n\nexport function renderNavbarCollapseContents(\n collapseLabel: string,\n collapseIcon: unknown,\n collapseIconPlacement: CollapseIconPlacement,\n): unknown {\n const icon = (\n <span data-slot=\"navbar-toggle-icon\" aria-hidden=\"true\">\n {collapseIcon ?? (\n <span class=\"navbar-toggle-glyph\" data-slot=\"navbar-toggle-glyph\">\n <span />\n <span />\n <span />\n </span>\n )}\n </span>\n );\n const label = <span data-slot=\"navbar-toggle-label\">{collapseLabel}</span>;\n\n return collapseIconPlacement === \"end\" ? (\n <>\n {label}\n {icon}\n </>\n ) : (\n <>\n {icon}\n {label}\n </>\n );\n}\n"],"mappings":";;AAEA,SAAgB,6BACd,eACA,cACA,uBACS;CACT,MAAM,OACJ,oBAAC,QAAD;EAAM,aAAU;EAAqB,eAAY;YAC9C,gBACC,qBAAC,QAAD;GAAM,OAAM;GAAsB,aAAU;aAA5C;IACE,oBAAC,QAAD,CAAO,CAAA;IACP,oBAAC,QAAD,CAAO,CAAA;IACP,oBAAC,QAAD,CAAO,CAAA;GACH;;CAEJ,CAAA;CAER,MAAM,QAAQ,oBAAC,QAAD;EAAM,aAAU;YAAuB;CAAoB,CAAA;CAEzE,OAAO,0BAA0B,QAC/B,qBAAA,UAAA,EAAA,UAAA,CACG,OACA,IACD,EAAA,CAAA,IAEF,qBAAA,UAAA,EAAA,UAAA,CACG,MACA,KACD,EAAA,CAAA;AAEN"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/components/navbar/navbar.shared.ts
|
|
2
|
-
const NAVBAR_COLLAPSE_BREAKPOINTS = {
|
|
3
|
-
sm: 640,
|
|
4
|
-
md: 768,
|
|
5
|
-
lg: 1024,
|
|
6
|
-
xl: 1280
|
|
7
|
-
};
|
|
8
|
-
function resolveNavGroupAlign(align) {
|
|
9
|
-
return align === "start" ? void 0 : align;
|
|
10
|
-
}
|
|
11
|
-
function isNavbarCollapsed(collapseBelow) {
|
|
12
|
-
if (typeof window === "undefined") return false;
|
|
13
|
-
return window.innerWidth < NAVBAR_COLLAPSE_BREAKPOINTS[collapseBelow];
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { NAVBAR_COLLAPSE_BREAKPOINTS, isNavbarCollapsed, resolveNavGroupAlign };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=navbar.shared.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.shared.js","names":[],"sources":["../../../src/components/navbar/navbar.shared.ts"],"sourcesContent":["import type { CollapseBreakpoint } from \"../shell/shell-nav.types\";\nimport type { NavGroupAlign } from \"./navbar.types\";\n\nexport const NAVBAR_COLLAPSE_BREAKPOINTS: Record<CollapseBreakpoint, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n};\n\nexport function resolveNavGroupAlign(align: NavGroupAlign | undefined): string | undefined {\n return align === \"start\" ? undefined : align;\n}\n\nexport function isNavbarCollapsed(collapseBelow: CollapseBreakpoint): boolean {\n if (typeof window === \"undefined\") {\n return false;\n }\n\n return window.innerWidth < NAVBAR_COLLAPSE_BREAKPOINTS[collapseBelow];\n}\n"],"mappings":";AAGA,MAAa,8BAAkE;CAC7E,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,SAAgB,qBAAqB,OAAsD;CACzF,OAAO,UAAU,UAAU,KAAA,IAAY;AACzC;AAEA,SAAgB,kBAAkB,eAA4C;CAC5E,IAAI,OAAO,WAAW,aACpB,OAAO;CAGT,OAAO,OAAO,aAAa,4BAA4B;AACzD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PaginationEllipsisProps, PaginationItemAsChildProps, PaginationItemProps, PaginationLinkProps, PaginationProps } from "./pagination.types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/components/pagination/pagination.d.ts
|
|
4
|
-
declare function Pagination(props: PaginationProps): JSX.Element;
|
|
5
|
-
declare function PaginationItem(props: PaginationItemProps): JSX.Element;
|
|
6
|
-
declare function PaginationItem(props: PaginationItemAsChildProps): JSX.Element;
|
|
7
|
-
declare function PaginationLink(props: PaginationLinkProps): JSX.Element;
|
|
8
|
-
declare function PaginationEllipsis(props: PaginationEllipsisProps): JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { Pagination, PaginationEllipsis, PaginationItem, PaginationLink };
|
|
11
|
-
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { classes } from "../_internal/classes.js";
|
|
2
|
-
import { resolvePathname } from "../_internal/pathname.js";
|
|
3
|
-
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
|
-
import { Slot } from "@askrjs/askr/foundations";
|
|
5
|
-
import { mergeProps } from "@askrjs/askr/foundations/utilities";
|
|
6
|
-
import { navigate } from "@askrjs/askr/router";
|
|
7
|
-
//#region src/components/pagination/pagination.tsx
|
|
8
|
-
function shouldHandleClientNavigation(event, target, targetPathname) {
|
|
9
|
-
if (targetPathname === null || target) return false;
|
|
10
|
-
return !event.defaultPrevented && (event.button ?? 0) === 0 && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey;
|
|
11
|
-
}
|
|
12
|
-
function Pagination(props) {
|
|
13
|
-
const { children, class: className, label = "Pagination", ref, ...rest } = props;
|
|
14
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
15
|
-
...rest,
|
|
16
|
-
ref,
|
|
17
|
-
class: classes("pagination", className),
|
|
18
|
-
"aria-label": label,
|
|
19
|
-
"data-slot": "pagination",
|
|
20
|
-
children: /* @__PURE__ */ jsx("ul", {
|
|
21
|
-
class: "pagination-list",
|
|
22
|
-
"data-slot": "pagination-list",
|
|
23
|
-
children
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function PaginationItem(props) {
|
|
28
|
-
const { active = false, asChild, children, disabled = false, ref, class: className, ...rest } = props;
|
|
29
|
-
const finalProps = mergeProps(rest, {
|
|
30
|
-
class: classes("page-item", active ? "active" : void 0, disabled ? "disabled" : void 0, className),
|
|
31
|
-
ref,
|
|
32
|
-
"aria-current": active ? "page" : void 0,
|
|
33
|
-
"aria-disabled": disabled ? "true" : void 0,
|
|
34
|
-
"data-active": active ? "true" : void 0,
|
|
35
|
-
"data-disabled": disabled ? "true" : void 0,
|
|
36
|
-
"data-slot": "pagination-item"
|
|
37
|
-
});
|
|
38
|
-
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
39
|
-
asChild: true,
|
|
40
|
-
...finalProps,
|
|
41
|
-
children
|
|
42
|
-
});
|
|
43
|
-
return /* @__PURE__ */ jsx("li", {
|
|
44
|
-
...finalProps,
|
|
45
|
-
children
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function PaginationLink(props) {
|
|
49
|
-
const { active = false, children, class: className, disabled = false, href, onClick, ref, target, ...rest } = props;
|
|
50
|
-
const hrefValue = href;
|
|
51
|
-
const targetValue = target;
|
|
52
|
-
const targetPathname = resolvePathname(hrefValue);
|
|
53
|
-
const isActive = active;
|
|
54
|
-
const linkProps = mergeProps(rest, {
|
|
55
|
-
href,
|
|
56
|
-
target: targetValue,
|
|
57
|
-
ref,
|
|
58
|
-
class: classes("page-link", active ? "active" : void 0, disabled ? "disabled" : void 0, className),
|
|
59
|
-
"aria-current": isActive ? "page" : void 0,
|
|
60
|
-
"aria-disabled": disabled ? "true" : void 0,
|
|
61
|
-
"data-active": isActive ? "true" : void 0,
|
|
62
|
-
"data-disabled": disabled ? "true" : void 0,
|
|
63
|
-
"data-slot": "pagination-link",
|
|
64
|
-
tabIndex: disabled ? -1 : void 0
|
|
65
|
-
});
|
|
66
|
-
const handleClick = (event) => {
|
|
67
|
-
onClick?.(event);
|
|
68
|
-
if (disabled || !shouldHandleClientNavigation(event, targetValue, targetPathname)) {
|
|
69
|
-
if (disabled) event.preventDefault();
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
event.preventDefault();
|
|
73
|
-
navigate(hrefValue);
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ jsx("a", {
|
|
76
|
-
...linkProps,
|
|
77
|
-
onClick: handleClick,
|
|
78
|
-
children
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function PaginationEllipsis(props) {
|
|
82
|
-
const { children, class: className, ref, ...rest } = props;
|
|
83
|
-
return /* @__PURE__ */ jsx("span", {
|
|
84
|
-
...rest,
|
|
85
|
-
ref,
|
|
86
|
-
class: classes("pagination-ellipsis", className),
|
|
87
|
-
"aria-hidden": "true",
|
|
88
|
-
"data-slot": "pagination-ellipsis",
|
|
89
|
-
children: children ?? "..."
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
export { Pagination, PaginationEllipsis, PaginationItem, PaginationLink };
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","names":[],"sources":["../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import { navigate } from \"@askrjs/askr/router\";\nimport { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"@askrjs/askr/foundations/utilities\";\nimport { classes } from \"../_internal/classes\";\nimport { resolvePathname } from \"../_internal/pathname\";\nimport type {\n PaginationEllipsisProps,\n PaginationItemAsChildProps,\n PaginationItemProps,\n PaginationLinkProps,\n PaginationProps,\n} from \"./pagination.types\";\n\nfunction shouldHandleClientNavigation(\n event: MouseEvent,\n target: string | undefined,\n targetPathname: string | null,\n): boolean {\n if (targetPathname === null || target) {\n return false;\n }\n\n return (\n !event.defaultPrevented &&\n (event.button ?? 0) === 0 &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.shiftKey\n );\n}\n\nexport function Pagination(props: PaginationProps): JSX.Element {\n const { children, class: className, label = \"Pagination\", ref, ...rest } = props;\n\n return (\n <nav\n {...rest}\n ref={ref}\n class={classes(\"pagination\", className)}\n aria-label={label}\n data-slot=\"pagination\"\n >\n <ul class=\"pagination-list\" data-slot=\"pagination-list\">\n {children}\n </ul>\n </nav>\n );\n}\n\nexport function PaginationItem(props: PaginationItemProps): JSX.Element;\nexport function PaginationItem(props: PaginationItemAsChildProps): JSX.Element;\nexport function PaginationItem(\n props: PaginationItemProps | PaginationItemAsChildProps,\n): JSX.Element {\n const {\n active = false,\n asChild,\n children,\n disabled = false,\n ref,\n class: className,\n ...rest\n } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\n \"page-item\",\n active ? \"active\" : undefined,\n disabled ? \"disabled\" : undefined,\n className,\n ),\n ref,\n \"aria-current\": active ? \"page\" : undefined,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-active\": active ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"true\" : undefined,\n \"data-slot\": \"pagination-item\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <li {...finalProps}>{children}</li>;\n}\n\nexport function PaginationLink(props: PaginationLinkProps): JSX.Element {\n const {\n active = false,\n children,\n class: className,\n disabled = false,\n href,\n onClick,\n ref,\n target,\n ...rest\n } = props as PaginationLinkProps & { onClick?: (event: MouseEvent) => void };\n const hrefValue = href as string;\n const targetValue = target as string | undefined;\n const targetPathname = resolvePathname(hrefValue);\n const isActive = active;\n\n const linkProps = mergeProps(rest, {\n href,\n target: targetValue,\n ref,\n class: classes(\n \"page-link\",\n active ? \"active\" : undefined,\n disabled ? \"disabled\" : undefined,\n className,\n ),\n \"aria-current\": isActive ? \"page\" : undefined,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-active\": isActive ? \"true\" : undefined,\n \"data-disabled\": disabled ? \"true\" : undefined,\n \"data-slot\": \"pagination-link\",\n tabIndex: disabled ? -1 : undefined,\n });\n\n const handleClick = (event: MouseEvent) => {\n onClick?.(event);\n\n if (disabled || !shouldHandleClientNavigation(event, targetValue, targetPathname)) {\n if (disabled) {\n event.preventDefault();\n }\n\n return;\n }\n\n event.preventDefault();\n navigate(hrefValue);\n };\n\n return (\n <a {...linkProps} onClick={handleClick}>\n {children}\n </a>\n );\n}\n\nexport function PaginationEllipsis(props: PaginationEllipsisProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n\n return (\n <span\n {...rest}\n ref={ref}\n class={classes(\"pagination-ellipsis\", className)}\n aria-hidden=\"true\"\n data-slot=\"pagination-ellipsis\"\n >\n {children ?? \"...\"}\n </span>\n );\n}\n"],"mappings":";;;;;;;AAaA,SAAS,6BACP,OACA,QACA,gBACS;CACT,IAAI,mBAAmB,QAAQ,QAC7B,OAAO;CAGT,OACE,CAAC,MAAM,qBACN,MAAM,UAAU,OAAO,KACxB,CAAC,MAAM,UACP,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM;AAEX;AAEA,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,UAAU,OAAO,WAAW,QAAQ,cAAc,KAAK,GAAG,SAAS;CAE3E,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,OAAO,QAAQ,cAAc,SAAS;EACtC,cAAY;EACZ,aAAU;YAEV,oBAAC,MAAD;GAAI,OAAM;GAAkB,aAAU;GACnC;EACC,CAAA;CACD,CAAA;AAET;AAIA,SAAgB,eACd,OACa;CACb,MAAM,EACJ,SAAS,OACT,SACA,UACA,WAAW,OACX,KACA,OAAO,WACP,GAAG,SACD;CACJ,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QACL,aACA,SAAS,WAAW,KAAA,GACpB,WAAW,aAAa,KAAA,GACxB,SACF;EACA;EACA,gBAAgB,SAAS,SAAS,KAAA;EAClC,iBAAiB,WAAW,SAAS,KAAA;EACrC,eAAe,SAAS,SAAS,KAAA;EACjC,iBAAiB,WAAW,SAAS,KAAA;EACrC,aAAa;CACf,CAAC;CAED,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;CAAW,CAAA;CAG5D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;CAAa,CAAA;AAC3C;AAEA,SAAgB,eAAe,OAAyC;CACtE,MAAM,EACJ,SAAS,OACT,UACA,OAAO,WACP,WAAW,OACX,MACA,SACA,KACA,QACA,GAAG,SACD;CACJ,MAAM,YAAY;CAClB,MAAM,cAAc;CACpB,MAAM,iBAAiB,gBAAgB,SAAS;CAChD,MAAM,WAAW;CAEjB,MAAM,YAAY,WAAW,MAAM;EACjC;EACA,QAAQ;EACR;EACA,OAAO,QACL,aACA,SAAS,WAAW,KAAA,GACpB,WAAW,aAAa,KAAA,GACxB,SACF;EACA,gBAAgB,WAAW,SAAS,KAAA;EACpC,iBAAiB,WAAW,SAAS,KAAA;EACrC,eAAe,WAAW,SAAS,KAAA;EACnC,iBAAiB,WAAW,SAAS,KAAA;EACrC,aAAa;EACb,UAAU,WAAW,KAAK,KAAA;CAC5B,CAAC;CAED,MAAM,eAAe,UAAsB;EACzC,UAAU,KAAK;EAEf,IAAI,YAAY,CAAC,6BAA6B,OAAO,aAAa,cAAc,GAAG;GACjF,IAAI,UACF,MAAM,eAAe;GAGvB;EACF;EAEA,MAAM,eAAe;EACrB,SAAS,SAAS;CACpB;CAEA,OACE,oBAAC,KAAD;EAAG,GAAI;EAAW,SAAS;EACxB;CACA,CAAA;AAEP;AAEA,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAErD,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,OAAO,QAAQ,uBAAuB,SAAS;EAC/C,eAAY;EACZ,aAAU;YAET,YAAY;CACT,CAAA;AAEV"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { JSXElement } from "@askrjs/askr/foundations";
|
|
2
|
-
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
-
|
|
4
|
-
//#region src/components/pagination/pagination.types.d.ts
|
|
5
|
-
type NavProps = Omit<JSX.IntrinsicElements["nav"], "children" | "ref" | "aria-label">;
|
|
6
|
-
type LiProps = Omit<JSX.IntrinsicElements["li"], "children" | "ref">;
|
|
7
|
-
type AnchorProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref">;
|
|
8
|
-
type PaginationProps = NavProps & {
|
|
9
|
-
children?: unknown;
|
|
10
|
-
label?: string;
|
|
11
|
-
ref?: Ref<HTMLElement>;
|
|
12
|
-
};
|
|
13
|
-
type PaginationItemProps = LiProps & {
|
|
14
|
-
active?: boolean;
|
|
15
|
-
asChild?: false;
|
|
16
|
-
children?: unknown;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
ref?: Ref<HTMLLIElement>;
|
|
19
|
-
};
|
|
20
|
-
type PaginationItemAsChildProps = LiProps & {
|
|
21
|
-
active?: boolean;
|
|
22
|
-
asChild: true;
|
|
23
|
-
children: JSXElement;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
ref?: Ref<unknown>;
|
|
26
|
-
};
|
|
27
|
-
type PaginationLinkProps = AnchorProps & {
|
|
28
|
-
active?: boolean;
|
|
29
|
-
children?: unknown;
|
|
30
|
-
disabled?: boolean;
|
|
31
|
-
href: string;
|
|
32
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
33
|
-
};
|
|
34
|
-
type PaginationEllipsisProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
|
|
35
|
-
children?: unknown;
|
|
36
|
-
ref?: Ref<HTMLSpanElement>;
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { PaginationEllipsisProps, PaginationItemAsChildProps, PaginationItemProps, PaginationLinkProps, PaginationProps };
|
|
40
|
-
//# sourceMappingURL=pagination.types.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/components/section/section.a11y.d.ts
|
|
2
|
-
declare const SECTION_A11Y_CONTRACT: {
|
|
3
|
-
readonly DATA_ATTRIBUTES: {
|
|
4
|
-
readonly slot: "data-slot";
|
|
5
|
-
readonly layout: "data-ak-layout";
|
|
6
|
-
readonly size: "data-size";
|
|
7
|
-
};
|
|
8
|
-
readonly SLOT_VALUES: {
|
|
9
|
-
readonly root: "section";
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
type SectionA11yContract = typeof SECTION_A11Y_CONTRACT;
|
|
13
|
-
//#endregion
|
|
14
|
-
export { SECTION_A11Y_CONTRACT, SectionA11yContract };
|
|
15
|
-
//# sourceMappingURL=section.a11y.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/components/separator/separator.a11y.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* WAI-ARIA Separator Pattern.
|
|
4
|
-
*/
|
|
5
|
-
declare const SEPARATOR_A11Y_CONTRACT: {
|
|
6
|
-
readonly ROLE: "separator";
|
|
7
|
-
readonly DECORATIVE_ROLE: "presentation";
|
|
8
|
-
readonly ORIENTATION_ATTRIBUTE: "aria-orientation";
|
|
9
|
-
readonly DATA_ATTRIBUTES: {
|
|
10
|
-
readonly orientation: "data-orientation";
|
|
11
|
-
};
|
|
12
|
-
readonly DEFAULT_ORIENTATION: "horizontal";
|
|
13
|
-
};
|
|
14
|
-
type SeparatorA11yContract = typeof SEPARATOR_A11Y_CONTRACT;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { SEPARATOR_A11Y_CONTRACT, SeparatorA11yContract };
|
|
17
|
-
//# sourceMappingURL=separator.a11y.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/components/separator/separator.a11y.ts
|
|
2
|
-
/**
|
|
3
|
-
* WAI-ARIA Separator Pattern.
|
|
4
|
-
*/
|
|
5
|
-
const SEPARATOR_A11Y_CONTRACT = {
|
|
6
|
-
ROLE: "separator",
|
|
7
|
-
DECORATIVE_ROLE: "presentation",
|
|
8
|
-
ORIENTATION_ATTRIBUTE: "aria-orientation",
|
|
9
|
-
DATA_ATTRIBUTES: { orientation: "data-orientation" },
|
|
10
|
-
DEFAULT_ORIENTATION: "horizontal"
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { SEPARATOR_A11Y_CONTRACT };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=separator.a11y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separator.a11y.js","names":[],"sources":["../../../src/components/separator/separator.a11y.ts"],"sourcesContent":["/**\n * WAI-ARIA Separator Pattern.\n */\n\nexport const SEPARATOR_A11Y_CONTRACT = {\n ROLE: \"separator\" as const,\n DECORATIVE_ROLE: \"presentation\" as const,\n ORIENTATION_ATTRIBUTE: \"aria-orientation\" as const,\n DATA_ATTRIBUTES: {\n orientation: \"data-orientation\" as const,\n },\n DEFAULT_ORIENTATION: \"horizontal\" as const,\n} as const;\n\nexport type SeparatorA11yContract = typeof SEPARATOR_A11Y_CONTRACT;\n"],"mappings":";;;;AAIA,MAAa,0BAA0B;CACrC,MAAM;CACN,iBAAiB;CACjB,uBAAuB;CACvB,iBAAiB,EACf,aAAa,mBACf;CACA,qBAAqB;AACvB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ShellAsChildProps, ShellDivProps, ShellMainAsChildProps, ShellMainDivProps, ShellMainMainProps, ShellMainProps, ShellNavAsChildProps, ShellNavDivProps, ShellNavProps, ShellOwnProps, ShellProps, ShellVariant } from "./shell.types.js";
|
|
2
|
-
import { Shell, ShellMain, ShellNav } from "./shell.js";
|
|
3
|
-
import { SHELL_A11Y_CONTRACT, ShellA11yContract } from "./shell.a11y.js";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region src/components/shell/shell-nav.types.d.ts
|
|
2
|
-
type CollapseBreakpoint = "sm" | "md" | "lg" | "xl";
|
|
3
|
-
type CollapseIconPlacement = "start" | "end";
|
|
4
|
-
type Collapsible = "none" | "icon";
|
|
5
|
-
//#endregion
|
|
6
|
-
export { CollapseBreakpoint, CollapseIconPlacement, Collapsible };
|
|
7
|
-
//# sourceMappingURL=shell-nav.types.d.ts.map
|