@refinitiv-ui/elements 5.6.0 → 5.8.2-alpha.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.
Files changed (185) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/lib/accordion/custom-elements.md +18 -0
  3. package/lib/appstate-bar/custom-elements.md +22 -0
  4. package/lib/autosuggest/custom-elements.json +24 -4
  5. package/lib/autosuggest/custom-elements.md +54 -0
  6. package/lib/autosuggest/index.d.ts +4 -0
  7. package/lib/autosuggest/index.js +4 -0
  8. package/lib/button/custom-elements.json +2 -2
  9. package/lib/button/custom-elements.md +23 -0
  10. package/lib/button-bar/custom-elements.md +9 -0
  11. package/lib/calendar/custom-elements.json +8 -6
  12. package/lib/calendar/custom-elements.md +35 -0
  13. package/lib/calendar/index.d.ts +2 -0
  14. package/lib/calendar/index.js +2 -0
  15. package/lib/canvas/custom-elements.json +7 -5
  16. package/lib/canvas/custom-elements.md +27 -0
  17. package/lib/canvas/index.d.ts +1 -0
  18. package/lib/canvas/index.js +1 -0
  19. package/lib/card/custom-elements.json +3 -1
  20. package/lib/card/custom-elements.md +24 -0
  21. package/lib/card/index.d.ts +2 -0
  22. package/lib/card/index.js +2 -0
  23. package/lib/chart/custom-elements.json +1 -1
  24. package/lib/chart/custom-elements.md +16 -0
  25. package/lib/checkbox/custom-elements.json +12 -8
  26. package/lib/checkbox/custom-elements.md +18 -0
  27. package/lib/checkbox/index.d.ts +3 -1
  28. package/lib/checkbox/index.js +2 -0
  29. package/lib/clock/custom-elements.json +8 -4
  30. package/lib/clock/custom-elements.md +28 -0
  31. package/lib/clock/index.d.ts +2 -0
  32. package/lib/clock/index.js +2 -0
  33. package/lib/clock/themes/halo/dark/index.js +1 -1
  34. package/lib/clock/themes/halo/light/index.js +1 -1
  35. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  36. package/lib/clock/themes/solar/pearl/index.js +1 -1
  37. package/lib/collapse/custom-elements.md +27 -0
  38. package/lib/color-dialog/custom-elements.json +29 -16
  39. package/lib/color-dialog/custom-elements.md +39 -0
  40. package/lib/color-dialog/index.d.ts +8 -8
  41. package/lib/color-dialog/index.js +8 -8
  42. package/lib/combo-box/custom-elements.json +28 -16
  43. package/lib/combo-box/custom-elements.md +35 -0
  44. package/lib/combo-box/index.d.ts +10 -2
  45. package/lib/combo-box/index.js +10 -1
  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/counter/custom-elements.json +8 -4
  51. package/lib/counter/custom-elements.md +11 -0
  52. package/lib/counter/index.d.ts +2 -0
  53. package/lib/counter/index.js +2 -0
  54. package/lib/datetime-picker/custom-elements.json +52 -23
  55. package/lib/datetime-picker/custom-elements.md +57 -0
  56. package/lib/datetime-picker/index.d.ts +15 -4
  57. package/lib/datetime-picker/index.js +15 -4
  58. package/lib/dialog/custom-elements.json +34 -12
  59. package/lib/dialog/custom-elements.md +47 -0
  60. package/lib/dialog/index.d.ts +7 -10
  61. package/lib/dialog/index.js +7 -10
  62. package/lib/email-field/custom-elements.json +81 -94
  63. package/lib/email-field/custom-elements.md +37 -0
  64. package/lib/email-field/index.d.ts +43 -115
  65. package/lib/email-field/index.js +44 -244
  66. package/lib/flag/custom-elements.md +10 -0
  67. package/lib/flag/index.d.ts +2 -0
  68. package/lib/flag/index.js +2 -0
  69. package/lib/header/custom-elements.md +18 -0
  70. package/lib/heatmap/custom-elements.md +26 -0
  71. package/lib/icon/custom-elements.md +8 -0
  72. package/lib/icon/index.d.ts +2 -0
  73. package/lib/icon/index.js +2 -0
  74. package/lib/interactive-chart/custom-elements.json +6 -10
  75. package/lib/interactive-chart/custom-elements.md +31 -0
  76. package/lib/interactive-chart/index.d.ts +5 -2
  77. package/lib/interactive-chart/index.js +5 -2
  78. package/lib/item/custom-elements.json +4 -4
  79. package/lib/item/custom-elements.md +29 -0
  80. package/lib/item/index.d.ts +11 -2
  81. package/lib/item/index.js +25 -4
  82. package/lib/label/custom-elements.md +11 -0
  83. package/lib/layout/custom-elements.md +26 -0
  84. package/lib/led-gauge/custom-elements.json +4 -4
  85. package/lib/led-gauge/custom-elements.md +17 -0
  86. package/lib/led-gauge/index.d.ts +1 -0
  87. package/lib/led-gauge/index.js +1 -0
  88. package/lib/list/custom-elements.json +18 -5
  89. package/lib/list/custom-elements.md +32 -0
  90. package/lib/list/helpers/list-renderer.js +2 -0
  91. package/lib/list/index.d.ts +19 -2
  92. package/lib/list/index.js +34 -1
  93. package/lib/loader/custom-elements.md +5 -0
  94. package/lib/multi-input/custom-elements.json +7 -6
  95. package/lib/multi-input/custom-elements.md +43 -0
  96. package/lib/multi-input/index.d.ts +4 -0
  97. package/lib/multi-input/index.js +4 -0
  98. package/lib/notification/custom-elements.md +26 -0
  99. package/lib/number-field/custom-elements.json +99 -54
  100. package/lib/number-field/custom-elements.md +42 -0
  101. package/lib/number-field/index.d.ts +92 -47
  102. package/lib/number-field/index.js +113 -80
  103. package/lib/overlay/custom-elements.json +26 -13
  104. package/lib/overlay/custom-elements.md +54 -0
  105. package/lib/overlay/elements/overlay.d.ts +5 -0
  106. package/lib/overlay-menu/custom-elements.json +70 -20
  107. package/lib/overlay-menu/custom-elements.md +44 -0
  108. package/lib/overlay-menu/index.d.ts +13 -11
  109. package/lib/overlay-menu/index.js +13 -11
  110. package/lib/pagination/custom-elements.md +27 -0
  111. package/lib/panel/custom-elements.md +11 -0
  112. package/lib/password-field/custom-elements.json +62 -67
  113. package/lib/password-field/custom-elements.md +39 -0
  114. package/lib/password-field/index.d.ts +42 -94
  115. package/lib/password-field/index.js +48 -194
  116. package/lib/pill/custom-elements.json +8 -6
  117. package/lib/pill/custom-elements.md +22 -0
  118. package/lib/pill/index.d.ts +1 -1
  119. package/lib/pill/index.js +1 -1
  120. package/lib/progress-bar/custom-elements.md +18 -0
  121. package/lib/radio-button/custom-elements.json +8 -6
  122. package/lib/radio-button/custom-elements.md +19 -0
  123. package/lib/radio-button/index.d.ts +6 -5
  124. package/lib/radio-button/index.js +5 -4
  125. package/lib/rating/custom-elements.md +17 -0
  126. package/lib/search-field/custom-elements.json +70 -74
  127. package/lib/search-field/custom-elements.md +41 -0
  128. package/lib/search-field/index.d.ts +43 -100
  129. package/lib/search-field/index.js +46 -215
  130. package/lib/select/custom-elements.json +5 -4
  131. package/lib/select/custom-elements.md +24 -0
  132. package/lib/select/index.d.ts +11 -3
  133. package/lib/select/index.js +65 -26
  134. package/lib/sidebar-layout/custom-elements.json +2 -6
  135. package/lib/sidebar-layout/custom-elements.md +21 -0
  136. package/lib/sidebar-layout/index.d.ts +2 -1
  137. package/lib/slider/custom-elements.json +4 -4
  138. package/lib/slider/custom-elements.md +28 -0
  139. package/lib/slider/index.d.ts +1 -1
  140. package/lib/slider/index.js +1 -1
  141. package/lib/sparkline/custom-elements.json +4 -4
  142. package/lib/sparkline/custom-elements.md +16 -0
  143. package/lib/sparkline/index.d.ts +3 -1
  144. package/lib/sparkline/index.js +2 -0
  145. package/lib/swing-gauge/custom-elements.json +5 -3
  146. package/lib/swing-gauge/custom-elements.md +17 -0
  147. package/lib/swing-gauge/index.d.ts +3 -1
  148. package/lib/swing-gauge/index.js +3 -1
  149. package/lib/tab/custom-elements.json +2 -2
  150. package/lib/tab/custom-elements.md +22 -0
  151. package/lib/tab-bar/custom-elements.md +11 -0
  152. package/lib/text-field/custom-elements.json +78 -89
  153. package/lib/text-field/custom-elements.md +35 -0
  154. package/lib/text-field/index.d.ts +50 -92
  155. package/lib/text-field/index.js +81 -230
  156. package/lib/time-picker/custom-elements.json +4 -4
  157. package/lib/time-picker/custom-elements.md +28 -0
  158. package/lib/time-picker/index.d.ts +3 -0
  159. package/lib/time-picker/index.js +3 -0
  160. package/lib/toggle/custom-elements.json +8 -6
  161. package/lib/toggle/custom-elements.md +19 -0
  162. package/lib/toggle/index.d.ts +2 -1
  163. package/lib/toggle/index.js +1 -0
  164. package/lib/tooltip/custom-elements.md +14 -0
  165. package/lib/tornado-chart/custom-elements.md +18 -0
  166. package/lib/tree/custom-elements.json +4 -3
  167. package/lib/tree/custom-elements.md +32 -0
  168. package/lib/tree/elements/tree.d.ts +1 -0
  169. package/lib/tree/elements/tree.js +1 -0
  170. package/lib/tree/managers/tree-manager.d.ts +20 -2
  171. package/lib/tree/managers/tree-manager.js +55 -28
  172. package/lib/tree/themes/halo/dark/index.js +1 -1
  173. package/lib/tree/themes/halo/light/index.js +1 -1
  174. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  175. package/lib/tree/themes/solar/pearl/index.js +1 -1
  176. package/lib/tree-select/custom-elements.json +10 -6
  177. package/lib/tree-select/custom-elements.md +26 -0
  178. package/lib/tree-select/index.d.ts +5 -3
  179. package/lib/tree-select/index.js +3 -2
  180. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  181. package/lib/tree-select/themes/halo/light/index.js +1 -1
  182. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  183. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  184. package/lib/version.js +1 -1
  185. package/package.json +293 -12
