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
package/README.md
CHANGED
|
@@ -1,210 +1,105 @@
|
|
|
1
1
|
# asheeui
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React UI framework built on Tailwind CSS v4. Accessible, config-driven
|
|
4
|
+
components, a layout system, the sections a page is made of, and a Puck
|
|
5
|
+
integration behind their own entry point.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
|
-
- **Config-driven** —
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- **
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- **Config-driven** — theme, variant, color, radius and spacing defaults resolve
|
|
10
|
+
through one cascade, so a value can be set globally, per component or per
|
|
11
|
+
instance.
|
|
12
|
+
- **A layout system** — `Container`, `Section`, `Stack`/`HStack`/`VStack`,
|
|
13
|
+
`Grid`, `Page`/`PageHeader`/`PageContent`/`PageFooter`, plus `SidebarLayout`
|
|
14
|
+
and `AuthLayout` for application pages.
|
|
15
|
+
- **Page sections** — `Navbar`, `Hero`, `FeatureGrid`, `CTA`, `Testimonials`,
|
|
16
|
+
`PricingCard` and `Footer`, each taking its actions as configuration.
|
|
17
|
+
- **Puck integration** — `asheeui/puck` exposes the same components as builder
|
|
18
|
+
blocks, so an application, an editor and a published page share one
|
|
19
|
+
implementation. `@puckeditor/core` is an optional peer dependency.
|
|
20
|
+
- **Tailwind CSS v4** — class names are static and complete, and colours resolve
|
|
21
|
+
through CSS custom properties.
|
|
22
|
+
- **Light and dark themes** — built-in `light`, `dark` and `system` themes, plus
|
|
23
|
+
custom themes.
|
|
24
|
+
- **Accessible** — landmarks, names, keyboard behaviour and announced state are
|
|
25
|
+
part of each component's contract, with tests that state them.
|
|
26
|
+
- **TypeScript-first** — fully typed configuration, theme registry and component
|
|
27
|
+
props, with JSDoc on every exported symbol.
|
|
13
28
|
|
|
14
29
|
## Requirements
|
|
15
30
|
|
|
16
31
|
- React 18 or newer
|
|
17
32
|
- Tailwind CSS v4
|
|
18
|
-
- Node.js
|
|
33
|
+
- Node.js 22.12 or newer for development
|
|
19
34
|
|
|
20
35
|
## Installation
|
|
21
36
|
|
|
22
|
-
The fastest way to get started is with the CLI. Run this in your project root:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
npx asheeui@latest init
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The CLI detects your framework, installs dependencies, adds the provider to your root layout, and configures Tailwind.
|
|
29
|
-
|
|
30
|
-
### Manual setup
|
|
31
|
-
|
|
32
|
-
Install the package:
|
|
33
|
-
|
|
34
37
|
```bash
|
|
35
|
-
npm install asheeui
|
|
38
|
+
npm install asheeui
|
|
36
39
|
```
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
Import the stylesheet once and wrap your root in the provider:
|
|
39
42
|
|
|
40
43
|
```css
|
|
41
44
|
@import "tailwindcss";
|
|
42
45
|
@import "asheeui/styles";
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```jsx
|
|
48
|
+
```tsx
|
|
48
49
|
import { AsheeUIProvider } from "asheeui";
|
|
49
|
-
|
|
50
|
-
export default function RootLayout({ children }) {
|
|
51
|
-
return (
|
|
52
|
-
<html suppressHydrationWarning>
|
|
53
|
-
<body>
|
|
54
|
-
<AsheeUIProvider>{children}</AsheeUIProvider>
|
|
55
|
-
</body>
|
|
56
|
-
</html>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
50
|
```
|
|
60
51
|
|
|
61
|
-
|
|
52
|
+
The optional `@asheeui/cli` package can scaffold that setup and check it, but it
|
|
53
|
+
is not required: the two steps above are the whole setup.
|
|
62
54
|
|
|
63
|
-
|
|
55
|
+
## Documentation
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
- [TanStack Start](/docs/installation/tanstack-start) — Full-stack React with TanStack Router
|
|
67
|
-
- [Vite + React](/docs/installation/vite) — Lightweight React SPA
|
|
57
|
+
The framework documentation lives in the repository:
|
|
68
58
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
function App() {
|
|
77
|
-
return <Button>Hello AsheeUI</Button>;
|
|
78
|
-
}
|
|
79
|
-
```
|
|
59
|
+
- [Installation](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/installation.md)
|
|
60
|
+
- [Configuration](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/configuration.md)
|
|
61
|
+
- [Components](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/components.md)
|
|
62
|
+
- [Puck](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/puck.md)
|
|
63
|
+
- [Accessibility](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/accessibility.md)
|
|
64
|
+
- [Migration](https://github.com/AsheeSoftworks/AsheeUI/blob/main/docs/migration.md)
|
|
80
65
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## Configuration
|
|
84
|
-
|
|
85
|
-
AsheeUI is configured through an optional `asheeui.config.ts` file at your project root. Sensible defaults apply with no config at all.
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
// asheeui.config.ts
|
|
89
|
-
import type { ExternalConfig } from "asheeui";
|
|
90
|
-
|
|
91
|
-
export const config: ExternalConfig = {
|
|
92
|
-
defaultTheme: "system", // "light" | "dark" | "system"
|
|
93
|
-
defaultVariant: "solid", // "solid" | "ghost" | "bordered" | "faded" | "underlined"
|
|
94
|
-
defaultColor: "primary", // "none" | "default" | "primary" | "secondary" | "danger" | "warning" | "success"
|
|
95
|
-
defaultRadius: "md", // "none" | "xs" | "sm" | "md" | "lg" | "xl" | "full"
|
|
96
|
-
};
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Values are resolved in this order (highest priority first):
|
|
100
|
-
|
|
101
|
-
1. **Instance prop** — `<Button variant="solid" />`
|
|
102
|
-
2. **Component config** — `components.button.variant`
|
|
103
|
-
3. **Theme default** — top-level `defaultVariant`, `defaultColor`, etc.
|
|
104
|
-
4. **Built-in fallback** — the library's internal default
|
|
105
|
-
|
|
106
|
-
### Per-component defaults
|
|
107
|
-
|
|
108
|
-
Set defaults for specific components while keeping global defaults for everything else:
|
|
109
|
-
|
|
110
|
-
```ts
|
|
111
|
-
export const config: ExternalConfig = {
|
|
112
|
-
defaultVariant: "bordered", // applies to all components
|
|
113
|
-
components: {
|
|
114
|
-
button: { variant: "solid" }, // overrides for Button only
|
|
115
|
-
input: { variant: "bordered", radius: "sm" },
|
|
116
|
-
toast: { variant: "bordered", placement: "bottom-right" },
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
See the [Configuration docs](/docs/configuration) for the full reference.
|
|
122
|
-
|
|
123
|
-
## Theming
|
|
124
|
-
|
|
125
|
-
AsheeUI's theming system is CSS-variable-driven. It ships with `light`, `dark`, and `system` themes, and you can override tokens or define entirely custom themes.
|
|
126
|
-
|
|
127
|
-
### Switch themes at runtime
|
|
128
|
-
|
|
129
|
-
```jsx
|
|
130
|
-
import { useTheme } from "asheeui";
|
|
66
|
+
## Quick start
|
|
131
67
|
|
|
132
|
-
|
|
133
|
-
|
|
68
|
+
```tsx
|
|
69
|
+
import { Button, Page, PageContent, Hero } from "asheeui";
|
|
134
70
|
|
|
71
|
+
export function App() {
|
|
135
72
|
return (
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
73
|
+
<Page>
|
|
74
|
+
<PageContent>
|
|
75
|
+
<Hero
|
|
76
|
+
title="Run your campaigns from one place"
|
|
77
|
+
primaryAction={{ label: "Start free", href: "/signup" }}
|
|
78
|
+
/>
|
|
79
|
+
<Button>Hello AsheeUI</Button>
|
|
80
|
+
</PageContent>
|
|
81
|
+
</Page>
|
|
142
82
|
);
|
|
143
83
|
}
|
|
144
84
|
```
|
|
145
85
|
|
|
146
|
-
`
|
|
147
|
-
|
|
148
|
-
| Property | Type | Description |
|
|
149
|
-
|---|---|---|
|
|
150
|
-
| `theme` | `ThemeSelection` | Current selected theme (`"light"` \| `"dark"` \| `"system"`) |
|
|
151
|
-
| `resolvedTheme` | `ThemeName` | Actual resolved theme (after system fallback) |
|
|
152
|
-
| `setTheme` | `(theme: ThemeSelection) => void` | Set the active theme |
|
|
153
|
-
| `toggleTheme` | `() => void` | Cycle to the next theme in sequence |
|
|
154
|
-
| `availableThemes` | `readonly string[]` | All registered theme names |
|
|
86
|
+
A complete page is `Navbar`, a band or two, and `Footer`, all of them composing
|
|
87
|
+
through `Page`, `Section`, `Container` and `Grid`.
|
|
155
88
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
### Override a built-in theme
|
|
159
|
-
|
|
160
|
-
```ts
|
|
161
|
-
export const config: ExternalConfig = {
|
|
162
|
-
color: {
|
|
163
|
-
light: { primary: "#7c3aed", background: "#faf5ff" },
|
|
164
|
-
dark: { primary: "#8b5cf6", border: "#3b3b3b" },
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Only the tokens you specify are overridden — everything else stays at the built-in default.
|
|
170
|
-
|
|
171
|
-
### Add a custom theme
|
|
172
|
-
|
|
173
|
-
Extend `light` or `dark` and override only what you need:
|
|
174
|
-
|
|
175
|
-
```ts
|
|
176
|
-
export const config: ExternalConfig = {
|
|
177
|
-
defaultTheme: "company-red",
|
|
178
|
-
color: {
|
|
179
|
-
"company-red": {
|
|
180
|
-
extends: "dark",
|
|
181
|
-
background: "#1a0505",
|
|
182
|
-
foreground: "#fef2f2",
|
|
183
|
-
primary: "#dc2626",
|
|
184
|
-
// ...other tokens inherit from dark
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
> **TypeScript:** Register custom theme names so `useTheme` and `setTheme` recognize them:
|
|
191
|
-
>
|
|
192
|
-
> ```ts
|
|
193
|
-
> declare module "asheeui" {
|
|
194
|
-
> interface AsheeColorRegistry {
|
|
195
|
-
> "company-red": true;
|
|
196
|
-
> }
|
|
197
|
-
> }
|
|
198
|
-
> ```
|
|
89
|
+
## Theming
|
|
199
90
|
|
|
200
|
-
|
|
91
|
+
Themes are CSS custom properties (`--ashee-background`, `--ashee-primary`, and
|
|
92
|
+
so on), applied by the provider before the first paint. `useTheme` switches the
|
|
93
|
+
theme at runtime and records the preference, `themeController` does the same
|
|
94
|
+
outside React, and a theme is defined as a block in the configuration.
|
|
201
95
|
|
|
202
96
|
## Links
|
|
203
97
|
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
-
|
|
98
|
+
- Documentation: https://asheeui.com
|
|
99
|
+
- Repository: https://github.com/AsheeSoftworks/AsheeUI
|
|
100
|
+
- Issues: https://github.com/AsheeSoftworks/AsheeUI/issues
|
|
207
101
|
|
|
208
102
|
## License
|
|
209
103
|
|
|
210
|
-
MIT
|
|
104
|
+
MIT
|
|
105
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"AsheeUIProvider.d.ts","sourceRoot":"","sources":["../src/AsheeUIProvider.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,+BAiCtB"}
|
package/dist/AsheeUIProvider.js
CHANGED
|
@@ -2,23 +2,30 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { themeController as e } from "./theme/controller.js";
|
|
4
4
|
import { resolveConfig as t } from "./config/resolve-config.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { assertValidConfig as n } from "./config/validate-config.js";
|
|
6
|
+
import { AsheeConfigContext as r } from "./libs/context.js";
|
|
7
|
+
import { useIsomorphicLayoutEffect as i } from "./libs/use-isomorphic-layout-effect.js";
|
|
8
|
+
import { AsheeThemeScript as a, ensureThemeVarsStyle as o } from "./scripts/AsheeThemeScript.js";
|
|
9
|
+
import { useMemo as s, useSyncExternalStore as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
11
|
//#region src/AsheeUIProvider.tsx
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
12
|
+
var d = () => () => {};
|
|
13
|
+
function f() {
|
|
14
|
+
return c(d, () => !1, () => !0);
|
|
15
|
+
}
|
|
16
|
+
function p({ config: c = {}, children: d }) {
|
|
17
|
+
let p = s(() => (n(c), t(c)), [c]);
|
|
18
|
+
i(() => {
|
|
14
19
|
e.configure({
|
|
15
|
-
defaultTheme:
|
|
16
|
-
themes: Object.keys(
|
|
17
|
-
});
|
|
18
|
-
}, [
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
defaultTheme: p.defaultTheme ?? "system",
|
|
21
|
+
themes: Object.keys(p.color)
|
|
22
|
+
}), o(p);
|
|
23
|
+
}, [p]);
|
|
24
|
+
let m = f();
|
|
25
|
+
return /* @__PURE__ */ u(r.Provider, {
|
|
26
|
+
value: p,
|
|
27
|
+
children: [m && /* @__PURE__ */ l(a, { config: p }), d]
|
|
21
28
|
});
|
|
22
29
|
}
|
|
23
30
|
//#endregion
|
|
24
|
-
export {
|
|
31
|
+
export { p as AsheeUIProvider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAUf,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAInB,MAAM,oBAAoB,CAAC;AAU5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,EAAE,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,eAAO,MAAM,SAAS,2GAyOrB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn as e } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { ChevronDownIcon as r } from "../../icons/ChevronDownIcon.js";
|
|
7
7
|
import { resolveCascade as i, resolveClassKey as a, resolveRadiusKey as o } from "../../utils/resolve-token.js";
|
|
8
8
|
import { FALLBACK_ACCORDION_CONFIG as s } from "./accordion-config.js";
|
|
9
9
|
import { ACCORDION_CONTENT_SIZE_CLASS as c, ACCORDION_HEADER_SIZE_CLASS as l, ACCORDION_VARIANT_CONTAINER_CLASS as u, ACCORDION_VARIANT_ITEM_CLASS as d } from "./accordion-styles.js";
|
|
@@ -11,7 +11,7 @@ import { forwardRef as f, useCallback as p, useId as m, useState as h } from "re
|
|
|
11
11
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/accordion/Accordion.tsx
|
|
13
13
|
var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, defaultValue: S, value: C, onValueChange: w, expandIcon: T, disableAnimation: E = !1, itemClassName: D, headerClassName: O, contentClassName: k, className: A, style: j, id: M, ...N }, P) => {
|
|
14
|
-
let F =
|
|
14
|
+
let F = n(), I = F.components?.accordion, L = m(), R = M ?? L, z = i(y, I?.size, void 0, s.size), B = i(v, I?.variant, F.defaultVariant, s.variant), V = i(x, I?.allowMultiple, void 0, s.allowMultiple), H = o(b, I?.radius, F.defaultRadius, s.radius), U = u[B] ?? u.separated, W = d[B] ?? d.separated, G = a(z, l, s.size), K = a(z, c, s.size), q = a(H, t, s.radius), J = C !== void 0, Y = p((e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], []), [X, Z] = h(() => Y(S)), Q = J ? Y(C) : X, $ = p((e, t) => {
|
|
15
15
|
if (t) return;
|
|
16
16
|
let n;
|
|
17
17
|
n = Q.includes(e) ? Q.filter((t) => t !== e) : V ? [...Q, e] : [e], J || Z(n), w?.(n);
|
|
@@ -27,8 +27,8 @@ var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, de
|
|
|
27
27
|
className: e("w-full", U, B !== "ghost" && B !== "flush" && q, A),
|
|
28
28
|
style: j,
|
|
29
29
|
...N,
|
|
30
|
-
children: f.map((t,
|
|
31
|
-
let i = t.id || `item-${
|
|
30
|
+
children: f.map((t, n) => {
|
|
31
|
+
let i = t.id || `item-${n}`, a = Q.includes(i), o = `${R}-header-${i}`, s = `${R}-content-${i}`;
|
|
32
32
|
return /* @__PURE__ */ _("div", {
|
|
33
33
|
className: e("w-full transition-colors box-border", W, (B === "separated" || B === "ghost") && q, D),
|
|
34
34
|
children: [/* @__PURE__ */ _("button", {
|
|
@@ -56,12 +56,14 @@ var v = f(({ items: f = [], variant: v, size: y, radius: b, allowMultiple: x, de
|
|
|
56
56
|
})]
|
|
57
57
|
}), /* @__PURE__ */ g("div", {
|
|
58
58
|
className: e("text-foreground/70 shrink-0 ml-2 transition-transform duration-200 ease-in-out", E ? "transition-none" : "", a && "rotate-180"),
|
|
59
|
-
children: T || /* @__PURE__ */ g(
|
|
59
|
+
children: T || /* @__PURE__ */ g(r, { className: "w-4 h-4" })
|
|
60
60
|
})]
|
|
61
61
|
}), /* @__PURE__ */ g("section", {
|
|
62
62
|
id: s,
|
|
63
63
|
"aria-labelledby": o,
|
|
64
64
|
"data-state": a ? "open" : "closed",
|
|
65
|
+
"aria-hidden": !a || void 0,
|
|
66
|
+
inert: !a,
|
|
65
67
|
className: e("w-full grid transition-[grid-template-rows,opacity] duration-250 ease-[cubic-bezier(0.16,1,0.3,1)]", E ? "transition-none" : "", a ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
|
|
66
68
|
children: /* @__PURE__ */ g("div", {
|
|
67
69
|
className: "scrollbar-hide overflow-hidden w-full",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { AlertConfig, AlertType } from './alert-config';
|
|
3
|
+
type BaseAlertProps = AlertConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title" | "content">;
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the Alert component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AlertProps extends BaseAlertProps {
|
|
8
|
+
/**
|
|
9
|
+
* Intent of the alert.
|
|
10
|
+
* Selects the colour and the urgency of the announcement.
|
|
11
|
+
*
|
|
12
|
+
* @default "info"
|
|
13
|
+
*/
|
|
14
|
+
type?: AlertType;
|
|
15
|
+
/**
|
|
16
|
+
* Short heading for the message.
|
|
17
|
+
*/
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Message body.
|
|
21
|
+
*/
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Leading content, shown in place of the intent's default icon.
|
|
25
|
+
*/
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the alert can be dismissed by the consumer.
|
|
29
|
+
* The dismiss control appears only when this is true and `onClose` is given.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
isClosable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Called when the dismiss control is used.
|
|
36
|
+
*/
|
|
37
|
+
onClose?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Name of the dismiss control, for assistive technology.
|
|
40
|
+
*
|
|
41
|
+
* @default "Dismiss alert"
|
|
42
|
+
*/
|
|
43
|
+
closeLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* An inline message or validation summary.
|
|
47
|
+
*
|
|
48
|
+
* Alert presents a message next to the surface it relates to: a form summary,
|
|
49
|
+
* a failed step, or a statement the consumer should not miss. Its colour,
|
|
50
|
+
* variant and radius resolve through the standard AsheeUI cascade: prop,
|
|
51
|
+
* component config, global theme defaults, and the built-in fallback.
|
|
52
|
+
*
|
|
53
|
+
* The intent decides how urgently the message is announced. `error` and
|
|
54
|
+
* `warning` are exposed as an alert, which interrupts assistive technology;
|
|
55
|
+
* `info` and `success` are exposed as a status, which waits for a pause. Pass
|
|
56
|
+
* `role` to override that choice.
|
|
57
|
+
*
|
|
58
|
+
* An alert never moves focus, never takes focus, and never appears above the
|
|
59
|
+
* page: when a message has to interrupt with a modal surface, use `Modal`
|
|
60
|
+
* instead. The dismiss control carries an accessible name and is the only
|
|
61
|
+
* focusable element the component adds.
|
|
62
|
+
*
|
|
63
|
+
* @param props - Alert configuration options and div attributes.
|
|
64
|
+
* @param props.type - Intent. Defaults to "info".
|
|
65
|
+
* @param props.title - Short heading for the message.
|
|
66
|
+
* @param props.children - Message body.
|
|
67
|
+
* @param props.icon - Leading content, in place of the default icon.
|
|
68
|
+
* @param props.isClosable - Whether a dismiss control is shown. Defaults to false.
|
|
69
|
+
* @param props.onClose - Called when the dismiss control is used.
|
|
70
|
+
* @param props.closeLabel - Name of the dismiss control. Defaults to "Dismiss alert".
|
|
71
|
+
* @param props.variant - Visual style variant. Defaults to the configured value.
|
|
72
|
+
* @param props.radius - Corner rounding. Defaults to "md".
|
|
73
|
+
* @param props.role - Announcement role, overriding the intent's default.
|
|
74
|
+
* @param props.className - Extra classes applied last.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Alert type="error" title="Payment failed">
|
|
79
|
+
* The card was declined. Check the details and try again.
|
|
80
|
+
* </Alert>
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @see AlertConfig - The configuration type for component defaults.
|
|
84
|
+
* @see ToastProvider - For messages that appear above the page instead of inline.
|
|
85
|
+
*/
|
|
86
|
+
export declare const Alert: import('react').ForwardRefExoticComponent<AlertProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
87
|
+
export {};
|
|
88
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWxE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AAUxB,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,KAAK,uGAwFjB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { RADIUS_CLASS as t } from "../../shared/radius.js";
|
|
5
|
+
import { resolveVariantClass as n } from "../../shared/variant.js";
|
|
6
|
+
import { useAsheeConfig as r } from "../../libs/context.js";
|
|
7
|
+
import { resolveCascade as i, resolveClassKey as a } from "../../utils/resolve-token.js";
|
|
8
|
+
import { CheckIcon as o } from "../../icons/CheckIcon.js";
|
|
9
|
+
import { CloseIcon as s } from "../../icons/CloseIcon.js";
|
|
10
|
+
import { ErrorIcon as c } from "../../icons/ErrorIcon.js";
|
|
11
|
+
import { InfoIcon as l } from "../../icons/InfoIcon.js";
|
|
12
|
+
import { WarningIcon as u } from "../../icons/WarningIcon.js";
|
|
13
|
+
import { FALLBACK_ALERT_CONFIG as d } from "./alert-config.js";
|
|
14
|
+
import { ALERT_BASE_CLASS as f, ALERT_ICON_CLASS as p, ALERT_TYPE_COLOR as m, ALERT_TYPE_ICON_CLASS as h, ALERT_TYPE_ROLE as g } from "./alert-styles.js";
|
|
15
|
+
import { forwardRef as _ } from "react";
|
|
16
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
|
+
//#region src/components/alert/Alert.tsx
|
|
18
|
+
function b(e) {
|
|
19
|
+
switch (e) {
|
|
20
|
+
case "success": return /* @__PURE__ */ v(o, {});
|
|
21
|
+
case "error": return /* @__PURE__ */ v(c, {});
|
|
22
|
+
case "warning": return /* @__PURE__ */ v(u, {});
|
|
23
|
+
default: return /* @__PURE__ */ v(l, {});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var x = _(({ type: o, variant: c, radius: l, title: u, children: _, icon: x, isClosable: S = !1, onClose: C, closeLabel: w = "Dismiss alert", role: T, className: E, ...D }, O) => {
|
|
27
|
+
let k = r(), A = k.components?.alert, j = i(o, A?.type, void 0, d.type), M = i(c, A?.variant, k.defaultVariant, d.variant), N = M === "underlined" ? "bordered" : M, P = i(l, A?.radius, k.defaultRadius, d.radius), F = a(P, t, d.radius);
|
|
28
|
+
return /* @__PURE__ */ y("div", {
|
|
29
|
+
ref: O,
|
|
30
|
+
role: T ?? g[j],
|
|
31
|
+
className: e(f, F, n(N, m[j]), E),
|
|
32
|
+
...D,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ v("span", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: e(p, h[j]),
|
|
37
|
+
children: x ?? b(j)
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ y("div", {
|
|
40
|
+
className: "flex-1 min-w-0 flex flex-col gap-0.5",
|
|
41
|
+
children: [u && /* @__PURE__ */ v("span", {
|
|
42
|
+
className: "font-medium",
|
|
43
|
+
children: u
|
|
44
|
+
}), _ && /* @__PURE__ */ v("div", {
|
|
45
|
+
className: "text-current/80",
|
|
46
|
+
children: _
|
|
47
|
+
})]
|
|
48
|
+
}),
|
|
49
|
+
S && C && /* @__PURE__ */ v("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
"aria-label": w,
|
|
52
|
+
onClick: C,
|
|
53
|
+
className: "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
54
|
+
children: /* @__PURE__ */ v(s, { className: "size-3.5" })
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
x.displayName = "Alert";
|
|
60
|
+
//#endregion
|
|
61
|
+
export { x as Alert };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Radius, Variant } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Intent of an alert.
|
|
4
|
+
* Selects the colour an alert is presented in and how urgently it is
|
|
5
|
+
* announced: `error` and `warning` interrupt, `info` and `success` wait for a
|
|
6
|
+
* pause in what assistive technology is reading.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertType = "success" | "error" | "info" | "warning";
|
|
9
|
+
/**
|
|
10
|
+
* Theme configuration options for the Alert component.
|
|
11
|
+
*
|
|
12
|
+
* Set under `components.alert` in the AsheeUI config. Values feed the
|
|
13
|
+
* component-level fallback tier of the theme cascade.
|
|
14
|
+
*/
|
|
15
|
+
export interface AlertConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Intent of the alert.
|
|
18
|
+
* Controls its colour and how urgently its message is announced.
|
|
19
|
+
*
|
|
20
|
+
* @default "info"
|
|
21
|
+
*/
|
|
22
|
+
type?: AlertType;
|
|
23
|
+
/**
|
|
24
|
+
* Visual style variant.
|
|
25
|
+
* Controls the alert's background, border, and text treatment.
|
|
26
|
+
*
|
|
27
|
+
* @default "faded"
|
|
28
|
+
*/
|
|
29
|
+
variant?: Exclude<Variant, "underlined">;
|
|
30
|
+
/**
|
|
31
|
+
* Corner rounding.
|
|
32
|
+
* Controls the border-radius of the alert.
|
|
33
|
+
*
|
|
34
|
+
* @default "md"
|
|
35
|
+
*/
|
|
36
|
+
radius?: Radius;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default config values registered for the Alert component.
|
|
40
|
+
*
|
|
41
|
+
* `variant` is intentionally absent so it inherits from the global
|
|
42
|
+
* `defaultVariant`.
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultAlertConfig: AlertConfig;
|
|
45
|
+
/**
|
|
46
|
+
* Hard fallback values used when no config tier provides a value.
|
|
47
|
+
* These values are used when instance props, component config,
|
|
48
|
+
* and global defaults are all undefined.
|
|
49
|
+
*/
|
|
50
|
+
export declare const FALLBACK_ALERT_CONFIG: Required<AlertConfig>;
|
|
51
|
+
declare module "../../libs/registry" {
|
|
52
|
+
interface ComponentTypeConfigRegistry {
|
|
53
|
+
alert: AlertConfig;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=alert-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-config.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAEzC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAGhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAI9C,CAAC;AAEX,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/alert/alert-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
type: "info",
|
|
6
|
+
radius: "md"
|
|
7
|
+
}, n = {
|
|
8
|
+
type: "info",
|
|
9
|
+
variant: "faded",
|
|
10
|
+
radius: "md"
|
|
11
|
+
};
|
|
12
|
+
e("alert", t);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as FALLBACK_ALERT_CONFIG, t as defaultAlertConfig };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Color } from '../../shared';
|
|
2
|
+
import { AlertType } from './alert-config';
|
|
3
|
+
/**
|
|
4
|
+
* Colour each intent is presented in.
|
|
5
|
+
* The colour resolves through the framework's colour engine, so an alert has
|
|
6
|
+
* no palette colour of its own.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ALERT_TYPE_COLOR: Record<AlertType, Color>;
|
|
9
|
+
/**
|
|
10
|
+
* How urgently each intent is announced.
|
|
11
|
+
* `alert` interrupts what assistive technology is reading, so it is reserved
|
|
12
|
+
* for the two intents that need attention now.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ALERT_TYPE_ROLE: Record<AlertType, "alert" | "status">;
|
|
15
|
+
/**
|
|
16
|
+
* Colour of the leading icon for each intent.
|
|
17
|
+
* The icon is decoration: the message text carries the information.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ALERT_TYPE_ICON_CLASS: Record<AlertType, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Base classes for the alert surface and its content layout.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ALERT_BASE_CLASS = "relative flex items-start gap-3 w-full p-3 text-sm transition-colors";
|
|
24
|
+
/**
|
|
25
|
+
* Classes for the icon slot.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ALERT_ICON_CLASS = "shrink-0 mt-0.5 [&_svg]:size-5";
|
|
28
|
+
/**
|
|
29
|
+
* Classes for the dismiss control.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ALERT_DISMISS_CLASS = "shrink-0 inline-flex items-center justify-center size-6 rounded-sm text-current/70 hover:text-current transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-current";
|
|
32
|
+
//# sourceMappingURL=alert-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-styles.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert-styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAKrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,CAKjE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAK3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,yEAC2C,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,gBAAgB,mCAAmC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,mBAAmB,+LAC8J,CAAC"}
|