@vialiq/web-components 0.15.0 → 0.17.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/base/draggable-mixin.d.ts +1 -12
- package/base/draggable-mixin.d.ts.map +1 -1
- package/button/vi-button.d.ts +2 -0
- package/button/vi-button.d.ts.map +1 -1
- package/button/vi-button.js +22 -7
- package/checkbox/vi-checkbox.d.ts.map +1 -1
- package/checkbox/vi-checkbox.js +0 -5
- package/icons/vi-icon.d.ts.map +1 -1
- package/icons/vi-icon.js +11 -0
- package/index.d.ts +4 -0
- package/index.js +1299 -2
- package/package.json +2 -2
- package/radio/vi-radio.d.ts.map +1 -1
- package/radio/vi-radio.js +0 -6
|
@@ -11,22 +11,11 @@ export declare class DraggableInterface {
|
|
|
11
11
|
* DraggableMixin
|
|
12
12
|
*
|
|
13
13
|
* Provides native drag-and-drop capabilities using Pointer Events to any LitElement.
|
|
14
|
-
* It
|
|
15
|
-
*
|
|
16
|
-
* By default, this applies a `transform: translate3d(x, y, 0)` to the element returned
|
|
17
|
-
* by `_dragTarget`. This is highly performant and avoids reflowing the layout.
|
|
14
|
+
* It applies performant `transform: translate3d(x, y, 0)` positioning to `_dragTarget`.
|
|
18
15
|
*
|
|
19
16
|
* Subclasses MUST implement:
|
|
20
17
|
* - `_dragTarget`: The HTML element that moves (usually the outer container or dialog).
|
|
21
18
|
* - `_dragHandle`: The HTML element that accepts pointer events to initiate the drag (usually a header).
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* class MyModal extends DraggableMixin(LitElement) {
|
|
26
|
-
* protected get _dragTarget() { return this.shadowRoot.querySelector('.modal'); }
|
|
27
|
-
* protected get _dragHandle() { return this.shadowRoot.querySelector('.header'); }
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
19
|
*/
|
|
31
20
|
export declare function DraggableMixin<T extends Constructor<LitElement>>(Base: T): T & Constructor<DraggableInterface>;
|
|
32
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draggable-mixin.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/base/draggable-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAItD,KAAK,WAAW,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,KAAK,WAAW,IAAI,WAAW,GAAG,IAAI,CAAC;IAChD,SAAS,KAAK,WAAW,IAAI,WAAW,GAAG,IAAI,CAAC;IAChD,SAAS,CAAC,UAAU,IAAI,IAAI;IAC5B,SAAS,CAAC,SAAS,IAAI,IAAI;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"draggable-mixin.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/base/draggable-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAItD,KAAK,WAAW,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,KAAK,WAAW,IAAI,WAAW,GAAG,IAAI,CAAC;IAChD,SAAS,KAAK,WAAW,IAAI,WAAW,GAAG,IAAI,CAAC;IAChD,SAAS,CAAC,UAAU,IAAI,IAAI;IAC5B,SAAS,CAAC,SAAS,IAAI,IAAI;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,CAAC,UAAU,CAAC,EAC9D,IAAI,EAAE,CAAC,GACN,CAAC,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAsOrC"}
|
package/button/vi-button.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export declare class ViButton extends ViButton_base {
|
|
|
53
53
|
accessor iconOnly: boolean;
|
|
54
54
|
/** Disables the button. */
|
|
55
55
|
accessor disabled: boolean;
|
|
56
|
+
/** Accessible label forwarded to the inner native button. */
|
|
57
|
+
accessor ariaLabel: string | null;
|
|
56
58
|
private accessor _hasIcon;
|
|
57
59
|
updated(changed: PropertyValues): void;
|
|
58
60
|
private onIconSlotChange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vi-button.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/button/vi-button.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"vi-button.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/button/vi-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9F;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAC;;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBACa,QAAS,SAAQ,aAAyB;IACrD,OAAgB,MAAM,0BAAmC;IAEzD,cAAuB,iBAAiB,IAAI,iBAAiB,GAAG,IAAI,CAEnE;IAED,sBAAsB;IACqB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAa;IAEvF,mDAAmD;IACR,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAQ;IAE5E,sHAAsH;IAC9C,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAW;IAE9H,0EAA0E;IACL,QAAQ,CAAC,SAAS,UAAS;IAEhG,kGAAkG;IAC9B,QAAQ,CAAC,QAAQ,UAAS;IAE9F,2BAA2B;IACiB,QAAQ,CAAC,QAAQ,UAAS;IAEtE,6DAA6D;IAC7D,SAAyD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAElC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAe/C,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,OAAO;IAON,MAAM,IAAI,cAAc;CAwBlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
package/button/vi-button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unsafeCSS, css, html } from 'lit';
|
|
1
|
+
import { unsafeCSS, css, nothing, html } from 'lit';
|
|
2
2
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
3
3
|
import { F as FocusableMixin } from '../focusable-mixin-CmxOyPX5.js';
|
|
4
4
|
import { V as ViElement } from '../vi-element-C6GfDPs3.js';
|
|
@@ -380,7 +380,7 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
|
380
380
|
function _identity(x) {
|
|
381
381
|
return x;
|
|
382
382
|
}
|
|
383
|
-
var _dec, _initClass, _FocusableMixin, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, /** Visual variant. */ _init_variant, /** Size scale — controls padding and font-size. */ _init_size, /** Icon placement: 'start' (before label) or 'end' (after label). CSS order handles it — no DOM changes on toggle. */ _init_iconPlacement, /** When true, stretches the button to fill the width of its container. */ _init_fullWidth, /** When true, styles the button for an icon-only layout (typically square with equal padding). */ _init_iconOnly, /** Disables the button. */ _init_disabled, _init__hasIcon, _initProto;
|
|
383
|
+
var _dec, _initClass, _FocusableMixin, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, /** Visual variant. */ _init_variant, /** Size scale — controls padding and font-size. */ _init_size, /** Icon placement: 'start' (before label) or 'end' (after label). CSS order handles it — no DOM changes on toggle. */ _init_iconPlacement, /** When true, stretches the button to fill the width of its container. */ _init_fullWidth, /** When true, styles the button for an icon-only layout (typically square with equal padding). */ _init_iconOnly, /** Disables the button. */ _init_disabled, /** Accessible label forwarded to the inner native button. */ _init_ariaLabel, _init__hasIcon, _initProto;
|
|
384
384
|
let _ViButton;
|
|
385
385
|
_dec = customElement('vi-button'), _dec1 = property({
|
|
386
386
|
type: String,
|
|
@@ -403,7 +403,9 @@ _dec = customElement('vi-button'), _dec1 = property({
|
|
|
403
403
|
}), _dec6 = property({
|
|
404
404
|
type: Boolean,
|
|
405
405
|
reflect: true
|
|
406
|
-
}), _dec7 =
|
|
406
|
+
}), _dec7 = property({
|
|
407
|
+
attribute: 'aria-label'
|
|
408
|
+
}), _dec8 = state();
|
|
407
409
|
new class extends _identity {
|
|
408
410
|
constructor(){
|
|
409
411
|
super(_ViButton), _initClass();
|
|
@@ -411,7 +413,7 @@ new class extends _identity {
|
|
|
411
413
|
static{
|
|
412
414
|
class ViButton extends (_FocusableMixin = FocusableMixin(ViElement)) {
|
|
413
415
|
static{
|
|
414
|
-
({ e: [_init_variant, _init_size, _init_iconPlacement, _init_fullWidth, _init_iconOnly, _init_disabled, _init__hasIcon, _initProto], c: [_ViButton, _initClass] } = _apply_decs_2203_r(this, [
|
|
416
|
+
({ e: [_init_variant, _init_size, _init_iconPlacement, _init_fullWidth, _init_iconOnly, _init_disabled, _init_ariaLabel, _init__hasIcon, _initProto], c: [_ViButton, _initClass] } = _apply_decs_2203_r(this, [
|
|
415
417
|
[
|
|
416
418
|
_dec1,
|
|
417
419
|
1,
|
|
@@ -445,6 +447,11 @@ new class extends _identity {
|
|
|
445
447
|
[
|
|
446
448
|
_dec7,
|
|
447
449
|
1,
|
|
450
|
+
"ariaLabel"
|
|
451
|
+
],
|
|
452
|
+
[
|
|
453
|
+
_dec8,
|
|
454
|
+
1,
|
|
448
455
|
"_hasIcon"
|
|
449
456
|
]
|
|
450
457
|
], [
|
|
@@ -497,12 +504,19 @@ new class extends _identity {
|
|
|
497
504
|
set disabled(_v) {
|
|
498
505
|
this.#___private_disabled_6 = _v;
|
|
499
506
|
}
|
|
500
|
-
#
|
|
507
|
+
#___private_ariaLabel_7 = _init_ariaLabel(this, null);
|
|
508
|
+
get ariaLabel() {
|
|
509
|
+
return this.#___private_ariaLabel_7;
|
|
510
|
+
}
|
|
511
|
+
set ariaLabel(_v) {
|
|
512
|
+
this.#___private_ariaLabel_7 = _v;
|
|
513
|
+
}
|
|
514
|
+
#___private__hasIcon_8 = _init__hasIcon(this, false);
|
|
501
515
|
get _hasIcon() {
|
|
502
|
-
return this.#
|
|
516
|
+
return this.#___private__hasIcon_8;
|
|
503
517
|
}
|
|
504
518
|
set _hasIcon(_v) {
|
|
505
|
-
this.#
|
|
519
|
+
this.#___private__hasIcon_8 = _v;
|
|
506
520
|
}
|
|
507
521
|
updated(changed) {
|
|
508
522
|
super.updated(changed);
|
|
@@ -539,6 +553,7 @@ new class extends _identity {
|
|
|
539
553
|
type="button"
|
|
540
554
|
tabindex="0"
|
|
541
555
|
?disabled=${disabled}
|
|
556
|
+
aria-label=${this.ariaLabel ?? nothing}
|
|
542
557
|
@click=${onClick}
|
|
543
558
|
>
|
|
544
559
|
<slot
|
|
@@ -1 +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,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wC;IACtE,OAAgB,MAAM,0BAEpB;IAEF,OAAO,CAAC,eAAe,CAAS;IAEhC,cAAuB,iBAAiB,IAAI,gBAAgB,GAAG,IAAI,CAElE;IAI4B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAa;IAC5B,QAAQ,CAAC,QAAQ,UAAS;IAC1D,QAAQ,CAAC,eAAe,SAAM;IAI1C,qBAAqB;IACuB,QAAQ,CAAC,OAAO,UAAS;IAErE,qCAAqC;IACO,QAAQ,CAAC,aAAa,UAAS;IAE3E,0DAA0D;IACf,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAQ;IAE9E,0CAA0C;IAC9B,QAAQ,CAAC,KAAK,SAAQ;IAElC,uBAAuB;IACX,QAAQ,CAAC,IAAI,SAAM;IAE/B,6BAA6B;IACe,QAAQ,CAAC,QAAQ,UAAS;IAItE,SAAS,CAAC,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA0B7C,iBAAiB,IAAI,IAAI;IAKzB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAc/C,yEAAyE;IACzE,iBAAiB,IAAI,IAAI;IAOzB,6EAA6E;IAC7E,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAM7C,OAAO,CAAC,SAAS;IAmBR,MAAM,IAAI,cAAc;CA0ClC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
package/checkbox/vi-checkbox.js
CHANGED
|
@@ -572,11 +572,6 @@ new class extends _identity {
|
|
|
572
572
|
if (changed.has('disabled')) {
|
|
573
573
|
this._setHostFocusable(!this.disabled);
|
|
574
574
|
}
|
|
575
|
-
// Sync inner input's tabindex with host's tabIndex (which is managed by FocusableMixin)
|
|
576
|
-
const input = this._focusableElement;
|
|
577
|
-
if (input && input.tabIndex !== this.tabIndex) {
|
|
578
|
-
input.tabIndex = this.tabIndex;
|
|
579
|
-
}
|
|
580
575
|
}
|
|
581
576
|
/** Resets value and validation state when the associated form resets. */ formResetCallback() {
|
|
582
577
|
this.checked = this._initialChecked;
|
package/icons/vi-icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vi-icon.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/icons/vi-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;;;;;;;;;;;;;;GAeG;AACH,qBACa,MAAO,SAAQ,SAAS;IACnC,OAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"vi-icon.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/icons/vi-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;;;;;;;;;;;;;;GAeG;AACH,qBACa,MAAO,SAAQ,SAAS;IACnC,OAAgB,MAAM,0BA6BpB;IAEF;;;OAGG;IACwC,QAAQ,CAAC,IAAI,SAAM;IAE9D;;;OAGG;IACyB,QAAQ,CAAC,IAAI,SAAM;IAE/C;;;;OAIG;IACyB,QAAQ,CAAC,KAAK,SAAM;IAEvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqC;IAE3D,UAAU,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAOnD,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAchD,YAAY,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAOrD,MAAM,IAAI,cAAc;CAoBlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|
package/icons/vi-icon.js
CHANGED
|
@@ -438,9 +438,20 @@ new class extends _identity {
|
|
|
438
438
|
justify-content: center;
|
|
439
439
|
width: var(--vi-icon-size, 24px);
|
|
440
440
|
height: var(--vi-icon-size, 24px);
|
|
441
|
+
line-height: 1;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
span {
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
align-items: center;
|
|
447
|
+
justify-content: center;
|
|
448
|
+
width: 100%;
|
|
449
|
+
height: 100%;
|
|
450
|
+
line-height: 1;
|
|
441
451
|
}
|
|
442
452
|
|
|
443
453
|
svg {
|
|
454
|
+
display: block;
|
|
444
455
|
width: 100%;
|
|
445
456
|
height: 100%;
|
|
446
457
|
fill: none;
|
package/index.d.ts
CHANGED
|
@@ -30,4 +30,8 @@ export type { ChipVariant, ChipSize } from './chip/vi-chip.js';
|
|
|
30
30
|
export { ViChipGroup } from './chip/vi-chip-group.js';
|
|
31
31
|
export { ViAnimation } from './animation/vi-animation.js';
|
|
32
32
|
export type { AnimationPreset, StaggerDirection, AnimationPhase, ViAnimationEventDetail, } from './animation/vi-animation.js';
|
|
33
|
+
export { ViTag } from './tag/vi-tag.js';
|
|
34
|
+
export type { TagVariant, TagAppearance, TagSize } from './tag/vi-tag.js';
|
|
35
|
+
export { ViSwitch } from './switch/vi-switch.js';
|
|
36
|
+
export type { SwitchSize, LabelPlacement } from './switch/vi-switch.js';
|
|
33
37
|
//# sourceMappingURL=index.d.ts.map
|