q2-tecton-elements 1.10.5 → 1.10.8

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.
Files changed (196) hide show
  1. package/dist/cjs/{icons-921779df.js → icons-4595ee47.js} +61 -1
  2. package/dist/cjs/{index-f4153f5a.js → index-a55d3c34.js} +9 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/q2-btn_2.cjs.entry.js +10 -6
  6. package/dist/cjs/q2-calendar.cjs.entry.js +2902 -6078
  7. package/dist/cjs/q2-carousel-pane.cjs.entry.js +50 -7
  8. package/dist/cjs/q2-carousel.cjs.entry.js +2719 -6513
  9. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  10. package/dist/cjs/q2-checkbox.cjs.entry.js +10 -2
  11. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  12. package/dist/cjs/q2-dropdown.cjs.entry.js +8 -2
  13. package/dist/cjs/q2-editable-field.cjs.entry.js +26 -11
  14. package/dist/cjs/q2-icon.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-input.cjs.entry.js +9 -7
  16. package/dist/cjs/q2-loading-element.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-message.cjs.entry.js +11 -3
  19. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-option.cjs.entry.js +3 -34
  21. package/dist/cjs/q2-radio-group.cjs.entry.js +10 -2
  22. package/dist/cjs/q2-radio.cjs.entry.js +10 -2
  23. package/dist/cjs/q2-section.cjs.entry.js +9 -3
  24. package/dist/cjs/q2-select.cjs.entry.js +175 -130
  25. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-stepper.cjs.entry.js +10 -4
  27. package/dist/cjs/q2-tab-container.cjs.entry.js +9 -11
  28. package/dist/cjs/q2-tab-pane.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  30. package/dist/cjs/q2-textarea.cjs.entry.js +8 -4
  31. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  32. package/dist/collection/components/q2-avatar/index.js +1 -1
  33. package/dist/collection/components/q2-avatar/styles.css +63 -61
  34. package/dist/collection/components/q2-btn/index.js +8 -4
  35. package/dist/collection/components/q2-btn/styles.css +96 -96
  36. package/dist/collection/components/q2-calendar/helpers.js +77 -52
  37. package/dist/collection/components/q2-calendar/index.js +248 -196
  38. package/dist/collection/components/q2-calendar/styles.css +63 -84
  39. package/dist/collection/components/q2-calendar/validation.js +100 -166
  40. package/dist/collection/components/q2-carousel/index.js +204 -266
  41. package/dist/collection/components/q2-carousel/styles.css +152 -155
  42. package/dist/collection/components/q2-carousel-pane/index.js +67 -28
  43. package/dist/collection/components/q2-carousel-pane/styles.css +82 -16
  44. package/dist/collection/components/q2-checkbox/index.js +16 -2
  45. package/dist/collection/components/q2-checkbox/styles.css +152 -176
  46. package/dist/collection/components/q2-checkbox-group/index.js +1 -1
  47. package/dist/collection/components/q2-checkbox-group/styles.css +65 -81
  48. package/dist/collection/components/q2-dropdown/index.js +15 -2
  49. package/dist/collection/components/q2-dropdown/styles.css +49 -36
  50. package/dist/collection/components/q2-dropdown-item/index.js +1 -1
  51. package/dist/collection/components/q2-dropdown-item/styles.css +48 -62
  52. package/dist/collection/components/q2-editable-field/index.js +33 -12
  53. package/dist/collection/components/q2-editable-field/styles.css +49 -50
  54. package/dist/collection/components/q2-icon/icons.js +61 -1
  55. package/dist/collection/components/q2-icon/styles.css +29 -29
  56. package/dist/collection/components/q2-input/index.js +9 -7
  57. package/dist/collection/components/q2-input/styles.css +211 -292
  58. package/dist/collection/components/q2-loading/index.js +1 -1
  59. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js +1 -1
  60. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/styles.css +5 -6
  61. package/dist/collection/components/q2-loading/styles.css +130 -136
  62. package/dist/collection/components/q2-loc/index.js +1 -1
  63. package/dist/collection/components/q2-loc/styles.css +30 -31
  64. package/dist/collection/components/q2-message/index.js +18 -3
  65. package/dist/collection/components/q2-message/styles.css +32 -29
  66. package/dist/collection/components/q2-optgroup/index.js +1 -1
  67. package/dist/collection/components/q2-optgroup/styles.css +42 -47
  68. package/dist/collection/components/q2-option/index.js +4 -42
  69. package/dist/collection/components/q2-option/styles.css +29 -29
  70. package/dist/collection/components/q2-radio/index.js +16 -2
  71. package/dist/collection/components/q2-radio/styles.css +29 -29
  72. package/dist/collection/components/q2-radio-group/index.js +16 -2
  73. package/dist/collection/components/q2-radio-group/styles.css +67 -72
  74. package/dist/collection/components/q2-section/index.js +15 -3
  75. package/dist/collection/components/q2-section/styles.css +77 -77
  76. package/dist/collection/components/q2-select/index.js +182 -131
  77. package/dist/collection/components/q2-select/styles.css +33 -34
  78. package/dist/collection/components/q2-stepper/index.js +15 -3
  79. package/dist/collection/components/q2-stepper/styles.css +32 -32
  80. package/dist/collection/components/q2-stepper-pane/styles.css +29 -29
  81. package/dist/collection/components/q2-tab-container/index.js +7 -9
  82. package/dist/collection/components/q2-tab-container/styles.css +29 -29
  83. package/dist/collection/components/q2-tab-pane/index.js +2 -2
  84. package/dist/collection/components/q2-tab-pane/styles.css +34 -36
  85. package/dist/collection/components/q2-textarea/index.js +8 -4
  86. package/dist/collection/components/q2-textarea/styles.css +180 -228
  87. package/dist/collection/components/tecton-tab-pane/index.js +2 -2
  88. package/dist/collection/components/tecton-tab-pane/styles.css +50 -50
  89. package/dist/collection/utils/index.js +7 -0
  90. package/dist/esm/{icons-a3817842.js → icons-3ee662ea.js} +61 -1
  91. package/dist/esm/{index-476b86cc.js → index-ec6660af.js} +8 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/q2-avatar.entry.js +1 -1
  94. package/dist/esm/q2-btn_2.entry.js +10 -6
  95. package/dist/esm/q2-calendar.entry.js +2902 -6078
  96. package/dist/esm/q2-carousel-pane.entry.js +51 -8
  97. package/dist/esm/q2-carousel.entry.js +2720 -6514
  98. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  99. package/dist/esm/q2-checkbox.entry.js +10 -2
  100. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  101. package/dist/esm/q2-dropdown.entry.js +8 -2
  102. package/dist/esm/q2-editable-field.entry.js +26 -11
  103. package/dist/esm/q2-icon.entry.js +2 -2
  104. package/dist/esm/q2-input.entry.js +9 -7
  105. package/dist/esm/q2-loading-element.entry.js +1 -1
  106. package/dist/esm/q2-loc.entry.js +1 -1
  107. package/dist/esm/q2-message.entry.js +11 -3
  108. package/dist/esm/q2-optgroup.entry.js +2 -2
  109. package/dist/esm/q2-option.entry.js +4 -35
  110. package/dist/esm/q2-radio-group.entry.js +10 -2
  111. package/dist/esm/q2-radio.entry.js +10 -2
  112. package/dist/esm/q2-section.entry.js +9 -3
  113. package/dist/esm/q2-select.entry.js +175 -130
  114. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  115. package/dist/esm/q2-stepper.entry.js +10 -4
  116. package/dist/esm/q2-tab-container.entry.js +7 -9
  117. package/dist/esm/q2-tab-pane.entry.js +2 -2
  118. package/dist/esm/q2-tecton-elements.js +1 -1
  119. package/dist/esm/q2-textarea.entry.js +8 -4
  120. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  121. package/dist/q2-tecton-elements/{p-4830affe.entry.js → p-07a5d703.entry.js} +1 -1
  122. package/dist/q2-tecton-elements/{p-84c05db6.entry.js → p-32ad664c.entry.js} +1 -1
  123. package/dist/q2-tecton-elements/p-37aba2a4.js +1 -0
  124. package/dist/q2-tecton-elements/p-4ae9d1f3.entry.js +1 -0
  125. package/dist/q2-tecton-elements/{p-67d86e3c.js → p-4cd00f1a.js} +1 -1
  126. package/dist/q2-tecton-elements/p-52f53e07.entry.js +1 -0
  127. package/dist/q2-tecton-elements/p-5559f126.entry.js +1 -0
  128. package/dist/q2-tecton-elements/p-6702eb4d.entry.js +1 -0
  129. package/dist/q2-tecton-elements/p-750bcd33.entry.js +1 -0
  130. package/dist/q2-tecton-elements/p-78642b7b.entry.js +1 -0
  131. package/dist/q2-tecton-elements/p-7e6fc65d.entry.js +1 -0
  132. package/dist/q2-tecton-elements/p-7eb39c90.entry.js +1 -0
  133. package/dist/q2-tecton-elements/p-81df91a1.entry.js +1 -0
  134. package/dist/q2-tecton-elements/{p-01e00610.entry.js → p-843b1ee9.entry.js} +1 -1
  135. package/dist/q2-tecton-elements/p-8509b171.entry.js +1 -0
  136. package/dist/q2-tecton-elements/p-8ea2c4f7.entry.js +1 -0
  137. package/dist/q2-tecton-elements/{p-d1d040ef.entry.js → p-95a73559.entry.js} +1 -1
  138. package/dist/q2-tecton-elements/p-96c9eb75.entry.js +1 -0
  139. package/dist/q2-tecton-elements/p-9b50c3c3.entry.js +1 -0
  140. package/dist/q2-tecton-elements/{p-a9bdd814.entry.js → p-a6f8d09a.entry.js} +1 -1
  141. package/dist/q2-tecton-elements/p-ab977515.entry.js +1 -0
  142. package/dist/q2-tecton-elements/{p-9314863f.entry.js → p-bb2e110a.entry.js} +1 -1
  143. package/dist/q2-tecton-elements/p-bbacb804.entry.js +1 -0
  144. package/dist/q2-tecton-elements/p-c555f1de.entry.js +1 -0
  145. package/dist/q2-tecton-elements/p-c5e55b9f.entry.js +1 -0
  146. package/dist/q2-tecton-elements/{p-4229b057.entry.js → p-df182f61.entry.js} +1 -1
  147. package/dist/q2-tecton-elements/p-fa6eea5c.entry.js +1 -0
  148. package/dist/q2-tecton-elements/{p-61c0e5fd.entry.js → p-fbf7c5e6.entry.js} +1 -1
  149. package/dist/q2-tecton-elements/p-fc804ebd.entry.js +1 -0
  150. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  151. package/dist/test/helpers.js +4 -0
  152. package/dist/types/components/q2-btn/index.d.ts +1 -0
  153. package/dist/types/components/q2-calendar/helpers.d.ts +6 -6
  154. package/dist/types/components/q2-calendar/index.d.ts +16 -17
  155. package/dist/types/components/q2-calendar/types.d.ts +9 -26
  156. package/dist/types/components/q2-calendar/validation.d.ts +27 -12
  157. package/dist/types/components/q2-carousel/index.d.ts +15 -45
  158. package/dist/types/components/q2-carousel-pane/index.d.ts +5 -2
  159. package/dist/types/components/q2-checkbox/index.d.ts +2 -0
  160. package/dist/types/components/q2-dropdown/index.d.ts +1 -0
  161. package/dist/types/components/q2-editable-field/index.d.ts +5 -1
  162. package/dist/types/components/q2-input/index.d.ts +1 -1
  163. package/dist/types/components/q2-message/index.d.ts +2 -0
  164. package/dist/types/components/q2-option/index.d.ts +0 -4
  165. package/dist/types/components/q2-radio/index.d.ts +3 -0
  166. package/dist/types/components/q2-radio-group/index.d.ts +1 -0
  167. package/dist/types/components/q2-section/index.d.ts +1 -0
  168. package/dist/types/components/q2-select/index.d.ts +10 -7
  169. package/dist/types/components/q2-stepper/index.d.ts +2 -1
  170. package/dist/types/components/q2-tab-container/index.d.ts +1 -1
  171. package/dist/types/components/q2-textarea/index.d.ts +2 -1
  172. package/dist/types/components.d.ts +3 -2
  173. package/dist/types/util.d.ts +1 -0
  174. package/dist/types/utils/index.d.ts +2 -0
  175. package/dist/types/workspace/workspace/tecton-production_release_1.10.x/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +2 -1
  176. package/package.json +4 -5
  177. package/dist/q2-tecton-elements/p-1fc4e6f6.entry.js +0 -1
  178. package/dist/q2-tecton-elements/p-25a5f691.js +0 -1
  179. package/dist/q2-tecton-elements/p-27353237.entry.js +0 -1
  180. package/dist/q2-tecton-elements/p-3e100450.entry.js +0 -1
  181. package/dist/q2-tecton-elements/p-428d15fd.entry.js +0 -1
  182. package/dist/q2-tecton-elements/p-48fc317d.entry.js +0 -1
  183. package/dist/q2-tecton-elements/p-5222b792.entry.js +0 -1
  184. package/dist/q2-tecton-elements/p-5469c1e9.entry.js +0 -1
  185. package/dist/q2-tecton-elements/p-74c1a311.entry.js +0 -1
  186. package/dist/q2-tecton-elements/p-784af485.entry.js +0 -1
  187. package/dist/q2-tecton-elements/p-7c99a58b.entry.js +0 -1
  188. package/dist/q2-tecton-elements/p-7f74b629.entry.js +0 -1
  189. package/dist/q2-tecton-elements/p-831a461f.entry.js +0 -1
  190. package/dist/q2-tecton-elements/p-84c52d3b.entry.js +0 -9
  191. package/dist/q2-tecton-elements/p-997e4c7e.entry.js +0 -1
  192. package/dist/q2-tecton-elements/p-a224bc9c.entry.js +0 -1
  193. package/dist/q2-tecton-elements/p-d893fcf2.entry.js +0 -1
  194. package/dist/q2-tecton-elements/p-da7cca07.entry.js +0 -1
  195. package/dist/q2-tecton-elements/p-f17761da.entry.js +0 -1
  196. package/dist/q2-tecton-elements/p-f5e074f8.entry.js +0 -1
