@askrjs/themes 0.0.3 → 0.0.4
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 +78 -0
- package/THEMING.md +50 -8
- package/dist/{_internal → components/_internal}/box-layout.js +4 -3
- package/dist/components/_internal/box-layout.js.map +1 -0
- package/dist/components/_internal/classes.js.map +1 -0
- package/dist/components/_internal/jsx.js.map +1 -0
- package/dist/components/_internal/layout.d.ts +6 -28
- package/dist/{_internal → components/_internal}/layout.js +5 -15
- package/dist/components/_internal/layout.js.map +1 -0
- package/dist/{_internal → components/_internal}/merge-props.js +5 -0
- package/dist/components/_internal/merge-props.js.map +1 -0
- package/dist/components/_internal/pathname.js +39 -0
- package/dist/components/_internal/pathname.js.map +1 -0
- package/dist/components/_internal/style.js +41 -0
- package/dist/components/_internal/style.js.map +1 -0
- package/dist/components/alert/alert.d.ts +7 -0
- package/dist/components/alert/alert.js +65 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/alert.types.d.ts +22 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -3
- package/dist/components/aspect-ratio/aspect-ratio.js +33 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +18 -12
- package/dist/components/aspect-ratio/index.d.ts +2 -2
- package/dist/components/badge/badge.a11y.d.ts +13 -9
- package/dist/components/badge/badge.d.ts +8 -3
- package/dist/{badge → components/badge}/badge.js +5 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.types.d.ts +18 -12
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/block/block.a11y.d.ts +20 -0
- package/dist/components/block/block.d.ts +9 -0
- package/dist/components/block/block.js +66 -0
- package/dist/components/block/block.js.map +1 -0
- package/dist/components/block/block.types.d.ts +38 -0
- package/dist/components/block/index.d.ts +3 -0
- package/dist/components/box/box.a11y.d.ts +13 -9
- package/dist/components/box/box.d.ts +9 -4
- package/dist/{box → components/box}/box.js +3 -2
- package/dist/components/box/box.js.map +1 -0
- package/dist/components/box/box.types.d.ts +67 -61
- package/dist/components/box/index.d.ts +3 -3
- package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +13 -9
- package/dist/components/breadcrumb/breadcrumb.a11y.js +15 -0
- package/dist/components/breadcrumb/breadcrumb.a11y.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +18 -13
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.types.d.ts +64 -58
- package/dist/components/breadcrumb/index.d.ts +3 -3
- package/dist/components/button-group/button-group.d.ts +7 -0
- package/dist/components/button-group/button-group.js +20 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.types.d.ts +14 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/card/card.d.ts +13 -7
- package/dist/components/card/card.js +95 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.types.d.ts +32 -24
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/close/close.d.ts +7 -0
- package/dist/components/close/close.js +22 -0
- package/dist/components/close/close.js.map +1 -0
- package/dist/components/close/close.types.d.ts +10 -0
- package/dist/components/close/index.d.ts +2 -0
- package/dist/components/container/container.a11y.d.ts +19 -15
- package/dist/components/container/container.d.ts +8 -3
- package/dist/{container → components/container}/container.js +3 -3
- package/dist/components/container/container.js.map +1 -0
- package/dist/components/container/container.types.d.ts +26 -26
- package/dist/components/container/index.d.ts +3 -3
- package/dist/components/empty-state/empty-state.d.ts +7 -2
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/empty-state.types.d.ts +15 -8
- package/dist/components/empty-state/index.d.ts +2 -2
- package/dist/components/field/field.d.ts +9 -0
- package/dist/components/field/field.js +41 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/field.types.d.ts +20 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/flex/flex.a11y.d.ts +21 -17
- package/dist/components/flex/flex.d.ts +9 -4
- package/dist/{flex → components/flex}/flex.js +3 -2
- package/dist/components/flex/flex.js.map +1 -0
- package/dist/components/flex/flex.types.d.ts +38 -37
- package/dist/components/flex/index.d.ts +3 -3
- package/dist/components/header/header.a11y.d.ts +13 -9
- package/dist/components/header/header.a11y.js +12 -0
- package/dist/components/header/header.a11y.js.map +1 -0
- package/dist/components/header/header.d.ts +7 -2
- package/dist/components/header/header.js.map +1 -0
- package/dist/components/header/header.types.d.ts +8 -4
- package/dist/components/inline/index.d.ts +8 -6
- package/dist/components/inline/index.js.map +1 -0
- package/dist/components/input-group/index.d.ts +2 -0
- package/dist/components/input-group/input-group.d.ts +9 -0
- package/dist/components/input-group/input-group.js +39 -0
- package/dist/components/input-group/input-group.js.map +1 -0
- package/dist/components/input-group/input-group.types.d.ts +26 -0
- package/dist/components/list-group/index.d.ts +2 -0
- package/dist/components/list-group/list-group.d.ts +9 -0
- package/dist/components/list-group/list-group.js +43 -0
- package/dist/components/list-group/list-group.js.map +1 -0
- package/dist/components/list-group/list-group.types.d.ts +32 -0
- package/dist/components/nav/index.d.ts +2 -0
- package/dist/components/nav/nav.d.ts +13 -0
- package/dist/components/nav/nav.js +113 -0
- package/dist/components/nav/nav.js.map +1 -0
- package/dist/components/nav/nav.types.d.ts +56 -0
- package/dist/components/navbar/index.d.ts +5 -2
- package/dist/components/navbar/navbar-panel.js +48 -0
- package/dist/components/navbar/navbar-panel.js.map +1 -0
- package/dist/components/navbar/navbar.context.js +13 -0
- package/dist/components/navbar/navbar.context.js.map +1 -0
- package/dist/components/navbar/navbar.d.ts +45 -7
- package/dist/components/navbar/navbar.js +221 -0
- package/dist/components/navbar/navbar.js.map +1 -0
- package/dist/components/navbar/navbar.render.js +26 -0
- package/dist/components/navbar/navbar.render.js.map +1 -0
- package/dist/components/navbar/navbar.shared.js +18 -0
- package/dist/components/navbar/navbar.shared.js.map +1 -0
- package/dist/components/navbar/navbar.types.d.ts +29 -22
- package/dist/components/overlays/dropdown-content.d.ts +8 -0
- package/dist/components/overlays/dropdown-content.js +18 -0
- package/dist/components/overlays/dropdown-content.js.map +1 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +11 -0
- package/dist/components/pagination/pagination.js +95 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/pagination/pagination.types.d.ts +40 -0
- package/dist/components/section/index.d.ts +3 -3
- package/dist/components/section/section.a11y.d.ts +14 -10
- package/dist/components/section/section.d.ts +8 -3
- package/dist/{section → components/section}/section.js +3 -2
- package/dist/components/section/section.js.map +1 -0
- package/dist/components/section/section.types.d.ts +20 -14
- package/dist/components/separator/index.d.ts +3 -3
- package/dist/components/separator/separator.a11y.d.ts +13 -9
- package/dist/components/separator/separator.a11y.js +15 -0
- package/dist/components/separator/separator.a11y.js.map +1 -0
- package/dist/components/separator/separator.d.ts +8 -3
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/separator/separator.types.d.ts +19 -13
- package/dist/components/shell/index.d.ts +3 -0
- package/dist/components/shell/shell-nav.types.d.ts +7 -0
- package/dist/components/shell/shell-panel.js +54 -0
- package/dist/components/shell/shell-panel.js.map +1 -0
- package/dist/components/shell/shell-responsive.js +110 -0
- package/dist/components/shell/shell-responsive.js.map +1 -0
- package/dist/components/shell/shell.a11y.d.ts +23 -0
- package/dist/components/shell/shell.a11y.js +23 -0
- package/dist/components/shell/shell.a11y.js.map +1 -0
- package/dist/components/shell/shell.d.ts +13 -0
- package/dist/components/shell/shell.js +69 -0
- package/dist/components/shell/shell.js.map +1 -0
- package/dist/components/shell/shell.types.d.ts +58 -0
- package/dist/components/sidebar/sidebar-panel.d.ts +7 -0
- package/dist/components/sidebar/sidebar-panel.js +59 -0
- package/dist/components/sidebar/sidebar-panel.js.map +1 -0
- package/dist/components/sidebar/sidebar-toggle.d.ts +7 -0
- package/dist/components/sidebar/sidebar-toggle.js +8 -0
- package/dist/components/sidebar/sidebar-toggle.js.map +1 -0
- package/dist/components/sidebar/sidebar.context.js +21 -0
- package/dist/components/sidebar/sidebar.context.js.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sidebar/sidebar.js +228 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/sidebar/sidebar.shared.js +12 -0
- package/dist/components/sidebar/sidebar.shared.js.map +1 -0
- package/dist/components/sidebar/sidebar.types.d.ts +30 -0
- package/dist/components/skeleton/index.d.ts +3 -3
- package/dist/components/skeleton/skeleton.a11y.d.ts +12 -8
- package/dist/components/skeleton/skeleton.d.ts +8 -3
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/skeleton/skeleton.types.d.ts +16 -10
- package/dist/components/spacer/index.d.ts +3 -3
- package/dist/components/spacer/spacer.a11y.d.ts +16 -12
- package/dist/components/spacer/spacer.d.ts +8 -3
- package/dist/{spacer → components/spacer}/spacer.js +3 -1
- package/dist/components/spacer/spacer.js.map +1 -0
- package/dist/components/spacer/spacer.types.d.ts +23 -21
- package/dist/components/spinner/index.d.ts +2 -2
- package/dist/components/spinner/spinner.d.ts +7 -2
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/spinner/spinner.types.d.ts +9 -4
- package/dist/components/stack/index.d.ts +3 -3
- package/dist/components/stack/stack.a11y.d.ts +17 -13
- package/dist/components/stack/stack.d.ts +8 -3
- package/dist/components/stack/stack.js.map +1 -0
- package/dist/components/stack/stack.types.d.ts +19 -13
- package/dist/components/theme/index.d.ts +1 -2
- package/dist/components/theme/theme.d.ts +41 -34
- package/dist/{theme → components/theme}/theme.js +33 -4
- package/dist/components/theme/theme.js.map +1 -0
- package/dist/controls.d.ts +10 -0
- package/dist/controls.js +7 -0
- package/dist/feedback.d.ts +5 -0
- package/dist/feedback.js +4 -0
- package/dist/layouts.d.ts +25 -0
- package/dist/layouts.js +11 -0
- package/dist/navs.d.ts +15 -0
- package/dist/navs.js +9 -0
- package/dist/overlays.d.ts +3 -0
- package/dist/overlays.js +4 -0
- package/dist/shells.d.ts +16 -0
- package/dist/shells.js +11 -0
- package/dist/surfaces.d.ts +16 -0
- package/dist/surfaces.js +9 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +3 -0
- package/dist/themes/default/index.css +3132 -832
- package/package.json +63 -24
- package/src/components/_internal/box-layout.ts +8 -0
- package/src/components/_internal/jsx.ts +91 -16
- package/src/components/_internal/layout.ts +4 -17
- package/src/components/_internal/merge-props.ts +9 -0
- package/src/components/_internal/pathname.ts +67 -0
- package/src/components/_internal/style.ts +51 -0
- package/src/components/alert/alert.tsx +84 -0
- package/src/components/alert/alert.types.ts +20 -0
- package/src/components/alert/index.ts +2 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +10 -24
- package/src/components/aspect-ratio/aspect-ratio.types.ts +2 -1
- package/src/components/badge/badge.tsx +6 -0
- package/src/components/badge/badge.types.ts +2 -1
- package/src/components/block/block.a11y.ts +17 -0
- package/src/components/block/block.tsx +71 -0
- package/src/components/block/block.types.ts +60 -0
- package/src/components/block/index.ts +11 -0
- package/src/components/box/box.tsx +3 -2
- package/src/components/box/box.types.ts +2 -1
- package/src/components/breadcrumb/breadcrumb.types.ts +2 -1
- package/src/components/button-group/button-group.tsx +32 -0
- package/src/components/button-group/button-group.types.ts +12 -0
- package/src/components/button-group/index.ts +2 -0
- package/src/components/card/card.tsx +72 -43
- package/src/components/card/card.types.ts +6 -1
- package/src/components/card/index.ts +10 -1
- package/src/components/close/close.tsx +19 -0
- package/src/components/close/close.types.ts +7 -0
- package/src/components/close/index.ts +2 -0
- package/src/components/container/container.tsx +4 -4
- package/src/components/container/container.types.ts +2 -1
- package/src/components/empty-state/empty-state.types.ts +3 -0
- package/src/components/field/field.tsx +36 -0
- package/src/components/field/field.types.ts +19 -0
- package/src/components/field/index.ts +2 -0
- package/src/components/flex/flex.tsx +4 -2
- package/src/components/flex/flex.types.ts +2 -1
- package/src/components/input-group/index.ts +7 -0
- package/src/components/input-group/input-group.tsx +57 -0
- package/src/components/input-group/input-group.types.ts +26 -0
- package/src/components/list-group/index.ts +7 -0
- package/src/components/list-group/list-group.tsx +74 -0
- package/src/components/list-group/list-group.types.ts +32 -0
- package/src/components/nav/index.ts +14 -0
- package/src/components/nav/nav.tsx +203 -0
- package/src/components/nav/nav.types.ts +68 -0
- package/src/components/navbar/index.ts +9 -2
- package/src/components/navbar/navbar-panel.tsx +67 -0
- package/src/components/navbar/navbar.context.ts +22 -0
- package/src/components/navbar/navbar.render.tsx +32 -0
- package/src/components/navbar/navbar.shared.ts +21 -0
- package/src/components/navbar/navbar.tsx +252 -99
- package/src/components/navbar/navbar.types.ts +36 -22
- package/src/components/overlays/dropdown-content.tsx +28 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/pagination/pagination.tsx +158 -0
- package/src/components/pagination/pagination.types.ts +41 -0
- package/src/components/section/section.tsx +3 -2
- package/src/components/section/section.types.ts +2 -1
- package/src/components/separator/separator.types.ts +2 -1
- package/src/components/shell/index.ts +16 -0
- package/src/components/shell/shell-nav.types.ts +3 -0
- package/src/components/shell/shell-panel.tsx +85 -0
- package/src/components/shell/shell-responsive.tsx +212 -0
- package/src/components/shell/shell.a11y.ts +20 -0
- package/src/components/shell/shell.tsx +74 -0
- package/src/components/shell/shell.types.ts +71 -0
- package/src/components/sidebar/index.ts +5 -0
- package/src/components/sidebar/sidebar-panel.tsx +76 -0
- package/src/components/sidebar/sidebar-toggle.tsx +5 -0
- package/src/components/sidebar/sidebar.context.ts +40 -0
- package/src/components/sidebar/sidebar.shared.ts +12 -0
- package/src/components/sidebar/sidebar.tsx +355 -0
- package/src/components/sidebar/sidebar.types.ts +35 -0
- package/src/components/skeleton/skeleton.types.ts +2 -1
- package/src/components/spacer/spacer.tsx +4 -1
- package/src/components/spacer/spacer.types.ts +3 -2
- package/src/components/stack/stack.types.ts +2 -1
- package/src/components/theme/index.ts +10 -1
- package/src/components/theme/theme.tsx +15 -4
- package/src/controls.ts +18 -0
- package/src/feedback.ts +6 -0
- package/src/layouts.ts +19 -0
- package/src/navs.ts +26 -0
- package/src/overlays.ts +90 -0
- package/src/shells.ts +13 -0
- package/src/surfaces.ts +23 -0
- package/src/theme.ts +21 -0
- package/src/themes/default/index.css +13 -3
- package/src/themes/default/styles/actions/button-group.css +74 -0
- package/src/themes/default/styles/actions/button.css +48 -8
- package/src/themes/default/styles/actions/toggle-group.css +19 -12
- package/src/themes/default/styles/actions/toggle.css +16 -10
- package/src/themes/default/styles/base/icon.css +2 -0
- package/src/themes/default/styles/base/reset.css +28 -0
- package/src/themes/default/styles/base/typography.css +37 -17
- package/src/themes/default/styles/base/utilities.css +56 -39
- package/src/themes/default/styles/disclosure/accordion.css +22 -14
- package/src/themes/default/styles/disclosure/collapsible.css +22 -11
- package/src/themes/default/styles/display/alert.css +109 -0
- package/src/themes/default/styles/display/avatar.css +9 -4
- package/src/themes/default/styles/display/badge.css +12 -3
- package/src/themes/default/styles/display/card.css +16 -4
- package/src/themes/default/styles/display/coverage.css +2 -14
- package/src/themes/default/styles/display/list-group.css +84 -0
- package/src/themes/default/styles/display/progress-circle.css +3 -2
- package/src/themes/default/styles/display/progress.css +8 -5
- package/src/themes/default/styles/display/scroll-area.css +15 -0
- package/src/themes/default/styles/display/separator.css +4 -4
- package/src/themes/default/styles/display/skeleton.css +25 -2
- package/src/themes/default/styles/display/spinner.css +1 -1
- package/src/themes/default/styles/display/table.css +7 -4
- package/src/themes/default/styles/display/virtual-list.css +29 -0
- package/src/themes/default/styles/display/virtual-table.css +68 -0
- package/src/themes/default/styles/forms/checkbox.css +2 -1
- package/src/themes/default/styles/forms/field.css +22 -0
- package/src/themes/default/styles/forms/form.css +1 -1
- package/src/themes/default/styles/forms/input-group.css +202 -0
- package/src/themes/default/styles/forms/input.css +22 -6
- package/src/themes/default/styles/forms/label.css +2 -0
- package/src/themes/default/styles/forms/radio-group.css +22 -13
- package/src/themes/default/styles/forms/select.css +71 -26
- package/src/themes/default/styles/forms/slider.css +32 -16
- package/src/themes/default/styles/forms/switch.css +2 -1
- package/src/themes/default/styles/forms/textarea.css +35 -6
- package/src/themes/default/styles/layout/aspect-ratio.css +3 -1
- package/src/themes/default/styles/layout/block.css +23 -0
- package/src/themes/default/styles/layout/patterns.css +155 -3
- package/src/themes/default/styles/layout/responsive-layout.css +140 -121
- package/src/themes/default/styles/navigation/breadcrumb.css +7 -1
- package/src/themes/default/styles/navigation/menu.css +150 -7
- package/src/themes/default/styles/navigation/menubar.css +194 -28
- package/src/themes/default/styles/navigation/nav.css +231 -0
- package/src/themes/default/styles/navigation/pagination.css +91 -0
- package/src/themes/default/styles/overlays/alert-dialog.css +1 -1
- package/src/themes/default/styles/overlays/dialog.css +42 -10
- package/src/themes/default/styles/overlays/dropdown.css +160 -0
- package/src/themes/default/styles/overlays/hover-card.css +28 -3
- package/src/themes/default/styles/overlays/popover.css +50 -6
- package/src/themes/default/styles/overlays/toast.css +66 -17
- package/src/themes/default/styles/overlays/tooltip.css +45 -18
- package/src/themes/default/styles/shell/header.css +18 -3
- package/src/themes/default/styles/shell/navbar.css +434 -73
- package/src/themes/default/styles/shell/sidebar.css +809 -0
- package/src/themes/default/styles/shell/theme.css +7 -5
- package/src/themes/default/tokens.css +186 -123
- package/src/themes/presets/calico.css +46 -0
- package/src/themes/presets/ginger.css +46 -0
- package/src/themes/presets/index.css +5 -0
- package/src/themes/presets/tabby.css +46 -0
- package/src/themes/presets/torty.css +49 -0
- package/src/themes/presets/tuxedo.css +49 -0
- package/templates/theme/index.css +14 -4
- package/templates/theme/styles/actions/button-group.css +74 -0
- package/templates/theme/styles/actions/button.css +48 -8
- package/templates/theme/styles/actions/toggle-group.css +19 -12
- package/templates/theme/styles/actions/toggle.css +16 -10
- package/templates/theme/styles/base/icon.css +2 -0
- package/templates/theme/styles/base/reset.css +28 -0
- package/templates/theme/styles/base/typography.css +37 -17
- package/templates/theme/styles/disclosure/accordion.css +22 -14
- package/templates/theme/styles/disclosure/collapsible.css +22 -11
- package/templates/theme/styles/display/alert.css +109 -0
- package/templates/theme/styles/display/avatar.css +9 -4
- package/templates/theme/styles/display/badge.css +12 -3
- package/templates/theme/styles/display/card.css +16 -4
- package/templates/theme/styles/display/coverage.css +105 -15
- package/templates/theme/styles/display/list-group.css +84 -0
- package/templates/theme/styles/display/progress-circle.css +3 -2
- package/templates/theme/styles/display/progress.css +8 -5
- package/templates/theme/styles/display/scroll-area.css +15 -0
- package/templates/theme/styles/display/separator.css +4 -4
- package/templates/theme/styles/display/skeleton.css +25 -2
- package/templates/theme/styles/display/spinner.css +1 -1
- package/templates/theme/styles/display/table.css +7 -4
- package/templates/theme/styles/display/virtual-list.css +29 -0
- package/templates/theme/styles/display/virtual-table.css +68 -0
- package/templates/theme/styles/forms/checkbox.css +2 -1
- package/templates/theme/styles/forms/field.css +22 -0
- package/templates/theme/styles/forms/form.css +1 -1
- package/templates/theme/styles/forms/input-group.css +202 -0
- package/templates/theme/styles/forms/input.css +22 -6
- package/templates/theme/styles/forms/label.css +2 -0
- package/templates/theme/styles/forms/radio-group.css +22 -13
- package/templates/theme/styles/forms/select.css +71 -26
- package/templates/theme/styles/forms/slider.css +32 -16
- package/templates/theme/styles/forms/switch.css +2 -1
- package/templates/theme/styles/forms/textarea.css +35 -6
- package/templates/theme/styles/layout/aspect-ratio.css +3 -1
- package/templates/theme/styles/layout/block.css +23 -0
- package/templates/theme/styles/layout/patterns.css +155 -3
- package/templates/theme/styles/layout/responsive-layout.css +140 -121
- package/templates/theme/styles/navigation/breadcrumb.css +22 -8
- package/templates/theme/styles/navigation/menu.css +150 -7
- package/templates/theme/styles/navigation/menubar.css +194 -28
- package/templates/theme/styles/navigation/nav.css +231 -0
- package/templates/theme/styles/navigation/pagination.css +91 -0
- package/templates/theme/styles/overlays/alert-dialog.css +1 -1
- package/templates/theme/styles/overlays/dialog.css +42 -10
- package/templates/theme/styles/overlays/dropdown.css +160 -0
- package/templates/theme/styles/overlays/hover-card.css +28 -3
- package/templates/theme/styles/overlays/popover.css +50 -6
- package/templates/theme/styles/overlays/toast.css +66 -17
- package/templates/theme/styles/overlays/tooltip.css +45 -18
- package/templates/theme/styles/shell/header.css +18 -3
- package/templates/theme/styles/shell/navbar.css +434 -73
- package/templates/theme/styles/shell/sidebar.css +809 -0
- package/templates/theme/styles/shell/theme.css +7 -5
- package/templates/theme/tokens.css +186 -123
- package/dist/_internal/box-layout.js.map +0 -1
- package/dist/_internal/classes.js.map +0 -1
- package/dist/_internal/jsx.js.map +0 -1
- package/dist/_internal/layout.d.ts +0 -9
- package/dist/_internal/layout.js.map +0 -1
- package/dist/_internal/merge-props.js.map +0 -1
- package/dist/accessible-icon/accessible-icon.d.ts +0 -7
- package/dist/accessible-icon/accessible-icon.js +0 -20
- package/dist/accessible-icon/accessible-icon.js.map +0 -1
- package/dist/accessible-icon/accessible-icon.types.d.ts +0 -9
- package/dist/aspect-ratio/aspect-ratio.d.ts +0 -8
- package/dist/aspect-ratio/aspect-ratio.js +0 -36
- package/dist/aspect-ratio/aspect-ratio.js.map +0 -1
- package/dist/aspect-ratio/aspect-ratio.types.d.ts +0 -20
- package/dist/aspect-ratio/index.d.ts +0 -2
- package/dist/badge/badge.d.ts +0 -8
- package/dist/badge/badge.js.map +0 -1
- package/dist/badge/badge.types.d.ts +0 -20
- package/dist/badge/index.d.ts +0 -2
- package/dist/box/box.d.ts +0 -9
- package/dist/box/box.js.map +0 -1
- package/dist/box/box.types.d.ts +0 -71
- package/dist/box/index.d.ts +0 -2
- package/dist/breadcrumb/breadcrumb.d.ts +0 -18
- package/dist/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/breadcrumb/breadcrumb.types.d.ts +0 -64
- package/dist/breadcrumb/index.d.ts +0 -2
- package/dist/card/card.d.ts +0 -12
- package/dist/card/card.js +0 -68
- package/dist/card/card.js.map +0 -1
- package/dist/card/card.types.d.ts +0 -37
- package/dist/card/index.d.ts +0 -2
- package/dist/components/_internal/box-layout.d.ts +0 -7
- package/dist/components/_internal/classes.d.ts +0 -1
- package/dist/components/_internal/jsx.d.ts +0 -8
- package/dist/components/_internal/merge-props.d.ts +0 -1
- package/dist/components/_internal/style.d.ts +0 -1
- package/dist/components/accessible-icon/accessible-icon.d.ts +0 -2
- package/dist/components/accessible-icon/accessible-icon.types.d.ts +0 -5
- package/dist/components/accessible-icon/index.d.ts +0 -2
- package/dist/components/grid/grid.a11y.d.ts +0 -21
- package/dist/components/grid/grid.d.ts +0 -4
- package/dist/components/grid/grid.types.d.ts +0 -37
- package/dist/components/grid/index.d.ts +0 -3
- package/dist/components/header/index.d.ts +0 -3
- package/dist/components/index.d.ts +0 -49
- package/dist/components/index.js +0 -28
- package/dist/components/logos/create-logo.d.ts +0 -5
- package/dist/components/logos/github-logo.d.ts +0 -4
- package/dist/components/logos/google-logo.d.ts +0 -4
- package/dist/components/logos/index.d.ts +0 -5
- package/dist/components/logos/microsoft-logo.d.ts +0 -4
- package/dist/components/logos/types.d.ts +0 -14
- package/dist/components/sidebar-layout/index.d.ts +0 -3
- package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +0 -15
- package/dist/components/sidebar-layout/sidebar-layout.d.ts +0 -2
- package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +0 -20
- package/dist/components/topbar-layout/index.d.ts +0 -3
- package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +0 -13
- package/dist/components/topbar-layout/topbar-layout.d.ts +0 -2
- package/dist/components/topbar-layout/topbar-layout.types.d.ts +0 -12
- package/dist/container/container.d.ts +0 -8
- package/dist/container/container.js.map +0 -1
- package/dist/container/container.types.d.ts +0 -28
- package/dist/container/index.d.ts +0 -2
- package/dist/empty-state/empty-state.d.ts +0 -7
- package/dist/empty-state/empty-state.js.map +0 -1
- package/dist/empty-state/empty-state.types.d.ts +0 -13
- package/dist/flex/flex.d.ts +0 -9
- package/dist/flex/flex.js.map +0 -1
- package/dist/flex/flex.types.d.ts +0 -41
- package/dist/flex/index.d.ts +0 -2
- package/dist/grid/grid.d.ts +0 -9
- package/dist/grid/grid.js +0 -115
- package/dist/grid/grid.js.map +0 -1
- package/dist/grid/grid.types.d.ts +0 -40
- package/dist/grid/index.d.ts +0 -2
- package/dist/header/header.d.ts +0 -7
- package/dist/header/header.js.map +0 -1
- package/dist/header/header.types.d.ts +0 -9
- package/dist/inline/index.d.ts +0 -7
- package/dist/inline/index.js.map +0 -1
- package/dist/logos/create-logo.d.ts +0 -1
- package/dist/logos/create-logo.js +0 -75
- package/dist/logos/create-logo.js.map +0 -1
- package/dist/logos/github-logo.d.ts +0 -18
- package/dist/logos/github-logo.js +0 -9
- package/dist/logos/github-logo.js.map +0 -1
- package/dist/logos/google-logo.d.ts +0 -18
- package/dist/logos/google-logo.js +0 -23
- package/dist/logos/google-logo.js.map +0 -1
- package/dist/logos/index.d.ts +0 -4
- package/dist/logos/microsoft-logo.d.ts +0 -18
- package/dist/logos/microsoft-logo.js +0 -35
- package/dist/logos/microsoft-logo.js.map +0 -1
- package/dist/logos/types.d.ts +0 -16
- package/dist/navbar/index.d.ts +0 -2
- package/dist/navbar/navbar.d.ts +0 -12
- package/dist/navbar/navbar.js +0 -103
- package/dist/navbar/navbar.js.map +0 -1
- package/dist/navbar/navbar.types.d.ts +0 -31
- package/dist/section/index.d.ts +0 -2
- package/dist/section/section.d.ts +0 -8
- package/dist/section/section.js.map +0 -1
- package/dist/section/section.types.d.ts +0 -22
- package/dist/separator/index.d.ts +0 -2
- package/dist/separator/separator.d.ts +0 -8
- package/dist/separator/separator.js.map +0 -1
- package/dist/separator/separator.types.d.ts +0 -21
- package/dist/sidebar-layout/index.d.ts +0 -2
- package/dist/sidebar-layout/sidebar-layout.d.ts +0 -7
- package/dist/sidebar-layout/sidebar-layout.js +0 -51
- package/dist/sidebar-layout/sidebar-layout.js.map +0 -1
- package/dist/sidebar-layout/sidebar-layout.types.d.ts +0 -20
- package/dist/skeleton/index.d.ts +0 -2
- package/dist/skeleton/skeleton.d.ts +0 -8
- package/dist/skeleton/skeleton.js.map +0 -1
- package/dist/skeleton/skeleton.types.d.ts +0 -18
- package/dist/spacer/index.d.ts +0 -2
- package/dist/spacer/spacer.d.ts +0 -8
- package/dist/spacer/spacer.js.map +0 -1
- package/dist/spacer/spacer.types.d.ts +0 -25
- package/dist/spinner/index.d.ts +0 -2
- package/dist/spinner/spinner.d.ts +0 -7
- package/dist/spinner/spinner.js.map +0 -1
- package/dist/spinner/spinner.types.d.ts +0 -10
- package/dist/stack/index.d.ts +0 -2
- package/dist/stack/stack.d.ts +0 -8
- package/dist/stack/stack.js.map +0 -1
- package/dist/stack/stack.types.d.ts +0 -21
- package/dist/theme/index.d.ts +0 -1
- package/dist/theme/theme.d.ts +0 -44
- package/dist/theme/theme.js.map +0 -1
- package/dist/topbar-layout/index.d.ts +0 -2
- package/dist/topbar-layout/topbar-layout.d.ts +0 -7
- package/dist/topbar-layout/topbar-layout.js +0 -37
- package/dist/topbar-layout/topbar-layout.js.map +0 -1
- package/dist/topbar-layout/topbar-layout.types.d.ts +0 -13
- package/src/askr-compat.d.ts +0 -110
- package/src/askr-router.d.ts +0 -16
- package/src/components/accessible-icon/accessible-icon.tsx +0 -18
- package/src/components/accessible-icon/accessible-icon.types.ts +0 -5
- package/src/components/accessible-icon/index.ts +0 -2
- package/src/components/grid/grid.a11y.ts +0 -22
- package/src/components/grid/grid.tsx +0 -172
- package/src/components/grid/grid.types.ts +0 -45
- package/src/components/grid/index.ts +0 -10
- package/src/components/index.ts +0 -108
- package/src/components/logos/create-logo.tsx +0 -103
- package/src/components/logos/github-logo.tsx +0 -13
- package/src/components/logos/google-logo.tsx +0 -34
- package/src/components/logos/index.ts +0 -5
- package/src/components/logos/microsoft-logo.tsx +0 -10
- package/src/components/logos/types.ts +0 -24
- package/src/components/sidebar-layout/index.ts +0 -6
- package/src/components/sidebar-layout/sidebar-layout.a11y.ts +0 -16
- package/src/components/sidebar-layout/sidebar-layout.tsx +0 -59
- package/src/components/sidebar-layout/sidebar-layout.types.ts +0 -22
- package/src/components/topbar-layout/index.ts +0 -3
- package/src/components/topbar-layout/topbar-layout.a11y.ts +0 -14
- package/src/components/topbar-layout/topbar-layout.tsx +0 -39
- package/src/components/topbar-layout/topbar-layout.types.ts +0 -13
- package/src/themes/default/styles/layout/dashboard-layout.css +0 -15
- package/src/themes/default/styles/layout/docs-layout.css +0 -10
- package/src/themes/default/styles/layout/sidebar.css +0 -10
- package/src/themes/default/styles/navigation/navigation-menu.css +0 -90
- package/src/themes/default/styles/navigation/tabs.css +0 -61
- package/src/themes/default/styles/overlays/dropdown-menu.css +0 -109
- package/templates/theme/styles/layout/dashboard-layout.css +0 -16
- package/templates/theme/styles/layout/docs-layout.css +0 -11
- package/templates/theme/styles/layout/sidebar.css +0 -11
- package/templates/theme/styles/navigation/navigation-menu.css +0 -90
- package/templates/theme/styles/navigation/tabs.css +0 -61
- package/templates/theme/styles/overlays/dropdown-menu.css +0 -109
- /package/dist/{_internal → components/_internal}/classes.js +0 -0
- /package/dist/{_internal → components/_internal}/jsx.js +0 -0
- /package/dist/{breadcrumb → components/breadcrumb}/breadcrumb.js +0 -0
- /package/dist/{empty-state → components/empty-state}/empty-state.js +0 -0
- /package/dist/{header → components/header}/header.js +0 -0
- /package/dist/{inline → components/inline}/index.js +0 -0
- /package/dist/{separator → components/separator}/separator.js +0 -0
- /package/dist/{skeleton → components/skeleton}/skeleton.js +0 -0
- /package/dist/{spinner → components/spinner}/spinner.js +0 -0
- /package/dist/{stack → components/stack}/stack.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar.js","names":[],"sources":["../../../src/components/navbar/navbar.tsx"],"sourcesContent":["import { state } from \"@askrjs/askr\";\nimport { classes } from \"../_internal/classes\";\nimport { isJsxElement, toChildArray } from \"../_internal/jsx\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n renderKeyedShellChildren,\n ShellPanelWatcher,\n ShellResponsiveWatcher,\n} from \"../shell/shell-responsive\";\nimport { renderNavbarCollapseContents } from \"./navbar.render\";\nimport { NavbarPanel } from \"./navbar-panel\";\nimport { NavbarResponsiveContext } from \"./navbar.context\";\nimport { isNavbarCollapsed, resolveNavGroupAlign } from \"./navbar.shared\";\nimport type { NavBrandProps, NavGroupProps, NavToggleProps, NavbarProps } from \"./navbar.types\";\n\n/**\n * Extracts the first NavBrand child to display in the mobile panel.\n * NavBrand should be the first child of Navbar for it to appear in the mobile menu.\n */\nfunction findNavbarBrand(children: unknown): unknown {\n return toChildArray(children).find((child) => isJsxElement(child) && child.type === NavBrand);\n}\n\nfunction withoutNavbarBrand(children: unknown): unknown[] {\n return toChildArray(children).filter(\n (child) => !(isJsxElement(child) && child.type === NavBrand),\n );\n}\n\n/**\n * Responsive mobile-first navbar component.\n *\n * Composition: Navbar should contain NavBrand (extracted to mobile panel), NavGroup items with optional align,\n * and NavLink children. Brand must be first child to appear in mobile menu.\n *\n * @example\n * <Navbar breakpoint=\"md\" aria-label=\"Main navigation\">\n * <NavBrand><a href=\"/\">Logo</a></NavBrand>\n * <NavGroup align=\"center\">\n * <NavLink href=\"/docs\">Docs</NavLink>\n * </NavGroup>\n * <NavGroup align=\"end\">\n * <NavLink href=\"/settings\">Settings</NavLink>\n * </NavGroup>\n * </Navbar>\n */\nexport function Navbar(props: NavbarProps): JSX.Element {\n const {\n children,\n breakpoint,\n collapseIcon,\n collapseIconPlacement = \"start\",\n collapseLabel,\n ref,\n class: className,\n id,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n const effectiveCollapseLabel = collapseLabel ?? \"Menu\";\n const responsiveChildren = toChildArray(children);\n const desktopChildren = renderKeyedShellChildren(responsiveChildren, \"navbar-desktop\");\n const panelChildren = renderKeyedShellChildren(\n withoutNavbarBrand(responsiveChildren),\n \"navbar-panel\",\n );\n // Extract brand to display in mobile panel header\n const responsiveCollapsedState =\n breakpoint !== undefined ? state(isNavbarCollapsed(breakpoint)) : undefined;\n const mobileMenuState = state(false);\n const mobileMenuOpen = mobileMenuState();\n const panelId = typeof id === \"string\" ? `${id}-panel` : undefined;\n const responsiveCollapsed = breakpoint !== undefined ? responsiveCollapsedState?.() : false;\n const panelOpen = Boolean(responsiveCollapsed && mobileMenuOpen);\n const closePanel = () => mobileMenuState.set(false);\n const closePanelOnNavActivation = (event: MouseEvent) => {\n const target = event.target;\n\n if (!(target instanceof Element)) {\n return;\n }\n\n if (target.closest('a[data-slot=\"nav-link\"], a[data-slot=\"nav-item\"], a.navbar-item')) {\n closePanel();\n }\n };\n const togglePanel = () => {\n mobileMenuState.set(!mobileMenuState());\n };\n const contextValue = {\n active: () => breakpoint !== undefined,\n collapseLabel: () => effectiveCollapseLabel,\n closePanel,\n panelId: () => panelId,\n panelOpen: () => Boolean(responsiveCollapsedState?.() && mobileMenuOpen),\n togglePanel,\n };\n const panelBrand = findNavbarBrand(responsiveChildren);\n const finalProps = mergeProps(rest, {\n \"aria-label\": ariaLabel,\n ref,\n class: classes(\"navbar\", className),\n \"data-collapse-below\": breakpoint,\n \"data-responsive-collapsed\": responsiveCollapsed ? \"true\" : \"false\",\n \"data-slot\": \"navbar\",\n });\n\n return (\n <NavbarResponsiveContext.Scope value={contextValue}>\n <nav {...finalProps}>\n {breakpoint !== undefined ? (\n <div class=\"navbar-mobile\" data-slot=\"navbar-mobile\">\n <NavToggle\n active={breakpoint !== undefined}\n aria-controls={panelId}\n aria-label={effectiveCollapseLabel}\n icon={collapseIcon}\n iconPlacement={collapseIconPlacement}\n label={effectiveCollapseLabel}\n onToggle={togglePanel}\n open={panelOpen}\n panelId={panelId}\n />\n </div>\n ) : null}\n\n <div class=\"navbar-shell\" data-slot=\"navbar-shell\">\n {desktopChildren}\n </div>\n\n {breakpoint !== undefined ? (\n <NavbarPanel\n active={breakpoint !== undefined}\n brand={panelBrand}\n collapseLabel={effectiveCollapseLabel}\n onClose={closePanel}\n onClick={closePanelOnNavActivation}\n open={panelOpen}\n panelId={panelId}\n >\n {panelChildren}\n </NavbarPanel>\n ) : null}\n\n {responsiveCollapsed && mobileMenuOpen ? (\n <button\n aria-label={`Close ${effectiveCollapseLabel}`}\n class=\"navbar-backdrop\"\n data-slot=\"navbar-backdrop\"\n data-state=\"open\"\n tabIndex={-1}\n type=\"button\"\n onClick={closePanel}\n />\n ) : null}\n\n {breakpoint !== undefined ? (\n <ShellResponsiveWatcher\n breakpoint={breakpoint}\n isCollapsed={isNavbarCollapsed}\n onResize={(nextCollapsed) => {\n responsiveCollapsedState?.set(nextCollapsed);\n }}\n onExpand={() => {\n mobileMenuState?.set(false);\n }}\n />\n ) : null}\n\n <ShellPanelWatcher\n contentId={panelId}\n open={panelOpen}\n panelSlot=\"navbar-panel\"\n onClose={closePanel}\n />\n </nav>\n </NavbarResponsiveContext.Scope>\n );\n}\n\n/**\n * Menu toggle button for responsive navbar collapse.\n * Auto-renders when navbar is responsive (collapseBelow set).\n */\nexport function NavToggle(props: NavToggleProps): JSX.Element | null {\n const {\n children,\n class: className,\n active,\n icon,\n iconPlacement = \"start\",\n label = \"Menu\",\n ref,\n onToggle,\n open,\n panelId,\n ...rest\n } = props;\n\n if (active === false) {\n return null;\n }\n\n const isOpen = open === true;\n\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"navbar-toggle\", className),\n \"aria-controls\": panelId,\n \"aria-expanded\": isOpen ? \"true\" : \"false\",\n \"aria-label\": label,\n \"data-slot\": \"navbar-toggle\",\n \"data-state\": isOpen ? \"open\" : \"closed\",\n type: \"button\",\n onClick: () => onToggle?.(),\n });\n\n return (\n <button {...finalProps}>\n {children ?? renderNavbarCollapseContents(label, icon, iconPlacement)}\n </button>\n );\n}\n\n/**\n * Brand/logo container displayed in navbar and mobile panel header.\n */\nexport function NavBrand(props: NavBrandProps): JSX.Element {\n const { children, ref, class: className, ...rest } = props;\n\n return (\n <div {...rest} ref={ref} class={classes(\"navbar-brand\", className)} data-slot=\"navbar-brand\">\n {children}\n </div>\n );\n}\n\n/**\n * Navigation group for organizing related nav items.\n *\n * @param align - Alignment: \"start\" (default), \"center\", or \"end\". Using align=\"end\" automatically right-aligns the group.\n * @param label - Optional accessible label for grouped items.\n *\n * @example\n * <NavGroup align=\"center\">\n * <NavLink href=\"/docs\">Docs</NavLink>\n * </NavGroup>\n */\nexport function NavGroup(props: NavGroupProps): JSX.Element {\n const { children, id, ref, class: className, label, ...rest } = props;\n const rawAlign = (rest as Record<string, unknown>)[\"data-align\"];\n const align =\n props.align ??\n (rawAlign === \"start\" || rawAlign === \"center\" || rawAlign === \"end\"\n ? (rawAlign as NavGroupProps[\"align\"])\n : undefined);\n const hasLabel = label !== undefined && label !== null;\n const labelId = hasLabel && id ? `${id}-label` : undefined;\n const accessibleLabel = typeof label === \"string\" ? label : undefined;\n\n return (\n <div\n {...rest}\n id={id}\n ref={ref}\n class={classes(\"navbar-group\", className)}\n aria-label={labelId ? undefined : accessibleLabel}\n aria-labelledby={labelId}\n role={hasLabel ? \"group\" : rest.role}\n data-align={resolveNavGroupAlign(align)}\n data-has-label={hasLabel ? \"true\" : undefined}\n data-slot=\"navbar-group\"\n >\n {hasLabel ? (\n <>\n <div id={labelId} class=\"navbar-group-label\" data-slot=\"navbar-group-label\">\n {label}\n </div>\n <div class=\"navbar-group-body\" data-slot=\"navbar-group-body\">\n {children}\n </div>\n </>\n ) : (\n children\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,SAAS,gBAAgB,UAA4B;CACnD,OAAO,aAAa,SAAS,CAAC,MAAM,UAAU,aAAa,MAAM,IAAI,MAAM,SAAS,SAAS;;AAG/F,SAAS,mBAAmB,UAA8B;CACxD,OAAO,aAAa,SAAS,CAAC,QAC3B,UAAU,EAAE,aAAa,MAAM,IAAI,MAAM,SAAS,UACpD;;;;;;;;;;;;;;;;;;;AAoBH,SAAgB,OAAO,OAAiC;CACtD,MAAM,EACJ,UACA,YACA,cACA,wBAAwB,SACxB,eACA,KACA,OAAO,WACP,IACA,cAAc,WACd,GAAG,SACD;CACJ,MAAM,yBAAyB,iBAAiB;CAChD,MAAM,qBAAqB,aAAa,SAAS;CACjD,MAAM,kBAAkB,yBAAyB,oBAAoB,iBAAiB;CACtF,MAAM,gBAAgB,yBACpB,mBAAmB,mBAAmB,EACtC,eACD;CAED,MAAM,2BACJ,eAAe,KAAA,IAAY,MAAM,kBAAkB,WAAW,CAAC,GAAG,KAAA;CACpE,MAAM,kBAAkB,MAAM,MAAM;CACpC,MAAM,iBAAiB,iBAAiB;CACxC,MAAM,UAAU,OAAO,OAAO,WAAW,GAAG,GAAG,UAAU,KAAA;CACzD,MAAM,sBAAsB,eAAe,KAAA,IAAY,4BAA4B,GAAG;CACtF,MAAM,YAAY,QAAQ,uBAAuB,eAAe;CAChE,MAAM,mBAAmB,gBAAgB,IAAI,MAAM;CACnD,MAAM,6BAA6B,UAAsB;EACvD,MAAM,SAAS,MAAM;EAErB,IAAI,EAAE,kBAAkB,UACtB;EAGF,IAAI,OAAO,QAAQ,sEAAkE,EACnF,YAAY;;CAGhB,MAAM,oBAAoB;EACxB,gBAAgB,IAAI,CAAC,iBAAiB,CAAC;;CAEzC,MAAM,eAAe;EACnB,cAAc,eAAe,KAAA;EAC7B,qBAAqB;EACrB;EACA,eAAe;EACf,iBAAiB,QAAQ,4BAA4B,IAAI,eAAe;EACxE;EACD;CACD,MAAM,aAAa,gBAAgB,mBAAmB;CACtD,MAAM,aAAa,WAAW,MAAM;EAClC,cAAc;EACd;EACA,OAAO,QAAQ,UAAU,UAAU;EACnC,uBAAuB;EACvB,6BAA6B,sBAAsB,SAAS;EAC5D,aAAa;EACd,CAAC;CAEF,OACE,oBAAC,wBAAwB,OAAzB;EAA+B,OAAO;YACpC,qBAAC,OAAD;GAAK,GAAI;aAAT;IACG,eAAe,KAAA,IACd,oBAAC,OAAD;KAAK,OAAM;KAAgB,aAAU;eACnC,oBAAC,WAAD;MACE,QAAQ,eAAe,KAAA;MACvB,iBAAe;MACf,cAAY;MACZ,MAAM;MACN,eAAe;MACf,OAAO;MACP,UAAU;MACV,MAAM;MACG;MACT,CAAA;KACE,CAAA,GACJ;IAEJ,oBAAC,OAAD;KAAK,OAAM;KAAe,aAAU;eACjC;KACG,CAAA;IAEL,eAAe,KAAA,IACd,oBAAC,aAAD;KACE,QAAQ,eAAe,KAAA;KACvB,OAAO;KACP,eAAe;KACf,SAAS;KACT,SAAS;KACT,MAAM;KACG;eAER;KACW,CAAA,GACZ;IAEH,uBAAuB,iBACtB,oBAAC,UAAD;KACE,cAAY,SAAS;KACrB,OAAM;KACN,aAAU;KACV,cAAW;KACX,UAAU;KACV,MAAK;KACL,SAAS;KACT,CAAA,GACA;IAEH,eAAe,KAAA,IACd,oBAAC,wBAAD;KACc;KACZ,aAAa;KACb,WAAW,kBAAkB;MAC3B,0BAA0B,IAAI,cAAc;;KAE9C,gBAAgB;MACd,iBAAiB,IAAI,MAAM;;KAE7B,CAAA,GACA;IAEJ,oBAAC,mBAAD;KACE,WAAW;KACX,MAAM;KACN,WAAU;KACV,SAAS;KACT,CAAA;IACE;;EACwB,CAAA;;;;;;AAQpC,SAAgB,UAAU,OAA2C;CACnE,MAAM,EACJ,UACA,OAAO,WACP,QACA,MACA,gBAAgB,SAChB,QAAQ,QACR,KACA,UACA,MACA,SACA,GAAG,SACD;CAEJ,IAAI,WAAW,OACb,OAAO;CAGT,MAAM,SAAS,SAAS;CAcxB,OACE,oBAAC,UAAD;EAAQ,GAbS,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,iBAAiB,UAAU;GAC1C,iBAAiB;GACjB,iBAAiB,SAAS,SAAS;GACnC,cAAc;GACd,aAAa;GACb,cAAc,SAAS,SAAS;GAChC,MAAM;GACN,eAAe,YAAY;GAC5B,CAGuB;YACnB,YAAY,6BAA6B,OAAO,MAAM,cAAc;EAC9D,CAAA;;;;;AAOb,SAAgB,SAAS,OAAmC;CAC1D,MAAM,EAAE,UAAU,KAAK,OAAO,WAAW,GAAG,SAAS;CAErD,OACE,oBAAC,OAAD;EAAK,GAAI;EAAW;EAAK,OAAO,QAAQ,gBAAgB,UAAU;EAAE,aAAU;EAC3E;EACG,CAAA;;;;;;;;;;;;;AAeV,SAAgB,SAAS,OAAmC;CAC1D,MAAM,EAAE,UAAU,IAAI,KAAK,OAAO,WAAW,OAAO,GAAG,SAAS;CAChE,MAAM,WAAY,KAAiC;CACnD,MAAM,QACJ,MAAM,UACL,aAAa,WAAW,aAAa,YAAY,aAAa,QAC1D,WACD,KAAA;CACN,MAAM,WAAW,UAAU,KAAA,KAAa,UAAU;CAClD,MAAM,UAAU,YAAY,KAAK,GAAG,GAAG,UAAU,KAAA;CACjD,MAAM,kBAAkB,OAAO,UAAU,WAAW,QAAQ,KAAA;CAE5D,OACE,oBAAC,OAAD;EACE,GAAI;EACA;EACC;EACL,OAAO,QAAQ,gBAAgB,UAAU;EACzC,cAAY,UAAU,KAAA,IAAY;EAClC,mBAAiB;EACjB,MAAM,WAAW,UAAU,KAAK;EAChC,cAAY,qBAAqB,MAAM;EACvC,kBAAgB,WAAW,SAAS,KAAA;EACpC,aAAU;YAET,WACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAD;GAAK,IAAI;GAAS,OAAM;GAAqB,aAAU;aACpD;GACG,CAAA,EACN,oBAAC,OAAD;GAAK,OAAM;GAAoB,aAAU;GACtC;GACG,CAAA,CACL,EAAA,CAAA,GAEH;EAEE,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAQ,CAAA;IACR,oBAAC,QAAD,EAAQ,CAAA;IACR,oBAAC,QAAD,EAAQ,CAAA;IACH;;EAEJ,CAAA;CAET,MAAM,QAAQ,oBAAC,QAAD;EAAM,aAAU;YAAuB;EAAqB,CAAA;CAE1E,OAAO,0BAA0B,QAC/B,qBAAA,UAAA,EAAA,UAAA,CACG,OACA,KACA,EAAA,CAAA,GAEH,qBAAA,UAAA,EAAA,UAAA,CACG,MACA,MACA,EAAA,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;CACL;AAED,SAAgB,qBAAqB,OAAsD;CACzF,OAAO,UAAU,UAAU,KAAA,IAAY;;AAGzC,SAAgB,kBAAkB,eAA4C;CAC5E,IAAI,OAAO,WAAW,aACpB,OAAO;CAGT,OAAO,OAAO,aAAa,4BAA4B"}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NavItemAsChildProps, NavItemProps, NavItemVariant, NavLinkProps } from "../nav/nav.types.js";
|
|
2
|
+
import { CollapseBreakpoint, CollapseIconPlacement } from "../shell/shell-nav.types.js";
|
|
3
|
+
|
|
4
|
+
//#region src/components/navbar/navbar.types.d.ts
|
|
5
|
+
type NavGroupAlign = "start" | "center" | "end";
|
|
6
|
+
type NavbarProps = Omit<JSX.IntrinsicElements["nav"], "children"> & {
|
|
7
|
+
children?: unknown;
|
|
8
|
+
breakpoint?: CollapseBreakpoint;
|
|
9
|
+
collapseIcon?: unknown;
|
|
10
|
+
collapseIconPlacement?: CollapseIconPlacement;
|
|
11
|
+
collapseLabel?: string;
|
|
5
12
|
};
|
|
6
|
-
|
|
7
|
-
|
|
13
|
+
type NavBrandProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
|
|
14
|
+
children?: unknown;
|
|
8
15
|
};
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
type NavToggleProps = Omit<JSX.IntrinsicElements["button"], "children" | "type" | "onClick"> & {
|
|
17
|
+
children?: unknown;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
icon?: unknown;
|
|
20
|
+
iconPlacement?: CollapseIconPlacement;
|
|
21
|
+
label?: string;
|
|
22
|
+
onToggle?: () => void;
|
|
23
|
+
open?: boolean;
|
|
24
|
+
panelId?: string;
|
|
11
25
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
type NavGroupProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
|
|
27
|
+
align?: NavGroupAlign;
|
|
28
|
+
children?: unknown;
|
|
29
|
+
label?: unknown;
|
|
16
30
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
export type NavItemAsChildProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & NavItemOwnProps & {
|
|
22
|
-
asChild: true;
|
|
23
|
-
children: JSXElement;
|
|
24
|
-
ref?: Ref<unknown>;
|
|
25
|
-
};
|
|
26
|
-
export type NavLinkProps = LinkProps & NavItemOwnProps;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { NavBrandProps, NavGroupProps, NavToggleProps, NavbarProps };
|
|
33
|
+
//# sourceMappingURL=navbar.types.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownContentAsChildProps, DropdownContentProps } from "@askrjs/ui";
|
|
2
|
+
|
|
3
|
+
//#region src/components/overlays/dropdown-content.d.ts
|
|
4
|
+
declare function DropdownContent$1(props: DropdownContentProps): JSX.Element | null;
|
|
5
|
+
declare function DropdownContent$1(props: DropdownContentAsChildProps): JSX.Element | null;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { DropdownContent$1 as DropdownContent };
|
|
8
|
+
//# sourceMappingURL=dropdown-content.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DropdownContent } from "@askrjs/ui";
|
|
2
|
+
import { Fragment, jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
|
+
//#region src/components/overlays/dropdown-content.tsx
|
|
4
|
+
function DropdownContentBody(props) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.render() });
|
|
6
|
+
}
|
|
7
|
+
function DropdownContent$1(props) {
|
|
8
|
+
if ("asChild" in props && props.asChild) return /* @__PURE__ */ jsx(DropdownContent, { ...props });
|
|
9
|
+
const { children, ...rest } = props;
|
|
10
|
+
return /* @__PURE__ */ jsx(DropdownContent, {
|
|
11
|
+
...rest,
|
|
12
|
+
children: /* @__PURE__ */ jsx(DropdownContentBody, { render: () => children })
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DropdownContent$1 as DropdownContent };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=dropdown-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-content.js","names":["DropdownContent","UiDropdownContent"],"sources":["../../../src/components/overlays/dropdown-content.tsx"],"sourcesContent":["import { DropdownContent as UiDropdownContent } from \"@askrjs/ui\";\nimport type { DropdownContentAsChildProps, DropdownContentProps } from \"@askrjs/ui\";\n\ntype DropdownContentBodyProps = {\n render: () => unknown;\n};\n\nfunction DropdownContentBody(props: DropdownContentBodyProps): JSX.Element {\n return <>{props.render()}</>;\n}\n\nexport function DropdownContent(props: DropdownContentProps): JSX.Element | null;\nexport function DropdownContent(props: DropdownContentAsChildProps): JSX.Element | null;\nexport function DropdownContent(\n props: DropdownContentProps | DropdownContentAsChildProps,\n): JSX.Element | null {\n if (\"asChild\" in props && props.asChild) {\n return <UiDropdownContent {...props} />;\n }\n\n const { children, ...rest } = props as DropdownContentProps;\n\n return (\n <UiDropdownContent {...rest}>\n <DropdownContentBody render={() => children} />\n </UiDropdownContent>\n );\n}\n"],"mappings":";;;AAOA,SAAS,oBAAoB,OAA8C;CACzE,OAAO,oBAAA,UAAA,EAAA,UAAG,MAAM,QAAQ,EAAI,CAAA;;AAK9B,SAAgBA,kBACd,OACoB;CACpB,IAAI,aAAa,SAAS,MAAM,SAC9B,OAAO,oBAACC,iBAAD,EAAmB,GAAI,OAAS,CAAA;CAGzC,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OACE,oBAACA,iBAAD;EAAmB,GAAI;YACrB,oBAAC,qBAAD,EAAqB,cAAc,UAAY,CAAA;EAC7B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;AAIX,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,UAAU;EACvC,cAAY;EACZ,aAAU;YAEV,oBAAC,MAAD;GAAI,OAAM;GAAkB,aAAU;GACnC;GACE,CAAA;EACD,CAAA;;AAMV,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,UACD;EACD;EACA,gBAAgB,SAAS,SAAS,KAAA;EAClC,iBAAiB,WAAW,SAAS,KAAA;EACrC,eAAe,SAAS,SAAS,KAAA;EACjC,iBAAiB,WAAW,SAAS,KAAA;EACrC,aAAa;EACd,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;EAAc,CAAA;;AAG5C,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,UAAU;CACjD,MAAM,WAAW;CAEjB,MAAM,YAAY,WAAW,MAAM;EACjC;EACA,QAAQ;EACR;EACA,OAAO,QACL,aACA,SAAS,WAAW,KAAA,GACpB,WAAW,aAAa,KAAA,GACxB,UACD;EACD,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;EAC3B,CAAC;CAEF,MAAM,eAAe,UAAsB;EACzC,UAAU,MAAM;EAEhB,IAAI,YAAY,CAAC,6BAA6B,OAAO,aAAa,eAAe,EAAE;GACjF,IAAI,UACF,MAAM,gBAAgB;GAGxB;;EAGF,MAAM,gBAAgB;EACtB,SAAS,UAAU;;CAGrB,OACE,oBAAC,KAAD;EAAG,GAAI;EAAW,SAAS;EACxB;EACC,CAAA;;AAIR,SAAgB,mBAAmB,OAA6C;CAC9E,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAErD,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,OAAO,QAAQ,uBAAuB,UAAU;EAChD,eAAY;EACZ,aAAU;YAET,YAAY;EACR,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SectionAsChildProps, SectionElementProps, SectionOwnProps, SectionProps } from "./section.types.js";
|
|
2
|
+
import { Section } from "./section.js";
|
|
3
|
+
import { SECTION_A11Y_CONTRACT, SectionA11yContract } from "./section.a11y.js";
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
+
};
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
type SectionA11yContract = typeof SECTION_A11Y_CONTRACT;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SECTION_A11Y_CONTRACT, SectionA11yContract };
|
|
15
|
+
//# sourceMappingURL=section.a11y.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SectionAsChildProps, SectionElementProps } from "./section.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/section/section.d.ts
|
|
4
|
+
declare function Section(props: SectionElementProps): JSX.Element;
|
|
5
|
+
declare function Section(props: SectionAsChildProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Section };
|
|
8
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
2
|
import { serializeResponsiveValueIf } from "../_internal/layout.js";
|
|
3
|
-
import { applyBoxLayoutStyles, splitBoxLayoutProps,
|
|
3
|
+
import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutClass } from "../_internal/box-layout.js";
|
|
4
4
|
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
5
5
|
import { Slot } from "@askrjs/askr/foundations";
|
|
6
6
|
//#region src/components/section/section.tsx
|
|
@@ -17,12 +17,13 @@ function Section(props) {
|
|
|
17
17
|
const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
|
|
18
18
|
const layoutStyle = {};
|
|
19
19
|
applyBoxLayoutStyles(layoutStyle, boxProps);
|
|
20
|
+
const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);
|
|
20
21
|
const finalProps = mergeProps(passthroughProps, {
|
|
21
22
|
ref,
|
|
22
23
|
"data-slot": "section",
|
|
23
24
|
"data-ak-layout": "true",
|
|
24
25
|
"data-size": serializeResponsiveValueIf(size, isSectionSizeToken),
|
|
25
|
-
|
|
26
|
+
...layoutClass ? { class: layoutClass } : {}
|
|
26
27
|
});
|
|
27
28
|
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
28
29
|
asChild: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.js","names":[],"sources":["../../../src/components/section/section.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 { serializeResponsiveValueIf } from \"../_internal/layout\";\nimport type { SectionAsChildProps, SectionElementProps } from \"./section.types\";\n\nfunction isSectionSizeToken(value: unknown): value is string {\n return typeof value === \"string\" && [\"1\", \"2\", \"3\", \"4\"].includes(value.trim());\n}\n\nexport function Section(props: SectionElementProps): JSX.Element;\nexport function Section(props: SectionAsChildProps): JSX.Element;\nexport function Section(props: SectionElementProps | SectionAsChildProps) {\n const { asChild, children, size = \"3\", ref, style: userStyle, ...rest } = props;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {};\n applyBoxLayoutStyles(layoutStyle, boxProps);\n const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"section\",\n \"data-ak-layout\": \"true\",\n \"data-size\": serializeResponsiveValueIf(size, isSectionSizeToken),\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <section {...finalProps}>{children}</section>;\n}\n"],"mappings":";;;;;;AAUA,SAAS,mBAAmB,OAAiC;CAC3D,OAAO,OAAO,UAAU,YAAY;EAAC;EAAK;EAAK;EAAK;EAAI,CAAC,SAAS,MAAM,MAAM,CAAC;;AAKjF,SAAgB,QAAQ,OAAkD;CACxE,MAAM,EAAE,SAAS,UAAU,OAAO,KAAK,KAAK,OAAO,WAAW,GAAG,SAAS;CAE1E,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,KAAK;CACtE,MAAM,cAA+C,EAAE;CACvD,qBAAqB,aAAa,SAAS;CAC3C,MAAM,cAAc,mBAAmB,aAAa,UAAU;CAE9D,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,aAAa,2BAA2B,MAAM,mBAAmB;EACjE,GAAI,cAAc,EAAE,OAAO,aAAa,GAAG,EAAE;EAC9C,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,WAAD;EAAS,GAAI;EAAa;EAAmB,CAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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/section/section.types.d.ts
|
|
6
|
+
type SectionOwnProps = BoxLayoutOwnProps & {
|
|
7
|
+
size?: LayoutResponsive<"1" | "2" | "3" | "4">;
|
|
8
|
+
children?: unknown;
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
type SectionElementProps = Omit<JSX.IntrinsicElements["section"], "children" | "ref"> & SectionOwnProps & {
|
|
11
|
+
asChild?: false;
|
|
12
|
+
ref?: Ref<HTMLElement>;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type SectionAsChildProps = SectionOwnProps & {
|
|
15
|
+
asChild: true;
|
|
16
|
+
children: JSXElement;
|
|
17
|
+
ref?: Ref<unknown>;
|
|
18
|
+
style?: JSX.IntrinsicElements["section"]["style"];
|
|
16
19
|
};
|
|
17
|
-
|
|
20
|
+
type SectionProps = SectionElementProps | SectionAsChildProps;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { SectionAsChildProps, SectionElementProps, SectionOwnProps, SectionProps };
|
|
23
|
+
//# sourceMappingURL=section.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SeparatorAsChildProps, SeparatorNativeProps, SeparatorOwnProps, SeparatorProps } from "./separator.types.js";
|
|
2
|
+
import { Separator } from "./separator.js";
|
|
3
|
+
import { SEPARATOR_A11Y_CONTRACT, SeparatorA11yContract } from "./separator.a11y.js";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
//#region src/components/separator/separator.a11y.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* WAI-ARIA Separator Pattern.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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";
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
type SeparatorA11yContract = typeof SEPARATOR_A11Y_CONTRACT;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { SEPARATOR_A11Y_CONTRACT, SeparatorA11yContract };
|
|
17
|
+
//# sourceMappingURL=separator.a11y.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,oBACd;CACD,qBAAqB;CACtB"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { SeparatorAsChildProps, SeparatorNativeProps } from "./separator.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/separator/separator.d.ts
|
|
4
|
+
declare function Separator(props: SeparatorNativeProps): JSX.Element;
|
|
5
|
+
declare function Separator(props: SeparatorAsChildProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Separator };
|
|
8
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../../src/components/separator/separator.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { SeparatorAsChildProps, SeparatorNativeProps } from \"./separator.types\";\n\nexport function Separator(props: SeparatorNativeProps): JSX.Element;\nexport function Separator(props: SeparatorAsChildProps): JSX.Element;\nexport function Separator(props: SeparatorNativeProps | SeparatorAsChildProps) {\n const { asChild, children, decorative = false, orientation = \"horizontal\", ref, ...rest } = props;\n\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"separator\",\n \"data-orientation\": orientation,\n role: decorative ? \"presentation\" : \"separator\",\n \"aria-orientation\": decorative ? undefined : orientation,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;AAMA,SAAgB,UAAU,OAAqD;CAC7E,MAAM,EAAE,SAAS,UAAU,aAAa,OAAO,cAAc,cAAc,KAAK,GAAG,SAAS;CAE5F,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,oBAAoB;EACpB,MAAM,aAAa,iBAAiB;EACpC,oBAAoB,aAAa,KAAA,IAAY;EAC9C,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { JSXElement } from "@askrjs/askr/foundations";
|
|
2
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
+
|
|
4
|
+
//#region src/components/separator/separator.types.d.ts
|
|
5
|
+
type SeparatorOwnProps = {
|
|
6
|
+
decorative?: boolean;
|
|
7
|
+
orientation?: "horizontal" | "vertical";
|
|
8
|
+
children?: unknown;
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
type SeparatorNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & SeparatorOwnProps & {
|
|
11
|
+
asChild?: false;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type SeparatorAsChildProps = SeparatorOwnProps & {
|
|
15
|
+
asChild: true;
|
|
16
|
+
children: JSXElement;
|
|
17
|
+
ref?: Ref<unknown>;
|
|
15
18
|
};
|
|
16
|
-
|
|
19
|
+
type SeparatorProps = SeparatorNativeProps | SeparatorAsChildProps;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { SeparatorAsChildProps, SeparatorNativeProps, SeparatorOwnProps, SeparatorProps };
|
|
22
|
+
//# sourceMappingURL=separator.types.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
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";
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|