@vialiq/web-components 0.3.0 → 0.5.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 +575 -2
- package/button/vi-button.js +1 -1
- package/checkbox/index.d.ts +3 -0
- package/checkbox/index.d.ts.map +1 -0
- package/checkbox/index.js +1 -0
- package/checkbox/vi-checkbox.d.ts +68 -0
- package/checkbox/vi-checkbox.d.ts.map +1 -0
- package/checkbox/vi-checkbox.js +637 -0
- package/index.d.ts +6 -1
- package/index.js +2 -0
- package/input/index.d.ts +1 -1
- package/input/index.d.ts.map +1 -1
- package/input/vi-input.d.ts +7 -0
- package/input/vi-input.d.ts.map +1 -1
- package/input/vi-input.js +52 -7
- package/package.json +23 -3
- package/radio/index.d.ts +5 -0
- package/radio/index.d.ts.map +1 -0
- package/radio/index.js +2 -0
- package/radio/vi-radio-group.d.ts +72 -0
- package/radio/vi-radio-group.d.ts.map +1 -0
- package/radio/vi-radio-group.js +761 -0
- package/radio/vi-radio.d.ts +47 -0
- package/radio/vi-radio.d.ts.map +1 -0
- package/radio/vi-radio.js +538 -0
- package/tooltip/index.d.ts +3 -0
- package/tooltip/index.d.ts.map +1 -0
- package/tooltip/index.js +1 -0
- package/tooltip/vi-tooltip.d.ts +84 -0
- package/tooltip/vi-tooltip.d.ts.map +1 -0
- package/tooltip/vi-tooltip.js +908 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
+
import { type ControlStatus } from '../base/validity-mixin.js';
|
|
3
|
+
import { ViElement } from '../base/vi-element.js';
|
|
4
|
+
export type CheckboxSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
declare const ViCheckbox_base: typeof ViElement & (new (...args: any[]) => import("../base/focusable-mixin.js").FocusableInterface) & (new (...args: any[]) => import("../base/validity-mixin.js").ValidityInterface);
|
|
6
|
+
/**
|
|
7
|
+
* vi-checkbox
|
|
8
|
+
* Form-associated checkbox control using Flux UI tokens.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: vi-checkbox is form-associated and participates in form submission and constraint validation.
|
|
11
|
+
* Each checkbox is independently focusable (no roving tabindex / mutual-exclusivity behavior).
|
|
12
|
+
*
|
|
13
|
+
* @element vi-checkbox
|
|
14
|
+
*
|
|
15
|
+
* @attr {boolean} checked - Checked state of the checkbox
|
|
16
|
+
* @attr {boolean} indeterminate - Indeterminate (partial) state of the checkbox
|
|
17
|
+
* @attr {string} value - Form submission value when checked (default: 'on')
|
|
18
|
+
* @attr {string} name - Form field name
|
|
19
|
+
* @attr {boolean} disabled - Disables the checkbox
|
|
20
|
+
* @attr {boolean} required - Marks the field as required
|
|
21
|
+
* @attr {ControlStatus} status - Validation state: 'default' | 'valid' | 'invalid'
|
|
22
|
+
*
|
|
23
|
+
* @slot - Label text/content.
|
|
24
|
+
*
|
|
25
|
+
* @fires {CustomEvent<{checked:boolean; value:string}>} vialiq-change - Fires when user toggles checked state.
|
|
26
|
+
*
|
|
27
|
+
* @csspart box - The visual checkbox square (custom-drawn box).
|
|
28
|
+
* @csspart check - The SVG checkmark/indeterminate dash container.
|
|
29
|
+
* @csspart label - The label text wrapper.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ViCheckbox extends ViCheckbox_base {
|
|
32
|
+
static formAssociated: boolean;
|
|
33
|
+
static styles: import("lit").CSSResult;
|
|
34
|
+
protected readonly _internals: ElementInternals;
|
|
35
|
+
private _initialChecked;
|
|
36
|
+
protected get _focusableElement(): HTMLInputElement | null;
|
|
37
|
+
accessor status: ControlStatus;
|
|
38
|
+
accessor required: boolean;
|
|
39
|
+
accessor validityMessage: string;
|
|
40
|
+
/** Checked state. */
|
|
41
|
+
accessor checked: boolean;
|
|
42
|
+
/** Indeterminate (partial) state. */
|
|
43
|
+
accessor indeterminate: boolean;
|
|
44
|
+
/** Size scale — controls size, padding, and font-size. */
|
|
45
|
+
accessor size: CheckboxSize;
|
|
46
|
+
/** Form submission value when checked. */
|
|
47
|
+
accessor value: string;
|
|
48
|
+
/** Form field name. */
|
|
49
|
+
accessor name: string;
|
|
50
|
+
/** Disables the checkbox. */
|
|
51
|
+
accessor disabled: boolean;
|
|
52
|
+
protected _testValidity(): Partial<ValidityStateFlags>;
|
|
53
|
+
connectedCallback(): void;
|
|
54
|
+
updated(changed: PropertyValues): void;
|
|
55
|
+
/** Resets value and validation state when the associated form resets. */
|
|
56
|
+
formResetCallback(): void;
|
|
57
|
+
/** Keeps disabled in sync when a containing fieldset or form is disabled. */
|
|
58
|
+
formDisabledCallback(disabled: boolean): void;
|
|
59
|
+
private _onChange;
|
|
60
|
+
render(): TemplateResult;
|
|
61
|
+
}
|
|
62
|
+
declare global {
|
|
63
|
+
interface HTMLElementTagNameMap {
|
|
64
|
+
'vi-checkbox': ViCheckbox;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=vi-checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vi-checkbox.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/checkbox/vi-checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAGb,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;;AAErD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,UAAW,SAAQ,eAAwC;IACtE,MAAM,CAAC,cAAc,UAAQ;IAC7B,OAAgB,MAAM,0BAEpB;IAEF,SAAS,CAAC,QAAQ,CAAC,UAAU,mBAA0B;IACvD,OAAO,CAAC,eAAe,CAAS;IAEhC,cAAuB,iBAAiB,IAAI,gBAA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