@nisoku/sazami 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +261 -0
- package/dist/config/generator.d.ts +3 -0
- package/dist/config/tokens.d.ts +1 -0
- package/dist/curvomorphism/index.d.ts +10 -0
- package/dist/errors.d.ts +16 -0
- package/dist/escape.d.ts +26 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/index.cjs +9473 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +9473 -0
- package/dist/index.mjs.map +1 -0
- package/dist/primitives/accordion.d.ts +35 -0
- package/dist/primitives/avatar.d.ts +54 -0
- package/dist/primitives/badge.d.ts +34 -0
- package/dist/primitives/base.d.ts +129 -0
- package/dist/primitives/button.d.ts +55 -0
- package/dist/primitives/card.d.ts +44 -0
- package/dist/primitives/checkbox.d.ts +43 -0
- package/dist/primitives/chip.d.ts +57 -0
- package/dist/primitives/column.d.ts +24 -0
- package/dist/primitives/coverart.d.ts +34 -0
- package/dist/primitives/divider.d.ts +24 -0
- package/dist/primitives/generic.d.ts +4 -0
- package/dist/primitives/grid.d.ts +29 -0
- package/dist/primitives/heading.d.ts +35 -0
- package/dist/primitives/icon-button.d.ts +45 -0
- package/dist/primitives/icon.d.ts +32 -0
- package/dist/primitives/image.d.ts +36 -0
- package/dist/primitives/input.d.ts +53 -0
- package/dist/primitives/label.d.ts +26 -0
- package/dist/primitives/modal.d.ts +34 -0
- package/dist/primitives/modifier-map.d.ts +3 -0
- package/dist/primitives/progress.d.ts +49 -0
- package/dist/primitives/radio.d.ts +48 -0
- package/dist/primitives/registry.d.ts +2 -0
- package/dist/primitives/row.d.ts +29 -0
- package/dist/primitives/section.d.ts +39 -0
- package/dist/primitives/select.d.ts +58 -0
- package/dist/primitives/shared.d.ts +15 -0
- package/dist/primitives/slider.d.ts +60 -0
- package/dist/primitives/spacer.d.ts +14 -0
- package/dist/primitives/spinner.d.ts +29 -0
- package/dist/primitives/stack.d.ts +19 -0
- package/dist/primitives/switch.d.ts +53 -0
- package/dist/primitives/tabs.d.ts +30 -0
- package/dist/primitives/tag.d.ts +25 -0
- package/dist/primitives/text.d.ts +39 -0
- package/dist/primitives/toast.d.ts +45 -0
- package/dist/primitives/toggle.d.ts +51 -0
- package/dist/runtime/renderer.d.ts +2 -0
- package/dist/runtime/transformer.d.ts +8 -0
- package/package.json +55 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
declare const accordionConfig: {
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly "single-open": {
|
|
5
|
+
readonly type: "boolean";
|
|
6
|
+
readonly reflect: false;
|
|
7
|
+
};
|
|
8
|
+
readonly index: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly reflect: false;
|
|
11
|
+
};
|
|
12
|
+
readonly open: {
|
|
13
|
+
readonly type: "boolean";
|
|
14
|
+
readonly reflect: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly events: {
|
|
18
|
+
readonly change: {
|
|
19
|
+
readonly name: "saz-change";
|
|
20
|
+
readonly detail: {
|
|
21
|
+
readonly index: "index";
|
|
22
|
+
readonly open: "open";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare class SazamiAccordion extends SazamiComponent<typeof accordionConfig> {
|
|
28
|
+
"single-open": boolean;
|
|
29
|
+
index: string;
|
|
30
|
+
open: boolean;
|
|
31
|
+
private _itemElements;
|
|
32
|
+
private _handlersAdded;
|
|
33
|
+
render(): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const avatarConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly alt: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
readonly reflect: true;
|
|
8
|
+
};
|
|
9
|
+
readonly initials: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly reflect: true;
|
|
12
|
+
};
|
|
13
|
+
readonly size: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly reflect: true;
|
|
16
|
+
};
|
|
17
|
+
readonly shape: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly reflect: true;
|
|
20
|
+
};
|
|
21
|
+
readonly src: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly reflect: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly structuralRoots: {
|
|
27
|
+
readonly image: "img";
|
|
28
|
+
readonly initials: "span";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare class SazamiAvatar extends SazamiComponent<typeof avatarConfig> {
|
|
32
|
+
private _srcSignal;
|
|
33
|
+
private _imgElement;
|
|
34
|
+
private _initialsElement;
|
|
35
|
+
private _srcDisposer;
|
|
36
|
+
private _modeEffectDisposer;
|
|
37
|
+
private _altObserver;
|
|
38
|
+
private _isImageMode;
|
|
39
|
+
protected getRenderMode(): string;
|
|
40
|
+
private _isReadableStr;
|
|
41
|
+
private _disposeSrcBinding;
|
|
42
|
+
private _getCurrentSrc;
|
|
43
|
+
private _isImageModeNow;
|
|
44
|
+
set src(value: string | Readable<string>);
|
|
45
|
+
get src(): string | Readable<string>;
|
|
46
|
+
private _setupSrcBinding;
|
|
47
|
+
private _updateDisplay;
|
|
48
|
+
render(): void;
|
|
49
|
+
private _setupSignalWatcher;
|
|
50
|
+
private _getInitials;
|
|
51
|
+
static get observedAttributes(): string[];
|
|
52
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const badgeConfig: {
|
|
4
|
+
readonly observedAttributes: readonly ["content"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly size: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly reflect: true;
|
|
9
|
+
};
|
|
10
|
+
readonly variant: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly reflect: true;
|
|
13
|
+
};
|
|
14
|
+
readonly shape: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly reflect: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare class SazamiBadge extends SazamiComponent<typeof badgeConfig> {
|
|
21
|
+
size: string;
|
|
22
|
+
variant: string;
|
|
23
|
+
shape: string;
|
|
24
|
+
private _contentSignal;
|
|
25
|
+
private _textNode;
|
|
26
|
+
private _textContent;
|
|
27
|
+
private _contentDispose;
|
|
28
|
+
private _isReadable;
|
|
29
|
+
set content(value: string | Readable<string>);
|
|
30
|
+
get content(): string | Readable<string> | undefined;
|
|
31
|
+
render(): void;
|
|
32
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { type Readable } from "@nisoku/sairin";
|
|
2
|
+
export declare type BindTarget = "textContent" | "innerHTML" | "value" | "checked" | "disabled" | "visible" | string;
|
|
3
|
+
export interface SazamiComponentConfig {
|
|
4
|
+
observedAttributes?: readonly string[] | string[];
|
|
5
|
+
properties?: Record<string, AnyPropertyConfig>;
|
|
6
|
+
events?: Record<string, EventConfig>;
|
|
7
|
+
binds?: Record<string, BindingType>;
|
|
8
|
+
structuralRoots?: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
export interface PropertyConfig {
|
|
11
|
+
type: "string";
|
|
12
|
+
reflect?: boolean;
|
|
13
|
+
default?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PropertyConfigNumber {
|
|
16
|
+
type: "number";
|
|
17
|
+
reflect?: boolean;
|
|
18
|
+
default: number;
|
|
19
|
+
}
|
|
20
|
+
export interface PropertyConfigBoolean {
|
|
21
|
+
type: "boolean";
|
|
22
|
+
reflect?: boolean;
|
|
23
|
+
default?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare type AnyPropertyConfig = PropertyConfig | PropertyConfigNumber | PropertyConfigBoolean;
|
|
26
|
+
export interface EventConfig {
|
|
27
|
+
name: string;
|
|
28
|
+
detail?: Record<string, string>;
|
|
29
|
+
}
|
|
30
|
+
export declare type BindingType = "attribute" | "property" | "input";
|
|
31
|
+
declare type GetPropConfig<C extends SazamiComponentConfig, P extends string> = C["properties"] extends Record<string, AnyPropertyConfig> ? P extends keyof C["properties"] ? C["properties"][P] : never : never;
|
|
32
|
+
declare type PropType<C extends SazamiComponentConfig, P extends string> = GetPropConfig<C, P> extends AnyPropertyConfig ? GetPropConfig<C, P>["type"] extends "boolean" ? boolean : GetPropConfig<C, P>["type"] extends "number" ? number : string : string;
|
|
33
|
+
declare type EventDetail<C extends SazamiComponentConfig, D extends Record<string, string>> = {
|
|
34
|
+
[K in keyof D]: D[K] extends string ? PropType<C, D[K]> : never;
|
|
35
|
+
};
|
|
36
|
+
export declare type InferProps<C extends SazamiComponentConfig> = C["properties"] extends Record<string, AnyPropertyConfig> ? {
|
|
37
|
+
[P in keyof C["properties"]]: PropType<C, P & string>;
|
|
38
|
+
} : {};
|
|
39
|
+
export declare type InferEvents<C extends SazamiComponentConfig> = C["events"] extends Record<string, EventConfig> ? {
|
|
40
|
+
[E in keyof C["events"]]: C["events"][E] extends EventConfig ? C["events"][E]["detail"] extends Record<string, string> ? EventDetail<C, C["events"][E]["detail"]> : {} : {};
|
|
41
|
+
} : {};
|
|
42
|
+
export declare function component<C extends SazamiComponentConfig>(config: C): <T extends new () => SazamiComponent<C>>(Constructor: T) => T;
|
|
43
|
+
export declare class SazamiComponent<C extends SazamiComponentConfig = any> extends HTMLElement {
|
|
44
|
+
sazamiConfig: C;
|
|
45
|
+
componentId: string;
|
|
46
|
+
protected shadow: ShadowRoot;
|
|
47
|
+
protected _cleanupFns: Array<() => void>;
|
|
48
|
+
private _rendered;
|
|
49
|
+
private _propStorage;
|
|
50
|
+
private _dirty;
|
|
51
|
+
private _pendingStyles;
|
|
52
|
+
private _pendingTemplate;
|
|
53
|
+
private _lastTemplate;
|
|
54
|
+
private _lastStyles;
|
|
55
|
+
private _currentRootElement;
|
|
56
|
+
private _handlerId;
|
|
57
|
+
private _handlers;
|
|
58
|
+
constructor();
|
|
59
|
+
static get observedAttributes(): string[];
|
|
60
|
+
protected getStructuralRoot(): string | null;
|
|
61
|
+
protected getRenderMode(): string;
|
|
62
|
+
private _extractRootElement;
|
|
63
|
+
connectedCallback(): void;
|
|
64
|
+
disconnectedCallback(): void;
|
|
65
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
66
|
+
render(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Mounts the component's shadow DOM with the given styles and template.
|
|
69
|
+
* Auto-detects structural changes and renders synchronously when needed.
|
|
70
|
+
* For non-structural re-renders, defers to a microtask for batching.
|
|
71
|
+
* @param styles - CSS styles to inject
|
|
72
|
+
* @param template - HTML template string. Callers are responsible for escaping
|
|
73
|
+
* user-provided data using escapeHtml() before interpolating into the template.
|
|
74
|
+
*/
|
|
75
|
+
protected mount(styles: string, template: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Mounts the component's shadow DOM synchronously.
|
|
78
|
+
* Use this when you need to query/bind immediately after mounting.
|
|
79
|
+
* @param styles - CSS styles to inject
|
|
80
|
+
* @param template - HTML template string. Callers are responsible for escaping
|
|
81
|
+
* user-provided data using escapeHtml() before interpolating into the template.
|
|
82
|
+
*/
|
|
83
|
+
protected mountSync(styles: string, template: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Schedules a render to occur in the next microtask.
|
|
86
|
+
* Collapses multiple render() calls within the same tick into one DOM write.
|
|
87
|
+
* Uses backpressure, if a render is already queued, subsequent calls are dropped.
|
|
88
|
+
*/
|
|
89
|
+
protected scheduleRender(styles: string, template: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Flushes pending styles and template to the shadow DOM.
|
|
92
|
+
* Called by scheduleRender when the microtask runs.
|
|
93
|
+
* Skips stale renders if structural change made them obsolete.
|
|
94
|
+
*/
|
|
95
|
+
private _flush;
|
|
96
|
+
protected bind(selector: string, target: BindTarget, readable: Readable<any>): void;
|
|
97
|
+
protected bindText(selector: string, readable: Readable<string>): void;
|
|
98
|
+
protected bindHtml(selector: string, readable: Readable<string>): void;
|
|
99
|
+
protected bindValue(selector: string, readable: Readable<string>): void;
|
|
100
|
+
protected bindChecked(selector: string, readable: Readable<boolean>): void;
|
|
101
|
+
protected bindDisabled(selector: string, readable: Readable<boolean>): void;
|
|
102
|
+
protected bindVisible(selector: string, readable: Readable<boolean>): void;
|
|
103
|
+
protected bindAttribute(selector: string, attr: string, readable: Readable<any>): (() => void) | void;
|
|
104
|
+
protected bindProperty<T>(selector: string, prop: string, readable: Readable<T>): void;
|
|
105
|
+
protected bindStyle(selector: string, styleProp: string, readable: Readable<string>): void;
|
|
106
|
+
protected bindToggleClass(selector: string, className: string, readable: Readable<boolean>): void;
|
|
107
|
+
protected bindWidthPercent(selector: string, readable: Readable<number>, min?: number, max?: number): () => void;
|
|
108
|
+
protected bindWidthPercentAttribute(selector: string, attr: string, readable: Readable<number>, min?: number, max?: number): void;
|
|
109
|
+
protected $<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
110
|
+
protected $<E extends HTMLElement = HTMLElement>(selector: string): E | null;
|
|
111
|
+
protected addHandler(type: string, handler: Function, options?: {
|
|
112
|
+
internal?: boolean;
|
|
113
|
+
element?: EventTarget;
|
|
114
|
+
}): number;
|
|
115
|
+
protected removeHandler(typeOrId: string | number, idOrFn?: number | Function): void;
|
|
116
|
+
protected removeAllHandlers(options?: {
|
|
117
|
+
type?: string;
|
|
118
|
+
source?: "internal" | "user";
|
|
119
|
+
}): void;
|
|
120
|
+
protected dispatch<T = any>(name: string, detail?: T, options?: {
|
|
121
|
+
bubbles?: boolean;
|
|
122
|
+
composed?: boolean;
|
|
123
|
+
}): void;
|
|
124
|
+
protected dispatchEventTyped<E extends keyof InferEvents<C>>(event: E, detail: InferEvents<C>[E]): void;
|
|
125
|
+
protected onCleanup(fn: () => void): void;
|
|
126
|
+
private _installPropertyReflectors;
|
|
127
|
+
private _createReflector;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const buttonConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly disabled: {
|
|
6
|
+
readonly type: "boolean";
|
|
7
|
+
readonly reflect: true;
|
|
8
|
+
};
|
|
9
|
+
readonly loading: {
|
|
10
|
+
readonly type: "boolean";
|
|
11
|
+
readonly reflect: true;
|
|
12
|
+
};
|
|
13
|
+
readonly active: {
|
|
14
|
+
readonly type: "boolean";
|
|
15
|
+
readonly reflect: true;
|
|
16
|
+
};
|
|
17
|
+
readonly size: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly reflect: true;
|
|
20
|
+
};
|
|
21
|
+
readonly variant: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly reflect: true;
|
|
24
|
+
};
|
|
25
|
+
readonly shape: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly reflect: true;
|
|
28
|
+
};
|
|
29
|
+
readonly tone: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly reflect: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly events: {
|
|
35
|
+
readonly click: {
|
|
36
|
+
readonly name: "saz-click";
|
|
37
|
+
readonly detail: {};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export declare class SazamiButton extends SazamiComponent<typeof buttonConfig> {
|
|
42
|
+
loading: boolean;
|
|
43
|
+
private _disabledSignal;
|
|
44
|
+
private _disabledValue;
|
|
45
|
+
private _disabledDispose;
|
|
46
|
+
private _isReadableBool;
|
|
47
|
+
set disabled(value: boolean | Readable<boolean>);
|
|
48
|
+
get disabled(): boolean | Readable<boolean>;
|
|
49
|
+
private _setDisabled;
|
|
50
|
+
private _getIsDisabled;
|
|
51
|
+
render(): void;
|
|
52
|
+
private _handleClick;
|
|
53
|
+
private _handleKeydown;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const cardConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly layout: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
readonly reflect: false;
|
|
8
|
+
};
|
|
9
|
+
readonly align: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly reflect: false;
|
|
12
|
+
};
|
|
13
|
+
readonly justify: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly reflect: false;
|
|
16
|
+
};
|
|
17
|
+
readonly size: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly reflect: false;
|
|
20
|
+
};
|
|
21
|
+
readonly variant: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly reflect: false;
|
|
24
|
+
};
|
|
25
|
+
readonly gap: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly reflect: false;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare class SazamiCard extends SazamiComponent<typeof cardConfig> {
|
|
32
|
+
layout: string;
|
|
33
|
+
align: string;
|
|
34
|
+
justify: string;
|
|
35
|
+
size: string;
|
|
36
|
+
variant: string;
|
|
37
|
+
gap: string;
|
|
38
|
+
private _loadingSignal;
|
|
39
|
+
private _isReadableBool;
|
|
40
|
+
set loading(value: boolean | Readable<boolean>);
|
|
41
|
+
get loading(): boolean | Readable<boolean>;
|
|
42
|
+
render(): void;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const checkboxConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly checked: {
|
|
6
|
+
readonly type: "boolean";
|
|
7
|
+
readonly reflect: true;
|
|
8
|
+
};
|
|
9
|
+
readonly disabled: {
|
|
10
|
+
readonly type: "boolean";
|
|
11
|
+
readonly reflect: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
readonly events: {
|
|
15
|
+
readonly change: {
|
|
16
|
+
readonly name: "saz-change";
|
|
17
|
+
readonly detail: {
|
|
18
|
+
readonly checked: "checked";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
readonly binds: {
|
|
23
|
+
readonly checked: "attribute";
|
|
24
|
+
readonly disabled: "attribute";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare class SazamiCheckbox extends SazamiComponent<typeof checkboxConfig> {
|
|
28
|
+
private _checkedSignal;
|
|
29
|
+
private _disabledSignal;
|
|
30
|
+
private _isReadableBool;
|
|
31
|
+
set checked(value: boolean | Readable<boolean>);
|
|
32
|
+
get checked(): boolean | Readable<boolean>;
|
|
33
|
+
private _setChecked;
|
|
34
|
+
set disabled(value: boolean | Readable<boolean>);
|
|
35
|
+
get disabled(): boolean | Readable<boolean>;
|
|
36
|
+
private _setDisabled;
|
|
37
|
+
private _getIsDisabled;
|
|
38
|
+
render(): void;
|
|
39
|
+
private _handleClick;
|
|
40
|
+
private _handleKeydown;
|
|
41
|
+
private _updateAria;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { Signal } from "@nisoku/sairin";
|
|
3
|
+
declare const chipConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly label: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
readonly reflect: false;
|
|
8
|
+
};
|
|
9
|
+
readonly variant: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly reflect: false;
|
|
12
|
+
};
|
|
13
|
+
readonly removable: {
|
|
14
|
+
readonly type: "boolean";
|
|
15
|
+
readonly reflect: false;
|
|
16
|
+
};
|
|
17
|
+
readonly selected: {
|
|
18
|
+
readonly type: "boolean";
|
|
19
|
+
readonly reflect: true;
|
|
20
|
+
};
|
|
21
|
+
readonly disabled: {
|
|
22
|
+
readonly type: "boolean";
|
|
23
|
+
readonly reflect: true;
|
|
24
|
+
};
|
|
25
|
+
readonly size: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly reflect: false;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly events: {
|
|
31
|
+
readonly change: {
|
|
32
|
+
readonly name: "saz-change";
|
|
33
|
+
readonly detail: {
|
|
34
|
+
readonly selected: "selected";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly remove: {
|
|
38
|
+
readonly name: "saz-remove";
|
|
39
|
+
readonly detail: {};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare class SazamiChip extends SazamiComponent<typeof chipConfig> {
|
|
44
|
+
label: string;
|
|
45
|
+
variant: string;
|
|
46
|
+
removable: boolean;
|
|
47
|
+
size: string;
|
|
48
|
+
selected: boolean;
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
disabledSignal?: Signal<boolean>;
|
|
51
|
+
selectedSignal?: Signal<boolean>;
|
|
52
|
+
render(): void;
|
|
53
|
+
private _updateTabIndex;
|
|
54
|
+
private _handleClick;
|
|
55
|
+
private _handleKeydown;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
declare const columnConfig: {
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly justify: {
|
|
5
|
+
readonly type: "string";
|
|
6
|
+
readonly reflect: false;
|
|
7
|
+
};
|
|
8
|
+
readonly align: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly reflect: false;
|
|
11
|
+
};
|
|
12
|
+
readonly gap: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly reflect: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare class SazamiColumn extends SazamiComponent<typeof columnConfig> {
|
|
19
|
+
justify: string;
|
|
20
|
+
align: string;
|
|
21
|
+
gap: string;
|
|
22
|
+
render(): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const coverartConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly alt: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
readonly reflect: false;
|
|
8
|
+
};
|
|
9
|
+
readonly size: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly reflect: false;
|
|
12
|
+
};
|
|
13
|
+
readonly shape: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly reflect: false;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare class SazamiCoverart extends SazamiComponent<typeof coverartConfig> {
|
|
20
|
+
alt: string;
|
|
21
|
+
size: string;
|
|
22
|
+
shape: string;
|
|
23
|
+
private _srcSignal;
|
|
24
|
+
private _imgElement;
|
|
25
|
+
private _pendingSrc;
|
|
26
|
+
private _srcEffectDispose;
|
|
27
|
+
private _isReadableStr;
|
|
28
|
+
set src(value: string | Readable<string>);
|
|
29
|
+
get src(): string | Readable<string>;
|
|
30
|
+
private _updateSrc;
|
|
31
|
+
private _setupSrcEffect;
|
|
32
|
+
render(): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
declare const dividerConfig: {
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly vertical: {
|
|
5
|
+
readonly type: "boolean";
|
|
6
|
+
readonly reflect: false;
|
|
7
|
+
};
|
|
8
|
+
readonly size: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly reflect: false;
|
|
11
|
+
};
|
|
12
|
+
readonly variant: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly reflect: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare class SazamiDivider extends SazamiComponent<typeof dividerConfig> {
|
|
19
|
+
vertical: boolean;
|
|
20
|
+
size: string;
|
|
21
|
+
variant: string;
|
|
22
|
+
render(): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
declare const gridConfig: {
|
|
3
|
+
readonly properties: {
|
|
4
|
+
readonly cols: {
|
|
5
|
+
readonly type: "string";
|
|
6
|
+
readonly reflect: false;
|
|
7
|
+
};
|
|
8
|
+
readonly "md:cols": {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly reflect: false;
|
|
11
|
+
};
|
|
12
|
+
readonly "lg:cols": {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly reflect: false;
|
|
15
|
+
};
|
|
16
|
+
readonly gap: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly reflect: false;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare class SazamiGrid extends SazamiComponent<typeof gridConfig> {
|
|
23
|
+
cols: string;
|
|
24
|
+
"md:cols": string;
|
|
25
|
+
"lg:cols": string;
|
|
26
|
+
gap: string;
|
|
27
|
+
render(): void;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const headingConfig: {
|
|
4
|
+
readonly observedAttributes: readonly ["content"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly size: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly reflect: false;
|
|
9
|
+
};
|
|
10
|
+
readonly weight: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly reflect: false;
|
|
13
|
+
};
|
|
14
|
+
readonly tone: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly reflect: false;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare class SazamiHeading extends SazamiComponent<typeof headingConfig> {
|
|
21
|
+
size: string;
|
|
22
|
+
weight: string;
|
|
23
|
+
tone: string;
|
|
24
|
+
private _content;
|
|
25
|
+
private _contentSignal;
|
|
26
|
+
private _textNode;
|
|
27
|
+
private _isReadable;
|
|
28
|
+
set content(value: string | Readable<string>);
|
|
29
|
+
get content(): string | Readable<string>;
|
|
30
|
+
private _setTextContent;
|
|
31
|
+
private _setupSignalBinding;
|
|
32
|
+
render(): void;
|
|
33
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { SazamiComponent } from "./base";
|
|
2
|
+
import { type Readable } from "@nisoku/sairin";
|
|
3
|
+
declare const iconButtonConfig: {
|
|
4
|
+
readonly properties: {
|
|
5
|
+
readonly icon: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
readonly reflect: true;
|
|
8
|
+
};
|
|
9
|
+
readonly size: {
|
|
10
|
+
readonly type: "string";
|
|
11
|
+
readonly reflect: true;
|
|
12
|
+
};
|
|
13
|
+
readonly variant: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly reflect: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly events: {
|
|
19
|
+
readonly click: {
|
|
20
|
+
readonly name: "saz-click";
|
|
21
|
+
readonly detail: {};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare class SazamiIconButton extends SazamiComponent<typeof iconButtonConfig> {
|
|
26
|
+
icon: string;
|
|
27
|
+
size: string;
|
|
28
|
+
variant: string;
|
|
29
|
+
private _handlersAdded;
|
|
30
|
+
private _autoAriaLabel;
|
|
31
|
+
private _disabledSignal;
|
|
32
|
+
private _isReadableBool;
|
|
33
|
+
set disabled(value: boolean | Readable<boolean>);
|
|
34
|
+
get disabled(): boolean | Readable<boolean>;
|
|
35
|
+
private _setDisabled;
|
|
36
|
+
private _getIsDisabled;
|
|
37
|
+
render(): void;
|
|
38
|
+
private _updateTabIndex;
|
|
39
|
+
static get observedAttributes(): string[];
|
|
40
|
+
attributeChangedCallback(name: string, oldVal: string | null, newVal: string | null): void;
|
|
41
|
+
private _handleClick;
|
|
42
|
+
private _handleKeydown;
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
}
|
|
45
|
+
export {};
|