asheeui 1.1.1 → 2.0.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/dist/components/centered/Centered.d.ts +49 -0
- package/dist/components/centered/Centered.d.ts.map +1 -0
- package/dist/components/centered/Centered.js +32 -0
- package/dist/components/centered/centered-config.d.ts +63 -0
- package/dist/components/centered/centered-config.d.ts.map +1 -0
- package/dist/components/centered/centered-config.js +17 -0
- package/dist/components/centered/centered-styles.d.ts +11 -0
- package/dist/components/centered/centered-styles.d.ts.map +1 -0
- package/dist/components/centered/centered-styles.js +9 -0
- package/dist/components/centered/index.d.ts +3 -0
- package/dist/components/centered/index.d.ts.map +1 -0
- package/dist/components/centered/index.js +3 -0
- package/dist/components/chip/Chip.d.ts +8 -0
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +15 -15
- package/dist/components/data-table/DataTable.d.ts +137 -0
- package/dist/components/data-table/DataTable.d.ts.map +1 -0
- package/dist/components/data-table/DataTable.js +101 -0
- package/dist/components/data-table/data-table-config.d.ts +75 -0
- package/dist/components/data-table/data-table-config.d.ts.map +1 -0
- package/dist/components/data-table/data-table-config.js +24 -0
- package/dist/components/data-table/data-table-styles.d.ts +25 -0
- package/dist/components/data-table/data-table-styles.d.ts.map +1 -0
- package/dist/components/data-table/data-table-styles.js +5 -0
- package/dist/components/data-table/index.d.ts +3 -0
- package/dist/components/data-table/index.d.ts.map +1 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/docs-layout/DocsLayout.d.ts +94 -0
- package/dist/components/docs-layout/DocsLayout.d.ts.map +1 -0
- package/dist/components/docs-layout/DocsLayout.js +62 -0
- package/dist/components/docs-layout/docs-layout-config.d.ts +61 -0
- package/dist/components/docs-layout/docs-layout-config.d.ts.map +1 -0
- package/dist/components/docs-layout/docs-layout-config.js +22 -0
- package/dist/components/docs-layout/docs-layout-styles.d.ts +31 -0
- package/dist/components/docs-layout/docs-layout-styles.d.ts.map +1 -0
- package/dist/components/docs-layout/docs-layout-styles.js +5 -0
- package/dist/components/docs-layout/index.d.ts +3 -0
- package/dist/components/docs-layout/index.d.ts.map +1 -0
- package/dist/components/docs-layout/index.js +3 -0
- package/dist/components/empty-state/EmptyState.d.ts +19 -1
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -1
- package/dist/components/empty-state/EmptyState.js +10 -9
- package/dist/components/error-state/ErrorState.d.ts +98 -0
- package/dist/components/error-state/ErrorState.d.ts.map +1 -0
- package/dist/components/error-state/ErrorState.js +57 -0
- package/dist/components/error-state/error-state-config.d.ts +66 -0
- package/dist/components/error-state/error-state-config.d.ts.map +1 -0
- package/dist/components/error-state/error-state-config.js +20 -0
- package/dist/components/error-state/error-state-styles.d.ts +17 -0
- package/dist/components/error-state/error-state-styles.d.ts.map +1 -0
- package/dist/components/error-state/error-state-styles.js +5 -0
- package/dist/components/error-state/index.d.ts +3 -0
- package/dist/components/error-state/index.d.ts.map +1 -0
- package/dist/components/error-state/index.js +3 -0
- package/dist/components/file-upload/FileUpload.d.ts +112 -0
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.js +83 -0
- package/dist/components/file-upload/file-upload-config.d.ts +41 -0
- package/dist/components/file-upload/file-upload-config.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload-config.js +16 -0
- package/dist/components/file-upload/file-upload-styles.d.ts +22 -0
- package/dist/components/file-upload/file-upload-styles.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload-styles.js +9 -0
- package/dist/components/file-upload/file-upload.helpers.d.ts +26 -0
- package/dist/components/file-upload/file-upload.helpers.d.ts.map +1 -0
- package/dist/components/file-upload/file-upload.helpers.js +17 -0
- package/dist/components/file-upload/index.d.ts +3 -0
- package/dist/components/file-upload/index.d.ts.map +1 -0
- package/dist/components/file-upload/index.js +4 -0
- package/dist/components/loading-state/LoadingState.d.ts +57 -0
- package/dist/components/loading-state/LoadingState.d.ts.map +1 -0
- package/dist/components/loading-state/LoadingState.js +44 -0
- package/dist/components/loading-state/index.d.ts +3 -0
- package/dist/components/loading-state/index.d.ts.map +1 -0
- package/dist/components/loading-state/index.js +3 -0
- package/dist/components/loading-state/loading-state-config.d.ts +49 -0
- package/dist/components/loading-state/loading-state-config.d.ts.map +1 -0
- package/dist/components/loading-state/loading-state-config.js +18 -0
- package/dist/components/loading-state/loading-state-styles.d.ts +12 -0
- package/dist/components/loading-state/loading-state-styles.d.ts.map +1 -0
- package/dist/components/loading-state/loading-state-styles.js +9 -0
- package/dist/components/marketing-layout/MarketingLayout.d.ts +83 -0
- package/dist/components/marketing-layout/MarketingLayout.d.ts.map +1 -0
- package/dist/components/marketing-layout/MarketingLayout.js +40 -0
- package/dist/components/marketing-layout/index.d.ts +3 -0
- package/dist/components/marketing-layout/index.d.ts.map +1 -0
- package/dist/components/marketing-layout/index.js +3 -0
- package/dist/components/marketing-layout/marketing-layout-config.d.ts +60 -0
- package/dist/components/marketing-layout/marketing-layout-config.d.ts.map +1 -0
- package/dist/components/marketing-layout/marketing-layout-config.js +16 -0
- package/dist/components/marketing-layout/marketing-layout-styles.d.ts +8 -0
- package/dist/components/marketing-layout/marketing-layout-styles.d.ts.map +1 -0
- package/dist/components/marketing-layout/marketing-layout-styles.js +8 -0
- package/dist/components/search-input/SearchInput.d.ts +111 -0
- package/dist/components/search-input/SearchInput.d.ts.map +1 -0
- package/dist/components/search-input/SearchInput.js +86 -0
- package/dist/components/search-input/index.d.ts +3 -0
- package/dist/components/search-input/index.d.ts.map +1 -0
- package/dist/components/search-input/index.js +3 -0
- package/dist/components/search-input/search-input-config.d.ts +55 -0
- package/dist/components/search-input/search-input-config.d.ts.map +1 -0
- package/dist/components/search-input/search-input-config.js +20 -0
- package/dist/components/search-input/search-input-styles.d.ts +16 -0
- package/dist/components/search-input/search-input-styles.d.ts.map +1 -0
- package/dist/components/search-input/search-input-styles.js +9 -0
- package/dist/components/section-kit/ActionGroup.d.ts +8 -1
- package/dist/components/section-kit/ActionGroup.d.ts.map +1 -1
- package/dist/components/section-kit/ActionGroup.js +13 -9
- package/dist/components/section-kit/SkipLink.d.ts +50 -0
- package/dist/components/section-kit/SkipLink.d.ts.map +1 -0
- package/dist/components/section-kit/SkipLink.js +14 -0
- package/dist/components/section-kit/index.d.ts +5 -4
- package/dist/components/section-kit/index.d.ts.map +1 -1
- package/dist/components/section-kit/index.js +1 -0
- package/dist/components/sidebar-layout/SidebarLayout.d.ts.map +1 -1
- package/dist/components/sidebar-layout/SidebarLayout.js +25 -25
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts +10 -3
- package/dist/components/sidebar-layout/sidebar-layout-styles.d.ts.map +1 -1
- package/dist/components/sidebar-layout/sidebar-layout-styles.js +2 -2
- package/dist/components/split/Split.d.ts +68 -0
- package/dist/components/split/Split.d.ts.map +1 -0
- package/dist/components/split/Split.js +36 -0
- package/dist/components/split/index.d.ts +3 -0
- package/dist/components/split/index.d.ts.map +1 -0
- package/dist/components/split/index.js +3 -0
- package/dist/components/split/split-config.d.ts +83 -0
- package/dist/components/split/split-config.d.ts.map +1 -0
- package/dist/components/split/split-config.js +20 -0
- package/dist/components/split/split-styles.d.ts +36 -0
- package/dist/components/split/split-styles.d.ts.map +1 -0
- package/dist/components/split/split-styles.js +76 -0
- package/dist/components/stepper/Stepper.d.ts +94 -0
- package/dist/components/stepper/Stepper.d.ts.map +1 -0
- package/dist/components/stepper/Stepper.js +71 -0
- package/dist/components/stepper/index.d.ts +3 -0
- package/dist/components/stepper/index.d.ts.map +1 -0
- package/dist/components/stepper/index.js +3 -0
- package/dist/components/stepper/stepper-config.d.ts +51 -0
- package/dist/components/stepper/stepper-config.d.ts.map +1 -0
- package/dist/components/stepper/stepper-config.js +16 -0
- package/dist/components/stepper/stepper-styles.d.ts +30 -0
- package/dist/components/stepper/stepper-styles.d.ts.map +1 -0
- package/dist/components/stepper/stepper-styles.js +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -73
- package/dist/shared/spacing.d.ts +8 -0
- package/dist/shared/spacing.d.ts.map +1 -1
- package/dist/shared/spacing.js +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
/** The search region, which is announced as the page's search rather than a form. */
|
|
3
|
+
export declare const SEARCH_INPUT_REGION_CLASS = "relative w-full min-w-0";
|
|
4
|
+
/** The control that empties the field. */
|
|
5
|
+
export declare const SEARCH_INPUT_CLEAR_CLASS = "shrink-0";
|
|
6
|
+
/**
|
|
7
|
+
* The keyboard hint.
|
|
8
|
+
* It shows the shortcut a consumer has bound elsewhere; the field itself never
|
|
9
|
+
* listens for it, because a global shortcut is an application concern.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SEARCH_INPUT_HINT_CLASS = "pointer-events-none shrink-0 rounded border border-border px-1.5 py-0.5 text-xs text-foreground/60";
|
|
12
|
+
/** Density of the hint, so it matches the field it sits in. */
|
|
13
|
+
export declare const SEARCH_INPUT_HINT_SIZE_CLASS: Record<Size, string>;
|
|
14
|
+
/** Visually hidden label, for a field that is named but not captioned. */
|
|
15
|
+
export declare const SEARCH_INPUT_HIDDEN_LABEL_CLASS = "sr-only";
|
|
16
|
+
//# sourceMappingURL=search-input-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-input-styles.d.ts","sourceRoot":"","sources":["../../../src/components/search-input/search-input-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,qFAAqF;AACrF,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AAEnE,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uGACkE,CAAC;AAEvG,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI7D,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,+BAA+B,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/components/search-input/search-input-styles.ts
|
|
3
|
+
var e = "relative w-full min-w-0", t = "shrink-0", n = "pointer-events-none shrink-0 rounded border border-border px-1.5 py-0.5 text-xs text-foreground/60", r = {
|
|
4
|
+
sm: "text-[10px]",
|
|
5
|
+
md: "text-xs",
|
|
6
|
+
lg: "text-sm"
|
|
7
|
+
}, i = "sr-only";
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as SEARCH_INPUT_CLEAR_CLASS, i as SEARCH_INPUT_HIDDEN_LABEL_CLASS, n as SEARCH_INPUT_HINT_CLASS, r as SEARCH_INPUT_HINT_SIZE_CLASS, e as SEARCH_INPUT_REGION_CLASS };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ActionConfig } from '../../shared';
|
|
2
3
|
/**
|
|
3
4
|
* Props for the internal ActionGroup helper.
|
|
@@ -24,6 +25,12 @@ export interface ActionGroupProps {
|
|
|
24
25
|
* Additional classes for the wrapper.
|
|
25
26
|
*/
|
|
26
27
|
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Content rendered alongside the configured actions, inside the same group.
|
|
30
|
+
* It is the way a pattern places an action that carries a handler, because a
|
|
31
|
+
* configured action describes a destination rather than a React callback.
|
|
32
|
+
*/
|
|
33
|
+
children?: ReactNode;
|
|
27
34
|
}
|
|
28
35
|
/**
|
|
29
36
|
* Renders a pattern's configured actions.
|
|
@@ -43,5 +50,5 @@ export interface ActionGroupProps {
|
|
|
43
50
|
* />
|
|
44
51
|
* ```
|
|
45
52
|
*/
|
|
46
|
-
export declare function ActionGroup({ primaryAction, secondaryAction, align, className, }: ActionGroupProps): import("react").JSX.Element | null;
|
|
53
|
+
export declare function ActionGroup({ primaryAction, secondaryAction, align, className, children, }: ActionGroupProps): import("react").JSX.Element | null;
|
|
47
54
|
//# sourceMappingURL=ActionGroup.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/section-kit/ActionGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,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;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,aAAa,EACb,eAAe,EACf,KAAe,EACf,SAAS,EACT,QAAQ,GACT,EAAE,gBAAgB,sCAqBlB"}
|
|
@@ -3,16 +3,20 @@ import { cn as e } from "../../utils/cn.js";
|
|
|
3
3
|
import { Button as t } from "../button/Button.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
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", {
|
|
6
|
+
function i({ primaryAction: t, secondaryAction: i, align: o = "start", className: s, children: c }) {
|
|
7
|
+
return !t && !i && !c ? null : /* @__PURE__ */ r("div", {
|
|
8
8
|
className: e("flex flex-col gap-3 sm:flex-row sm:items-center", o === "center" && "sm:justify-center", s),
|
|
9
|
-
children: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
children: [
|
|
10
|
+
t && /* @__PURE__ */ n(a, {
|
|
11
|
+
action: t,
|
|
12
|
+
defaultVariant: "solid"
|
|
13
|
+
}),
|
|
14
|
+
i && /* @__PURE__ */ n(a, {
|
|
15
|
+
action: i,
|
|
16
|
+
defaultVariant: "bordered"
|
|
17
|
+
}),
|
|
18
|
+
c
|
|
19
|
+
]
|
|
16
20
|
});
|
|
17
21
|
}
|
|
18
22
|
function a({ action: e, defaultVariant: r }) {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skip link helper for AsheeUI.
|
|
3
|
+
*
|
|
4
|
+
* This file provides the internal `SkipLink` component: the first focusable
|
|
5
|
+
* element of a page composition, which lets a keyboard reader pass repeated
|
|
6
|
+
* navigation and land in the content. It is shared by the page compositions so
|
|
7
|
+
* the behaviour (and the classes that hide it until it is focused) are written
|
|
8
|
+
* once. It is an internal helper and is not part of the public component
|
|
9
|
+
* inventory.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Classes of the skip link.
|
|
13
|
+
*
|
|
14
|
+
* The link is visually hidden until it receives focus, which is the arrangement
|
|
15
|
+
* a keyboard reader needs: it is the first thing Tab reaches, and it is
|
|
16
|
+
* invisible to a pointer user until then.
|
|
17
|
+
*/
|
|
18
|
+
export declare const SKIP_LINK_CLASS = "sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:ring-2 focus:ring-primary";
|
|
19
|
+
/**
|
|
20
|
+
* Props for the internal SkipLink helper.
|
|
21
|
+
*/
|
|
22
|
+
export interface SkipLinkProps {
|
|
23
|
+
/**
|
|
24
|
+
* Identifier of the region the link leads to.
|
|
25
|
+
* The region is expected to be focusable (`tabIndex={-1}`), so following the
|
|
26
|
+
* link moves the reader into the content rather than only scrolling to it.
|
|
27
|
+
*/
|
|
28
|
+
targetId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Wording of the link, which is also its accessible name.
|
|
31
|
+
*/
|
|
32
|
+
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* Additional classes for the anchor.
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Renders the skip link of a page composition.
|
|
40
|
+
*
|
|
41
|
+
* @param props - The destination, the wording and any extra classes.
|
|
42
|
+
* @returns The rendered anchor.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```tsx
|
|
46
|
+
* <SkipLink targetId="main-content" label="Skip to content" />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function SkipLink({ targetId, label, className }: SkipLinkProps): import("react").JSX.Element;
|
|
50
|
+
//# sourceMappingURL=SkipLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkipLink.d.ts","sourceRoot":"","sources":["../../../src/components/section-kit/SkipLink.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,kMACqK,CAAC;AAElM;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,aAAa,+BAMrE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/section-kit/SkipLink.tsx
|
|
5
|
+
var n = "sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-background focus:px-4 focus:py-2 focus:text-foreground focus:ring-2 focus:ring-primary";
|
|
6
|
+
function r({ targetId: r, label: i, className: a }) {
|
|
7
|
+
return /* @__PURE__ */ t("a", {
|
|
8
|
+
href: `#${r}`,
|
|
9
|
+
className: e(n, a),
|
|
10
|
+
children: i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as SKIP_LINK_CLASS, r as SkipLink };
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* Internal section kit for AsheeUI.
|
|
3
3
|
*
|
|
4
4
|
* The kit holds the parts the framework's patterns share: the heading block
|
|
5
|
-
* (`SectionHeading`)
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* component inventory.
|
|
5
|
+
* (`SectionHeading`), the configured action group (`ActionGroup`) and the skip
|
|
6
|
+
* link the page compositions lead with (`SkipLink`). It is an internal helper
|
|
7
|
+
* module, like the field and menu helpers: it is deliberately not exported from
|
|
8
|
+
* the package entry point and is not part of the public component inventory.
|
|
9
9
|
*/
|
|
10
10
|
export * from './ActionGroup';
|
|
11
11
|
export * from './SectionHeading';
|
|
12
|
+
export * from './SkipLink';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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"}
|
|
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;AACjC,cAAc,YAAY,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAajC,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"}
|
|
@@ -4,37 +4,37 @@ import { cn as e } from "../../utils/cn.js";
|
|
|
4
4
|
import { useAsheeConfig as t } from "../../libs/context.js";
|
|
5
5
|
import { resolveConfigCascade as n } from "../../utils/resolve-token.js";
|
|
6
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,
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import { jsx as
|
|
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_ROW_CLASS as u, SIDEBAR_LAYOUT_WIDTH_CLASS as d } from "./sidebar-layout-styles.js";
|
|
8
|
+
import { forwardRef as f } from "react";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/sidebar-layout/SidebarLayout.tsx
|
|
11
|
-
var
|
|
12
|
-
let
|
|
13
|
-
side:
|
|
14
|
-
sidebarWidth:
|
|
15
|
-
stickySidebar:
|
|
16
|
-
},
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
ref:
|
|
19
|
-
className: e(c,
|
|
20
|
-
...
|
|
11
|
+
var h = f(({ sidebar: f, header: h, footer: g, sidebarLabel: _ = "Sidebar", side: v, sidebarWidth: y, stickySidebar: b, as: x, className: S, children: C, ...w }, T) => {
|
|
12
|
+
let E = t(), D = n({
|
|
13
|
+
side: v,
|
|
14
|
+
sidebarWidth: y,
|
|
15
|
+
stickySidebar: b
|
|
16
|
+
}, E.components?.sidebarlayout, r), O = D.side === "end";
|
|
17
|
+
return /* @__PURE__ */ m(x ?? "div", {
|
|
18
|
+
ref: T,
|
|
19
|
+
className: e(c, S),
|
|
20
|
+
...w,
|
|
21
21
|
children: [
|
|
22
|
-
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
className:
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
"aria-label":
|
|
27
|
-
className: e(i,
|
|
28
|
-
children:
|
|
29
|
-
}), /* @__PURE__ */
|
|
22
|
+
h,
|
|
23
|
+
/* @__PURE__ */ m("div", {
|
|
24
|
+
className: u,
|
|
25
|
+
children: [/* @__PURE__ */ p("aside", {
|
|
26
|
+
"aria-label": _,
|
|
27
|
+
className: e(i, d[D.sidebarWidth], O ? o : s, O ? a : void 0, D.stickySidebar && "lg:sticky lg:top-0 lg:h-dvh lg:overflow-y-auto"),
|
|
28
|
+
children: f
|
|
29
|
+
}), /* @__PURE__ */ p("div", {
|
|
30
30
|
className: l,
|
|
31
|
-
children:
|
|
31
|
+
children: C
|
|
32
32
|
})]
|
|
33
33
|
}),
|
|
34
|
-
|
|
34
|
+
g
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
h.displayName = "SidebarLayout";
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export { h as SidebarLayout };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { SidebarLayoutWidth } from './sidebar-layout-config';
|
|
2
2
|
/**
|
|
3
|
-
* The shell: a full-height column
|
|
4
|
-
*
|
|
3
|
+
* The shell: a full-height column of the header, the two-column row and the
|
|
4
|
+
* footer. The shell itself stays a column at every width, so the header and the
|
|
5
|
+
* footer always span the page rather than sitting beside the columns.
|
|
5
6
|
*/
|
|
6
|
-
export declare const SIDEBAR_LAYOUT_CLASS = "flex min-h-dvh w-full flex-col bg-background
|
|
7
|
+
export declare const SIDEBAR_LAYOUT_CLASS = "flex min-h-dvh w-full flex-col bg-background";
|
|
8
|
+
/**
|
|
9
|
+
* The row that holds the navigation column and the content column.
|
|
10
|
+
* It stacks the two columns on a narrow screen and places them side by side
|
|
11
|
+
* from the `lg` breakpoint, which is where the shell becomes two columns.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SIDEBAR_LAYOUT_ROW_CLASS = "flex w-full flex-1 flex-col lg:flex-row";
|
|
7
14
|
/** The navigation column, stacked above the content on a narrow screen. */
|
|
8
15
|
export declare const SIDEBAR_LAYOUT_ASIDE_CLASS = "w-full shrink-0 border-b border-border";
|
|
9
16
|
/** The navigation column when it sits at the trailing edge. */
|
|
@@ -1 +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
|
|
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;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iDACe,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,4CACM,CAAC;AAE5C,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
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",
|
|
3
|
+
var e = "flex min-h-dvh w-full flex-col bg-background", t = "flex w-full flex-1 flex-col lg:flex-row", n = "w-full shrink-0 border-b border-border", r = "lg:order-last", i = "lg:border-r", a = "lg:border-l", o = "lg:sticky lg:top-0 lg:h-dvh lg:overflow-y-auto", s = "flex min-w-0 flex-1 flex-col", c = {
|
|
4
4
|
sm: "lg:w-56",
|
|
5
5
|
md: "lg:w-64",
|
|
6
6
|
lg: "lg:w-80"
|
|
7
7
|
};
|
|
8
8
|
//#endregion
|
|
9
|
-
export {
|
|
9
|
+
export { n as SIDEBAR_LAYOUT_ASIDE_CLASS, a as SIDEBAR_LAYOUT_ASIDE_END_BORDER_CLASS, r as SIDEBAR_LAYOUT_ASIDE_END_CLASS, i as SIDEBAR_LAYOUT_ASIDE_START_BORDER_CLASS, o as SIDEBAR_LAYOUT_ASIDE_STICKY_CLASS, e as SIDEBAR_LAYOUT_CLASS, s as SIDEBAR_LAYOUT_CONTENT_CLASS, t as SIDEBAR_LAYOUT_ROW_CLASS, c as SIDEBAR_LAYOUT_WIDTH_CLASS };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { SplitConfig } from './split-config';
|
|
3
|
+
type BaseSplitProps = SplitConfig & Omit<HTMLAttributes<HTMLDivElement>, "color">;
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Split component.
|
|
6
|
+
*/
|
|
7
|
+
export interface SplitProps extends BaseSplitProps {
|
|
8
|
+
/**
|
|
9
|
+
* The first pane.
|
|
10
|
+
* Left out when the layout has one pane only, which is what a page that grows
|
|
11
|
+
* a second pane at a breakpoint starts as.
|
|
12
|
+
*/
|
|
13
|
+
start?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The second pane.
|
|
16
|
+
* Left out when the layout has one pane only.
|
|
17
|
+
*/
|
|
18
|
+
end?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Element to render.
|
|
21
|
+
* Defaults to a `div`.
|
|
22
|
+
*
|
|
23
|
+
* @default "div"
|
|
24
|
+
*/
|
|
25
|
+
as?: ElementType;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Two panes that stack on a narrow screen and sit side by side on a wide one.
|
|
29
|
+
*
|
|
30
|
+
* Split resolves its options through the standard configuration cascade, so
|
|
31
|
+
* `components.split` states the application's breakpoint and ratio once. It
|
|
32
|
+
* carries no width, no gutter and no background of its own: panes are as wide as
|
|
33
|
+
* the layout allows, and the content inside them decides its own presentation.
|
|
34
|
+
*
|
|
35
|
+
* The primitive never hides a pane. Below the breakpoint the panes stack, so
|
|
36
|
+
* everything stays in the document, reachable with the keyboard and read by a
|
|
37
|
+
* screen reader in a sensible order.
|
|
38
|
+
*
|
|
39
|
+
* @param props - Split configuration options and element attributes.
|
|
40
|
+
* @param props.start - The first pane.
|
|
41
|
+
* @param props.end - The second pane.
|
|
42
|
+
* @param props.stackAt - Breakpoint from which the panes sit side by side.
|
|
43
|
+
* Defaults to "lg".
|
|
44
|
+
* @param props.ratio - How the panes divide the width. Defaults to "equal".
|
|
45
|
+
* @param props.gap - Space between the panes. Defaults to "lg".
|
|
46
|
+
* @param props.align - Cross-axis alignment. Defaults to "stretch".
|
|
47
|
+
* @param props.divider - Draw a rule between the panes. Defaults to false.
|
|
48
|
+
* @param props.stickyEnd - Keep the second pane in view. Defaults to false.
|
|
49
|
+
* @param props.as - Element to render. Defaults to "div".
|
|
50
|
+
* @returns The rendered layout.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <Split
|
|
55
|
+
* stackAt="xl"
|
|
56
|
+
* ratio="start"
|
|
57
|
+
* start={<Typography role="body-md">The article.</Typography>}
|
|
58
|
+
* end={<TableOfContents items={items} />}
|
|
59
|
+
* stickyEnd
|
|
60
|
+
* />
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @see Grid - The two-dimensional layout, for more than two regions.
|
|
64
|
+
* @see SidebarLayout - The application shell, when a pane is navigation.
|
|
65
|
+
*/
|
|
66
|
+
export declare const Split: import('react').ForwardRefExoticComponent<SplitProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=Split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Split.d.ts","sourceRoot":"","sources":["../../../src/components/split/Split.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAWzE,KAAK,cAAc,GAAG,WAAW,GAC/B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;;;;OAKG;IACH,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,KAAK,uGAwDjB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { SPACE_GAP_CLASS as t } from "../../shared/spacing.js";
|
|
5
|
+
import { useAsheeConfig as n } from "../../libs/context.js";
|
|
6
|
+
import { resolveConfigCascade as r } from "../../utils/resolve-token.js";
|
|
7
|
+
import { FALLBACK_SPLIT_CONFIG as i } from "./split-config.js";
|
|
8
|
+
import { SPLIT_ALIGN_CLASS as a, SPLIT_BASE_CLASS as o, SPLIT_DIVIDER_CLASS as s, SPLIT_PANE_WIDTH_CLASS as c, SPLIT_STACK_CLASS as l } from "./split-styles.js";
|
|
9
|
+
import { forwardRef as u } from "react";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/split/Split.tsx
|
|
12
|
+
var p = u(({ as: u, start: p, end: m, stackAt: h, ratio: g, gap: _, align: v, divider: y, stickyEnd: b, className: x, ...S }, C) => {
|
|
13
|
+
let w = n(), T = r({
|
|
14
|
+
stackAt: h,
|
|
15
|
+
ratio: g,
|
|
16
|
+
gap: _,
|
|
17
|
+
align: v,
|
|
18
|
+
divider: y,
|
|
19
|
+
stickyEnd: b
|
|
20
|
+
}, w.components?.split, i), E = c[T.stackAt][T.ratio];
|
|
21
|
+
return /* @__PURE__ */ f(u ?? "div", {
|
|
22
|
+
ref: C,
|
|
23
|
+
className: e(o, l[T.stackAt], a[T.align], t[T.gap], T.divider && s[T.stackAt], x),
|
|
24
|
+
...S,
|
|
25
|
+
children: [p !== void 0 && /* @__PURE__ */ d("div", {
|
|
26
|
+
className: e("w-full min-w-0", E.start),
|
|
27
|
+
children: p
|
|
28
|
+
}), m !== void 0 && /* @__PURE__ */ d("div", {
|
|
29
|
+
className: e("w-full min-w-0", E.end, T.stickyEnd && "sticky top-0 self-start"),
|
|
30
|
+
children: m
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
p.displayName = "Split";
|
|
35
|
+
//#endregion
|
|
36
|
+
export { p as Split };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/split/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Space } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* The breakpoints at which two panes stop stacking.
|
|
4
|
+
* `sm` is a wide phone in landscape, `md` a tablet, `lg` a laptop and `xl` a
|
|
5
|
+
* large desktop, which are the framework's shared breakpoints.
|
|
6
|
+
*/
|
|
7
|
+
export type SplitStackAt = "sm" | "md" | "lg" | "xl";
|
|
8
|
+
/**
|
|
9
|
+
* How the two panes divide the width once they sit side by side.
|
|
10
|
+
*
|
|
11
|
+
* - `equal`: the panes share the width, for a comparison or a media pair.
|
|
12
|
+
* - `start`: the first pane takes two thirds, for a content column beside a
|
|
13
|
+
* narrower aside.
|
|
14
|
+
* - `end`: the second pane takes two thirds, for a narrow navigation column
|
|
15
|
+
* beside a wide content column.
|
|
16
|
+
*/
|
|
17
|
+
export type SplitRatio = "equal" | "start" | "end";
|
|
18
|
+
/**
|
|
19
|
+
* Cross-axis alignment of the two panes on the wide layout.
|
|
20
|
+
*/
|
|
21
|
+
export type SplitAlign = "start" | "center" | "stretch";
|
|
22
|
+
/**
|
|
23
|
+
* Theme configuration options for the Split component.
|
|
24
|
+
*
|
|
25
|
+
* Set under `components.split` in the AsheeUI config. Values feed the
|
|
26
|
+
* component-level tier of the theme cascade.
|
|
27
|
+
*/
|
|
28
|
+
export interface SplitConfig {
|
|
29
|
+
/**
|
|
30
|
+
* Breakpoint from which the panes sit side by side instead of stacking.
|
|
31
|
+
*
|
|
32
|
+
* @default "lg"
|
|
33
|
+
*/
|
|
34
|
+
stackAt?: SplitStackAt;
|
|
35
|
+
/**
|
|
36
|
+
* How the panes divide the width.
|
|
37
|
+
*
|
|
38
|
+
* @default "equal"
|
|
39
|
+
*/
|
|
40
|
+
ratio?: SplitRatio;
|
|
41
|
+
/**
|
|
42
|
+
* Space between the two panes.
|
|
43
|
+
*
|
|
44
|
+
* @default "lg"
|
|
45
|
+
*/
|
|
46
|
+
gap?: Space;
|
|
47
|
+
/**
|
|
48
|
+
* Cross-axis alignment of the panes.
|
|
49
|
+
*
|
|
50
|
+
* @default "stretch"
|
|
51
|
+
*/
|
|
52
|
+
align?: SplitAlign;
|
|
53
|
+
/**
|
|
54
|
+
* Whether a border is drawn between the panes on the wide layout.
|
|
55
|
+
* On the narrow layout the panes stack, so there is nothing to separate.
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
divider?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the second pane sticks to the top of the viewport while the first
|
|
62
|
+
* pane scrolls. It suits a table of contents or a summary column.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
stickyEnd?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Default config values registered for the Split component.
|
|
70
|
+
* The breakpoint and the ratio are pinned; alignment, divider and stickiness
|
|
71
|
+
* stay unset so a consumer's own value is the only one the cascade sees.
|
|
72
|
+
*/
|
|
73
|
+
export declare const defaultSplitConfig: SplitConfig;
|
|
74
|
+
declare module "../../libs/registry" {
|
|
75
|
+
interface ComponentTypeConfigRegistry {
|
|
76
|
+
split: SplitConfig;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Hard fallback values used when no config tier provides a value.
|
|
81
|
+
*/
|
|
82
|
+
export declare const FALLBACK_SPLIT_CONFIG: Required<SplitConfig>;
|
|
83
|
+
//# sourceMappingURL=split-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-config.d.ts","sourceRoot":"","sources":["../../../src/components/split/split-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC;IAEZ;;;;OAIG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAKhC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,KAAK,EAAE,WAAW,CAAC;KACpB;CACF;AAID;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAOvD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { registerComponentDefaults as e } from "../../libs/registry.js";
|
|
3
|
+
//#region src/components/split/split-config.ts
|
|
4
|
+
var t = {
|
|
5
|
+
stackAt: "lg",
|
|
6
|
+
ratio: "equal",
|
|
7
|
+
gap: "lg",
|
|
8
|
+
align: "stretch"
|
|
9
|
+
};
|
|
10
|
+
e("split", t);
|
|
11
|
+
var n = {
|
|
12
|
+
stackAt: "lg",
|
|
13
|
+
ratio: "equal",
|
|
14
|
+
gap: "lg",
|
|
15
|
+
align: "stretch",
|
|
16
|
+
divider: !1,
|
|
17
|
+
stickyEnd: !1
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { n as FALLBACK_SPLIT_CONFIG, t as defaultSplitConfig };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SplitAlign, SplitRatio, SplitStackAt } from './split-config';
|
|
2
|
+
/** Shared classes for every split. */
|
|
3
|
+
export declare const SPLIT_BASE_CLASS = "flex w-full min-w-0";
|
|
4
|
+
/**
|
|
5
|
+
* Stacking classes per breakpoint.
|
|
6
|
+
* Below the breakpoint the panes are a column, so a narrow screen reads the
|
|
7
|
+
* panes in the order they are written rather than side by side.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SPLIT_STACK_CLASS: Record<SplitStackAt, string>;
|
|
10
|
+
/** Cross-axis alignment classes for the wide layout. */
|
|
11
|
+
export declare const SPLIT_ALIGN_CLASS: Record<SplitAlign, string>;
|
|
12
|
+
/** Shared classes for every pane. */
|
|
13
|
+
export declare const SPLIT_PANE_BASE_CLASS = "w-full min-w-0";
|
|
14
|
+
/**
|
|
15
|
+
* Width each pane takes once the panes sit side by side, per breakpoint and
|
|
16
|
+
* ratio. `flex-basis` decides the main size of a flex item, so it settles the
|
|
17
|
+
* division of the width without the panes having to grow.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SPLIT_PANE_WIDTH_CLASS: Record<SplitStackAt, Record<SplitRatio, {
|
|
20
|
+
start: string;
|
|
21
|
+
end: string;
|
|
22
|
+
}>>;
|
|
23
|
+
/**
|
|
24
|
+
* Divider classes per breakpoint.
|
|
25
|
+
* Stacked panes are separated by a horizontal rule; side-by-side panes by a
|
|
26
|
+
* vertical one, which the same utility produces because it follows the flex
|
|
27
|
+
* direction.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SPLIT_DIVIDER_CLASS: Record<SplitStackAt, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Sticky classes for a pane that stays in view.
|
|
32
|
+
* A sticky flex item also needs to stop stretching, or it has no room to move
|
|
33
|
+
* within its parent.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SPLIT_STICKY_CLASS = "sticky top-0 self-start";
|
|
36
|
+
//# sourceMappingURL=split-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-styles.d.ts","sourceRoot":"","sources":["../../../src/components/split/split-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3E,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK1D,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAIxD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,YAAY,EACZ,MAAM,CAAC,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAsBnD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK5D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,4BAA4B,CAAC"}
|