@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,56 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import { type SetButtonSize } from "../button/button";
|
|
4
|
+
import type { SetSurfaceVariant } from "../surface/surface";
|
|
5
|
+
export declare const SET_SIDEBAR_TAG_NAME = "set-sidebar";
|
|
6
|
+
export type SetSidebarAboveNotebook = "persistent" | "collapsible" | "overlay";
|
|
7
|
+
export interface SetSidebarProps {
|
|
8
|
+
/** Behavior above the notebook breakpoint. @default "persistent" */
|
|
9
|
+
aboveNotebook?: SetSidebarAboveNotebook;
|
|
10
|
+
/** Size of the trigger and collapse buttons. @default "md" */
|
|
11
|
+
buttonSize?: SetButtonSize;
|
|
12
|
+
/** Content region markup rendered inside `.content`. Caller sanitizes untrusted content. */
|
|
13
|
+
children?: string;
|
|
14
|
+
/** Accessible label for the runtime collapse/close button. @default "Collapse sidebar" */
|
|
15
|
+
collapseLabel?: string;
|
|
16
|
+
/** Optional footer region markup. Caller sanitizes untrusted content. */
|
|
17
|
+
footer?: string;
|
|
18
|
+
/** Optional header region markup. Caller sanitizes untrusted content. */
|
|
19
|
+
header?: string;
|
|
20
|
+
/** DOM id applied to the host. The inner panel id is derived as `${id}-panel` and referenced by the trigger via `aria-controls`. */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Surface context. Emits `data-set-surface` on the inner panel when provided. */
|
|
23
|
+
surface?: SetSurfaceVariant;
|
|
24
|
+
/** Accessible label for the component-owned trigger. @default "Open sidebar" */
|
|
25
|
+
triggerLabel?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Builds the IR tree for the Set sidebar component.
|
|
29
|
+
*
|
|
30
|
+
* @param props - Sidebar component props.
|
|
31
|
+
* @returns IR node for a `set-sidebar` host.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildSetSidebar({ aboveNotebook, buttonSize, children, collapseLabel, footer, header, id, surface, triggerLabel, }: SetSidebarProps): SetNode;
|
|
34
|
+
/**
|
|
35
|
+
* SSR renderer for the Set sidebar component.
|
|
36
|
+
*
|
|
37
|
+
* Emits a component-owned trigger plus structural sidebar markup inside a
|
|
38
|
+
* `set-sidebar` host. The host also owns a backdrop element used for overlay
|
|
39
|
+
* dismissal on narrow screens. Above notebook width, behavior is controlled by
|
|
40
|
+
* `aboveNotebook`. Page-shell layout decisions are intentionally left to parent
|
|
41
|
+
* composition.
|
|
42
|
+
*
|
|
43
|
+
* @param props - Sidebar component props.
|
|
44
|
+
* @returns HTML string for a `set-sidebar` host.
|
|
45
|
+
*/
|
|
46
|
+
export declare function renderSetSidebar(props: SetSidebarProps): string;
|
|
47
|
+
/**
|
|
48
|
+
* Defines the `set-sidebar` custom element runtime.
|
|
49
|
+
*
|
|
50
|
+
* Safe to call multiple times. Existing SSR-rendered `set-sidebar` hosts
|
|
51
|
+
* upgrade in place and receive owned-trigger open/close behavior.
|
|
52
|
+
*/
|
|
53
|
+
export declare function defineSetSidebar(): void;
|
|
54
|
+
/** Declarative sidebar contract mirror for tooling, docs, and adapters. */
|
|
55
|
+
export declare const SET_SIDEBAR_SPEC: SetComponentSpec;
|
|
56
|
+
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAClD,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;AAM/E,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oIAAoI;IACpI,EAAE,EAAE,MAAM,CAAC;IACX,kFAAkF;IAClF,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,aAA4B,EAC5B,UAAiB,EACjB,QAAQ,EACR,aAAoC,EACpC,MAAM,EACN,MAAM,EACN,EAAE,EACF,OAAO,EACP,YAAkC,GACnC,EAAE,eAAe,GAAG,OAAO,CA6F3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CA4QvC;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,EAAE,gBA6H9B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetSpinnerSize = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "fill";
|
|
4
|
+
export type SetSpinnerTone = "default" | "brand";
|
|
5
|
+
export interface SetSpinnerProps {
|
|
6
|
+
/** DOM id. */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Accessible status label. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Size variant. @default "md" */
|
|
11
|
+
size?: SetSpinnerSize;
|
|
12
|
+
/** Tone variant. @default "default" */
|
|
13
|
+
tone?: SetSpinnerTone;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Builds the IR tree for the Set spinner component.
|
|
17
|
+
*
|
|
18
|
+
* @param props - Spinner component props.
|
|
19
|
+
* @returns IR node for a spinner element.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildSetSpinner({ id, label, size, tone, }?: SetSpinnerProps): SetNode;
|
|
22
|
+
/**
|
|
23
|
+
* SSR renderer for the Set spinner component.
|
|
24
|
+
*
|
|
25
|
+
* @param props - Spinner component props.
|
|
26
|
+
* @returns HTML string for a spinner element.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderSetSpinner(props?: SetSpinnerProps): string;
|
|
29
|
+
/** Declarative spinner contract mirror for tooling, docs, and adapters. */
|
|
30
|
+
export declare const SET_SPINNER_SPEC: SetComponentSpec;
|
|
31
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.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,GACtB,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,MAAM,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,uCAAuC;IACvC,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,EAAE,EACF,KAAK,EACL,IAAW,EACX,IAAgB,GACjB,GAAE,eAAoB,GAAG,OAAO,CA0DhC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,eAAoB,GAAG,MAAM,CAEpE;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,EAAE,gBAyD9B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
export type SetStackAlign = "stretch" | "start" | "center" | "end";
|
|
4
|
+
export type SetStackAs = "div" | "ul";
|
|
5
|
+
export type SetStackGap = "none" | "xs" | "sm" | "md" | "lg";
|
|
6
|
+
export interface SetStackProps {
|
|
7
|
+
/** Cross-axis alignment. @default "stretch" */
|
|
8
|
+
align?: SetStackAlign;
|
|
9
|
+
/** Element tag. @default "div" */
|
|
10
|
+
as?: SetStackAs;
|
|
11
|
+
/** Trusted inner HTML. */
|
|
12
|
+
children?: string;
|
|
13
|
+
/** Spacing gap size. @default "md" */
|
|
14
|
+
gap?: SetStackGap;
|
|
15
|
+
/** DOM id. */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** Enables layout-context responsive spacing scale. @default false */
|
|
18
|
+
responsive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Builds the IR tree for the Set stack component.
|
|
22
|
+
*
|
|
23
|
+
* @param props - Stack component props.
|
|
24
|
+
* @returns IR node for a stack wrapper.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildSetStack({ align, as, children, gap, id, responsive, }: SetStackProps): SetNode;
|
|
27
|
+
/**
|
|
28
|
+
* SSR renderer for the Set stack component.
|
|
29
|
+
*
|
|
30
|
+
* @param props - Stack component props.
|
|
31
|
+
* @returns HTML string for a stack wrapper.
|
|
32
|
+
*/
|
|
33
|
+
export declare function renderSetStack(props: SetStackProps): string;
|
|
34
|
+
/** Declarative stack contract mirror for tooling, docs, and adapters. */
|
|
35
|
+
export declare const SET_STACK_SPEC: SetComponentSpec;
|
|
36
|
+
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/components/stack/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AACnE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,kCAAkC;IAClC,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAiB,EACjB,EAAU,EACV,QAAQ,EACR,GAAU,EACV,EAAE,EACF,UAAU,GACX,EAAE,aAAa,GAAG,OAAO,CAezB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE3D;AAED,yEAAyE;AACzE,eAAO,MAAM,cAAc,EAAE,gBAsE5B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetTheme } from "../root/root";
|
|
4
|
+
export type SetSurfaceVariant = "default" | "brand" | "inverse" | "brand-inverse";
|
|
5
|
+
export interface SetSurfaceProps {
|
|
6
|
+
/** Trusted inner HTML. */
|
|
7
|
+
children: string;
|
|
8
|
+
/** Absolute theme lock for content rendered inside the surface. */
|
|
9
|
+
contentTheme?: SetTheme;
|
|
10
|
+
/** DOM id. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Surface variant. @default "default" */
|
|
13
|
+
variant?: SetSurfaceVariant;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Builds the IR tree for the Set surface component.
|
|
17
|
+
*
|
|
18
|
+
* @param props - Surface component props.
|
|
19
|
+
* @returns IR node for a surface wrapper.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildSetSurface({ children, contentTheme, id, variant, }: SetSurfaceProps): SetNode;
|
|
22
|
+
/**
|
|
23
|
+
* SSR renderer for the Set surface component.
|
|
24
|
+
*
|
|
25
|
+
* @param props - Surface component props.
|
|
26
|
+
* @returns HTML string for a surface wrapper.
|
|
27
|
+
*/
|
|
28
|
+
export declare function renderSetSurface(props: SetSurfaceProps): string;
|
|
29
|
+
/** Declarative surface contract mirror for tooling, docs, and adapters. */
|
|
30
|
+
export declare const SET_SURFACE_SPEC: SetComponentSpec;
|
|
31
|
+
//# sourceMappingURL=surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/components/surface/surface.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,cAAc,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,OAAO,GACP,SAAS,GACT,eAAe,CAAC;AAEpB,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,YAAY,EACZ,EAAE,EACF,OAAmB,GACpB,EAAE,eAAe,GAAG,OAAO,CAc3B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAE/D;AAED,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,EAAE,gBAoD9B,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetControlSize } from "../../types";
|
|
4
|
+
export interface SetSwitchProps {
|
|
5
|
+
/** Checked state. @default false */
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
/** Helper text rendered after the label. Requires `id`. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Disabled state. @default false */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** DOM id applied to the underlying input. Required when `description` is provided. */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** Label text content (escaped before render). */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Form field name. */
|
|
16
|
+
name?: string;
|
|
17
|
+
/** Size variant. @default "md" */
|
|
18
|
+
size?: SetControlSize;
|
|
19
|
+
/** Submitted field value. */
|
|
20
|
+
value?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds the IR tree for the Set switch component.
|
|
24
|
+
*
|
|
25
|
+
* @param props - Switch component props.
|
|
26
|
+
* @returns IR node for a switch field wrapper.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildSetSwitch({ checked, description, disabled, id, label, name, size, value, }: SetSwitchProps): SetNode;
|
|
29
|
+
/**
|
|
30
|
+
* SSR renderer for the Set switch component.
|
|
31
|
+
*
|
|
32
|
+
* @param props - Switch component props.
|
|
33
|
+
* @returns HTML string for a switch field wrapper.
|
|
34
|
+
*/
|
|
35
|
+
export declare function renderSetSwitch(props: SetSwitchProps): string;
|
|
36
|
+
/** Declarative switch contract mirror for tooling, docs, and adapters. */
|
|
37
|
+
export declare const SET_SWITCH_SPEC: SetComponentSpec;
|
|
38
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.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;AAElD,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,WAAW,EACX,QAAQ,EACR,EAAE,EACF,KAAK,EACL,IAAI,EACJ,IAAW,EACX,KAAK,GACN,EAAE,cAAc,GAAG,OAAO,CA2D1B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAE7D;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,EAAE,gBA4G7B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetAlign } from "../../types";
|
|
4
|
+
export type SetTextAs = "p" | "span";
|
|
5
|
+
export type SetTextSize = "xs" | "sm" | "md" | "lg";
|
|
6
|
+
export type SetTextTone = "default" | "muted";
|
|
7
|
+
export interface SetTextProps {
|
|
8
|
+
/** Text content. Supports inline markup such as `<em>`, `<strong>`, `<a>`, `<code>`, `<cite>`, etc. */
|
|
9
|
+
children: string;
|
|
10
|
+
/** Element tag. @default "span" */
|
|
11
|
+
as?: SetTextAs;
|
|
12
|
+
/** Text alignment. Ignored when `as` is `span`. @default "start" */
|
|
13
|
+
align?: SetAlign;
|
|
14
|
+
/** DOM id. */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** Enables visited-state styling for links inside text. @default true */
|
|
17
|
+
linkVisited?: boolean;
|
|
18
|
+
/** Applies max measure constraints for long-form readability. Ignored when `as` is `span`. @default true */
|
|
19
|
+
measured?: boolean;
|
|
20
|
+
/** Enables breakpoint-responsive body scale. @default false */
|
|
21
|
+
responsive?: boolean;
|
|
22
|
+
/** Text size. @default "md" */
|
|
23
|
+
size?: SetTextSize;
|
|
24
|
+
/** Tone variant. @default "default" */
|
|
25
|
+
tone?: SetTextTone;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Builds the IR tree for the Set text component.
|
|
29
|
+
*
|
|
30
|
+
* @param props - Text component props.
|
|
31
|
+
* @returns IR node for a text paragraph or span element.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildSetText({ align, as, children, id, linkVisited, measured, responsive, size, tone, }: SetTextProps): SetNode;
|
|
34
|
+
/**
|
|
35
|
+
* SSR renderer for the Set text component.
|
|
36
|
+
*
|
|
37
|
+
* @param props - Text component props.
|
|
38
|
+
* @returns HTML string for a text paragraph or span element.
|
|
39
|
+
*/
|
|
40
|
+
export declare function renderSetText(props: SetTextProps): string;
|
|
41
|
+
/** Declarative text contract mirror for tooling, docs, and adapters. */
|
|
42
|
+
export declare const SET_TEXT_SPEC: SetComponentSpec;
|
|
43
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.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,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9C,MAAM,WAAW,YAAY;IAC3B,uGAAuG;IACvG,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,oEAAoE;IACpE,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,cAAc;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,uCAAuC;IACvC,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,EAAE,EACF,QAAQ,EACR,EAAE,EACF,WAAkB,EAClB,QAAQ,EACR,UAAU,EACV,IAAW,EACX,IAAgB,GACjB,EAAE,YAAY,GAAG,OAAO,CAuBxB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD;AAED,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,gBAkH3B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type SetNode } from "../../helpers/node";
|
|
2
|
+
import type { SetComponentSpec } from "../../spec";
|
|
3
|
+
import type { SetControlSize, SetInlineSize } from "../../types";
|
|
4
|
+
export type SetTextareaResize = "vertical" | "none";
|
|
5
|
+
export interface SetTextareaProps {
|
|
6
|
+
/** Autocomplete hint; `false` emits `autocomplete="off"`. */
|
|
7
|
+
autocomplete?: string | false;
|
|
8
|
+
/** Helper text rendered after the textarea (reused as validation guidance when `invalid`). */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Disabled state. @default false */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Textarea id; used for `textarea[id]` and `label[for]`. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Invalid state. Ignored when `disabled` or `readOnly`. @default false */
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
/** Label text content (escaped before render). */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Field name attribute. */
|
|
19
|
+
name?: string;
|
|
20
|
+
/** Read-only state. Ignored when `disabled`. @default false */
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
/** Required state. @default false */
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** Resize behavior. @default "vertical" */
|
|
25
|
+
resize?: SetTextareaResize;
|
|
26
|
+
/** Number of visible text rows. Must be an integer >= 2. @default 2 */
|
|
27
|
+
rows?: number;
|
|
28
|
+
/** Size variant. @default "md" */
|
|
29
|
+
size?: SetControlSize;
|
|
30
|
+
/** Spellcheck behavior. Omitted by default. */
|
|
31
|
+
spellcheck?: boolean;
|
|
32
|
+
/** Current value. */
|
|
33
|
+
value?: string;
|
|
34
|
+
/** Inline-size behavior. @default "full" */
|
|
35
|
+
inlineSize?: SetInlineSize;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Builds the IR tree for the Set textarea component.
|
|
39
|
+
*
|
|
40
|
+
* @param props - Textarea component props.
|
|
41
|
+
* @returns IR node for a labeled textarea field wrapper.
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildSetTextarea({ autocomplete, description, disabled, id, invalid, label, name, readOnly, required, resize, rows, size, spellcheck, value, inlineSize, }: SetTextareaProps): SetNode;
|
|
44
|
+
/**
|
|
45
|
+
* SSR renderer for the Set textarea component.
|
|
46
|
+
*
|
|
47
|
+
* @param props - Textarea component props.
|
|
48
|
+
* @returns HTML string for a labeled textarea field wrapper.
|
|
49
|
+
*/
|
|
50
|
+
export declare function renderSetTextarea(props: SetTextareaProps): string;
|
|
51
|
+
/** Declarative textarea contract mirror for tooling, docs, and adapters. */
|
|
52
|
+
export declare const SET_TEXTAREA_SPEC: SetComponentSpec;
|
|
53
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/textarea/textarea.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,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,8FAA8F;IAC9F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,EAAE,EACF,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAmB,EACnB,IAAQ,EACR,IAAW,EACX,UAAU,EACV,KAAK,EACL,UAAmB,GACpB,EAAE,gBAAgB,GAAG,OAAO,CAgF5B;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAEjE;AAED,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,EAAE,gBA6L/B,CAAC"}
|