@refinitiv-ui/elements 6.0.0-next.3 → 6.0.2

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 (193) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +3 -15
  3. package/lib/accordion/index.js +2 -2
  4. package/lib/autosuggest/custom-elements.json +5 -15
  5. package/lib/autosuggest/custom-elements.md +14 -14
  6. package/lib/autosuggest/helpers/renderer.d.ts +8 -0
  7. package/lib/autosuggest/helpers/renderer.js +35 -0
  8. package/lib/autosuggest/helpers/types.d.ts +101 -1
  9. package/lib/autosuggest/helpers/utils.d.ts +1 -8
  10. package/lib/autosuggest/helpers/utils.js +0 -27
  11. package/lib/autosuggest/index.d.ts +34 -32
  12. package/lib/autosuggest/index.js +246 -202
  13. package/lib/autosuggest/themes/halo/dark/index.js +1 -1
  14. package/lib/autosuggest/themes/halo/light/index.js +1 -1
  15. package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
  16. package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
  17. package/lib/button/index.js +2 -1
  18. package/lib/button/themes/halo/dark/index.js +1 -1
  19. package/lib/button/themes/halo/light/index.js +1 -1
  20. package/lib/button/themes/solar/charcoal/index.js +1 -1
  21. package/lib/button/themes/solar/pearl/index.js +1 -1
  22. package/lib/calendar/index.d.ts +1 -1
  23. package/lib/calendar/themes/halo/dark/index.js +1 -1
  24. package/lib/calendar/themes/halo/light/index.js +1 -1
  25. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  26. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  27. package/lib/chart/plugins/doughnut-center-label.js +1 -1
  28. package/lib/chart/themes/halo/dark/index.js +1 -1
  29. package/lib/chart/themes/halo/light/index.js +1 -1
  30. package/lib/checkbox/index.d.ts +8 -15
  31. package/lib/checkbox/index.js +19 -41
  32. package/lib/checkbox/themes/halo/dark/index.js +1 -1
  33. package/lib/checkbox/themes/halo/light/index.js +1 -1
  34. package/lib/checkbox/themes/solar/charcoal/index.js +1 -1
  35. package/lib/checkbox/themes/solar/pearl/index.js +1 -1
  36. package/lib/clock/custom-elements.json +10 -10
  37. package/lib/clock/custom-elements.md +1 -1
  38. package/lib/clock/index.d.ts +44 -16
  39. package/lib/clock/index.js +178 -61
  40. package/lib/clock/themes/halo/dark/index.js +1 -1
  41. package/lib/clock/themes/halo/light/index.js +1 -1
  42. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  43. package/lib/clock/themes/solar/pearl/index.js +1 -1
  44. package/lib/combo-box/index.d.ts +4 -3
  45. package/lib/combo-box/index.js +7 -3
  46. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  47. package/lib/combo-box/themes/halo/light/index.js +1 -1
  48. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  49. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  50. package/lib/datetime-field/index.d.ts +1 -1
  51. package/lib/datetime-field/utils.d.ts +1 -1
  52. package/lib/datetime-picker/themes/halo/dark/index.js +1 -1
  53. package/lib/datetime-picker/themes/halo/light/index.js +1 -1
  54. package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
  55. package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
  56. package/lib/email-field/themes/halo/dark/index.js +1 -1
  57. package/lib/email-field/themes/halo/light/index.js +1 -1
  58. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  59. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  60. package/lib/flag/utils/FlagLoader.d.ts +2 -32
  61. package/lib/flag/utils/FlagLoader.js +2 -69
  62. package/lib/heatmap/index.d.ts +2 -2
  63. package/lib/heatmap/themes/halo/dark/index.js +1 -1
  64. package/lib/heatmap/themes/halo/light/index.js +1 -1
  65. package/lib/icon/utils/IconLoader.d.ts +2 -37
  66. package/lib/icon/utils/IconLoader.js +2 -76
  67. package/lib/index.d.ts +1 -1
  68. package/lib/index.js +1 -1
  69. package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
  70. package/lib/interactive-chart/themes/halo/light/index.js +1 -1
  71. package/lib/item/helpers/types.d.ts +6 -6
  72. package/lib/item/index.d.ts +2 -2
  73. package/lib/item/index.js +0 -1
  74. package/lib/item/themes/halo/dark/index.js +1 -1
  75. package/lib/item/themes/halo/light/index.js +1 -1
  76. package/lib/list/elements/list-item.d.ts +30 -0
  77. package/lib/list/elements/list-item.js +19 -0
  78. package/lib/list/elements/list.d.ts +307 -0
  79. package/lib/list/elements/list.js +632 -0
  80. package/lib/list/helpers/renderer.d.ts +0 -1
  81. package/lib/list/helpers/renderer.js +1 -3
  82. package/lib/list/index.d.ts +3 -317
  83. package/lib/list/index.js +3 -641
  84. package/lib/list/themes/halo/dark/index.js +4 -1
  85. package/lib/list/themes/halo/light/index.js +5 -2
  86. package/lib/list/themes/solar/charcoal/index.js +4 -1
  87. package/lib/list/themes/solar/pearl/index.js +4 -1
  88. package/lib/multi-input/index.d.ts +1 -5
  89. package/lib/multi-input/index.js +17 -18
  90. package/lib/notification/themes/halo/dark/index.js +1 -1
  91. package/lib/notification/themes/halo/light/index.js +1 -1
  92. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  93. package/lib/notification/themes/solar/pearl/index.js +1 -1
  94. package/lib/number-field/themes/halo/dark/index.js +1 -1
  95. package/lib/number-field/themes/halo/light/index.js +1 -1
  96. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  97. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  98. package/lib/overlay/index.d.ts +2 -1
  99. package/lib/overlay-menu/helpers/constants.d.ts +6 -0
  100. package/lib/overlay-menu/helpers/constants.js +7 -0
  101. package/lib/overlay-menu/helpers/types.d.ts +0 -6
  102. package/lib/overlay-menu/helpers/types.js +1 -7
  103. package/lib/overlay-menu/index.d.ts +1 -1
  104. package/lib/overlay-menu/index.js +1 -1
  105. package/lib/password-field/themes/halo/dark/index.js +1 -1
  106. package/lib/password-field/themes/halo/light/index.js +1 -1
  107. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  108. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  109. package/lib/pill/index.d.ts +11 -3
  110. package/lib/pill/index.js +25 -11
  111. package/lib/radio-button/index.d.ts +7 -11
  112. package/lib/radio-button/index.js +14 -25
  113. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  114. package/lib/radio-button/themes/halo/light/index.js +1 -1
  115. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  116. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  117. package/lib/rating/custom-elements.json +4 -4
  118. package/lib/rating/custom-elements.md +2 -2
  119. package/lib/rating/index.d.ts +84 -32
  120. package/lib/rating/index.js +209 -80
  121. package/lib/rating/themes/halo/dark/index.js +1 -1
  122. package/lib/rating/themes/halo/light/index.js +1 -1
  123. package/lib/rating/themes/solar/charcoal/index.js +1 -1
  124. package/lib/rating/themes/solar/pearl/index.js +1 -1
  125. package/lib/rating/utils.d.ts +9 -0
  126. package/lib/rating/utils.js +11 -0
  127. package/lib/search-field/themes/halo/dark/index.js +1 -1
  128. package/lib/search-field/themes/halo/light/index.js +1 -1
  129. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  130. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  131. package/lib/select/index.d.ts +13 -1
  132. package/lib/select/index.js +25 -7
  133. package/lib/select/themes/halo/dark/index.js +1 -1
  134. package/lib/select/themes/halo/light/index.js +1 -1
  135. package/lib/select/themes/solar/charcoal/index.js +1 -1
  136. package/lib/select/themes/solar/pearl/index.js +1 -1
  137. package/lib/slider/constants.d.ts +5 -1
  138. package/lib/slider/constants.js +6 -1
  139. package/lib/slider/index.d.ts +112 -49
  140. package/lib/slider/index.js +331 -182
  141. package/lib/slider/themes/halo/dark/index.js +1 -1
  142. package/lib/slider/themes/halo/light/index.js +1 -1
  143. package/lib/slider/themes/solar/charcoal/index.js +1 -1
  144. package/lib/slider/themes/solar/pearl/index.js +1 -1
  145. package/lib/slider/utils.d.ts +1 -9
  146. package/lib/slider/utils.js +1 -18
  147. package/lib/sparkline/themes/halo/dark/index.js +1 -1
  148. package/lib/sparkline/themes/halo/light/index.js +1 -1
  149. package/lib/tab/themes/halo/dark/index.js +1 -1
  150. package/lib/tab/themes/halo/light/index.js +1 -1
  151. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  152. package/lib/tab/themes/solar/pearl/index.js +1 -1
  153. package/lib/tab-bar/index.d.ts +6 -7
  154. package/lib/tab-bar/index.js +12 -10
  155. package/lib/tab-bar/themes/halo/dark/index.js +1 -0
  156. package/lib/tab-bar/themes/halo/light/index.js +1 -0
  157. package/lib/tab-bar/themes/solar/charcoal/index.js +1 -0
  158. package/lib/tab-bar/themes/solar/pearl/index.js +1 -0
  159. package/lib/text-field/index.js +2 -3
  160. package/lib/text-field/themes/halo/dark/index.js +1 -1
  161. package/lib/text-field/themes/halo/light/index.js +1 -1
  162. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  163. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  164. package/lib/toggle/index.d.ts +7 -10
  165. package/lib/toggle/index.js +14 -24
  166. package/lib/toggle/themes/halo/dark/index.js +1 -1
  167. package/lib/toggle/themes/halo/light/index.js +1 -1
  168. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  169. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  170. package/lib/tooltip/helpers/overflow-tooltip.d.ts +11 -4
  171. package/lib/tooltip/helpers/overflow-tooltip.js +34 -6
  172. package/lib/tooltip/index.d.ts +2 -2
  173. package/lib/tooltip/index.js +2 -2
  174. package/lib/tree/elements/tree-item.d.ts +4 -0
  175. package/lib/tree/elements/tree-item.js +5 -2
  176. package/lib/tree/elements/tree.d.ts +7 -0
  177. package/lib/tree/elements/tree.js +12 -1
  178. package/lib/tree/helpers/renderer.d.ts +0 -1
  179. package/lib/tree/helpers/renderer.js +0 -2
  180. package/lib/tree/index.d.ts +2 -1
  181. package/lib/tree/themes/halo/dark/index.js +2 -2
  182. package/lib/tree/themes/halo/light/index.js +3 -3
  183. package/lib/tree/themes/solar/charcoal/index.js +2 -2
  184. package/lib/tree/themes/solar/pearl/index.js +2 -2
  185. package/lib/tree-select/index.js +15 -5
  186. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  187. package/lib/tree-select/themes/halo/light/index.js +1 -1
  188. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  189. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  190. package/lib/version.js +1 -1
  191. package/package.json +20 -19
  192. package/lib/clock/utils/timestamps.d.ts +0 -6
  193. package/lib/clock/utils/timestamps.js +0 -6
