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,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { SPACE_PADDING_Y_CLASS as t } from "../../shared/spacing.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { resolveCascade as r } from "../../utils/resolve-token.js";
|
|
7
|
+
import { Container as i } from "../container/Container.js";
|
|
8
|
+
import { FALLBACK_SECTION_CONFIG as a } from "./section-config.js";
|
|
9
|
+
import { SECTION_BACKGROUND_CLASS as o, SECTION_BASE_CLASS as s } from "./section-styles.js";
|
|
10
|
+
import { forwardRef as c } from "react";
|
|
11
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/section/Section.tsx
|
|
13
|
+
var u = c(({ as: c, spacing: u, background: d, contained: f, containerSize: p, divider: m, className: h, children: g, ..._ }, v) => {
|
|
14
|
+
let y = n().components?.section, b = r(u, y?.spacing, void 0, a.spacing), x = r(d, y?.background, void 0, a.background), S = r(f, y?.contained, void 0, a.contained), C = r(p, y?.containerSize, void 0, a.containerSize), w = r(m, y?.divider, void 0, a.divider);
|
|
15
|
+
return /* @__PURE__ */ l(c ?? "section", {
|
|
16
|
+
ref: v,
|
|
17
|
+
className: e(s, t[b], o[x], w && "border-t border-border", h),
|
|
18
|
+
..._,
|
|
19
|
+
children: S ? /* @__PURE__ */ l(i, {
|
|
20
|
+
size: C,
|
|
21
|
+
children: g
|
|
22
|
+
}) : g
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
u.displayName = "Section";
|
|
26
|
+
//#endregion
|
|
27
|
+
export { u as Section };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/section/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
import { ContainerSize } from '../container/container-config';
|
|
3
|
+
/**
|
|
4
|
+
* Background treatment of a section.
|
|
5
|
+
*
|
|
6
|
+
* - `none`: transparent, so the page background shows through.
|
|
7
|
+
* - `muted`: a subdued band, used to separate one section from the next.
|
|
8
|
+
* - `tinted`: a faint accent band, used to emphasise a section.
|
|
9
|
+
*/
|
|
10
|
+
export type SectionBackground = "none" | "muted" | "tinted";
|
|
11
|
+
/**
|
|
12
|
+
* Theme configuration options for the Section component.
|
|
13
|
+
*
|
|
14
|
+
* Set under `components.section` in the AsheeUI config. Values feed the
|
|
15
|
+
* component-level fallback tier of the theme cascade.
|
|
16
|
+
*/
|
|
17
|
+
export interface SectionConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Vertical padding of the section.
|
|
20
|
+
*
|
|
21
|
+
* @default "lg"
|
|
22
|
+
*/
|
|
23
|
+
spacing?: Space;
|
|
24
|
+
/**
|
|
25
|
+
* Background treatment.
|
|
26
|
+
*
|
|
27
|
+
* @default "none"
|
|
28
|
+
*/
|
|
29
|
+
background?: SectionBackground;
|
|
30
|
+
/**
|
|
31
|
+
* Whether the section wraps its children in a {@link Container}.
|
|
32
|
+
* Off by default, so a section can be composed with any other layout
|
|
33
|
+
* element. On, the section owns the maximum width and the gutter.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
contained?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Maximum content width used when the section is contained.
|
|
40
|
+
*
|
|
41
|
+
* @default "lg"
|
|
42
|
+
*/
|
|
43
|
+
containerSize?: ContainerSize;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to draw a separator line above the section.
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
divider?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Default config values registered for the Section component.
|
|
53
|
+
*/
|
|
54
|
+
export declare const defaultSectionConfig: SectionConfig;
|
|
55
|
+
declare module "../../libs/registry" {
|
|
56
|
+
interface ComponentTypeConfigRegistry {
|
|
57
|
+
section: SectionConfig;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Hard fallback values used when no config tier provides a value.
|
|
62
|
+
*/
|
|
63
|
+
export declare const FALLBACK_SECTION_CONFIG: Required<SectionConfig>;
|
|
64
|
+
//# sourceMappingURL=section-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-config.d.ts","sourceRoot":"","sources":["../../../src/components/section/section-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;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAMlC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,OAAO,EAAE,aAAa,CAAC;KACxB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,aAAa,CAM3D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/section/section-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
spacing: "lg",
|
|
6
|
+
background: "none",
|
|
7
|
+
contained: !1,
|
|
8
|
+
containerSize: "lg",
|
|
9
|
+
divider: !1
|
|
10
|
+
};
|
|
11
|
+
e("section", t);
|
|
12
|
+
var n = {
|
|
13
|
+
spacing: "lg",
|
|
14
|
+
background: "none",
|
|
15
|
+
contained: !1,
|
|
16
|
+
containerSize: "lg",
|
|
17
|
+
divider: !1
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as FALLBACK_SECTION_CONFIG, t as defaultSectionConfig };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SectionBackground } from './section-config';
|
|
2
|
+
/** Background treatment classes for each section background. */
|
|
3
|
+
export declare const SECTION_BACKGROUND_CLASS: Record<SectionBackground, string>;
|
|
4
|
+
/** Shared base classes for every section. */
|
|
5
|
+
export declare const SECTION_BASE_CLASS = "w-full";
|
|
6
|
+
/** Separator drawn above a section that asks for one. */
|
|
7
|
+
export declare const SECTION_DIVIDER_CLASS = "border-t border-border";
|
|
8
|
+
//# sourceMappingURL=section-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-styles.d.ts","sourceRoot":"","sources":["../../../src/components/section/section-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAItE,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,yDAAyD;AACzD,eAAO,MAAM,qBAAqB,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/section/section-styles.ts
|
|
3
|
+
var e = {
|
|
4
|
+
none: "",
|
|
5
|
+
muted: "bg-secondary/50",
|
|
6
|
+
tinted: "bg-primary/5"
|
|
7
|
+
}, t = "w-full", n = "border-t border-border";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as SECTION_BACKGROUND_CLASS, t as SECTION_BASE_CLASS, n as SECTION_DIVIDER_CLASS };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ActionConfig } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the internal ActionGroup helper.
|
|
4
|
+
*/
|
|
5
|
+
export interface ActionGroupProps {
|
|
6
|
+
/**
|
|
7
|
+
* The emphasised action of the pattern.
|
|
8
|
+
* Renders as a solid button or link.
|
|
9
|
+
*/
|
|
10
|
+
primaryAction?: ActionConfig;
|
|
11
|
+
/**
|
|
12
|
+
* The supporting action of the pattern.
|
|
13
|
+
* Renders as a bordered button or link.
|
|
14
|
+
*/
|
|
15
|
+
secondaryAction?: ActionConfig;
|
|
16
|
+
/**
|
|
17
|
+
* Horizontal alignment of the group on a wide screen.
|
|
18
|
+
* The actions are always stacked vertically on a narrow screen.
|
|
19
|
+
*
|
|
20
|
+
* @default "start"
|
|
21
|
+
*/
|
|
22
|
+
align?: "start" | "center";
|
|
23
|
+
/**
|
|
24
|
+
* Additional classes for the wrapper.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders a pattern's configured actions.
|
|
30
|
+
*
|
|
31
|
+
* The group stacks on a narrow screen and sits in a row from the `sm`
|
|
32
|
+
* breakpoint, which is the arrangement that keeps two actions readable on a
|
|
33
|
+
* phone without the consumer writing a media query.
|
|
34
|
+
*
|
|
35
|
+
* @param props - The configured actions and their alignment.
|
|
36
|
+
* @returns The rendered group, or null when the pattern has no actions.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <ActionGroup
|
|
41
|
+
* primaryAction={{ label: "Start free", href: "/signup" }}
|
|
42
|
+
* secondaryAction={{ label: "Read the docs", href: "/docs" }}
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function ActionGroup({ primaryAction, secondaryAction, align, className, }: ActionGroupProps): import("react").JSX.Element | null;
|
|
47
|
+
//# sourceMappingURL=ActionGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/section-kit/ActionGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC;IAE7B;;;OAGG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,aAAa,EACb,eAAe,EACf,KAAe,EACf,SAAS,GACV,EAAE,gBAAgB,sCAoBlB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { Button as t } from "../button/Button.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/section-kit/ActionGroup.tsx
|
|
6
|
+
function i({ primaryAction: t, secondaryAction: i, align: o = "start", className: s }) {
|
|
7
|
+
return !t && !i ? null : /* @__PURE__ */ r("div", {
|
|
8
|
+
className: e("flex flex-col gap-3 sm:flex-row sm:items-center", o === "center" && "sm:justify-center", s),
|
|
9
|
+
children: [t && /* @__PURE__ */ n(a, {
|
|
10
|
+
action: t,
|
|
11
|
+
defaultVariant: "solid"
|
|
12
|
+
}), i && /* @__PURE__ */ n(a, {
|
|
13
|
+
action: i,
|
|
14
|
+
defaultVariant: "bordered"
|
|
15
|
+
})]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a({ action: e, defaultVariant: r }) {
|
|
19
|
+
let { label: i, href: a, variant: o, color: s, size: c, radius: l, icon: u, component: d, componentProps: f } = e;
|
|
20
|
+
return /* @__PURE__ */ n(t, {
|
|
21
|
+
href: a,
|
|
22
|
+
variant: o ?? r,
|
|
23
|
+
color: s,
|
|
24
|
+
size: c,
|
|
25
|
+
radius: l,
|
|
26
|
+
startContent: u,
|
|
27
|
+
link: d ? {
|
|
28
|
+
component: d,
|
|
29
|
+
props: f
|
|
30
|
+
} : void 0,
|
|
31
|
+
children: i
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { i as ActionGroup };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Heading sizes a section heading can use.
|
|
4
|
+
* The size selects a semantic typography role, so the visual step and the
|
|
5
|
+
* markup step are decided together.
|
|
6
|
+
*/
|
|
7
|
+
export type SectionHeadingSize = "md" | "lg" | "xl";
|
|
8
|
+
/**
|
|
9
|
+
* Horizontal alignment of a section heading.
|
|
10
|
+
*/
|
|
11
|
+
export type SectionHeadingAlign = "start" | "center";
|
|
12
|
+
/**
|
|
13
|
+
* Props for the internal SectionHeading helper.
|
|
14
|
+
*/
|
|
15
|
+
export interface SectionHeadingProps {
|
|
16
|
+
/**
|
|
17
|
+
* Short label above the title, for example the category of a section.
|
|
18
|
+
*/
|
|
19
|
+
eyebrow?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* The heading itself.
|
|
22
|
+
*/
|
|
23
|
+
title?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Supporting sentence under the title.
|
|
26
|
+
*/
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Horizontal alignment of the block.
|
|
30
|
+
*
|
|
31
|
+
* @default "start"
|
|
32
|
+
*/
|
|
33
|
+
align?: SectionHeadingAlign;
|
|
34
|
+
/**
|
|
35
|
+
* Element the title renders as.
|
|
36
|
+
* Defaults to the element the resolved typography role implies.
|
|
37
|
+
*/
|
|
38
|
+
titleAs?: ElementType;
|
|
39
|
+
/**
|
|
40
|
+
* Size of the title.
|
|
41
|
+
*
|
|
42
|
+
* @default "md"
|
|
43
|
+
*/
|
|
44
|
+
size?: SectionHeadingSize;
|
|
45
|
+
/**
|
|
46
|
+
* Identifier applied to the title element, so a section can point at it with
|
|
47
|
+
* `aria-labelledby`.
|
|
48
|
+
*/
|
|
49
|
+
titleId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Additional classes for the wrapper.
|
|
52
|
+
*/
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The eyebrow, title and description block the patterns share.
|
|
57
|
+
*
|
|
58
|
+
* @param props - The heading content and its presentation options.
|
|
59
|
+
* @returns The rendered heading block, or null when it has nothing to show.
|
|
60
|
+
*
|
|
61
|
+
* @see Hero - Uses it for the page's leading statement.
|
|
62
|
+
* @see FeatureGrid - Uses it for the heading above the grid.
|
|
63
|
+
*/
|
|
64
|
+
export declare function SectionHeading({ eyebrow, title, description, align, titleAs, size, titleId, className, }: SectionHeadingProps): import("react").JSX.Element | null;
|
|
65
|
+
//# sourceMappingURL=SectionHeading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeading.d.ts","sourceRoot":"","sources":["../../../src/components/section-kit/SectionHeading.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,KAAK,EACL,WAAW,EACX,KAAe,EACf,OAAO,EACP,IAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE,mBAAmB,sCA4CrB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { Typography as t } from "../typography/Typography.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/section-kit/SectionHeading.tsx
|
|
6
|
+
function i({ eyebrow: i, title: a, description: o, align: s = "start", titleAs: c, size: l = "md", titleId: u, className: d }) {
|
|
7
|
+
if (!i && !a && !o) return null;
|
|
8
|
+
let f = s === "center";
|
|
9
|
+
return /* @__PURE__ */ r("div", {
|
|
10
|
+
className: e("flex flex-col gap-2", f && "items-center text-center", d),
|
|
11
|
+
children: [
|
|
12
|
+
i && /* @__PURE__ */ n(t, {
|
|
13
|
+
role: "overline",
|
|
14
|
+
tone: "primary",
|
|
15
|
+
children: i
|
|
16
|
+
}),
|
|
17
|
+
a && /* @__PURE__ */ n(t, {
|
|
18
|
+
as: c,
|
|
19
|
+
id: u,
|
|
20
|
+
role: l === "xl" ? "display" : l === "lg" ? "heading-xl" : "heading-lg",
|
|
21
|
+
className: f ? "text-balance" : "text-pretty",
|
|
22
|
+
children: a
|
|
23
|
+
}),
|
|
24
|
+
o && /* @__PURE__ */ n(t, {
|
|
25
|
+
role: "body-lg",
|
|
26
|
+
tone: "muted",
|
|
27
|
+
className: e("max-w-2xl", f && "mx-auto"),
|
|
28
|
+
children: o
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { i as SectionHeading };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal section kit for AsheeUI.
|
|
3
|
+
*
|
|
4
|
+
* The kit holds the parts the framework's patterns share: the heading block
|
|
5
|
+
* (`SectionHeading`) and the configured action group (`ActionGroup`). It is an
|
|
6
|
+
* internal helper module, like the field and menu helpers: it is deliberately
|
|
7
|
+
* not exported from the package entry point and is not part of the public
|
|
8
|
+
* component inventory.
|
|
9
|
+
*/
|
|
10
|
+
export * from './ActionGroup';
|
|
11
|
+
export * from './SectionHeading';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/section-kit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { SidebarLayoutConfig } from './sidebar-layout-config';
|
|
3
|
+
type BaseSidebarLayoutProps = SidebarLayoutConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
4
|
+
/**
|
|
5
|
+
* Props for the SidebarLayout component.
|
|
6
|
+
*/
|
|
7
|
+
export interface SidebarLayoutProps extends BaseSidebarLayoutProps {
|
|
8
|
+
/** The navigation column, typically the framework's `Sidebar`. */
|
|
9
|
+
sidebar: ReactNode;
|
|
10
|
+
/** Content above both columns, typically the framework's `Navbar`. */
|
|
11
|
+
header?: ReactNode;
|
|
12
|
+
/** Content below both columns. */
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Name of the navigation landmark the sidebar is rendered in.
|
|
16
|
+
* A shell usually holds one, so the name distinguishes it from the page's
|
|
17
|
+
* other navigation regions.
|
|
18
|
+
*
|
|
19
|
+
* @default "Sidebar"
|
|
20
|
+
*/
|
|
21
|
+
sidebarLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Element to render the shell as.
|
|
24
|
+
* Defaults to a `div`.
|
|
25
|
+
*
|
|
26
|
+
* @default "div"
|
|
27
|
+
*/
|
|
28
|
+
as?: ElementType;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* An application shell with a persistent navigation column.
|
|
32
|
+
*
|
|
33
|
+
* The shell is a single column on a narrow screen and two columns from the `lg`
|
|
34
|
+
* breakpoint, with the navigation column sticky and independently scrollable on
|
|
35
|
+
* a wide screen. It deliberately stacks the navigation above the content on a
|
|
36
|
+
* narrow screen rather than hiding it behind an off-canvas drawer: the whole page
|
|
37
|
+
* then stays reachable with the keyboard, with no focus trap to get wrong.
|
|
38
|
+
*
|
|
39
|
+
* @param props - SidebarLayout configuration options and element attributes.
|
|
40
|
+
* @param props.sidebar - The navigation column.
|
|
41
|
+
* @param props.header - Content above both columns.
|
|
42
|
+
* @param props.footer - Content below both columns.
|
|
43
|
+
* @param props.sidebarLabel - Name of the navigation landmark. Defaults to
|
|
44
|
+
* "Sidebar".
|
|
45
|
+
* @param props.side - Side the navigation column sits on. Defaults to "start".
|
|
46
|
+
* @param props.sidebarWidth - Width of the navigation column. Defaults to "md".
|
|
47
|
+
* @param props.stickySidebar - Keep the column in view. Defaults to true.
|
|
48
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
49
|
+
* @returns The rendered shell.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <SidebarLayout
|
|
54
|
+
* header={<Navbar brand="Ashee SMS" links={links} />}
|
|
55
|
+
* sidebar={<Sidebar items={items} activeKey="campaigns" />}>
|
|
56
|
+
* <PageContent>
|
|
57
|
+
* <Typography role="heading-lg">Campaigns</Typography>
|
|
58
|
+
* </PageContent>
|
|
59
|
+
* </SidebarLayout>
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @see Sidebar - The navigation the column usually holds.
|
|
63
|
+
* @see Page - The single-column shell, for a page without navigation.
|
|
64
|
+
*/
|
|
65
|
+
export declare const SidebarLayout: import('react').ForwardRefExoticComponent<SidebarLayoutProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=SidebarLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarLayout.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-layout/SidebarLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAYjC,KAAK,sBAAsB,GAAG,mBAAmB,GAC/C,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,kEAAkE;IAClE,OAAO,EAAE,SAAS,CAAC;IAEnB,sEAAsE;IACtE,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,kCAAkC;IAClC,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,aAAa,+GAyDzB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { FALLBACK_SIDEBAR_LAYOUT_CONFIG as r } from "./sidebar-layout-config.js";
|
|
7
|
+
import { SIDEBAR_LAYOUT_ASIDE_CLASS as i, SIDEBAR_LAYOUT_ASIDE_END_BORDER_CLASS as a, SIDEBAR_LAYOUT_ASIDE_END_CLASS as o, SIDEBAR_LAYOUT_ASIDE_START_BORDER_CLASS as s, SIDEBAR_LAYOUT_CLASS as c, SIDEBAR_LAYOUT_CONTENT_CLASS as l, SIDEBAR_LAYOUT_WIDTH_CLASS as u } from "./sidebar-layout-styles.js";
|
|
8
|
+
import { forwardRef as d } from "react";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/sidebar-layout/SidebarLayout.tsx
|
|
11
|
+
var m = d(({ sidebar: d, header: m, footer: h, sidebarLabel: g = "Sidebar", side: _, sidebarWidth: v, stickySidebar: y, as: b, className: x, children: S, ...C }, w) => {
|
|
12
|
+
let T = t(), E = n({
|
|
13
|
+
side: _,
|
|
14
|
+
sidebarWidth: v,
|
|
15
|
+
stickySidebar: y
|
|
16
|
+
}, T.components?.sidebarlayout, r), D = E.side === "end";
|
|
17
|
+
return /* @__PURE__ */ p(b ?? "div", {
|
|
18
|
+
ref: w,
|
|
19
|
+
className: e(c, x),
|
|
20
|
+
...C,
|
|
21
|
+
children: [
|
|
22
|
+
m,
|
|
23
|
+
/* @__PURE__ */ p("div", {
|
|
24
|
+
className: "flex w-full flex-1 flex-col lg:flex-row",
|
|
25
|
+
children: [/* @__PURE__ */ f("aside", {
|
|
26
|
+
"aria-label": g,
|
|
27
|
+
className: e(i, u[E.sidebarWidth], D ? o : s, D ? a : void 0, E.stickySidebar && "lg:sticky lg:top-0 lg:h-dvh lg:overflow-y-auto"),
|
|
28
|
+
children: d
|
|
29
|
+
}), /* @__PURE__ */ f("div", {
|
|
30
|
+
className: l,
|
|
31
|
+
children: S
|
|
32
|
+
})]
|
|
33
|
+
}),
|
|
34
|
+
h
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
m.displayName = "SidebarLayout";
|
|
39
|
+
//#endregion
|
|
40
|
+
export { m as SidebarLayout };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SidebarLayout component configuration for AsheeUI.
|
|
3
|
+
* This file defines the configuration type and defaults for the application
|
|
4
|
+
* shell that places a navigation column beside a page: side, sidebar width and
|
|
5
|
+
* stickiness. It registers the default configuration with the component registry
|
|
6
|
+
* and provides fallback values for the cascade resolution system.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Side the navigation column sits on from the `lg` breakpoint upwards.
|
|
10
|
+
*/
|
|
11
|
+
export type SidebarLayoutSide = "start" | "end";
|
|
12
|
+
/**
|
|
13
|
+
* Width of the navigation column.
|
|
14
|
+
*/
|
|
15
|
+
export type SidebarLayoutWidth = "sm" | "md" | "lg";
|
|
16
|
+
/**
|
|
17
|
+
* Theme configuration options for the SidebarLayout component.
|
|
18
|
+
*
|
|
19
|
+
* Set under `components.sidebarlayout` in the AsheeUI config. Values feed the
|
|
20
|
+
* component-level fallback tier of the theme cascade.
|
|
21
|
+
*/
|
|
22
|
+
export interface SidebarLayoutConfig {
|
|
23
|
+
/** Side the navigation column sits on. @default "start" */
|
|
24
|
+
side?: SidebarLayoutSide;
|
|
25
|
+
/** Width of the navigation column. @default "md" */
|
|
26
|
+
sidebarWidth?: SidebarLayoutWidth;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the navigation column stays in view while the content scrolls.
|
|
29
|
+
* Applies from the `lg` breakpoint upwards, where the column sits beside the
|
|
30
|
+
* content rather than above it.
|
|
31
|
+
*
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
stickySidebar?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default config values registered for the SidebarLayout component.
|
|
38
|
+
*/
|
|
39
|
+
export declare const defaultSidebarLayoutConfig: SidebarLayoutConfig;
|
|
40
|
+
declare module "../../libs/registry" {
|
|
41
|
+
interface ComponentTypeConfigRegistry {
|
|
42
|
+
sidebarlayout: SidebarLayoutConfig;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Hard fallback values used when no config tier provides a value.
|
|
47
|
+
*/
|
|
48
|
+
export declare const FALLBACK_SIDEBAR_LAYOUT_CONFIG: Required<SidebarLayoutConfig>;
|
|
49
|
+
//# sourceMappingURL=sidebar-layout-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-layout-config.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-layout/sidebar-layout-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,KAAK,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAEzB,oDAAoD;IACpD,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAIxC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,aAAa,EAAE,mBAAmB,CAAC;KACpC;CACF;AAID;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,mBAAmB,CAIxE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/sidebar-layout/sidebar-layout-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
side: "start",
|
|
6
|
+
sidebarWidth: "md",
|
|
7
|
+
stickySidebar: !0
|
|
8
|
+
};
|
|
9
|
+
e("sidebarlayout", t);
|
|
10
|
+
var n = {
|
|
11
|
+
side: "start",
|
|
12
|
+
sidebarWidth: "md",
|
|
13
|
+
stickySidebar: !0
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as FALLBACK_SIDEBAR_LAYOUT_CONFIG, t as defaultSidebarLayoutConfig };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SidebarLayoutWidth } from './sidebar-layout-config';
|
|
2
|
+
/**
|
|
3
|
+
* The shell: a full-height column that becomes a row from the `lg` breakpoint,
|
|
4
|
+
* where the navigation column and the content sit beside each other.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SIDEBAR_LAYOUT_CLASS = "flex min-h-dvh w-full flex-col bg-background lg:flex-row";
|
|
7
|
+
/** The navigation column, stacked above the content on a narrow screen. */
|
|
8
|
+
export declare const SIDEBAR_LAYOUT_ASIDE_CLASS = "w-full shrink-0 border-b border-border";
|
|
9
|
+
/** The navigation column when it sits at the trailing edge. */
|
|
10
|
+
export declare const SIDEBAR_LAYOUT_ASIDE_END_CLASS = "lg:order-last";
|
|
11
|
+
/** The separator of the navigation column on the leading edge. */
|
|
12
|
+
export declare const SIDEBAR_LAYOUT_ASIDE_START_BORDER_CLASS = "lg:border-r";
|
|
13
|
+
/** The separator of the navigation column on the trailing edge. */
|
|
14
|
+
export declare const SIDEBAR_LAYOUT_ASIDE_END_BORDER_CLASS = "lg:border-l";
|
|
15
|
+
/** Keeps the navigation column in view while the content scrolls. */
|
|
16
|
+
export declare const SIDEBAR_LAYOUT_ASIDE_STICKY_CLASS = "lg:sticky lg:top-0 lg:h-dvh lg:overflow-y-auto";
|
|
17
|
+
/** The content column. */
|
|
18
|
+
export declare const SIDEBAR_LAYOUT_CONTENT_CLASS = "flex min-w-0 flex-1 flex-col";
|
|
19
|
+
/** Width of the navigation column at each size, from `lg` upwards. */
|
|
20
|
+
export declare const SIDEBAR_LAYOUT_WIDTH_CLASS: Record<SidebarLayoutWidth, string>;
|
|
21
|
+
//# sourceMappingURL=sidebar-layout-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-layout-styles.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-layout/sidebar-layout-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,6DAC2B,CAAC;AAE7D,2EAA2E;AAC3E,eAAO,MAAM,0BAA0B,2CACG,CAAC;AAE3C,+DAA+D;AAC/D,eAAO,MAAM,8BAA8B,kBAAkB,CAAC;AAE9D,kEAAkE;AAClE,eAAO,MAAM,uCAAuC,gBAAgB,CAAC;AAErE,mEAAmE;AACnE,eAAO,MAAM,qCAAqC,gBAAgB,CAAC;AAEnE,qEAAqE;AACrE,eAAO,MAAM,iCAAiC,mDACI,CAAC;AAEnD,0BAA0B;AAC1B,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAE3E,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAIzE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/sidebar-layout/sidebar-layout-styles.ts
|
|
3
|
+
var e = "flex min-h-dvh w-full flex-col bg-background lg:flex-row", t = "w-full shrink-0 border-b border-border", n = "lg:order-last", r = "lg:border-r", i = "lg:border-l", a = "lg:sticky lg:top-0 lg:h-dvh lg:overflow-y-auto", o = "flex min-w-0 flex-1 flex-col", s = {
|
|
4
|
+
sm: "lg:w-56",
|
|
5
|
+
md: "lg:w-64",
|
|
6
|
+
lg: "lg:w-80"
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as SIDEBAR_LAYOUT_ASIDE_CLASS, i as SIDEBAR_LAYOUT_ASIDE_END_BORDER_CLASS, n as SIDEBAR_LAYOUT_ASIDE_END_CLASS, r as SIDEBAR_LAYOUT_ASIDE_START_BORDER_CLASS, a as SIDEBAR_LAYOUT_ASIDE_STICKY_CLASS, e as SIDEBAR_LAYOUT_CLASS, o as SIDEBAR_LAYOUT_CONTENT_CLASS, s as SIDEBAR_LAYOUT_WIDTH_CLASS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAMxD,OAAO,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAMxD,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAM3B,KAAK,iBAAiB,GAAG,cAAc,GACrC,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,QAAQ,0GAsDpB,CAAC"}
|