@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.
@@ -8,6 +8,7 @@ import { ViElement } from '../base/vi-element.js';
8
8
  * separate components.
9
9
  */
10
10
  export type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
11
+ export type InputSize = 'xs' | 'sm' | 'md' | 'lg';
11
12
  declare const ViInput_base: typeof ViElement & (new (...args: any[]) => import("../base/focusable-mixin.js").FocusableInterface) & (new (...args: any[]) => import("../base/validity-mixin.js").ValidityInterface);
12
13
  /**
13
14
  * vi-input
@@ -66,8 +67,14 @@ export declare class ViInput extends ViInput_base {
66
67
  accessor value: string;
67
68
  /** When true, disables the input and removes it from the tab order. */
68
69
  accessor disabled: boolean;
70
+ /** Size scale — controls padding and font-size. */
71
+ accessor size: InputSize;
69
72
  /** When true, the value cannot be edited but is still submitted. */
70
73
  accessor readonly: boolean;
74
+ /** The accessibility label. */
75
+ accessor ariaLabel: string;
76
+ /** Reference to an element id containing the label. */
77
+ accessor ariaLabelledby: string;
71
78
  protected _testValidity(): Partial<ValidityStateFlags>;
72
79
  updated(changed: PropertyValues): void;
73
80
  /** Resets value and validation state when the associated form resets. */