@@ -1,67 +1,67 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  *:active {
6
- outline: none;
6
+ outline: none;
7
7
  }
8
8
 
9
9
  *:focus {
10
- outline: none;
11
- box-shadow: var(--const-global-focus);
10
+ outline: none;
11
+ box-shadow: var(--const-global-focus);
12
12
  }
13
13
 
14
14
  :host {
15
- box-shadow: none !important;
15
+ box-shadow: none !important;
16
16
  }
17
17
 
18
18
  ::-moz-focus-inner {
19
- border: none;
19
+ border: none;
20
20
  }
21
21
 
22
22
  input,
23
23
  textarea,
24
24
  button {
25
- font-family: inherit;
26
- font-size: inherit;
25
+ font-family: inherit;
26
+ font-size: inherit;
27
27
  }
28
28
 
29
29
  :host(.sr),
30
30
  :host(.sr) button {
31
- border: 0;
32
- clip: rect(0 0 0 0);
33
- height: 1px;
34
- margin: -1px;
35
- overflow: hidden;
36
- padding: 0;
37
- position: absolute;
38
- width: 1px;
39
- white-space: nowrap;
31
+ border: 0;
32
+ clip: rect(0 0 0 0);
33
+ height: 1px;
34
+ margin: -1px;
35
+ overflow: hidden;
36
+ padding: 0;
37
+ position: absolute;
38
+ width: 1px;
39
+ white-space: nowrap;
40
40
  }
