asheeui 1.0.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/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +6 -6
- 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.map +1 -1
- package/dist/components/avatar/Avatar.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +3 -3
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +6 -6
- package/dist/components/calendar/Calendar.d.ts.map +1 -1
- package/dist/components/calendar/Calendar.js +4 -4
- package/dist/components/calendar/DateGrid.d.ts.map +1 -1
- package/dist/components/calendar/DateGrid.js +87 -87
- 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/dropmenu/Dropmenu.d.ts.map +1 -1
- 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/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.map +1 -1
- 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/multi-select/MultiSelect.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.map +1 -1
- package/dist/components/pagination/Pagination.js +8 -8
- 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/RadioGroup.d.ts.map +1 -1
- 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-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.map +1 -1
- 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/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/typography/typography-styles.d.ts.map +1 -1
- package/dist/config/validate-config.d.ts.map +1 -1
- 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 +19 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -72
- 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/shared/action.d.ts +52 -0
- package/dist/shared/action.d.ts.map +1 -0
- package/dist/shared/index.d.ts +2 -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.map +1 -1
- 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/package.json +14 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropmenu.d.ts","sourceRoot":"","sources":["../../../src/components/dropmenu/Dropmenu.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,
|
|
1
|
+
{"version":3,"file":"Dropmenu.d.ts","sourceRoot":"","sources":["../../../src/components/dropmenu/Dropmenu.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,mBAAmB,CAAC;AAKhF;;;GAGG;AACH,KAAK,gBAAgB,GAAG,IAAI,CAC1B,UAAU,EACR,OAAO,GACP,aAAa,GACb,SAAS,GACT,UAAU,GACV,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,IAAI,GACJ,OAAO,CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,aACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAEjD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoGG;AACH,eAAO,MAAM,QAAQ,6GAgRpB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ActionConfig } from '../../shared';
|
|
3
|
+
import { EmptyStateConfig } from './empty-state-config';
|
|
4
|
+
type BaseEmptyStateProps = EmptyStateConfig & Omit<HTMLAttributes<HTMLDivElement>, "color" | "title">;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the EmptyState component.
|
|
7
|
+
*/
|
|
8
|
+
export interface EmptyStateProps extends BaseEmptyStateProps {
|
|
9
|
+
/** Icon shown above the title. */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** What the region is and, where useful, why it is empty. */
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
/** What the reader can do about it. */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** The emphasised action, for example the one that creates the first item. */
|
|
16
|
+
primaryAction?: ActionConfig;
|
|
17
|
+
/** The supporting action, typically a link to the documentation. */
|
|
18
|
+
secondaryAction?: ActionConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Live-region role of the state.
|
|
21
|
+
* Leave it unset for a state that is part of the page's initial markup. Pass
|
|
22
|
+
* `"status"` or `"alert"` for a state that replaces content after an
|
|
23
|
+
* asynchronous result, so the change is announced.
|
|
24
|
+
*/
|
|
25
|
+
role?: "status" | "alert";
|
|
26
|
+
/**
|
|
27
|
+
* Element to render.
|
|
28
|
+
* Defaults to a `div`.
|
|
29
|
+
*
|
|
30
|
+
* @default "div"
|
|
31
|
+
*/
|
|
32
|
+
as?: ElementType;
|
|
33
|
+
/** Content below the actions. */
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A region with nothing in it.
|
|
38
|
+
*
|
|
39
|
+
* EmptyState covers the empty, the "no results" and the failed presentations of
|
|
40
|
+
* a region. Loading is deliberately not one of them: a loading region is a
|
|
41
|
+
* `Skeleton` or a `Spinner`, and pretending an in-progress region is empty would
|
|
42
|
+
* tell the reader the wrong thing.
|
|
43
|
+
*
|
|
44
|
+
* The state carries no live-region role of its own, because a state rendered
|
|
45
|
+
* with the page should not be announced as a change and a state that replaces
|
|
46
|
+
* content should be. A consumer that renders the state in response to a result
|
|
47
|
+
* passes `role="status"` or `role="alert"`.
|
|
48
|
+
*
|
|
49
|
+
* @param props - EmptyState configuration options and element attributes.
|
|
50
|
+
* @param props.title - What the region is.
|
|
51
|
+
* @param props.icon - Icon shown above the title.
|
|
52
|
+
* @param props.description - What the reader can do about it.
|
|
53
|
+
* @param props.primaryAction - The emphasised action.
|
|
54
|
+
* @param props.secondaryAction - The supporting action.
|
|
55
|
+
* @param props.type - Tone of the state. Defaults to "info".
|
|
56
|
+
* @param props.size - Density. Defaults to "md".
|
|
57
|
+
* @param props.panel - Draw the state as a panel. Defaults to false.
|
|
58
|
+
* @param props.role - Live-region role, for a state that replaces content.
|
|
59
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
60
|
+
* @returns The rendered state.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <EmptyState
|
|
65
|
+
* icon={<SearchIcon />}
|
|
66
|
+
* title="No campaigns match that filter"
|
|
67
|
+
* description="Try a different name, or clear the filter to see everything."
|
|
68
|
+
* primaryAction={{ label: "Clear filters", onClick: clearFilters }}
|
|
69
|
+
* />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @see Skeleton - The loading presentation of the same region.
|
|
73
|
+
* @see Alert - An inline message that is not a whole region.
|
|
74
|
+
*/
|
|
75
|
+
export declare const EmptyState: import('react').ForwardRefExoticComponent<EmptyStateProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/EmptyState.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;AAKjD,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAS9B,KAAK,mBAAmB,GAAG,gBAAgB,GACzC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,kCAAkC;IAClC,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,6DAA6D;IAC7D,KAAK,EAAE,SAAS,CAAC;IAEjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B,oEAAoE;IACpE,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAE1B;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,UAAU,4GAsEtB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { ActionGroup as i } from "../section-kit/ActionGroup.js";
|
|
8
|
+
import { FALLBACK_EMPTY_STATE_CONFIG as a } from "./empty-state-config.js";
|
|
9
|
+
import { EMPTY_STATE_CLASS as o, EMPTY_STATE_ICON_CLASS as s, EMPTY_STATE_ICON_SIZE_CLASS as c, EMPTY_STATE_SIZE_CLASS as l } from "./empty-state-styles.js";
|
|
10
|
+
import { forwardRef as u } from "react";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/empty-state/EmptyState.tsx
|
|
13
|
+
var p = u(({ icon: u, title: p, description: m, primaryAction: h, secondaryAction: g, type: _, size: v, panel: y, role: b, as: x, className: S, children: C, ...w }, T) => {
|
|
14
|
+
let E = t(), D = n({
|
|
15
|
+
type: _,
|
|
16
|
+
size: v,
|
|
17
|
+
panel: y
|
|
18
|
+
}, E.components?.emptystate, a);
|
|
19
|
+
return /* @__PURE__ */ f(x ?? "div", {
|
|
20
|
+
ref: T,
|
|
21
|
+
role: b,
|
|
22
|
+
className: e(o, l[D.size], D.panel && "rounded-md border border-border bg-background", S),
|
|
23
|
+
...w,
|
|
24
|
+
children: [
|
|
25
|
+
u && /* @__PURE__ */ d("div", {
|
|
26
|
+
className: e(s[D.type], c[D.size]),
|
|
27
|
+
children: u
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ d(r, {
|
|
30
|
+
title: p,
|
|
31
|
+
description: m,
|
|
32
|
+
align: "center",
|
|
33
|
+
size: "md"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ d(i, {
|
|
36
|
+
primaryAction: h,
|
|
37
|
+
secondaryAction: g,
|
|
38
|
+
align: "center"
|
|
39
|
+
}),
|
|
40
|
+
C
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
p.displayName = "EmptyState";
|
|
45
|
+
//#endregion
|
|
46
|
+
export { p as EmptyState };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* The tone of an empty region.
|
|
4
|
+
*
|
|
5
|
+
* - `info`: nothing is here yet, which is expected.
|
|
6
|
+
* - `success`: the region is empty because the work finished.
|
|
7
|
+
* - `warning`: the region is empty and something needs attention.
|
|
8
|
+
* - `error`: the region could not be filled because something failed.
|
|
9
|
+
*/
|
|
10
|
+
export type EmptyStateType = "info" | "success" | "warning" | "error";
|
|
11
|
+
/**
|
|
12
|
+
* Theme configuration options for the EmptyState component.
|
|
13
|
+
*
|
|
14
|
+
* Set under `components.emptystate` in the AsheeUI config. Values feed the
|
|
15
|
+
* component-level fallback tier of the theme cascade.
|
|
16
|
+
*/
|
|
17
|
+
export interface EmptyStateConfig {
|
|
18
|
+
/** Tone of the state. @default "info" */
|
|
19
|
+
type?: EmptyStateType;
|
|
20
|
+
/** Density of the state. @default "md" */
|
|
21
|
+
size?: Size;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the state is drawn as a panel.
|
|
24
|
+
* A panel suits a region inside a dashboard; without one the state sits
|
|
25
|
+
* directly on the page, which suits a whole-page empty view.
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
panel?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Default config values registered for the EmptyState component.
|
|
33
|
+
*/
|
|
34
|
+
export declare const defaultEmptyStateConfig: EmptyStateConfig;
|
|
35
|
+
declare module "../../libs/registry" {
|
|
36
|
+
interface ComponentTypeConfigRegistry {
|
|
37
|
+
emptystate: EmptyStateConfig;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Hard fallback values used when no config tier provides a value.
|
|
42
|
+
*/
|
|
43
|
+
export declare const FALLBACK_EMPTY_STATE_CONFIG: Required<EmptyStateConfig>;
|
|
44
|
+
//# sourceMappingURL=empty-state-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state-config.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAIrC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,UAAU,EAAE,gBAAgB,CAAC;KAC9B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,gBAAgB,CAIlE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/empty-state/empty-state-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
type: "info",
|
|
6
|
+
size: "md",
|
|
7
|
+
panel: !1
|
|
8
|
+
};
|
|
9
|
+
e("emptystate", t);
|
|
10
|
+
var n = {
|
|
11
|
+
type: "info",
|
|
12
|
+
size: "md",
|
|
13
|
+
panel: !1
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_EMPTY_STATE_CONFIG, t as defaultEmptyStateConfig };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
import { EmptyStateType } from './empty-state-config';
|
|
3
|
+
/** Inner arrangement of the state. */
|
|
4
|
+
export declare const EMPTY_STATE_CLASS = "flex flex-col items-center gap-4 text-center";
|
|
5
|
+
/** Padding of the state at each density. */
|
|
6
|
+
export declare const EMPTY_STATE_SIZE_CLASS: Record<Size, string>;
|
|
7
|
+
/** The panel treatment. */
|
|
8
|
+
export declare const EMPTY_STATE_PANEL_CLASS = "rounded-md border border-border bg-background";
|
|
9
|
+
/** Spacing between the icon badge and the text at each density. */
|
|
10
|
+
export declare const EMPTY_STATE_ICON_SIZE_CLASS: Record<Size, string>;
|
|
11
|
+
/** Badge that holds the state's icon, coloured by tone. */
|
|
12
|
+
export declare const EMPTY_STATE_ICON_CLASS: Record<EmptyStateType, string>;
|
|
13
|
+
//# sourceMappingURL=empty-state-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state-styles.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,iDAAiD,CAAC;AAEhF,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIvD,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,uBAAuB,kDACa,CAAC;AAElD,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI5D,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAQjE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/empty-state/empty-state-styles.ts
|
|
3
|
+
var e = "flex flex-col items-center gap-4 text-center", t = {
|
|
4
|
+
sm: "p-4",
|
|
5
|
+
md: "p-6",
|
|
6
|
+
lg: "p-10"
|
|
7
|
+
}, n = "rounded-md border border-border bg-background", r = {
|
|
8
|
+
sm: "size-8",
|
|
9
|
+
md: "size-10",
|
|
10
|
+
lg: "size-12"
|
|
11
|
+
}, i = {
|
|
12
|
+
info: "flex shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",
|
|
13
|
+
success: "flex shrink-0 items-center justify-center rounded-full bg-success/10 text-success",
|
|
14
|
+
warning: "flex shrink-0 items-center justify-center rounded-full bg-warning/10 text-warning",
|
|
15
|
+
error: "flex shrink-0 items-center justify-center rounded-full bg-danger/10 text-danger"
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as EMPTY_STATE_CLASS, i as EMPTY_STATE_ICON_CLASS, r as EMPTY_STATE_ICON_SIZE_CLASS, n as EMPTY_STATE_PANEL_CLASS, t as EMPTY_STATE_SIZE_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { FeatureGridConfig } from './feature-grid-config';
|
|
3
|
+
/**
|
|
4
|
+
* One feature in the grid.
|
|
5
|
+
*/
|
|
6
|
+
export interface FeatureItem {
|
|
7
|
+
/**
|
|
8
|
+
* Stable identifier for the feature.
|
|
9
|
+
* Defaults to its position in the list.
|
|
10
|
+
*/
|
|
11
|
+
id?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* Icon shown above the feature title.
|
|
14
|
+
*/
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Name of the feature.
|
|
18
|
+
*/
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Explanation of the feature.
|
|
22
|
+
*/
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Destination of the feature.
|
|
26
|
+
* With one, the whole card becomes a link.
|
|
27
|
+
*/
|
|
28
|
+
href?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Substitution for the link each feature card renders.
|
|
32
|
+
*/
|
|
33
|
+
export interface FeatureGridLink {
|
|
34
|
+
/**
|
|
35
|
+
* Component that replaces the anchor, such as a framework router link.
|
|
36
|
+
*/
|
|
37
|
+
component?: ElementType;
|
|
38
|
+
/**
|
|
39
|
+
* Additional props for that component.
|
|
40
|
+
*/
|
|
41
|
+
props?: Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
type BaseFeatureGridProps = FeatureGridConfig & Omit<HTMLAttributes<HTMLElement>, "color" | "title">;
|
|
44
|
+
/**
|
|
45
|
+
* Props for the FeatureGrid component.
|
|
46
|
+
*/
|
|
47
|
+
export interface FeatureGridProps extends BaseFeatureGridProps {
|
|
48
|
+
/** Short label above the heading. */
|
|
49
|
+
eyebrow?: ReactNode;
|
|
50
|
+
/** Heading of the band. */
|
|
51
|
+
title?: ReactNode;
|
|
52
|
+
/** Supporting sentence under the heading. */
|
|
53
|
+
description?: ReactNode;
|
|
54
|
+
/** The features to show. */
|
|
55
|
+
items: FeatureItem[];
|
|
56
|
+
/** Substitution applied to the link of every feature card. */
|
|
57
|
+
link?: FeatureGridLink;
|
|
58
|
+
/**
|
|
59
|
+
* Element to render the band as.
|
|
60
|
+
* Defaults to `section`.
|
|
61
|
+
*
|
|
62
|
+
* @default "section"
|
|
63
|
+
*/
|
|
64
|
+
as?: ElementType;
|
|
65
|
+
/** Content below the grid. */
|
|
66
|
+
children?: ReactNode;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* A band of features laid out in a responsive grid.
|
|
70
|
+
*
|
|
71
|
+
* Each feature renders through the public `Card`, so a feature grid inherits the
|
|
72
|
+
* framework's card variants, radius, hover and focus treatment and its
|
|
73
|
+
* router-link substitution. The grid is one column on a phone, two on a tablet
|
|
74
|
+
* and three from the `lg` breakpoint by default, and every part of that is
|
|
75
|
+
* configurable through `components.featuregrid`.
|
|
76
|
+
*
|
|
77
|
+
* @param props - FeatureGrid configuration options and element attributes.
|
|
78
|
+
* @param props.items - The features to show.
|
|
79
|
+
* @param props.title - Heading of the band.
|
|
80
|
+
* @param props.eyebrow - Short label above the heading.
|
|
81
|
+
* @param props.description - Supporting sentence under the heading.
|
|
82
|
+
* @param props.columns - Columns from the smallest viewport. Defaults to 1.
|
|
83
|
+
* @param props.columnsMd - Columns from `md` upwards. Defaults to 2.
|
|
84
|
+
* @param props.columnsLg - Columns from `lg` upwards. Defaults to 3.
|
|
85
|
+
* @param props.gap - Space between cards. Defaults to "lg".
|
|
86
|
+
* @param props.align - Heading alignment. Defaults to "center".
|
|
87
|
+
* @param props.link - Substitution for the feature card links.
|
|
88
|
+
* @param props.as - Element to render. Defaults to "section".
|
|
89
|
+
* @returns The rendered band.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```tsx
|
|
93
|
+
* <FeatureGrid
|
|
94
|
+
* eyebrow="Why teams switch"
|
|
95
|
+
* title="Everything the campaign needs"
|
|
96
|
+
* items={[
|
|
97
|
+
* { title: "Templates", description: "Reusable messages." },
|
|
98
|
+
* { title: "Scheduling", description: "Send at the right time." },
|
|
99
|
+
* ]}
|
|
100
|
+
* />
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @see Card - The surface each feature renders in.
|
|
104
|
+
*/
|
|
105
|
+
export declare const FeatureGrid: import('react').ForwardRefExoticComponent<FeatureGridProps & import('react').RefAttributes<HTMLElement>>;
|
|
106
|
+
export {};
|
|
107
|
+
//# sourceMappingURL=FeatureGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureGrid.d.ts","sourceRoot":"","sources":["../../../src/components/feature-grid/FeatureGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAO/B;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,KAAK,oBAAoB,GAAG,iBAAiB,GAC3C,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,qCAAqC;IACrC,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB,4BAA4B;IAC5B,KAAK,EAAE,WAAW,EAAE,CAAC;IAErB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,eAAe,CAAC;IAEvB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,WAAW,0GAgHvB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { useAsheeConfig as e } from "../../libs/context.js";
|
|
4
|
+
import { resolveConfigCascade as t } from "../../utils/resolve-token.js";
|
|
5
|
+
import { Typography as n } from "../typography/Typography.js";
|
|
6
|
+
import { SectionHeading as r } from "../section-kit/SectionHeading.js";
|
|
7
|
+
import { Card as i } from "../card/Card.js";
|
|
8
|
+
import { Container as a } from "../container/Container.js";
|
|
9
|
+
import { Section as o } from "../section/Section.js";
|
|
10
|
+
import { Grid as s } from "../grid/Grid.js";
|
|
11
|
+
import { FALLBACK_FEATURE_GRID_CONFIG as c } from "./feature-grid-config.js";
|
|
12
|
+
import { FEATURE_CARD_BODY_CLASS as l, FEATURE_HEADING_CLASS as u } from "./feature-grid-styles.js";
|
|
13
|
+
import { forwardRef as d } from "react";
|
|
14
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
15
|
+
//#region src/components/feature-grid/FeatureGrid.tsx
|
|
16
|
+
var h = d(({ eyebrow: d, title: h, description: g, items: _, link: v, columns: y, columnsMd: b, columnsLg: x, gap: S, spacing: C, background: w, align: T, containerSize: E, contained: D, as: O, className: k, children: A, ...j }, M) => {
|
|
17
|
+
let N = e(), P = t({
|
|
18
|
+
columns: y,
|
|
19
|
+
columnsMd: b,
|
|
20
|
+
columnsLg: x,
|
|
21
|
+
gap: S,
|
|
22
|
+
spacing: C,
|
|
23
|
+
background: w,
|
|
24
|
+
align: T,
|
|
25
|
+
containerSize: E,
|
|
26
|
+
contained: D
|
|
27
|
+
}, N.components?.featuregrid, c), F = /* @__PURE__ */ m(f, { children: [
|
|
28
|
+
/* @__PURE__ */ p(r, {
|
|
29
|
+
eyebrow: d,
|
|
30
|
+
title: h,
|
|
31
|
+
description: g,
|
|
32
|
+
align: P.align,
|
|
33
|
+
className: u
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ p(s, {
|
|
36
|
+
columns: P.columns,
|
|
37
|
+
columnsMd: P.columnsMd,
|
|
38
|
+
columnsLg: P.columnsLg,
|
|
39
|
+
gap: P.gap,
|
|
40
|
+
as: "ul",
|
|
41
|
+
children: _.map((e, t) => /* @__PURE__ */ p("li", {
|
|
42
|
+
className: "min-w-0",
|
|
43
|
+
children: /* @__PURE__ */ p(i, {
|
|
44
|
+
variant: "bordered",
|
|
45
|
+
size: "md",
|
|
46
|
+
className: "h-full",
|
|
47
|
+
link: e.href ? {
|
|
48
|
+
component: v?.component,
|
|
49
|
+
componentProps: {
|
|
50
|
+
...v?.props,
|
|
51
|
+
href: e.href
|
|
52
|
+
}
|
|
53
|
+
} : void 0,
|
|
54
|
+
children: /* @__PURE__ */ m("div", {
|
|
55
|
+
className: l,
|
|
56
|
+
children: [
|
|
57
|
+
e.icon && /* @__PURE__ */ p("div", {
|
|
58
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",
|
|
59
|
+
children: e.icon
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ p(n, {
|
|
62
|
+
as: "h3",
|
|
63
|
+
role: "heading-sm",
|
|
64
|
+
children: e.title
|
|
65
|
+
}),
|
|
66
|
+
e.description && /* @__PURE__ */ p(n, {
|
|
67
|
+
role: "body-sm",
|
|
68
|
+
tone: "muted",
|
|
69
|
+
children: e.description
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
}, e.id ?? t))
|
|
75
|
+
}),
|
|
76
|
+
A
|
|
77
|
+
] });
|
|
78
|
+
return /* @__PURE__ */ p(o, {
|
|
79
|
+
ref: M,
|
|
80
|
+
as: O,
|
|
81
|
+
spacing: P.spacing,
|
|
82
|
+
background: P.background,
|
|
83
|
+
contained: !1,
|
|
84
|
+
className: k,
|
|
85
|
+
...j,
|
|
86
|
+
children: P.contained ? /* @__PURE__ */ p(a, {
|
|
87
|
+
size: P.containerSize,
|
|
88
|
+
children: F
|
|
89
|
+
}) : F
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
h.displayName = "FeatureGrid";
|
|
93
|
+
//#endregion
|
|
94
|
+
export { h as FeatureGrid };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
import { ContainerSize } from '../container/container-config';
|
|
3
|
+
import { GridColumns } from '../grid/grid-config';
|
|
4
|
+
import { SectionBackground } from '../section/section-config';
|
|
5
|
+
/**
|
|
6
|
+
* Theme configuration options for the FeatureGrid component.
|
|
7
|
+
*
|
|
8
|
+
* Set under `components.featuregrid` in the AsheeUI config. Values feed the
|
|
9
|
+
* component-level fallback tier of the theme cascade.
|
|
10
|
+
*/
|
|
11
|
+
export interface FeatureGridConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Columns from the smallest viewport upwards.
|
|
14
|
+
*
|
|
15
|
+
* @default 1
|
|
16
|
+
*/
|
|
17
|
+
columns?: GridColumns;
|
|
18
|
+
/**
|
|
19
|
+
* Columns from the `md` breakpoint upwards.
|
|
20
|
+
*
|
|
21
|
+
* @default 2
|
|
22
|
+
*/
|
|
23
|
+
columnsMd?: GridColumns;
|
|
24
|
+
/**
|
|
25
|
+
* Columns from the `lg` breakpoint upwards.
|
|
26
|
+
*
|
|
27
|
+
* @default 3
|
|
28
|
+
*/
|
|
29
|
+
columnsLg?: GridColumns;
|
|
30
|
+
/**
|
|
31
|
+
* Space between the feature cards.
|
|
32
|
+
*
|
|
33
|
+
* @default "lg"
|
|
34
|
+
*/
|
|
35
|
+
gap?: Space;
|
|
36
|
+
/**
|
|
37
|
+
* Vertical padding of the band.
|
|
38
|
+
*
|
|
39
|
+
* @default "lg"
|
|
40
|
+
*/
|
|
41
|
+
spacing?: Space;
|
|
42
|
+
/**
|
|
43
|
+
* Background treatment of the band.
|
|
44
|
+
*
|
|
45
|
+
* @default "none"
|
|
46
|
+
*/
|
|
47
|
+
background?: SectionBackground;
|
|
48
|
+
/**
|
|
49
|
+
* Alignment of the heading above the grid.
|
|
50
|
+
*
|
|
51
|
+
* @default "center"
|
|
52
|
+
*/
|
|
53
|
+
align?: "start" | "center";
|
|
54
|
+
/**
|
|
55
|
+
* Maximum content width of the band.
|
|
56
|
+
*
|
|
57
|
+
* @default "lg"
|
|
58
|
+
*/
|
|
59
|
+
containerSize?: ContainerSize;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the band wraps its content in a {@link Container}.
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
contained?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Default config values registered for the FeatureGrid component.
|
|
69
|
+
*/
|
|
70
|
+
export declare const defaultFeatureGridConfig: FeatureGridConfig;
|
|
71
|
+
declare module "../../libs/registry" {
|
|
72
|
+
interface ComponentTypeConfigRegistry {
|
|
73
|
+
featuregrid: FeatureGridConfig;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Hard fallback values used when no config tier provides a value.
|
|
78
|
+
*/
|
|
79
|
+
export declare const FALLBACK_FEATURE_GRID_CONFIG: Required<FeatureGridConfig>;
|
|
80
|
+
//# sourceMappingURL=feature-grid-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-grid-config.d.ts","sourceRoot":"","sources":["../../../src/components/feature-grid/feature-grid-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,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBAUtC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,WAAW,EAAE,iBAAiB,CAAC;KAChC;CACF;AAID;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,iBAAiB,CAUpE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/feature-grid/feature-grid-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
columns: 1,
|
|
6
|
+
columnsMd: 2,
|
|
7
|
+
columnsLg: 3,
|
|
8
|
+
gap: "lg",
|
|
9
|
+
spacing: "lg",
|
|
10
|
+
background: "none",
|
|
11
|
+
align: "center",
|
|
12
|
+
containerSize: "lg",
|
|
13
|
+
contained: !0
|
|
14
|
+
};
|
|
15
|
+
e("featuregrid", t);
|
|
16
|
+
var n = {
|
|
17
|
+
columns: 1,
|
|
18
|
+
columnsMd: 2,
|
|
19
|
+
columnsLg: 3,
|
|
20
|
+
gap: "lg",
|
|
21
|
+
spacing: "lg",
|
|
22
|
+
background: "none",
|
|
23
|
+
align: "center",
|
|
24
|
+
containerSize: "lg",
|
|
25
|
+
contained: !0
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { n as FALLBACK_FEATURE_GRID_CONFIG, t as defaultFeatureGridConfig };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FeatureGrid component styles for AsheeUI.
|
|
3
|
+
* This file provides the static class mappings for the FeatureGrid pattern.
|
|
4
|
+
*/
|
|
5
|
+
/** The badge that holds a feature's icon. */
|
|
6
|
+
export declare const FEATURE_ICON_CLASS = "flex size-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary";
|
|
7
|
+
/** The inner arrangement of a feature card. */
|
|
8
|
+
export declare const FEATURE_CARD_BODY_CLASS = "flex flex-col gap-3";
|
|
9
|
+
/** The heading block above the grid. */
|
|
10
|
+
export declare const FEATURE_HEADING_CLASS = "mb-10";
|
|
11
|
+
//# sourceMappingURL=feature-grid-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-grid-styles.d.ts","sourceRoot":"","sources":["../../../src/components/feature-grid/feature-grid-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,4FAC4D,CAAC;AAE5F,+CAA+C;AAC/C,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,wCAAwC;AACxC,eAAO,MAAM,qBAAqB,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/feature-grid/feature-grid-styles.ts
|
|
3
|
+
var e = "flex size-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary", t = "flex flex-col gap-3", n = "mb-10";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as FEATURE_CARD_BODY_CLASS, n as FEATURE_HEADING_CLASS, e as FEATURE_ICON_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/feature-grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC"}
|