@@ -1 +1 @@
1
- {"version":3,"file":"vi-input.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/input/vi-input.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;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,CAAC;;AAEb;;;;;;;;;;;;;;;;;;;;;;;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AAE,cAAc,GAAG,IAAI;IAU/C,yEAAyE;IACzE,iBAAiB,IAAI,IAAI;IAMzB,6EAA6E;IAC7E,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAM7C,OAAO,CAAC,QAAQ;IAahB,OAAO,CAAC,SAAS;IAejB,OAAO,KAAK,cAAc,GAIzB;IAED,OAAO,KAAK,kBAAkB,GAgB7B;IAEQ,MAAM,IAAI,cAAc;CAoClC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
package/input/vi-input.js CHANGED
@@ -66,7 +66,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
66
66
  * - The binding is to a custom element property — use .prop=${val} instead
67
67
  */ const ifNonEmpty = (value)=>ifDefined(value === '' ? undefined : value ?? undefined);
68
68
 
69
- const inputStyles = "@charset \"UTF-8\";@layer reset,components,utilities;@layer components{.input-field{display:flex;flex-direction:column;gap:var(--vi-input-spacing-field-gap, var(--vi-spacing-xs, 8px));width:100%}.input-control{appearance:none;-webkit-appearance:none;display:block;width:100%;box-sizing:border-box;min-height:var(--vi-input-sizing-min-height, 40px);border:var(--vi-border-width-thin, 1px) solid var(--vi-input-border-color, var(--vi-color-grey-300, #e0e0e0));border-radius:var(--vi-input-shape-border-radius, var(--vi-border-radius-lg, 8px));padding:var(--vi-input-spacing-padding-block, var(--vi-spacing-xs, 8px)) var(--vi-input-spacing-padding-inline, var(--vi-spacing-sm, 16px));font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-input-typography-font-size, var(--vi-font-size-base, 16px));font-weight:var(--vi-font-weight-normal, 400);line-height:var(--vi-input-typography-line-height, var(--vi-line-height-normal, 1.5));color:var(--vi-input-text-color, var(--vi-color-foreground, #111827));background-color:var(--vi-input-background-color, var(--vi-color-background, #ffffff));transition:border-color .15s ease,box-shadow .15s ease}.input-control:hover:not(:focus-visible){border-color:var(--vi-input-border-color-hover, var(--vi-color-grey-500, #9e9e9e))}.input-control:focus-visible,.input-control:focus{outline:var(--vi-border-width-base, 2px) solid var(--vi-input-focus-ring-color, var(--vi-color-primary, #3676d0));outline-offset:0;box-shadow:0 0 0 3px var(--vi-input-focus-ring-glow, var(--vi-color-blue-200, #cee6ff))}.input-control::placeholder{color:var(--vi-input-placeholder-color, var(--vi-color-grey-500, #9e9e9e))}.input-helper{font-size:var(--vi-input-helper-size, var(--vi-font-size-xs, 12px));line-height:var(--vi-input-helper-leading, var(--vi-line-height-normal, 1.5));color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}.input-error{font-size:var(--vi-input-error-size, var(--vi-font-size-xs, 12px));line-height:var(--vi-input-error-leading, var(--vi-line-height-normal, 1.5));color:var(--vi-input-error-color, var(--vi-color-error, #ef4444))}@media(prefers-reduced-motion:reduce){.input-control{transition:none}}}:host{display:block;outline:none}:host([disabled]){opacity:.6;cursor:not-allowed;pointer-events:none}:host([status=invalid]){--vi-input-border-color: var(--vi-color-error, #ef4444);--vi-input-border-color-hover: var(--vi-color-red-700, #db231b);--vi-input-focus-ring-color: var(--vi-color-error, #ef4444);--vi-input-focus-ring-glow: var(--vi-color-red-100, #ffccce);--vi-input-label-color: var(--vi-color-error, #ef4444)}:host([status=valid]){--vi-input-border-color: var(--vi-color-success, #489167);--vi-input-border-color-hover: var(--vi-color-green-700, #265a3d);--vi-input-focus-ring-color: var(--vi-color-success, #489167);--vi-input-focus-ring-glow: var(--vi-color-green-100, #e6f0eb)}.input-validation{font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-font-size-xs, 12px);line-height:var(--vi-line-height-normal, 1.5);letter-spacing:var(--vi-letter-spacing-wider, .05em);color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}.input-validation--invalid{color:var(--vi-input-error-color, var(--vi-color-error, #ef4444))}.input-validation--valid{color:var(--vi-input-success-color, var(--vi-color-success, #489167))}::slotted([slot=helper]){font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-font-size-xs, 12px);line-height:var(--vi-line-height-normal, 1.5);letter-spacing:var(--vi-letter-spacing-wider, .05em);color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}";
69
+ const inputStyles = "@charset \"UTF-8\";@layer reset,components,utilities;@layer components{.input-field{display:flex;flex-direction:column;gap:var(--vi-input-spacing-field-gap, var(--vi-spacing-xs, 8px));width:100%}.input-control{appearance:none;-webkit-appearance:none;display:block;width:100%;box-sizing:border-box;min-height:var(--vi-input-sizing-min-height, 40px);border:var(--vi-border-width-thin, 1px) solid var(--vi-input-border-color, var(--vi-color-grey-300, #e0e0e0));border-radius:var(--vi-input-shape-border-radius, var(--vi-border-radius-lg, 8px));padding:var(--vi-input-spacing-padding-block, var(--vi-spacing-xs, 8px)) var(--vi-input-spacing-padding-inline, var(--vi-spacing-sm, 16px));font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-input-typography-font-size, var(--vi-font-size-base, 16px));font-weight:var(--vi-font-weight-normal, 400);line-height:var(--vi-input-typography-line-height, var(--vi-line-height-normal, 1.5));color:var(--vi-input-text-color, var(--vi-color-foreground, #111827));background-color:var(--vi-input-background-color, var(--vi-color-background, #ffffff));transition:border-color .15s ease,box-shadow .15s ease}.input-control:hover:not(:focus-visible){border-color:var(--vi-input-border-color-hover, var(--vi-color-grey-500, #9e9e9e))}.input-control:focus-visible,.input-control:focus{outline:var(--vi-border-width-base, 2px) solid var(--vi-input-focus-ring-color, var(--vi-color-primary, #3676d0));outline-offset:0;box-shadow:0 0 0 3px var(--vi-input-focus-ring-glow, var(--vi-color-blue-200, #cee6ff))}.input-control::placeholder{color:var(--vi-input-placeholder-color, var(--vi-color-grey-500, #9e9e9e))}.input-helper{font-size:var(--vi-input-helper-size, var(--vi-font-size-xs, 12px));line-height:var(--vi-input-helper-leading, var(--vi-line-height-normal, 1.5));color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}.input-error{font-size:var(--vi-input-error-size, var(--vi-font-size-xs, 12px));line-height:var(--vi-input-error-leading, var(--vi-line-height-normal, 1.5));color:var(--vi-input-error-color, var(--vi-color-error, #ef4444))}@media(prefers-reduced-motion:reduce){.input-control{transition:none}}}:host{display:block;outline:none}:host([disabled]){opacity:.6;cursor:not-allowed;pointer-events:none}:host([status=invalid]){--vi-input-border-color: var(--vi-color-error, #ef4444);--vi-input-border-color-hover: var(--vi-color-error, #ef4444);--vi-input-focus-ring-color: var(--vi-color-error, #ef4444);--vi-input-focus-ring-glow: var(--vi-color-red-100, #ffccce);--vi-input-label-color: var(--vi-color-error, #ef4444)}:host([status=valid]){--vi-input-border-color: var(--vi-color-success, #489167);--vi-input-border-color-hover: var(--vi-color-success, #489167);--vi-input-focus-ring-color: var(--vi-color-success, #489167);--vi-input-focus-ring-glow: var(--vi-color-green-100, #e6f0eb)}.input-validation{font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-font-size-xs, 12px);line-height:var(--vi-line-height-normal, 1.5);letter-spacing:var(--vi-letter-spacing-wider, .05em);color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}.input-validation--invalid{color:var(--vi-input-error-color, var(--vi-color-error, #ef4444))}.input-validation--valid{color:var(--vi-input-success-color, var(--vi-color-success, #489167))}::slotted([slot=helper]){font-family:var(--vi-font-family-base, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);font-size:var(--vi-font-size-xs, 12px);line-height:var(--vi-line-height-normal, 1.5);letter-spacing:var(--vi-letter-spacing-wider, .05em);color:var(--vi-input-helper-color, var(--vi-color-grey-500, #9e9e9e))}:host([size=xs]){--vi-input-spacing-padding-block: 2px;--vi-input-spacing-padding-inline: 8px;--vi-input-typography-font-size: var(--vi-font-size-xs, 12px)}:host([size=sm]){--vi-input-spacing-padding-block: 4px;--vi-input-spacing-padding-inline: 12px;--vi-input-typography-font-size: var(--vi-font-size-sm, 14px)}:host([size=lg]){--vi-input-spacing-padding-block: 12px;--vi-input-spacing-padding-inline: 20px;--vi-input-typography-font-size: var(--vi-font-size-lg, 18px)}";
70
70
 
71
71
  function applyDecs2203RFactory() {
72
72
  function createAddInitializerMethod(initializers, decoratorFinishedRef) {
@@ -443,9 +443,9 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
443
443
  function _identity(x) {
444
444
  return x;
445
445
  }
446
- var _dec, _initClass, _ValidityMixin, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, // ── ValidityMixin contract — must be declared as @property —————————————
446
+ var _dec, _initClass, _ValidityMixin, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, // ── ValidityMixin contract — must be declared as @property —————————————
447
447
  _init_status, _init_required, _init_validityMessage, // ── Public API ─────────────────────────────────────────────────────────────
448
- /** Input type. Controls the keyboard/picker on mobile and browser validation hints. */ _init_type, /** Native input placeholder text. */ _init_placeholder, /** Form field name. Submitted with the form when set. */ _init_name, /** Current value. Synced to ElementInternals for form participation. */ _init_value, /** When true, disables the input and removes it from the tab order. */ _init_disabled, /** When true, the value cannot be edited but is still submitted. */ _init_readonly, _initProto;
448
+ /** Input type. Controls the keyboard/picker on mobile and browser validation hints. */ _init_type, /** Native input placeholder text. */ _init_placeholder, /** Form field name. Submitted with the form when set. */ _init_name, /** Current value. Synced to ElementInternals for form participation. */ _init_value, /** When true, disables the input and removes it from the tab order. */ _init_disabled, /** Size scale — controls padding and font-size. */ _init_size, /** When true, the value cannot be edited but is still submitted. */ _init_readonly, /** The accessibility label. */ _init_ariaLabel, /** Reference to an element id containing the label. */ _init_ariaLabelledby, _initProto;
449
449
  let _ViInput;
450
450
  _dec = customElement('vi-input'), _dec1 = property({
451
451
  reflect: true
@@ -459,8 +459,15 @@ _dec = customElement('vi-input'), _dec1 = property({
459
459
  type: Boolean,
460
460
  reflect: true
461
461
  }), _dec9 = property({
462
+ type: String,
463
+ reflect: true
464
+ }), _dec10 = property({
462
465
  type: Boolean,
463
466
  reflect: true
467
+ }), _dec11 = property({
468
+ attribute: 'aria-label'
469
+ }), _dec12 = property({
470
+ attribute: 'aria-labelledby'
464
471
  });
465
472
  new class extends _identity {
466
473
  constructor(){
@@ -469,7 +476,7 @@ new class extends _identity {
469
476
  static{
470
477
  class ViInput extends (_ValidityMixin = ValidityMixin(FocusableMixin(ViElement))) {
471
478
  static{
472
- ({ e: [_init_status, _init_required, _init_validityMessage, _init_type, _init_placeholder, _init_name, _init_value, _init_disabled, _init_readonly, _initProto], c: [_ViInput, _initClass] } = _apply_decs_2203_r(this, [
479
+ ({ e: [_init_status, _init_required, _init_validityMessage, _init_type, _init_placeholder, _init_name, _init_value, _init_disabled, _init_size, _init_readonly, _init_ariaLabel, _init_ariaLabelledby, _initProto], c: [_ViInput, _initClass] } = _apply_decs_2203_r(this, [
473
480
  [
474
481
  _dec1,
475
482
  1,
@@ -513,7 +520,22 @@ new class extends _identity {
513
520
  [
514
521
  _dec9,
515
522
  1,
523
+ "size"
524
+ ],
525
+ [
526
+ _dec10,
527
+ 1,
516
528
  "readonly"
529
+ ],
530
+ [
531
+ _dec11,
532
+ 1,
533
+ "ariaLabel"
534
+ ],
535
+ [
536
+ _dec12,
537
+ 1,
538
+ "ariaLabelledby"
517
539
  ]
518
540
  ], [
519
541
  _dec
@@ -583,12 +605,33 @@ new class extends _identity {
583
605
  set disabled(_v) {
584
606
  this.#___private_disabled_8 = _v;
585
607
  }
586
- #___private_readonly_9 = _init_readonly(this, false);
608
+ #___private_size_9 = _init_size(this, 'md');
609
+ get size() {
610
+ return this.#___private_size_9;
611
+ }
612
+ set size(_v) {
613
+ this.#___private_size_9 = _v;
614
+ }
615
+ #___private_readonly_10 = _init_readonly(this, false);
587
616
  get readonly() {
588
- return this.#___private_readonly_9;
617
+ return this.#___private_readonly_10;
589
618
  }
590
619
  set readonly(_v) {
591
- this.#___private_readonly_9 = _v;
620
+ this.#___private_readonly_10 = _v;
621
+ }
622
+ #___private_ariaLabel_11 = _init_ariaLabel(this, '');
623
+ get ariaLabel() {
624
+ return this.#___private_ariaLabel_11;
625
+ }
626
+ set ariaLabel(_v) {
627
+ this.#___private_ariaLabel_11 = _v;
628
+ }
629
+ #___private_ariaLabelledby_12 = _init_ariaLabelledby(this, '');
630
+ get ariaLabelledby() {
631
+ return this.#___private_ariaLabelledby_12;
632
+ }
633
+ set ariaLabelledby(_v) {
634
+ this.#___private_ariaLabelledby_12 = _v;
592
635
  }
593
636
  // ── ValidityMixin hook ─────────────────────────────────────────────────────
594
637
  // _testValidity is declared protected in ValidityInterface, but TypeScript's
@@ -705,6 +748,8 @@ new class extends _identity {
705
748
  ?required=${required}
706
749
  aria-required=${ifNonEmpty(required ? 'true' : '')}
707
750
  aria-invalid=${this.status === 'invalid' ? 'true' : 'false'}
751
+ aria-label=${ifNonEmpty(this.ariaLabel)}
752
+ aria-labelledby=${ifNonEmpty(this.ariaLabelledby)}
708
753
  aria-describedby=${this.validityMessage ? 'helper-text validation-message' : 'helper-text'}
709
754
  aria-errormessage=${ifNonEmpty(this.status === 'invalid' && this.validityMessage ? 'validation-message' : '')}
710
755
  placeholder=${ifNonEmpty(placeholder)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vialiq/web-components",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -47,11 +47,28 @@
47
47
  "./radio": {
48
48
  "types": "./radio/index.d.ts",
49
49
  "default": "./radio/index.js"
50
+ },
51
+ "./checkbox": {
52
+ "types": "./checkbox/index.d.ts",
53
+ "default": "./checkbox/index.js"
54
+ },
55
+ "./checkbox/vi-checkbox": {
56
+ "types": "./checkbox/vi-checkbox.d.ts",
57
+ "default": "./checkbox/vi-checkbox.js"
58
+ },
59
+ "./tooltip": {
60
+ "types": "./tooltip/index.d.ts",
61
+ "default": "./tooltip/index.js"
62
+ },
63
+ "./tooltip/vi-tooltip": {
64
+ "types": "./tooltip/vi-tooltip.d.ts",
65
+ "default": "./tooltip/vi-tooltip.js"
50
66
  }
51
67
  },
52
68
  "peerDependencies": {
53
- "@vialiq/flux-ui": "^0.2.0",
54
- "@vialiq/icons": ">=0.0.3 <0.1.0",
69
+ "@floating-ui/dom": ">=1.0.0",
70
+ "@vialiq/flux-ui": "^0.4.0",
71
+ "@vialiq/icons": ">=0.0.8 <0.1.0",
55
72
  "lit": "^3.0.0"
56
73
  },
57
74
  "keywords": [
@@ -69,6 +86,9 @@
69
86
  "button/",
70
87
  "icons/",
71
88
  "input/",
89
+ "radio/",
90
+ "checkbox/",
91
+ "tooltip/",
72
92
  "README.md"
73
93
  ]
74
94
  }
@@ -0,0 +1,5 @@
1
+ export { ViRadio } from './vi-radio.js';
2
+ export type { RadioSize } from './vi-radio.js';
3
+ export { ViRadioGroup } from './vi-radio-group.js';
4
+ export type { RadioGroupOrientation } from './vi-radio-group.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
package/radio/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { ViRadio } from './vi-radio.js';
2
+ export { ViRadioGroup } from './vi-radio-group.js';
@@ -0,0 +1,72 @@
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
+ import { type RadioSize } from './vi-radio.js';
5
+ export type RadioGroupOrientation = 'vertical' | 'horizontal';
6
+ declare const ViRadioGroup_base: typeof ViElement & (new (...args: any[]) => import("../base/validity-mixin.js").ValidityInterface);
7
+ /**
8
+ * vi-radio-group
9
+ * Form-associated radio button group container.
10
+ * Manages WAI-ARIA compliant keyboard roving tabindex and selection state.
11
+ *
12
+ * @element vi-radio-group
13
+ *
14
+ * @attr {string} value - Value of the currently selected radio option.
15
+ * @attr {string} name - Shared name for all child radios.
16
+ * @attr {boolean} disabled - Disables the entire radio group (reflected).
17
+ * @attr {boolean} required - Marks the group as requiring a selection (reflected).
18
+ * @attr {ControlStatus} status - Visual status: default | valid | invalid (reflected).
19
+ * @attr {string} validity-message - Error message shown when validation fails.
20
+ * @attr {RadioGroupOrientation} orientation - Layout direction: vertical | horizontal (reflected).
21
+ *
22
+ * @slot - Child vi-radio elements.
23
+ * @slot label - Text displayed above the group.
24
+ * @slot helper - Helper text displayed below the group.
25
+ *
26
+ * @fires {CustomEvent<{value: string}>} vialiq-change - Dispatched when selection changes. Bubbles, composed.
27
+ * @fires {Event} invalid - Fired when validation check fails.
28
+ */
29
+ export declare class ViRadioGroup extends ViRadioGroup_base {
30
+ static formAssociated: boolean;
31
+ static styles: import("lit").CSSResult;
32
+ protected readonly _internals: ElementInternals;
33
+ accessor status: ControlStatus;
34
+ accessor required: boolean;
35
+ accessor validityMessage: string;
36
+ /** Currently selected radio's value. */
37
+ accessor value: string;
38
+ /** Shared name for all child radios. */
39
+ accessor name: string;
40
+ /** Disables the entire group. */
41
+ accessor disabled: boolean;
42
+ /** Layout direction of the radio group. */
43
+ accessor orientation: RadioGroupOrientation;
44
+ /** Size scale — controls spacing and propagates to child radios. */
45
+ accessor size: RadioSize;
46
+ /** Allows clearing the selected radio button on double click. */
47
+ accessor allowDblclickClear: boolean;
48
+ private _observer?;
49
+ private _initialValue;
50
+ connectedCallback(): void;
51
+ disconnectedCallback(): void;
52
+ updated(changed: PropertyValues): void;
53
+ /** Resets the value and validation state when the parent form resets. */
54
+ formResetCallback(): void;
55
+ /** Keeps disabled in sync when a containing fieldset/form is disabled. */
56
+ formDisabledCallback(disabled: boolean): void;
57
+ protected _testValidity(): Partial<ValidityStateFlags>;
58
+ private _getRadios;
59
+ private _updateRadios;
60
+ private _handleRadioChecked;
61
+ private _onKeydown;
62
+ private _onDblclick;
63
+ private get _validationMessage();
64
+ render(): TemplateResult;
65
+ }
66
+ declare global {
67
+ interface HTMLElementTagNameMap {
68
+ 'vi-radio-group': ViRadioGroup;
69
+ }
70
+ }
71
+ export {};
72
+ //# sourceMappingURL=vi-radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-radio-group.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/radio/vi-radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAErF,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBACa,YAAa,SAAQ,iBAAwB;IACxD,MAAM,CAAC,cAAc,UAAQ;IAC7B,OAAgB,MAAM,0BAEpB;IAEF,SAAS,CAAC,QAAQ,CAAC,UAAU,mBAA0B;IAI1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAa;IAC5B,QAAQ,CAAC,QAAQ,UAAS;IACzB,QAAQ,CAAC,eAAe,SAAM;IAI3E,wCAAwC;IACX,QAAQ,CAAC,KAAK,SAAM;IAEjD,wCAAwC;I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