41
41
 
42
42
  .sr,
43
43
  .sr button {
44
- border: 0;
45
- clip: rect(0 0 0 0);
46
- height: 1px;
47
- margin: -1px;
48
- overflow: hidden;
49
- padding: 0;
50
- position: absolute;
51
- width: 1px;
52
- white-space: nowrap;
44
+ border: 0;
45
+ clip: rect(0 0 0 0);
46
+ height: 1px;
47
+ margin: -1px;
48
+ overflow: hidden;
49
+ padding: 0;
50
+ position: absolute;
51
+ width: 1px;
52
+ white-space: nowrap;
53
53
  }
54
54
 
55
55
  .hidden {
56
- display: none;
56
+ display: none;
57
57
  }
58
58
 
59
59
  :host([hidden]) {
60
- display: none;
60
+ display: none;
61
61
  }
62
62
 
63
63
  .invisible {
64
- visibility: hidden;
64
+ visibility: hidden;
65
65
  }
66
66
 
67
67
  :host {
@@ -83,6 +83,9 @@ button {
83
83
  box-shadow: var(--tct-message-box-shadow, var(--t-message-box-shadow, inherit));
84
84
  border-radius: var(--tct-message-border-radius, var(--t-message-border-radius, inherit));
85
85
  }
86
+ .message:focus {
87
+ box-shadow: var(--const-global-focus);
88
+ }
86
89
 
87
90
  .message-icon {
88
91
  width: 24px;
@@ -43,7 +43,7 @@ export class Q2Optgroup {
43
43
  static get is() { return "q2-optgroup"; }
44
44
  static get encapsulation() { return "shadow"; }
45
45
  static get originalStyleUrls() { return {
46
- "$": ["styles.css"]
46
+ "$": ["styles.scss"]
47
47
  }; }
48
48
  static get styleUrls() { return {
49
49
  "$": ["styles.css"]
@@ -1,89 +1,84 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  *:active {
6
- outline: none;
6
+ outline: none;
7
7
  }
8
8
 
9
9
  *:focus {
10
- outline: none;
11
- box-shadow: var(--const-global-focus);
10
+ outline: none;
11
+ box-shadow: var(--const-global-focus);
12
12
  }
13
13
 
14
14
  :host {
15
- box-shadow: none !important;
15
+ box-shadow: none !important;
16
16
  }
17
17
 
18
18
  ::-moz-focus-inner {
19
- border: none;
19
+ border: none;
20
20
  }
21
21
 
22
22
  input,
23
23
  textarea,
24
24
  button {
25
- font-family: inherit;
26
- font-size: inherit;
25
+ font-family: inherit;
26
+ font-size: inherit;
27
27
  }
28
28
 
29
29
  :host(.sr),
30
30
  :host(.sr) button {
31
- border: 0;
32
- clip: rect(0 0 0 0);
33
- height: 1px;
34
- margin: -1px;
35
- overflow: hidden;
36
- padding: 0;
37
- position: absolute;
38
- width: 1px;
39
- white-space: nowrap;
31
+ border: 0;
32
+ clip: rect(0 0 0 0);
33
+ height: 1px;
34
+ margin: -1px;
35
+ overflow: hidden;
36
+ padding: 0;
37
+ position: absolute;
38
+ width: 1px;
39
+ white-space: nowrap;
40
40
  }
41
41
 
42
42
  .sr,
43
43
  .sr button {
44
- border: 0;
45
- clip: rect(0 0 0 0);
46
- height: 1px;
47
- margin: -1px;
48
- overflow: hidden;
49
- padding: 0;
50
- position: absolute;
51
- width: 1px;
52
- white-space: nowrap;
44
+ border: 0;
45
+ clip: rect(0 0 0 0);
46
+ height: 1px;
47
+ margin: -1px;
48
+ overflow: hidden;
49
+ padding: 0;
50
+ position: absolute;
51
+ width: 1px;
52
+ white-space: nowrap;
53
53
  }
54
54
 
55
55
  .hidden {
56
- display: none;
56
+ display: none;
57
57
  }
58
58
 
59
59
  :host([hidden]) {
60
- display: none;
60
+ display: none;
61
61
  }
62
62
 
63
63
  .invisible {
64
- visibility: hidden;
64
+ visibility: hidden;
65
65
  }
66
66
 
67
-
68
67
  :host {
69
- display: block;
68
+ display: block;
70
69
  }
71
70
 
72
71
  .q2-optgroup-header {
73
- background-color: var(
74
- --tct-optgroup-header-bg,
75
- var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6))))
76
- );
77
- padding: var(--tct-scale-1, var(--app-scale-1, 5px))
78
- var(--tct-scale-2, var(--app-scale-2, 10px));
79
- font-weight: var(--tct-optgroup-header-font-weight, 600);
80
- text-transform: var(--tct-optgroup-header-text-transform, uppercase);
81
- /*
82
- position: -webkit-sticky;
83
- position: sticky;
84
- top: 0;
85
- z-index: 1;
72
+ background-color: var(--tct-optgroup-header-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6)))));
73
+ padding: var(--tct-scale-1, var(--app-scale-1, 5px)) var(--tct-scale-2, var(--app-scale-2, 10px));
74
+ font-weight: var(--tct-optgroup-header-font-weight, 600);
75
+ text-transform: var(--tct-optgroup-header-text-transform, uppercase);
76
+ /*
77
+ position: -webkit-sticky;
78
+ position: sticky;
79
+ top: 0;
80
+ z-index: 1;
86
81
 
87
- temp removal, will fix with TCT-804
88
- */
89
- }
82
+ temp removal, will fix with TCT-804
83
+ */
84
+ }
@@ -1,4 +1,4 @@
1
- import { Component, Prop, h, Event, Element, Watch, Fragment } from '@stencil/core';
1
+ import { Component, Prop, h, Event, Element, Host } from '@stencil/core';
2
2
  export class Q2Option {
3
3
  constructor() {
4
4
  this.role = 'option';
@@ -12,35 +12,10 @@ export class Q2Option {
12
12
  this.click.emit();
13
13
  };
14
14
  }
15
- connectedCallback() {
16
- this.checkDisabledStatus();
17
- this.checkSelectedStatus();
18
- this.checkMultiSelectHiddenStatus();
19
- }
20
- checkDisabledStatus() {
21
- const { disabled, disabledGroup, hostElement } = this;
22
- const isDisabled = disabled || disabledGroup;
23
- if (isDisabled)
24
- hostElement.setAttribute('aria-disabled', 'true');
25
- else
26
- hostElement.removeAttribute('aria-disabled');
27
- }
28
- checkSelectedStatus() {
29
- const { selected, hostElement } = this;
30
- if (selected)
31
- hostElement.setAttribute('aria-selected', 'true');
32
- else
33
- hostElement.removeAttribute('aria-selected');
34
- }
35
- checkMultiSelectHiddenStatus() {
36
- const { _multiSelectHidden, hostElement } = this;
37
- if (_multiSelectHidden)
38
- hostElement.setAttribute('aria-hidden', 'true');
39
- else
40
- hostElement.removeAttribute('aria-hidden');
41
- }
42
15
  render() {
43
- return (h(Fragment, null,
16
+ const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
17
+ const isDisabled = disabled || disabledGroup;
18
+ return (h(Host, { "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": selected ? 'true' : undefined, "aria-hidden": _multiSelectHidden ? 'true' : undefined },
44
19
  this.selected && h("q2-icon", { type: "checkmark" }),
45
20
  h("div", { class: "content", onClick: this.onClick },
46
21
  h("slot", null))));
@@ -279,17 +254,4 @@ export class Q2Option {
279
254
  }
280
255
  }]; }
281
256
  static get elementRef() { return "hostElement"; }
282
- static get watchers() { return [{
283
- "propName": "disabled",
284
- "methodName": "checkDisabledStatus"
285
- }, {
286
- "propName": "disabledGroup",
287
- "methodName": "checkDisabledStatus"
288
- }, {
289
- "propName": "selected",
290
- "methodName": "checkSelectedStatus"
291
- }, {
292
- "propName": "_multiSelectHidden",
293
- "methodName": "checkMultiSelectHiddenStatus"
294
- }]; }
295
257
  }
