asheeui 0.7.0 → 1.1.0
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 +61 -166
- package/dist/AsheeUIProvider.d.ts.map +1 -1
- package/dist/AsheeUIProvider.js +22 -15
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +9 -7
- package/dist/components/alert/Alert.d.ts +88 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +61 -0
- package/dist/components/alert/alert-config.d.ts +56 -0
- package/dist/components/alert/alert-config.d.ts.map +1 -0
- package/dist/components/alert/alert-config.js +14 -0
- package/dist/components/alert/alert-styles.d.ts +32 -0
- package/dist/components/alert/alert-styles.d.ts.map +1 -0
- package/dist/components/alert/alert-styles.js +20 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/auth-layout/AuthLayout.d.ts +79 -0
- package/dist/components/auth-layout/AuthLayout.d.ts.map +1 -0
- package/dist/components/auth-layout/AuthLayout.js +54 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts +41 -0
- package/dist/components/auth-layout/auth-layout-config.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-config.js +18 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts +25 -0
- package/dist/components/auth-layout/auth-layout-styles.d.ts.map +1 -0
- package/dist/components/auth-layout/auth-layout-styles.js +11 -0
- package/dist/components/auth-layout/index.d.ts +3 -0
- package/dist/components/auth-layout/index.d.ts.map +1 -0
- package/dist/components/auth-layout/index.js +3 -0
- package/dist/components/autocomplete/Autocomplete.d.ts +6 -6
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +94 -58
- package/dist/components/autocomplete/autocomplete-config.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +87 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +43 -0
- package/dist/components/avatar/avatar-config.d.ts +48 -0
- package/dist/components/avatar/avatar-config.d.ts.map +1 -0
- package/dist/components/avatar/avatar-config.js +14 -0
- package/dist/components/avatar/avatar-styles.d.ts +21 -0
- package/dist/components/avatar/avatar-styles.d.ts.map +1 -0
- package/dist/components/avatar/avatar-styles.js +13 -0
- package/dist/components/avatar/avatar.helpers.d.ts +19 -0
- package/dist/components/avatar/avatar.helpers.d.ts.map +1 -0
- package/dist/components/avatar/avatar.helpers.js +11 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +4 -0
- package/dist/components/badge/Badge.d.ts +69 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +39 -0
- package/dist/components/badge/badge-config.d.ts +63 -0
- package/dist/components/badge/badge-config.d.ts.map +1 -0
- package/dist/components/badge/badge-config.js +15 -0
- package/dist/components/badge/badge-styles.d.ts +27 -0
- package/dist/components/badge/badge-styles.d.ts.map +1 -0
- package/dist/components/badge/badge-styles.js +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +106 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +52 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-config.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-config.js +10 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-styles.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb-styles.js +17 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +3 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +10 -7
- package/dist/components/{date-picker/DatePicker.d.ts → calendar/Calendar.d.ts} +21 -21
- package/dist/components/calendar/Calendar.d.ts.map +1 -0
- package/dist/components/{date-picker/DatePicker.js → calendar/Calendar.js} +12 -12
- package/dist/components/{date-picker/Calendar.d.ts → calendar/DateGrid.d.ts} +7 -7
- package/dist/components/calendar/DateGrid.d.ts.map +1 -0
- package/dist/components/calendar/DateGrid.js +194 -0
- package/dist/components/calendar/TimeSpinner.d.ts.map +1 -0
- package/dist/components/{date-picker → calendar}/TimeSpinner.js +3 -3
- package/dist/components/{date-picker/date-picker-config.d.ts → calendar/calendar-config.d.ts} +17 -17
- package/dist/components/calendar/calendar-config.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-config.js → calendar/calendar-config.js} +3 -3
- package/dist/components/{date-picker/date-picker-styles.d.ts → calendar/calendar-styles.d.ts} +1 -1
- package/dist/components/calendar/calendar-styles.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker-styles.js → calendar/calendar-styles.js} +1 -1
- package/dist/components/{date-picker/date-picker.helpers.d.ts → calendar/calendar.helpers.d.ts} +9 -9
- package/dist/components/calendar/calendar.helpers.d.ts.map +1 -0
- package/dist/components/{date-picker/date-picker.helpers.js → calendar/calendar.helpers.js} +4 -4
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +6 -0
- package/dist/components/card/Card.d.ts +6 -6
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +8 -8
- package/dist/components/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.js +85 -83
- package/dist/components/carousel/carousel-styles.d.ts +1 -20
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +5 -5
- package/dist/components/clipboard/Clipboard.d.ts +75 -0
- package/dist/components/clipboard/Clipboard.d.ts.map +1 -0
- package/dist/components/clipboard/Clipboard.js +53 -0
- package/dist/components/clipboard/CopyButton.d.ts +64 -0
- package/dist/components/clipboard/CopyButton.d.ts.map +1 -0
- package/dist/components/clipboard/CopyButton.js +44 -0
- package/dist/components/clipboard/clipboard-config.d.ts +42 -0
- package/dist/components/clipboard/clipboard-config.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-config.js +23 -0
- package/dist/components/clipboard/clipboard-styles.d.ts +11 -0
- package/dist/components/clipboard/clipboard-styles.d.ts.map +1 -0
- package/dist/components/clipboard/clipboard-styles.js +5 -0
- package/dist/components/clipboard/index.d.ts +4 -0
- package/dist/components/clipboard/index.d.ts.map +1 -0
- package/dist/components/clipboard/index.js +4 -0
- package/dist/components/container/Container.d.ts +51 -0
- package/dist/components/container/Container.d.ts.map +1 -0
- package/dist/components/container/Container.js +21 -0
- package/dist/components/container/container-config.d.ts +61 -0
- package/dist/components/container/container-config.d.ts.map +1 -0
- package/dist/components/container/container-config.js +16 -0
- package/dist/components/container/container-styles.d.ts +18 -0
- package/dist/components/container/container-styles.d.ts.map +1 -0
- package/dist/components/container/container-styles.js +12 -0
- package/dist/components/container/index.d.ts +3 -0
- package/dist/components/container/index.d.ts.map +1 -0
- package/dist/components/container/index.js +3 -0
- package/dist/components/cta/CTA.d.ts +81 -0
- package/dist/components/cta/CTA.d.ts.map +1 -0
- package/dist/components/cta/CTA.js +60 -0
- package/dist/components/cta/cta-config.d.ts +69 -0
- package/dist/components/cta/cta-config.d.ts.map +1 -0
- package/dist/components/cta/cta-config.js +22 -0
- package/dist/components/cta/cta-styles.d.ts +8 -0
- package/dist/components/cta/cta-styles.d.ts.map +1 -0
- package/dist/components/cta/cta-styles.js +9 -0
- package/dist/components/cta/index.d.ts +3 -0
- package/dist/components/cta/index.d.ts.map +1 -0
- package/dist/components/cta/index.js +3 -0
- package/dist/components/drawer/Drawer.d.ts +8 -4
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +54 -38
- package/dist/components/{select/Select.d.ts → dropmenu/Dropmenu.d.ts} +21 -21
- package/dist/components/{select/Select.d.ts.map → dropmenu/Dropmenu.d.ts.map} +1 -1
- package/dist/components/dropmenu/Dropmenu.js +102 -0
- package/dist/components/{select/select-config.d.ts → dropmenu/dropmenu-config.d.ts} +8 -8
- package/dist/components/dropmenu/dropmenu-config.d.ts.map +1 -0
- package/dist/components/{select/select-config.js → dropmenu/dropmenu-config.js} +3 -3
- package/dist/components/{select/select-styles.d.ts → dropmenu/dropmenu-styles.d.ts} +1 -1
- package/dist/components/dropmenu/dropmenu-styles.d.ts.map +1 -0
- package/dist/components/{select/select-styles.js → dropmenu/dropmenu-styles.js} +1 -1
- package/dist/components/dropmenu/index.d.ts +3 -0
- package/dist/components/dropmenu/index.d.ts.map +1 -0
- package/dist/components/dropmenu/index.js +3 -0
- package/dist/components/empty-state/EmptyState.d.ts +77 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +46 -0
- package/dist/components/empty-state/empty-state-config.d.ts +44 -0
- package/dist/components/empty-state/empty-state-config.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-config.js +16 -0
- package/dist/components/empty-state/empty-state-styles.d.ts +13 -0
- package/dist/components/empty-state/empty-state-styles.d.ts.map +1 -0
- package/dist/components/empty-state/empty-state-styles.js +18 -0
- package/dist/components/empty-state/index.d.ts +3 -0
- package/dist/components/empty-state/index.d.ts.map +1 -0
- package/dist/components/empty-state/index.js +3 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts +107 -0
- package/dist/components/feature-grid/FeatureGrid.d.ts.map +1 -0
- package/dist/components/feature-grid/FeatureGrid.js +94 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts +80 -0
- package/dist/components/feature-grid/feature-grid-config.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-config.js +28 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts +11 -0
- package/dist/components/feature-grid/feature-grid-styles.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid-styles.js +5 -0
- package/dist/components/feature-grid/index.d.ts +3 -0
- package/dist/components/feature-grid/index.d.ts.map +1 -0
- package/dist/components/feature-grid/index.js +3 -0
- package/dist/components/field/FieldShell.d.ts +13 -1
- package/dist/components/field/FieldShell.d.ts.map +1 -1
- package/dist/components/field/FieldShell.js +16 -15
- package/dist/components/footer/Footer.d.ts +73 -0
- package/dist/components/footer/Footer.d.ts.map +1 -0
- package/dist/components/footer/Footer.js +112 -0
- package/dist/components/footer/footer-config.d.ts +40 -0
- package/dist/components/footer/footer-config.d.ts.map +1 -0
- package/dist/components/footer/footer-config.js +18 -0
- package/dist/components/footer/footer-styles.d.ts +22 -0
- package/dist/components/footer/footer-styles.d.ts.map +1 -0
- package/dist/components/footer/footer-styles.js +9 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/footer/index.d.ts.map +1 -0
- package/dist/components/footer/index.js +3 -0
- package/dist/components/form/Form.d.ts +109 -0
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +42 -0
- package/dist/components/form/form-config.d.ts +57 -0
- package/dist/components/form/form-config.d.ts.map +1 -0
- package/dist/components/form/form-config.js +12 -0
- package/dist/components/form/form-styles.d.ts +27 -0
- package/dist/components/form/form-styles.d.ts.map +1 -0
- package/dist/components/form/form-styles.js +5 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -0
- package/dist/components/form/index.js +3 -0
- package/dist/components/grid/Grid.d.ts +71 -0
- package/dist/components/grid/Grid.d.ts.map +1 -0
- package/dist/components/grid/Grid.js +23 -0
- package/dist/components/grid/grid-config.d.ts +63 -0
- package/dist/components/grid/grid-config.d.ts.map +1 -0
- package/dist/components/grid/grid-config.js +16 -0
- package/dist/components/grid/grid-styles.d.ts +12 -0
- package/dist/components/grid/grid-styles.d.ts.map +1 -0
- package/dist/components/grid/grid-styles.js +31 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.d.ts.map +1 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/hero/Hero.d.ts +90 -0
- package/dist/components/hero/Hero.d.ts.map +1 -0
- package/dist/components/hero/Hero.js +63 -0
- package/dist/components/hero/hero-config.d.ts +71 -0
- package/dist/components/hero/hero-config.d.ts.map +1 -0
- package/dist/components/hero/hero-config.js +22 -0
- package/dist/components/hero/hero-styles.d.ts +19 -0
- package/dist/components/hero/hero-styles.d.ts.map +1 -0
- package/dist/components/hero/hero-styles.js +5 -0
- package/dist/components/hero/index.d.ts +3 -0
- package/dist/components/hero/index.d.ts.map +1 -0
- package/dist/components/hero/index.js +3 -0
- package/dist/components/image/Image.d.ts +4 -5
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +5 -5
- package/dist/components/input/Input.js +5 -5
- package/dist/components/link/Link.d.ts +12 -10
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/marquee/Marquee.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.js +36 -33
- package/dist/components/{select-menu/SelectMenu.d.ts → menu/Menu.d.ts} +52 -19
- package/dist/components/menu/Menu.d.ts.map +1 -0
- package/dist/components/menu/Menu.js +161 -0
- package/dist/components/menu/index.d.ts +5 -0
- package/dist/components/menu/index.d.ts.map +1 -0
- package/dist/components/menu/index.js +4 -0
- package/dist/components/{select-menu/select-menu-config.d.ts → menu/menu-config.d.ts} +5 -5
- package/dist/components/menu/menu-config.d.ts.map +1 -0
- package/dist/components/{select-menu/select-menu-config.js → menu/menu-config.js} +2 -2
- package/dist/components/menu/menu-navigation.d.ts +38 -0
- package/dist/components/menu/menu-navigation.d.ts.map +1 -0
- package/dist/components/menu/menu-navigation.js +20 -0
- package/dist/components/{select-menu/use-select-floating.d.ts → menu/use-menu-floating.d.ts} +10 -10
- package/dist/components/menu/use-menu-floating.d.ts.map +1 -0
- package/dist/components/{select-menu/use-select-floating.js → menu/use-menu-floating.js} +2 -2
- package/dist/components/modal/Modal.d.ts +6 -1
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +62 -45
- package/dist/components/multi-select/MultiSelect.d.ts +11 -10
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +99 -86
- package/dist/components/multi-select/multi-select-config.d.ts +1 -1
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/navbar/Navbar.d.ts +87 -0
- package/dist/components/navbar/Navbar.d.ts.map +1 -0
- package/dist/components/navbar/Navbar.js +117 -0
- package/dist/components/navbar/index.d.ts +3 -0
- package/dist/components/navbar/index.d.ts.map +1 -0
- package/dist/components/navbar/index.js +3 -0
- package/dist/components/navbar/navbar-config.d.ts +52 -0
- package/dist/components/navbar/navbar-config.d.ts.map +1 -0
- package/dist/components/navbar/navbar-config.js +20 -0
- package/dist/components/navbar/navbar-styles.d.ts +28 -0
- package/dist/components/navbar/navbar-styles.d.ts.map +1 -0
- package/dist/components/navbar/navbar-styles.js +9 -0
- package/dist/components/page/Page.d.ts +166 -0
- package/dist/components/page/Page.d.ts.map +1 -0
- package/dist/components/page/Page.js +90 -0
- package/dist/components/page/index.d.ts +3 -0
- package/dist/components/page/index.d.ts.map +1 -0
- package/dist/components/page/index.js +3 -0
- package/dist/components/page/page-config.d.ts +57 -0
- package/dist/components/page/page-config.d.ts.map +1 -0
- package/dist/components/page/page-config.js +20 -0
- package/dist/components/page/page-styles.d.ts +25 -0
- package/dist/components/page/page-styles.d.ts.map +1 -0
- package/dist/components/page/page-styles.js +5 -0
- package/dist/components/pagination/Pagination.d.ts +91 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.js +66 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/pagination/pagination-config.d.ts +66 -0
- package/dist/components/pagination/pagination-config.d.ts.map +1 -0
- package/dist/components/pagination/pagination-config.js +19 -0
- package/dist/components/pagination/pagination-styles.d.ts +19 -0
- package/dist/components/pagination/pagination-styles.d.ts.map +1 -0
- package/dist/components/pagination/pagination-styles.js +5 -0
- package/dist/components/pagination/pagination.helpers.d.ts +26 -0
- package/dist/components/pagination/pagination.helpers.d.ts.map +1 -0
- package/dist/components/pagination/pagination.helpers.js +12 -0
- package/dist/components/pin-input/PinInput.d.ts +109 -0
- package/dist/components/pin-input/PinInput.d.ts.map +1 -0
- package/dist/components/pin-input/PinInput.js +124 -0
- package/dist/components/pin-input/index.d.ts +3 -0
- package/dist/components/pin-input/index.d.ts.map +1 -0
- package/dist/components/pin-input/index.js +3 -0
- package/dist/components/pin-input/pin-input-config.d.ts +82 -0
- package/dist/components/pin-input/pin-input-config.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-config.js +23 -0
- package/dist/components/pin-input/pin-input-styles.d.ts +16 -0
- package/dist/components/pin-input/pin-input-styles.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input-styles.js +9 -0
- package/dist/components/pricing-card/PricingCard.d.ts +87 -0
- package/dist/components/pricing-card/PricingCard.d.ts.map +1 -0
- package/dist/components/pricing-card/PricingCard.js +79 -0
- package/dist/components/pricing-card/index.d.ts +3 -0
- package/dist/components/pricing-card/index.d.ts.map +1 -0
- package/dist/components/pricing-card/index.js +3 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts +35 -0
- package/dist/components/pricing-card/pricing-card-config.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-config.js +16 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts +21 -0
- package/dist/components/pricing-card/pricing-card-styles.d.ts.map +1 -0
- package/dist/components/pricing-card/pricing-card-styles.js +5 -0
- package/dist/components/radio/Radio.d.ts +53 -107
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +50 -36
- package/dist/components/radio/RadioGroup.d.ts +107 -53
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +43 -49
- package/dist/components/radio/index.d.ts +0 -1
- package/dist/components/radio/index.d.ts.map +1 -1
- package/dist/components/resizable-screen/ResizableScreen.d.ts +4 -4
- package/dist/components/scrollbar/index.js +1 -0
- package/dist/components/scrollbar/scrollbar-config.js +13 -0
- package/dist/components/section/Section.d.ts +56 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +27 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/index.d.ts.map +1 -0
- package/dist/components/section/index.js +3 -0
- package/dist/components/section/section-config.d.ts +64 -0
- package/dist/components/section/section-config.d.ts.map +1 -0
- package/dist/components/section/section-config.js +20 -0
- package/dist/components/section/section-styles.d.ts +8 -0
- package/dist/components/section/section-styles.d.ts.map +1 -0
- package/dist/components/section/section-styles.js +9 -0
- package/dist/components/section-kit/ActionGroup.d.ts +47 -0
- package/dist/components/section-kit/ActionGroup.d.ts.map +1 -0
- package/dist/components/section-kit/ActionGroup.js +35 -0
- package/dist/components/section-kit/SectionHeading.d.ts +65 -0
- package/dist/components/section-kit/SectionHeading.d.ts.map +1 -0
- package/dist/components/section-kit/SectionHeading.js +34 -0
- package/dist/components/section-kit/index.d.ts +12 -0
- package/dist/components/section-kit/index.d.ts.map +1 -0
- package/dist/components/section-kit/index.js +2 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +92 -90
- package/dist/components/sidebar-layout/SidebarLayout.d.ts +67 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -0
- package/dist/components/sidebar-layout/SidebarLayout.js +40 -0
- package/dist/components/sidebar-layout/index.d.ts +3 -0
- package/dist/components/sidebar-layout/index.d.ts.map +1 -0
- package/dist/components/sidebar-layout/index.js +3 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts +49 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-config.js +16 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +21 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -0
- package/dist/components/sidebar-layout/sidebar-layout-styles.js +9 -0
- package/dist/components/skeleton/Skeleton.d.ts +65 -0
- package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/Skeleton.js +29 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.d.ts.map +1 -0
- package/dist/components/skeleton/index.js +3 -0
- package/dist/components/skeleton/skeleton-config.d.ts +40 -0
- package/dist/components/skeleton/skeleton-config.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-config.js +13 -0
- package/dist/components/skeleton/skeleton-styles.d.ts +19 -0
- package/dist/components/skeleton/skeleton-styles.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton-styles.js +5 -0
- package/dist/components/stack/Stack.d.ts +107 -0
- package/dist/components/stack/Stack.d.ts.map +1 -0
- package/dist/components/stack/Stack.js +36 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.d.ts.map +1 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack-config.d.ts +68 -0
- package/dist/components/stack/stack-config.d.ts.map +1 -0
- package/dist/components/stack/stack-config.js +20 -0
- package/dist/components/stack/stack-styles.d.ts +10 -0
- package/dist/components/stack/stack-styles.d.ts.map +1 -0
- package/dist/components/stack/stack-styles.js +21 -0
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +7 -5
- package/dist/components/table/Table.js +3 -3
- package/dist/components/tabs/Tabs.js +3 -3
- package/dist/components/testimonials/Testimonials.d.ts +78 -0
- package/dist/components/testimonials/Testimonials.d.ts.map +1 -0
- package/dist/components/testimonials/Testimonials.js +96 -0
- package/dist/components/testimonials/index.d.ts +3 -0
- package/dist/components/testimonials/index.d.ts.map +1 -0
- package/dist/components/testimonials/index.js +3 -0
- package/dist/components/testimonials/testimonials-config.d.ts +44 -0
- package/dist/components/testimonials/testimonials-config.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-config.js +28 -0
- package/dist/components/testimonials/testimonials-styles.d.ts +11 -0
- package/dist/components/testimonials/testimonials-styles.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials-styles.js +5 -0
- package/dist/components/textarea/Textarea.d.ts +10 -10
- package/dist/components/textarea/Textarea.js +7 -7
- package/dist/components/textarea/textarea-config.d.ts +2 -2
- package/dist/components/toast/ToastItem.d.ts.map +1 -1
- package/dist/components/toast/ToastItem.js +8 -7
- package/dist/components/tooltip/Tooltip.js +5 -5
- package/dist/components/typography/Typography.d.ts +60 -0
- package/dist/components/typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/Typography.js +28 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.d.ts.map +1 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/typography-config.d.ts +54 -0
- package/dist/components/typography/typography-config.d.ts.map +1 -0
- package/dist/components/typography/typography-config.js +12 -0
- package/dist/components/typography/typography-styles.d.ts +21 -0
- package/dist/components/typography/typography-styles.d.ts.map +1 -0
- package/dist/components/typography/typography-styles.js +19 -0
- package/dist/config/default-config.d.ts.map +1 -1
- package/dist/config/default-config.js +2 -2
- package/dist/config/index.js +1 -0
- package/dist/config/validate-config.d.ts +34 -0
- package/dist/config/validate-config.d.ts.map +1 -0
- package/dist/config/validate-config.js +190 -0
- package/dist/icons/CopyIcon.d.ts +3 -0
- package/dist/icons/CopyIcon.d.ts.map +1 -0
- package/dist/icons/CopyIcon.js +24 -0
- package/dist/index.d.ts +33 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -61
- package/dist/libs/index.js +3 -0
- package/dist/libs/use-body-scroll-lock.d.ts +21 -0
- package/dist/libs/use-body-scroll-lock.d.ts.map +1 -0
- package/dist/libs/use-body-scroll-lock.js +27 -0
- package/dist/libs/use-dialog-overlay.d.ts +21 -0
- package/dist/libs/use-dialog-overlay.d.ts.map +1 -0
- package/dist/libs/use-dialog-overlay.js +21 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts +23 -0
- package/dist/libs/use-prefers-reduced-motion.d.ts.map +1 -0
- package/dist/libs/use-prefers-reduced-motion.js +19 -0
- package/dist/puck/adapters.d.ts +41 -0
- package/dist/puck/adapters.d.ts.map +1 -0
- package/dist/puck/adapters.js +30 -0
- package/dist/puck/blocks/content.d.ts +32 -0
- package/dist/puck/blocks/content.d.ts.map +1 -0
- package/dist/puck/blocks/content.js +54 -0
- package/dist/puck/blocks/layout.d.ts +44 -0
- package/dist/puck/blocks/layout.d.ts.map +1 -0
- package/dist/puck/blocks/layout.js +69 -0
- package/dist/puck/blocks/navigation.d.ts +66 -0
- package/dist/puck/blocks/navigation.d.ts.map +1 -0
- package/dist/puck/blocks/navigation.js +122 -0
- package/dist/puck/blocks/sections.d.ts +134 -0
- package/dist/puck/blocks/sections.d.ts.map +1 -0
- package/dist/puck/blocks/sections.js +232 -0
- package/dist/puck/blocks/utility.d.ts +22 -0
- package/dist/puck/blocks/utility.d.ts.map +1 -0
- package/dist/puck/blocks/utility.js +49 -0
- package/dist/puck/config.d.ts +63 -0
- package/dist/puck/config.d.ts.map +1 -0
- package/dist/puck/config.js +79 -0
- package/dist/puck/fields.d.ts +94 -0
- package/dist/puck/fields.d.ts.map +1 -0
- package/dist/puck/fields.js +116 -0
- package/dist/puck/index.d.ts +21 -0
- package/dist/puck/index.d.ts.map +1 -0
- package/dist/puck/index.js +10 -0
- package/dist/scripts/AsheeThemeScript.js +43 -8
- package/dist/shared/action.d.ts +52 -0
- package/dist/shared/action.d.ts.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/spacing.d.ts +38 -0
- package/dist/shared/spacing.d.ts.map +1 -0
- package/dist/shared/spacing.js +29 -0
- package/dist/shared/typography.d.ts +81 -0
- package/dist/shared/typography.d.ts.map +1 -0
- package/dist/shared/typography.js +137 -0
- package/dist/utils/resolve-token.d.ts +32 -7
- package/dist/utils/resolve-token.d.ts.map +1 -1
- package/dist/utils/resolve-token.js +9 -1
- package/dist/utils/stacking.d.ts +2 -2
- package/dist/utils/stacking.d.ts.map +1 -1
- package/package.json +26 -7
- package/dist/components/date-picker/Calendar.d.ts.map +0 -1
- package/dist/components/date-picker/Calendar.js +0 -143
- package/dist/components/date-picker/DatePicker.d.ts.map +0 -1
- package/dist/components/date-picker/TimeSpinner.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-config.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker-styles.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.helpers.d.ts.map +0 -1
- package/dist/components/date-picker/index.d.ts +0 -3
- package/dist/components/date-picker/index.d.ts.map +0 -1
- package/dist/components/date-picker/index.js +0 -6
- package/dist/components/select/Select.js +0 -98
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js +0 -3
- package/dist/components/select/select-config.d.ts.map +0 -1
- package/dist/components/select/select-styles.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.d.ts.map +0 -1
- package/dist/components/select-menu/SelectMenu.js +0 -104
- package/dist/components/select-menu/index.d.ts +0 -4
- package/dist/components/select-menu/index.d.ts.map +0 -1
- package/dist/components/select-menu/index.js +0 -3
- package/dist/components/select-menu/select-menu-config.d.ts.map +0 -1
- package/dist/components/select-menu/use-select-floating.d.ts.map +0 -1
- /package/dist/components/{date-picker → calendar}/TimeSpinner.d.ts +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
import { Space } from '../../shared';
|
|
3
|
+
import { GridColumns, GridConfig } from './grid-config';
|
|
4
|
+
type BaseGridProps = GridConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Grid component.
|
|
7
|
+
*/
|
|
8
|
+
export interface GridProps extends BaseGridProps {
|
|
9
|
+
/**
|
|
10
|
+
* Element to render.
|
|
11
|
+
* Defaults to a `div`. A grid whose cells are list items should render `ul`
|
|
12
|
+
* and receive `li` children.
|
|
13
|
+
*
|
|
14
|
+
* @default "div"
|
|
15
|
+
*/
|
|
16
|
+
as?: ElementType;
|
|
17
|
+
/**
|
|
18
|
+
* Column count from the smallest viewport upwards.
|
|
19
|
+
* Resolved through the standard cascade: prop, then
|
|
20
|
+
* `components.grid.columns`, then the framework fallback of a single column.
|
|
21
|
+
*
|
|
22
|
+
* @default 1
|
|
23
|
+
*/
|
|
24
|
+
columns?: GridColumns;
|
|
25
|
+
/**
|
|
26
|
+
* Column count from the `md` breakpoint upwards.
|
|
27
|
+
*/
|
|
28
|
+
columnsMd?: GridColumns;
|
|
29
|
+
/**
|
|
30
|
+
* Column count from the `lg` breakpoint upwards.
|
|
31
|
+
*/
|
|
32
|
+
columnsLg?: GridColumns;
|
|
33
|
+
/**
|
|
34
|
+
* Space between cells, from the shared spacing scale.
|
|
35
|
+
*
|
|
36
|
+
* @default "md"
|
|
37
|
+
*/
|
|
38
|
+
gap?: Space;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A responsive column grid.
|
|
42
|
+
*
|
|
43
|
+
* Grid states its column count per breakpoint rather than as a single number, so
|
|
44
|
+
* a deck of cards is one column on a phone, two on a tablet and three on a
|
|
45
|
+
* desktop without writing media queries by hand. A column count left undefined
|
|
46
|
+
* inherits the value of the next smaller breakpoint through the cascade, so a
|
|
47
|
+
* grid that never changes shape only has to state `columns`.
|
|
48
|
+
*
|
|
49
|
+
* @param props - Grid configuration options and element attributes.
|
|
50
|
+
* @param props.columns - Columns from the smallest viewport. Defaults to 1.
|
|
51
|
+
* @param props.columnsMd - Columns from `md` upwards.
|
|
52
|
+
* @param props.columnsLg - Columns from `lg` upwards.
|
|
53
|
+
* @param props.gap - Space between cells. Defaults to "md".
|
|
54
|
+
* @param props.align - Cross-axis alignment. Defaults to "stretch".
|
|
55
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
56
|
+
* @returns The rendered grid.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Grid columns={1} columnsMd={2} columnsLg={3} gap="lg">
|
|
61
|
+
* <Card title="Inbox" description="12 unread" />
|
|
62
|
+
* <Card title="Sent" description="348 this month" />
|
|
63
|
+
* <Card title="Drafts" description="3 unfinished" />
|
|
64
|
+
* </Grid>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @see Stack - The one-axis equivalent.
|
|
68
|
+
*/
|
|
69
|
+
export declare const Grid: import('react').ForwardRefExoticComponent<GridProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=Grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/components/grid/Grid.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,KAAK,WAAW,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAG3D,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AASvB,KAAK,aAAa,GAAG,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;;;;;OAMG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;CACb;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,IAAI,sGA+DhB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { SPACE_GAP_CLASS as t } from "../../shared/spacing.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { resolveCascade as r } from "../../utils/resolve-token.js";
|
|
7
|
+
import { FALLBACK_GRID_CONFIG as i } from "./grid-config.js";
|
|
8
|
+
import { GRID_ALIGN_CLASS as a, GRID_BASE_CLASS as o, GRID_COLUMNS_CLASS as s, GRID_COLUMNS_LG_CLASS as c, GRID_COLUMNS_MD_CLASS as l } from "./grid-styles.js";
|
|
9
|
+
import { forwardRef as u } from "react";
|
|
10
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/grid/Grid.tsx
|
|
12
|
+
var f = u(({ as: u, columns: f, columnsMd: p, columnsLg: m, gap: h, align: g, className: _, children: v, ...y }, b) => {
|
|
13
|
+
let x = n().components?.grid, S = r(f, x?.columns, void 0, i.columns), C = p ?? x?.columnsMd, w = m ?? x?.columnsLg, T = r(h, x?.gap, void 0, i.gap), E = r(g, x?.align, void 0, i.align);
|
|
14
|
+
return /* @__PURE__ */ d(u ?? "div", {
|
|
15
|
+
ref: b,
|
|
16
|
+
className: e(o, s[S], C !== void 0 && l[C], w !== void 0 && c[w], a[E], t[T], _),
|
|
17
|
+
...y,
|
|
18
|
+
children: v
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
f.displayName = "Grid";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { f as Grid };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Column counts a grid can declare.
|
|
4
|
+
* Only the counts the framework's own layouts use are offered, so the class
|
|
5
|
+
* map stays small and every entry is a complete literal.
|
|
6
|
+
*/
|
|
7
|
+
export type GridColumns = 1 | 2 | 3 | 4 | 6 | 12;
|
|
8
|
+
/**
|
|
9
|
+
* Cross-axis alignment of the grid's items.
|
|
10
|
+
* `stretch` makes every cell fill the row height, which is what a row of cards
|
|
11
|
+
* wants.
|
|
12
|
+
*/
|
|
13
|
+
export type GridAlign = "start" | "center" | "end" | "stretch";
|
|
14
|
+
/**
|
|
15
|
+
* Theme configuration options for the Grid component.
|
|
16
|
+
*
|
|
17
|
+
* Set under `components.grid` in the AsheeUI config. Values feed the
|
|
18
|
+
* component-level fallback tier of the theme cascade.
|
|
19
|
+
*/
|
|
20
|
+
export interface GridConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Column count from the smallest viewport upwards.
|
|
23
|
+
*
|
|
24
|
+
* @default 1
|
|
25
|
+
*/
|
|
26
|
+
columns?: GridColumns;
|
|
27
|
+
/**
|
|
28
|
+
* Column count from the `md` breakpoint upwards.
|
|
29
|
+
*/
|
|
30
|
+
columnsMd?: GridColumns;
|
|
31
|
+
/**
|
|
32
|
+
* Column count from the `lg` breakpoint upwards.
|
|
33
|
+
*/
|
|
34
|
+
columnsLg?: GridColumns;
|
|
35
|
+
/**
|
|
36
|
+
* Space between cells.
|
|
37
|
+
*
|
|
38
|
+
* @default "md"
|
|
39
|
+
*/
|
|
40
|
+
gap?: Space;
|
|
41
|
+
/**
|
|
42
|
+
* Cross-axis alignment of the cells.
|
|
43
|
+
*
|
|
44
|
+
* @default "stretch"
|
|
45
|
+
*/
|
|
46
|
+
align?: GridAlign;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Default config values registered for the Grid component.
|
|
50
|
+
*/
|
|
51
|
+
export declare const defaultGridConfig: GridConfig;
|
|
52
|
+
declare module "../../libs/registry" {
|
|
53
|
+
interface ComponentTypeConfigRegistry {
|
|
54
|
+
grid: GridConfig;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Hard fallback values used when no config tier provides a value.
|
|
59
|
+
* `columnsMd` and `columnsLg` have no fallback on purpose: an unstated
|
|
60
|
+
* breakpoint inherits the value below it rather than forcing a column count.
|
|
61
|
+
*/
|
|
62
|
+
export declare const FALLBACK_GRID_CONFIG: Required<Pick<GridConfig, "columns" | "gap" | "align">>;
|
|
63
|
+
//# sourceMappingURL=grid-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-config.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAI/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CACzC,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC,CAK9C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/grid/grid-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
columns: 1,
|
|
6
|
+
gap: "md",
|
|
7
|
+
align: "stretch"
|
|
8
|
+
};
|
|
9
|
+
e("grid", t);
|
|
10
|
+
var n = {
|
|
11
|
+
columns: 1,
|
|
12
|
+
gap: "md",
|
|
13
|
+
align: "stretch"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_GRID_CONFIG, t as defaultGridConfig };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GridAlign, GridColumns } from './grid-config';
|
|
2
|
+
/** Column classes from the smallest viewport upwards. */
|
|
3
|
+
export declare const GRID_COLUMNS_CLASS: Record<GridColumns, string>;
|
|
4
|
+
/** Column classes from the `md` breakpoint upwards. */
|
|
5
|
+
export declare const GRID_COLUMNS_MD_CLASS: Record<GridColumns, string>;
|
|
6
|
+
/** Column classes from the `lg` breakpoint upwards. */
|
|
7
|
+
export declare const GRID_COLUMNS_LG_CLASS: Record<GridColumns, string>;
|
|
8
|
+
/** Cross-axis alignment classes. */
|
|
9
|
+
export declare const GRID_ALIGN_CLASS: Record<GridAlign, string>;
|
|
10
|
+
/** Shared base classes for every grid. */
|
|
11
|
+
export declare const GRID_BASE_CLASS = "grid w-full min-w-0";
|
|
12
|
+
//# sourceMappingURL=grid-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-styles.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5D,yDAAyD;AACzD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAO1D,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAO7D,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAO7D,CAAC;AAEF,oCAAoC;AACpC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAKtD,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/grid/grid-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
1: "grid-cols-1",
|
|
5
|
+
2: "grid-cols-2",
|
|
6
|
+
3: "grid-cols-3",
|
|
7
|
+
4: "grid-cols-4",
|
|
8
|
+
6: "grid-cols-6",
|
|
9
|
+
12: "grid-cols-12"
|
|
10
|
+
}, t = {
|
|
11
|
+
1: "md:grid-cols-1",
|
|
12
|
+
2: "md:grid-cols-2",
|
|
13
|
+
3: "md:grid-cols-3",
|
|
14
|
+
4: "md:grid-cols-4",
|
|
15
|
+
6: "md:grid-cols-6",
|
|
16
|
+
12: "md:grid-cols-12"
|
|
17
|
+
}, n = {
|
|
18
|
+
1: "lg:grid-cols-1",
|
|
19
|
+
2: "lg:grid-cols-2",
|
|
20
|
+
3: "lg:grid-cols-3",
|
|
21
|
+
4: "lg:grid-cols-4",
|
|
22
|
+
6: "lg:grid-cols-6",
|
|
23
|
+
12: "lg:grid-cols-12"
|
|
24
|
+
}, r = {
|
|
25
|
+
start: "items-start",
|
|
26
|
+
center: "items-center",
|
|
27
|
+
end: "items-end",
|
|
28
|
+
stretch: "items-stretch"
|
|
29
|
+
}, i = "grid w-full min-w-0";
|
|
30
|
+
//#endregion
|
|
31
|
+
export { r as GRID_ALIGN_CLASS, i as GRID_BASE_CLASS, e as GRID_COLUMNS_CLASS, n as GRID_COLUMNS_LG_CLASS, t as GRID_COLUMNS_MD_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ActionConfig } from '../../shared';
|
|
3
|
+
import { HeroConfig } from './hero-config';
|
|
4
|
+
type BaseHeroProps = HeroConfig & Omit<HTMLAttributes<HTMLElement>, "color" | "title">;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Hero component.
|
|
7
|
+
*/
|
|
8
|
+
export interface HeroProps extends BaseHeroProps {
|
|
9
|
+
/**
|
|
10
|
+
* Short label above the title, for example the product category.
|
|
11
|
+
*/
|
|
12
|
+
eyebrow?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The headline.
|
|
15
|
+
*/
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Supporting sentence under the headline.
|
|
19
|
+
*/
|
|
20
|
+
description?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* The emphasised action of the hero.
|
|
23
|
+
*/
|
|
24
|
+
primaryAction?: ActionConfig;
|
|
25
|
+
/**
|
|
26
|
+
* The supporting action of the hero.
|
|
27
|
+
*/
|
|
28
|
+
secondaryAction?: ActionConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Content placed beside the text column from the `lg` breakpoint upwards,
|
|
31
|
+
* typically an illustration or a product screenshot.
|
|
32
|
+
*/
|
|
33
|
+
media?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Element to render the hero band as.
|
|
36
|
+
* Defaults to `section`.
|
|
37
|
+
*
|
|
38
|
+
* @default "section"
|
|
39
|
+
*/
|
|
40
|
+
as?: ElementType;
|
|
41
|
+
/**
|
|
42
|
+
* Content below the actions, for example a row of customer logos.
|
|
43
|
+
*/
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The leading statement of a page.
|
|
48
|
+
*
|
|
49
|
+
* Hero places an eyebrow, a headline, a description and up to two configured
|
|
50
|
+
* actions, with media beside them when the consumer provides any. It stays a
|
|
51
|
+
* single component rather than a set of headline, subtitle and action
|
|
52
|
+
* components, because the arrangement between them is the point.
|
|
53
|
+
*
|
|
54
|
+
* The hero is a `section` landmark and is named by its own heading, so a reader
|
|
55
|
+
* navigating by region hears the headline rather than an unnamed region.
|
|
56
|
+
*
|
|
57
|
+
* @param props - Hero configuration options and element attributes.
|
|
58
|
+
* @param props.title - The headline.
|
|
59
|
+
* @param props.eyebrow - Short label above the headline.
|
|
60
|
+
* @param props.description - Supporting sentence under the headline.
|
|
61
|
+
* @param props.primaryAction - The emphasised action.
|
|
62
|
+
* @param props.secondaryAction - The supporting action.
|
|
63
|
+
* @param props.media - Content beside the text column.
|
|
64
|
+
* @param props.align - Text alignment. Defaults to "start".
|
|
65
|
+
* @param props.spacing - Vertical padding. Defaults to "xl".
|
|
66
|
+
* @param props.background - Background treatment. Defaults to "none".
|
|
67
|
+
* @param props.mediaPosition - Side the media occupies. Defaults to "end".
|
|
68
|
+
* @param props.containerSize - Maximum content width. Defaults to "lg".
|
|
69
|
+
* @param props.contained - Respect the framework's width and gutter.
|
|
70
|
+
* Defaults to true.
|
|
71
|
+
* @param props.as - Element to render. Defaults to "section".
|
|
72
|
+
* @returns The rendered hero.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* <Hero
|
|
77
|
+
* eyebrow="Everything in one place"
|
|
78
|
+
* title="Run your campaigns from a single workspace"
|
|
79
|
+
* description="Messages, templates and results, without switching tools."
|
|
80
|
+
* primaryAction={{ label: "Start free", href: "/signup" }}
|
|
81
|
+
* media={<Image src="/dashboard.png" alt="The campaign dashboard" />}
|
|
82
|
+
* />
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @see Section - The band a hero is built on.
|
|
86
|
+
* @see CTA - The closing band of the same page.
|
|
87
|
+
*/
|
|
88
|
+
export declare const Hero: import('react').ForwardRefExoticComponent<HeroProps & import('react').RefAttributes<HTMLElement>>;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=Hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hero.d.ts","sourceRoot":"","sources":["../../../src/components/hero/Hero.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAUtE,KAAK,aAAa,GAAG,UAAU,GAC7B,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,IAAI,mGAuFhB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
|
+
import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
|
|
6
|
+
import { SectionHeading as r } from "../section-kit/SectionHeading.js";
|
|
7
|
+
import { Container as i } from "../container/Container.js";
|
|
8
|
+
import { Section as a } from "../section/Section.js";
|
|
9
|
+
import { ActionGroup as o } from "../section-kit/ActionGroup.js";
|
|
10
|
+
import { FALLBACK_HERO_CONFIG as s } from "./hero-config.js";
|
|
11
|
+
import { HERO_LAYOUT_CLASS as c, HERO_MEDIA_CLASS as l, HERO_TEXT_COLUMN_CLASS as u } from "./hero-styles.js";
|
|
12
|
+
import { forwardRef as d } from "react";
|
|
13
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
|
+
//#region src/components/hero/Hero.tsx
|
|
15
|
+
var m = d(({ eyebrow: d, title: m, description: h, primaryAction: g, secondaryAction: _, media: v, align: y, spacing: b, background: x, mediaPosition: S, containerSize: C, contained: w, as: T, className: E, children: D, ...O }, k) => {
|
|
16
|
+
let A = t(), j = n({
|
|
17
|
+
align: y,
|
|
18
|
+
spacing: b,
|
|
19
|
+
background: x,
|
|
20
|
+
mediaPosition: S,
|
|
21
|
+
containerSize: C,
|
|
22
|
+
contained: w
|
|
23
|
+
}, A.components?.hero, s), M = j.align === "center", N = /* @__PURE__ */ p("div", {
|
|
24
|
+
className: e(u, M && "items-center text-center", !v && "max-w-2xl"),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ f(r, {
|
|
27
|
+
eyebrow: d,
|
|
28
|
+
title: m,
|
|
29
|
+
description: h,
|
|
30
|
+
align: j.align,
|
|
31
|
+
size: "xl"
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ f(o, {
|
|
34
|
+
primaryAction: g,
|
|
35
|
+
secondaryAction: _,
|
|
36
|
+
align: j.align
|
|
37
|
+
}),
|
|
38
|
+
D
|
|
39
|
+
]
|
|
40
|
+
}), P = v ? /* @__PURE__ */ p("div", {
|
|
41
|
+
className: c,
|
|
42
|
+
children: [N, /* @__PURE__ */ f("div", {
|
|
43
|
+
className: e(l, j.mediaPosition === "start" && "lg:order-first"),
|
|
44
|
+
children: v
|
|
45
|
+
})]
|
|
46
|
+
}) : N;
|
|
47
|
+
return /* @__PURE__ */ f(a, {
|
|
48
|
+
ref: k,
|
|
49
|
+
as: T,
|
|
50
|
+
spacing: j.spacing,
|
|
51
|
+
background: j.background,
|
|
52
|
+
contained: !1,
|
|
53
|
+
className: E,
|
|
54
|
+
...O,
|
|
55
|
+
children: j.contained ? /* @__PURE__ */ f(i, {
|
|
56
|
+
size: j.containerSize,
|
|
57
|
+
children: P
|
|
58
|
+
}) : P
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
m.displayName = "Hero";
|
|
62
|
+
//#endregion
|
|
63
|
+
export { m as Hero };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
import { ContainerSize } from '../container/container-config';
|
|
3
|
+
import { SectionBackground } from '../section/section-config';
|
|
4
|
+
/**
|
|
5
|
+
* Horizontal alignment of a hero's text column.
|
|
6
|
+
*/
|
|
7
|
+
export type HeroAlign = "start" | "center";
|
|
8
|
+
/**
|
|
9
|
+
* Side the media occupies on a wide screen.
|
|
10
|
+
*/
|
|
11
|
+
export type HeroMediaPosition = "end" | "start";
|
|
12
|
+
/**
|
|
13
|
+
* Theme configuration options for the Hero component.
|
|
14
|
+
*
|
|
15
|
+
* Set under `components.hero` in the AsheeUI config. Values feed the
|
|
16
|
+
* component-level fallback tier of the theme cascade.
|
|
17
|
+
*/
|
|
18
|
+
export interface HeroConfig {
|
|
19
|
+
/**
|
|
20
|
+
* Alignment of the text column.
|
|
21
|
+
*
|
|
22
|
+
* @default "start"
|
|
23
|
+
*/
|
|
24
|
+
align?: HeroAlign;
|
|
25
|
+
/**
|
|
26
|
+
* Vertical padding of the hero band.
|
|
27
|
+
*
|
|
28
|
+
* @default "xl"
|
|
29
|
+
*/
|
|
30
|
+
spacing?: Space;
|
|
31
|
+
/**
|
|
32
|
+
* Background treatment of the hero band.
|
|
33
|
+
*
|
|
34
|
+
* @default "none"
|
|
35
|
+
*/
|
|
36
|
+
background?: SectionBackground;
|
|
37
|
+
/**
|
|
38
|
+
* Side the media occupies from the `lg` breakpoint upwards.
|
|
39
|
+
*
|
|
40
|
+
* @default "end"
|
|
41
|
+
*/
|
|
42
|
+
mediaPosition?: HeroMediaPosition;
|
|
43
|
+
/**
|
|
44
|
+
* Maximum content width of the hero.
|
|
45
|
+
*
|
|
46
|
+
* @default "lg"
|
|
47
|
+
*/
|
|
48
|
+
containerSize?: ContainerSize;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the hero wraps its content in a {@link Container}.
|
|
51
|
+
* The hero is contained automatically, so the framework's width and gutter
|
|
52
|
+
* apply; a consumer turns this off to nest the hero in its own layout.
|
|
53
|
+
*
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
contained?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Default config values registered for the Hero component.
|
|
60
|
+
*/
|
|
61
|
+
export declare const defaultHeroConfig: HeroConfig;
|
|
62
|
+
declare module "../../libs/registry" {
|
|
63
|
+
interface ComponentTypeConfigRegistry {
|
|
64
|
+
hero: HeroConfig;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Hard fallback values used when no config tier provides a value.
|
|
69
|
+
*/
|
|
70
|
+
export declare const FALLBACK_HERO_CONFIG: Required<HeroConfig>;
|
|
71
|
+
//# sourceMappingURL=hero-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-config.d.ts","sourceRoot":"","sources":["../../../src/components/hero/hero-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAO/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,UAAU,CAOrD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/hero/hero-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
align: "start",
|
|
6
|
+
spacing: "xl",
|
|
7
|
+
background: "none",
|
|
8
|
+
mediaPosition: "end",
|
|
9
|
+
containerSize: "lg",
|
|
10
|
+
contained: !0
|
|
11
|
+
};
|
|
12
|
+
e("hero", t);
|
|
13
|
+
var n = {
|
|
14
|
+
align: "start",
|
|
15
|
+
spacing: "xl",
|
|
16
|
+
background: "none",
|
|
17
|
+
mediaPosition: "end",
|
|
18
|
+
containerSize: "lg",
|
|
19
|
+
contained: !0
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { n as FALLBACK_HERO_CONFIG, t as defaultHeroConfig };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hero component styles for AsheeUI.
|
|
3
|
+
* This file provides the static class mappings for the Hero pattern: the
|
|
4
|
+
* two-column arrangement used when the hero has media, and the measure of the
|
|
5
|
+
* text column.
|
|
6
|
+
*/
|
|
7
|
+
/** The grid that places the text column and the media beside each other. */
|
|
8
|
+
export declare const HERO_LAYOUT_CLASS = "grid items-center gap-10 lg:grid-cols-2";
|
|
9
|
+
/** The text column. */
|
|
10
|
+
export declare const HERO_TEXT_COLUMN_CLASS = "flex min-w-0 flex-col gap-6";
|
|
11
|
+
/** Puts the media column first from the `lg` breakpoint upwards. */
|
|
12
|
+
export declare const HERO_MEDIA_FIRST_CLASS = "lg:order-first";
|
|
13
|
+
/** The media column. */
|
|
14
|
+
export declare const HERO_MEDIA_CLASS = "min-w-0";
|
|
15
|
+
/** Added to the text column when the hero is centred. */
|
|
16
|
+
export declare const HERO_CENTERED_CLASS = "items-center text-center";
|
|
17
|
+
/** Measure of the description when the hero stands alone. */
|
|
18
|
+
export declare const HERO_DESCRIPTION_MEASURE_CLASS = "max-w-2xl";
|
|
19
|
+
//# sourceMappingURL=hero-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero-styles.d.ts","sourceRoot":"","sources":["../../../src/components/hero/hero-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,4CAA4C,CAAC;AAE3E,uBAAuB;AACvB,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AAEpE,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,wBAAwB;AACxB,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,6DAA6D;AAC7D,eAAO,MAAM,8BAA8B,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/hero/hero-styles.ts
|
|
3
|
+
var e = "grid items-center gap-10 lg:grid-cols-2", t = "flex min-w-0 flex-col gap-6", n = "lg:order-first", r = "min-w-0", i = "items-center text-center", a = "max-w-2xl";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { i as HERO_CENTERED_CLASS, a as HERO_DESCRIPTION_MEASURE_CLASS, e as HERO_LAYOUT_CLASS, r as HERO_MEDIA_CLASS, n as HERO_MEDIA_FIRST_CLASS, t as HERO_TEXT_COLUMN_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/hero/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC"}
|
|
@@ -17,14 +17,13 @@ export interface ImageProps extends BaseImageProps {
|
|
|
17
17
|
*/
|
|
18
18
|
component?: ElementType;
|
|
19
19
|
/**
|
|
20
|
-
* Additional props
|
|
21
|
-
* (e.g. `{ priority: true, sizes: "..." }`).
|
|
20
|
+
* Additional props for `component` (for example `{ priority: true }`).
|
|
22
21
|
*
|
|
23
22
|
* If `component` is set and neither `width`/`height` nor `fill`
|
|
24
23
|
* are provided here, `fill: true` is applied automatically since
|
|
25
24
|
* this component is container/ratio driven.
|
|
26
25
|
*/
|
|
27
|
-
|
|
26
|
+
componentProps?: Record<string, unknown>;
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
29
|
* An image element with ratio locking, object-fit control, radius
|
|
@@ -51,7 +50,7 @@ export interface ImageProps extends BaseImageProps {
|
|
|
51
50
|
* @param props.showSkeleton - Loading placeholder. Defaults to true.
|
|
52
51
|
* @param props.className - Extra classes for the image element.
|
|
53
52
|
* @param props.component - Custom image component.
|
|
54
|
-
* @param props.
|
|
53
|
+
* @param props.componentProps - Props forwarded to the image component.
|
|
55
54
|
* @param props.src - The image source URL.
|
|
56
55
|
* @param props.onLoad - Callback fired when the image loads.
|
|
57
56
|
* @param props.onError - Callback fired when the image fails to load.
|
|
@@ -83,7 +82,7 @@ export interface ImageProps extends BaseImageProps {
|
|
|
83
82
|
* src="/hero.png"
|
|
84
83
|
* alt="Hero image"
|
|
85
84
|
* component={NextImage}
|
|
86
|
-
*
|
|
85
|
+
* componentProps={{ priority: true, sizes: "100vw" }}
|
|
87
86
|
* />
|
|
88
87
|
* ```
|
|
89
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AASf,OAAO,EAEL,KAAK,WAAW,EAGjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,cAAc,GAAG,WAAW,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAKvB,MAAM,OAAO,CAAC;AASf,OAAO,EAEL,KAAK,WAAW,EAGjB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,cAAc,GAAG,WAAW,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,eAAO,MAAM,KAAK,yGAsNjB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
6
|
import { resolveCascade as r, resolveClassKey as i, resolveRadiusKey as a } from "../../utils/resolve-token.js";
|
|
7
7
|
import { FALLBACK_IMAGE_CONFIG as o } from "./image-config.js";
|
|
8
8
|
import { IMAGE_FIT_CLASS as s, IMAGE_RATIO_CLASS as c } from "./image-styles.js";
|
|
@@ -12,8 +12,8 @@ import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
|
12
12
|
function h(e) {
|
|
13
13
|
return typeof e == "string" && e.trim().length > 0;
|
|
14
14
|
}
|
|
15
|
-
var g = l(({ alt: l, fit: g, ratio: _, radius: v, fallbackSrc: y, showSkeleton: ee, loading: b, src: x, className: S, onLoad: C, onError: w, component: T,
|
|
16
|
-
let k =
|
|
15
|
+
var g = l(({ alt: l, fit: g, ratio: _, radius: v, fallbackSrc: y, showSkeleton: ee, loading: b, src: x, className: S, onLoad: C, onError: w, component: T, componentProps: E, ...D }, O) => {
|
|
16
|
+
let k = n(), A = k.components?.image, [j, M] = f(!1), [N, P] = f(x), F = d(null);
|
|
17
17
|
u(() => {
|
|
18
18
|
P(x), M(!1);
|
|
19
19
|
}, [x]), u(() => {
|
|
@@ -30,7 +30,7 @@ var g = l(({ alt: l, fit: g, ratio: _, radius: v, fallbackSrc: y, showSkeleton:
|
|
|
30
30
|
M(!0), w?.(e);
|
|
31
31
|
}, R = (e) => {
|
|
32
32
|
F.current = e, typeof O == "function" ? O(e) : O && (O.current = e);
|
|
33
|
-
}, z = r(g, A?.fit, void 0, o.fit), B = r(_, A?.ratio, void 0, o.ratio), V = a(v, A?.radius, k.defaultRadius, o.radius), H = r(b, A?.loading, void 0, o.loading), U = r(ee, A?.showSkeleton, void 0, o.showSkeleton), W = i(z, s, o.fit), G = i(B, c, o.ratio), K = i(V,
|
|
33
|
+
}, z = r(g, A?.fit, void 0, o.fit), B = r(_, A?.ratio, void 0, o.ratio), V = a(v, A?.radius, k.defaultRadius, o.radius), H = r(b, A?.loading, void 0, o.loading), U = r(ee, A?.showSkeleton, void 0, o.showSkeleton), W = i(z, s, o.fit), G = i(B, c, o.ratio), K = i(V, t, o.radius), q = T || "img", J = !!T, Y = h(N), X = E?.width !== void 0 || E?.height !== void 0 || E?.fill !== void 0, Z = J && !X ? {
|
|
34
34
|
fill: !0,
|
|
35
35
|
sizes: "100%"
|
|
36
36
|
} : {}, Q = e("h-full w-full transition-opacity duration-300", W, j ? "opacity-100" : "opacity-0", K, S), $ = { ...E ?? {} };
|