@@ -0,0 +1,31 @@
1
+ # ef-interactive-chart
2
+
3
+ A charting component that allows you to create several use cases of financial chart.
4
+ By lightweight-charts library.
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Type | Default | Description |
9
+ |----------------------|------------------------|------------------------------|------------|-------------------------------------------------|
10
+ | `config` | `config` | `InteractiveChartConfig` | null | Chart configurations for init chart |
11
+ | `disabledJumpButton` | `disabled-jump-button` | `boolean` | false | Hide jump to latest data button |
12
+ | `disabledLegend` | `disabled-legend` | `boolean` | false | Hide legend |
13
+ | `legendStyle` | `legend-style` | `"vertical" \| "horizontal"` | "vertical" | Set legend style i.e. `horizontal`, `vertical`. |
14
+
15
+ ## Methods
16
+
17
+ | Method | Type | Description |
18
+ |----------|--------------|------------------------------------------------|
19
+ | `colors` | `(): object` | List of available chart colors from the theme. |
20
+
21
+ ## Events
22
+
23
+ | Event | Description |
24
+ |---------------|--------------------------------------|
25
+ | `initialized` | Dispatched when chart is initialized |
26
+
27
+ ## Slots
28
+
29
+ | Name | Description |
30
+ |----------|---------------------------------------------|
31
+ | `legend` | Slot to use for implementing custom legend. |
@@ -43,9 +43,9 @@ export declare class InteractiveChart extends ResponsiveElement {
43
43
  deprecatedLegendStyle: LegendStyle | undefined;
44
44
  /**
45
45
  * Set legend style i.e. `horizontal`, `vertical`.
46
- * Default is `vertical`.
47
46
  * @param {LegendStyle} value legend style value
48
47
  * @type {"vertical" | "horizontal"} type of legend style
48
+ * @default vertical
49
49
  **/
50
50
  set legendStyle(value: LegendStyle);
51
51
  get legendStyle(): LegendStyle;
@@ -54,7 +54,10 @@ export declare class InteractiveChart extends ResponsiveElement {
54
54
  * when deprecated features are used.
55
55
  */
56
56
  private deprecationNotice;
57
- /** Array of series instances in chart */
57
+ /**
58
+ * @ignore
59
+ * Array of series instances in chart
60
+ */
58
61
  seriesList: SeriesList[];
59
62
  private jumpButtonInitialized;
60
63
  private legendInitialized;
@@ -39,7 +39,10 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
39
39
  * when deprecated features are used.
40
40
  */
41
41
  this.deprecationNotice = new DeprecationNotice('`legendstyle` attribute and property are deprecated. Use `legend-style` for attribute and `legendStyle` property instead.');
42
- /** Array of series instances in chart */
42
+ /**
43
+ * @ignore
44
+ * Array of series instances in chart
45
+ */
43
46
  this.seriesList = [];
44
47
  this.jumpButtonInitialized = false;
45
48
  this.legendInitialized = false;
@@ -116,9 +119,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
116
119
  }
117
120
  /**
118
121
  * Set legend style i.e. `horizontal`, `vertical`.
119
- * Default is `vertical`.
120
122
  * @param {LegendStyle} value legend style value
121
123
  * @type {"vertical" | "horizontal"} type of legend style
124
+ * @default vertical
122
125
  **/
123
126
  set legendStyle(value) {
124
127
  const oldValue = this.legendStyle;
@@ -58,7 +58,7 @@
58
58
  "name": "disabled",
59
59
  "description": "Set disabled state.",
60
60
  "type": "boolean",
61
- "default": "\"false\""
61
+ "default": "false"
62
62
  }
63
63
  ],