@@ -1,67 +1,67 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  *:active {
6
- outline: none;
6
+ outline: none;
7
7
  }
8
8
 
9
9
  *:focus {
10
- outline: none;
11
- box-shadow: var(--const-global-focus);
10
+ outline: none;
11
+ box-shadow: var(--const-global-focus);
12
12
  }
13
13
 
14
14
  :host {
15
- box-shadow: none !important;
15
+ box-shadow: none !important;
16
16
  }
17
17
 
18
18
  ::-moz-focus-inner {
19
- border: none;
19
+ border: none;
20
20
  }
21
21
 
22
22
  input,
23
23
  textarea,
24
24
  button {
25
- font-family: inherit;
26
- font-size: inherit;
25
+ font-family: inherit;
26
+ font-size: inherit;
27
27
  }
28
28
 
29
29
  :host(.sr),
30
30
  :host(.sr) button {
31
- border: 0;
32
- clip: rect(0 0 0 0);
33
- height: 1px;
34
- margin: -1px;
35
- overflow: hidden;
36
- padding: 0;
37
- position: absolute;
38
- width: 1px;
39
- white-space: nowrap;
31
+ border: 0;
32
+ clip: rect(0 0 0 0);
33
+ height: 1px;
34
+ margin: -1px;
35
+ overflow: hidden;
36
+ padding: 0;
37
+ position: absolute;
38
+ width: 1px;
39
+ white-space: nowrap;
40
40
  }