@@ -20,13 +20,14 @@ let Checkbox = class Checkbox extends ControlElement {
20
20
  constructor() {
21
21
  super(...arguments);
22
22
  this.defaultRole = 'checkbox';
23
- this._checked = false;
24
- this._indeterminate = false;
25
23
  /**
26
- * Indicates current state of checkbox
27
- * @ignore
24
+ * Value of checkbox
28
25
  */
29
- this.ariaChecked = String(this.checked);
26
+ this.checked = false;
27
+ /**
28
+ * Set state to indeterminate
29
+ */
30
+ this.indeterminate = false;
30
31
  }
31
32
  /**
32
33
  * Element version number
@@ -69,45 +70,25 @@ let Checkbox = class Checkbox extends ControlElement {
69
70
  `;
70
71
  }
71
72
  /**
72
- * Value of checkbox
73
- * @param value new checked value
74
- * @default false
73
+ * Called before update() to compute values needed during the update.
74
+ * @param changedProperties Properties that has changed
75
+ * @returns {void}
75
76
  */
76
- set checked(value) {
77
- const oldValue = this._checked;
78
- if (oldValue !== value) {
79
- this._checked = value;
80
- // remove indeterminate if change state to checked
81
- if (this._checked) {
77
+ willUpdate(changedProperties) {
78
+ super.willUpdate(changedProperties);
79
+ if (changedProperties.has('checked')) {
80
+ if (this.checked) {
82
81
  this.indeterminate = false;
83
82
  }
84
- this.ariaChecked = String(value);
85
- void this.requestUpdate('checked', oldValue);
83
+ this.setAttribute('aria-checked', String(this.checked));
86
84
  }
87
- }
88
- get checked() {
89
- return this._checked;
90
- }
91
- /**
92
- * Set state to indeterminate
93
- * @param value new indeterminate value
94
- * @default false
95
- */
96
- set indeterminate(value) {
97
- const oldValue = this._indeterminate;
98
- if (oldValue !== value) {
99
- this._indeterminate = value;
100
- // remove checked if change state to indeterminate
101
- if (value) {
85
+ if (changedProperties.has('indeterminate')) {
86
+ if (this.indeterminate) {
102
87
  this.checked = false;
103
88
  }
104
- this.ariaChecked = value ? 'mixed' : String(this.checked);
105
- void this.requestUpdate('indeterminate', oldValue);
89
+ this.setAttribute('aria-checked', this.indeterminate ? 'mixed' : String(this.checked));
106
90
  }
107
91
  }
108
- get indeterminate() {
109
- return this._indeterminate;
110
- }
111
92
  /**
112
93
  * Called once after the component is first rendered
113
94
  * @param changedProperties map of changed properties with old values
@@ -176,13 +157,10 @@ let Checkbox = class Checkbox extends ControlElement {
176
157
  };
177
158
  __decorate([
178
159
  property({ type: Boolean, reflect: true })
179
- ], Checkbox.prototype, "checked", null);
160
+ ], Checkbox.prototype, "checked", void 0);
180
161
  __decorate([
181
162
  property({ type: Boolean, reflect: true })
182
- ], Checkbox.prototype, "indeterminate", null);
183
- __decorate([
184
- property({ type: String, reflect: true, attribute: 'aria-checked' })
185
- ], Checkbox.prototype, "ariaChecked", void 0);
163
+ ], Checkbox.prototype, "indeterminate", void 0);
186
164
  __decorate([
187
165
  query('[part=label]', true)
188
166
  ], Checkbox.prototype, "labelEl", void 0);
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
3
3
 
4
- elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#6678FF;color:#ccc}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#0d0d0d;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.5);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #404040;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#6678ff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#ccc)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:grey}:host(:hover:not([readonly])){color:#fff}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#404040}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
4
+ elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#6678FF;color:#ccc}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#0d0d0d;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.5);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #404040;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#6678ff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#ccc)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:grey}:host(:hover:not([readonly])){color:#fff}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#404040}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/halo/light';
3
3
 
4
- elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#334BFF;color:#404040}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.25);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #595959;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#334bff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#404040)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:#0d0d0d}:host(:hover:not([readonly])){color:#0d0d0d}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#595959}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
4
+ elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#334BFF;color:#404040}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.25);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #595959;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#334bff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#404040)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:#0d0d0d}:host(:hover:not([readonly])){color:#0d0d0d}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#595959}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
3
3
 
4
- elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#000;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #4a4a52;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#f93);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#e2e2e2)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(194,194,194,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#c2c2c2}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(194,194,194,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(194,194,194,.6);border-color:rgba(74,74,82,.6);background-color:rgba(0,0,0,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #f93;border:1px dotted #f93}}');
4
+ elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#000;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #4a4a52;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#f93);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#e2e2e2)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(194,194,194,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#c2c2c2}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(194,194,194,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(194,194,194,.6);border-color:rgba(74,74,82,.6);background-color:rgba(0,0,0,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #f93;border:1px dotted #f93}}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/solar/pearl';
2
2
  import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
3
3
 
4
- elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.3);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #a9afba;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#ee7600);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#acafb5)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(72,72,72,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#a9afba}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(169,175,186,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(72,72,72,.6);border-color:rgba(169,175,186,.6);background-color:rgba(255,255,255,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #ffb266;border:1px dotted #ffb266}}');
4
+ elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.3);-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border:1px solid #a9afba;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#ee7600);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#acafb5)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(72,72,72,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#a9afba}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(169,175,186,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(72,72,72,.6);border-color:rgba(169,175,186,.6);background-color:rgba(255,255,255,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #ffb266;border:1px dotted #ffb266}}');
@@ -35,14 +35,14 @@
35
35
  "default": "false"
36
36
  },
37
37
  {
38
- "name": "interactive",
39
- "description": "Enabled interactive mode. Allowing the user to offset the value.",
38
+ "name": "analogue",
39
+ "description": "Display clock in analogue style.",
40
40
  "type": "boolean",
41
41
  "default": "false"
42
42
  },
43
43
  {
44
- "name": "analogue",
45
- "description": "Display clock in analogue style.",
44
+ "name": "interactive",
45
+ "description": "Enable interactive mode. Allowing the user to offset the value.",
46
46
  "type": "boolean",
47
47
  "default": "false"
48
48
  }
@@ -83,16 +83,16 @@
83
83
  "default": "false"
84
84
  },
85
85
  {
86
- "name": "interactive",
87
- "attribute": "interactive",
88
- "description": "Enabled interactive mode. Allowing the user to offset the value.",
86
+ "name": "analogue",
87
+ "attribute": "analogue",
88
+ "description": "Display clock in analogue style.",
89
89
  "type": "boolean",
90
90
  "default": "false"
91
91
  },
92
92
  {
93
- "name": "analogue",
94
- "attribute": "analogue",
95
- "description": "Display clock in analogue style.",
93
+ "name": "interactive",
94
+ "attribute": "interactive",
95
+ "description": "Enable interactive mode. Allowing the user to offset the value.",
96
96
  "type": "boolean",
97
97
  "default": "false"
98
98
  }
@@ -8,7 +8,7 @@ Display hours, minutes and seconds as clock interface
8
8
  |---------------|----------------|-----------|------------|--------------------------------------------------|
9
9
  | `amPm` | `am-pm` | `boolean` | false | Display the digital clock in 12hr format. |
10
10
  | `analogue` | `analogue` | `boolean` | false | Display clock in analogue style. |
11
- | `interactive` | `interactive` | `boolean` | false | Enabled interactive mode. Allowing the user to offset the value. |
11
+ | `interactive` | `interactive` | `boolean` | false | Enable interactive mode. Allowing the user to offset the value. |
12
12
  | `offset` | `offset` | `number` | | Get offset value |
13
13
  | `showSeconds` | `show-seconds` | `boolean` | false | Display the seconds segment. |
14
14
  | `tick` | `tick` | `boolean` | false | Toggles clock ticking function. |
@@ -1,5 +1,7 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { TemplateResult, CSSResultGroup, PropertyValues, ResponsiveElement, ElementSize } from '@refinitiv-ui/core';
3
+ import '@refinitiv-ui/phrasebook/locale/en/clock.js';
4
+ import { TranslatePromise } from '@refinitiv-ui/translate';
3
5
  /**
4
6
  * Display hours, minutes and seconds as clock interface
5
7
  * @fires value-changed - Fired when the value property changes while ticking.
@@ -42,6 +44,14 @@ export declare class Clock extends ResponsiveElement {
42
44
  * Used for accurately ticking time.
43
45
  */
44
46
  private tickTimestamp;
47
+ /**
48
+ * Current active segment for interactive mode
49
+ */
50
+ private activeSegment;
51
+ /**
52
+ * Clock internal translation strings
53
+ */
54
+ protected tPromise: TranslatePromise;
45
55
  /**
46
56
  * Get time value in format `hh:mm:ss`
47
57
  * @default 00:00:00
@@ -81,14 +91,14 @@ export declare class Clock extends ResponsiveElement {
81
91
  * Display the seconds segment.
82
92
  */
83
93
  showSeconds: boolean;
84
- /**
85
- * Enabled interactive mode. Allowing the user to offset the value.
86
- */
87
- interactive: boolean;
88
94
  /**
89
95
  * Display clock in analogue style.
90
96
  */
91
97
  analogue: boolean;
98
+ /**
99
+ * Enable interactive mode. Allowing the user to offset the value.
100
+ */
101
+ interactive: boolean;
92
102
  /**
93
103
  * Getter for hours part.
94
104
  */
@@ -151,6 +161,11 @@ export declare class Clock extends ResponsiveElement {
151
161
  * @returns display seconds
152
162
  */
153
163
  private get displaySeconds();
164
+ /**
165
+ * Get display value
166
+ * @returns display value
167
+ */
168
+ private get displayValue();
154
169
  /**
155
170
  * Get display AM or PM depending on time
156
171
  * @returns `AM` or `PM`
@@ -161,6 +176,11 @@ export declare class Clock extends ResponsiveElement {
161
176
  * @returns Result
162
177
  */
163
178
  private get isAM();
179
+ /**
180
+ * Returns `true` if display minutes has changed
181
+ * @returns Result
182
+ */
183
+ private get isDisplayMinutesChange();
164
184
  /**
165
185
  * Configures the tick manager to either start or stop ticking,
166
186
  * depending on the state of the element.
@@ -182,15 +202,15 @@ export declare class Clock extends ResponsiveElement {
182
202
  */
183
203
  private shift;
184
204
  /**
185
- * Returns any shift amount assigned to a target.
186
- * @param target target of an event.
205
+ * Returns any shift amount assigned to a segment.
206
+ * @param segment Segment.
187
207
  * @returns {void}
188
208
  */
189
- private getShiftAmountFromTarget;
209
+ private getShiftAmountFromSegment;
190
210
  /**
191
211
  * Returns `true` or `false` depends on the offset value's effect on giving segment
192
212
  *
193
- * @param segment segment's name
213
+ * @param segment segment
194
214
  * @returns Result
195
215
  */
196
216
  private isSegmentShifted;
@@ -217,27 +237,24 @@ export declare class Clock extends ResponsiveElement {
217
237
  private manageControlKeys;
218
238
  /**
219
239
  * Handles UP key press
220
- * @param event Event Object
221
240
  * @returns {void}
222
241
  */
223
242
  private handleUpKey;
224
243
  /**
225
244
  * Handle DOWN key press
226
- * @param event Event Object
227
245
  * @returns {void}
228
246
  */
229
247
  private handleDownKey;
230
248
  /**
231
- * Template for increment and decrement button
232
- * if interactive mode is enabled.
233
- * @returns {TemplateResult} template result
249
+ * Set aria-valuenow to display value and aria-valuetext to translated format
250
+ * @param updateAriaValueText condition to update aria-valueText
251
+ * @returns {void}
234
252
  */
235
- private generateButtonsTemplate;
253
+ private updateAriaValue;
236
254
  /**
237
255
  * Get template of segment
238
- * @param name segment's name
256
+ * @param segment segment
239
257
  * @param value segment's value
240
- * @param shiftAmount amount to shift
241
258
  * @returns {TemplateResult} template
242
259
  */
243
260
  private generateSegmentTemplate;
@@ -288,6 +305,17 @@ export declare class Clock extends ResponsiveElement {
288
305
  * @returns {void}
289
306
  */
290
307
  protected firstUpdated(changedProperties: PropertyValues): void;
308
+ /**
309
+ * Handles interactive by update role, tabindex, and aria attribute
310
+ * @returns {void}
311
+ */
312
+ private interactiveChanged;
313
+ /**
314
+ * Called before update() to compute values needed during the update.
315
+ * @param changedProperties Properties that has changed
316
+ * @returns {void}
317
+ */
318
+ protected willUpdate(changedProperties: PropertyValues): void;
291
319
  /**
292
320
  * Template for digital clock
293
321
  * @returns {TemplateResult} template