@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
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps } from "./breadcrumb.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/breadcrumb/breadcrumb.d.ts
|
|
4
|
+
declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
|
|
5
|
+
declare function Breadcrumb(props: BreadcrumbAsChildProps): JSX.Element;
|
|
6
|
+
declare function BreadcrumbList(props: BreadcrumbListProps): JSX.Element;
|
|
7
|
+
declare function BreadcrumbList(props: BreadcrumbListAsChildProps): JSX.Element;
|
|
8
|
+
declare function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element;
|
|
9
|
+
declare function BreadcrumbItem(props: BreadcrumbItemAsChildProps): JSX.Element;
|
|
10
|
+
declare function BreadcrumbLink(props: BreadcrumbLinkProps): JSX.Element;
|
|
11
|
+
declare function BreadcrumbLink(props: BreadcrumbLinkAsChildProps): JSX.Element;
|
|
12
|
+
declare function BreadcrumbCurrent(props: BreadcrumbCurrentProps): JSX.Element;
|
|
13
|
+
declare function BreadcrumbCurrent(props: BreadcrumbCurrentAsChildProps): JSX.Element;
|
|
14
|
+
declare function BreadcrumbSeparator(props: BreadcrumbSeparatorProps): JSX.Element;
|
|
15
|
+
declare function BreadcrumbSeparator(props: BreadcrumbSeparatorAsChildProps): JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator };
|
|
18
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../../src/components/breadcrumb/breadcrumb.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type {\n BreadcrumbAsChildProps,\n BreadcrumbCurrentAsChildProps,\n BreadcrumbCurrentProps,\n BreadcrumbItemAsChildProps,\n BreadcrumbItemProps,\n BreadcrumbLinkAsChildProps,\n BreadcrumbLinkProps,\n BreadcrumbListAsChildProps,\n BreadcrumbListProps,\n BreadcrumbProps,\n BreadcrumbSeparatorAsChildProps,\n BreadcrumbSeparatorProps,\n} from \"./breadcrumb.types\";\n\nexport function Breadcrumb(props: BreadcrumbProps): JSX.Element;\nexport function Breadcrumb(props: BreadcrumbAsChildProps): JSX.Element;\nexport function Breadcrumb(props: BreadcrumbProps | BreadcrumbAsChildProps) {\n const { asChild, children, ref, \"aria-label\": ariaLabel, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-label\": ariaLabel ?? \"Breadcrumb\",\n \"data-slot\": \"breadcrumb\",\n \"data-breadcrumb\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <nav {...finalProps}>{children}</nav>;\n}\n\nexport function BreadcrumbList(props: BreadcrumbListProps): JSX.Element;\nexport function BreadcrumbList(props: BreadcrumbListAsChildProps): JSX.Element;\nexport function BreadcrumbList(props: BreadcrumbListProps | BreadcrumbListAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-list\",\n \"data-breadcrumb-list\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <ol {...finalProps}>{children}</ol>;\n}\n\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element;\nexport function BreadcrumbItem(props: BreadcrumbItemAsChildProps): JSX.Element;\nexport function BreadcrumbItem(props: BreadcrumbItemProps | BreadcrumbItemAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-item\",\n \"data-breadcrumb-item\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <li {...finalProps}>{children}</li>;\n}\n\nexport function BreadcrumbLink(props: BreadcrumbLinkProps): JSX.Element;\nexport function BreadcrumbLink(props: BreadcrumbLinkAsChildProps): JSX.Element;\nexport function BreadcrumbLink(props: BreadcrumbLinkProps | BreadcrumbLinkAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"breadcrumb-link\",\n \"data-breadcrumb-link\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <a {...finalProps}>{children}</a>;\n}\n\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentProps): JSX.Element;\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentAsChildProps): JSX.Element;\nexport function BreadcrumbCurrent(props: BreadcrumbCurrentProps | BreadcrumbCurrentAsChildProps) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-current\": \"page\",\n \"data-slot\": \"breadcrumb-current\",\n \"data-breadcrumb-current\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <span {...finalProps}>{children}</span>;\n}\n\nexport function BreadcrumbSeparator(props: BreadcrumbSeparatorProps): JSX.Element;\nexport function BreadcrumbSeparator(props: BreadcrumbSeparatorAsChildProps): JSX.Element;\nexport function BreadcrumbSeparator(\n props: BreadcrumbSeparatorProps | BreadcrumbSeparatorAsChildProps,\n) {\n const { asChild, children, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n \"aria-hidden\": \"true\",\n \"data-slot\": \"breadcrumb-separator\",\n \"data-breadcrumb-separator\": \"true\",\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children ?? \"/\"} />;\n }\n\n return <span {...finalProps}>{children ?? \"/\"}</span>;\n}\n"],"mappings":";;;;AAmBA,SAAgB,WAAW,OAAiD;CAC1E,MAAM,EAAE,SAAS,UAAU,KAAK,cAAc,WAAW,GAAG,SAAS;CACrE,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,cAAc,aAAa;EAC3B,aAAa;EACb,mBAAmB;EACpB,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA;;AAK9C,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;EACzB,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;EAAc,CAAA;;AAK5C,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;EACzB,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,MAAD;EAAI,GAAI;EAAa;EAAc,CAAA;;AAK5C,SAAgB,eAAe,OAAyD;CACtF,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,wBAAwB;EACzB,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,KAAD;EAAG,GAAI;EAAa;EAAa,CAAA;;AAK1C,SAAgB,kBAAkB,OAA+D;CAC/F,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,gBAAgB;EAChB,aAAa;EACb,2BAA2B;EAC5B,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA;;AAKhD,SAAgB,oBACd,OACA;CACA,MAAM,EAAE,SAAS,UAAU,KAAK,GAAG,SAAS;CAC5C,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,eAAe;EACf,aAAa;EACb,6BAA6B;EAC9B,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAY,UAAU,YAAY;EAAO,CAAA;CAGpE,OAAO,oBAAC,QAAD;EAAM,GAAI;YAAa,YAAY;EAAW,CAAA"}
|
|
@@ -1,59 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ref?: Ref<HTMLElement>;
|
|
9
|
-
};
|
|
10
|
-
export type BreadcrumbAsChildProps = BreadcrumbOwnProps & {
|
|
11
|
-
asChild: true;
|
|
12
|
-
children: JSXElement;
|
|
13
|
-
ref?: Ref<unknown>;
|
|
14
|
-
};
|
|
15
|
-
export type BreadcrumbListProps = Omit<JSX.IntrinsicElements["ol"], "children" | "ref"> & {
|
|
16
|
-
asChild?: false;
|
|
17
|
-
ref?: Ref<HTMLOListElement>;
|
|
18
|
-
};
|
|
19
|
-
export type BreadcrumbListAsChildProps = {
|
|
20
|
-
asChild: true;
|
|
21
|
-
children: JSXElement;
|
|
22
|
-
ref?: Ref<unknown>;
|
|
23
|
-
};
|
|
24
|
-
export type BreadcrumbItemProps = Omit<JSX.IntrinsicElements["li"], "children" | "ref"> & {
|
|
25
|
-
asChild?: false;
|
|
26
|
-
ref?: Ref<HTMLLIElement>;
|
|
27
|
-
};
|
|
28
|
-
export type BreadcrumbItemAsChildProps = {
|
|
29
|
-
asChild: true;
|
|
30
|
-
children: JSXElement;
|
|
31
|
-
ref?: Ref<unknown>;
|
|
32
|
-
};
|
|
33
|
-
export type BreadcrumbLinkProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & {
|
|
34
|
-
asChild?: false;
|
|
35
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
36
|
-
};
|
|
37
|
-
export type BreadcrumbLinkAsChildProps = {
|
|
38
|
-
asChild: true;
|
|
39
|
-
children: JSXElement;
|
|
40
|
-
ref?: Ref<unknown>;
|
|
41
|
-
};
|
|
42
|
-
export type BreadcrumbCurrentProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
|
|
43
|
-
asChild?: false;
|
|
44
|
-
ref?: Ref<HTMLSpanElement>;
|
|
45
|
-
};
|
|
46
|
-
export type BreadcrumbCurrentAsChildProps = {
|
|
47
|
-
asChild: true;
|
|
48
|
-
children: JSXElement;
|
|
49
|
-
ref?: Ref<unknown>;
|
|
50
|
-
};
|
|
51
|
-
export type BreadcrumbSeparatorProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
|
|
52
|
-
asChild?: false;
|
|
53
|
-
ref?: Ref<HTMLSpanElement>;
|
|
54
|
-
};
|
|
55
|
-
export type BreadcrumbSeparatorAsChildProps = {
|
|
56
|
-
asChild: true;
|
|
57
|
-
children: JSXElement;
|
|
58
|
-
ref?: Ref<unknown>;
|
|
1
|
+
import { JSXElement } from "@askrjs/askr/foundations";
|
|
2
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
3
|
+
|
|
4
|
+
//#region src/components/breadcrumb/breadcrumb.types.d.ts
|
|
5
|
+
type BreadcrumbOwnProps = {
|
|
6
|
+
children?: unknown;
|
|
7
|
+
"aria-label"?: string;
|
|
59
8
|
};
|
|
9
|
+
type BreadcrumbProps = Omit<JSX.IntrinsicElements["nav"], "children" | "ref"> & BreadcrumbOwnProps & {
|
|
10
|
+
asChild?: false;
|
|
11
|
+
ref?: Ref<HTMLElement>;
|
|
12
|
+
};
|
|
13
|
+
type BreadcrumbAsChildProps = BreadcrumbOwnProps & {
|
|
14
|
+
asChild: true;
|
|
15
|
+
children: JSXElement;
|
|
16
|
+
ref?: Ref<unknown>;
|
|
17
|
+
};
|
|
18
|
+
type BreadcrumbListProps = Omit<JSX.IntrinsicElements["ol"], "children" | "ref"> & {
|
|
19
|
+
asChild?: false;
|
|
20
|
+
ref?: Ref<HTMLOListElement>;
|
|
21
|
+
};
|
|
22
|
+
type BreadcrumbListAsChildProps = {
|
|
23
|
+
asChild: true;
|
|
24
|
+
children: JSXElement;
|
|
25
|
+
ref?: Ref<unknown>;
|
|
26
|
+
};
|
|
27
|
+
type BreadcrumbItemProps = Omit<JSX.IntrinsicElements["li"], "children" | "ref"> & {
|
|
28
|
+
asChild?: false;
|
|
29
|
+
ref?: Ref<HTMLLIElement>;
|
|
30
|
+
};
|
|
31
|
+
type BreadcrumbItemAsChildProps = {
|
|
32
|
+
asChild: true;
|
|
33
|
+
children: JSXElement;
|
|
34
|
+
ref?: Ref<unknown>;
|
|
35
|
+
};
|
|
36
|
+
type BreadcrumbLinkProps = Omit<JSX.IntrinsicElements["a"], "children" | "ref"> & {
|
|
37
|
+
asChild?: false;
|
|
38
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
39
|
+
};
|
|
40
|
+
type BreadcrumbLinkAsChildProps = {
|
|
41
|
+
asChild: true;
|
|
42
|
+
children: JSXElement;
|
|
43
|
+
ref?: Ref<unknown>;
|
|
44
|
+
};
|
|
45
|
+
type BreadcrumbCurrentProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
|
|
46
|
+
asChild?: false;
|
|
47
|
+
ref?: Ref<HTMLSpanElement>;
|
|
48
|
+
};
|
|
49
|
+
type BreadcrumbCurrentAsChildProps = {
|
|
50
|
+
asChild: true;
|
|
51
|
+
children: JSXElement;
|
|
52
|
+
ref?: Ref<unknown>;
|
|
53
|
+
};
|
|
54
|
+
type BreadcrumbSeparatorProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & {
|
|
55
|
+
asChild?: false;
|
|
56
|
+
ref?: Ref<HTMLSpanElement>;
|
|
57
|
+
};
|
|
58
|
+
type BreadcrumbSeparatorAsChildProps = {
|
|
59
|
+
asChild: true;
|
|
60
|
+
children: JSXElement;
|
|
61
|
+
ref?: Ref<unknown>;
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps };
|
|
65
|
+
//# sourceMappingURL=breadcrumb.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps } from "./breadcrumb.types.js";
|
|
2
|
+
import { Breadcrumb, BreadcrumbCurrent, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbSeparator } from "./breadcrumb.js";
|
|
3
|
+
import { BREADCRUMB_A11Y_CONTRACT, BreadcrumbA11yContract } from "./breadcrumb.a11y.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonGroupProps } from "./button-group.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/button-group/button-group.d.ts
|
|
4
|
+
declare function ButtonGroup(props: ButtonGroupProps): JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ButtonGroup };
|
|
7
|
+
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { classes } from "../_internal/classes.js";
|
|
2
|
+
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
|
+
//#region src/components/button-group/button-group.tsx
|
|
4
|
+
function ButtonGroup(props) {
|
|
5
|
+
const { attached = true, children, class: className, orientation = "horizontal", ref, role, ...rest } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
...rest,
|
|
8
|
+
ref,
|
|
9
|
+
class: classes("btn-group", orientation === "vertical" ? "btn-group-vertical" : void 0, className),
|
|
10
|
+
"data-attached": attached ? "true" : "false",
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
"data-slot": "button-group",
|
|
13
|
+
role: role ?? "group",
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ButtonGroup };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.js","names":[],"sources":["../../../src/components/button-group/button-group.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport { ButtonGroupProps } from \"./button-group.types\";\n\nexport function ButtonGroup(props: ButtonGroupProps): JSX.Element {\n const {\n attached = true,\n children,\n class: className,\n orientation = \"horizontal\",\n ref,\n role,\n ...rest\n } = props;\n\n return (\n <div\n {...rest}\n ref={ref}\n class={classes(\n \"btn-group\",\n orientation === \"vertical\" ? \"btn-group-vertical\" : undefined,\n className,\n )}\n data-attached={attached ? \"true\" : \"false\"}\n data-orientation={orientation}\n data-slot=\"button-group\"\n role={role ?? \"group\"}\n >\n {children}\n </div>\n );\n}\n"],"mappings":";;;AAGA,SAAgB,YAAY,OAAsC;CAChE,MAAM,EACJ,WAAW,MACX,UACA,OAAO,WACP,cAAc,cACd,KACA,MACA,GAAG,SACD;CAEJ,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,OAAO,QACL,aACA,gBAAgB,aAAa,uBAAuB,KAAA,GACpD,UACD;EACD,iBAAe,WAAW,SAAS;EACnC,oBAAkB;EAClB,aAAU;EACV,MAAM,QAAQ;EAEb;EACG,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
2
|
+
|
|
3
|
+
//#region src/components/button-group/button-group.types.d.ts
|
|
4
|
+
type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
5
|
+
type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
|
|
6
|
+
type ButtonGroupProps = DivProps & {
|
|
7
|
+
children?: unknown;
|
|
8
|
+
attached?: boolean;
|
|
9
|
+
orientation?: ButtonGroupOrientation;
|
|
10
|
+
ref?: Ref<HTMLDivElement>;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ButtonGroupOrientation, ButtonGroupProps };
|
|
14
|
+
//# sourceMappingURL=button-group.types.d.ts.map
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { CardActionsProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps } from "./card.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/card/card.d.ts
|
|
4
|
+
declare function Card(props: CardProps): JSX.Element;
|
|
5
|
+
declare function CardHeader(props: CardHeaderProps): JSX.Element;
|
|
6
|
+
declare function CardTitle(props: CardTitleProps): JSX.Element;
|
|
7
|
+
declare function CardDescription(props: CardDescriptionProps): JSX.Element;
|
|
8
|
+
declare function CardContent(props: CardContentProps): JSX.Element;
|
|
9
|
+
declare function CardFooter(props: CardFooterProps): JSX.Element;
|
|
10
|
+
declare function CardActions(props: CardActionsProps): JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
13
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { classes } from "../_internal/classes.js";
|
|
2
|
+
import { mergeProps } from "../_internal/merge-props.js";
|
|
3
|
+
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
|
+
//#region src/components/card/card.tsx
|
|
5
|
+
function normalizePadding(padding) {
|
|
6
|
+
return padding && padding !== "md" ? padding : void 0;
|
|
7
|
+
}
|
|
8
|
+
function normalizeVariant(variant) {
|
|
9
|
+
return variant && variant !== "default" ? variant : void 0;
|
|
10
|
+
}
|
|
11
|
+
function Card(props) {
|
|
12
|
+
const { children, class: className, variant, padding = "md", ref, ...rest } = props;
|
|
13
|
+
const normalizedVariant = normalizeVariant(variant);
|
|
14
|
+
const normalizedPadding = normalizePadding(padding);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
...mergeProps(rest, {
|
|
17
|
+
ref,
|
|
18
|
+
class: classes("card", normalizedVariant && `card-${normalizedVariant}`, normalizedPadding && `card-${normalizedPadding}`, className),
|
|
19
|
+
"data-padding": normalizedPadding,
|
|
20
|
+
"data-slot": "card",
|
|
21
|
+
"data-variant": normalizedVariant
|
|
22
|
+
}),
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function CardHeader(props) {
|
|
27
|
+
const { children, class: className, ref, ...rest } = props;
|
|
28
|
+
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
...mergeProps(rest, {
|
|
30
|
+
ref,
|
|
31
|
+
class: classes("card-header", className),
|
|
32
|
+
"data-slot": "card-header"
|
|
33
|
+
}),
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function CardTitle(props) {
|
|
38
|
+
const { children, class: className, ref, ...rest } = props;
|
|
39
|
+
return /* @__PURE__ */ jsx("h3", {
|
|
40
|
+
...mergeProps(rest, {
|
|
41
|
+
ref,
|
|
42
|
+
class: classes("card-title", className),
|
|
43
|
+
"data-slot": "card-title"
|
|
44
|
+
}),
|
|
45
|
+
children
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function CardDescription(props) {
|
|
49
|
+
const { children, class: className, ref, ...rest } = props;
|
|
50
|
+
return /* @__PURE__ */ jsx("p", {
|
|
51
|
+
...mergeProps(rest, {
|
|
52
|
+
ref,
|
|
53
|
+
class: classes("card-description", className),
|
|
54
|
+
"data-slot": "card-description"
|
|
55
|
+
}),
|
|
56
|
+
children
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function CardContent(props) {
|
|
60
|
+
const { children, class: className, ref, ...rest } = props;
|
|
61
|
+
return /* @__PURE__ */ jsx("div", {
|
|
62
|
+
...mergeProps(rest, {
|
|
63
|
+
ref,
|
|
64
|
+
class: classes("card-content", className),
|
|
65
|
+
"data-slot": "card-content"
|
|
66
|
+
}),
|
|
67
|
+
children
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function CardFooter(props) {
|
|
71
|
+
const { children, class: className, ref, ...rest } = props;
|
|
72
|
+
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
...mergeProps(rest, {
|
|
74
|
+
ref,
|
|
75
|
+
class: classes("card-footer", className),
|
|
76
|
+
"data-slot": "card-footer"
|
|
77
|
+
}),
|
|
78
|
+
children
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function CardActions(props) {
|
|
82
|
+
const { children, class: className, ref, ...rest } = props;
|
|
83
|
+
return /* @__PURE__ */ jsx("div", {
|
|
84
|
+
...mergeProps(rest, {
|
|
85
|
+
ref,
|
|
86
|
+
class: classes("card-actions", className),
|
|
87
|
+
"data-slot": "card-actions"
|
|
88
|
+
}),
|
|
89
|
+
children
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { classes } from \"../_internal/classes\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type {\n CardActionsProps,\n CardContentProps,\n CardDescriptionProps,\n CardFooterProps,\n CardHeaderProps,\n CardPadding,\n CardProps,\n CardTitleProps,\n CardVariant,\n} from \"./card.types\";\n\nfunction normalizePadding(padding: CardPadding | undefined) {\n return padding && padding !== \"md\" ? padding : undefined;\n}\n\nfunction normalizeVariant(variant: CardVariant | undefined) {\n return variant && variant !== \"default\" ? variant : undefined;\n}\n\nexport function Card(props: CardProps): JSX.Element {\n const { children, class: className, variant, padding = \"md\", ref, ...rest } = props;\n const normalizedVariant = normalizeVariant(variant);\n const normalizedPadding = normalizePadding(padding);\n\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\n \"card\",\n normalizedVariant && `card-${normalizedVariant}`,\n normalizedPadding && `card-${normalizedPadding}`,\n className,\n ),\n \"data-padding\": normalizedPadding,\n \"data-slot\": \"card\",\n \"data-variant\": normalizedVariant,\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function CardHeader(props: CardHeaderProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-header\", className),\n \"data-slot\": \"card-header\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function CardTitle(props: CardTitleProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-title\", className),\n \"data-slot\": \"card-title\",\n });\n\n return <h3 {...finalProps}>{children}</h3>;\n}\n\nexport function CardDescription(props: CardDescriptionProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-description\", className),\n \"data-slot\": \"card-description\",\n });\n\n return <p {...finalProps}>{children}</p>;\n}\n\nexport function CardContent(props: CardContentProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-content\", className),\n \"data-slot\": \"card-content\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function CardFooter(props: CardFooterProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-footer\", className),\n \"data-slot\": \"card-footer\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n\nexport function CardActions(props: CardActionsProps): JSX.Element {\n const { children, class: className, ref, ...rest } = props;\n const finalProps = mergeProps(rest, {\n ref,\n class: classes(\"card-actions\", className),\n \"data-slot\": \"card-actions\",\n });\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;AAcA,SAAS,iBAAiB,SAAkC;CAC1D,OAAO,WAAW,YAAY,OAAO,UAAU,KAAA;;AAGjD,SAAS,iBAAiB,SAAkC;CAC1D,OAAO,WAAW,YAAY,YAAY,UAAU,KAAA;;AAGtD,SAAgB,KAAK,OAA+B;CAClD,MAAM,EAAE,UAAU,OAAO,WAAW,SAAS,UAAU,MAAM,KAAK,GAAG,SAAS;CAC9E,MAAM,oBAAoB,iBAAiB,QAAQ;CACnD,MAAM,oBAAoB,iBAAiB,QAAQ;CAenD,OAAO,oBAAC,OAAD;EAAK,GAbO,WAAW,MAAM;GAClC;GACA,OAAO,QACL,QACA,qBAAqB,QAAQ,qBAC7B,qBAAqB,QAAQ,qBAC7B,UACD;GACD,gBAAgB;GAChB,aAAa;GACb,gBAAgB;GACjB,CAEyB;EAAG;EAAe,CAAA;;AAG9C,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,eAAe,UAAU;GACxC,aAAa;GACd,CAEyB;EAAG;EAAe,CAAA;;AAG9C,SAAgB,UAAU,OAAoC;CAC5D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,MAAD;EAAI,GANQ,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,cAAc,UAAU;GACvC,aAAa;GACd,CAEwB;EAAG;EAAc,CAAA;;AAG5C,SAAgB,gBAAgB,OAA0C;CACxE,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,KAAD;EAAG,GANS,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,oBAAoB,UAAU;GAC7C,aAAa;GACd,CAEuB;EAAG;EAAa,CAAA;;AAG1C,SAAgB,YAAY,OAAsC;CAChE,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,gBAAgB,UAAU;GACzC,aAAa;GACd,CAEyB;EAAG;EAAe,CAAA;;AAG9C,SAAgB,WAAW,OAAqC;CAC9D,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,eAAe,UAAU;GACxC,aAAa;GACd,CAEyB;EAAG;EAAe,CAAA;;AAG9C,SAAgB,YAAY,OAAsC;CAChE,MAAM,EAAE,UAAU,OAAO,WAAW,KAAK,GAAG,SAAS;CAOrD,OAAO,oBAAC,OAAD;EAAK,GANO,WAAW,MAAM;GAClC;GACA,OAAO,QAAQ,gBAAgB,UAAU;GACzC,aAAa;GACd,CAEyB;EAAG;EAAe,CAAA"}
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
2
|
+
|
|
3
|
+
//#region src/components/card/card.types.d.ts
|
|
4
|
+
type CardVariant = "default" | "raised";
|
|
5
|
+
type CardPadding = "sm" | "md" | "lg";
|
|
4
6
|
type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
|
|
5
7
|
type HeadingProps = Omit<JSX.IntrinsicElements["h3"], "children" | "ref">;
|
|
6
8
|
type ParagraphProps = Omit<JSX.IntrinsicElements["p"], "children" | "ref">;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
type CardProps = DivProps & {
|
|
10
|
+
children?: unknown;
|
|
11
|
+
variant?: CardVariant;
|
|
12
|
+
padding?: CardPadding;
|
|
13
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
14
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
type CardHeaderProps = DivProps & {
|
|
16
|
+
children?: unknown;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
16
18
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
type CardContentProps = DivProps & {
|
|
20
|
+
children?: unknown;
|
|
21
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
22
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
type CardFooterProps = DivProps & {
|
|
24
|
+
children?: unknown;
|
|
25
|
+
ref?: Ref<HTMLDivElement>;
|
|
24
26
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
type CardActionsProps = DivProps & {
|
|
28
|
+
children?: unknown;
|
|
29
|
+
ref?: Ref<HTMLDivElement>;
|
|
28
30
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
type CardTitleProps = HeadingProps & {
|
|
32
|
+
children?: unknown;
|
|
33
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
type CardDescriptionProps = ParagraphProps & {
|
|
36
|
+
children?: unknown;
|
|
37
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { CardActionsProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardPadding, CardProps, CardTitleProps, CardVariant };
|
|
41
|
+
//# sourceMappingURL=card.types.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CardActionsProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardPadding, CardProps, CardTitleProps, CardVariant } from "./card.types.js";
|
|
2
|
+
import { Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { classes } from "../_internal/classes.js";
|
|
2
|
+
import { Button } from "@askrjs/ui";
|
|
3
|
+
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
4
|
+
//#region src/components/close/close.tsx
|
|
5
|
+
function Close(props) {
|
|
6
|
+
const { children, class: className, label = "Close", size, variant, ...rest } = props;
|
|
7
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
8
|
+
...rest,
|
|
9
|
+
class: classes("btn-close", className),
|
|
10
|
+
"aria-label": label,
|
|
11
|
+
size: size ?? "icon",
|
|
12
|
+
variant: variant ?? "ghost",
|
|
13
|
+
children: children ?? /* @__PURE__ */ jsx("span", {
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
children: "×"
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Close };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=close.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close.js","names":[],"sources":["../../../src/components/close/close.tsx"],"sourcesContent":["import { Button, type ButtonNativeProps } from \"@askrjs/ui\";\nimport { classes } from \"../_internal/classes\";\nimport type { CloseNativeProps } from \"./close.types\";\n\nexport function Close(props: CloseNativeProps): JSX.Element;\nexport function Close(props: CloseNativeProps): JSX.Element {\n const { children, class: className, label = \"Close\", size, variant, ...rest } = props;\n return (\n <Button\n {...(rest as ButtonNativeProps)}\n class={classes(\"btn-close\", className)}\n aria-label={label}\n size={size ?? \"icon\"}\n variant={variant ?? \"ghost\"}\n >\n {children ?? <span aria-hidden=\"true\">×</span>}\n </Button>\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,MAAM,OAAsC;CAC1D,MAAM,EAAE,UAAU,OAAO,WAAW,QAAQ,SAAS,MAAM,SAAS,GAAG,SAAS;CAChF,OACE,oBAAC,QAAD;EACE,GAAK;EACL,OAAO,QAAQ,aAAa,UAAU;EACtC,cAAY;EACZ,MAAM,QAAQ;EACd,SAAS,WAAW;YAEnB,YAAY,oBAAC,QAAD;GAAM,eAAY;aAAO;GAAQ,CAAA;EACvC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ButtonNativeProps } from "@askrjs/ui";
|
|
2
|
+
|
|
3
|
+
//#region src/components/close/close.types.d.ts
|
|
4
|
+
type CloseOwnProps = {
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
type CloseNativeProps = ButtonNativeProps & CloseOwnProps;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CloseNativeProps, CloseOwnProps };
|
|
10
|
+
//# sourceMappingURL=close.types.d.ts.map
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
//#region src/components/container/container.a11y.d.ts
|
|
2
|
+
declare const CONTAINER_A11Y_CONTRACT: {
|
|
3
|
+
readonly DATA_ATTRIBUTES: {
|
|
4
|
+
readonly slot: "data-slot";
|
|
5
|
+
readonly layout: "data-ak-layout";
|
|
6
|
+
readonly variant: "data-variant";
|
|
7
|
+
readonly fluid: "data-fluid";
|
|
8
|
+
readonly maxWidth: "data-max-width";
|
|
9
|
+
readonly padding: "data-padding";
|
|
10
|
+
readonly size: "data-size";
|
|
11
|
+
readonly align: "data-align";
|
|
12
|
+
};
|
|
13
|
+
readonly SLOT_VALUES: {
|
|
14
|
+
readonly root: "container";
|
|
15
|
+
};
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
type ContainerA11yContract = typeof CONTAINER_A11Y_CONTRACT;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { CONTAINER_A11Y_CONTRACT, ContainerA11yContract };
|
|
20
|
+
//# sourceMappingURL=container.a11y.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ContainerAsChildProps, ContainerNativeProps } from "./container.types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/container.d.ts
|
|
4
|
+
declare function Container(props: ContainerNativeProps): JSX.Element;
|
|
5
|
+
declare function Container(props: ContainerAsChildProps): JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Container };
|
|
8
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
2
|
import { isResponsiveValue, resolveContainerSizeValue, resolveInlineAlignValue, resolveSpaceValue, serializeResponsiveValueIf, setResponsiveStyleVar } 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/container/container.tsx
|
|
@@ -54,7 +54,7 @@ function Container(props) {
|
|
|
54
54
|
applyAlign("marginLeft", align);
|
|
55
55
|
applyAlign("marginRight", align);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const layoutClass = Object.keys(layoutStyle).length > 2 || hasStyleValue(userStyle) ? withBoxLayoutClass(layoutStyle, userStyle) : void 0;
|
|
58
58
|
const finalProps = mergeProps(passthroughProps, {
|
|
59
59
|
ref,
|
|
60
60
|
"data-slot": "container",
|
|
@@ -64,7 +64,7 @@ function Container(props) {
|
|
|
64
64
|
"data-size": fluid ? void 0 : isStaticValue(size) ? serializeResponsiveValueIf(size, isContainerWidthToken) : void 0,
|
|
65
65
|
"data-align": isStaticValue(align) ? serializeResponsiveValueIf(align, isContainerAlignToken) : void 0,
|
|
66
66
|
"data-max-width": fluid ? void 0 : isStaticValue(maxWidth) ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken) : void 0,
|
|
67
|
-
|
|
67
|
+
...layoutClass ? { class: layoutClass } : {}
|
|
68
68
|
});
|
|
69
69
|
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
70
70
|
asChild: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","names":[],"sources":["../../../src/components/container/container.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutClass,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveContainerSizeValue,\n resolveInlineAlignValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { ContainerAsChildProps, ContainerNativeProps } from \"./container.types\";\n\nconst CONTAINER_WIDTH_TOKENS = new Set([\"1\", \"2\", \"3\", \"4\", \"sm\", \"md\", \"lg\", \"xl\"]);\n\nfunction isContainerWidthToken(value: unknown): value is string {\n return typeof value === \"string\" && CONTAINER_WIDTH_TOKENS.has(value.trim());\n}\n\nfunction isContainerAlignToken(value: unknown): value is \"left\" | \"center\" | \"right\" {\n return typeof value === \"string\" && [\"left\", \"center\", \"right\"].includes(value.trim());\n}\n\nfunction hasStyleValue(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n if (value && typeof value === \"object\") {\n return Object.keys(value as Record<string, unknown>).length > 0;\n }\n\n return false;\n}\n\nfunction isStaticValue(value: unknown): boolean {\n return !isResponsiveValue(value as Record<string, unknown> | undefined);\n}\n\nexport function Container(props: ContainerNativeProps): JSX.Element;\nexport function Container(props: ContainerAsChildProps): JSX.Element;\nexport function Container(props: ContainerNativeProps | ContainerAsChildProps) {\n const {\n asChild,\n children,\n variant,\n fluid = false,\n maxWidth,\n padding,\n size,\n align = \"center\",\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const responsiveVariant =\n fluid || (size === undefined && maxWidth === undefined)\n ? fluid\n ? \"fluid\"\n : (variant ?? \"default\")\n : undefined;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {\n boxSizing: \"border-box\",\n width: \"100%\",\n };\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n const widthValue = fluid ? undefined : (maxWidth ?? size);\n const usesInlineMaxWidth =\n boxProps.maxWidth === undefined &&\n widthValue !== undefined &&\n (isResponsiveValue(widthValue) || !isContainerWidthToken(widthValue));\n\n if (usesInlineMaxWidth) {\n setResponsiveStyleVar(layoutStyle, \"max-width\", widthValue, (value) =>\n typeof value === \"string\" && isContainerWidthToken(value)\n ? resolveContainerSizeValue(value)\n : value,\n );\n }\n\n if (\n padding !== undefined &&\n boxProps.px === undefined &&\n boxProps.pl === undefined &&\n boxProps.pr === undefined\n ) {\n setResponsiveStyleVar(layoutStyle, \"px\", padding, resolveSpaceValue);\n }\n\n const applyAlign = (side: \"marginLeft\" | \"marginRight\", value: typeof align) => {\n setResponsiveStyleVar(layoutStyle, side === \"marginLeft\" ? \"ml\" : \"mr\", value, (input) => {\n const margins = resolveInlineAlignValue(input);\n return side === \"marginLeft\" ? margins.marginLeft : margins.marginRight;\n });\n };\n\n if (boxProps.ml === undefined && boxProps.mr === undefined && isResponsiveValue(align)) {\n applyAlign(\"marginLeft\", align);\n applyAlign(\"marginRight\", align);\n }\n\n const layoutClass =\n Object.keys(layoutStyle).length > 2 || hasStyleValue(userStyle)\n ? withBoxLayoutClass(layoutStyle, userStyle)\n : undefined;\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"container\",\n \"data-ak-layout\": \"true\",\n \"data-variant\": responsiveVariant,\n \"data-fluid\": fluid ? \"true\" : undefined,\n \"data-size\": fluid\n ? undefined\n : isStaticValue(size)\n ? serializeResponsiveValueIf(size, isContainerWidthToken)\n : undefined,\n \"data-align\": isStaticValue(align)\n ? serializeResponsiveValueIf(align, isContainerAlignToken)\n : undefined,\n \"data-max-width\": fluid\n ? undefined\n : isStaticValue(maxWidth)\n ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken)\n : undefined,\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":";;;;;;AAiBA,MAAM,yBAAyB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAM;CAAM;CAAM;CAAK,CAAC;AAEpF,SAAS,sBAAsB,OAAiC;CAC9D,OAAO,OAAO,UAAU,YAAY,uBAAuB,IAAI,MAAM,MAAM,CAAC;;AAG9E,SAAS,sBAAsB,OAAsD;CACnF,OAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;EAAQ,CAAC,SAAS,MAAM,MAAM,CAAC;;AAGxF,SAAS,cAAc,OAAyB;CAC9C,IAAI,OAAO,UAAU,UAAU,OAAO,MAAM,MAAM,CAAC,SAAS;CAC5D,IAAI,SAAS,OAAO,UAAU,UAC5B,OAAO,OAAO,KAAK,MAAiC,CAAC,SAAS;CAGhE,OAAO;;AAGT,SAAS,cAAc,OAAyB;CAC9C,OAAO,CAAC,kBAAkB,MAA6C;;AAKzE,SAAgB,UAAU,OAAqD;CAC7E,MAAM,EACJ,SACA,UACA,SACA,QAAQ,OACR,UACA,SACA,MACA,QAAQ,UACR,KACA,OAAO,WACP,GAAG,SACD;CAEJ,MAAM,oBACJ,SAAU,SAAS,KAAA,KAAa,aAAa,KAAA,IACzC,QACE,UACC,WAAW,YACd,KAAA;CAEN,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,KAAK;CACtE,MAAM,cAA+C;EACnD,WAAW;EACX,OAAO;EACR;CACD,qBAAqB,aAAa,SAAS;CAE3C,MAAM,aAAa,QAAQ,KAAA,IAAa,YAAY;CAMpD,IAJE,SAAS,aAAa,KAAA,KACtB,eAAe,KAAA,MACd,kBAAkB,WAAW,IAAI,CAAC,sBAAsB,WAAW,GAGpE,sBAAsB,aAAa,aAAa,aAAa,UAC3D,OAAO,UAAU,YAAY,sBAAsB,MAAM,GACrD,0BAA0B,MAAM,GAChC,MACL;CAGH,IACE,YAAY,KAAA,KACZ,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,GAEhB,sBAAsB,aAAa,MAAM,SAAS,kBAAkB;CAGtE,MAAM,cAAc,MAAoC,UAAwB;EAC9E,sBAAsB,aAAa,SAAS,eAAe,OAAO,MAAM,QAAQ,UAAU;GACxF,MAAM,UAAU,wBAAwB,MAAM;GAC9C,OAAO,SAAS,eAAe,QAAQ,aAAa,QAAQ;IAC5D;;CAGJ,IAAI,SAAS,OAAO,KAAA,KAAa,SAAS,OAAO,KAAA,KAAa,kBAAkB,MAAM,EAAE;EACtF,WAAW,cAAc,MAAM;EAC/B,WAAW,eAAe,MAAM;;CAGlC,MAAM,cACJ,OAAO,KAAK,YAAY,CAAC,SAAS,KAAK,cAAc,UAAU,GAC3D,mBAAmB,aAAa,UAAU,GAC1C,KAAA;CAEN,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,cAAc,QAAQ,SAAS,KAAA;EAC/B,aAAa,QACT,KAAA,IACA,cAAc,KAAK,GACjB,2BAA2B,MAAM,sBAAsB,GACvD,KAAA;EACN,cAAc,cAAc,MAAM,GAC9B,2BAA2B,OAAO,sBAAsB,GACxD,KAAA;EACJ,kBAAkB,QACd,KAAA,IACA,cAAc,SAAS,GACrB,2BAA2B,UAAU,sBAAsB,GAC3D,KAAA;EACN,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"}
|