41
41
 
42
42
  .sr,
43
43
  .sr button {
44
- border: 0;
45
- clip: rect(0 0 0 0);
46
- height: 1px;
47
- margin: -1px;
48
- overflow: hidden;
49
- padding: 0;
50
- position: absolute;
51
- width: 1px;
52
- white-space: nowrap;
44
+ border: 0;
45
+ clip: rect(0 0 0 0);
46
+ height: 1px;
47
+ margin: -1px;
48
+ overflow: hidden;
49
+ padding: 0;
50
+ position: absolute;
51
+ width: 1px;
52
+ white-space: nowrap;
53
53
  }
54
54
 
55
55
  .hidden {
56
- display: none;
56
+ display: none;
57
57
  }
58
58
 
59
59
  :host([hidden]) {
60
- display: none;
60
+ display: none;
61
61
  }
62
62
 
63
63
  .invisible {
64
- visibility: hidden;
64
+ visibility: hidden;
65
65
  }
66
66
 
67
67
  :host {
@@ -1,5 +1,5 @@
1
1
  import { Component, Prop, h, Element, Listen, Watch, Event } from '@stencil/core';
2
- import { createGuid, handleAriaLabel, loc } from 'src/utils';
2
+ import { createGuid, handleAriaLabel, loc, overrideFocus } from 'src/utils';
3
3
  export class Q2Radio {
4
4
  constructor() {
5
5
  this.disabled = false;
@@ -16,6 +16,9 @@ export class Q2Radio {
16
16
  componentWillLoad() {
17
17
  handleAriaLabel(this);
18
18
  }
19
+ componentDidLoad() {
20
+ overrideFocus(this.hostElement);
21
+ }
19
22
  ////////// OBSERVERS //////////
20
23
  ariaLabelObserver() {
21
24
  handleAriaLabel(this);
@@ -26,9 +29,14 @@ export class Q2Radio {
26
29
  event.stopImmediatePropagation();
27
30
  }
28
31
  }
32
+ delegateFocus(event) {
33
+ if (event.target === this.hostElement) {
34
+ this.inputField.focus();
35
+ }
36
+ }
29
37
  render() {
30
38
  return (h("div", { class: this.groupTileLayout ? 'radio-tile' : 'radio-container' },
31
- h("input", { class: "sr", id: this.id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }),
39
+ h("input", { ref: el => (this.inputField = el), class: "sr", id: this.id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }),
32
40
  h("label", { htmlFor: this.id, "test-id": "radioButton" },
33
41
  !this.groupTileLayout && (h("svg", { viewBox: "0 0 18 18" },
34
42
  h("circle", { stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }),
@@ -230,5 +238,11 @@ export class Q2Radio {
230
238
  "target": undefined,
231
239
  "capture": false,
232
240
  "passive": false
241
+ }, {
242
+ "name": "focus",
243
+ "method": "delegateFocus",
244
+ "target": undefined,
245
+ "capture": false,
246
+ "passive": false
233
247
  }]; }
234
248
  }
@@ -1,67 +1,67 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  *:active {
6
- outline: none;
6
+ outline: none;
7
7
  }
8
8
 
9
9
  *:focus {
10
- outline: none;
11
- box-shadow: var(--const-global-focus);
10
+ outline: none;
11
+ box-shadow: var(--const-global-focus);
12
12
  }
13
13
 
14
14
  :host {
15
- box-shadow: none !important;
15
+ box-shadow: none !important;
16
16
  }
17
17
 
18
18
  ::-moz-focus-inner {
19
- border: none;
19
+ border: none;
20
20
  }
21
21
 
22
22
  input,
23
23
  textarea,
24
24
  button {
25
- font-family: inherit;
26
- font-size: inherit;
25
+ font-family: inherit;
26
+ font-size: inherit;
27
27
  }
28
28
 
29
29
  :host(.sr),
30
30
  :host(.sr) button {
31
- border: 0;
32
- clip: rect(0 0 0 0);
33
- height: 1px;
34
- margin: -1px;
35
- overflow: hidden;
36
- padding: 0;
37
- position: absolute;
38
- width: 1px;
39
- white-space: nowrap;
31
+ border: 0;
32
+ clip: rect(0 0 0 0);
33
+ height: 1px;
34
+ margin: -1px;
35
+ overflow: hidden;
36
+ padding: 0;
37
+ position: absolute;
38
+ width: 1px;
39
+ white-space: nowrap;
40
40
  }
41
41
 
42
42
  .sr,
43
43
  .sr button {
44
- border: 0;
45
- clip: rect(0 0 0 0);
46
- height: 1px;
47
- margin: -1px;
48
- overflow: hidden;
49
- padding: 0;
50
- position: absolute;
51
- width: 1px;
52
- white-space: nowrap;
44
+ border: 0;
45
+ clip: rect(0 0 0 0);
46
+ height: 1px;
47
+ margin: -1px;
48
+ overflow: hidden;
49
+ padding: 0;
50
+ position: absolute;
51
+ width: 1px;
52
+ white-space: nowrap;
53
53
  }
54
54
 
55
55
  .hidden {
56
- display: none;
56
+ display: none;
57
57
  }
58
58
 
59
59
  :host([hidden]) {
60
- display: none;
60
+ display: none;
61
61
  }
62
62
 
63
63
  .invisible {
64
- visibility: hidden;
64
+ visibility: hidden;
65
65
  }
66
66
 
67
67
  q2-radio {
@@ -1,5 +1,5 @@
1
1
  import { Component, Prop, Element, h, Listen, Event, Watch } from '@stencil/core';
2
- import { createGuid, loc } from 'src/utils';
2
+ import { createGuid, isEventFromElement, loc, overrideFocus } from 'src/utils';
3
3
  export class Q2RadioGroup {
4
4
  constructor() {
5
5
  this.disabled = false;
@@ -26,6 +26,7 @@ export class Q2RadioGroup {
26
26
  observer.observe(this.hostElement, { childList: true });
27
27
  this.mutationObserver = observer;
28
28
  this.onMutationObserved();
29
+ overrideFocus(this.hostElement);
29
30
  }
30
31
  /////// OBSERVERS ///////
31
32
  valueUpdated() {
@@ -55,6 +56,13 @@ export class Q2RadioGroup {
55
56
  }
56
57
  }
57
58
  }
59
+ delegateFocus(event) {
60
+ if (!isEventFromElement(event, this.hostElement))
61
+ return;
62
+ const radio = this.hostElement.querySelector('q2-radio[checked]') ||
63
+ this.hostElement.querySelector('q2-radio');
64
+ radio === null || radio === void 0 ? void 0 : radio.dispatchEvent(new FocusEvent('focus'));
65
+ }
58
66
  render() {
59
67
  return (h("div", null,
60
68
  this.label || this.optional ? (h("div", { class: "group-legend" },
@@ -84,7 +92,7 @@ export class Q2RadioGroup {
84
92
  static get is() { return "q2-radio-group"; }
85
93
  static get encapsulation() { return "shadow"; }
86
94
  static get originalStyleUrls() { return {
87
- "$": ["styles.css"]
95
+ "$": ["styles.scss"]
88
96
  }; }
89
97
  static get styleUrls() { return {
90
98
  "$": ["styles.css"]
@@ -266,5 +274,11 @@ export class Q2RadioGroup {
266
274
  "target": undefined,
267
275
  "capture": false,
268
276
  "passive": false
277
+ }, {
278
+ "name": "focus",
279
+ "method": "delegateFocus",
280
+ "target": undefined,
281
+ "capture": false,
282
+ "passive": false
269
283
  }]; }
270
284
  }