@askrjs/themes 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -0
- package/THEMING.md +50 -8
- package/dist/{_internal → components/_internal}/box-layout.js +4 -3
- package/dist/components/_internal/box-layout.js.map +1 -0
- package/dist/components/_internal/classes.js.map +1 -0
- package/dist/components/_internal/jsx.js.map +1 -0
- package/dist/components/_internal/layout.d.ts +6 -28
- package/dist/{_internal → components/_internal}/layout.js +5 -15
- package/dist/components/_internal/layout.js.map +1 -0
- package/dist/{_internal → components/_internal}/merge-props.js +5 -0
- package/dist/components/_internal/merge-props.js.map +1 -0
- package/dist/components/_internal/pathname.js +39 -0
- package/dist/components/_internal/pathname.js.map +1 -0
- package/dist/components/_internal/style.js +41 -0
- package/dist/components/_internal/style.js.map +1 -0
- package/dist/components/alert/alert.d.ts +7 -0
- package/dist/components/alert/alert.js +65 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/alert.types.d.ts +22 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -3
- package/dist/components/aspect-ratio/aspect-ratio.js +33 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +18 -12
- package/dist/components/aspect-ratio/index.d.ts +2 -2
- package/dist/components/badge/badge.a11y.d.ts +13 -9
- package/dist/components/badge/badge.d.ts +8 -3
- package/dist/{badge → components/badge}/badge.js +5 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.types.d.ts +18 -12
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/block/block.a11y.d.ts +20 -0
- package/dist/components/block/block.d.ts +9 -0
- package/dist/components/block/block.js +66 -0
- package/dist/components/block/block.js.map +1 -0
- package/dist/components/block/block.types.d.ts +38 -0
- package/dist/components/block/index.d.ts +3 -0
- package/dist/components/box/box.a11y.d.ts +13 -9
- package/dist/components/box/box.d.ts +9 -4
- package/dist/{box → components/box}/box.js +3 -2
- package/dist/components/box/box.js.map +1 -0
- package/dist/components/box/box.types.d.ts +67 -61
- package/dist/components/box/index.d.ts +3 -3
- package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +13 -9
- package/dist/components/breadcrumb/breadcrumb.a11y.js +15 -0
- package/dist/components/breadcrumb/breadcrumb.a11y.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +18 -13
- package/dist/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.types.d.ts +64 -58
- package/dist/components/breadcrumb/index.d.ts +3 -3
- package/dist/components/button-group/button-group.d.ts +7 -0
- package/dist/components/button-group/button-group.js +20 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.types.d.ts +14 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/card/card.d.ts +13 -7
- package/dist/components/card/card.js +95 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.types.d.ts +32 -24
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/close/close.d.ts +7 -0
- package/dist/components/close/close.js +22 -0
- package/dist/components/close/close.js.map +1 -0
- package/dist/components/close/close.types.d.ts +10 -0
- package/dist/components/close/index.d.ts +2 -0
- package/dist/components/container/container.a11y.d.ts +19 -15
- package/dist/components/container/container.d.ts +8 -3
- package/dist/{container → components/container}/container.js +3 -3
- package/dist/components/container/container.js.map +1 -0
- package/dist/components/container/container.types.d.ts +26 -26
- package/dist/components/container/index.d.ts +3 -3
- package/dist/components/empty-state/empty-state.d.ts +7 -2
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/empty-state.types.d.ts +15 -8
- package/dist/components/empty-state/index.d.ts +2 -2
- package/dist/components/field/field.d.ts +9 -0
- package/dist/components/field/field.js +41 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/field.types.d.ts +20 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/flex/flex.a11y.d.ts +21 -17
- package/dist/components/flex/flex.d.ts +9 -4
- package/dist/{flex → components/flex}/flex.js +3 -2
- package/dist/components/flex/flex.js.map +1 -0
- package/dist/components/flex/flex.types.d.ts +38 -37
- package/dist/components/flex/index.d.ts +3 -3
- package/dist/components/header/header.a11y.d.ts +13 -9
- package/dist/components/header/header.a11y.js +12 -0
- package/dist/components/header/header.a11y.js.map +1 -0
- package/dist/components/header/header.d.ts +7 -2
- package/dist/components/header/header.js.map +1 -0
- package/dist/components/header/header.types.d.ts +8 -4
- package/dist/components/inline/index.d.ts +8 -6
- package/dist/components/inline/index.js.map +1 -0
- package/dist/components/input-group/index.d.ts +2 -0
- package/dist/components/input-group/input-group.d.ts +9 -0
- package/dist/components/input-group/input-group.js +39 -0
- package/dist/components/input-group/input-group.js.map +1 -0
- package/dist/components/input-group/input-group.types.d.ts +26 -0
- package/dist/components/list-group/index.d.ts +2 -0
- package/dist/components/list-group/list-group.d.ts +9 -0
- package/dist/components/list-group/list-group.js +43 -0
- package/dist/components/list-group/list-group.js.map +1 -0
- package/dist/components/list-group/list-group.types.d.ts +32 -0
- package/dist/components/nav/index.d.ts +2 -0
- package/dist/components/nav/nav.d.ts +13 -0
- package/dist/components/nav/nav.js +113 -0
- package/dist/components/nav/nav.js.map +1 -0
- package/dist/components/nav/nav.types.d.ts +56 -0
- package/dist/components/navbar/index.d.ts +5 -2
- package/dist/components/navbar/navbar-panel.js +48 -0
- package/dist/components/navbar/navbar-panel.js.map +1 -0
- package/dist/components/navbar/navbar.context.js +13 -0
- package/dist/components/navbar/navbar.context.js.map +1 -0
- package/dist/components/navbar/navbar.d.ts +45 -7
- package/dist/components/navbar/navbar.js +221 -0
- package/dist/components/navbar/navbar.js.map +1 -0
- package/dist/components/navbar/navbar.render.js +26 -0
- package/dist/components/navbar/navbar.render.js.map +1 -0
- package/dist/components/navbar/navbar.shared.js +18 -0
- package/dist/components/navbar/navbar.shared.js.map +1 -0
- package/dist/components/navbar/navbar.types.d.ts +29 -22
- package/dist/components/overlays/dropdown-content.d.ts +8 -0
- package/dist/components/overlays/dropdown-content.js +18 -0
- package/dist/components/overlays/dropdown-content.js.map +1 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.d.ts +11 -0
- package/dist/components/pagination/pagination.js +95 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/pagination/pagination.types.d.ts +40 -0
- package/dist/components/section/index.d.ts +3 -3
- package/dist/components/section/section.a11y.d.ts +14 -10
- package/dist/components/section/section.d.ts +8 -3
- package/dist/{section → components/section}/section.js +3 -2
- package/dist/components/section/section.js.map +1 -0
- package/dist/components/section/section.types.d.ts +20 -14
- package/dist/components/separator/index.d.ts +3 -3
- package/dist/components/separator/separator.a11y.d.ts +13 -9
- package/dist/components/separator/separator.a11y.js +15 -0
- package/dist/components/separator/separator.a11y.js.map +1 -0
- package/dist/components/separator/separator.d.ts +8 -3
- package/dist/components/separator/separator.js.map +1 -0
- package/dist/components/separator/separator.types.d.ts +19 -13
- package/dist/components/shell/index.d.ts +3 -0
- package/dist/components/shell/shell-nav.types.d.ts +7 -0
- package/dist/components/shell/shell-panel.js +54 -0
- package/dist/components/shell/shell-panel.js.map +1 -0
- package/dist/components/shell/shell-responsive.js +110 -0
- package/dist/components/shell/shell-responsive.js.map +1 -0
- package/dist/components/shell/shell.a11y.d.ts +23 -0
- package/dist/components/shell/shell.a11y.js +23 -0
- package/dist/components/shell/shell.a11y.js.map +1 -0
- package/dist/components/shell/shell.d.ts +13 -0
- package/dist/components/shell/shell.js +69 -0
- package/dist/components/shell/shell.js.map +1 -0
- package/dist/components/shell/shell.types.d.ts +58 -0
- package/dist/components/sidebar/sidebar-panel.d.ts +7 -0
- package/dist/components/sidebar/sidebar-panel.js +59 -0
- package/dist/components/sidebar/sidebar-panel.js.map +1 -0
- package/dist/components/sidebar/sidebar-toggle.d.ts +7 -0
- package/dist/components/sidebar/sidebar-toggle.js +8 -0
- package/dist/components/sidebar/sidebar-toggle.js.map +1 -0
- package/dist/components/sidebar/sidebar.context.js +21 -0
- package/dist/components/sidebar/sidebar.context.js.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sidebar/sidebar.js +228 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/sidebar/sidebar.shared.js +12 -0
- package/dist/components/sidebar/sidebar.shared.js.map +1 -0
- package/dist/components/sidebar/sidebar.types.d.ts +30 -0
- package/dist/components/skeleton/index.d.ts +3 -3
- package/dist/components/skeleton/skeleton.a11y.d.ts +12 -8
- package/dist/components/skeleton/skeleton.d.ts +8 -3
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/skeleton/skeleton.types.d.ts +16 -10
- package/dist/components/spacer/index.d.ts +3 -3
- package/dist/components/spacer/spacer.a11y.d.ts +16 -12
- package/dist/components/spacer/spacer.d.ts +8 -3
- package/dist/{spacer → components/spacer}/spacer.js +3 -1
- package/dist/components/spacer/spacer.js.map +1 -0
- package/dist/components/spacer/spacer.types.d.ts +23 -21
- package/dist/components/spinner/index.d.ts +2 -2
- package/dist/components/spinner/spinner.d.ts +7 -2
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/spinner/spinner.types.d.ts +9 -4
- package/dist/components/stack/index.d.ts +3 -3
- package/dist/components/stack/stack.a11y.d.ts +17 -13
- package/dist/components/stack/stack.d.ts +8 -3
- package/dist/components/stack/stack.js.map +1 -0
- package/dist/components/stack/stack.types.d.ts +19 -13
- package/dist/components/theme/index.d.ts +1 -2
- package/dist/components/theme/theme.d.ts +41 -34
- package/dist/{theme → components/theme}/theme.js +33 -4
- package/dist/components/theme/theme.js.map +1 -0
- package/dist/controls.d.ts +10 -0
- package/dist/controls.js +7 -0
- package/dist/feedback.d.ts +5 -0
- package/dist/feedback.js +4 -0
- package/dist/layouts.d.ts +25 -0
- package/dist/layouts.js +11 -0
- package/dist/navs.d.ts +15 -0
- package/dist/navs.js +9 -0
- package/dist/overlays.d.ts +3 -0
- package/dist/overlays.js +4 -0
- package/dist/shells.d.ts +16 -0
- package/dist/shells.js +11 -0
- package/dist/surfaces.d.ts +16 -0
- package/dist/surfaces.js +9 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +3 -0
- package/dist/themes/default/index.css +3132 -832
- package/package.json +63 -24
- package/src/components/_internal/box-layout.ts +8 -0
- package/src/components/_internal/jsx.ts +91 -16
- package/src/components/_internal/layout.ts +4 -17
- package/src/components/_internal/merge-props.ts +9 -0
- package/src/components/_internal/pathname.ts +67 -0
- package/src/components/_internal/style.ts +51 -0
- package/src/components/alert/alert.tsx +84 -0
- package/src/components/alert/alert.types.ts +20 -0
- package/src/components/alert/index.ts +2 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +10 -24
- package/src/components/aspect-ratio/aspect-ratio.types.ts +2 -1
- package/src/components/badge/badge.tsx +6 -0
- package/src/components/badge/badge.types.ts +2 -1
- package/src/components/block/block.a11y.ts +17 -0
- package/src/components/block/block.tsx +71 -0
- package/src/components/block/block.types.ts +60 -0
- package/src/components/block/index.ts +11 -0
- package/src/components/box/box.tsx +3 -2
- package/src/components/box/box.types.ts +2 -1
- package/src/components/breadcrumb/breadcrumb.types.ts +2 -1
- package/src/components/button-group/button-group.tsx +32 -0
- package/src/components/button-group/button-group.types.ts +12 -0
- package/src/components/button-group/index.ts +2 -0
- package/src/components/card/card.tsx +72 -43
- package/src/components/card/card.types.ts +6 -1
- package/src/components/card/index.ts +10 -1
- package/src/components/close/close.tsx +19 -0
- package/src/components/close/close.types.ts +7 -0
- package/src/components/close/index.ts +2 -0
- package/src/components/container/container.tsx +4 -4
- package/src/components/container/container.types.ts +2 -1
- package/src/components/empty-state/empty-state.types.ts +3 -0
- package/src/components/field/field.tsx +36 -0
- package/src/components/field/field.types.ts +19 -0
- package/src/components/field/index.ts +2 -0
- package/src/components/flex/flex.tsx +4 -2
- package/src/components/flex/flex.types.ts +2 -1
- package/src/components/input-group/index.ts +7 -0
- package/src/components/input-group/input-group.tsx +57 -0
- package/src/components/input-group/input-group.types.ts +26 -0
- package/src/components/list-group/index.ts +7 -0
- package/src/components/list-group/list-group.tsx +74 -0
- package/src/components/list-group/list-group.types.ts +32 -0
- package/src/components/nav/index.ts +14 -0
- package/src/components/nav/nav.tsx +203 -0
- package/src/components/nav/nav.types.ts +68 -0
- package/src/components/navbar/index.ts +9 -2
- package/src/components/navbar/navbar-panel.tsx +67 -0
- package/src/components/navbar/navbar.context.ts +22 -0
- package/src/components/navbar/navbar.render.tsx +32 -0
- package/src/components/navbar/navbar.shared.ts +21 -0
- package/src/components/navbar/navbar.tsx +252 -99
- package/src/components/navbar/navbar.types.ts +36 -22
- package/src/components/overlays/dropdown-content.tsx +28 -0
- package/src/components/pagination/index.ts +8 -0
- package/src/components/pagination/pagination.tsx +158 -0
- package/src/components/pagination/pagination.types.ts +41 -0
- package/src/components/section/section.tsx +3 -2
- package/src/components/section/section.types.ts +2 -1
- package/src/components/separator/separator.types.ts +2 -1
- package/src/components/shell/index.ts +16 -0
- package/src/components/shell/shell-nav.types.ts +3 -0
- package/src/components/shell/shell-panel.tsx +85 -0
- package/src/components/shell/shell-responsive.tsx +212 -0
- package/src/components/shell/shell.a11y.ts +20 -0
- package/src/components/shell/shell.tsx +74 -0
- package/src/components/shell/shell.types.ts +71 -0
- package/src/components/sidebar/index.ts +5 -0
- package/src/components/sidebar/sidebar-panel.tsx +76 -0
- package/src/components/sidebar/sidebar-toggle.tsx +5 -0
- package/src/components/sidebar/sidebar.context.ts +40 -0
- package/src/components/sidebar/sidebar.shared.ts +12 -0
- package/src/components/sidebar/sidebar.tsx +355 -0
- package/src/components/sidebar/sidebar.types.ts +35 -0
- package/src/components/skeleton/skeleton.types.ts +2 -1
- package/src/components/spacer/spacer.tsx +4 -1
- package/src/components/spacer/spacer.types.ts +3 -2
- package/src/components/stack/stack.types.ts +2 -1
- package/src/components/theme/index.ts +10 -1
- package/src/components/theme/theme.tsx +15 -4
- package/src/controls.ts +18 -0
- package/src/feedback.ts +6 -0
- package/src/layouts.ts +19 -0
- package/src/navs.ts +26 -0
- package/src/overlays.ts +90 -0
- package/src/shells.ts +13 -0
- package/src/surfaces.ts +23 -0
- package/src/theme.ts +21 -0
- package/src/themes/default/index.css +13 -3
- package/src/themes/default/styles/actions/button-group.css +74 -0
- package/src/themes/default/styles/actions/button.css +48 -8
- package/src/themes/default/styles/actions/toggle-group.css +19 -12
- package/src/themes/default/styles/actions/toggle.css +16 -10
- package/src/themes/default/styles/base/icon.css +2 -0
- package/src/themes/default/styles/base/reset.css +28 -0
- package/src/themes/default/styles/base/typography.css +37 -17
- package/src/themes/default/styles/base/utilities.css +56 -39
- package/src/themes/default/styles/disclosure/accordion.css +22 -14
- package/src/themes/default/styles/disclosure/collapsible.css +22 -11
- package/src/themes/default/styles/display/alert.css +109 -0
- package/src/themes/default/styles/display/avatar.css +9 -4
- package/src/themes/default/styles/display/badge.css +12 -3
- package/src/themes/default/styles/display/card.css +16 -4
- package/src/themes/default/styles/display/coverage.css +2 -14
- package/src/themes/default/styles/display/list-group.css +84 -0
- package/src/themes/default/styles/display/progress-circle.css +3 -2
- package/src/themes/default/styles/display/progress.css +8 -5
- package/src/themes/default/styles/display/scroll-area.css +15 -0
- package/src/themes/default/styles/display/separator.css +4 -4
- package/src/themes/default/styles/display/skeleton.css +25 -2
- package/src/themes/default/styles/display/spinner.css +1 -1
- package/src/themes/default/styles/display/table.css +7 -4
- package/src/themes/default/styles/display/virtual-list.css +29 -0
- package/src/themes/default/styles/display/virtual-table.css +68 -0
- package/src/themes/default/styles/forms/checkbox.css +2 -1
- package/src/themes/default/styles/forms/field.css +22 -0
- package/src/themes/default/styles/forms/form.css +1 -1
- package/src/themes/default/styles/forms/input-group.css +202 -0
- package/src/themes/default/styles/forms/input.css +22 -6
- package/src/themes/default/styles/forms/label.css +2 -0
- package/src/themes/default/styles/forms/radio-group.css +22 -13
- package/src/themes/default/styles/forms/select.css +71 -26
- package/src/themes/default/styles/forms/slider.css +32 -16
- package/src/themes/default/styles/forms/switch.css +2 -1
- package/src/themes/default/styles/forms/textarea.css +35 -6
- package/src/themes/default/styles/layout/aspect-ratio.css +3 -1
- package/src/themes/default/styles/layout/block.css +23 -0
- package/src/themes/default/styles/layout/patterns.css +155 -3
- package/src/themes/default/styles/layout/responsive-layout.css +140 -121
- package/src/themes/default/styles/navigation/breadcrumb.css +7 -1
- package/src/themes/default/styles/navigation/menu.css +150 -7
- package/src/themes/default/styles/navigation/menubar.css +194 -28
- package/src/themes/default/styles/navigation/nav.css +231 -0
- package/src/themes/default/styles/navigation/pagination.css +91 -0
- package/src/themes/default/styles/overlays/alert-dialog.css +1 -1
- package/src/themes/default/styles/overlays/dialog.css +42 -10
- package/src/themes/default/styles/overlays/dropdown.css +160 -0
- package/src/themes/default/styles/overlays/hover-card.css +28 -3
- package/src/themes/default/styles/overlays/popover.css +50 -6
- package/src/themes/default/styles/overlays/toast.css +66 -17
- package/src/themes/default/styles/overlays/tooltip.css +45 -18
- package/src/themes/default/styles/shell/header.css +18 -3
- package/src/themes/default/styles/shell/navbar.css +434 -73
- package/src/themes/default/styles/shell/sidebar.css +809 -0
- package/src/themes/default/styles/shell/theme.css +7 -5
- package/src/themes/default/tokens.css +186 -123
- package/src/themes/presets/calico.css +46 -0
- package/src/themes/presets/ginger.css +46 -0
- package/src/themes/presets/index.css +5 -0
- package/src/themes/presets/tabby.css +46 -0
- package/src/themes/presets/torty.css +49 -0
- package/src/themes/presets/tuxedo.css +49 -0
- package/templates/theme/index.css +14 -4
- package/templates/theme/styles/actions/button-group.css +74 -0
- package/templates/theme/styles/actions/button.css +48 -8
- package/templates/theme/styles/actions/toggle-group.css +19 -12
- package/templates/theme/styles/actions/toggle.css +16 -10
- package/templates/theme/styles/base/icon.css +2 -0
- package/templates/theme/styles/base/reset.css +28 -0
- package/templates/theme/styles/base/typography.css +37 -17
- package/templates/theme/styles/disclosure/accordion.css +22 -14
- package/templates/theme/styles/disclosure/collapsible.css +22 -11
- package/templates/theme/styles/display/alert.css +109 -0
- package/templates/theme/styles/display/avatar.css +9 -4
- package/templates/theme/styles/display/badge.css +12 -3
- package/templates/theme/styles/display/card.css +16 -4
- package/templates/theme/styles/display/coverage.css +105 -15
- package/templates/theme/styles/display/list-group.css +84 -0
- package/templates/theme/styles/display/progress-circle.css +3 -2
- package/templates/theme/styles/display/progress.css +8 -5
- package/templates/theme/styles/display/scroll-area.css +15 -0
- package/templates/theme/styles/display/separator.css +4 -4
- package/templates/theme/styles/display/skeleton.css +25 -2
- package/templates/theme/styles/display/spinner.css +1 -1
- package/templates/theme/styles/display/table.css +7 -4
- package/templates/theme/styles/display/virtual-list.css +29 -0
- package/templates/theme/styles/display/virtual-table.css +68 -0
- package/templates/theme/styles/forms/checkbox.css +2 -1
- package/templates/theme/styles/forms/field.css +22 -0
- package/templates/theme/styles/forms/form.css +1 -1
- package/templates/theme/styles/forms/input-group.css +202 -0
- package/templates/theme/styles/forms/input.css +22 -6
- package/templates/theme/styles/forms/label.css +2 -0
- package/templates/theme/styles/forms/radio-group.css +22 -13
- package/templates/theme/styles/forms/select.css +71 -26
- package/templates/theme/styles/forms/slider.css +32 -16
- package/templates/theme/styles/forms/switch.css +2 -1
- package/templates/theme/styles/forms/textarea.css +35 -6
- package/templates/theme/styles/layout/aspect-ratio.css +3 -1
- package/templates/theme/styles/layout/block.css +23 -0
- package/templates/theme/styles/layout/patterns.css +155 -3
- package/templates/theme/styles/layout/responsive-layout.css +140 -121
- package/templates/theme/styles/navigation/breadcrumb.css +22 -8
- package/templates/theme/styles/navigation/menu.css +150 -7
- package/templates/theme/styles/navigation/menubar.css +194 -28
- package/templates/theme/styles/navigation/nav.css +231 -0
- package/templates/theme/styles/navigation/pagination.css +91 -0
- package/templates/theme/styles/overlays/alert-dialog.css +1 -1
- package/templates/theme/styles/overlays/dialog.css +42 -10
- package/templates/theme/styles/overlays/dropdown.css +160 -0
- package/templates/theme/styles/overlays/hover-card.css +28 -3
- package/templates/theme/styles/overlays/popover.css +50 -6
- package/templates/theme/styles/overlays/toast.css +66 -17
- package/templates/theme/styles/overlays/tooltip.css +45 -18
- package/templates/theme/styles/shell/header.css +18 -3
- package/templates/theme/styles/shell/navbar.css +434 -73
- package/templates/theme/styles/shell/sidebar.css +809 -0
- package/templates/theme/styles/shell/theme.css +7 -5
- package/templates/theme/tokens.css +186 -123
- package/dist/_internal/box-layout.js.map +0 -1
- package/dist/_internal/classes.js.map +0 -1
- package/dist/_internal/jsx.js.map +0 -1
- package/dist/_internal/layout.d.ts +0 -9
- package/dist/_internal/layout.js.map +0 -1
- package/dist/_internal/merge-props.js.map +0 -1
- package/dist/accessible-icon/accessible-icon.d.ts +0 -7
- package/dist/accessible-icon/accessible-icon.js +0 -20
- package/dist/accessible-icon/accessible-icon.js.map +0 -1
- package/dist/accessible-icon/accessible-icon.types.d.ts +0 -9
- package/dist/aspect-ratio/aspect-ratio.d.ts +0 -8
- package/dist/aspect-ratio/aspect-ratio.js +0 -36
- package/dist/aspect-ratio/aspect-ratio.js.map +0 -1
- package/dist/aspect-ratio/aspect-ratio.types.d.ts +0 -20
- package/dist/aspect-ratio/index.d.ts +0 -2
- package/dist/badge/badge.d.ts +0 -8
- package/dist/badge/badge.js.map +0 -1
- package/dist/badge/badge.types.d.ts +0 -20
- package/dist/badge/index.d.ts +0 -2
- package/dist/box/box.d.ts +0 -9
- package/dist/box/box.js.map +0 -1
- package/dist/box/box.types.d.ts +0 -71
- package/dist/box/index.d.ts +0 -2
- package/dist/breadcrumb/breadcrumb.d.ts +0 -18
- package/dist/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/breadcrumb/breadcrumb.types.d.ts +0 -64
- package/dist/breadcrumb/index.d.ts +0 -2
- package/dist/card/card.d.ts +0 -12
- package/dist/card/card.js +0 -68
- package/dist/card/card.js.map +0 -1
- package/dist/card/card.types.d.ts +0 -37
- package/dist/card/index.d.ts +0 -2
- package/dist/components/_internal/box-layout.d.ts +0 -7
- package/dist/components/_internal/classes.d.ts +0 -1
- package/dist/components/_internal/jsx.d.ts +0 -8
- package/dist/components/_internal/merge-props.d.ts +0 -1
- package/dist/components/_internal/style.d.ts +0 -1
- package/dist/components/accessible-icon/accessible-icon.d.ts +0 -2
- package/dist/components/accessible-icon/accessible-icon.types.d.ts +0 -5
- package/dist/components/accessible-icon/index.d.ts +0 -2
- package/dist/components/grid/grid.a11y.d.ts +0 -21
- package/dist/components/grid/grid.d.ts +0 -4
- package/dist/components/grid/grid.types.d.ts +0 -37
- package/dist/components/grid/index.d.ts +0 -3
- package/dist/components/header/index.d.ts +0 -3
- package/dist/components/index.d.ts +0 -49
- package/dist/components/index.js +0 -28
- package/dist/components/logos/create-logo.d.ts +0 -5
- package/dist/components/logos/github-logo.d.ts +0 -4
- package/dist/components/logos/google-logo.d.ts +0 -4
- package/dist/components/logos/index.d.ts +0 -5
- package/dist/components/logos/microsoft-logo.d.ts +0 -4
- package/dist/components/logos/types.d.ts +0 -14
- package/dist/components/sidebar-layout/index.d.ts +0 -3
- package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +0 -15
- package/dist/components/sidebar-layout/sidebar-layout.d.ts +0 -2
- package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +0 -20
- package/dist/components/topbar-layout/index.d.ts +0 -3
- package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +0 -13
- package/dist/components/topbar-layout/topbar-layout.d.ts +0 -2
- package/dist/components/topbar-layout/topbar-layout.types.d.ts +0 -12
- package/dist/container/container.d.ts +0 -8
- package/dist/container/container.js.map +0 -1
- package/dist/container/container.types.d.ts +0 -28
- package/dist/container/index.d.ts +0 -2
- package/dist/empty-state/empty-state.d.ts +0 -7
- package/dist/empty-state/empty-state.js.map +0 -1
- package/dist/empty-state/empty-state.types.d.ts +0 -13
- package/dist/flex/flex.d.ts +0 -9
- package/dist/flex/flex.js.map +0 -1
- package/dist/flex/flex.types.d.ts +0 -41
- package/dist/flex/index.d.ts +0 -2
- package/dist/grid/grid.d.ts +0 -9
- package/dist/grid/grid.js +0 -115
- package/dist/grid/grid.js.map +0 -1
- package/dist/grid/grid.types.d.ts +0 -40
- package/dist/grid/index.d.ts +0 -2
- package/dist/header/header.d.ts +0 -7
- package/dist/header/header.js.map +0 -1
- package/dist/header/header.types.d.ts +0 -9
- package/dist/inline/index.d.ts +0 -7
- package/dist/inline/index.js.map +0 -1
- package/dist/logos/create-logo.d.ts +0 -1
- package/dist/logos/create-logo.js +0 -75
- package/dist/logos/create-logo.js.map +0 -1
- package/dist/logos/github-logo.d.ts +0 -18
- package/dist/logos/github-logo.js +0 -9
- package/dist/logos/github-logo.js.map +0 -1
- package/dist/logos/google-logo.d.ts +0 -18
- package/dist/logos/google-logo.js +0 -23
- package/dist/logos/google-logo.js.map +0 -1
- package/dist/logos/index.d.ts +0 -4
- package/dist/logos/microsoft-logo.d.ts +0 -18
- package/dist/logos/microsoft-logo.js +0 -35
- package/dist/logos/microsoft-logo.js.map +0 -1
- package/dist/logos/types.d.ts +0 -16
- package/dist/navbar/index.d.ts +0 -2
- package/dist/navbar/navbar.d.ts +0 -12
- package/dist/navbar/navbar.js +0 -103
- package/dist/navbar/navbar.js.map +0 -1
- package/dist/navbar/navbar.types.d.ts +0 -31
- package/dist/section/index.d.ts +0 -2
- package/dist/section/section.d.ts +0 -8
- package/dist/section/section.js.map +0 -1
- package/dist/section/section.types.d.ts +0 -22
- package/dist/separator/index.d.ts +0 -2
- package/dist/separator/separator.d.ts +0 -8
- package/dist/separator/separator.js.map +0 -1
- package/dist/separator/separator.types.d.ts +0 -21
- package/dist/sidebar-layout/index.d.ts +0 -2
- package/dist/sidebar-layout/sidebar-layout.d.ts +0 -7
- package/dist/sidebar-layout/sidebar-layout.js +0 -51
- package/dist/sidebar-layout/sidebar-layout.js.map +0 -1
- package/dist/sidebar-layout/sidebar-layout.types.d.ts +0 -20
- package/dist/skeleton/index.d.ts +0 -2
- package/dist/skeleton/skeleton.d.ts +0 -8
- package/dist/skeleton/skeleton.js.map +0 -1
- package/dist/skeleton/skeleton.types.d.ts +0 -18
- package/dist/spacer/index.d.ts +0 -2
- package/dist/spacer/spacer.d.ts +0 -8
- package/dist/spacer/spacer.js.map +0 -1
- package/dist/spacer/spacer.types.d.ts +0 -25
- package/dist/spinner/index.d.ts +0 -2
- package/dist/spinner/spinner.d.ts +0 -7
- package/dist/spinner/spinner.js.map +0 -1
- package/dist/spinner/spinner.types.d.ts +0 -10
- package/dist/stack/index.d.ts +0 -2
- package/dist/stack/stack.d.ts +0 -8
- package/dist/stack/stack.js.map +0 -1
- package/dist/stack/stack.types.d.ts +0 -21
- package/dist/theme/index.d.ts +0 -1
- package/dist/theme/theme.d.ts +0 -44
- package/dist/theme/theme.js.map +0 -1
- package/dist/topbar-layout/index.d.ts +0 -2
- package/dist/topbar-layout/topbar-layout.d.ts +0 -7
- package/dist/topbar-layout/topbar-layout.js +0 -37
- package/dist/topbar-layout/topbar-layout.js.map +0 -1
- package/dist/topbar-layout/topbar-layout.types.d.ts +0 -13
- package/src/askr-compat.d.ts +0 -110
- package/src/askr-router.d.ts +0 -16
- package/src/components/accessible-icon/accessible-icon.tsx +0 -18
- package/src/components/accessible-icon/accessible-icon.types.ts +0 -5
- package/src/components/accessible-icon/index.ts +0 -2
- package/src/components/grid/grid.a11y.ts +0 -22
- package/src/components/grid/grid.tsx +0 -172
- package/src/components/grid/grid.types.ts +0 -45
- package/src/components/grid/index.ts +0 -10
- package/src/components/index.ts +0 -108
- package/src/components/logos/create-logo.tsx +0 -103
- package/src/components/logos/github-logo.tsx +0 -13
- package/src/components/logos/google-logo.tsx +0 -34
- package/src/components/logos/index.ts +0 -5
- package/src/components/logos/microsoft-logo.tsx +0 -10
- package/src/components/logos/types.ts +0 -24
- package/src/components/sidebar-layout/index.ts +0 -6
- package/src/components/sidebar-layout/sidebar-layout.a11y.ts +0 -16
- package/src/components/sidebar-layout/sidebar-layout.tsx +0 -59
- package/src/components/sidebar-layout/sidebar-layout.types.ts +0 -22
- package/src/components/topbar-layout/index.ts +0 -3
- package/src/components/topbar-layout/topbar-layout.a11y.ts +0 -14
- package/src/components/topbar-layout/topbar-layout.tsx +0 -39
- package/src/components/topbar-layout/topbar-layout.types.ts +0 -13
- package/src/themes/default/styles/layout/dashboard-layout.css +0 -15
- package/src/themes/default/styles/layout/docs-layout.css +0 -10
- package/src/themes/default/styles/layout/sidebar.css +0 -10
- package/src/themes/default/styles/navigation/navigation-menu.css +0 -90
- package/src/themes/default/styles/navigation/tabs.css +0 -61
- package/src/themes/default/styles/overlays/dropdown-menu.css +0 -109
- package/templates/theme/styles/layout/dashboard-layout.css +0 -16
- package/templates/theme/styles/layout/docs-layout.css +0 -11
- package/templates/theme/styles/layout/sidebar.css +0 -11
- package/templates/theme/styles/navigation/navigation-menu.css +0 -90
- package/templates/theme/styles/navigation/tabs.css +0 -61
- package/templates/theme/styles/overlays/dropdown-menu.css +0 -109
- /package/dist/{_internal → components/_internal}/classes.js +0 -0
- /package/dist/{_internal → components/_internal}/jsx.js +0 -0
- /package/dist/{breadcrumb → components/breadcrumb}/breadcrumb.js +0 -0
- /package/dist/{empty-state → components/empty-state}/empty-state.js +0 -0
- /package/dist/{header → components/header}/header.js +0 -0
- /package/dist/{inline → components/inline}/index.js +0 -0
- /package/dist/{separator → components/separator}/separator.js +0 -0
- /package/dist/{skeleton → components/skeleton}/skeleton.js +0 -0
- /package/dist/{spinner → components/spinner}/spinner.js +0 -0
- /package/dist/{stack → components/stack}/stack.js +0 -0
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
:where([data-slot="theme-picker"]) {
|
|
16
16
|
display: inline-flex;
|
|
17
|
-
min-
|
|
18
|
-
min-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
min-block-size: var(--ak-density-control-height-md);
|
|
18
|
+
min-inline-size: min(8rem, 100%);
|
|
19
|
+
max-inline-size: 100%;
|
|
20
|
+
padding-inline: var(--ak-density-control-padding-x-md) 2.1rem;
|
|
21
|
+
border: 1px solid color-mix(in srgb, var(--ak-color-border) 84%, var(--ak-color-surface) 16%);
|
|
21
22
|
border-radius: var(--ak-radius-md);
|
|
22
23
|
background: var(--ak-color-surface);
|
|
23
24
|
color: var(--ak-color-text);
|
|
24
25
|
font: inherit;
|
|
25
26
|
font-size: var(--ak-font-size-sm);
|
|
26
27
|
line-height: 1;
|
|
28
|
+
text-overflow: ellipsis;
|
|
27
29
|
box-shadow: var(--ak-shadow-sm);
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -31,5 +33,5 @@
|
|
|
31
33
|
outline: none;
|
|
32
34
|
box-shadow:
|
|
33
35
|
0 0 0 1px var(--ak-color-surface),
|
|
34
|
-
0 0 0
|
|
36
|
+
0 0 0 calc(var(--ak-focus-ring-width) + 1px) var(--ak-color-focus-ring);
|
|
35
37
|
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
--ak-font-size-xl: 1.25rem;
|
|
19
19
|
--ak-font-size-2xl: 1.5rem;
|
|
20
20
|
--ak-font-size-3xl: 1.75rem;
|
|
21
|
-
--ak-font-size-heading: clamp(1.
|
|
22
|
-
--ak-font-size-display: clamp(2.
|
|
21
|
+
--ak-font-size-heading: clamp(1.25rem, 1.08rem + 0.62vw, 1.75rem);
|
|
22
|
+
--ak-font-size-display: clamp(2.35rem, 1.7rem + 2.05vw, 3.65rem);
|
|
23
23
|
|
|
24
24
|
--ak-font-weight-light: 300;
|
|
25
25
|
--ak-font-weight-regular: 400;
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
--ak-font-weight-bold: 700;
|
|
29
29
|
|
|
30
30
|
--ak-line-height-tight: 1.15;
|
|
31
|
-
--ak-line-height-normal: 1.
|
|
32
|
-
--ak-line-height-relaxed: 1.
|
|
31
|
+
--ak-line-height-normal: 1.5;
|
|
32
|
+
--ak-line-height-relaxed: 1.68;
|
|
33
33
|
|
|
34
34
|
--ak-type-1-size: 0.75rem;
|
|
35
35
|
--ak-type-1-line-height: 1rem;
|
|
@@ -52,13 +52,14 @@
|
|
|
52
52
|
--ak-type-7-size: 2rem;
|
|
53
53
|
--ak-type-7-line-height: 2.35rem;
|
|
54
54
|
--ak-type-7-letter-spacing: -0.03em;
|
|
55
|
-
--ak-type-8-size: 2.
|
|
56
|
-
--ak-type-8-line-height: 2.
|
|
57
|
-
--ak-type-8-letter-spacing: -0.
|
|
58
|
-
--ak-type-9-size: 4.
|
|
59
|
-
--ak-type-9-line-height: 4.
|
|
60
|
-
--ak-type-9-letter-spacing: -0.
|
|
61
|
-
|
|
55
|
+
--ak-type-8-size: 2.625rem;
|
|
56
|
+
--ak-type-8-line-height: 2.85rem;
|
|
57
|
+
--ak-type-8-letter-spacing: -0.032em;
|
|
58
|
+
--ak-type-9-size: 4.25rem;
|
|
59
|
+
--ak-type-9-line-height: 4.2rem;
|
|
60
|
+
--ak-type-9-letter-spacing: -0.045em;
|
|
61
|
+
|
|
62
|
+
/* Semantic spacing is the authored scale. Numeric steps are compatibility aliases. */
|
|
62
63
|
--ak-space-xs: 0.25rem;
|
|
63
64
|
--ak-space-sm: 0.5rem;
|
|
64
65
|
--ak-space-md: 0.875rem;
|
|
@@ -66,28 +67,29 @@
|
|
|
66
67
|
--ak-space-xl: 1.5rem;
|
|
67
68
|
--ak-space-2xl: 2.25rem;
|
|
68
69
|
--ak-space-3xl: 3.5rem;
|
|
69
|
-
--ak-space-1:
|
|
70
|
-
--ak-space-2:
|
|
70
|
+
--ak-space-1: var(--ak-space-xs);
|
|
71
|
+
--ak-space-2: var(--ak-space-sm);
|
|
71
72
|
--ak-space-3: 0.75rem;
|
|
72
|
-
--ak-space-4:
|
|
73
|
-
--ak-space-5:
|
|
74
|
-
--ak-space-6:
|
|
73
|
+
--ak-space-4: var(--ak-space-md);
|
|
74
|
+
--ak-space-5: var(--ak-space-xl);
|
|
75
|
+
--ak-space-6: var(--ak-space-2xl);
|
|
75
76
|
--ak-space-7: 2.5rem;
|
|
76
|
-
--ak-space-8:
|
|
77
|
+
--ak-space-8: var(--ak-space-3xl);
|
|
77
78
|
--ak-space-9: 4rem;
|
|
78
79
|
|
|
79
80
|
--ak-radius-sm: 6px;
|
|
80
81
|
--ak-radius-md: 8px;
|
|
81
|
-
--ak-radius-lg:
|
|
82
|
-
--ak-radius-xl:
|
|
82
|
+
--ak-radius-lg: 10px;
|
|
83
|
+
--ak-radius-xl: 14px;
|
|
83
84
|
--ak-radius-round: 9999px;
|
|
84
85
|
|
|
85
86
|
--ak-border-width-sm: 1px;
|
|
86
87
|
--ak-border-width-md: 2px;
|
|
87
|
-
--ak-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.
|
|
88
|
-
--ak-shadow-md: 0
|
|
89
|
-
--ak-shadow-lg:
|
|
90
|
-
|
|
88
|
+
--ak-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 1px 1px rgba(15, 23, 42, 0.04);
|
|
89
|
+
--ak-shadow-md: 0 16px 36px -24px rgba(15, 23, 42, 0.36), 0 4px 12px -8px rgba(15, 23, 42, 0.18);
|
|
90
|
+
--ak-shadow-lg:
|
|
91
|
+
0 28px 72px -36px rgba(15, 23, 42, 0.48), 0 12px 30px -18px rgba(15, 23, 42, 0.28);
|
|
92
|
+
--ak-focus-ring-width: 2px;
|
|
91
93
|
--ak-focus-ring-offset: 2px;
|
|
92
94
|
--ak-duration-fast: 160ms;
|
|
93
95
|
--ak-duration-normal: 220ms;
|
|
@@ -113,16 +115,18 @@
|
|
|
113
115
|
--ak-layout-sidebar-width-lg: 20rem;
|
|
114
116
|
--ak-layout-sidebar-width-xl: 23rem;
|
|
115
117
|
--ak-layout-sidebar-width: 17rem;
|
|
118
|
+
--ak-layout-sidebar-rail-width: 4.5rem;
|
|
119
|
+
--ak-layout-mobile-drawer-width: 22rem;
|
|
116
120
|
--ak-layout-content-max-width: 80rem;
|
|
117
121
|
--ak-layout-page-gutter: clamp(1rem, 0.7rem + 1.25vw, 1.75rem);
|
|
118
|
-
--ak-layout-panel-padding: clamp(
|
|
122
|
+
--ak-layout-panel-padding: clamp(0.9rem, 0.78rem + 0.45vw, 1.2rem);
|
|
119
123
|
--ak-container-inline-size: 100%;
|
|
120
124
|
--ak-density-control-height-sm: 2rem;
|
|
121
|
-
--ak-density-control-height-md: 2.
|
|
122
|
-
--ak-density-control-height-lg: 2.
|
|
123
|
-
--ak-density-control-padding-x-sm: 0.
|
|
124
|
-
--ak-density-control-padding-x-md:
|
|
125
|
-
--ak-density-control-padding-x-lg: 1.
|
|
125
|
+
--ak-density-control-height-md: 2.375rem;
|
|
126
|
+
--ak-density-control-height-lg: 2.75rem;
|
|
127
|
+
--ak-density-control-padding-x-sm: 0.75rem;
|
|
128
|
+
--ak-density-control-padding-x-md: 0.95rem;
|
|
129
|
+
--ak-density-control-padding-x-lg: 1.1rem;
|
|
126
130
|
--ak-container-1: 30rem;
|
|
127
131
|
--ak-container-2: 42rem;
|
|
128
132
|
--ak-container-3: 58rem;
|
|
@@ -140,6 +144,57 @@
|
|
|
140
144
|
--ak-z-popover: 1500;
|
|
141
145
|
--ak-z-toast: 1550;
|
|
142
146
|
--ak-z-tooltip: 1600;
|
|
147
|
+
|
|
148
|
+
--ak-dark-color-primary: #60a5fa;
|
|
149
|
+
--ak-dark-color-primary-hover: #7ab8ff;
|
|
150
|
+
--ak-dark-color-primary-active: #4d92ef;
|
|
151
|
+
--ak-dark-color-primary-soft: rgba(96, 165, 250, 0.2);
|
|
152
|
+
--ak-dark-color-primary-ink: #dcedff;
|
|
153
|
+
|
|
154
|
+
--ak-dark-color-text: #edf3ff;
|
|
155
|
+
--ak-dark-color-text-muted: #a9b7cc;
|
|
156
|
+
--ak-dark-color-text-subtle: #8090a8;
|
|
157
|
+
--ak-dark-color-text-inverse: #0e1320;
|
|
158
|
+
|
|
159
|
+
--ak-dark-color-bg: #0f1420;
|
|
160
|
+
--ak-dark-color-surface: #171d2b;
|
|
161
|
+
--ak-dark-color-surface-muted: #20283a;
|
|
162
|
+
--ak-dark-color-surface-raised: #263249;
|
|
163
|
+
--ak-dark-color-surface-overlay: rgba(23, 29, 43, 0.88);
|
|
164
|
+
|
|
165
|
+
--ak-dark-color-border-subtle: #2a3449;
|
|
166
|
+
--ak-dark-color-border: #38445c;
|
|
167
|
+
--ak-dark-color-border-strong: #59698a;
|
|
168
|
+
|
|
169
|
+
--ak-dark-color-success: #4ade80;
|
|
170
|
+
--ak-dark-color-success-soft: rgba(74, 222, 128, 0.18);
|
|
171
|
+
--ak-dark-color-success-ink: #dcfce7;
|
|
172
|
+
--ak-dark-color-warning: #fbbf24;
|
|
173
|
+
--ak-dark-color-warning-soft: rgba(251, 191, 36, 0.18);
|
|
174
|
+
--ak-dark-color-warning-ink: #fef3c7;
|
|
175
|
+
--ak-dark-color-danger: #fb7185;
|
|
176
|
+
--ak-dark-color-danger-soft: rgba(251, 113, 133, 0.18);
|
|
177
|
+
--ak-dark-color-danger-ink: #ffe4e6;
|
|
178
|
+
--ak-dark-color-info: #38bdf8;
|
|
179
|
+
--ak-dark-color-info-soft: rgba(56, 189, 248, 0.18);
|
|
180
|
+
--ak-dark-color-info-ink: #e0f2fe;
|
|
181
|
+
|
|
182
|
+
--ak-dark-color-link: var(--ak-dark-color-primary);
|
|
183
|
+
--ak-dark-color-link-hover: var(--ak-dark-color-primary-hover);
|
|
184
|
+
--ak-dark-color-focus-ring: rgba(96, 165, 250, 0.22);
|
|
185
|
+
--ak-dark-color-disabled-bg: #1e2737;
|
|
186
|
+
--ak-dark-color-disabled-surface: #171d2b;
|
|
187
|
+
--ak-dark-color-disabled-border: #2f3b50;
|
|
188
|
+
--ak-dark-color-disabled-text: #74849d;
|
|
189
|
+
--ak-dark-color-selected: rgba(110, 168, 254, 0.15);
|
|
190
|
+
--ak-dark-color-selected-border: #60a5fa;
|
|
191
|
+
--ak-dark-color-hover: rgba(237, 243, 255, 0.06);
|
|
192
|
+
--ak-dark-color-active: rgba(237, 243, 255, 0.12);
|
|
193
|
+
--ak-dark-color-backdrop: rgba(2, 6, 12, 0.66);
|
|
194
|
+
|
|
195
|
+
--ak-dark-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.03);
|
|
196
|
+
--ak-dark-shadow-md: 0 16px 40px -24px rgba(0, 0, 0, 0.64), 0 4px 14px -8px rgba(0, 0, 0, 0.42);
|
|
197
|
+
--ak-dark-shadow-lg: 0 30px 78px -38px rgba(0, 0, 0, 0.72), 0 14px 34px -20px rgba(0, 0, 0, 0.52);
|
|
143
198
|
}
|
|
144
199
|
|
|
145
200
|
:root,
|
|
@@ -178,8 +233,8 @@
|
|
|
178
233
|
--ak-color-info-soft: rgba(14, 165, 233, 0.16);
|
|
179
234
|
--ak-color-info-ink: #0c4a6e;
|
|
180
235
|
|
|
181
|
-
--ak-color-link:
|
|
182
|
-
--ak-color-link-hover:
|
|
236
|
+
--ak-color-link: #1d4ed8;
|
|
237
|
+
--ak-color-link-hover: #1e40af;
|
|
183
238
|
--ak-color-focus-ring: rgba(37, 99, 235, 0.18);
|
|
184
239
|
--ak-color-disabled-bg: #ecf0f7;
|
|
185
240
|
--ak-color-disabled-surface: #f7f9fc;
|
|
@@ -198,52 +253,56 @@
|
|
|
198
253
|
}
|
|
199
254
|
|
|
200
255
|
[data-theme="dark"] {
|
|
201
|
-
--ak-color-primary:
|
|
202
|
-
--ak-color-primary-hover:
|
|
203
|
-
--ak-color-primary-active:
|
|
204
|
-
--ak-color-primary-soft:
|
|
205
|
-
--ak-color-primary-ink:
|
|
206
|
-
|
|
207
|
-
--ak-color-text:
|
|
208
|
-
--ak-color-text-muted:
|
|
209
|
-
--ak-color-text-subtle:
|
|
210
|
-
--ak-color-text-inverse:
|
|
211
|
-
|
|
212
|
-
--ak-color-bg:
|
|
213
|
-
--ak-color-surface:
|
|
214
|
-
--ak-color-surface-muted:
|
|
215
|
-
--ak-color-surface-raised:
|
|
216
|
-
--ak-color-surface-overlay:
|
|
217
|
-
|
|
218
|
-
--ak-color-border-subtle:
|
|
219
|
-
--ak-color-border:
|
|
220
|
-
--ak-color-border-strong:
|
|
221
|
-
|
|
222
|
-
--ak-color-success:
|
|
223
|
-
--ak-color-success-soft:
|
|
224
|
-
--ak-color-success-ink:
|
|
225
|
-
--ak-color-warning:
|
|
226
|
-
--ak-color-warning-soft:
|
|
227
|
-
--ak-color-warning-ink:
|
|
228
|
-
--ak-color-danger:
|
|
229
|
-
--ak-color-danger-soft:
|
|
230
|
-
--ak-color-danger-ink:
|
|
231
|
-
--ak-color-info:
|
|
232
|
-
--ak-color-info-soft:
|
|
233
|
-
--ak-color-info-ink:
|
|
234
|
-
|
|
235
|
-
--ak-color-link: var(--ak-color-
|
|
236
|
-
--ak-color-link-hover: var(--ak-color-
|
|
237
|
-
--ak-color-focus-ring:
|
|
238
|
-
--ak-color-disabled-bg:
|
|
239
|
-
--ak-color-disabled-surface:
|
|
240
|
-
--ak-color-disabled-border:
|
|
241
|
-
--ak-color-disabled-text:
|
|
242
|
-
--ak-color-selected:
|
|
243
|
-
--ak-color-selected-border:
|
|
244
|
-
--ak-color-hover:
|
|
245
|
-
--ak-color-active:
|
|
246
|
-
--ak-color-backdrop:
|
|
256
|
+
--ak-color-primary: var(--ak-dark-color-primary);
|
|
257
|
+
--ak-color-primary-hover: var(--ak-dark-color-primary-hover);
|
|
258
|
+
--ak-color-primary-active: var(--ak-dark-color-primary-active);
|
|
259
|
+
--ak-color-primary-soft: var(--ak-dark-color-primary-soft);
|
|
260
|
+
--ak-color-primary-ink: var(--ak-dark-color-primary-ink);
|
|
261
|
+
|
|
262
|
+
--ak-color-text: var(--ak-dark-color-text);
|
|
263
|
+
--ak-color-text-muted: var(--ak-dark-color-text-muted);
|
|
264
|
+
--ak-color-text-subtle: var(--ak-dark-color-text-subtle);
|
|
265
|
+
--ak-color-text-inverse: var(--ak-dark-color-text-inverse);
|
|
266
|
+
|
|
267
|
+
--ak-color-bg: var(--ak-dark-color-bg);
|
|
268
|
+
--ak-color-surface: var(--ak-dark-color-surface);
|
|
269
|
+
--ak-color-surface-muted: var(--ak-dark-color-surface-muted);
|
|
270
|
+
--ak-color-surface-raised: var(--ak-dark-color-surface-raised);
|
|
271
|
+
--ak-color-surface-overlay: var(--ak-dark-color-surface-overlay);
|
|
272
|
+
|
|
273
|
+
--ak-color-border-subtle: var(--ak-dark-color-border-subtle);
|
|
274
|
+
--ak-color-border: var(--ak-dark-color-border);
|
|
275
|
+
--ak-color-border-strong: var(--ak-dark-color-border-strong);
|
|
276
|
+
|
|
277
|
+
--ak-color-success: var(--ak-dark-color-success);
|
|
278
|
+
--ak-color-success-soft: var(--ak-dark-color-success-soft);
|
|
279
|
+
--ak-color-success-ink: var(--ak-dark-color-success-ink);
|
|
280
|
+
--ak-color-warning: var(--ak-dark-color-warning);
|
|
281
|
+
--ak-color-warning-soft: var(--ak-dark-color-warning-soft);
|
|
282
|
+
--ak-color-warning-ink: var(--ak-dark-color-warning-ink);
|
|
283
|
+
--ak-color-danger: var(--ak-dark-color-danger);
|
|
284
|
+
--ak-color-danger-soft: var(--ak-dark-color-danger-soft);
|
|
285
|
+
--ak-color-danger-ink: var(--ak-dark-color-danger-ink);
|
|
286
|
+
--ak-color-info: var(--ak-dark-color-info);
|
|
287
|
+
--ak-color-info-soft: var(--ak-dark-color-info-soft);
|
|
288
|
+
--ak-color-info-ink: var(--ak-dark-color-info-ink);
|
|
289
|
+
|
|
290
|
+
--ak-color-link: var(--ak-dark-color-link);
|
|
291
|
+
--ak-color-link-hover: var(--ak-dark-color-link-hover);
|
|
292
|
+
--ak-color-focus-ring: var(--ak-dark-color-focus-ring);
|
|
293
|
+
--ak-color-disabled-bg: var(--ak-dark-color-disabled-bg);
|
|
294
|
+
--ak-color-disabled-surface: var(--ak-dark-color-disabled-surface);
|
|
295
|
+
--ak-color-disabled-border: var(--ak-dark-color-disabled-border);
|
|
296
|
+
--ak-color-disabled-text: var(--ak-dark-color-disabled-text);
|
|
297
|
+
--ak-color-selected: var(--ak-dark-color-selected);
|
|
298
|
+
--ak-color-selected-border: var(--ak-dark-color-selected-border);
|
|
299
|
+
--ak-color-hover: var(--ak-dark-color-hover);
|
|
300
|
+
--ak-color-active: var(--ak-dark-color-active);
|
|
301
|
+
--ak-color-backdrop: var(--ak-dark-color-backdrop);
|
|
302
|
+
|
|
303
|
+
--ak-shadow-sm: var(--ak-dark-shadow-sm);
|
|
304
|
+
--ak-shadow-md: var(--ak-dark-shadow-md);
|
|
305
|
+
--ak-shadow-lg: var(--ak-dark-shadow-lg);
|
|
247
306
|
|
|
248
307
|
--ak-color-fg: var(--ak-color-text);
|
|
249
308
|
--ak-color-muted: var(--ak-color-text-muted);
|
|
@@ -261,52 +320,56 @@
|
|
|
261
320
|
|
|
262
321
|
@media (prefers-color-scheme: dark) {
|
|
263
322
|
:root:not([data-theme]) {
|
|
264
|
-
--ak-color-primary:
|
|
265
|
-
--ak-color-primary-hover:
|
|
266
|
-
--ak-color-primary-active:
|
|
267
|
-
--ak-color-primary-soft:
|
|
268
|
-
--ak-color-primary-ink:
|
|
269
|
-
|
|
270
|
-
--ak-color-text:
|
|
271
|
-
--ak-color-text-muted:
|
|
272
|
-
--ak-color-text-subtle:
|
|
273
|
-
--ak-color-text-inverse:
|
|
274
|
-
|
|
275
|
-
--ak-color-bg:
|
|
276
|
-
--ak-color-surface:
|
|
277
|
-
--ak-color-surface-muted:
|
|
278
|
-
--ak-color-surface-raised:
|
|
279
|
-
--ak-color-surface-overlay:
|
|
280
|
-
|
|
281
|
-
--ak-color-border-subtle:
|
|
282
|
-
--ak-color-border:
|
|
283
|
-
--ak-color-border-strong:
|
|
284
|
-
|
|
285
|
-
--ak-color-success:
|
|
286
|
-
--ak-color-success-soft:
|
|
287
|
-
--ak-color-success-ink:
|
|
288
|
-
--ak-color-warning:
|
|
289
|
-
--ak-color-warning-soft:
|
|
290
|
-
--ak-color-warning-ink:
|
|
291
|
-
--ak-color-danger:
|
|
292
|
-
--ak-color-danger-soft:
|
|
293
|
-
--ak-color-danger-ink:
|
|
294
|
-
--ak-color-info:
|
|
295
|
-
--ak-color-info-soft:
|
|
296
|
-
--ak-color-info-ink:
|
|
297
|
-
|
|
298
|
-
--ak-color-link: var(--ak-color-
|
|
299
|
-
--ak-color-link-hover: var(--ak-color-
|
|
300
|
-
--ak-color-focus-ring:
|
|
301
|
-
--ak-color-disabled-bg:
|
|
302
|
-
--ak-color-disabled-surface:
|
|
303
|
-
--ak-color-disabled-border:
|
|
304
|
-
--ak-color-disabled-text:
|
|
305
|
-
--ak-color-selected:
|
|
306
|
-
--ak-color-selected-border:
|
|
307
|
-
--ak-color-hover:
|
|
308
|
-
--ak-color-active:
|
|
309
|
-
--ak-color-backdrop:
|
|
323
|
+
--ak-color-primary: var(--ak-dark-color-primary);
|
|
324
|
+
--ak-color-primary-hover: var(--ak-dark-color-primary-hover);
|
|
325
|
+
--ak-color-primary-active: var(--ak-dark-color-primary-active);
|
|
326
|
+
--ak-color-primary-soft: var(--ak-dark-color-primary-soft);
|
|
327
|
+
--ak-color-primary-ink: var(--ak-dark-color-primary-ink);
|
|
328
|
+
|
|
329
|
+
--ak-color-text: var(--ak-dark-color-text);
|
|
330
|
+
--ak-color-text-muted: var(--ak-dark-color-text-muted);
|
|
331
|
+
--ak-color-text-subtle: var(--ak-dark-color-text-subtle);
|
|
332
|
+
--ak-color-text-inverse: var(--ak-dark-color-text-inverse);
|
|
333
|
+
|
|
334
|
+
--ak-color-bg: var(--ak-dark-color-bg);
|
|
335
|
+
--ak-color-surface: var(--ak-dark-color-surface);
|
|
336
|
+
--ak-color-surface-muted: var(--ak-dark-color-surface-muted);
|
|
337
|
+
--ak-color-surface-raised: var(--ak-dark-color-surface-raised);
|
|
338
|
+
--ak-color-surface-overlay: var(--ak-dark-color-surface-overlay);
|
|
339
|
+
|
|
340
|
+
--ak-color-border-subtle: var(--ak-dark-color-border-subtle);
|
|
341
|
+
--ak-color-border: var(--ak-dark-color-border);
|
|
342
|
+
--ak-color-border-strong: var(--ak-dark-color-border-strong);
|
|
343
|
+
|
|
344
|
+
--ak-color-success: var(--ak-dark-color-success);
|
|
345
|
+
--ak-color-success-soft: var(--ak-dark-color-success-soft);
|
|
346
|
+
--ak-color-success-ink: var(--ak-dark-color-success-ink);
|
|
347
|
+
--ak-color-warning: var(--ak-dark-color-warning);
|
|
348
|
+
--ak-color-warning-soft: var(--ak-dark-color-warning-soft);
|
|
349
|
+
--ak-color-warning-ink: var(--ak-dark-color-warning-ink);
|
|
350
|
+
--ak-color-danger: var(--ak-dark-color-danger);
|
|
351
|
+
--ak-color-danger-soft: var(--ak-dark-color-danger-soft);
|
|
352
|
+
--ak-color-danger-ink: var(--ak-dark-color-danger-ink);
|
|
353
|
+
--ak-color-info: var(--ak-dark-color-info);
|
|
354
|
+
--ak-color-info-soft: var(--ak-dark-color-info-soft);
|
|
355
|
+
--ak-color-info-ink: var(--ak-dark-color-info-ink);
|
|
356
|
+
|
|
357
|
+
--ak-color-link: var(--ak-dark-color-link);
|
|
358
|
+
--ak-color-link-hover: var(--ak-dark-color-link-hover);
|
|
359
|
+
--ak-color-focus-ring: var(--ak-dark-color-focus-ring);
|
|
360
|
+
--ak-color-disabled-bg: var(--ak-dark-color-disabled-bg);
|
|
361
|
+
--ak-color-disabled-surface: var(--ak-dark-color-disabled-surface);
|
|
362
|
+
--ak-color-disabled-border: var(--ak-dark-color-disabled-border);
|
|
363
|
+
--ak-color-disabled-text: var(--ak-dark-color-disabled-text);
|
|
364
|
+
--ak-color-selected: var(--ak-dark-color-selected);
|
|
365
|
+
--ak-color-selected-border: var(--ak-dark-color-selected-border);
|
|
366
|
+
--ak-color-hover: var(--ak-dark-color-hover);
|
|
367
|
+
--ak-color-active: var(--ak-dark-color-active);
|
|
368
|
+
--ak-color-backdrop: var(--ak-dark-color-backdrop);
|
|
369
|
+
|
|
370
|
+
--ak-shadow-sm: var(--ak-dark-shadow-sm);
|
|
371
|
+
--ak-shadow-md: var(--ak-dark-shadow-md);
|
|
372
|
+
--ak-shadow-lg: var(--ak-dark-shadow-lg);
|
|
310
373
|
|
|
311
374
|
--ak-color-fg: var(--ak-color-text);
|
|
312
375
|
--ak-color-muted: var(--ak-color-text-muted);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box-layout.js","names":[],"sources":["../../src/components/_internal/box-layout.ts"],"sourcesContent":["import { mergeLayoutStyles, resolveSpaceValue, setResponsiveStyleVar } from \"./layout\";\nimport type { BoxLayoutOwnProps } from \"../box/box.types\";\n\nconst SPACE_PROP_KEYS = new Set([\n \"m\",\n \"mx\",\n \"my\",\n \"mt\",\n \"mr\",\n \"mb\",\n \"ml\",\n \"p\",\n \"px\",\n \"py\",\n \"pt\",\n \"pr\",\n \"pb\",\n \"pl\",\n \"inset\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n]);\n\nconst BOX_PROP_KEYS = new Set<keyof BoxLayoutOwnProps>([\n \"display\",\n \"m\",\n \"mx\",\n \"my\",\n \"mt\",\n \"mr\",\n \"mb\",\n \"ml\",\n \"p\",\n \"px\",\n \"py\",\n \"pt\",\n \"pr\",\n \"pb\",\n \"pl\",\n \"width\",\n \"minWidth\",\n \"maxWidth\",\n \"height\",\n \"minHeight\",\n \"maxHeight\",\n \"position\",\n \"inset\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"overflow\",\n \"overflowX\",\n \"overflowY\",\n \"flexBasis\",\n \"flexGrow\",\n \"flexShrink\",\n \"gridArea\",\n \"gridColumn\",\n \"gridColumnStart\",\n \"gridColumnEnd\",\n \"gridRow\",\n \"gridRowStart\",\n \"gridRowEnd\",\n]);\n\nfunction variableNameForProp(prop: keyof BoxLayoutOwnProps): string {\n switch (prop) {\n case \"overflowX\":\n return \"overflow-x\";\n case \"overflowY\":\n return \"overflow-y\";\n case \"minWidth\":\n return \"min-width\";\n case \"maxWidth\":\n return \"max-width\";\n case \"minHeight\":\n return \"min-height\";\n case \"maxHeight\":\n return \"max-height\";\n case \"flexBasis\":\n return \"flex-basis\";\n case \"flexGrow\":\n return \"flex-grow\";\n case \"flexShrink\":\n return \"flex-shrink\";\n case \"gridArea\":\n return \"grid-area\";\n case \"gridColumn\":\n return \"grid-column\";\n case \"gridColumnStart\":\n return \"grid-column-start\";\n case \"gridColumnEnd\":\n return \"grid-column-end\";\n case \"gridRow\":\n return \"grid-row\";\n case \"gridRowStart\":\n return \"grid-row-start\";\n case \"gridRowEnd\":\n return \"grid-row-end\";\n default:\n return prop;\n }\n}\n\nexport function splitBoxLayoutProps<T extends Record<string, unknown>>(\n props: T,\n): {\n boxProps: Partial<BoxLayoutOwnProps>;\n rest: Omit<T, keyof BoxLayoutOwnProps>;\n} {\n const boxProps: Partial<BoxLayoutOwnProps> = {};\n const rest: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (BOX_PROP_KEYS.has(key as keyof BoxLayoutOwnProps)) {\n (boxProps as Record<string, unknown>)[key] = value;\n } else {\n rest[key] = value;\n }\n }\n\n return { boxProps, rest: rest as Omit<T, keyof BoxLayoutOwnProps> };\n}\n\nexport function applyBoxLayoutStyles(\n styles: Record<string, string | number>,\n boxProps: Partial<BoxLayoutOwnProps>,\n) {\n for (const key of BOX_PROP_KEYS) {\n const value = boxProps[key];\n if (value === undefined) continue;\n\n const variable = variableNameForProp(key);\n if (SPACE_PROP_KEYS.has(key)) {\n setResponsiveStyleVar(styles, variable, value as string | number, resolveSpaceValue);\n continue;\n }\n\n setResponsiveStyleVar(\n styles,\n variable,\n value as string | number,\n (input) => input as string | number,\n );\n }\n}\n\nexport function withBoxLayoutStyle(\n styles: Record<string, string | number>,\n userStyle: unknown,\n): string | undefined {\n return mergeLayoutStyles(styles, userStyle);\n}\n"],"mappings":";;AAGA,MAAM,kBAAkB,IAAI,IAAI;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAM,gBAAgB,IAAI,IAA6B;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,SAAS,oBAAoB,MAAuC;AAClE,SAAQ,MAAR;EACE,KAAK,YACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,YACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,aACH,QAAO;EACT,KAAK,WACH,QAAO;EACT,KAAK,aACH,QAAO;EACT,KAAK,kBACH,QAAO;EACT,KAAK,gBACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,KAAK,eACH,QAAO;EACT,KAAK,aACH,QAAO;EACT,QACE,QAAO;;;AAIb,SAAgB,oBACd,OAIA;CACA,MAAM,WAAuC,EAAE;CAC/C,MAAM,OAAgC,EAAE;AAExC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,CAC9C,KAAI,cAAc,IAAI,IAA+B,CAClD,UAAqC,OAAO;KAE7C,MAAK,OAAO;AAIhB,QAAO;EAAE;EAAgB;EAA0C;;AAGrE,SAAgB,qBACd,QACA,UACA;AACA,MAAK,MAAM,OAAO,eAAe;EAC/B,MAAM,QAAQ,SAAS;AACvB,MAAI,UAAU,KAAA,EAAW;EAEzB,MAAM,WAAW,oBAAoB,IAAI;AACzC,MAAI,gBAAgB,IAAI,IAAI,EAAE;AAC5B,yBAAsB,QAAQ,UAAU,OAA0B,kBAAkB;AACpF;;AAGF,wBACE,QACA,UACA,QACC,UAAU,MACZ;;;AAIL,SAAgB,mBACd,QACA,WACoB;AACpB,QAAO,kBAAkB,QAAQ,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classes.js","names":[],"sources":["../../src/components/_internal/classes.ts"],"sourcesContent":["export function classes(...values: Array<unknown>): string | undefined {\n const value = values.filter((item) => typeof item === \"string\" && item.trim()).join(\" \");\n\n return value || undefined;\n}\n"],"mappings":";AAAA,SAAgB,QAAQ,GAAG,QAA4C;AAGrE,QAFc,OAAO,QAAQ,SAAS,OAAO,SAAS,YAAY,KAAK,MAAM,CAAC,CAAC,KAAK,IAExE,IAAI,KAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jsx.js","names":[],"sources":["../../src/components/_internal/jsx.ts"],"sourcesContent":["import type { JSXElement } from \"@askrjs/askr/foundations\";\n\nexport function isJsxElement(value: unknown): value is JSXElement {\n return typeof value === \"object\" && value !== null && \"$$typeof\" in value && \"props\" in value;\n}\n\nexport function hasJsxIntrinsicType(value: unknown, expectedType: string): value is JSXElement {\n return isJsxElement(value) && value.type === expectedType;\n}\n\nexport function toChildArray(children: unknown): unknown[] {\n if (Array.isArray(children)) {\n return children;\n }\n\n return children === undefined || children === null ? [] : [children];\n}\n\nexport function mapJsxTree(children: unknown, mapper: (element: JSXElement) => unknown): unknown {\n if (Array.isArray(children)) {\n return children.map((child) => mapJsxTree(child, mapper));\n }\n\n if (!isJsxElement(children)) {\n return children;\n }\n\n const mapped = mapper(children);\n\n if (!isJsxElement(mapped)) {\n return mapped;\n }\n\n const currentChildren = mapped.props?.children;\n const nextChildren = mapJsxTree(currentChildren, mapper);\n\n if (nextChildren === currentChildren) {\n return mapped;\n }\n\n return {\n ...mapped,\n props: {\n ...mapped.props,\n children: nextChildren,\n },\n };\n}\n\nexport function collectJsxElements(\n children: unknown,\n predicate?: (element: JSXElement) => boolean,\n): JSXElement[] {\n const result: JSXElement[] = [];\n\n const visit = (value: unknown) => {\n if (Array.isArray(value)) {\n value.forEach(visit);\n return;\n }\n\n if (!isJsxElement(value)) {\n return;\n }\n\n if (!predicate || predicate(value)) {\n result.push(value);\n }\n\n visit(value.props?.children);\n };\n\n visit(children);\n\n return result;\n}\n\nexport function extractTextContent(value: unknown): string {\n if (Array.isArray(value)) {\n return value.map((entry) => extractTextContent(entry)).join(\"\");\n }\n\n if (\n value === undefined ||\n value === null ||\n typeof value === \"boolean\" ||\n typeof value === \"function\"\n ) {\n return \"\";\n }\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n return String(value);\n }\n\n if (isJsxElement(value)) {\n return extractTextContent(value.props?.children);\n }\n\n return \"\";\n}\n\nexport function serializeForId(value: unknown): string {\n if (Array.isArray(value)) {\n return value.map((item) => serializeForId(item)).join(\"|\");\n }\n\n if (value === undefined || value === null || typeof value === \"boolean\") {\n return \"\";\n }\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n return String(value);\n }\n\n if (isJsxElement(value)) {\n const typeName =\n typeof value.type === \"string\"\n ? value.type\n : typeof value.type === \"function\"\n ? value.type.name || \"component\"\n : \"component\";\n const propEntries = Object.entries(value.props ?? {})\n .filter(\n ([key, entryValue]) =>\n key !== \"children\" &&\n key !== \"ref\" &&\n !key.startsWith(\"on\") &&\n (typeof entryValue === \"string\" ||\n typeof entryValue === \"number\" ||\n typeof entryValue === \"boolean\"),\n )\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([key, entryValue]) => `${key}:${String(entryValue)}`)\n .join(\",\");\n\n return `${typeName}[${propEntries}](${serializeForId(value.props?.children)})`;\n }\n\n return typeof value;\n}\n"],"mappings":";AAEA,SAAgB,aAAa,OAAqC;AAChE,QAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,cAAc,SAAS,WAAW;;AAO1F,SAAgB,aAAa,UAA8B;AACzD,KAAI,MAAM,QAAQ,SAAS,CACzB,QAAO;AAGT,QAAO,aAAa,KAAA,KAAa,aAAa,OAAO,EAAE,GAAG,CAAC,SAAS"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/components/_internal/layout.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Layout helpers shared by headless layout primitives.
|
|
4
|
-
*/
|
|
5
|
-
type LayoutBreakpoint = "initial" | "sm" | "md" | "lg" | "xl";
|
|
6
|
-
type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { ResponsiveValue };
|
|
9
|
-
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","names":[],"sources":["../../src/components/_internal/layout.ts"],"sourcesContent":["/**\n * Layout helpers shared by headless layout primitives.\n */\n\nexport type LayoutBreakpoint = \"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;\n\nconst BREAKPOINTS: readonly LayoutBreakpoint[] = [\"initial\", \"sm\", \"md\", \"lg\", \"xl\"];\n\n/** Units and patterns that identify a concrete CSS length value. */\nconst CSS_UNIT_RE =\n /^-?[\\d.]+(%|px|em|rem|ex|ch|ic|lh|rlh|vw|vh|vmin|vmax|svw|svh|dvw|dvh|cqw|cqh|cqi|cqb|fr|cm|mm|in|pt|pc|Q)$/;\n\nconst SPACE_TOKEN_MAP: Record<string, string> = {\n \"1\": \"var(--ak-space-1)\",\n \"2\": \"var(--ak-space-2)\",\n \"3\": \"var(--ak-space-3)\",\n \"4\": \"var(--ak-space-4)\",\n \"5\": \"var(--ak-space-5)\",\n \"6\": \"var(--ak-space-6)\",\n \"7\": \"var(--ak-space-7)\",\n \"8\": \"var(--ak-space-8)\",\n \"9\": \"var(--ak-space-9)\",\n xs: \"var(--ak-space-xs)\",\n sm: \"var(--ak-space-sm)\",\n md: \"var(--ak-space-md)\",\n lg: \"var(--ak-space-lg)\",\n xl: \"var(--ak-space-xl)\",\n \"2xl\": \"var(--ak-space-2xl)\",\n \"3xl\": \"var(--ak-space-3xl)\",\n};\n\nconst CONTAINER_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-container-1)\",\n \"2\": \"var(--ak-container-2)\",\n \"3\": \"var(--ak-container-3)\",\n \"4\": \"var(--ak-container-4)\",\n sm: \"var(--ak-container-1)\",\n md: \"var(--ak-container-2)\",\n lg: \"var(--ak-container-3)\",\n xl: \"var(--ak-container-4)\",\n};\n\nconst SECTION_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-section-1)\",\n \"2\": \"var(--ak-section-2)\",\n \"3\": \"var(--ak-section-3)\",\n \"4\": \"var(--ak-section-4)\",\n};\n\n/**\n * Returns true when `value` is a concrete CSS length/size that can be applied\n * directly as an inline style.\n */\nexport function isCssLength(value: unknown): value is string {\n if (typeof value !== \"string\") return false;\n const v = value.trim();\n if (v === \"0\") return true;\n if (CSS_UNIT_RE.test(v)) return true;\n // CSS functions: calc(), min(), max(), clamp(), fit-content(), env(), var()\n if (/^[a-z][a-z-]*\\(/.test(v)) return true;\n return false;\n}\n\nexport function isResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): value is Partial<Record<LayoutBreakpoint, T>> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n return BREAKPOINTS.some((breakpoint) => breakpoint in value);\n}\n\nexport function normalizeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): Partial<Record<LayoutBreakpoint, T>> | undefined {\n if (value === undefined) return undefined;\n if (isResponsiveValue(value)) return value;\n return { initial: value };\n}\n\nexport function serializeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n return BREAKPOINTS.map((breakpoint) => {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) return \"\";\n return `${breakpoint}:${String(breakpointValue)}`;\n })\n .filter(Boolean)\n .join(\"|\");\n}\n\nexport function serializeResponsiveValueIf<T>(\n value: ResponsiveValue<T> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n if (!predicate(breakpointValue)) return undefined;\n }\n\n return serializeResponsiveValue(value);\n}\n\nexport function serializeValueIf<T>(\n value: T | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (value === undefined || !predicate(value)) return undefined;\n return String(value);\n}\n\nexport function setResponsiveStyleVar<T>(\n styles: Record<string, string | number>,\n variable: string,\n value: ResponsiveValue<T> | undefined,\n resolve: (value: T) => string | number | undefined = (input) =>\n input as string | number | undefined,\n) {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n const resolved = resolve(breakpointValue);\n if (resolved === undefined || resolved === null || resolved === \"\") continue;\n styles[`--ak-${variable}-${breakpoint}`] = resolved;\n }\n}\n\nexport function resolveSpaceValue(value: string | number): string | number {\n if (typeof value === \"number\") return String(value);\n const trimmed = value.trim();\n return SPACE_TOKEN_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveContainerSizeValue(value: string): string {\n const trimmed = value.trim();\n return CONTAINER_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveSectionSizeValue(value: string): string {\n const trimmed = value.trim();\n return SECTION_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveGridTrackValue(value: string | number): string {\n if (typeof value === \"number\") {\n return `repeat(${value}, minmax(0, 1fr))`;\n }\n\n const trimmed = value.trim();\n if (/^\\d+$/.test(trimmed)) {\n return `repeat(${trimmed}, minmax(0, 1fr))`;\n }\n\n return trimmed;\n}\n\nexport function resolveJustifyValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"between\") return \"space-between\";\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveAlignValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveInlineAlignValue(value: \"left\" | \"center\" | \"right\"): {\n marginLeft?: string;\n marginRight?: string;\n} {\n if (value === \"left\") return { marginLeft: \"0\", marginRight: \"auto\" };\n if (value === \"right\") return { marginLeft: \"auto\", marginRight: \"0\" };\n return { marginLeft: \"auto\", marginRight: \"auto\" };\n}\n\n/**\n * Merges a record of computed layout styles with a user-supplied `style` prop.\n * The user's styles take precedence for conflicting keys.\n */\nexport function mergeLayoutStyles(\n layout: Record<string, string | number>,\n user: unknown,\n): string | undefined {\n const merged: Record<string, unknown> = { ...layout };\n\n if (user !== null && user !== undefined && typeof user === \"object\") {\n Object.assign(merged, user as Record<string, unknown>);\n }\n\n const mergedString = objectToCssString(merged);\n\n if (typeof user === \"string\" && user.trim()) {\n return mergedString ? `${mergedString};${user.trim()}` : user.trim();\n }\n\n return mergedString || undefined;\n}\n\nfunction camelToKebab(s: string): string {\n return s.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);\n}\n\nfunction objectToCssString(styles: Record<string, unknown>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(\";\");\n}\n"],"mappings":";AAOA,MAAM,cAA2C;CAAC;CAAW;CAAM;CAAM;CAAM;CAAK;;AAGpF,MAAM,cACJ;AAEF,MAAM,kBAA0C;CAC9C,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACR;AAED,MAAM,qBAA6C;CACjD,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;;;;;AAaD,SAAgB,YAAY,OAAiC;AAC3D,KAAI,OAAO,UAAU,SAAU,QAAO;CACtC,MAAM,IAAI,MAAM,MAAM;AACtB,KAAI,MAAM,IAAK,QAAO;AACtB,KAAI,YAAY,KAAK,EAAE,CAAE,QAAO;AAEhC,KAAI,kBAAkB,KAAK,EAAE,CAAE,QAAO;AACtC,QAAO;;AAGT,SAAgB,kBACd,OAC+C;AAC/C,KAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,MAAM,CAAE,QAAO;AACxE,QAAO,YAAY,MAAM,eAAe,cAAc,MAAM;;AAG9D,SAAgB,yBACd,OACkD;AAClD,KAAI,UAAU,KAAA,EAAW,QAAO,KAAA;AAChC,KAAI,kBAAkB,MAAM,CAAE,QAAO;AACrC,QAAO,EAAE,SAAS,OAAO;;AAG3B,SAAgB,yBACd,OACoB;CACpB,MAAM,aAAa,yBAAyB,MAAM;AAClD,KAAI,CAAC,WAAY,QAAO,KAAA;AAExB,QAAO,YAAY,KAAK,eAAe;EACrC,MAAM,kBAAkB,WAAW;AACnC,MAAI,oBAAoB,KAAA,EAAW,QAAO;AAC1C,SAAO,GAAG,WAAW,GAAG,OAAO,gBAAgB;GAC/C,CACC,OAAO,QAAQ,CACf,KAAK,IAAI;;AAGd,SAAgB,2BACd,OACA,WACoB;CACpB,MAAM,aAAa,yBAAyB,MAAM;AAClD,KAAI,CAAC,WAAY,QAAO,KAAA;AAExB,MAAK,MAAM,cAAc,aAAa;EACpC,MAAM,kBAAkB,WAAW;AACnC,MAAI,oBAAoB,KAAA,EAAW;AACnC,MAAI,CAAC,UAAU,gBAAgB,CAAE,QAAO,KAAA;;AAG1C,QAAO,yBAAyB,MAAM;;AAGxC,SAAgB,iBACd,OACA,WACoB;AACpB,KAAI,UAAU,KAAA,KAAa,CAAC,UAAU,MAAM,CAAE,QAAO,KAAA;AACrD,QAAO,OAAO,MAAM;;AAGtB,SAAgB,sBACd,QACA,UACA,OACA,WAAsD,UACpD,OACF;CACA,MAAM,aAAa,yBAAyB,MAAM;AAClD,KAAI,CAAC,WAAY;AAEjB,MAAK,MAAM,cAAc,aAAa;EACpC,MAAM,kBAAkB,WAAW;AACnC,MAAI,oBAAoB,KAAA,EAAW;EACnC,MAAM,WAAW,QAAQ,gBAAgB;AACzC,MAAI,aAAa,KAAA,KAAa,aAAa,QAAQ,aAAa,GAAI;AACpE,SAAO,QAAQ,SAAS,GAAG,gBAAgB;;;AAI/C,SAAgB,kBAAkB,OAAyC;AACzE,KAAI,OAAO,UAAU,SAAU,QAAO,OAAO,MAAM;CACnD,MAAM,UAAU,MAAM,MAAM;AAC5B,QAAO,gBAAgB,YAAY;;AAGrC,SAAgB,0BAA0B,OAAuB;CAC/D,MAAM,UAAU,MAAM,MAAM;AAC5B,QAAO,mBAAmB,YAAY;;AAQxC,SAAgB,sBAAsB,OAAgC;AACpE,KAAI,OAAO,UAAU,SACnB,QAAO,UAAU,MAAM;CAGzB,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,QAAQ,KAAK,QAAQ,CACvB,QAAO,UAAU,QAAQ;AAG3B,QAAO;;AAGT,SAAgB,oBAAoB,OAAuB;CACzD,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,YAAY,UAAW,QAAO;AAClC,KAAI,YAAY,QAAS,QAAO;AAChC,KAAI,YAAY,MAAO,QAAO;AAC9B,QAAO;;AAGT,SAAgB,kBAAkB,OAAuB;CACvD,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,YAAY,QAAS,QAAO;AAChC,KAAI,YAAY,MAAO,QAAO;AAC9B,QAAO;;AAGT,SAAgB,wBAAwB,OAGtC;AACA,KAAI,UAAU,OAAQ,QAAO;EAAE,YAAY;EAAK,aAAa;EAAQ;AACrE,KAAI,UAAU,QAAS,QAAO;EAAE,YAAY;EAAQ,aAAa;EAAK;AACtE,QAAO;EAAE,YAAY;EAAQ,aAAa;EAAQ;;;;;;AAOpD,SAAgB,kBACd,QACA,MACoB;CACpB,MAAM,SAAkC,EAAE,GAAG,QAAQ;AAErD,KAAI,SAAS,QAAQ,SAAS,KAAA,KAAa,OAAO,SAAS,SACzD,QAAO,OAAO,QAAQ,KAAgC;CAGxD,MAAM,eAAe,kBAAkB,OAAO;AAE9C,KAAI,OAAO,SAAS,YAAY,KAAK,MAAM,CACzC,QAAO,eAAe,GAAG,aAAa,GAAG,KAAK,MAAM,KAAK,KAAK,MAAM;AAGtE,QAAO,gBAAgB,KAAA;;AAGzB,SAAS,aAAa,GAAmB;AACvC,QAAO,EAAE,QAAQ,aAAa,MAAM,IAAI,EAAE,aAAa,GAAG;;AAG5D,SAAS,kBAAkB,QAAyC;AAClE,QAAO,OAAO,QAAQ,OAAO,CAC1B,QAAQ,GAAG,WAAW,UAAU,KAAA,KAAa,UAAU,KAAK,CAC5D,KAAK,CAAC,KAAK,WAAW,GAAG,aAAa,IAAI,CAAC,GAAG,OAAO,MAAM,GAAG,CAC9D,KAAK,IAAI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-props.js","names":[],"sources":["../../src/components/_internal/merge-props.ts"],"sourcesContent":["type Handler = (...args: readonly unknown[]) => void;\ntype Ref<T> = { current: T | null } | ((value: T | null) => void) | null | undefined;\n\nfunction isEventHandlerKey(key: string): boolean {\n return key.startsWith(\"on\");\n}\n\nfunction isDefaultPrevented(value: unknown): value is { defaultPrevented: true } {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"defaultPrevented\" in value &&\n (value as { defaultPrevented?: boolean }).defaultPrevented === true\n );\n}\n\nfunction composeHandlers(first: Handler, second: Handler): Handler {\n return (...args) => {\n first(...args);\n\n if (isDefaultPrevented(args[0])) {\n return;\n }\n\n second(...args);\n };\n}\n\nfunction setRef<T>(ref: Ref<T>, value: T | null): void {\n if (!ref) return;\n\n if (typeof ref === \"function\") {\n ref(value);\n return;\n }\n\n if (Object.isExtensible(ref)) {\n (ref as { current: T | null }).current = value;\n }\n}\n\nfunction composeRefs<T>(...refs: Array<Ref<T>>): (value: T | null) => void {\n return (value: T | null) => {\n for (const ref of refs) {\n setRef(ref, value);\n }\n };\n}\n\nexport function mergeProps<TBase extends object, TInjected extends object>(\n base: TBase,\n injected: TInjected,\n): TInjected & TBase {\n const baseKeys = Object.keys(base);\n if (baseKeys.length === 0) {\n return injected as TInjected & TBase;\n }\n\n const out = { ...(injected as object) } as TInjected & TBase;\n\n for (const key of baseKeys as Array<Extract<keyof TBase, string>>) {\n const baseValue = (base as Record<string, unknown>)[key];\n const injectedValue = (injected as Record<string, unknown>)[key];\n\n if (key === \"ref\") {\n (out as Record<string, unknown>)[key] = composeRefs(\n injectedValue as Ref<unknown>,\n baseValue as Ref<unknown>,\n );\n continue;\n }\n\n if (\n isEventHandlerKey(key) &&\n typeof baseValue === \"function\" &&\n typeof injectedValue === \"function\"\n ) {\n (out as Record<string, unknown>)[key] = composeHandlers(\n injectedValue as Handler,\n baseValue as Handler,\n );\n continue;\n }\n\n (out as Record<string, unknown>)[key] = baseValue;\n }\n\n return out;\n}\n"],"mappings":";AAGA,SAAS,kBAAkB,KAAsB;AAC/C,QAAO,IAAI,WAAW,KAAK;;AAG7B,SAAS,mBAAmB,OAAqD;AAC/E,QACE,OAAO,UAAU,YACjB,UAAU,QACV,sBAAsB,SACrB,MAAyC,qBAAqB;;AAInE,SAAS,gBAAgB,OAAgB,QAA0B;AACjE,SAAQ,GAAG,SAAS;AAClB,QAAM,GAAG,KAAK;AAEd,MAAI,mBAAmB,KAAK,GAAG,CAC7B;AAGF,SAAO,GAAG,KAAK;;;AAInB,SAAS,OAAU,KAAa,OAAuB;AACrD,KAAI,CAAC,IAAK;AAEV,KAAI,OAAO,QAAQ,YAAY;AAC7B,MAAI,MAAM;AACV;;AAGF,KAAI,OAAO,aAAa,IAAI,CACzB,KAA8B,UAAU;;AAI7C,SAAS,YAAe,GAAG,MAAgD;AACzE,SAAQ,UAAoB;AAC1B,OAAK,MAAM,OAAO,KAChB,QAAO,KAAK,MAAM;;;AAKxB,SAAgB,WACd,MACA,UACmB;CACnB,MAAM,WAAW,OAAO,KAAK,KAAK;AAClC,KAAI,SAAS,WAAW,EACtB,QAAO;CAGT,MAAM,MAAM,EAAE,GAAI,UAAqB;AAEvC,MAAK,MAAM,OAAO,UAAiD;EACjE,MAAM,YAAa,KAAiC;EACpD,MAAM,gBAAiB,SAAqC;AAE5D,MAAI,QAAQ,OAAO;AAChB,OAAgC,OAAO,YACtC,eACA,UACD;AACD;;AAGF,MACE,kBAAkB,IAAI,IACtB,OAAO,cAAc,cACrB,OAAO,kBAAkB,YACzB;AACC,OAAgC,OAAO,gBACtC,eACA,UACD;AACD;;AAGD,MAAgC,OAAO;;AAG1C,QAAO"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AccessibleIconProps } from "./accessible-icon.types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/components/accessible-icon/accessible-icon.d.ts
|
|
4
|
-
declare function AccessibleIcon(props: AccessibleIconProps): JSX.Element;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { AccessibleIcon };
|
|
7
|
-
//# sourceMappingURL=accessible-icon.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "@askrjs/askr/jsx-runtime";
|
|
2
|
-
//#region src/components/accessible-icon/accessible-icon.tsx
|
|
3
|
-
function AccessibleIcon(props) {
|
|
4
|
-
const { children, label, decorative = label ? false : true } = props;
|
|
5
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
6
|
-
"data-slot": "accessible-icon",
|
|
7
|
-
"data-decorative": decorative ? "true" : void 0,
|
|
8
|
-
role: decorative ? void 0 : "img",
|
|
9
|
-
"aria-hidden": decorative ? "true" : void 0,
|
|
10
|
-
"aria-label": decorative ? void 0 : label,
|
|
11
|
-
children: [children, !decorative && label ? /* @__PURE__ */ jsx("span", {
|
|
12
|
-
class: "sr-only",
|
|
13
|
-
children: label
|
|
14
|
-
}) : null]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { AccessibleIcon };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=accessible-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessible-icon.js","names":[],"sources":["../../src/components/accessible-icon/accessible-icon.tsx"],"sourcesContent":["import type { AccessibleIconProps } from \"./accessible-icon.types\";\n\nexport function AccessibleIcon(props: AccessibleIconProps): JSX.Element {\n const { children, label, decorative = label ? false : true } = props;\n\n return (\n <span\n data-slot=\"accessible-icon\"\n data-decorative={decorative ? \"true\" : undefined}\n role={decorative ? undefined : \"img\"}\n aria-hidden={decorative ? \"true\" : undefined}\n aria-label={decorative ? undefined : label}\n >\n {children}\n {!decorative && label ? <span class=\"sr-only\">{label}</span> : null}\n </span>\n );\n}\n"],"mappings":";;AAEA,SAAgB,eAAe,OAAyC;CACtE,MAAM,EAAE,UAAU,OAAO,aAAa,QAAQ,QAAQ,SAAS;AAE/D,QACE,qBAAC,QAAD;EACE,aAAU;EACV,mBAAiB,aAAa,SAAS,KAAA;EACvC,MAAM,aAAa,KAAA,IAAY;EAC/B,eAAa,aAAa,SAAS,KAAA;EACnC,cAAY,aAAa,KAAA,IAAY;YALvC,CAOG,UACA,CAAC,cAAc,QAAQ,oBAAC,QAAD;GAAM,OAAM;aAAW;GAAa,CAAA,GAAG,KAC1D"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/components/accessible-icon/accessible-icon.types.d.ts
|
|
2
|
-
type AccessibleIconProps = {
|
|
3
|
-
children?: unknown;
|
|
4
|
-
label?: string;
|
|
5
|
-
decorative?: boolean;
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { AccessibleIconProps };
|
|
9
|
-
//# sourceMappingURL=accessible-icon.types.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AspectRatioAsChildProps, AspectRatioProps } from "./aspect-ratio.types.js";
|
|
2
|
-
|
|
3
|
-
//#region src/components/aspect-ratio/aspect-ratio.d.ts
|
|
4
|
-
declare function AspectRatio(props: AspectRatioProps): JSX.Element;
|
|
5
|
-
declare function AspectRatio(props: AspectRatioAsChildProps): JSX.Element;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { AspectRatio };
|
|
8
|
-
//# sourceMappingURL=aspect-ratio.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from "../_internal/merge-props.js";
|
|
2
|
-
import { jsx } from "@askrjs/askr/jsx-runtime";
|
|
3
|
-
import { Slot } from "@askrjs/askr/foundations";
|
|
4
|
-
//#region src/components/aspect-ratio/aspect-ratio.tsx
|
|
5
|
-
function serializeStyle(base, user) {
|
|
6
|
-
const merged = { ...base };
|
|
7
|
-
if (user && typeof user === "object") Object.assign(merged, user);
|
|
8
|
-
if (typeof user === "string" && user.trim()) return `${Object.entries(merged).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => key.replace(/([A-Z])/g, "-$1").toLowerCase() + ":" + String(value)).join(";")};${user.trim()}`;
|
|
9
|
-
return Object.entries(merged).filter(([, value]) => value !== void 0 && value !== null).map(([key, value]) => key.replace(/([A-Z])/g, "-$1").toLowerCase() + ":" + String(value)).join(";");
|
|
10
|
-
}
|
|
11
|
-
function AspectRatio(props) {
|
|
12
|
-
const { asChild, children, ratio = 1, ref, style, ...rest } = props;
|
|
13
|
-
const finalProps = mergeProps(rest, {
|
|
14
|
-
ref,
|
|
15
|
-
"data-slot": "aspect-ratio",
|
|
16
|
-
style: serializeStyle({
|
|
17
|
-
display: "block",
|
|
18
|
-
width: "100%",
|
|
19
|
-
aspectRatio: String(ratio),
|
|
20
|
-
overflow: "hidden"
|
|
21
|
-
}, style)
|
|
22
|
-
});
|
|
23
|
-
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
24
|
-
asChild: true,
|
|
25
|
-
...finalProps,
|
|
26
|
-
children
|
|
27
|
-
});
|
|
28
|
-
return /* @__PURE__ */ jsx("div", {
|
|
29
|
-
...finalProps,
|
|
30
|
-
children
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
export { AspectRatio };
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 type { AspectRatioAsChildProps, AspectRatioProps } from \"./aspect-ratio.types\";\n\nfunction serializeStyle(base: Record<string, string | number>, user: unknown): string {\n const merged: Record<string, unknown> = { ...base };\n\n if (user && typeof user === \"object\") {\n Object.assign(merged, user as Record<string, unknown>);\n }\n\n if (typeof user === \"string\" && user.trim()) {\n return `${Object.entries(merged)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => key.replace(/([A-Z])/g, \"-$1\").toLowerCase() + \":\" + String(value))\n .join(\";\")};${user.trim()}`;\n }\n\n return Object.entries(merged)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => key.replace(/([A-Z])/g, \"-$1\").toLowerCase() + \":\" + String(value))\n .join(\";\");\n}\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 finalProps = mergeProps(rest, {\n ref,\n \"data-slot\": \"aspect-ratio\",\n style: serializeStyle(\n {\n display: \"block\",\n width: \"100%\",\n aspectRatio: String(ratio),\n overflow: \"hidden\",\n },\n style,\n ),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;AAIA,SAAS,eAAe,MAAuC,MAAuB;CACpF,MAAM,SAAkC,EAAE,GAAG,MAAM;AAEnD,KAAI,QAAQ,OAAO,SAAS,SAC1B,QAAO,OAAO,QAAQ,KAAgC;AAGxD,KAAI,OAAO,SAAS,YAAY,KAAK,MAAM,CACzC,QAAO,GAAG,OAAO,QAAQ,OAAO,CAC7B,QAAQ,GAAG,WAAW,UAAU,KAAA,KAAa,UAAU,KAAK,CAC5D,KAAK,CAAC,KAAK,WAAW,IAAI,QAAQ,YAAY,MAAM,CAAC,aAAa,GAAG,MAAM,OAAO,MAAM,CAAC,CACzF,KAAK,IAAI,CAAC,GAAG,KAAK,MAAM;AAG7B,QAAO,OAAO,QAAQ,OAAO,CAC1B,QAAQ,GAAG,WAAW,UAAU,KAAA,KAAa,UAAU,KAAK,CAC5D,KAAK,CAAC,KAAK,WAAW,IAAI,QAAQ,YAAY,MAAM,CAAC,aAAa,GAAG,MAAM,OAAO,MAAM,CAAC,CACzF,KAAK,IAAI;;AAKd,SAAgB,YAAY,OAAmD;CAC7E,MAAM,EAAE,SAAS,UAAU,QAAQ,GAAG,KAAK,OAAO,GAAG,SAAS;CAC9D,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,OAAO,eACL;GACE,SAAS;GACT,OAAO;GACP,aAAa,OAAO,MAAM;GAC1B,UAAU;GACX,EACD,MACD;EACF,CAAC;AAEF,KAAI,QACF,QAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;AAG7D,QAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
-
|
|
3
|
-
//#region src/components/aspect-ratio/aspect-ratio.types.d.ts
|
|
4
|
-
type AspectRatioOwnProps = {
|
|
5
|
-
children?: unknown;
|
|
6
|
-
ratio?: number | string;
|
|
7
|
-
style?: unknown;
|
|
8
|
-
};
|
|
9
|
-
type AspectRatioProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & AspectRatioOwnProps & {
|
|
10
|
-
asChild?: false;
|
|
11
|
-
ref?: Ref<HTMLDivElement>;
|
|
12
|
-
};
|
|
13
|
-
type AspectRatioAsChildProps = AspectRatioOwnProps & {
|
|
14
|
-
asChild: true;
|
|
15
|
-
children: JSXElement;
|
|
16
|
-
ref?: Ref<unknown>;
|
|
17
|
-
};
|
|
18
|
-
//#endregion
|
|
19
|
-
export { AspectRatioAsChildProps, AspectRatioProps };
|
|
20
|
-
//# sourceMappingURL=aspect-ratio.types.d.ts.map
|
package/dist/badge/badge.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
package/dist/badge/badge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","names":[],"sources":["../../src/components/badge/badge.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport type { BadgeAsChildProps, BadgeProps } from \"./badge.types\";\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 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":";;;;AAMA,SAAgB,MAAM,OAAuC;CAC3D,MAAM,EAAE,SAAS,UAAU,SAAS,KAAK,GAAG,SAAS;CACrD,MAAM,aAAa,WAAW,MAAM;EAClC;EACA,aAAa;EACb,cAAc;EACd,gBAAgB,WAAW,YAAY,YAAY,UAAU,KAAA;EAC9D,CAAC;AAEF,KAAI,QACF,QAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;AAG7D,QAAO,oBAAC,QAAD;EAAM,GAAI;EAAa;EAAgB,CAAA"}
|