64
64
  "properties": [
@@ -114,12 +114,12 @@
114
114
  "type": "string | null"
115
115
  },
116
116
  {
117
- "name": "highlightable",
117
+ "name": "highlightable (readonly)",
118
118
  "description": "Return true if the item can be highlighted. True if not disabled and type is Text",
119
119
  "type": "boolean"
120
120
  },
121
121
  {
122
- "name": "isTruncated",
122
+ "name": "isTruncated (readonly)",
123
123
  "description": "Getter returning if the label is truncated",
124
124
  "type": "boolean"
125
125
  },
@@ -135,7 +135,7 @@
135
135
  "attribute": "disabled",
136
136
  "description": "Set disabled state.",
137
137
  "type": "boolean",
138
- "default": "\"false\""
138
+ "default": "false"
139
139
  }
140
140
  ],
141
141
  "slots": [
@@ -0,0 +1,29 @@
1
+ # ef-item
2
+
3
+ Used as a basic building block to compose complex custom elements,
4
+ additionally it can be used by applications
5
+ to create simple menus or navigation panels.
6
+
7
+ ## Properties
8
+
9
+ | Property | Attribute | Type | Default | Description |
10
+ |----------------------------|---------------|--------------------|---------|--------------------------------------------------|
11
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state. |
12
+ | `for` | `for` | `string \| null` | null | Specifies which element an item is bound to |
13
+ | `highlightable (readonly)` | | `boolean` | | Return true if the item can be highlighted. True if not disabled and type is Text |
14
+ | `highlighted` | `highlighted` | `boolean` | false | Highlight the item |
15
+ | `icon` | `icon` | `string \| null` | null | Set the icon name from the ef-icon list |
16
+ | `isTruncated (readonly)` | | `boolean` | | Getter returning if the label is truncated |
17
+ | `label` | `label` | `string \| null` | null | The text for the label indicating the meaning of the item.<br />By having both `label` and content, `label` always takes priority |
18
+ | `multiple` | `multiple` | `boolean` | false | Is the item part of a multiple selection |
19
+ | `selected` | `selected` | `boolean` | false | Indicates that the item is selected |
20
+ | `subLabel` | `sub-label` | `string \| null` | null | The`subLabel` property represents the text beneath the label. |
21
+ | `type` | `type` | `ItemType \| null` | null | If defined value can be `text`, `header` or `divider` |
22
+ | `value` | `value` | `string` | "" | The content of this attribute represents the value of the item. |
23
+
24
+ ## Slots
25
+
26
+ | Name | Description |
27
+ |---------|--------------------------------------------------|
28
+ | `left` | Used to render the content on the left of the label. |
29
+ | `right` | Used to render the content on the right of the label. |
@@ -10,7 +10,7 @@ export * from './helpers/types';
10
10
  * to create simple menus or navigation panels.
11
11
  *
12
12
  * @attr {string} value - The content of this attribute represents the value of the item.
13
- * @prop {string} [value=] - The content of this attribute represents the value of the item.
13
+ * @prop {string} [value=""] - The content of this attribute represents the value of the item.
14
14
  *
15
15
  * @attr {boolean} disabled - Set disabled state.
16
16
  * @prop {boolean} [disabled=false] - Set disabled state.
@@ -44,10 +44,19 @@ export declare class Item extends ControlElement {
44
44
  * Set the icon name from the ef-icon list
45
45
  */
46
46
  icon: string | null;
47
+ private _selected;
47
48
  /**
48
49
  * Indicates that the item is selected
50
+ * @param value selected value
51
+ * @default false
49
52
  */
50
- selected: boolean;
53
+ set selected(value: boolean);
54
+ get selected(): boolean;
55
+ /**
56
+ * Aria indicating current select state
57
+ * @ignore
58
+ */
59
+ ariaSelected: string;
51
60
  /**
52
61
  * Is the item part of a multiple selection
53
62
  */
package/lib/item/index.js CHANGED
@@ -18,7 +18,7 @@ const isAllWhitespaceTextNode = (node) => {
18
18
  * to create simple menus or navigation panels.
19
19
  *
20
20
  * @attr {string} value - The content of this attribute represents the value of the item.
21
- * @prop {string} [value=] - The content of this attribute represents the value of the item.
21
+ * @prop {string} [value=""] - The content of this attribute represents the value of the item.
22
22
  *
23
23
  * @attr {boolean} disabled - Set disabled state.
24
24
  * @prop {boolean} [disabled=false] - Set disabled state.
@@ -43,10 +43,12 @@ let Item = class Item extends ControlElement {
43
43
  * Set the icon name from the ef-icon list
44
44
  */
45
45
  this.icon = null;
46
+ this._selected = false;
46
47
  /**
47
- * Indicates that the item is selected
48
+ * Aria indicating current select state
49
+ * @ignore
48
50
  */
49
- this.selected = false;
51
+ this.ariaSelected = 'false';
50
52
  /**
51
53
  * Is the item part of a multiple selection
52
54
  */
@@ -112,6 +114,22 @@ let Item = class Item extends ControlElement {
112
114
  }
113
115
  `;
114
116
  }
117
+ /**
118
+ * Indicates that the item is selected
119
+ * @param value selected value
120
+ * @default false
121
+ */
122
+ set selected(value) {
123
+ const oldValue = this._selected;
124
+ if (oldValue !== value) {
125
+ this._selected = value;
126
+ this.ariaSelected = String(value);
127
+ void this.requestUpdate('selected', oldValue);
128
+ }
129
+ }
130
+ get selected() {
131
+ return this._selected;
132
+ }
115
133
  /**
116
134
  * @param node that should be checked
117
135
  * @returns whether node can be ignored.
@@ -227,7 +245,10 @@ __decorate([
227
245
  ], Item.prototype, "icon", void 0);
228
246
  __decorate([
229
247
  property({ type: Boolean, reflect: true })
230
- ], Item.prototype, "selected", void 0);
248
+ ], Item.prototype, "selected", null);
249
+ __decorate([
250
+ property({ type: String, reflect: true, attribute: 'aria-selected' })
251
+ ], Item.prototype, "ariaSelected", void 0);
231
252
  __decorate([
232
253
  property({ type: Boolean, reflect: true })
233
254
  ], Item.prototype, "multiple", void 0);
@@ -0,0 +1,11 @@
1
+ # ef-label
2
+
3
+ Displays a text with alternative truncation
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-------------|--------------|-----------|---------|---------------------------------------------|
9
+ | `error` | `error` | `boolean` | false | Set state to error |
10
+ | `lineClamp` | `line-clamp` | `number` | 0 | Limit the number of lines before truncating |
11
+ | `warning` | `warning` | `boolean` | false | Set state to warning |
@@ -0,0 +1,26 @@
1
+ # ef-layout
2
+
3
+ Layout component for creating responsive applications and components
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |--------------|--------------|------------------|---------|--------------------------------------------------|
9
+ | `basis` | `basis` | `string \| null` | null | Sets the rough size of the element based on other siblings and content.<br />Value could be pixel, percents or auto. |
10
+ | `container` | `container` | `boolean` | false | Tells the element to display as a container,<br />displaying children in a vertical nowrap layout. |
11
+ | `debug` | `debug` | `boolean` | false | Displays debug lines. |
12
+ | `flex` | `flex` | `boolean` | false | Tells the element to display flex,<br />displaying children in a row wrap layout. |
13
+ | `maxHeight` | `max-height` | `string \| null` | null | Prevents the height from expanding past a certain point.<br />Value could be pixel, percents or _empty_. |
14
+ | `maxWidth` | `max-width` | `string \| null` | null | Prevents the width from expanding past a certain point.<br />Value could be pixel, percents or _empty_. |
15
+ | `minHeight` | `min-height` | `string \| null` | null | Allows the height to shrink below its contents.<br />Also prevents the height from shrinking past a certain point.<br />Value could be pixel, percents or _empty_. |
16
+ | `minWidth` | `min-width` | `string \| null` | null | Allows the width to shrink below its contents.<br />Also prevents the width from shrinking past a certain point.<br />Value could be pixel, percents or _empty_. |
17
+ | `noflex` | `noflex` | `boolean` | false | Prevents the element from being flexible,<br />when inside of another flex layout. |
18
+ | `nowrap` | `nowrap` | `boolean` | false | Prevents wrapping flex items,<br />when the parent isn't a container. |
19
+ | `scrollable` | `scrollable` | `boolean` | false | Makes the element a scrollable viewport. |
20
+ | `size` | `size` | `string \| null` | null | Sets the fixed size of the element.<br />Value could be pixel, percents or auto. |
21
+
22
+ ## Events
23
+
24
+ | Event | Description |
25
+ |----------|----------------------------------------|
26
+ | `resize` | Fired when the element's size changes. |
@@ -18,7 +18,7 @@
18
18
  {
19
19
  "name": "range",
20
20
  "description": "Value of range. eg [-20, 70]",
21
- "type": "object",
21
+ "type": "number[]",
22
22
  "default": "[]"
23
23
  },
24
24
  {
@@ -43,7 +43,7 @@
43
43
  "name": "neutral-color",
44
44
  "description": "Turn off background color and use grey",
45
45
  "type": "boolean",
46
- "default": "\"false\""
46
+ "default": "false"
47
47
  },
48
48
  {
49
49
  "name": "zero",
@@ -69,7 +69,7 @@
69
69
  "name": "range",
70
70
  "attribute": "range",
71
71
  "description": "Value of range. eg [-20, 70]",
72
- "type": "object",
72
+ "type": "number[]",
73
73
  "default": "[]"
74
74
  },
75
75
  {
@@ -98,7 +98,7 @@
98
98
  "attribute": "neutral-color",
99
99
  "description": "Turn off background color and use grey",
100
100
  "type": "boolean",
101
- "default": "\"false\""
101
+ "default": "false"
102
102
  },
103
103
  {
104
104
  "name": "zero",
@@ -0,0 +1,17 @@
1
+ # ef-led-gauge
2
+
3
+ A component used to show data in a LED-like
4
+ horizontal bar visualization.
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Type | Default | Description |
9
+ |----------------|-----------------|------------------|----------|--------------------------------------------------|
10
+ | `bottomLabel` | `bottom-label` | `string` | "" | Label to be displayed in the bottom legend |
11
+ | `bottomValue` | `bottom-value` | `number \| null` | null | Value of bar for bottom legend position<br />Value can be -100 to 100 |
12
+ | `neutralColor` | `neutral-color` | `boolean` | false | Turn off background color and use grey |
13
+ | `range` | `range` | `number[]` | [] | Value of range. eg [-20, 70] |
14
+ | `rangeLabel` | `range-label` | `string` | "" | Label to be displayed in the bottom legend<br />when a range is displayed<br />and no bottom text is already set. |
15
+ | `topLabel` | `top-label` | `string` | "" | Label to be displayed in the top legend |
16
+ | `topValue` | `top-value` | `number \| null` | null | Value of bar for top legend position<br />Value can be -100 to 100 |
17
+ | `zero` | `zero` | `string` | "center" | Sets the zero scale position. [center, left, right] |
@@ -32,6 +32,7 @@ export declare class LedGauge extends BasicElement {
32
32
  bottomValue: number | null;
33
33
  /**
34
34
  * Value of range. eg [-20, 70]
35
+ * @type {number[]}
35
36
  */
36
37
  range: number[];
37
38
  /**
@@ -30,6 +30,7 @@ let LedGauge = class LedGauge extends BasicElement {
30
30
  this.bottomValue = null;
31
31
  /**
32
32
  * Value of range. eg [-20, 70]
33
+ * @type {number[]}
33
34
  */
34
35
  this.range = [];
35
36
  /**
@@ -20,12 +20,13 @@
20
20
  {
21
21
  "name": "value",
22
22
  "description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
23
- "type": "string"
23
+ "type": "string",
24
+ "default": "\"\""
24
25
  }
25
26
  ],
26
27
  "properties": [
27
28
  {
28
- "name": "delegatesFocus",
29
+ "name": "delegatesFocus (readonly)",
29
30
  "description": "Element focus delegation.\nSet to `false` and relies on native focusing.",
30
31
  "type": "false",
31
32
  "default": "false"
@@ -59,12 +60,14 @@
59
60
  "name": "value",
60
61
  "attribute": "value",
61
62
  "description": "Returns the first selected item value.\nUse `values` when multiple selection mode is enabled.",
62
- "type": "string"
63
+ "type": "string",
64
+ "default": "\"\""
63
65
  },
64
66
  {
65
67
  "name": "values",
66
68
  "description": "Returns a values collection of the currently\nselected item values",
67
- "type": "object"
69
+ "type": "string[]",
70
+ "default": "[]"
68
71
  }
69
72
  ],
70
73
  "events": [
@@ -91,7 +94,17 @@
91
94
  },
92
95
  {
93
96
  "name": "down",
94
- "description": "Navigate up through the list items",
97
+ "description": "Navigate down through the list items",
98
+ "params": []
99
+ },
100
+ {
101
+ "name": "first",
102
+ "description": "Navigate to first focusable item of the list",
103
+ "params": []
104
+ },
105
+ {
106
+ "name": "last",
107
+ "description": "Navigate to first focusable item of the list",
95
108
  "params": []
96
109
  },
97
110
  {
@@ -0,0 +1,32 @@
1
+ # ef-list
2
+
3
+ Provides listing and immutable selection
4
+
5
+ ## Properties
6
+
7
+ | Property | Attribute | Type | Default | Description |
8
+ |-----------------------------|-------------|----------------|--------------------------|--------------------------------------------------|
9
+ | `data` | | `ListData` | null | The data object, used to render the list. |
10
+ | `delegatesFocus (readonly)` | | `false` | false | Element focus delegation.<br />Set to `false` and relies on native focusing. |
11
+ | `multiple` | `multiple` | `boolean` | false | Allow multiple selections |
12
+ | `renderer` | | `ListRenderer` | "new ListRenderer(this)" | Renderer used to render list item elements |
13
+ | `stateless` | `stateless` | `boolean` | false | Disable selections |
14
+ | `value` | `value` | `string` | "" | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
15
+ | `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
16
+
17
+ ## Methods
18
+
19
+ | Method | Type | Description |
20
+ |----------------|-------------------------|--------------------------------------------------|
21
+ | `down` | `(): void` | Navigate down through the list items |
22
+ | `first` | `(): void` | Navigate to first focusable item of the list |
23
+ | `last` | `(): void` | Navigate to first focusable item of the list |
24
+ | `scrollToItem` | `(item: T): void` | Scroll to list item element<br /><br />**item**: Data item to scroll to |
25
+ | `selectItem` | `(item?: any): boolean` | Selects an item in the list<br /><br />**item**: Data Item or Item Element |
26
+ | `up` | `(): void` | Navigate up through the list items |
27
+
28
+ ## Events
29
+
30
+ | Event | Description |
31
+ |-----------------|-------------------------------|
32
+ | `value-changed` | Dispatched when value changes |
@@ -28,6 +28,8 @@ export class ListRenderer extends Renderer {
28
28
  el.hidden = composer.getItemPropertyValue(item, 'hidden') === true;
29
29
  el.type = composer.getItemPropertyValue(item, 'type');
30
30
  el.multiple = !!context && context.multiple === true;
31
+ const itemRole = el.type === 'text' || !el.type ? 'option' : 'presentation';
32
+ el.setAttribute('role', itemRole);
31
33
  tooltip ? el.setAttribute('title', tooltip) : el.removeAttribute('title');
32
34
  return el;
33
35
  });
@@ -5,7 +5,8 @@ import type { ItemData } from '../item';
5
5
  import type { ListData } from './helpers/types';
6
6
  import { ListRenderer } from './helpers/list-renderer.js';
7
7
  import '../item/index.js';
8
- export { ListData, ListRenderer };
8
+ export type { ListData };
9
+ export { ListRenderer };
9
10
  /**
10
11
  * Key direction
11
12
  */
@@ -23,6 +24,7 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
23
24
  * @returns version number
24
25
  */
25
26
  static get version(): string;
27
+ protected readonly defaultRole: string | null;
26
28
  /**
27
29
  * Used to timestamp renders.
28
30
  * This enables diff checking against item updates,
@@ -71,6 +73,7 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
71
73
  /**
72
74
  * The data object, used to render the list.
73
75
  * @type {ListData}
76
+ * @default null
74
77
  */
75
78
  get data(): ListData<T>;
76
79
  set data(value: ListData<T>);
@@ -78,12 +81,15 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
78
81
  /**
79
82
  * Returns the first selected item value.
80
83
  * Use `values` when multiple selection mode is enabled.
84
+ * @default -
81
85
  */
82
86
  get value(): string;
83
87
  set value(value: string);
84
88
  /**
85
89
  * Returns a values collection of the currently
86
90
  * selected item values
91
+ * @type {string[]}
92
+ * @default []
87
93
  * @readonly
88
94
  */
89
95
  get values(): string[];
@@ -100,10 +106,20 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
100
106
  */
101
107
  up(): void;
102
108
  /**
103
- * Navigate up through the list items
109
+ * Navigate down through the list items
104
110
  * @returns {void}
105
111
  */
106
112
  down(): void;
113
+ /**
114
+ * Navigate to first focusable item of the list
115
+ * @returns {void}
116
+ */
117
+ first(): void;
118
+ /**
119
+ * Navigate to first focusable item of the list
120
+ * @returns {void}
121
+ */
122
+ last(): void;
107
123
  /**
108
124
  * Proxy for querying the composer
109
125
  * @param engine composer querying engine
@@ -262,6 +278,7 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
262
278
  protected renderLightDOM(): void;
263
279
  protected firstUpdated(changeProperties: PropertyValues): void;
264
280
  protected update(changeProperties: PropertyValues): void;
281
+ protected updated(changedProperties: PropertyValues): void;
265
282
  /**
266
283
  * A `CSSResultGroup` that will be used
267
284
  * to style the host, slotted children
package/lib/list/index.js CHANGED
@@ -23,6 +23,7 @@ const valueFormatWarning = new WarningNotice('The specified \'values\' format do
23
23
  let List = class List extends ControlElement {
24
24
  constructor() {
25
25
  super(...arguments);
26
+ this.defaultRole = 'listbox';
26
27
  /**
27
28
  * Used to timestamp renders.
28
29
  * This enables diff checking against item updates,
@@ -82,6 +83,7 @@ let List = class List extends ControlElement {
82
83
  /**
83
84
  * The data object, used to render the list.
84
85
  * @type {ListData}
86
+ * @default null
85
87
  */
86
88
  get data() {
87
89
  return this._data;
@@ -110,6 +112,7 @@ let List = class List extends ControlElement {
110
112
  /**
111
113
  * Returns the first selected item value.
112
114
  * Use `values` when multiple selection mode is enabled.
115
+ * @default -
113
116
  */
114
117
  get value() {
115
118
  return this.values[0] || '';
@@ -128,6 +131,8 @@ let List = class List extends ControlElement {
128
131
  /**
129
132
  * Returns a values collection of the currently
130
133
  * selected item values
134
+ * @type {string[]}
135
+ * @default []
131
136
  * @readonly
132
137
  */
133
138
  get values() {
@@ -189,12 +194,28 @@ let List = class List extends ControlElement {
189
194
  this.highlightItem(this.getNextHighlightItem(Direction.UP), true);
190
195
  }
191
196
  /**
192
- * Navigate up through the list items
197
+ * Navigate down through the list items
193
198
  * @returns {void}
194
199
  */
195
200
  down() {
196
201
  this.highlightItem(this.getNextHighlightItem(Direction.DOWN), true);
197
202
  }
203
+ /**
204
+ * Navigate to first focusable item of the list
205
+ * @returns {void}
206
+ */
207
+ first() {
208
+ const firstItem = this.itemMap.get(this.tabbableElements[0]);
209
+ this.highlightItem(firstItem, true);
210
+ }
211
+ /**
212
+ * Navigate to first focusable item of the list
213
+ * @returns {void}
214
+ */
215
+ last() {
216
+ const lastItem = this.itemMap.get(this.tabbableElements[this.tabbableElements.length - 1]);
217
+ this.highlightItem(lastItem, true);
218
+ }
198
219
  /**
199
220
  * Proxy for querying the composer
200
221
  * @param engine composer querying engine
@@ -352,6 +373,12 @@ let List = class List extends ControlElement {
352
373
  case 'ArrowDown':
353
374
  this.down();
354
375
  break;
376
+ case 'Home':
377
+ this.first();
378
+ break;
379
+ case 'End':
380
+ this.last();
381
+ break;
355
382
  default:
356
383
  return;
357
384
  }
@@ -548,6 +575,12 @@ let List = class List extends ControlElement {
548
575
  }
549
576
  return super.update(changeProperties);
550
577
  }
578
+ updated(changedProperties) {
579
+ super.updated(changedProperties);
580
+ if (changedProperties.has('multiple')) {
581
+ this.setAttribute('aria-multiselectable', this.multiple ? 'true' : 'false');
582
+ }
583
+ }
551
584
  /**
552
585
  * A `CSSResultGroup` that will be used
553
586
  * to style the host, slotted children
@@ -0,0 +1,5 @@
1
+ # ef-loader
2
+
3
+ An animated graphical component,
4
+ used to show that an app is performing an action
5
+ in the background such as downloading content.
@@ -49,13 +49,13 @@
49
49
  "name": "readonly",
50
50
  "description": "Hides text field and clear icon from all pills",
51
51
  "type": "boolean",
52
- "default": "\"false\""
52
+ "default": "false"
53
53
  },
54
54
  {
55
55
  "name": "disabled",
56
56
  "description": "Set disabled state",
57
57
  "type": "boolean",
58
- "default": "\"false\""
58
+ "default": "false"
59
59
  },
60
60
  {
61
61
  "name": "value",
@@ -66,9 +66,10 @@
66
66
  ],
67
67
  "properties": [
68
68
  {
69
- "name": "values",
69
+ "name": "values (readonly)",
70
70
  "description": "Array of item's values ( readonly )",
71
- "type": "string[]"
71
+ "type": "string[]",
72
+ "default": "[]"
72
73
  },
73
74
  {
74
75
  "name": "pillsOnly",
@@ -137,14 +138,14 @@
137
138
  "attribute": "readonly",
138
139
  "description": "Hides text field and clear icon from all pills",
139
140
  "type": "boolean",
140
- "default": "\"false\""
141
+ "default": "false"
141
142
  },
142
143
  {
143
144
  "name": "disabled",
144
145
  "attribute": "disabled",
145
146
  "description": "Set disabled state",
146
147
  "type": "boolean",
147
- "default": "\"false\""
148
+ "default": "false"
148
149
  },
149
150
  {
150
151
  "name": "value",