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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { useAsheeConfig as e } from "../../libs/context.js";
|
|
4
|
+
import { resolveCascade as t } from "../../utils/resolve-token.js";
|
|
5
|
+
import { CheckIcon as n } from "../../icons/CheckIcon.js";
|
|
6
|
+
import { Button as r } from "../button/Button.js";
|
|
7
|
+
import { FALLBACK_CLIPBOARD_CONFIG as i } from "./clipboard-config.js";
|
|
8
|
+
import { Clipboard as a } from "./Clipboard.js";
|
|
9
|
+
import { CopyIcon as o } from "../../icons/CopyIcon.js";
|
|
10
|
+
import { CLIPBOARD_STATUS_CLASS as s } from "./clipboard-styles.js";
|
|
11
|
+
import { forwardRef as c } from "react";
|
|
12
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/clipboard/CopyButton.tsx
|
|
14
|
+
var f = c(({ value: c, label: f, copiedLabel: p, copiedAnnouncement: m, timeout: h, onCopy: g, onError: _, copyIcon: v, copiedIcon: y, ...b }, x) => {
|
|
15
|
+
let S = e().components?.clipboard, C = t(f, S?.label, void 0, i.label), w = t(p, S?.copiedLabel, void 0, i.copiedLabel);
|
|
16
|
+
return /* @__PURE__ */ u(a, {
|
|
17
|
+
value: c,
|
|
18
|
+
timeout: h,
|
|
19
|
+
onCopy: g,
|
|
20
|
+
onError: _,
|
|
21
|
+
children: ({ copied: e, copy: t }) => /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(r, {
|
|
22
|
+
ref: x,
|
|
23
|
+
type: "button",
|
|
24
|
+
variant: b.variant ?? S?.variant ?? void 0,
|
|
25
|
+
color: b.color ?? S?.color ?? void 0,
|
|
26
|
+
size: b.size ?? S?.size ?? void 0,
|
|
27
|
+
startContent: e ? y ?? /* @__PURE__ */ u(n, {}) : v ?? /* @__PURE__ */ u(o, {}),
|
|
28
|
+
onClick: () => {
|
|
29
|
+
t();
|
|
30
|
+
},
|
|
31
|
+
...b,
|
|
32
|
+
children: e ? w : C
|
|
33
|
+
}), /* @__PURE__ */ u("span", {
|
|
34
|
+
role: "status",
|
|
35
|
+
"aria-live": "polite",
|
|
36
|
+
className: s,
|
|
37
|
+
"data-copied": e ? "true" : void 0,
|
|
38
|
+
children: e ? m ?? `${String(w)}: ${c}` : ""
|
|
39
|
+
})] })
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
f.displayName = "CopyButton";
|
|
43
|
+
//#endregion
|
|
44
|
+
export { f as CopyButton };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Color, Radius, Size, Variant } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Theme configuration options for the clipboard components.
|
|
4
|
+
*
|
|
5
|
+
* Set under `components.clipboard` in the AsheeUI config. Values feed the
|
|
6
|
+
* component-level fallback tier of the theme cascade.
|
|
7
|
+
*/
|
|
8
|
+
export interface ClipboardConfig {
|
|
9
|
+
/**
|
|
10
|
+
* How long the copied state lasts, in milliseconds.
|
|
11
|
+
*
|
|
12
|
+
* @default 2000
|
|
13
|
+
*/
|
|
14
|
+
timeout?: number;
|
|
15
|
+
/** Name of the copy control. @default "Copy" */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Name of the copy control once the text is on the clipboard.
|
|
18
|
+
* @default "Copied" */
|
|
19
|
+
copiedLabel?: string;
|
|
20
|
+
/** Visual style of the copy control. @default "bordered" */
|
|
21
|
+
variant?: Variant;
|
|
22
|
+
/** Accent colour of the copy control. @default "primary" */
|
|
23
|
+
color?: Color;
|
|
24
|
+
/** Density of the copy control. @default "sm" */
|
|
25
|
+
size?: Size;
|
|
26
|
+
/** Corner rounding of the copy control. Defaults to the framework radius. */
|
|
27
|
+
radius?: Radius;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Default config values registered for the clipboard components.
|
|
31
|
+
*/
|
|
32
|
+
export declare const defaultClipboardConfig: ClipboardConfig;
|
|
33
|
+
declare module "../../libs/registry" {
|
|
34
|
+
interface ComponentTypeConfigRegistry {
|
|
35
|
+
clipboard: ClipboardConfig;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Hard fallback values used when no config tier provides a value.
|
|
40
|
+
*/
|
|
41
|
+
export declare const FALLBACK_CLIPBOARD_CONFIG: Required<ClipboardConfig>;
|
|
42
|
+
//# sourceMappingURL=clipboard-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-config.d.ts","sourceRoot":"","sources":["../../../src/components/clipboard/clipboard-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;2BACuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,iDAAiD;IACjD,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAOpC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,SAAS,EAAE,eAAe,CAAC;KAC5B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,eAAe,CAQ/D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/clipboard/clipboard-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
timeout: 2e3,
|
|
6
|
+
label: "Copy",
|
|
7
|
+
copiedLabel: "Copied",
|
|
8
|
+
variant: "bordered",
|
|
9
|
+
color: "primary",
|
|
10
|
+
size: "sm"
|
|
11
|
+
};
|
|
12
|
+
e("clipboard", t);
|
|
13
|
+
var n = {
|
|
14
|
+
timeout: 2e3,
|
|
15
|
+
label: "Copy",
|
|
16
|
+
copiedLabel: "Copied",
|
|
17
|
+
variant: "bordered",
|
|
18
|
+
color: "primary",
|
|
19
|
+
size: "sm",
|
|
20
|
+
radius: "sm"
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { n as FALLBACK_CLIPBOARD_CONFIG, t as defaultClipboardConfig };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clipboard component styles for AsheeUI.
|
|
3
|
+
* This file provides the static class mappings for the clipboard pair.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The status region a copy control announces its result through.
|
|
7
|
+
* It is visually hidden and stays in the document, so the change is announced
|
|
8
|
+
* without moving the reader's focus off the control they pressed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CLIPBOARD_STATUS_CLASS = "sr-only";
|
|
11
|
+
//# sourceMappingURL=clipboard-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-styles.d.ts","sourceRoot":"","sources":["../../../src/components/clipboard/clipboard-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/clipboard/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes } from 'react';
|
|
2
|
+
import { ContainerConfig, ContainerSize } from './container-config';
|
|
3
|
+
type BaseContainerProps = ContainerConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Container component.
|
|
6
|
+
*/
|
|
7
|
+
export interface ContainerProps extends BaseContainerProps {
|
|
8
|
+
/**
|
|
9
|
+
* Element to render.
|
|
10
|
+
* Defaults to a `div`.
|
|
11
|
+
*
|
|
12
|
+
* @default "div"
|
|
13
|
+
*/
|
|
14
|
+
as?: ElementType;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum content width.
|
|
17
|
+
* Resolved through the standard cascade: prop, then
|
|
18
|
+
* `components.container.size`, then the framework fallback.
|
|
19
|
+
*
|
|
20
|
+
* @default "lg"
|
|
21
|
+
*/
|
|
22
|
+
size?: ContainerSize;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A centred content column with a maximum width.
|
|
26
|
+
*
|
|
27
|
+
* Container adds the three things a page needs from its outermost layout
|
|
28
|
+
* element and nothing else: a maximum width, a responsive gutter and horizontal
|
|
29
|
+
* centring. It carries no background and no vertical rhythm, so a `Section` can
|
|
30
|
+
* add those without the two fighting over the same properties.
|
|
31
|
+
*
|
|
32
|
+
* @param props - Container configuration options and element attributes.
|
|
33
|
+
* @param props.size - Maximum content width. Defaults to "lg".
|
|
34
|
+
* @param props.gutter - Reserve a horizontal gutter. Defaults to true.
|
|
35
|
+
* @param props.centered - Centre the content. Defaults to true.
|
|
36
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
37
|
+
* @returns The rendered container.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Container size="sm">
|
|
42
|
+
* <Typography role="body-md">A single reading column.</Typography>
|
|
43
|
+
* </Container>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @see Section - Adds vertical rhythm and a background around a container.
|
|
47
|
+
* @see PageContent - The application-page equivalent.
|
|
48
|
+
*/
|
|
49
|
+
export declare const Container: import('react').ForwardRefExoticComponent<ContainerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/components/container/Container.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,KAAK,WAAW,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAO5B,KAAK,kBAAkB,GAAG,eAAe,GACvC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,SAAS,2GA0CrB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { resolveCascade as n } from "../../utils/resolve-token.js";
|
|
6
|
+
import { FALLBACK_CONTAINER_CONFIG as r } from "./container-config.js";
|
|
7
|
+
import { CONTAINER_BASE_CLASS as i, CONTAINER_GUTTER_CLASS as a, CONTAINER_MAX_WIDTH_CLASS as o } from "./container-styles.js";
|
|
8
|
+
import { forwardRef as s } from "react";
|
|
9
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/container/Container.tsx
|
|
11
|
+
var l = s(({ as: s, size: l, gutter: u, centered: d, className: f, ...p }, m) => {
|
|
12
|
+
let h = t().components?.container, g = n(l, h?.size, void 0, r.size), _ = n(u, h?.gutter, void 0, r.gutter), v = n(d, h?.centered, void 0, r.centered);
|
|
13
|
+
return /* @__PURE__ */ c(s ?? "div", {
|
|
14
|
+
ref: m,
|
|
15
|
+
className: e(i, o[g], v && "mx-auto", _ && a, f),
|
|
16
|
+
...p
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
l.displayName = "Container";
|
|
20
|
+
//#endregion
|
|
21
|
+
export { l as Container };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Container component configuration for AsheeUI.
|
|
3
|
+
* This file defines the configuration type and defaults for the Container
|
|
4
|
+
* layout primitive, including its maximum width, gutter and centring
|
|
5
|
+
* behaviour. It registers the default configuration with the component
|
|
6
|
+
* registry and provides fallback values for the cascade resolution system.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Maximum content width of a container.
|
|
10
|
+
*
|
|
11
|
+
* - `sm`: a single reading column.
|
|
12
|
+
* - `md`: a narrow application or form column.
|
|
13
|
+
* - `lg`: the default content width.
|
|
14
|
+
* - `xl`: a wide application shell.
|
|
15
|
+
* - `full`: no maximum width.
|
|
16
|
+
*/
|
|
17
|
+
export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
18
|
+
/**
|
|
19
|
+
* Theme configuration options for the Container component.
|
|
20
|
+
*
|
|
21
|
+
* Set under `components.container` in the AsheeUI config. Values feed the
|
|
22
|
+
* component-level fallback tier of the theme cascade.
|
|
23
|
+
*/
|
|
24
|
+
export interface ContainerConfig {
|
|
25
|
+
/**
|
|
26
|
+
* Maximum content width.
|
|
27
|
+
*
|
|
28
|
+
* @default "lg"
|
|
29
|
+
*/
|
|
30
|
+
size?: ContainerSize;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to reserve a horizontal gutter.
|
|
33
|
+
* The gutter widens with the viewport, so content never touches the edge on
|
|
34
|
+
* a phone and never stretches to the full screen on a desktop.
|
|
35
|
+
*
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
gutter?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to centre the content horizontally.
|
|
41
|
+
* Leave this on unless the container is nested in another centring
|
|
42
|
+
* element that already does it.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
centered?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Default config values registered for the Container component.
|
|
50
|
+
*/
|
|
51
|
+
export declare const defaultContainerConfig: ContainerConfig;
|
|
52
|
+
declare module "../../libs/registry" {
|
|
53
|
+
interface ComponentTypeConfigRegistry {
|
|
54
|
+
container: ContainerConfig;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Hard fallback values used when no config tier provides a value.
|
|
59
|
+
*/
|
|
60
|
+
export declare const FALLBACK_CONTAINER_CONFIG: Required<ContainerConfig>;
|
|
61
|
+
//# sourceMappingURL=container-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-config.d.ts","sourceRoot":"","sources":["../../../src/components/container/container-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IAErB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAIpC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,SAAS,EAAE,eAAe,CAAC;KAC5B;CACF;AAID;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,eAAe,CAI/D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/container/container-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
size: "lg",
|
|
6
|
+
gutter: !0,
|
|
7
|
+
centered: !0
|
|
8
|
+
};
|
|
9
|
+
e("container", t);
|
|
10
|
+
var n = {
|
|
11
|
+
size: "lg",
|
|
12
|
+
gutter: !0,
|
|
13
|
+
centered: !0
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_CONTAINER_CONFIG, t as defaultContainerConfig };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ContainerSize } from './container-config';
|
|
2
|
+
/**
|
|
3
|
+
* Maximum width class for each container size.
|
|
4
|
+
* The classes are complete literals so Tailwind can see them.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CONTAINER_MAX_WIDTH_CLASS: Record<ContainerSize, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Shared base classes for every container.
|
|
9
|
+
* The container is a block element that never exceeds its parent.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CONTAINER_BASE_CLASS = "w-full";
|
|
12
|
+
/**
|
|
13
|
+
* Horizontal gutter applied when the gutter is enabled.
|
|
14
|
+
* The scale token is the layout gutter of the framework, so a container and a
|
|
15
|
+
* section align on the same edge.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CONTAINER_GUTTER_CLASS: string;
|
|
18
|
+
//# sourceMappingURL=container-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-styles.d.ts","sourceRoot":"","sources":["../../../src/components/container/container-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAMnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAA2B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SPACE_PADDING_X_CLASS as e } from "../../shared/spacing.js";
|
|
3
|
+
//#region src/components/container/container-styles.ts
|
|
4
|
+
var t = {
|
|
5
|
+
sm: "max-w-2xl",
|
|
6
|
+
md: "max-w-4xl",
|
|
7
|
+
lg: "max-w-6xl",
|
|
8
|
+
xl: "max-w-7xl",
|
|
9
|
+
full: "max-w-none"
|
|
10
|
+
}, n = "w-full", r = e.lg;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as CONTAINER_BASE_CLASS, r as CONTAINER_GUTTER_CLASS, t as CONTAINER_MAX_WIDTH_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/container/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ActionConfig } from '../../shared';
|
|
3
|
+
import { CtaConfig } from './cta-config';
|
|
4
|
+
type BaseCtaProps = CtaConfig & Omit<HTMLAttributes<HTMLElement>, "color" | "title">;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the CTA component.
|
|
7
|
+
*/
|
|
8
|
+
export interface CtaProps extends BaseCtaProps {
|
|
9
|
+
/**
|
|
10
|
+
* Short label above the title.
|
|
11
|
+
*/
|
|
12
|
+
eyebrow?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The headline of the band.
|
|
15
|
+
*/
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Supporting sentence under the headline.
|
|
19
|
+
*/
|
|
20
|
+
description?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* The emphasised action of the band.
|
|
23
|
+
*/
|
|
24
|
+
primaryAction?: ActionConfig;
|
|
25
|
+
/**
|
|
26
|
+
* The supporting action of the band.
|
|
27
|
+
*/
|
|
28
|
+
secondaryAction?: ActionConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Element to render the band as.
|
|
31
|
+
* Defaults to `section`.
|
|
32
|
+
*
|
|
33
|
+
* @default "section"
|
|
34
|
+
*/
|
|
35
|
+
as?: ElementType;
|
|
36
|
+
/**
|
|
37
|
+
* Content below the actions, for example a small print line.
|
|
38
|
+
*/
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A closing call to action.
|
|
43
|
+
*
|
|
44
|
+
* CTA is the band a page ends on: one statement, one or two actions, and
|
|
45
|
+
* optionally a panel that lifts it off the page. It deliberately does not own a
|
|
46
|
+
* form: a consumer that wants an email field in the band places its own controls
|
|
47
|
+
* through `children`, so the framework never couples a layout pattern to an
|
|
48
|
+
* application's subscription flow.
|
|
49
|
+
*
|
|
50
|
+
* @param props - CTA configuration options and element attributes.
|
|
51
|
+
* @param props.title - The headline of the band.
|
|
52
|
+
* @param props.eyebrow - Short label above the headline.
|
|
53
|
+
* @param props.description - Supporting sentence under the headline.
|
|
54
|
+
* @param props.primaryAction - The emphasised action.
|
|
55
|
+
* @param props.secondaryAction - The supporting action.
|
|
56
|
+
* @param props.align - Content alignment. Defaults to "center".
|
|
57
|
+
* @param props.spacing - Vertical padding. Defaults to "lg".
|
|
58
|
+
* @param props.background - Background treatment. Defaults to "none".
|
|
59
|
+
* @param props.panel - Panel treatment. Defaults to "bordered".
|
|
60
|
+
* @param props.containerSize - Maximum content width. Defaults to "lg".
|
|
61
|
+
* @param props.contained - Respect the framework's width and gutter.
|
|
62
|
+
* Defaults to true.
|
|
63
|
+
* @param props.as - Element to render. Defaults to "section".
|
|
64
|
+
* @returns The rendered band.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <CTA
|
|
69
|
+
* eyebrow="Ready when you are"
|
|
70
|
+
* title="Send your first campaign today"
|
|
71
|
+
* description="No card required, and no setup call."
|
|
72
|
+
* primaryAction={{ label: "Create an account", href: "/signup" }}
|
|
73
|
+
* secondaryAction={{ label: "Talk to sales", href: "/contact", variant: "ghost" }}
|
|
74
|
+
* />
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @see Hero - The leading band of the same page.
|
|
78
|
+
*/
|
|
79
|
+
export declare const CTA: import('react').ForwardRefExoticComponent<CtaProps & import('react').RefAttributes<HTMLElement>>;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=CTA.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CTA.d.ts","sourceRoot":"","sources":["../../../src/components/cta/CTA.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,cAAc,CAAC;AAOnE,KAAK,YAAY,GAAG,SAAS,GAC3B,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,GAAG,kGAsEf,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
|
+
import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
|
|
6
|
+
import { SectionHeading as r } from "../section-kit/SectionHeading.js";
|
|
7
|
+
import { Container as i } from "../container/Container.js";
|
|
8
|
+
import { Section as a } from "../section/Section.js";
|
|
9
|
+
import { ActionGroup as o } from "../section-kit/ActionGroup.js";
|
|
10
|
+
import { FALLBACK_CTA_CONFIG as s } from "./cta-config.js";
|
|
11
|
+
import { CTA_INNER_CLASS as c, CTA_PANEL_CLASS as l } from "./cta-styles.js";
|
|
12
|
+
import { forwardRef as u } from "react";
|
|
13
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
14
|
+
//#region src/components/cta/CTA.tsx
|
|
15
|
+
var p = u(({ eyebrow: u, title: p, description: m, primaryAction: h, secondaryAction: g, align: _, spacing: v, background: y, panel: b, containerSize: x, contained: S, as: C, className: w, children: T, ...E }, D) => {
|
|
16
|
+
let O = t(), k = n({
|
|
17
|
+
align: _,
|
|
18
|
+
spacing: v,
|
|
19
|
+
background: y,
|
|
20
|
+
panel: b,
|
|
21
|
+
containerSize: x,
|
|
22
|
+
contained: S
|
|
23
|
+
}, O.components?.cta, s), A = /* @__PURE__ */ d("div", {
|
|
24
|
+
className: l[k.panel],
|
|
25
|
+
children: /* @__PURE__ */ f("div", {
|
|
26
|
+
className: e(c, k.align === "center" && "items-center text-center"),
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ d(r, {
|
|
29
|
+
eyebrow: u,
|
|
30
|
+
title: p,
|
|
31
|
+
description: m,
|
|
32
|
+
align: k.align,
|
|
33
|
+
size: "lg"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ d(o, {
|
|
36
|
+
primaryAction: h,
|
|
37
|
+
secondaryAction: g,
|
|
38
|
+
align: k.align
|
|
39
|
+
}),
|
|
40
|
+
T
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ d(a, {
|
|
45
|
+
ref: D,
|
|
46
|
+
as: C,
|
|
47
|
+
spacing: k.spacing,
|
|
48
|
+
background: k.background,
|
|
49
|
+
contained: !1,
|
|
50
|
+
className: w,
|
|
51
|
+
...E,
|
|
52
|
+
children: k.contained ? /* @__PURE__ */ d(i, {
|
|
53
|
+
size: k.containerSize,
|
|
54
|
+
children: A
|
|
55
|
+
}) : A
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
p.displayName = "CTA";
|
|
59
|
+
//#endregion
|
|
60
|
+
export { p as CTA };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
import { ContainerSize } from '../container/container-config';
|
|
3
|
+
import { SectionBackground } from '../section/section-config';
|
|
4
|
+
/**
|
|
5
|
+
* Visual treatment of the call to action panel.
|
|
6
|
+
*
|
|
7
|
+
* - `bordered`: a bordered surface on the page background.
|
|
8
|
+
* - `muted`: a subdued surface without a border.
|
|
9
|
+
* - `plain`: no panel, so the actions sit directly on the band.
|
|
10
|
+
*/
|
|
11
|
+
export type CtaPanel = "bordered" | "muted" | "plain";
|
|
12
|
+
/**
|
|
13
|
+
* Theme configuration options for the CTA component.
|
|
14
|
+
*
|
|
15
|
+
* Set under `components.cta` in the AsheeUI config. Values feed the
|
|
16
|
+
* component-level fallback tier of the theme cascade.
|
|
17
|
+
*/
|
|
18
|
+
export interface CtaConfig {
|
|
19
|
+
/**
|
|
20
|
+
* Alignment of the panel content.
|
|
21
|
+
*
|
|
22
|
+
* @default "center"
|
|
23
|
+
*/
|
|
24
|
+
align?: "start" | "center";
|
|
25
|
+
/**
|
|
26
|
+
* Vertical padding of the band.
|
|
27
|
+
*
|
|
28
|
+
* @default "lg"
|
|
29
|
+
*/
|
|
30
|
+
spacing?: Space;
|
|
31
|
+
/**
|
|
32
|
+
* Background treatment of the band.
|
|
33
|
+
*
|
|
34
|
+
* @default "none"
|
|
35
|
+
*/
|
|
36
|
+
background?: SectionBackground;
|
|
37
|
+
/**
|
|
38
|
+
* Panel treatment.
|
|
39
|
+
*
|
|
40
|
+
* @default "bordered"
|
|
41
|
+
*/
|
|
42
|
+
panel?: CtaPanel;
|
|
43
|
+
/**
|
|
44
|
+
* Maximum content width of the band.
|
|
45
|
+
*
|
|
46
|
+
* @default "lg"
|
|
47
|
+
*/
|
|
48
|
+
containerSize?: ContainerSize;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the band wraps its content in a {@link Container}.
|
|
51
|
+
*
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
contained?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Default config values registered for the CTA component.
|
|
58
|
+
*/
|
|
59
|
+
export declare const defaultCtaConfig: CtaConfig;
|
|
60
|
+
declare module "../../libs/registry" {
|
|
61
|
+
interface ComponentTypeConfigRegistry {
|
|
62
|
+
cta: CtaConfig;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Hard fallback values used when no config tier provides a value.
|
|
67
|
+
*/
|
|
68
|
+
export declare const FALLBACK_CTA_CONFIG: Required<CtaConfig>;
|
|
69
|
+
//# sourceMappingURL=cta-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cta-config.d.ts","sourceRoot":"","sources":["../../../src/components/cta/cta-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAO9B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,GAAG,EAAE,SAAS,CAAC;KAChB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,SAAS,CAOnD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/cta/cta-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
align: "center",
|
|
6
|
+
spacing: "lg",
|
|
7
|
+
background: "none",
|
|
8
|
+
panel: "bordered",
|
|
9
|
+
containerSize: "lg",
|
|
10
|
+
contained: !0
|
|
11
|
+
};
|
|
12
|
+
e("cta", t);
|
|
13
|
+
var n = {
|
|
14
|
+
align: "center",
|
|
15
|
+
spacing: "lg",
|
|
16
|
+
background: "none",
|
|
17
|
+
panel: "bordered",
|
|
18
|
+
containerSize: "lg",
|
|
19
|
+
contained: !0
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { n as FALLBACK_CTA_CONFIG, t as defaultCtaConfig };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CtaPanel } from './cta-config';
|
|
2
|
+
/** Panel treatment classes. */
|
|
3
|
+
export declare const CTA_PANEL_CLASS: Record<CtaPanel, string>;
|
|
4
|
+
/** Inner arrangement of the panel. */
|
|
5
|
+
export declare const CTA_INNER_CLASS = "flex flex-col gap-6";
|
|
6
|
+
/** Centred variant of the inner arrangement. */
|
|
7
|
+
export declare const CTA_CENTERED_CLASS = "items-center text-center";
|
|
8
|
+
//# sourceMappingURL=cta-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cta-styles.d.ts","sourceRoot":"","sources":["../../../src/components/cta/cta-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,+BAA+B;AAC/B,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAIpD,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,eAAe,wBAAwB,CAAC;AAErD,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/cta/cta-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
bordered: "rounded-md border border-border bg-background p-8 md:p-12",
|
|
5
|
+
muted: "rounded-md bg-secondary/50 p-8 md:p-12",
|
|
6
|
+
plain: ""
|
|
7
|
+
}, t = "flex flex-col gap-6", n = "items-center text-center";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as CTA_CENTERED_CLASS, t as CTA_INNER_CLASS, e as CTA_PANEL_CLASS };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/cta/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
|