@askrjs/themes 0.0.2 → 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 +65 -25
- 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 +262 -53
- 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 -73
- 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,33 @@
|
|
|
1
|
+
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
|
+
import { mergeLayoutStyles } from "../_internal/layout.js";
|
|
3
|
+
import { styleDeclarationsToClass } from "../_internal/style.js";
|
|
4
|
+
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
5
|
+
import { Slot } from "@askrjs/askr/foundations";
|
|
6
|
+
//#region src/components/aspect-ratio/aspect-ratio.tsx
|
|
7
|
+
function AspectRatio(props) {
|
|
8
|
+
const { asChild, children, ratio = 1, ref, style, ...rest } = props;
|
|
9
|
+
const layoutClass = styleDeclarationsToClass(mergeLayoutStyles({
|
|
10
|
+
display: "block",
|
|
11
|
+
width: "100%",
|
|
12
|
+
aspectRatio: String(ratio),
|
|
13
|
+
overflow: "hidden"
|
|
14
|
+
}, style));
|
|
15
|
+
const finalProps = mergeProps(rest, {
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "aspect-ratio",
|
|
18
|
+
...layoutClass ? { class: layoutClass } : {}
|
|
19
|
+
});
|
|
20
|
+
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
21
|
+
asChild: true,
|
|
22
|
+
...finalProps,
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
...finalProps,
|
|
27
|
+
children
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { AspectRatio };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.js","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport { mergeLayoutStyles } from \"../_internal/layout\";\nimport { styleDeclarationsToClass } from \"../_internal/style\";\nimport type { AspectRatioAsChildProps, AspectRatioProps } from \"./aspect-ratio.types\";\n\nexport function AspectRatio(props: AspectRatioProps): JSX.Element;\nexport function AspectRatio(props: AspectRatioAsChildProps): JSX.Element;\nexport function AspectRatio(props: AspectRatioProps | AspectRatioAsChildProps) {\n const { asChild, children, ratio = 1, ref, style, ...rest } = props;\n const layoutClass = styleDeclarationsToClass(\n mergeLayoutStyles(\n {\n display: \"block\",\n width: \"100%\",\n aspectRatio: String(ratio),\n overflow: \"hidden\",\n },\n style,\n ),\n );\n\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"aspect-ratio\",\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAQA,SAAgB,YAAY,OAAmD;CAC7E,MAAM,EAAE,SAAS,UAAU,QAAQ,GAAG,KAAK,OAAO,GAAG,SAAS;CAC9D,MAAM,cAAc,yBAClB,kBACE;EACE,SAAS;EACT,OAAO;EACP,aAAa,OAAO,MAAM;EAC1B,UAAU;EACX,EACD,MACD,CACF;CAED,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,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,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -1,15 +1,21 @@
|
|
|
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/aspect-ratio/aspect-ratio.types.d.ts
|
|
5
|
+
type AspectRatioOwnProps = {
|
|
6
|
+
children?: unknown;
|
|
7
|
+
ratio?: number | string;
|
|
8
|
+
style?: unknown;
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
type AspectRatioProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & AspectRatioOwnProps & {
|
|
11
|
+
asChild?: false;
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type AspectRatioAsChildProps = AspectRatioOwnProps & {
|
|
15
|
+
asChild: true;
|
|
16
|
+
children: JSXElement;
|
|
17
|
+
ref?: Ref<unknown>;
|
|
15
18
|
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { AspectRatioAsChildProps, AspectRatioProps };
|
|
21
|
+
//# sourceMappingURL=aspect-ratio.types.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { AspectRatioAsChildProps, AspectRatioProps } from "./aspect-ratio.types.js";
|
|
2
|
+
import { AspectRatio } from "./aspect-ratio.js";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
//#region src/components/badge/badge.a11y.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Accessibility contract for Badge.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
declare const BADGE_A11Y_CONTRACT: {
|
|
6
|
+
readonly DATA_ATTRIBUTES: {
|
|
7
|
+
readonly slot: "data-slot";
|
|
8
|
+
};
|
|
9
|
+
readonly MARKER: "data-badge";
|
|
10
|
+
readonly CONTENT: {
|
|
11
|
+
readonly textAllowed: true;
|
|
12
|
+
};
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
type BadgeA11yContract = typeof BADGE_A11Y_CONTRACT;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BADGE_A11Y_CONTRACT, BadgeA11yContract };
|
|
17
|
+
//# sourceMappingURL=badge.a11y.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { BadgeAsChildProps, BadgeProps } from "./badge.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/badge/badge.d.ts
|
|
4
|
+
declare function Badge(props: BadgeProps): JSX.Element;
|
|
5
|
+
declare function Badge(props: BadgeAsChildProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Badge };
|
|
8
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { classes } from "../_internal/classes.js";
|
|
1
2
|
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
3
|
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
4
|
import { Slot } from "@askrjs/askr/foundations";
|
|
4
5
|
//#region src/components/badge/badge.tsx
|
|
6
|
+
function normalizeBadgeVariant(variant) {
|
|
7
|
+
return variant && variant !== "default" ? `badge-${variant}` : void 0;
|
|
8
|
+
}
|
|
5
9
|
function Badge(props) {
|
|
6
10
|
const { asChild, children, variant, ref, ...rest } = props;
|
|
7
11
|
const finalProps = mergeProps(rest, {
|
|
12
|
+
class: classes("badge", normalizeBadgeVariant(variant)),
|
|
8
13
|
ref,
|
|
9
14
|
"data-slot": "badge",
|
|
10
15
|
"data-badge": "true",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","names":[],"sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { BadgeAsChildProps, BadgeProps } from \"./badge.types\";\n\nfunction normalizeBadgeVariant(variant: BadgeProps[\"variant\"] | undefined) {\n return variant && variant !== \"default\" ? `badge-${variant}` : undefined;\n}\n\nexport function Badge(props: BadgeProps): JSX.Element;\nexport function Badge(props: BadgeAsChildProps): JSX.Element;\nexport function Badge(props: BadgeProps | BadgeAsChildProps) {\n const { asChild, children, variant, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n class: classes(\"badge\", normalizeBadgeVariant(variant)),\n ref,\n \"data-slot\": \"badge\",\n \"data-badge\": \"true\",\n \"data-variant\": variant && variant !== \"default\" ? variant : undefined,\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <span {...finalProps}>{children}</span>;\n}\n"],"mappings":";;;;;AAKA,SAAS,sBAAsB,SAA4C;CACzE,OAAO,WAAW,YAAY,YAAY,SAAS,YAAY,KAAA;;AAKjE,SAAgB,MAAM,OAAuC;CAC3D,MAAM,EAAE,SAAS,UAAU,SAAS,KAAK,GAAG,SAAS;CACrD,MAAM,aAAa,WAAW,MAAM;EAClC,OAAO,QAAQ,SAAS,sBAAsB,QAAQ,CAAC;EACvD;EACA,aAAa;EACb,cAAc;EACd,gBAAgB,WAAW,YAAY,YAAY,UAAU,KAAA;EAC9D,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA"}
|
|
@@ -1,15 +1,21 @@
|
|
|
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/badge/badge.types.d.ts
|
|
5
|
+
type BadgeVariant = "default" | "secondary" | "outline" | "success" | "warning" | "danger" | "info";
|
|
6
|
+
type BadgeOwnProps = {
|
|
7
|
+
children?: unknown;
|
|
8
|
+
variant?: BadgeVariant;
|
|
6
9
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
type BadgeProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BadgeOwnProps & {
|
|
11
|
+
asChild?: false;
|
|
12
|
+
ref?: Ref<HTMLSpanElement>;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type BadgeAsChildProps = BadgeOwnProps & {
|
|
15
|
+
asChild: true;
|
|
16
|
+
children: JSXElement;
|
|
17
|
+
ref?: Ref<unknown>;
|
|
15
18
|
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { BadgeAsChildProps, BadgeOwnProps, BadgeProps };
|
|
21
|
+
//# sourceMappingURL=badge.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { BadgeAsChildProps, BadgeOwnProps, BadgeProps } from "./badge.types.js";
|
|
2
|
+
import { Badge } from "./badge.js";
|
|
3
|
+
import { BADGE_A11Y_CONTRACT, BadgeA11yContract } from "./badge.a11y.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/components/block/block.a11y.d.ts
|
|
2
|
+
declare const BLOCK_A11Y_CONTRACT: {
|
|
3
|
+
readonly DATA_ATTRIBUTES: {
|
|
4
|
+
readonly slot: "data-slot";
|
|
5
|
+
readonly layout: "data-ak-layout";
|
|
6
|
+
readonly gap: "data-gap";
|
|
7
|
+
readonly gapX: "data-gap-x";
|
|
8
|
+
readonly gapY: "data-gap-y";
|
|
9
|
+
readonly align: "data-align";
|
|
10
|
+
readonly justify: "data-justify";
|
|
11
|
+
readonly size: "data-size";
|
|
12
|
+
};
|
|
13
|
+
readonly SLOT_VALUES: {
|
|
14
|
+
readonly root: "block";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type BlockA11yContract = typeof BLOCK_A11Y_CONTRACT;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { BLOCK_A11Y_CONTRACT, BlockA11yContract };
|
|
20
|
+
//# sourceMappingURL=block.a11y.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockAsChildProps, BlockDivProps, BlockSpanProps } from "./block.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/block/block.d.ts
|
|
4
|
+
declare function Block(props: BlockDivProps): JSX.Element;
|
|
5
|
+
declare function Block(props: BlockSpanProps): JSX.Element;
|
|
6
|
+
declare function Block(props: BlockAsChildProps): JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Block };
|
|
9
|
+
//# sourceMappingURL=block.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
|
+
import { serializeResponsiveValueIf } from "../_internal/layout.js";
|
|
3
|
+
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
|
+
import { Slot } from "@askrjs/askr/foundations";
|
|
5
|
+
//#region src/components/block/block.tsx
|
|
6
|
+
const SPACE_TOKENS = new Set([
|
|
7
|
+
"1",
|
|
8
|
+
"2",
|
|
9
|
+
"3",
|
|
10
|
+
"4",
|
|
11
|
+
"5",
|
|
12
|
+
"6",
|
|
13
|
+
"7",
|
|
14
|
+
"8",
|
|
15
|
+
"9",
|
|
16
|
+
"xs",
|
|
17
|
+
"sm",
|
|
18
|
+
"md",
|
|
19
|
+
"lg",
|
|
20
|
+
"xl",
|
|
21
|
+
"2xl",
|
|
22
|
+
"3xl"
|
|
23
|
+
]);
|
|
24
|
+
function Block(props) {
|
|
25
|
+
const as = "as" in props ? props.as : "div";
|
|
26
|
+
const { asChild, children, gap, gapX, gapY, align, justify, size = "md", ref, ...rest } = props;
|
|
27
|
+
const finalProps = mergeProps(rest, {
|
|
28
|
+
ref,
|
|
29
|
+
"data-slot": "block",
|
|
30
|
+
"data-ak-layout": "true",
|
|
31
|
+
"data-gap": serializeResponsiveValueIf(gap, (value) => typeof value === "string" && SPACE_TOKENS.has(value.trim())),
|
|
32
|
+
"data-gap-x": serializeResponsiveValueIf(gapX, (value) => typeof value === "string" && SPACE_TOKENS.has(value.trim())),
|
|
33
|
+
"data-gap-y": serializeResponsiveValueIf(gapY, (value) => typeof value === "string" && SPACE_TOKENS.has(value.trim())),
|
|
34
|
+
"data-align": serializeResponsiveValueIf(align, (value) => typeof value === "string" && [
|
|
35
|
+
"start",
|
|
36
|
+
"end",
|
|
37
|
+
"center",
|
|
38
|
+
"stretch",
|
|
39
|
+
"baseline"
|
|
40
|
+
].includes(value.trim())),
|
|
41
|
+
"data-justify": serializeResponsiveValueIf(justify, (value) => typeof value === "string" && [
|
|
42
|
+
"start",
|
|
43
|
+
"end",
|
|
44
|
+
"center",
|
|
45
|
+
"between"
|
|
46
|
+
].includes(value.trim())),
|
|
47
|
+
"data-size": `initial:${size}`
|
|
48
|
+
});
|
|
49
|
+
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
50
|
+
asChild: true,
|
|
51
|
+
...finalProps,
|
|
52
|
+
children
|
|
53
|
+
});
|
|
54
|
+
if (as === "span") return /* @__PURE__ */ jsx("span", {
|
|
55
|
+
...finalProps,
|
|
56
|
+
children
|
|
57
|
+
});
|
|
58
|
+
return /* @__PURE__ */ jsx("div", {
|
|
59
|
+
...finalProps,
|
|
60
|
+
children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { Block };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.js","names":[],"sources":["../../../src/components/block/block.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport { serializeResponsiveValueIf } from \"../_internal/layout\";\nimport type { BlockAsChildProps, BlockDivProps, BlockSpanProps } from \"./block.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\nexport function Block(props: BlockDivProps): JSX.Element;\nexport function Block(props: BlockSpanProps): JSX.Element;\nexport function Block(props: BlockAsChildProps): JSX.Element;\nexport function Block(props: BlockDivProps | BlockSpanProps | BlockAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const { asChild, children, gap, gapX, gapY, align, justify, size = \"md\", ref, ...rest } = props;\n\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"block\",\n \"data-ak-layout\": \"true\",\n \"data-gap\": serializeResponsiveValueIf(\n gap,\n (value) => typeof value === \"string\" && SPACE_TOKENS.has(value.trim()),\n ),\n \"data-gap-x\": serializeResponsiveValueIf(\n gapX,\n (value) => typeof value === \"string\" && SPACE_TOKENS.has(value.trim()),\n ),\n \"data-gap-y\": serializeResponsiveValueIf(\n gapY,\n (value) => typeof value === \"string\" && SPACE_TOKENS.has(value.trim()),\n ),\n \"data-align\": serializeResponsiveValueIf(\n align,\n (value) =>\n typeof value === \"string\" &&\n [\"start\", \"end\", \"center\", \"stretch\", \"baseline\"].includes(value.trim()),\n ),\n \"data-justify\": serializeResponsiveValueIf(\n justify,\n (value) =>\n typeof value === \"string\" && [\"start\", \"end\", \"center\", \"between\"].includes(value.trim()),\n ),\n \"data-size\": `initial:${size}`,\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":";;;;;AAKA,MAAM,eAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAKF,SAAgB,MAAM,OAA2D;CAC/E,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;CACtC,MAAM,EAAE,SAAS,UAAU,KAAK,MAAM,MAAM,OAAO,SAAS,OAAO,MAAM,KAAK,GAAG,SAAS;CAE1F,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,kBAAkB;EAClB,YAAY,2BACV,MACC,UAAU,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,MAAM,CAAC,CACvE;EACD,cAAc,2BACZ,OACC,UAAU,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,MAAM,CAAC,CACvE;EACD,cAAc,2BACZ,OACC,UAAU,OAAO,UAAU,YAAY,aAAa,IAAI,MAAM,MAAM,CAAC,CACvE;EACD,cAAc,2BACZ,QACC,UACC,OAAO,UAAU,YACjB;GAAC;GAAS;GAAO;GAAU;GAAW;GAAW,CAAC,SAAS,MAAM,MAAM,CAAC,CAC3E;EACD,gBAAgB,2BACd,UACC,UACC,OAAO,UAAU,YAAY;GAAC;GAAS;GAAO;GAAU;GAAU,CAAC,SAAS,MAAM,MAAM,CAAC,CAC5F;EACD,aAAa,WAAW;EACzB,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAA2B,CAAA;CAG5E,IAAI,OAAO,QACT,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA;CAGhD,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { JSXElement } from "@askrjs/askr/foundations";
|
|
2
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
+
|
|
4
|
+
//#region src/components/block/block.types.d.ts
|
|
5
|
+
type BlockSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
+
type BlockSpace = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
7
|
+
type BlockAlign = "start" | "end" | "center" | "stretch" | "baseline";
|
|
8
|
+
type BlockJustify = "start" | "end" | "center" | "between";
|
|
9
|
+
type BlockOwnProps = {
|
|
10
|
+
gap?: BlockSpace;
|
|
11
|
+
gapX?: BlockSpace;
|
|
12
|
+
gapY?: BlockSpace;
|
|
13
|
+
align?: BlockAlign;
|
|
14
|
+
justify?: BlockJustify;
|
|
15
|
+
size?: BlockSize;
|
|
16
|
+
as?: "div" | "span";
|
|
17
|
+
children?: unknown;
|
|
18
|
+
};
|
|
19
|
+
type BlockNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & BlockOwnProps & {
|
|
20
|
+
as?: "div";
|
|
21
|
+
asChild?: false;
|
|
22
|
+
ref?: Ref<HTMLDivElement>;
|
|
23
|
+
};
|
|
24
|
+
type BlockSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BlockOwnProps & {
|
|
25
|
+
as: "span";
|
|
26
|
+
asChild?: false;
|
|
27
|
+
ref?: Ref<HTMLSpanElement>;
|
|
28
|
+
};
|
|
29
|
+
type BlockAsChildProps = Omit<BlockOwnProps, "as"> & {
|
|
30
|
+
asChild: true;
|
|
31
|
+
children: JSXElement;
|
|
32
|
+
ref?: Ref<unknown>;
|
|
33
|
+
};
|
|
34
|
+
type BlockDivProps = BlockNativeProps;
|
|
35
|
+
type BlockProps = BlockDivProps | BlockSpanProps | BlockAsChildProps;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { BlockAsChildProps, BlockDivProps, BlockNativeProps, BlockOwnProps, BlockProps, BlockSize, BlockSpanProps };
|
|
38
|
+
//# sourceMappingURL=block.types.d.ts.map
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
//#region src/components/box/box.a11y.d.ts
|
|
2
|
+
declare const BOX_A11Y_CONTRACT: {
|
|
3
|
+
readonly DATA_ATTRIBUTES: {
|
|
4
|
+
readonly slot: "data-slot";
|
|
5
|
+
readonly layout: "data-ak-layout";
|
|
6
|
+
};
|
|
7
|
+
readonly SLOT_VALUES: {
|
|
8
|
+
readonly root: "box";
|
|
9
|
+
};
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
+
type BoxA11yContract = typeof BOX_A11Y_CONTRACT;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BOX_A11Y_CONTRACT, BoxA11yContract };
|
|
14
|
+
//# sourceMappingURL=box.a11y.d.ts.map
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BoxAsChildProps, BoxDivProps, BoxSpanProps } from "./box.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/box/box.d.ts
|
|
4
|
+
declare function Box(props: BoxDivProps): JSX.Element;
|
|
5
|
+
declare function Box(props: BoxSpanProps): JSX.Element;
|
|
6
|
+
declare function Box(props: BoxAsChildProps): JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Box };
|
|
9
|
+
//# sourceMappingURL=box.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
|
-
import { applyBoxLayoutStyles, splitBoxLayoutProps,
|
|
2
|
+
import { applyBoxLayoutStyles, splitBoxLayoutProps, withBoxLayoutClass } from "../_internal/box-layout.js";
|
|
3
3
|
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
4
|
import { Slot } from "@askrjs/askr/foundations";
|
|
5
5
|
//#region src/components/box/box.tsx
|
|
@@ -9,11 +9,12 @@ function Box(props) {
|
|
|
9
9
|
const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
|
|
10
10
|
const layoutStyle = {};
|
|
11
11
|
applyBoxLayoutStyles(layoutStyle, boxProps);
|
|
12
|
+
const layoutClass = withBoxLayoutClass(layoutStyle, userStyle);
|
|
12
13
|
const finalProps = mergeProps(passthroughProps, {
|
|
13
14
|
ref,
|
|
14
15
|
"data-slot": "box",
|
|
15
16
|
"data-ak-layout": "true",
|
|
16
|
-
|
|
17
|
+
...layoutClass ? { class: layoutClass } : {}
|
|
17
18
|
});
|
|
18
19
|
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
19
20
|
asChild: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box.js","names":[],"sources":["../../../src/components/box/box.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 type { BoxAsChildProps, BoxDivProps, BoxSpanProps } from \"./box.types\";\n\nexport function Box(props: BoxDivProps): JSX.Element;\nexport function Box(props: BoxSpanProps): JSX.Element;\nexport function Box(props: BoxAsChildProps): JSX.Element;\nexport function Box(props: BoxDivProps | BoxSpanProps | BoxAsChildProps) {\n const as = \"as\" in props ? props.as : \"div\";\n const { asChild, children, 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\": \"box\",\n \"data-ak-layout\": \"true\",\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n if (as === \"span\") {\n return <span {...finalProps}>{children}</span>;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;AAYA,SAAgB,IAAI,OAAqD;CACvE,MAAM,KAAK,QAAQ,QAAQ,MAAM,KAAK;CACtC,MAAM,EAAE,SAAS,UAAU,KAAK,OAAO,WAAW,GAAG,SAAS;CAE9D,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,GAAI,cAAc,EAAE,OAAO,aAAa,GAAG,EAAE;EAC9C,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,IAAI,OAAO,QACT,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA;CAGhD,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -1,66 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { ResponsiveValue } from "../_internal/layout.js";
|
|
2
|
+
import { JSXElement } from "@askrjs/askr/foundations";
|
|
3
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
4
|
+
|
|
5
|
+
//#region src/components/box/box.types.d.ts
|
|
6
|
+
type LayoutResponsive<T> = ResponsiveValue<T>;
|
|
7
|
+
type BoxLayoutOwnProps = {
|
|
8
|
+
display?: ResponsiveValue<string>;
|
|
9
|
+
m?: ResponsiveValue<string | number>;
|
|
10
|
+
mx?: ResponsiveValue<string | number>;
|
|
11
|
+
my?: ResponsiveValue<string | number>;
|
|
12
|
+
mt?: ResponsiveValue<string | number>;
|
|
13
|
+
mr?: ResponsiveValue<string | number>;
|
|
14
|
+
mb?: ResponsiveValue<string | number>;
|
|
15
|
+
ml?: ResponsiveValue<string | number>;
|
|
16
|
+
p?: ResponsiveValue<string | number>;
|
|
17
|
+
px?: ResponsiveValue<string | number>;
|
|
18
|
+
py?: ResponsiveValue<string | number>;
|
|
19
|
+
pt?: ResponsiveValue<string | number>;
|
|
20
|
+
pr?: ResponsiveValue<string | number>;
|
|
21
|
+
pb?: ResponsiveValue<string | number>;
|
|
22
|
+
pl?: ResponsiveValue<string | number>;
|
|
23
|
+
width?: ResponsiveValue<string>;
|
|
24
|
+
minWidth?: ResponsiveValue<string>;
|
|
25
|
+
maxWidth?: ResponsiveValue<string>;
|
|
26
|
+
height?: ResponsiveValue<string>;
|
|
27
|
+
minHeight?: ResponsiveValue<string>;
|
|
28
|
+
maxHeight?: ResponsiveValue<string>;
|
|
29
|
+
position?: ResponsiveValue<string>;
|
|
30
|
+
inset?: ResponsiveValue<string | number>;
|
|
31
|
+
top?: ResponsiveValue<string | number>;
|
|
32
|
+
right?: ResponsiveValue<string | number>;
|
|
33
|
+
bottom?: ResponsiveValue<string | number>;
|
|
34
|
+
left?: ResponsiveValue<string | number>;
|
|
35
|
+
overflow?: ResponsiveValue<string>;
|
|
36
|
+
overflowX?: ResponsiveValue<string>;
|
|
37
|
+
overflowY?: ResponsiveValue<string>;
|
|
38
|
+
flexBasis?: ResponsiveValue<string>;
|
|
39
|
+
flexGrow?: ResponsiveValue<string | number>;
|
|
40
|
+
flexShrink?: ResponsiveValue<string | number>;
|
|
41
|
+
gridArea?: ResponsiveValue<string>;
|
|
42
|
+
gridColumn?: ResponsiveValue<string>;
|
|
43
|
+
gridColumnStart?: ResponsiveValue<string>;
|
|
44
|
+
gridColumnEnd?: ResponsiveValue<string>;
|
|
45
|
+
gridRow?: ResponsiveValue<string>;
|
|
46
|
+
gridRowStart?: ResponsiveValue<string>;
|
|
47
|
+
gridRowEnd?: ResponsiveValue<string>;
|
|
48
|
+
children?: unknown;
|
|
46
49
|
};
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
type BoxOwnProps = BoxLayoutOwnProps & {
|
|
51
|
+
as?: "div" | "span";
|
|
49
52
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
type BoxDivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & BoxOwnProps & {
|
|
54
|
+
as?: "div";
|
|
55
|
+
asChild?: false;
|
|
56
|
+
ref?: Ref<HTMLDivElement>;
|
|
54
57
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
type BoxSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BoxOwnProps & {
|
|
59
|
+
as: "span";
|
|
60
|
+
asChild?: false;
|
|
61
|
+
ref?: Ref<HTMLSpanElement>;
|
|
59
62
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
type BoxAsChildProps = Omit<BoxOwnProps, "as"> & {
|
|
64
|
+
asChild: true;
|
|
65
|
+
children: JSXElement;
|
|
66
|
+
ref?: Ref<unknown>;
|
|
67
|
+
style?: JSX.IntrinsicElements["div"]["style"];
|
|
65
68
|
};
|
|
66
|
-
|
|
69
|
+
type BoxProps = BoxDivProps | BoxSpanProps | BoxAsChildProps;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { BoxAsChildProps, BoxDivProps, BoxLayoutOwnProps, BoxOwnProps, BoxProps, BoxSpanProps, LayoutResponsive };
|
|
72
|
+
//# sourceMappingURL=box.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { BoxAsChildProps, BoxDivProps, BoxLayoutOwnProps, BoxOwnProps, BoxProps, BoxSpanProps, LayoutResponsive } from "./box.types.js";
|
|
2
|
+
import { Box } from "./box.js";
|
|
3
|
+
import { BOX_A11Y_CONTRACT, BoxA11yContract } from "./box.a11y.js";
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
//#region src/components/breadcrumb/breadcrumb.a11y.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Breadcrumb accessibility contract.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
declare const BREADCRUMB_A11Y_CONTRACT: {
|
|
6
|
+
readonly DATA_ATTRIBUTES: {
|
|
7
|
+
readonly slot: "data-slot";
|
|
8
|
+
};
|
|
9
|
+
readonly NAV_ROLE: "navigation";
|
|
10
|
+
readonly CURRENT_PAGE_ATTRIBUTE: "aria-current";
|
|
11
|
+
readonly CURRENT_PAGE_VALUE: "page";
|
|
12
|
+
readonly SEPARATOR_MARKER: "data-breadcrumb-separator";
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
type BreadcrumbA11yContract = typeof BREADCRUMB_A11Y_CONTRACT;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { BREADCRUMB_A11Y_CONTRACT, BreadcrumbA11yContract };
|
|
17
|
+
//# sourceMappingURL=breadcrumb.a11y.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/breadcrumb/breadcrumb.a11y.ts
|
|
2
|
+
/**
|
|
3
|
+
* Breadcrumb accessibility contract.
|
|
4
|
+
*/
|
|
5
|
+
const BREADCRUMB_A11Y_CONTRACT = {
|
|
6
|
+
DATA_ATTRIBUTES: { slot: "data-slot" },
|
|
7
|
+
NAV_ROLE: "navigation",
|
|
8
|
+
CURRENT_PAGE_ATTRIBUTE: "aria-current",
|
|
9
|
+
CURRENT_PAGE_VALUE: "page",
|
|
10
|
+
SEPARATOR_MARKER: "data-breadcrumb-separator"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { BREADCRUMB_A11Y_CONTRACT };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=breadcrumb.a11y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.a11y.js","names":[],"sources":["../../../src/components/breadcrumb/breadcrumb.a11y.ts"],"sourcesContent":["/**\n * Breadcrumb accessibility contract.\n */\n\nexport const BREADCRUMB_A11Y_CONTRACT = {\n DATA_ATTRIBUTES: {\n slot: \"data-slot\" as const,\n },\n NAV_ROLE: \"navigation\" as const,\n CURRENT_PAGE_ATTRIBUTE: \"aria-current\" as const,\n CURRENT_PAGE_VALUE: \"page\" as const,\n SEPARATOR_MARKER: \"data-breadcrumb-separator\" as const,\n} as const;\n\nexport type BreadcrumbA11yContract = typeof BREADCRUMB_A11Y_CONTRACT;\n"],"mappings":";;;;AAIA,MAAa,2BAA2B;CACtC,iBAAiB,EACf,MAAM,aACP;CACD,UAAU;CACV,wBAAwB;CACxB,oBAAoB;CACpB,kBAAkB;CACnB"}
|