@askrjs/themes 0.0.1
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/LICENSE +201 -0
- package/THEMING.md +930 -0
- package/dist/_internal/box-layout.js +115 -0
- package/dist/_internal/box-layout.js.map +1 -0
- package/dist/_internal/classes.js +8 -0
- package/dist/_internal/classes.js.map +1 -0
- package/dist/_internal/jsx.js +12 -0
- package/dist/_internal/jsx.js.map +1 -0
- package/dist/_internal/layout.d.ts +9 -0
- package/dist/_internal/layout.js +156 -0
- package/dist/_internal/layout.js.map +1 -0
- package/dist/_internal/merge-props.js +50 -0
- package/dist/_internal/merge-props.js.map +1 -0
- package/dist/accessible-icon/accessible-icon.d.ts +7 -0
- package/dist/accessible-icon/accessible-icon.js +20 -0
- package/dist/accessible-icon/accessible-icon.js.map +1 -0
- package/dist/accessible-icon/accessible-icon.types.d.ts +9 -0
- package/dist/askr/dist/common/jsx.d.ts +16 -0
- package/dist/askr/dist/common/props.d.ts +22 -0
- package/dist/askr-themes/src/themes/default/index.css +3736 -0
- package/dist/aspect-ratio/aspect-ratio.d.ts +8 -0
- package/dist/aspect-ratio/aspect-ratio.js +36 -0
- package/dist/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/aspect-ratio/aspect-ratio.types.d.ts +20 -0
- package/dist/aspect-ratio/index.d.ts +2 -0
- package/dist/badge/badge.d.ts +8 -0
- package/dist/badge/badge.js +26 -0
- package/dist/badge/badge.js.map +1 -0
- package/dist/badge/badge.types.d.ts +20 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/box/box.d.ts +9 -0
- package/dist/box/box.js +35 -0
- package/dist/box/box.js.map +1 -0
- package/dist/box/box.types.d.ts +71 -0
- package/dist/box/index.d.ts +2 -0
- package/dist/breadcrumb/breadcrumb.d.ts +18 -0
- package/dist/breadcrumb/breadcrumb.js +113 -0
- package/dist/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/breadcrumb/breadcrumb.types.d.ts +64 -0
- package/dist/breadcrumb/index.d.ts +2 -0
- package/dist/card/card.d.ts +12 -0
- package/dist/card/card.js +68 -0
- package/dist/card/card.js.map +1 -0
- package/dist/card/card.types.d.ts +37 -0
- package/dist/card/index.d.ts +2 -0
- package/dist/components/_internal/box-layout.d.ts +7 -0
- package/dist/components/_internal/classes.d.ts +1 -0
- package/dist/components/_internal/jsx.d.ts +8 -0
- package/dist/components/_internal/layout.d.ts +31 -0
- package/dist/components/_internal/merge-props.d.ts +1 -0
- package/dist/components/_internal/style.d.ts +1 -0
- package/dist/components/accessible-icon/accessible-icon.d.ts +2 -0
- package/dist/components/accessible-icon/accessible-icon.types.d.ts +5 -0
- package/dist/components/accessible-icon/index.d.ts +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +3 -0
- package/dist/components/aspect-ratio/aspect-ratio.types.d.ts +15 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/badge/badge.a11y.d.ts +13 -0
- package/dist/components/badge/badge.d.ts +3 -0
- package/dist/components/badge/badge.types.d.ts +15 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/box/box.a11y.d.ts +10 -0
- package/dist/components/box/box.d.ts +4 -0
- package/dist/components/box/box.types.d.ts +66 -0
- package/dist/components/box/index.d.ts +3 -0
- package/dist/components/breadcrumb/breadcrumb.a11y.d.ts +13 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +13 -0
- package/dist/components/breadcrumb/breadcrumb.types.d.ts +59 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/card/card.d.ts +7 -0
- package/dist/components/card/card.types.d.ts +33 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/container/container.a11y.d.ts +16 -0
- package/dist/components/container/container.d.ts +3 -0
- package/dist/components/container/container.types.d.ts +29 -0
- package/dist/components/container/index.d.ts +3 -0
- package/dist/components/empty-state/empty-state.d.ts +2 -0
- package/dist/components/empty-state/empty-state.types.d.ts +9 -0
- package/dist/components/empty-state/index.d.ts +2 -0
- package/dist/components/flex/flex.a11y.d.ts +18 -0
- package/dist/components/flex/flex.d.ts +4 -0
- package/dist/components/flex/flex.types.d.ts +41 -0
- package/dist/components/flex/index.d.ts +3 -0
- package/dist/components/grid/grid.a11y.d.ts +21 -0
- package/dist/components/grid/grid.d.ts +4 -0
- package/dist/components/grid/grid.types.d.ts +37 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/header/header.a11y.d.ts +10 -0
- package/dist/components/header/header.d.ts +2 -0
- package/dist/components/header/header.types.d.ts +5 -0
- package/dist/components/header/index.d.ts +3 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.js +28 -0
- package/dist/components/inline/index.d.ts +6 -0
- package/dist/components/logos/create-logo.d.ts +5 -0
- package/dist/components/logos/github-logo.d.ts +4 -0
- package/dist/components/logos/google-logo.d.ts +4 -0
- package/dist/components/logos/index.d.ts +5 -0
- package/dist/components/logos/microsoft-logo.d.ts +4 -0
- package/dist/components/logos/types.d.ts +14 -0
- package/dist/components/navbar/index.d.ts +2 -0
- package/dist/components/navbar/navbar.d.ts +6 -0
- package/dist/components/navbar/navbar.types.d.ts +24 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/section.a11y.d.ts +11 -0
- package/dist/components/section/section.d.ts +3 -0
- package/dist/components/section/section.types.d.ts +17 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/separator.a11y.d.ts +13 -0
- package/dist/components/separator/separator.d.ts +3 -0
- package/dist/components/separator/separator.types.d.ts +16 -0
- package/dist/components/sidebar-layout/index.d.ts +3 -0
- package/dist/components/sidebar-layout/sidebar-layout.a11y.d.ts +15 -0
- package/dist/components/sidebar-layout/sidebar-layout.d.ts +2 -0
- package/dist/components/sidebar-layout/sidebar-layout.types.d.ts +20 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/skeleton.a11y.d.ts +12 -0
- package/dist/components/skeleton/skeleton.d.ts +3 -0
- package/dist/components/skeleton/skeleton.types.d.ts +13 -0
- package/dist/components/spacer/index.d.ts +3 -0
- package/dist/components/spacer/spacer.a11y.d.ts +13 -0
- package/dist/components/spacer/spacer.d.ts +3 -0
- package/dist/components/spacer/spacer.types.d.ts +24 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/spinner.d.ts +2 -0
- package/dist/components/spinner/spinner.types.d.ts +5 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/stack.a11y.d.ts +14 -0
- package/dist/components/stack/stack.d.ts +3 -0
- package/dist/components/stack/stack.types.d.ts +16 -0
- package/dist/components/theme/index.d.ts +2 -0
- package/dist/components/theme/theme.d.ts +40 -0
- package/dist/components/topbar-layout/index.d.ts +3 -0
- package/dist/components/topbar-layout/topbar-layout.a11y.d.ts +13 -0
- package/dist/components/topbar-layout/topbar-layout.d.ts +2 -0
- package/dist/components/topbar-layout/topbar-layout.types.d.ts +12 -0
- package/dist/container/container.d.ts +8 -0
- package/dist/container/container.js +82 -0
- package/dist/container/container.js.map +1 -0
- package/dist/container/container.types.d.ts +28 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/empty-state/empty-state.d.ts +7 -0
- package/dist/empty-state/empty-state.js +39 -0
- package/dist/empty-state/empty-state.js.map +1 -0
- package/dist/empty-state/empty-state.types.d.ts +13 -0
- package/dist/flex/flex.d.ts +9 -0
- package/dist/flex/flex.js +114 -0
- package/dist/flex/flex.js.map +1 -0
- package/dist/flex/flex.types.d.ts +41 -0
- package/dist/flex/index.d.ts +2 -0
- package/dist/grid/grid.d.ts +9 -0
- package/dist/grid/grid.js +115 -0
- package/dist/grid/grid.js.map +1 -0
- package/dist/grid/grid.types.d.ts +40 -0
- package/dist/grid/index.d.ts +2 -0
- package/dist/header/header.d.ts +7 -0
- package/dist/header/header.js +18 -0
- package/dist/header/header.js.map +1 -0
- package/dist/header/header.types.d.ts +9 -0
- package/dist/inline/index.d.ts +7 -0
- package/dist/inline/index.js +13 -0
- package/dist/inline/index.js.map +1 -0
- package/dist/logos/create-logo.js +75 -0
- package/dist/logos/create-logo.js.map +1 -0
- package/dist/logos/github-logo.d.ts +18 -0
- package/dist/logos/github-logo.js +9 -0
- package/dist/logos/github-logo.js.map +1 -0
- package/dist/logos/google-logo.d.ts +18 -0
- package/dist/logos/google-logo.js +23 -0
- package/dist/logos/google-logo.js.map +1 -0
- package/dist/logos/microsoft-logo.d.ts +18 -0
- package/dist/logos/microsoft-logo.js +35 -0
- package/dist/logos/microsoft-logo.js.map +1 -0
- package/dist/logos/types.d.ts +16 -0
- package/dist/navbar/index.d.ts +2 -0
- package/dist/navbar/navbar.d.ts +11 -0
- package/dist/navbar/navbar.js +57 -0
- package/dist/navbar/navbar.js.map +1 -0
- package/dist/navbar/navbar.types.d.ts +29 -0
- package/dist/section/index.d.ts +2 -0
- package/dist/section/section.d.ts +8 -0
- package/dist/section/section.js +40 -0
- package/dist/section/section.js.map +1 -0
- package/dist/section/section.types.d.ts +22 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/separator.d.ts +8 -0
- package/dist/separator/separator.js +27 -0
- package/dist/separator/separator.js.map +1 -0
- package/dist/separator/separator.types.d.ts +21 -0
- package/dist/sidebar-layout/index.d.ts +2 -0
- package/dist/sidebar-layout/sidebar-layout.d.ts +7 -0
- package/dist/sidebar-layout/sidebar-layout.js +51 -0
- package/dist/sidebar-layout/sidebar-layout.js.map +1 -0
- package/dist/sidebar-layout/sidebar-layout.types.d.ts +20 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/skeleton.d.ts +8 -0
- package/dist/skeleton/skeleton.js +26 -0
- package/dist/skeleton/skeleton.js.map +1 -0
- package/dist/skeleton/skeleton.types.d.ts +18 -0
- package/dist/spacer/index.d.ts +2 -0
- package/dist/spacer/spacer.d.ts +8 -0
- package/dist/spacer/spacer.js +47 -0
- package/dist/spacer/spacer.js.map +1 -0
- package/dist/spacer/spacer.types.d.ts +25 -0
- package/dist/spinner/index.d.ts +2 -0
- package/dist/spinner/spinner.d.ts +7 -0
- package/dist/spinner/spinner.js +16 -0
- package/dist/spinner/spinner.js.map +1 -0
- package/dist/spinner/spinner.types.d.ts +10 -0
- package/dist/stack/index.d.ts +2 -0
- package/dist/stack/stack.d.ts +8 -0
- package/dist/stack/stack.js +16 -0
- package/dist/stack/stack.js.map +1 -0
- package/dist/stack/stack.types.d.ts +21 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/theme.d.ts +44 -0
- package/dist/theme/theme.js +159 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/topbar-layout/index.d.ts +2 -0
- package/dist/topbar-layout/topbar-layout.d.ts +7 -0
- package/dist/topbar-layout/topbar-layout.js +37 -0
- package/dist/topbar-layout/topbar-layout.js.map +1 -0
- package/dist/topbar-layout/topbar-layout.types.d.ts +13 -0
- package/package.json +122 -0
- package/scripts/new-theme.js +87 -0
- package/src/askr-compat.d.ts +110 -0
- package/src/components/_internal/box-layout.ts +156 -0
- package/src/components/_internal/classes.ts +5 -0
- package/src/components/_internal/jsx.ts +141 -0
- package/src/components/_internal/layout.ts +223 -0
- package/src/components/_internal/merge-props.ts +89 -0
- package/src/components/_internal/style.ts +18 -0
- package/src/components/accessible-icon/accessible-icon.tsx +18 -0
- package/src/components/accessible-icon/accessible-icon.types.ts +5 -0
- package/src/components/accessible-icon/index.ts +2 -0
- package/src/components/aspect-ratio/aspect-ratio.tsx +48 -0
- package/src/components/aspect-ratio/aspect-ratio.types.ts +19 -0
- package/src/components/aspect-ratio/index.ts +2 -0
- package/src/components/badge/badge.a11y.ts +15 -0
- package/src/components/badge/badge.tsx +21 -0
- package/src/components/badge/badge.types.ts +27 -0
- package/src/components/badge/index.ts +3 -0
- package/src/components/box/box.a11y.ts +11 -0
- package/src/components/box/box.tsx +37 -0
- package/src/components/box/box.types.ts +75 -0
- package/src/components/box/index.ts +11 -0
- package/src/components/breadcrumb/breadcrumb.a11y.ts +15 -0
- package/src/components/breadcrumb/breadcrumb.tsx +123 -0
- package/src/components/breadcrumb/breadcrumb.types.ts +73 -0
- package/src/components/breadcrumb/index.ts +24 -0
- package/src/components/card/card.tsx +79 -0
- package/src/components/card/card.types.ts +40 -0
- package/src/components/card/index.ts +12 -0
- package/src/components/container/container.a11y.ts +17 -0
- package/src/components/container/container.tsx +139 -0
- package/src/components/container/container.types.ts +35 -0
- package/src/components/container/index.ts +9 -0
- package/src/components/empty-state/empty-state.tsx +42 -0
- package/src/components/empty-state/empty-state.types.ts +10 -0
- package/src/components/empty-state/index.ts +2 -0
- package/src/components/flex/flex.a11y.ts +19 -0
- package/src/components/flex/flex.tsx +160 -0
- package/src/components/flex/flex.types.ts +50 -0
- package/src/components/flex/index.ts +16 -0
- package/src/components/grid/grid.a11y.ts +22 -0
- package/src/components/grid/grid.tsx +172 -0
- package/src/components/grid/grid.types.ts +45 -0
- package/src/components/grid/index.ts +10 -0
- package/src/components/header/header.a11y.ts +11 -0
- package/src/components/header/header.tsx +18 -0
- package/src/components/header/header.types.ts +6 -0
- package/src/components/header/index.ts +3 -0
- package/src/components/index.ts +107 -0
- package/src/components/inline/index.tsx +28 -0
- package/src/components/logos/create-logo.tsx +103 -0
- package/src/components/logos/github-logo.tsx +13 -0
- package/src/components/logos/google-logo.tsx +34 -0
- package/src/components/logos/index.ts +5 -0
- package/src/components/logos/microsoft-logo.tsx +10 -0
- package/src/components/logos/types.ts +24 -0
- package/src/components/navbar/index.ts +9 -0
- package/src/components/navbar/navbar.tsx +59 -0
- package/src/components/navbar/navbar.types.ts +33 -0
- package/src/components/section/index.ts +8 -0
- package/src/components/section/section.a11y.ts +12 -0
- package/src/components/section/section.tsx +37 -0
- package/src/components/section/section.types.ts +22 -0
- package/src/components/separator/index.ts +12 -0
- package/src/components/separator/separator.a11y.ts +15 -0
- package/src/components/separator/separator.tsx +23 -0
- package/src/components/separator/separator.types.ts +21 -0
- package/src/components/sidebar-layout/index.ts +6 -0
- package/src/components/sidebar-layout/sidebar-layout.a11y.ts +16 -0
- package/src/components/sidebar-layout/sidebar-layout.tsx +59 -0
- package/src/components/sidebar-layout/sidebar-layout.types.ts +22 -0
- package/src/components/skeleton/index.ts +3 -0
- package/src/components/skeleton/skeleton.a11y.ts +14 -0
- package/src/components/skeleton/skeleton.tsx +21 -0
- package/src/components/skeleton/skeleton.types.ts +17 -0
- package/src/components/spacer/index.ts +9 -0
- package/src/components/spacer/spacer.a11y.ts +14 -0
- package/src/components/spacer/spacer.tsx +58 -0
- package/src/components/spacer/spacer.types.ts +30 -0
- package/src/components/spinner/index.ts +2 -0
- package/src/components/spinner/spinner.tsx +21 -0
- package/src/components/spinner/spinner.types.ts +7 -0
- package/src/components/stack/index.ts +3 -0
- package/src/components/stack/stack.a11y.ts +15 -0
- package/src/components/stack/stack.tsx +13 -0
- package/src/components/stack/stack.types.ts +21 -0
- package/src/components/theme/index.ts +10 -0
- package/src/components/theme/theme.tsx +260 -0
- package/src/components/topbar-layout/index.ts +3 -0
- package/src/components/topbar-layout/topbar-layout.a11y.ts +14 -0
- package/src/components/topbar-layout/topbar-layout.tsx +39 -0
- package/src/components/topbar-layout/topbar-layout.types.ts +13 -0
- package/src/css.d.ts +1 -0
- package/src/index.css +1 -0
- package/src/jsx.d.ts +23 -0
- package/src/themes/default/index.css +48 -0
- package/src/themes/default/styles/actions/button.css +196 -0
- package/src/themes/default/styles/actions/toggle-group.css +52 -0
- package/src/themes/default/styles/actions/toggle.css +44 -0
- package/src/themes/default/styles/base/icon.css +10 -0
- package/src/themes/default/styles/base/typography.css +208 -0
- package/src/themes/default/styles/base/utilities.css +223 -0
- package/src/themes/default/styles/disclosure/accordion.css +62 -0
- package/src/themes/default/styles/disclosure/collapsible.css +47 -0
- package/src/themes/default/styles/display/avatar.css +25 -0
- package/src/themes/default/styles/display/badge.css +51 -0
- package/src/themes/default/styles/display/card.css +53 -0
- package/src/themes/default/styles/display/coverage.css +248 -0
- package/src/themes/default/styles/display/progress-circle.css +18 -0
- package/src/themes/default/styles/display/progress.css +18 -0
- package/src/themes/default/styles/display/scroll-area.css +34 -0
- package/src/themes/default/styles/display/separator.css +15 -0
- package/src/themes/default/styles/display/skeleton.css +6 -0
- package/src/themes/default/styles/display/spinner.css +9 -0
- package/src/themes/default/styles/display/table.css +63 -0
- package/src/themes/default/styles/forms/checkbox.css +64 -0
- package/src/themes/default/styles/forms/form.css +5 -0
- package/src/themes/default/styles/forms/input.css +49 -0
- package/src/themes/default/styles/forms/label.css +6 -0
- package/src/themes/default/styles/forms/radio-group.css +53 -0
- package/src/themes/default/styles/forms/select.css +143 -0
- package/src/themes/default/styles/forms/slider.css +75 -0
- package/src/themes/default/styles/forms/switch.css +70 -0
- package/src/themes/default/styles/forms/textarea.css +37 -0
- package/src/themes/default/styles/layout/aspect-ratio.css +5 -0
- package/src/themes/default/styles/layout/dashboard-layout.css +15 -0
- package/src/themes/default/styles/layout/docs-layout.css +10 -0
- package/src/themes/default/styles/layout/layout.css +946 -0
- package/src/themes/default/styles/layout/patterns.css +43 -0
- package/src/themes/default/styles/layout/responsive-layout.css +209 -0
- package/src/themes/default/styles/layout/sidebar.css +10 -0
- package/src/themes/default/styles/navigation/breadcrumb.css +39 -0
- package/src/themes/default/styles/navigation/menu.css +60 -0
- package/src/themes/default/styles/navigation/menubar.css +89 -0
- package/src/themes/default/styles/navigation/navigation-menu.css +90 -0
- package/src/themes/default/styles/navigation/tabs.css +61 -0
- package/src/themes/default/styles/overlays/alert-dialog.css +9 -0
- package/src/themes/default/styles/overlays/dialog.css +116 -0
- package/src/themes/default/styles/overlays/dropdown-menu.css +109 -0
- package/src/themes/default/styles/overlays/hover-card.css +46 -0
- package/src/themes/default/styles/overlays/popover.css +72 -0
- package/src/themes/default/styles/overlays/toast.css +123 -0
- package/src/themes/default/styles/overlays/tooltip.css +83 -0
- package/src/themes/default/styles/shell/header.css +36 -0
- package/src/themes/default/styles/shell/navbar.css +158 -0
- package/src/themes/default/styles/shell/theme.css +35 -0
- package/src/themes/default/tokens.css +316 -0
- package/templates/theme/index.css +48 -0
- package/templates/theme/styles/actions/button.css +196 -0
- package/templates/theme/styles/actions/toggle-group.css +52 -0
- package/templates/theme/styles/actions/toggle.css +44 -0
- package/templates/theme/styles/base/icon.css +10 -0
- package/templates/theme/styles/base/typography.css +208 -0
- package/templates/theme/styles/base/utilities.css +19 -0
- package/templates/theme/styles/disclosure/accordion.css +62 -0
- package/templates/theme/styles/disclosure/collapsible.css +47 -0
- package/templates/theme/styles/display/avatar.css +25 -0
- package/templates/theme/styles/display/badge.css +51 -0
- package/templates/theme/styles/display/card.css +53 -0
- package/templates/theme/styles/display/coverage.css +146 -0
- package/templates/theme/styles/display/progress-circle.css +18 -0
- package/templates/theme/styles/display/progress.css +18 -0
- package/templates/theme/styles/display/scroll-area.css +34 -0
- package/templates/theme/styles/display/separator.css +15 -0
- package/templates/theme/styles/display/skeleton.css +6 -0
- package/templates/theme/styles/display/spinner.css +9 -0
- package/templates/theme/styles/display/table.css +63 -0
- package/templates/theme/styles/forms/checkbox.css +64 -0
- package/templates/theme/styles/forms/form.css +5 -0
- package/templates/theme/styles/forms/input.css +49 -0
- package/templates/theme/styles/forms/label.css +6 -0
- package/templates/theme/styles/forms/radio-group.css +53 -0
- package/templates/theme/styles/forms/select.css +143 -0
- package/templates/theme/styles/forms/slider.css +75 -0
- package/templates/theme/styles/forms/switch.css +70 -0
- package/templates/theme/styles/forms/textarea.css +37 -0
- package/templates/theme/styles/layout/aspect-ratio.css +5 -0
- package/templates/theme/styles/layout/dashboard-layout.css +16 -0
- package/templates/theme/styles/layout/docs-layout.css +11 -0
- package/templates/theme/styles/layout/layout.css +1 -0
- package/templates/theme/styles/layout/patterns.css +43 -0
- package/templates/theme/styles/layout/responsive-layout.css +209 -0
- package/templates/theme/styles/layout/sidebar.css +11 -0
- package/templates/theme/styles/navigation/breadcrumb.css +31 -0
- package/templates/theme/styles/navigation/menu.css +60 -0
- package/templates/theme/styles/navigation/menubar.css +89 -0
- package/templates/theme/styles/navigation/navigation-menu.css +90 -0
- package/templates/theme/styles/navigation/tabs.css +61 -0
- package/templates/theme/styles/overlays/alert-dialog.css +9 -0
- package/templates/theme/styles/overlays/dialog.css +116 -0
- package/templates/theme/styles/overlays/dropdown-menu.css +109 -0
- package/templates/theme/styles/overlays/hover-card.css +46 -0
- package/templates/theme/styles/overlays/popover.css +72 -0
- package/templates/theme/styles/overlays/toast.css +123 -0
- package/templates/theme/styles/overlays/tooltip.css +83 -0
- package/templates/theme/styles/shell/header.css +36 -0
- package/templates/theme/styles/shell/navbar.css +158 -0
- package/templates/theme/styles/shell/theme.css +35 -0
- package/templates/theme/tokens.css +316 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout helpers shared by headless layout primitives.
|
|
3
|
+
*/
|
|
4
|
+
export type LayoutBreakpoint = "initial" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
export type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;
|
|
6
|
+
/**
|
|
7
|
+
* Returns true when `value` is a concrete CSS length/size that can be applied
|
|
8
|
+
* directly as an inline style.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isCssLength(value: unknown): value is string;
|
|
11
|
+
export declare function isResponsiveValue<T>(value: ResponsiveValue<T> | undefined): value is Partial<Record<LayoutBreakpoint, T>>;
|
|
12
|
+
export declare function normalizeResponsiveValue<T>(value: ResponsiveValue<T> | undefined): Partial<Record<LayoutBreakpoint, T>> | undefined;
|
|
13
|
+
export declare function serializeResponsiveValue<T>(value: ResponsiveValue<T> | undefined): string | undefined;
|
|
14
|
+
export declare function serializeResponsiveValueIf<T>(value: ResponsiveValue<T> | undefined, predicate: (value: T) => boolean): string | undefined;
|
|
15
|
+
export declare function serializeValueIf<T>(value: T | undefined, predicate: (value: T) => boolean): string | undefined;
|
|
16
|
+
export declare function setResponsiveStyleVar<T>(styles: Record<string, string | number>, variable: string, value: ResponsiveValue<T> | undefined, resolve?: (value: T) => string | number | undefined): void;
|
|
17
|
+
export declare function resolveSpaceValue(value: string | number): string | number;
|
|
18
|
+
export declare function resolveContainerSizeValue(value: string): string;
|
|
19
|
+
export declare function resolveSectionSizeValue(value: string): string;
|
|
20
|
+
export declare function resolveGridTrackValue(value: string | number): string;
|
|
21
|
+
export declare function resolveJustifyValue(value: string): string;
|
|
22
|
+
export declare function resolveAlignValue(value: string): string;
|
|
23
|
+
export declare function resolveInlineAlignValue(value: "left" | "center" | "right"): {
|
|
24
|
+
marginLeft?: string;
|
|
25
|
+
marginRight?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Merges a record of computed layout styles with a user-supplied `style` prop.
|
|
29
|
+
* The user's styles take precedence for conflicting keys.
|
|
30
|
+
*/
|
|
31
|
+
export declare function mergeLayoutStyles(layout: Record<string, string | number>, user: unknown): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeProps<TBase extends object, TInjected extends object>(base: TBase, injected: TInjected): TInjected & TBase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeCssVar(style: unknown, name: string, value: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
export type AspectRatioOwnProps = {
|
|
3
|
+
children?: unknown;
|
|
4
|
+
ratio?: number | string;
|
|
5
|
+
style?: unknown;
|
|
6
|
+
};
|
|
7
|
+
export type AspectRatioProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & AspectRatioOwnProps & {
|
|
8
|
+
asChild?: false;
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
|
+
};
|
|
11
|
+
export type AspectRatioAsChildProps = AspectRatioOwnProps & {
|
|
12
|
+
asChild: true;
|
|
13
|
+
children: JSXElement;
|
|
14
|
+
ref?: Ref<unknown>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessibility contract for Badge.
|
|
3
|
+
*/
|
|
4
|
+
export declare const BADGE_A11Y_CONTRACT: {
|
|
5
|
+
readonly DATA_ATTRIBUTES: {
|
|
6
|
+
readonly slot: "data-slot";
|
|
7
|
+
};
|
|
8
|
+
readonly MARKER: "data-badge";
|
|
9
|
+
readonly CONTENT: {
|
|
10
|
+
readonly textAllowed: true;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type BadgeA11yContract = typeof BADGE_A11Y_CONTRACT;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
export type BadgeVariant = "default" | "secondary" | "outline" | "success" | "warning" | "danger" | "info";
|
|
3
|
+
export type BadgeOwnProps = {
|
|
4
|
+
children?: unknown;
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
};
|
|
7
|
+
export type BadgeProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BadgeOwnProps & {
|
|
8
|
+
asChild?: false;
|
|
9
|
+
ref?: Ref<HTMLSpanElement>;
|
|
10
|
+
};
|
|
11
|
+
export type BadgeAsChildProps = BadgeOwnProps & {
|
|
12
|
+
asChild: true;
|
|
13
|
+
children: JSXElement;
|
|
14
|
+
ref?: Ref<unknown>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const BOX_A11Y_CONTRACT: {
|
|
2
|
+
readonly DATA_ATTRIBUTES: {
|
|
3
|
+
readonly slot: "data-slot";
|
|
4
|
+
readonly layout: "data-ak-layout";
|
|
5
|
+
};
|
|
6
|
+
readonly SLOT_VALUES: {
|
|
7
|
+
readonly root: "box";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type BoxA11yContract = typeof BOX_A11Y_CONTRACT;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BoxAsChildProps, BoxDivProps, BoxSpanProps } from "./box.types";
|
|
2
|
+
export declare function Box(props: BoxDivProps): JSX.Element;
|
|
3
|
+
export declare function Box(props: BoxSpanProps): JSX.Element;
|
|
4
|
+
export declare function Box(props: BoxAsChildProps): JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
import type { ResponsiveValue } from "../_internal/layout";
|
|
3
|
+
export type LayoutResponsive<T> = ResponsiveValue<T>;
|
|
4
|
+
export type BoxLayoutOwnProps = {
|
|
5
|
+
display?: ResponsiveValue<string>;
|
|
6
|
+
m?: ResponsiveValue<string | number>;
|
|
7
|
+
mx?: ResponsiveValue<string | number>;
|
|
8
|
+
my?: ResponsiveValue<string | number>;
|
|
9
|
+
mt?: ResponsiveValue<string | number>;
|
|
10
|
+
mr?: ResponsiveValue<string | number>;
|
|
11
|
+
mb?: ResponsiveValue<string | number>;
|
|
12
|
+
ml?: ResponsiveValue<string | number>;
|
|
13
|
+
p?: ResponsiveValue<string | number>;
|
|
14
|
+
px?: ResponsiveValue<string | number>;
|
|
15
|
+
py?: ResponsiveValue<string | number>;
|
|
16
|
+
pt?: ResponsiveValue<string | number>;
|
|
17
|
+
pr?: ResponsiveValue<string | number>;
|
|
18
|
+
pb?: ResponsiveValue<string | number>;
|
|
19
|
+
pl?: ResponsiveValue<string | number>;
|
|
20
|
+
width?: ResponsiveValue<string>;
|
|
21
|
+
minWidth?: ResponsiveValue<string>;
|
|
22
|
+
maxWidth?: ResponsiveValue<string>;
|
|
23
|
+
height?: ResponsiveValue<string>;
|
|
24
|
+
minHeight?: ResponsiveValue<string>;
|
|
25
|
+
maxHeight?: ResponsiveValue<string>;
|
|
26
|
+
position?: ResponsiveValue<string>;
|
|
27
|
+
inset?: ResponsiveValue<string | number>;
|
|
28
|
+
top?: ResponsiveValue<string | number>;
|
|
29
|
+
right?: ResponsiveValue<string | number>;
|
|
30
|
+
bottom?: ResponsiveValue<string | number>;
|
|
31
|
+
left?: ResponsiveValue<string | number>;
|
|
32
|
+
overflow?: ResponsiveValue<string>;
|
|
33
|
+
overflowX?: ResponsiveValue<string>;
|
|
34
|
+
overflowY?: ResponsiveValue<string>;
|
|
35
|
+
flexBasis?: ResponsiveValue<string>;
|
|
36
|
+
flexGrow?: ResponsiveValue<string | number>;
|
|
37
|
+
flexShrink?: ResponsiveValue<string | number>;
|
|
38
|
+
gridArea?: ResponsiveValue<string>;
|
|
39
|
+
gridColumn?: ResponsiveValue<string>;
|
|
40
|
+
gridColumnStart?: ResponsiveValue<string>;
|
|
41
|
+
gridColumnEnd?: ResponsiveValue<string>;
|
|
42
|
+
gridRow?: ResponsiveValue<string>;
|
|
43
|
+
gridRowStart?: ResponsiveValue<string>;
|
|
44
|
+
gridRowEnd?: ResponsiveValue<string>;
|
|
45
|
+
children?: unknown;
|
|
46
|
+
};
|
|
47
|
+
export type BoxOwnProps = BoxLayoutOwnProps & {
|
|
48
|
+
as?: "div" | "span";
|
|
49
|
+
};
|
|
50
|
+
export type BoxDivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & BoxOwnProps & {
|
|
51
|
+
as?: "div";
|
|
52
|
+
asChild?: false;
|
|
53
|
+
ref?: Ref<HTMLDivElement>;
|
|
54
|
+
};
|
|
55
|
+
export type BoxSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & BoxOwnProps & {
|
|
56
|
+
as: "span";
|
|
57
|
+
asChild?: false;
|
|
58
|
+
ref?: Ref<HTMLSpanElement>;
|
|
59
|
+
};
|
|
60
|
+
export type BoxAsChildProps = Omit<BoxOwnProps, "as"> & {
|
|
61
|
+
asChild: true;
|
|
62
|
+
children: JSXElement;
|
|
63
|
+
ref?: Ref<unknown>;
|
|
64
|
+
style?: JSX.IntrinsicElements["div"]["style"];
|
|
65
|
+
};
|
|
66
|
+
export type BoxProps = BoxDivProps | BoxSpanProps | BoxAsChildProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumb accessibility contract.
|
|
3
|
+
*/
|
|
4
|
+
export declare const BREADCRUMB_A11Y_CONTRACT: {
|
|
5
|
+
readonly DATA_ATTRIBUTES: {
|
|
6
|
+
readonly slot: "data-slot";
|
|
7
|
+
};
|
|
8
|
+
readonly NAV_ROLE: "navigation";
|
|
9
|
+
readonly CURRENT_PAGE_ATTRIBUTE: "aria-current";
|
|
10
|
+
readonly CURRENT_PAGE_VALUE: "page";
|
|
11
|
+
readonly SEPARATOR_MARKER: "data-breadcrumb-separator";
|
|
12
|
+
};
|
|
13
|
+
export type BreadcrumbA11yContract = typeof BREADCRUMB_A11Y_CONTRACT;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BreadcrumbAsChildProps, BreadcrumbCurrentAsChildProps, BreadcrumbCurrentProps, BreadcrumbItemAsChildProps, BreadcrumbItemProps, BreadcrumbLinkAsChildProps, BreadcrumbLinkProps, BreadcrumbListAsChildProps, BreadcrumbListProps, BreadcrumbProps, BreadcrumbSeparatorAsChildProps, BreadcrumbSeparatorProps } from "./breadcrumb.types";
|
|
2
|
+
export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
|
|
3
|
+
export declare function Breadcrumb(props: BreadcrumbAsChildProps): JSX.Element;
|
|
4
|
+
export declare function BreadcrumbList(props: BreadcrumbListProps): JSX.Element;
|
|
5
|
+
export declare function BreadcrumbList(props: BreadcrumbListAsChildProps): JSX.Element;
|
|
6
|
+
export declare function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element;
|
|
7
|
+
export declare function BreadcrumbItem(props: BreadcrumbItemAsChildProps): JSX.Element;
|
|
8
|
+
export declare function BreadcrumbLink(props: BreadcrumbLinkProps): JSX.Element;
|
|
9
|
+
export declare function BreadcrumbLink(props: BreadcrumbLinkAsChildProps): JSX.Element;
|
|
10
|
+
export declare function BreadcrumbCurrent(props: BreadcrumbCurrentProps): JSX.Element;
|
|
11
|
+
export declare function BreadcrumbCurrent(props: BreadcrumbCurrentAsChildProps): JSX.Element;
|
|
12
|
+
export declare function BreadcrumbSeparator(props: BreadcrumbSeparatorProps): JSX.Element;
|
|
13
|
+
export declare function BreadcrumbSeparator(props: BreadcrumbSeparatorAsChildProps): JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
export type BreadcrumbOwnProps = {
|
|
3
|
+
children?: unknown;
|
|
4
|
+
"aria-label"?: string;
|
|
5
|
+
};
|
|
6
|
+
export type BreadcrumbProps = Omit<JSX.IntrinsicElements["nav"], "children" | "ref"> & BreadcrumbOwnProps & {
|
|
7
|
+
asChild?: false;
|
|
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>;
|
|
59
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbCurrent, BreadcrumbSeparator, } from "./breadcrumb";
|
|
2
|
+
export { BREADCRUMB_A11Y_CONTRACT, type BreadcrumbA11yContract } from "./breadcrumb.a11y";
|
|
3
|
+
export type { BreadcrumbOwnProps, BreadcrumbProps, BreadcrumbAsChildProps, BreadcrumbListProps, BreadcrumbListAsChildProps, BreadcrumbItemProps, BreadcrumbItemAsChildProps, BreadcrumbLinkProps, BreadcrumbLinkAsChildProps, BreadcrumbCurrentProps, BreadcrumbCurrentAsChildProps, BreadcrumbSeparatorProps, BreadcrumbSeparatorAsChildProps, } from "./breadcrumb.types";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps } from "./card.types";
|
|
2
|
+
export declare function Card(props: CardProps): JSX.Element;
|
|
3
|
+
export declare function CardHeader(props: CardHeaderProps): JSX.Element;
|
|
4
|
+
export declare function CardTitle(props: CardTitleProps): JSX.Element;
|
|
5
|
+
export declare function CardDescription(props: CardDescriptionProps): JSX.Element;
|
|
6
|
+
export declare function CardContent(props: CardContentProps): JSX.Element;
|
|
7
|
+
export declare function CardFooter(props: CardFooterProps): JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
export type CardVariant = "default" | "raised";
|
|
3
|
+
export type CardPadding = "sm" | "md" | "lg";
|
|
4
|
+
type DivProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref">;
|
|
5
|
+
type HeadingProps = Omit<JSX.IntrinsicElements["h3"], "children" | "ref">;
|
|
6
|
+
type ParagraphProps = Omit<JSX.IntrinsicElements["p"], "children" | "ref">;
|
|
7
|
+
export type CardProps = DivProps & {
|
|
8
|
+
children?: unknown;
|
|
9
|
+
variant?: CardVariant;
|
|
10
|
+
padding?: CardPadding;
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
|
+
};
|
|
13
|
+
export type CardHeaderProps = DivProps & {
|
|
14
|
+
children?: unknown;
|
|
15
|
+
ref?: Ref<HTMLDivElement>;
|
|
16
|
+
};
|
|
17
|
+
export type CardContentProps = DivProps & {
|
|
18
|
+
children?: unknown;
|
|
19
|
+
ref?: Ref<HTMLDivElement>;
|
|
20
|
+
};
|
|
21
|
+
export type CardFooterProps = DivProps & {
|
|
22
|
+
children?: unknown;
|
|
23
|
+
ref?: Ref<HTMLDivElement>;
|
|
24
|
+
};
|
|
25
|
+
export type CardTitleProps = HeadingProps & {
|
|
26
|
+
children?: unknown;
|
|
27
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
28
|
+
};
|
|
29
|
+
export type CardDescriptionProps = ParagraphProps & {
|
|
30
|
+
children?: unknown;
|
|
31
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const CONTAINER_A11Y_CONTRACT: {
|
|
2
|
+
readonly DATA_ATTRIBUTES: {
|
|
3
|
+
readonly slot: "data-slot";
|
|
4
|
+
readonly layout: "data-ak-layout";
|
|
5
|
+
readonly variant: "data-variant";
|
|
6
|
+
readonly fluid: "data-fluid";
|
|
7
|
+
readonly maxWidth: "data-max-width";
|
|
8
|
+
readonly padding: "data-padding";
|
|
9
|
+
readonly size: "data-size";
|
|
10
|
+
readonly align: "data-align";
|
|
11
|
+
};
|
|
12
|
+
readonly SLOT_VALUES: {
|
|
13
|
+
readonly root: "container";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type ContainerA11yContract = typeof CONTAINER_A11Y_CONTRACT;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
|
|
3
|
+
export type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "fluid";
|
|
4
|
+
export type ContainerOwnProps = BoxLayoutOwnProps & {
|
|
5
|
+
/** Bootstrap-like responsive container variant. */
|
|
6
|
+
variant?: ContainerVariant;
|
|
7
|
+
/** Makes the container span the full available width while preserving gutters. */
|
|
8
|
+
fluid?: boolean;
|
|
9
|
+
/** Radix-style container size token. */
|
|
10
|
+
size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">;
|
|
11
|
+
/** Horizontal alignment of the constrained container. */
|
|
12
|
+
align?: LayoutResponsive<"left" | "center" | "right">;
|
|
13
|
+
/** Compatibility max-width override. */
|
|
14
|
+
maxWidth?: LayoutResponsive<string>;
|
|
15
|
+
/** Compatibility horizontal padding override. */
|
|
16
|
+
padding?: LayoutResponsive<string | number>;
|
|
17
|
+
children?: unknown;
|
|
18
|
+
};
|
|
19
|
+
export type ContainerNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & ContainerOwnProps & {
|
|
20
|
+
asChild?: false;
|
|
21
|
+
ref?: Ref<HTMLDivElement>;
|
|
22
|
+
};
|
|
23
|
+
export type ContainerAsChildProps = ContainerOwnProps & {
|
|
24
|
+
asChild: true;
|
|
25
|
+
children: JSXElement;
|
|
26
|
+
ref?: Ref<unknown>;
|
|
27
|
+
style?: JSX.IntrinsicElements["div"]["style"];
|
|
28
|
+
};
|
|
29
|
+
export type ContainerProps = ContainerNativeProps | ContainerAsChildProps;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type EmptyStateHeadingTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
2
|
+
export type EmptyStateProps = Omit<JSX.IntrinsicElements["div"], "children"> & {
|
|
3
|
+
icon?: unknown;
|
|
4
|
+
title?: unknown;
|
|
5
|
+
titleAs?: EmptyStateHeadingTag;
|
|
6
|
+
description?: unknown;
|
|
7
|
+
actions?: unknown;
|
|
8
|
+
children?: unknown;
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const FLEX_A11Y_CONTRACT: {
|
|
2
|
+
readonly DATA_ATTRIBUTES: {
|
|
3
|
+
readonly slot: "data-slot";
|
|
4
|
+
readonly layout: "data-ak-layout";
|
|
5
|
+
readonly direction: "data-direction";
|
|
6
|
+
readonly gap: "data-gap";
|
|
7
|
+
readonly gapX: "data-gap-x";
|
|
8
|
+
readonly gapY: "data-gap-y";
|
|
9
|
+
readonly align: "data-align";
|
|
10
|
+
readonly justify: "data-justify";
|
|
11
|
+
readonly wrap: "data-wrap";
|
|
12
|
+
readonly collapseBelow: "data-collapse-below";
|
|
13
|
+
};
|
|
14
|
+
readonly SLOT_VALUES: {
|
|
15
|
+
readonly root: "flex";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type FlexA11yContract = typeof FLEX_A11Y_CONTRACT;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FlexAsChildProps, FlexDivProps, FlexSpanProps } from "./flex.types";
|
|
2
|
+
export declare function Flex(props: FlexDivProps): JSX.Element;
|
|
3
|
+
export declare function Flex(props: FlexSpanProps): JSX.Element;
|
|
4
|
+
export declare function Flex(props: FlexAsChildProps): JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
|
|
3
|
+
export type FlexOwnProps = BoxLayoutOwnProps & {
|
|
4
|
+
direction?: LayoutResponsive<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
5
|
+
gap?: LayoutResponsive<string | number>;
|
|
6
|
+
gapX?: LayoutResponsive<string | number>;
|
|
7
|
+
gapY?: LayoutResponsive<string | number>;
|
|
8
|
+
align?: LayoutResponsive<string>;
|
|
9
|
+
justify?: LayoutResponsive<string>;
|
|
10
|
+
wrap?: LayoutResponsive<"wrap" | "nowrap" | "wrap-reverse">;
|
|
11
|
+
/**
|
|
12
|
+
* Compatibility breakpoint helper. Prefer responsive `direction` instead.
|
|
13
|
+
*/
|
|
14
|
+
collapseBelow?: string;
|
|
15
|
+
as?: "div" | "span";
|
|
16
|
+
children?: unknown;
|
|
17
|
+
};
|
|
18
|
+
export type FlexNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & FlexOwnProps & {
|
|
19
|
+
as?: "div";
|
|
20
|
+
asChild?: false;
|
|
21
|
+
ref?: Ref<HTMLDivElement>;
|
|
22
|
+
};
|
|
23
|
+
export type FlexSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & FlexOwnProps & {
|
|
24
|
+
as: "span";
|
|
25
|
+
asChild?: false;
|
|
26
|
+
ref?: Ref<HTMLSpanElement>;
|
|
27
|
+
};
|
|
28
|
+
export type FlexAsChildProps = Omit<FlexOwnProps, "as"> & {
|
|
29
|
+
asChild: true;
|
|
30
|
+
children: JSXElement;
|
|
31
|
+
ref?: Ref<unknown>;
|
|
32
|
+
style?: JSX.IntrinsicElements["div"]["style"];
|
|
33
|
+
};
|
|
34
|
+
export type FlexDivProps = FlexNativeProps;
|
|
35
|
+
export type FlexProps = FlexDivProps | FlexSpanProps | FlexAsChildProps;
|
|
36
|
+
export type InlineOwnProps = FlexOwnProps;
|
|
37
|
+
export type InlineNativeProps = FlexNativeProps;
|
|
38
|
+
export type InlineDivProps = FlexDivProps;
|
|
39
|
+
export type InlineSpanProps = FlexSpanProps;
|
|
40
|
+
export type InlineAsChildProps = FlexAsChildProps;
|
|
41
|
+
export type InlineProps = FlexProps;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Flex } from "./flex";
|
|
2
|
+
export { FLEX_A11Y_CONTRACT, type FlexA11yContract } from "./flex.a11y";
|
|
3
|
+
export type { FlexProps, FlexOwnProps, FlexNativeProps, FlexDivProps, FlexSpanProps, FlexAsChildProps, InlineProps, InlineOwnProps, InlineNativeProps, InlineDivProps, InlineSpanProps, InlineAsChildProps, } from "./flex.types";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const GRID_A11Y_CONTRACT: {
|
|
2
|
+
readonly DATA_ATTRIBUTES: {
|
|
3
|
+
readonly slot: "data-slot";
|
|
4
|
+
readonly layout: "data-ak-layout";
|
|
5
|
+
readonly areas: "data-areas";
|
|
6
|
+
readonly columns: "data-columns";
|
|
7
|
+
readonly rows: "data-rows";
|
|
8
|
+
readonly flow: "data-flow";
|
|
9
|
+
readonly minItemWidth: "data-min-item-width";
|
|
10
|
+
readonly gap: "data-gap";
|
|
11
|
+
readonly gapX: "data-gap-x";
|
|
12
|
+
readonly gapY: "data-gap-y";
|
|
13
|
+
readonly autoFit: "data-auto-fit";
|
|
14
|
+
readonly align: "data-align";
|
|
15
|
+
readonly justify: "data-justify";
|
|
16
|
+
};
|
|
17
|
+
readonly SLOT_VALUES: {
|
|
18
|
+
readonly root: "grid";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type GridA11yContract = typeof GRID_A11Y_CONTRACT;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GridAsChildProps, GridDivProps, GridSpanProps } from "./grid.types";
|
|
2
|
+
export declare function Grid(props: GridDivProps): JSX.Element;
|
|
3
|
+
export declare function Grid(props: GridSpanProps): JSX.Element;
|
|
4
|
+
export declare function Grid(props: GridAsChildProps): JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { JSXElement, Ref } from "@askrjs/askr/foundations";
|
|
2
|
+
import type { BoxLayoutOwnProps, LayoutResponsive } from "../box/box.types";
|
|
3
|
+
export type GridOwnProps = BoxLayoutOwnProps & {
|
|
4
|
+
areas?: LayoutResponsive<string>;
|
|
5
|
+
columns?: LayoutResponsive<number | string>;
|
|
6
|
+
rows?: LayoutResponsive<number | string>;
|
|
7
|
+
flow?: LayoutResponsive<string>;
|
|
8
|
+
gap?: LayoutResponsive<string | number>;
|
|
9
|
+
gapX?: LayoutResponsive<string | number>;
|
|
10
|
+
gapY?: LayoutResponsive<string | number>;
|
|
11
|
+
align?: LayoutResponsive<string>;
|
|
12
|
+
justify?: LayoutResponsive<string>;
|
|
13
|
+
/** Compatibility helper for auto-fit grids. */
|
|
14
|
+
minItemWidth?: string;
|
|
15
|
+
/** Compatibility helper for auto-fit grids. */
|
|
16
|
+
autoFit?: boolean;
|
|
17
|
+
as?: "div" | "span";
|
|
18
|
+
children?: unknown;
|
|
19
|
+
};
|
|
20
|
+
export type GridNativeProps = Omit<JSX.IntrinsicElements["div"], "children" | "ref"> & GridOwnProps & {
|
|
21
|
+
as?: "div";
|
|
22
|
+
asChild?: false;
|
|
23
|
+
ref?: Ref<HTMLDivElement>;
|
|
24
|
+
};
|
|
25
|
+
export type GridSpanProps = Omit<JSX.IntrinsicElements["span"], "children" | "ref"> & GridOwnProps & {
|
|
26
|
+
as: "span";
|
|
27
|
+
asChild?: false;
|
|
28
|
+
ref?: Ref<HTMLSpanElement>;
|
|
29
|
+
};
|
|
30
|
+
export type GridAsChildProps = Omit<GridOwnProps, "as"> & {
|
|
31
|
+
asChild: true;
|
|
32
|
+
children: JSXElement;
|
|
33
|
+
ref?: Ref<unknown>;
|
|
34
|
+
style?: JSX.IntrinsicElements["div"]["style"];
|
|
35
|
+
};
|
|
36
|
+
export type GridDivProps = GridNativeProps;
|
|
37
|
+
export type GridProps = GridDivProps | GridSpanProps | GridAsChildProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const HEADER_A11Y_CONTRACT: {
|
|
2
|
+
readonly DATA_ATTRIBUTES: {
|
|
3
|
+
readonly slot: "data-slot";
|
|
4
|
+
readonly position: "data-position";
|
|
5
|
+
};
|
|
6
|
+
readonly SLOT_VALUES: {
|
|
7
|
+
readonly root: "header";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type HeaderA11yContract = typeof HEADER_A11Y_CONTRACT;
|