@monospaced/set-core 0.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/README.md +37 -0
- package/dist/components/alert/alert.d.ts +59 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/avatar/avatar.d.ts +44 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/get-initials.d.ts +18 -0
- package/dist/components/avatar/get-initials.d.ts.map +1 -0
- package/dist/components/badge/badge.d.ts +33 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/banner/banner.d.ts +55 -0
- package/dist/components/banner/banner.d.ts.map +1 -0
- package/dist/components/blockquote/blockquote.d.ts +37 -0
- package/dist/components/blockquote/blockquote.d.ts.map +1 -0
- package/dist/components/box/box.d.ts +43 -0
- package/dist/components/box/box.d.ts.map +1 -0
- package/dist/components/button/button.d.ts +94 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/card/card.d.ts +42 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +42 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/container/container.d.ts +31 -0
- package/dist/components/container/container.d.ts.map +1 -0
- package/dist/components/details/details.d.ts +35 -0
- package/dist/components/details/details.d.ts.map +1 -0
- package/dist/components/divider/divider.d.ts +29 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/expander/expander.d.ts +35 -0
- package/dist/components/expander/expander.d.ts.map +1 -0
- package/dist/components/fieldset/fieldset.d.ts +36 -0
- package/dist/components/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/figure/figure.d.ts +32 -0
- package/dist/components/figure/figure.d.ts.map +1 -0
- package/dist/components/grid/grid.d.ts +80 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/heading/heading.d.ts +35 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts +42 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icons.generated.d.ts +7 -0
- package/dist/components/icon/icons.generated.d.ts.map +1 -0
- package/dist/components/image/image.d.ts +82 -0
- package/dist/components/image/image.d.ts.map +1 -0
- package/dist/components/inline/inline.d.ts +39 -0
- package/dist/components/inline/inline.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +53 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/link/link.d.ts +74 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/logo/logo.d.ts +34 -0
- package/dist/components/logo/logo.d.ts.map +1 -0
- package/dist/components/menu/menu.d.ts +64 -0
- package/dist/components/menu/menu.d.ts.map +1 -0
- package/dist/components/nav/nav.d.ts +60 -0
- package/dist/components/nav/nav.d.ts.map +1 -0
- package/dist/components/page/page.d.ts +47 -0
- package/dist/components/page/page.d.ts.map +1 -0
- package/dist/components/panel/panel.d.ts +31 -0
- package/dist/components/panel/panel.d.ts.map +1 -0
- package/dist/components/pattern/pattern.d.ts +34 -0
- package/dist/components/pattern/pattern.d.ts.map +1 -0
- package/dist/components/poster/poster.d.ts +69 -0
- package/dist/components/poster/poster.d.ts.map +1 -0
- package/dist/components/prose/prose.d.ts +35 -0
- package/dist/components/prose/prose.d.ts.map +1 -0
- package/dist/components/radios/radios.d.ts +58 -0
- package/dist/components/radios/radios.d.ts.map +1 -0
- package/dist/components/range/range.d.ts +55 -0
- package/dist/components/range/range.d.ts.map +1 -0
- package/dist/components/root/root.d.ts +45 -0
- package/dist/components/root/root.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +56 -0
- package/dist/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +31 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/stack/stack.d.ts +36 -0
- package/dist/components/stack/stack.d.ts.map +1 -0
- package/dist/components/surface/surface.d.ts +31 -0
- package/dist/components/surface/surface.d.ts.map +1 -0
- package/dist/components/switch/switch.d.ts +38 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +43 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/textarea/textarea.d.ts +53 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/core.css +1 -0
- package/dist/helpers/node.d.ts +22 -0
- package/dist/helpers/node.d.ts.map +1 -0
- package/dist/helpers/string.d.ts +12 -0
- package/dist/helpers/string.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33977 -0
- package/dist/index.js.map +1 -0
- package/dist/spec.d.ts +178 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/test/spec.d.ts +14 -0
- package/dist/test/spec.d.ts.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetLogoTone = "default" | "neutral";
|
|
4
|
+
export type SetLogoSize = "sm" | "md" | "lg" | "fill";
|
|
5
|
+
export type SetLogoVariant = "primary" | "secondary" | "typographic" | "graphic";
|
|
6
|
+
export interface SetLogoProps {
|
|
7
|
+
/** DOM id. */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Accessible label. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Size. @default "md" */
|
|
12
|
+
size?: SetLogoSize;
|
|
13
|
+
/** Tone. @default "default" */
|
|
14
|
+
tone?: SetLogoTone;
|
|
15
|
+
/** Variant. @default "primary" */
|
|
16
|
+
variant?: SetLogoVariant;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Builds the IR tree for the Set logo component.
|
|
20
|
+
*
|
|
21
|
+
* @param props - Logo component props.
|
|
22
|
+
* @returns IR node for a masked logo element.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildSetLogo({ id, label, size, tone, variant, }: SetLogoProps): SetNode;
|
|
25
|
+
/**
|
|
26
|
+
* SSR renderer for the Set logo component.
|
|
27
|
+
*
|
|
28
|
+
* @param props - Logo component props.
|
|
29
|
+
* @returns HTML string for a masked logo element.
|
|
30
|
+
*/
|
|
31
|
+
export declare function renderSetLogo(props: SetLogoProps): string;
|
|
32
|
+
/** Declarative logo contract mirror for tooling, docs, and adapters. */
|
|
33
|
+
export declare const SET_LOGO_SPEC: SetComponentSpec;
|
|
34
|
+
//# sourceMappingURL=logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,CAAC;AAEd,MAAM,WAAW,YAAY;IAC3B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,IAAW,EACX,IAAgB,EAChB,OAAmB,GACpB,EAAE,YAAY,GAAG,OAAO,CAsBxB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBAmE3B,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetControlSize } from "../../types";
|
|
4
|
+
import { type SetButtonLabelVisibility, type SetButtonPlacement } from "../button/button";
|
|
5
|
+
import type { SetIconMirrorMode } from "../icon/icon";
|
|
6
|
+
export declare const SET_MENU_TAG_NAME = "set-menu";
|
|
7
|
+
export declare const SET_MENU_EVENT_CHOOSE = "set-menu-choose";
|
|
8
|
+
export type SetMenuAlign = "start" | "end";
|
|
9
|
+
export interface SetMenuItem {
|
|
10
|
+
/** Disables selection for this item. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Optional authored identifier surfaced in the choose event payload. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Visible item label text. Escaped before render. */
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SetMenuProps {
|
|
18
|
+
/** Popup alignment relative to the trigger. @default "start" */
|
|
19
|
+
align?: SetMenuAlign;
|
|
20
|
+
/** DOM id applied to the host. Trigger and popup ids are derived as `${id}-button` and `${id}-popup`. */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Action items rendered inside the popup menu. */
|
|
23
|
+
items: SetMenuItem[];
|
|
24
|
+
/** Control size applied to the host and composed trigger button. @default "md" */
|
|
25
|
+
size?: SetControlSize;
|
|
26
|
+
/** Icon name for the trigger button. */
|
|
27
|
+
triggerIcon?: string;
|
|
28
|
+
/** Icon mirroring mode for the trigger button icon. */
|
|
29
|
+
triggerIconMirrored?: SetIconMirrorMode;
|
|
30
|
+
/** Icon placement within the trigger button. @default "start" */
|
|
31
|
+
triggerIconPlacement?: SetButtonPlacement;
|
|
32
|
+
/** Accessible and visible trigger label text. Escaped before render. */
|
|
33
|
+
triggerLabel: string;
|
|
34
|
+
/** Trigger label visibility treatment. @default "visible" */
|
|
35
|
+
triggerLabelVisibility?: SetButtonLabelVisibility;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds the IR tree for the Set menu component.
|
|
39
|
+
*
|
|
40
|
+
* @param props - Menu component props.
|
|
41
|
+
* @returns IR node for a `set-menu` host.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildSetMenu({ align, id, items, size, triggerIcon, triggerIconMirrored, triggerIconPlacement, triggerLabel, triggerLabelVisibility, }: SetMenuProps): SetNode;
|
|
44
|
+
/**
|
|
45
|
+
* SSR renderer for the Set menu component.
|
|
46
|
+
*
|
|
47
|
+
* Emits a `set-menu` host containing a trigger button and a semantic
|
|
48
|
+
* `role="menu"` menu of button actions. Interactive open/close, focus
|
|
49
|
+
* management, and choose events are deferred to custom element upgrade.
|
|
50
|
+
*
|
|
51
|
+
* @param props - Menu component props.
|
|
52
|
+
* @returns HTML string for a `set-menu` host.
|
|
53
|
+
*/
|
|
54
|
+
export declare function renderSetMenu(props: SetMenuProps): string;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the `set-menu` custom element runtime.
|
|
57
|
+
*
|
|
58
|
+
* Safe to call multiple times. Existing SSR-rendered `set-menu` hosts upgrade
|
|
59
|
+
* in place and receive menu interaction behavior.
|
|
60
|
+
*/
|
|
61
|
+
export declare function defineSetMenu(): void;
|
|
62
|
+
/** Declarative menu contract mirror for tooling, docs, and adapters. */
|
|
63
|
+
export declare const SET_MENU_SPEC: SetComponentSpec;
|
|
64
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAC5C,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,yGAAyG;IACzG,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kFAAkF;IAClF,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,iEAAiE;IACjE,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;IAC1C,wEAAwE;IACxE,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,sBAAsB,CAAC,EAAE,wBAAwB,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAe,EACf,EAAE,EACF,KAAK,EACL,IAAW,EACX,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,GACvB,EAAE,YAAY,GAAG,OAAO,CA+ExB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAgQpC;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBA4I3B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export declare const SET_NAV_TAG_NAME = "set-nav";
|
|
4
|
+
export type SetNavCollapsible = "always" | "belowTablet";
|
|
5
|
+
export type SetNavExpanderPosition = "start" | "end";
|
|
6
|
+
export type SetNavSize = "sm" | "md";
|
|
7
|
+
export interface SetNavItem {
|
|
8
|
+
/** Emits `aria-current="page"` when true. @default false */
|
|
9
|
+
current?: boolean;
|
|
10
|
+
/** Link destination. */
|
|
11
|
+
href: string;
|
|
12
|
+
/** Link label (escaped before render). */
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SetNavProps {
|
|
16
|
+
/** Collapsible nav behavior. Emits `data-collapsible` as a structural hook for runtime enhancement. */
|
|
17
|
+
collapsible?: SetNavCollapsible;
|
|
18
|
+
/** ID applied to `.content`; also used as expander `aria-controls`. Required when `collapsible` is set. */
|
|
19
|
+
contentId?: string;
|
|
20
|
+
/** Accessible label for the runtime expander button when `collapsible` is set. */
|
|
21
|
+
expanderLabel?: string;
|
|
22
|
+
/** Expander placement when collapsible. @default "start" */
|
|
23
|
+
expanderPosition?: SetNavExpanderPosition;
|
|
24
|
+
/** DOM id. */
|
|
25
|
+
id?: string;
|
|
26
|
+
/** Nav items rendered as semantic list links. */
|
|
27
|
+
items: SetNavItem[];
|
|
28
|
+
/** Accessible nav label. */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Size variant. @default "md" */
|
|
31
|
+
size?: SetNavSize;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Builds the IR tree for the Set nav component.
|
|
35
|
+
*
|
|
36
|
+
* @param props - Nav component props.
|
|
37
|
+
* @returns IR node for a nav wrapper.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildSetNav({ collapsible, contentId, expanderLabel, expanderPosition, id, items, label, size, }: SetNavProps): SetNode;
|
|
40
|
+
/**
|
|
41
|
+
* SSR renderer for the Set nav component.
|
|
42
|
+
*
|
|
43
|
+
* Emits semantic `nav > ul > li > a` markup inside a `set-nav` host. When
|
|
44
|
+
* `collapsible` is provided, the renderer emits structural hooks only;
|
|
45
|
+
* interactive expander/menu behavior is deferred to custom element upgrade.
|
|
46
|
+
*
|
|
47
|
+
* @param props - Nav component props.
|
|
48
|
+
* @returns HTML string for a nav wrapper.
|
|
49
|
+
*/
|
|
50
|
+
export declare function renderSetNav(props: SetNavProps): string;
|
|
51
|
+
/**
|
|
52
|
+
* Defines the `set-nav` custom element runtime.
|
|
53
|
+
*
|
|
54
|
+
* Safe to call multiple times. Existing SSR-rendered `set-nav` hosts upgrade
|
|
55
|
+
* in place and receive collapsible runtime behavior when configured.
|
|
56
|
+
*/
|
|
57
|
+
export declare function defineSetNav(): void;
|
|
58
|
+
/** Declarative nav contract mirror for tooling, docs, and adapters. */
|
|
59
|
+
export declare const SET_NAV_SPEC: SetComponentSpec;
|
|
60
|
+
//# sourceMappingURL=nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../src/components/nav/nav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,aAAa,CAAC;AACzD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,KAAK,CAAC;AACrD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAGrC,MAAM,WAAW,UAAU;IACzB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,uGAAuG;IACvG,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,2GAA2G;IAC3G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,SAAS,EACT,aAAa,EACb,gBAA0B,EAC1B,EAAE,EACF,KAAK,EACL,KAAK,EACL,IAAW,GACZ,EAAE,WAAW,GAAG,OAAO,CA8EvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAyJnC;AAED,uEAAuE;AACvE,eAAO,MAAM,YAAY,EAAE,gBAmH1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetPageHeaderBorder = "always" | "scroll";
|
|
4
|
+
export type SetPageHeaderSize = "sm" | "md" | "lg";
|
|
5
|
+
export type SetPageStickyHeader = "always" | "belowNotebook";
|
|
6
|
+
export interface SetPageProps {
|
|
7
|
+
/** Optional banner region markup rendered before the header. Caller sanitizes untrusted content. */
|
|
8
|
+
banner?: string;
|
|
9
|
+
/** Centers the main region within the page shell. Emits `data-center-main` only when true. @default false */
|
|
10
|
+
centerMain?: boolean;
|
|
11
|
+
/** Main region markup rendered inside the page-owned `<main>`. Caller sanitizes untrusted content. */
|
|
12
|
+
children?: string;
|
|
13
|
+
/** Header region markup. Caller sanitizes untrusted content. */
|
|
14
|
+
header: string;
|
|
15
|
+
/** Bottom border on the header. `"scroll"` requires `stickyHeader`. */
|
|
16
|
+
headerBorder?: SetPageHeaderBorder;
|
|
17
|
+
/** Header size. Reserves a minimum block size on the header. @default "md" */
|
|
18
|
+
headerSize?: SetPageHeaderSize;
|
|
19
|
+
/** DOM id. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Sticky header behavior. Emits `data-sticky-header` when provided. */
|
|
22
|
+
stickyHeader?: SetPageStickyHeader;
|
|
23
|
+
/** Footer region markup. Caller sanitizes untrusted content. */
|
|
24
|
+
footer: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Builds the IR tree for the Set page shell.
|
|
28
|
+
*
|
|
29
|
+
* @param props - Page shell props.
|
|
30
|
+
* @returns IR node for a page wrapper.
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildSetPage({ banner, centerMain, children, footer, header, headerBorder, headerSize, id, stickyHeader, }: SetPageProps): SetNode;
|
|
33
|
+
/**
|
|
34
|
+
* SSR renderer for the Set page shell.
|
|
35
|
+
*
|
|
36
|
+
* Emits a prescribed page structure with an optional banner region followed by
|
|
37
|
+
* header, main, and footer content. The page shell owns the outer layout
|
|
38
|
+
* wrapper and region elements so the internal page layout can evolve without
|
|
39
|
+
* changing the consumer-facing region contract.
|
|
40
|
+
*
|
|
41
|
+
* @param props - Page shell props.
|
|
42
|
+
* @returns HTML string for a page wrapper.
|
|
43
|
+
*/
|
|
44
|
+
export declare function renderSetPage(props: SetPageProps): string;
|
|
45
|
+
/** Declarative page contract mirror for tooling, docs, and adapters. */
|
|
46
|
+
export declare const SET_PAGE_SPEC: SetComponentSpec;
|
|
47
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/components/page/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,eAAe,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,oGAAoG;IACpG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6GAA6G;IAC7G,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,MAAM,EACN,YAAY,EACZ,UAAiB,EACjB,EAAE,EACF,YAAY,GACb,EAAE,YAAY,GAAG,OAAO,CAwCxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBA4F3B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetSurfaceVariant } from "../surface/surface";
|
|
4
|
+
export type SetPanelPadding = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
|
+
export interface SetPanelProps {
|
|
6
|
+
/** Trusted inner HTML. */
|
|
7
|
+
children?: string;
|
|
8
|
+
/** DOM id. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** Inner spacing scale. @default "md" */
|
|
11
|
+
padding?: SetPanelPadding;
|
|
12
|
+
/** Surface context. */
|
|
13
|
+
surface?: SetSurfaceVariant;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Builds the IR tree for the Set panel component.
|
|
17
|
+
*
|
|
18
|
+
* @param props - Panel component props.
|
|
19
|
+
* @returns IR node for a panel wrapper.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildSetPanel({ children, id, padding, surface, }: SetPanelProps): SetNode;
|
|
22
|
+
/**
|
|
23
|
+
* SSR renderer for the Set panel component.
|
|
24
|
+
*
|
|
25
|
+
* @param props - Panel component props.
|
|
26
|
+
* @returns HTML string for a panel wrapper.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderSetPanel(props: SetPanelProps): string;
|
|
29
|
+
/** Declarative panel contract mirror for tooling, docs, and adapters. */
|
|
30
|
+
export declare const SET_PANEL_SPEC: SetComponentSpec;
|
|
31
|
+
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/panel/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,uBAAuB;IACvB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,EAAE,EACF,OAAc,EACd,OAAO,GACR,EAAE,aAAa,GAAG,OAAO,CAczB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAkD5B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetPatternSize = "xs" | "sm" | "md" | "lg" | "xl" | "fill";
|
|
4
|
+
export type SetPatternTone = "default" | "subtle" | "support";
|
|
5
|
+
export type SetPatternVariant = "tile" | "tileLight" | "tileDark";
|
|
6
|
+
export interface SetPatternProps {
|
|
7
|
+
/** Trusted inner HTML rendered inside the pattern container. */
|
|
8
|
+
children?: string;
|
|
9
|
+
/** DOM id. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Pattern variant. @default "tile" */
|
|
12
|
+
variant?: SetPatternVariant;
|
|
13
|
+
/** Tone. @default "default" */
|
|
14
|
+
tone?: SetPatternTone;
|
|
15
|
+
/** Size mode. @default "md" */
|
|
16
|
+
size?: SetPatternSize;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Builds the IR tree for the Set pattern component.
|
|
20
|
+
*
|
|
21
|
+
* @param props - Pattern component props.
|
|
22
|
+
* @returns IR node for a pattern container.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildSetPattern({ children, id, size, tone, variant, }?: SetPatternProps): SetNode;
|
|
25
|
+
/**
|
|
26
|
+
* SSR renderer for the Set pattern component.
|
|
27
|
+
*
|
|
28
|
+
* @param props - Pattern component props.
|
|
29
|
+
* @returns HTML string for a pattern container.
|
|
30
|
+
*/
|
|
31
|
+
export declare function renderSetPattern(props?: SetPatternProps): string;
|
|
32
|
+
/** Declarative pattern contract mirror for tooling, docs, and adapters. */
|
|
33
|
+
export declare const SET_PATTERN_SPEC: SetComponentSpec;
|
|
34
|
+
//# sourceMappingURL=pattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../../src/components/pattern/pattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,EAAE,EACF,IAAW,EACX,IAAgB,EAChB,OAAgB,GACjB,GAAE,eAAoB,GAAG,OAAO,CAehC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,eAAoB,GAAG,MAAM,CAEpE;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,EAAE,gBAmE9B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import { type SetImageGravity } from "../image/image";
|
|
4
|
+
import type { SetTheme } from "../root/root";
|
|
5
|
+
import type { SetSurfaceVariant } from "../surface/surface";
|
|
6
|
+
export type SetPosterSurface = Exclude<SetSurfaceVariant, "inverse" | "brand-inverse">;
|
|
7
|
+
declare const __posterMediaBrand: unique symbol;
|
|
8
|
+
/**
|
|
9
|
+
* HTML string returned by `renderSetPosterImage`. The branded type forces
|
|
10
|
+
* consumers through the helper, which locks the cover/priority defaults
|
|
11
|
+
* Poster's layout needs.
|
|
12
|
+
*/
|
|
13
|
+
export type SetPosterMedia = string & {
|
|
14
|
+
readonly [__posterMediaBrand]: true;
|
|
15
|
+
};
|
|
16
|
+
export interface SetPosterImageProps {
|
|
17
|
+
/** Focal gravity for the cover crop. @default "C" */
|
|
18
|
+
gravity?: SetImageGravity;
|
|
19
|
+
/** HTML `sizes` attribute. */
|
|
20
|
+
sizes?: string;
|
|
21
|
+
/** Image source URL. */
|
|
22
|
+
src: string;
|
|
23
|
+
/** Candidate sources for the image (HTML `img[srcset]` format). */
|
|
24
|
+
srcSet?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Renders the image media for a Poster. `cover` and `priority` are locked
|
|
28
|
+
* to the values Poster's layout needs; `alt` is empty because Poster's
|
|
29
|
+
* image is decorative (content-over-background).
|
|
30
|
+
*
|
|
31
|
+
* @param props - Poster image props.
|
|
32
|
+
* @returns HTML string suitable for Poster's `media` prop.
|
|
33
|
+
*/
|
|
34
|
+
export declare function renderSetPosterImage(props: SetPosterImageProps): SetPosterMedia;
|
|
35
|
+
export interface SetPosterProps {
|
|
36
|
+
/** Foreground HTML content above the media. Caller sanitizes untrusted content. */
|
|
37
|
+
children?: string;
|
|
38
|
+
/** Absolute theme lock for foreground content over non-themeable media. */
|
|
39
|
+
contentTheme?: SetTheme;
|
|
40
|
+
/** DOM id. */
|
|
41
|
+
id?: string;
|
|
42
|
+
/** Background media; build with `renderSetPosterImage`. */
|
|
43
|
+
media: SetPosterMedia;
|
|
44
|
+
/** Surface context. Emits `data-set-surface` when provided. */
|
|
45
|
+
surface?: SetPosterSurface;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Builds the IR tree for the Set poster component.
|
|
49
|
+
*
|
|
50
|
+
* @param props - Poster component props.
|
|
51
|
+
* @returns IR node for a poster container.
|
|
52
|
+
*/
|
|
53
|
+
export declare function buildSetPoster({ children, contentTheme, id, media, surface, }: SetPosterProps): SetNode;
|
|
54
|
+
/**
|
|
55
|
+
* SSR renderer for the Set poster component.
|
|
56
|
+
*
|
|
57
|
+
* Emits a single `div.poster` root containing a media wrapper behind optional
|
|
58
|
+
* trusted foreground content. `contentTheme`, when provided, is an absolute
|
|
59
|
+
* local foreground theme override intended for poster-like content over
|
|
60
|
+
* non-themeable media.
|
|
61
|
+
*
|
|
62
|
+
* @param props - Poster component props.
|
|
63
|
+
* @returns HTML string for a poster container.
|
|
64
|
+
*/
|
|
65
|
+
export declare function renderSetPoster(props: SetPosterProps): string;
|
|
66
|
+
/** Declarative poster contract mirror for tooling, docs, and adapters. */
|
|
67
|
+
export declare const SET_POSTER_SPEC: SetComponentSpec;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=poster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poster.d.ts","sourceRoot":"","sources":["../../../src/components/poster/poster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,iBAAiB,EACjB,SAAS,GAAG,eAAe,CAC5B,CAAC;AAEF,OAAO,CAAC,MAAM,kBAAkB,EAAE,OAAO,MAAM,CAAC;AAChD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,EAAE,IAAI,CAAC;CACrC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,GACzB,cAAc,CAOhB;AAED,MAAM,WAAW,cAAc;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,KAAK,EAAE,cAAc,CAAC;IACtB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,YAAY,EACZ,EAAE,EACF,KAAK,EACL,OAAO,GACR,EAAE,cAAc,GAAG,OAAO,CAgC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE7D;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,gBAuE7B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetAlign } from "../../types";
|
|
4
|
+
export type SetProseHangingPunctuation = "always" | "notebook";
|
|
5
|
+
export interface SetProseProps {
|
|
6
|
+
/** Trusted inner HTML. */
|
|
7
|
+
children: string;
|
|
8
|
+
/** Text alignment. @default "start" */
|
|
9
|
+
align?: SetAlign;
|
|
10
|
+
/** Hanging-indent layout behavior. */
|
|
11
|
+
hangingPunctuation?: SetProseHangingPunctuation;
|
|
12
|
+
/** DOM id. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Applies max measure constraints for long-form readability. @default true */
|
|
15
|
+
measured?: boolean;
|
|
16
|
+
/** Enables breakpoint-responsive body scale. @default false */
|
|
17
|
+
responsive?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Builds the IR tree for the Set prose component.
|
|
21
|
+
*
|
|
22
|
+
* @param props - Prose component props.
|
|
23
|
+
* @returns IR node for a prose wrapper.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildSetProse({ align, children, hangingPunctuation, id, measured, responsive, }: SetProseProps): SetNode;
|
|
26
|
+
/**
|
|
27
|
+
* SSR renderer for the Set prose component.
|
|
28
|
+
*
|
|
29
|
+
* @param props - Prose component props.
|
|
30
|
+
* @returns HTML string for a prose wrapper.
|
|
31
|
+
*/
|
|
32
|
+
export declare function renderSetProse(props: SetProseProps): string;
|
|
33
|
+
/** Declarative prose contract mirror for tooling, docs, and adapters. */
|
|
34
|
+
export declare const SET_PROSE_SPEC: SetComponentSpec;
|
|
35
|
+
//# sourceMappingURL=prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../src/components/prose/prose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAChD,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAe,EACf,QAAQ,EACR,kBAAkB,EAClB,EAAE,EACF,QAAe,EACf,UAAU,GACX,EAAE,aAAa,GAAG,OAAO,CAgBzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAyE5B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetControlSize } from "../../types";
|
|
4
|
+
export type SetRadiosOrientation = "vertical" | "horizontal";
|
|
5
|
+
export interface SetRadioItem {
|
|
6
|
+
/** Optional per-item helper text. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional per-item disabled override.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Radio option label (escaped before render). */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Option value (submitted value and selection key). */
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SetRadiosProps {
|
|
19
|
+
/** Group description rendered below legend. */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Group disabled state. @default false */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Group id used for group and per-item description id derivation. */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Group invalid state. Ignored when `disabled`. @default false */
|
|
26
|
+
invalid?: boolean;
|
|
27
|
+
/** Radio options. Must include at least 2 options. */
|
|
28
|
+
radios: SetRadioItem[];
|
|
29
|
+
/** Group legend text (escaped before render). */
|
|
30
|
+
legend: string;
|
|
31
|
+
/** Shared radio name applied to all options. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** Layout orientation. @default "vertical" */
|
|
34
|
+
orientation?: SetRadiosOrientation;
|
|
35
|
+
/** Required selection state. @default false */
|
|
36
|
+
required?: boolean;
|
|
37
|
+
/** Size variant for all radios in the group. @default "md" */
|
|
38
|
+
size?: SetControlSize;
|
|
39
|
+
/** Selected option value. When unmatched, no option is checked. */
|
|
40
|
+
value?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Builds the IR tree for the Set radios component.
|
|
44
|
+
*
|
|
45
|
+
* @param props - Radios component props.
|
|
46
|
+
* @returns IR node for a radios fieldset.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildSetRadios({ description, disabled, id, invalid, radios, legend, name, orientation, required, size, value, }: SetRadiosProps): SetNode;
|
|
49
|
+
/**
|
|
50
|
+
* SSR renderer for the Set radios component.
|
|
51
|
+
*
|
|
52
|
+
* @param props - Radios component props.
|
|
53
|
+
* @returns HTML string for a radios fieldset.
|
|
54
|
+
*/
|
|
55
|
+
export declare function renderSetRadios(props: SetRadiosProps): string;
|
|
56
|
+
/** Declarative radios contract mirror for tooling, docs, and adapters. */
|
|
57
|
+
export declare const SET_RADIOS_SPEC: SetComponentSpec;
|
|
58
|
+
//# sourceMappingURL=radios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radios.d.ts","sourceRoot":"","sources":["../../../src/components/radios/radios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,QAAQ,EACR,EAAE,EACF,OAAO,EACP,MAAM,EACN,MAAM,EACN,IAAI,EACJ,WAAwB,EACxB,QAAQ,EACR,IAAW,EACX,KAAK,GACN,EAAE,cAAc,GAAG,OAAO,CA8H1B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE7D;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,gBAqJ7B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetControlSize, SetInlineSize } from "../../types";
|
|
4
|
+
export declare const SET_RANGE_TAG_NAME = "set-range";
|
|
5
|
+
export interface SetRangeProps {
|
|
6
|
+
/** Helper text rendered after the range. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Disabled state. @default false */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Range id; used for input/output/label wiring. */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Inline-size behavior. @default "full" */
|
|
13
|
+
inlineSize?: SetInlineSize;
|
|
14
|
+
/** Label text content (escaped before render). */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Maximum value. */
|
|
17
|
+
max?: number;
|
|
18
|
+
/** Minimum value. */
|
|
19
|
+
min?: number;
|
|
20
|
+
/** Field name. */
|
|
21
|
+
name?: string;
|
|
22
|
+
/** Size variant. @default "md" */
|
|
23
|
+
size?: SetControlSize;
|
|
24
|
+
/** Step value. */
|
|
25
|
+
step?: number;
|
|
26
|
+
/** Current value. */
|
|
27
|
+
value?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Builds the IR tree for the Set range component.
|
|
31
|
+
*
|
|
32
|
+
* @param props - Range component props.
|
|
33
|
+
* @returns IR node for a `set-range` host.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildSetRange({ description, disabled, id, inlineSize, label, max, min, name, size, step, value, }: SetRangeProps): SetNode;
|
|
36
|
+
/**
|
|
37
|
+
* SSR renderer for the Set range component.
|
|
38
|
+
*
|
|
39
|
+
* Emits semantic range markup inside a `set-range` host. The runtime custom
|
|
40
|
+
* element hydrates the `.output` element from the current input value.
|
|
41
|
+
*
|
|
42
|
+
* @param props - Range component props.
|
|
43
|
+
* @returns HTML string for a `set-range` host.
|
|
44
|
+
*/
|
|
45
|
+
export declare function renderSetRange(props: SetRangeProps): string;
|
|
46
|
+
/**
|
|
47
|
+
* Defines the `set-range` custom element runtime.
|
|
48
|
+
*
|
|
49
|
+
* Safe to call multiple times. Existing SSR-rendered `set-range` hosts
|
|
50
|
+
* upgrade in place and keep `.output` synchronized with the current value.
|
|
51
|
+
*/
|
|
52
|
+
export declare function defineSetRange(): void;
|
|
53
|
+
/** Declarative range contract mirror for tooling, docs, and adapters. */
|
|
54
|
+
export declare const SET_RANGE_SPEC: SetComponentSpec;
|
|
55
|
+
//# sourceMappingURL=range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/components/range/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjE,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qBAAqB;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,QAAQ,EACR,EAAE,EACF,UAAmB,EACnB,KAAK,EACL,GAAG,EACH,GAAG,EACH,IAAI,EACJ,IAAW,EACX,IAAI,EACJ,KAAK,GACN,EAAE,aAAa,GAAG,OAAO,CA8EzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA4FrC;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAoI5B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetBrand = "mnsp" | "wrfr";
|
|
4
|
+
export type SetDirection = "ltr" | "rtl";
|
|
5
|
+
export type SetAppOverscrollBehavior = "none";
|
|
6
|
+
export type SetTheme = "light" | "dark";
|
|
7
|
+
export interface SetRootProps {
|
|
8
|
+
/** Marks this root as the owning app root; emits `data-app-root` when true. @default false */
|
|
9
|
+
appRoot?: boolean;
|
|
10
|
+
/** Opts into `overscroll-behavior: none` integration hooks; emits `data-app-overscroll-behavior="none"`. */
|
|
11
|
+
appOverscrollBehavior?: SetAppOverscrollBehavior;
|
|
12
|
+
/** Brand variant applied to the root wrapper. @default "mnsp" */
|
|
13
|
+
brand?: SetBrand;
|
|
14
|
+
/** Inner HTML content. Caller sanitizes untrusted content. */
|
|
15
|
+
children: string;
|
|
16
|
+
/** Optional explicit text direction. */
|
|
17
|
+
dir?: SetDirection;
|
|
18
|
+
/** DOM id. */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** Optional BCP47 language tag (e.g. `en-GB`). */
|
|
21
|
+
lang?: string;
|
|
22
|
+
/** Optional explicit theme variant. */
|
|
23
|
+
theme?: SetTheme;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Builds the IR tree for the Set root component.
|
|
27
|
+
*
|
|
28
|
+
* @param props - Root component props.
|
|
29
|
+
* @returns IR node for the Set root component.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildSetRoot({ appOverscrollBehavior, appRoot, brand, children, dir, id, lang, theme, }: SetRootProps): SetNode;
|
|
32
|
+
/**
|
|
33
|
+
* SSR renderer for the Set root component.
|
|
34
|
+
*
|
|
35
|
+
* Emits a `<div>` with the Set root class, required `data-set-brand`,
|
|
36
|
+
* optional `data-set-theme`, and optional `dir`/`lang` attributes, then injects
|
|
37
|
+
* the provided HTML content inside.
|
|
38
|
+
*
|
|
39
|
+
* @param props - Root component props.
|
|
40
|
+
* @returns HTML string for the Set root component.
|
|
41
|
+
*/
|
|
42
|
+
export declare function renderSetRoot(props: SetRootProps): string;
|
|
43
|
+
/** Declarative root contract mirror for tooling, docs, and adapters. */
|
|
44
|
+
export declare const SET_ROOT_SPEC: SetComponentSpec;
|
|
45
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/components/root/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAExC,MAAM,WAAW,YAAY;IAC3B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4GAA4G;IAC5G,qBAAqB,CAAC,EAAE,wBAAwB,CAAC;IACjD,iEAAiE;IACjE,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,qBAAqB,EACrB,OAAO,EACP,KAAc,EACd,QAAQ,EACR,GAAG,EACH,EAAE,EACF,IAAI,EACJ,KAAK,GACN,EAAE,YAAY,GAAG,OAAO,CAmBxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBA4F3B,CAAC"}
|