@refinitiv-ui/elements 6.0.1 → 6.0.4

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 (151) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/lib/accordion/index.js +2 -2
  3. package/lib/autosuggest/helpers/renderer.d.ts +1 -1
  4. package/lib/autosuggest/helpers/utils.d.ts +1 -1
  5. package/lib/autosuggest/index.d.ts +2 -1
  6. package/lib/autosuggest/themes/halo/dark/index.js +1 -1
  7. package/lib/autosuggest/themes/halo/light/index.js +1 -1
  8. package/lib/button/index.js +2 -1
  9. package/lib/button/themes/halo/dark/index.js +1 -1
  10. package/lib/button/themes/halo/light/index.js +1 -1
  11. package/lib/button/themes/solar/charcoal/index.js +1 -1
  12. package/lib/button/themes/solar/pearl/index.js +1 -1
  13. package/lib/calendar/index.d.ts +1 -1
  14. package/lib/calendar/index.js +6 -5
  15. package/lib/calendar/themes/halo/dark/index.js +1 -1
  16. package/lib/calendar/themes/halo/light/index.js +1 -1
  17. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  18. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  19. package/lib/checkbox/index.d.ts +8 -15
  20. package/lib/checkbox/index.js +19 -41
  21. package/lib/checkbox/themes/halo/dark/index.js +1 -1
  22. package/lib/checkbox/themes/halo/light/index.js +1 -1
  23. package/lib/checkbox/themes/solar/charcoal/index.js +1 -1
  24. package/lib/checkbox/themes/solar/pearl/index.js +1 -1
  25. package/lib/clock/themes/halo/dark/index.js +1 -1
  26. package/lib/clock/themes/halo/light/index.js +1 -1
  27. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  28. package/lib/clock/themes/solar/pearl/index.js +1 -1
  29. package/lib/combo-box/index.d.ts +4 -3
  30. package/lib/combo-box/index.js +7 -3
  31. package/lib/combo-box/themes/halo/dark/index.js +1 -1
  32. package/lib/combo-box/themes/halo/light/index.js +1 -1
  33. package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
  34. package/lib/combo-box/themes/solar/pearl/index.js +1 -1
  35. package/lib/datetime-field/index.d.ts +1 -1
  36. package/lib/datetime-field/utils.d.ts +1 -1
  37. package/lib/datetime-picker/themes/halo/dark/index.js +1 -1
  38. package/lib/datetime-picker/themes/halo/light/index.js +1 -1
  39. package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
  40. package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
  41. package/lib/email-field/themes/halo/dark/index.js +1 -1
  42. package/lib/email-field/themes/halo/light/index.js +1 -1
  43. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  44. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  45. package/lib/heatmap/index.d.ts +2 -2
  46. package/lib/heatmap/themes/halo/light/index.js +1 -1
  47. package/lib/index.d.ts +1 -1
  48. package/lib/index.js +1 -1
  49. package/lib/interactive-chart/index.js +4 -3
  50. package/lib/item/helpers/types.d.ts +6 -6
  51. package/lib/item/index.d.ts +2 -2
  52. package/lib/item/index.js +0 -1
  53. package/lib/item/themes/halo/dark/index.js +1 -1
  54. package/lib/item/themes/halo/light/index.js +1 -1
  55. package/lib/list/elements/list-item.d.ts +30 -0
  56. package/lib/list/elements/list-item.js +19 -0
  57. package/lib/list/elements/list.d.ts +307 -0
  58. package/lib/list/elements/list.js +632 -0
  59. package/lib/list/helpers/renderer.d.ts +0 -1
  60. package/lib/list/helpers/renderer.js +1 -3
  61. package/lib/list/index.d.ts +3 -317
  62. package/lib/list/index.js +3 -641
  63. package/lib/list/themes/halo/dark/index.js +4 -1
  64. package/lib/list/themes/halo/light/index.js +5 -2
  65. package/lib/list/themes/solar/charcoal/index.js +4 -1
  66. package/lib/list/themes/solar/pearl/index.js +4 -1
  67. package/lib/multi-input/index.d.ts +1 -5
  68. package/lib/multi-input/index.js +17 -18
  69. package/lib/notification/themes/halo/dark/index.js +1 -1
  70. package/lib/notification/themes/halo/light/index.js +1 -1
  71. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  72. package/lib/notification/themes/solar/pearl/index.js +1 -1
  73. package/lib/number-field/themes/halo/dark/index.js +1 -1
  74. package/lib/number-field/themes/halo/light/index.js +1 -1
  75. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  76. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  77. package/lib/overlay/index.d.ts +2 -1
  78. package/lib/overlay-menu/helpers/constants.d.ts +6 -0
  79. package/lib/overlay-menu/helpers/constants.js +7 -0
  80. package/lib/overlay-menu/helpers/types.d.ts +0 -6
  81. package/lib/overlay-menu/helpers/types.js +1 -7
  82. package/lib/overlay-menu/index.d.ts +1 -1
  83. package/lib/overlay-menu/index.js +1 -1
  84. package/lib/password-field/themes/halo/dark/index.js +1 -1
  85. package/lib/password-field/themes/halo/light/index.js +1 -1
  86. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  87. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  88. package/lib/pill/index.d.ts +11 -3
  89. package/lib/pill/index.js +25 -11
  90. package/lib/radio-button/index.d.ts +7 -11
  91. package/lib/radio-button/index.js +14 -25
  92. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  93. package/lib/radio-button/themes/halo/light/index.js +1 -1
  94. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  95. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  96. package/lib/search-field/themes/halo/dark/index.js +1 -1
  97. package/lib/search-field/themes/halo/light/index.js +1 -1
  98. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  99. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  100. package/lib/select/index.d.ts +13 -1
  101. package/lib/select/index.js +25 -7
  102. package/lib/select/themes/halo/dark/index.js +1 -1
  103. package/lib/select/themes/halo/light/index.js +1 -1
  104. package/lib/select/themes/solar/charcoal/index.js +1 -1
  105. package/lib/select/themes/solar/pearl/index.js +1 -1
  106. package/lib/slider/themes/halo/dark/index.js +1 -1
  107. package/lib/slider/themes/halo/light/index.js +1 -1
  108. package/lib/slider/themes/solar/charcoal/index.js +1 -1
  109. package/lib/slider/themes/solar/pearl/index.js +1 -1
  110. package/lib/tab/themes/halo/dark/index.js +1 -1
  111. package/lib/tab/themes/halo/light/index.js +1 -1
  112. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  113. package/lib/tab/themes/solar/pearl/index.js +1 -1
  114. package/lib/tab-bar/index.d.ts +13 -8
  115. package/lib/tab-bar/index.js +26 -15
  116. package/lib/tab-bar/themes/halo/dark/index.js +1 -0
  117. package/lib/tab-bar/themes/halo/light/index.js +1 -0
  118. package/lib/tab-bar/themes/solar/charcoal/index.js +1 -0
  119. package/lib/tab-bar/themes/solar/pearl/index.js +1 -0
  120. package/lib/text-field/index.js +2 -3
  121. package/lib/text-field/themes/halo/dark/index.js +1 -1
  122. package/lib/text-field/themes/halo/light/index.js +1 -1
  123. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  124. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  125. package/lib/toggle/index.d.ts +7 -10
  126. package/lib/toggle/index.js +14 -24
  127. package/lib/toggle/themes/halo/dark/index.js +1 -1
  128. package/lib/toggle/themes/halo/light/index.js +1 -1
  129. package/lib/toggle/themes/solar/charcoal/index.js +1 -1
  130. package/lib/toggle/themes/solar/pearl/index.js +1 -1
  131. package/lib/tooltip/helpers/overflow-tooltip.d.ts +11 -4
  132. package/lib/tooltip/helpers/overflow-tooltip.js +34 -6
  133. package/lib/tooltip/index.d.ts +2 -2
  134. package/lib/tooltip/index.js +2 -2
  135. package/lib/tree/elements/tree-item.d.ts +4 -0
  136. package/lib/tree/elements/tree-item.js +4 -0
  137. package/lib/tree/elements/tree.d.ts +1 -0
  138. package/lib/tree/elements/tree.js +1 -0
  139. package/lib/tree/helpers/renderer.d.ts +0 -1
  140. package/lib/tree/helpers/renderer.js +0 -2
  141. package/lib/tree/index.d.ts +2 -1
  142. package/lib/tree/themes/halo/dark/index.js +2 -3
  143. package/lib/tree/themes/halo/light/index.js +2 -3
  144. package/lib/tree/themes/solar/charcoal/index.js +2 -3
  145. package/lib/tree/themes/solar/pearl/index.js +2 -3
  146. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  147. package/lib/tree-select/themes/halo/light/index.js +1 -1
  148. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  149. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  150. package/lib/version.js +1 -1
  151. package/package.json +17 -17
@@ -1,9 +1,9 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { ControlElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
- import type { ItemType } from './helpers/types';
4
3
  import '../icon/index.js';
5
4
  import '../checkbox/index.js';
6
- export * from './helpers/types';
5
+ import type { ItemType, ItemText, ItemHeader, ItemDivider, ItemData } from './helpers/types';
6
+ export type { ItemType, ItemText, ItemHeader, ItemDivider, ItemData };
7
7
  /**
8
8
  * Used as a basic building block to compose complex custom elements,
9
9
  * additionally it can be used by applications
package/lib/item/index.js CHANGED
@@ -6,7 +6,6 @@ import { query } from '@refinitiv-ui/core/decorators/query.js';
6
6
  import { VERSION } from '../version.js';
7
7
  import '../icon/index.js';
8
8
  import '../checkbox/index.js';
9
- export * from './helpers/types';
10
9
  const isAllWhitespaceTextNode = (node) => node.nodeType === document.TEXT_NODE
11
10
  && !node.textContent?.trim();
12
11
  /**
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/checkbox/themes/halo/dark';
3
3
 
4
- elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#fff;font-weight:500}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#1429bd;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(204,204,204,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#999;background-color:transparent;font-size:83%;font-weight:500;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#404040,#404040) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#333}:host([selected]:not([highlighted]):not([focused]):not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
4
+ elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#fff;font-weight:600}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#1429bd;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(204,204,204,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#999;background-color:transparent;font-size:83%;font-weight:600;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#404040,#404040) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#333}:host([selected]:not([highlighted]):not([focused]):not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/icon/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/checkbox/themes/halo/light';
3
3
 
4
- elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#0d0d0d;font-weight:500}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#1429bd;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(64,64,64,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#737373;background-color:transparent;font-size:83%;font-weight:500;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#d9d9d9,#d9d9d9) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#e6e6e6}:host([selected]:not([highlighted]):not([focused]):not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
4
+ elf.customStyles.define('ef-item', ':host{outline:0;cursor:pointer;padding:0 8px;min-height:24px;box-sizing:border-box;touch-action:manipulation}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){:host(:after){content:\'\';min-height:inherit;font-size:0}}:host([selected]){color:#0d0d0d;font-weight:600}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:#1429bd;color:#fff}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#fff}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(64,64,64,.5)}:host([type=divider]),:host([type=header]){pointer-events:none;min-height:auto}:host([type=divider]) [part=sub-label],:host([type=header]) [part=sub-label]{display:none}:host([type=header]){color:#737373;background-color:transparent;font-size:83%;font-weight:600;border:none;height:24px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#d9d9d9,#d9d9d9) 0 center/calc(100% - (0px * 2)) 1px no-repeat}:host [part=checkbox],:host [part=icon],:host [part=left] ::slotted(*){margin:0 .5em 0 0}:host [part=right] ::slotted(*){margin-left:.5em}:host [part=checkbox]{margin-right:8px}:host [part=sub-label]{font-size:90%}:host([sub-label]){padding:4px 8px}:host([selected]:not([highlighted]):not([focused])){background-color:#e6e6e6}:host([selected]:not([highlighted]):not([focused]):not([multiple])){background-image:linear-gradient(#334bff,#334bff);background-size:4px 100%;background-position:left top;background-repeat:no-repeat}:host([selected][focused]),:host([selected][highlighted]){color:#fff}');
@@ -0,0 +1,30 @@
1
+ import { JSXInterface } from '../../jsx';
2
+ import { Item } from '../../item/index.js';
3
+ /**
4
+ * Extending from Item Class to provide ability to override tabIndex
5
+ */
6
+ export declare class ListItem extends Item {
7
+ /**
8
+ * Overriding Item tabIndex value, list should have only one focusable point.
9
+ */
10
+ protected readonly defaultTabIndex: number | null;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'ef-list-item': ListItem;
15
+ }
16
+ }
17
+
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ 'ef-list-item': ListItem;
21
+ }
22
+
23
+ namespace JSX {
24
+ interface IntrinsicElements {
25
+ 'ef-list-item': Partial<ListItem> | JSXInterface.HTMLAttributes<ListItem>;
26
+ }
27
+ }
28
+ }
29
+
30
+ export {};
@@ -0,0 +1,19 @@
1
+ import { __decorate } from "tslib";
2
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
3
+ import { Item } from '../../item/index.js';
4
+ /**
5
+ * Extending from Item Class to provide ability to override tabIndex
6
+ */
7
+ let ListItem = class ListItem extends Item {
8
+ constructor() {
9
+ super(...arguments);
10
+ /**
11
+ * Overriding Item tabIndex value, list should have only one focusable point.
12
+ */
13
+ this.defaultTabIndex = null;
14
+ }
15
+ };
16
+ ListItem = __decorate([
17
+ customElement('ef-list-item')
18
+ ], ListItem);
19
+ export { ListItem };
@@ -0,0 +1,307 @@
1
+ import { JSXInterface } from '../../jsx';
2
+ import { ControlElement, CSSResultGroup, PropertyValues, TapEvent, TemplateResult } from '@refinitiv-ui/core';
3
+ import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
4
+ import type { ItemData } from '../../item';
5
+ import type { ListData } from '../helpers/types';
6
+ import { ListRenderer } from '../helpers/renderer.js';
7
+ import './list-item.js';
8
+ /**
9
+ * Key direction
10
+ */
11
+ declare enum Direction {
12
+ UP = -1,
13
+ DOWN = 1
14
+ }
15
+ /**
16
+ * Provides listing and immutable selection
17
+ * @fires value-changed - Dispatched when value changes
18
+ */
19
+ export declare class List<T extends DataItem = ItemData> extends ControlElement {
20
+ /**
21
+ * Element version number
22
+ * @returns version number
23
+ */
24
+ static get version(): string;
25
+ protected readonly defaultRole: string | null;
26
+ /**
27
+ * Used to timestamp renders.
28
+ * This enables diff checking against item updates,
29
+ * rendering only items which have updated since the last render cycle.
30
+ */
31
+ private renderTimestamp;
32
+ /**
33
+ * Requests an update after a composer modification.
34
+ * @returns Update promise.
35
+ */
36
+ private modificationUpdate;
37
+ /**
38
+ * Item map; used to link element nodes to data items.
39
+ */
40
+ private itemMap;
41
+ /**
42
+ * Element map; used to link data items to element nodes.
43
+ */
44
+ private elementMap;
45
+ /**
46
+ * Composer used to query and modify item state.
47
+ */
48
+ protected composer: CollectionComposer<T>;
49
+ /**
50
+ * Element focus delegation.
51
+ * Set to `false` and relies on native focusing.
52
+ */
53
+ readonly delegatesFocus = false;
54
+ /**
55
+ * Renderer used to render list item elements
56
+ * @type {ListRenderer}
57
+ */
58
+ renderer: ListRenderer;
59
+ /**
60
+ * Disable selections
61
+ */
62
+ stateless: boolean;
63
+ /**
64
+ * Allow multiple selections
65
+ */
66
+ multiple: boolean;
67
+ /**
68
+ * The data object, used to render the list.
69
+ * @type {ListData}
70
+ * @default null
71
+ */
72
+ get data(): ListData<T>;
73
+ set data(value: ListData<T>);
74
+ private _data;
75
+ /**
76
+ * Returns the first selected item value.
77
+ * Use `values` when multiple selection mode is enabled.
78
+ * @default -
79
+ */
80
+ get value(): string;
81
+ set value(value: string);
82
+ /**
83
+ * Returns a values collection of the currently
84
+ * selected item values
85
+ * @type {string[]}
86
+ * @default []
87
+ * @readonly
88
+ */
89
+ get values(): string[];
90
+ set values(values: string[]);
91
+ /**
92
+ * Selects an item in the list
93
+ * @param item Data Item or Item Element
94
+ * @returns If a selection has been made or not
95
+ */
96
+ selectItem(item?: T | HTMLElement): boolean;
97
+ /**
98
+ * Navigate up through the list items
99
+ * @returns {void}
100
+ */
101
+ up(): void;
102
+ /**
103
+ * Navigate down through the list items
104
+ * @returns {void}
105
+ */
106
+ down(): void;
107
+ /**
108
+ * Navigate to first focusable item of the list
109
+ * @returns {void}
110
+ */
111
+ first(): void;
112
+ /**
113
+ * Navigate to first focusable item of the list
114
+ * @returns {void}
115
+ */
116
+ last(): void;
117
+ /**
118
+ * Proxy for querying the composer
119
+ * @param engine composer querying engine
120
+ * @returns Collection of queried items
121
+ */
122
+ protected queryItems(engine: (item: T, composer: CollectionComposer<T>) => boolean): readonly T[];
123
+ /**
124
+ * Proxy for querying the composer by property and value
125
+ * @param name Property name
126
+ * @param value Property value
127
+ * @returns Collection of queried items
128
+ */
129
+ protected queryItemsByPropertyValue<K extends keyof T>(name: K, value: T[K]): readonly T[];
130
+ /**
131
+ * Gets the associated element for the data item provided,
132
+ * if there is one available.
133
+ * @param item Item to map element to
134
+ * @returns Associated element
135
+ */
136
+ protected elementFromItem(item: T): HTMLElement | undefined;
137
+ /**
138
+ * Gets the associated data item for the provided element,
139
+ * if there is one available.
140
+ * @param element Element to map item to
141
+ * @returns Associated date item
142
+ */
143
+ protected itemFromElement(element: HTMLElement): T | undefined;
144
+ /**
145
+ * Tries to find the next focusable element.
146
+ * @param direction Direction to search
147
+ * @param element Starting element
148
+ * @returns Next logical element to focus
149
+ */
150
+ protected getNextFocusableItem(direction: Direction, element?: HTMLElement): HTMLElement | undefined;
151
+ /**
152
+ * Tries to find the next highlight item
153
+ * @param direction Direction to search
154
+ * @returns A data item, if found.
155
+ */
156
+ protected getNextHighlightItem(direction: Direction): T | undefined;
157
+ /**
158
+ * Clears any highlighted item
159
+ * @returns {void}
160
+ */
161
+ protected clearHighlighted(): void;
162
+ /**
163
+ * Highlights a single item.
164
+ * Used for navigation.
165
+ * @param item Item to highlight
166
+ * @param scrollToItem Scroll the item into view?
167
+ * @returns {void}
168
+ */
169
+ protected highlightItem(item?: T, scrollToItem?: boolean): void;
170
+ /**
171
+ * Gets the available tabbable elements
172
+ */
173
+ protected get tabbableItems(): HTMLElement[];
174
+ /**
175
+ * Returns the current focused element
176
+ */
177
+ protected get highlightElement(): HTMLElement | null;
178
+ /**
179
+ * Tries to select the current highlighted element
180
+ * @returns {void}
181
+ */
182
+ protected triggerActiveItem(): void;
183
+ /**
184
+ * Scroll to list item element
185
+ * @param item Data item to scroll to
186
+ * @returns {void}
187
+ */
188
+ scrollToItem(item: T): void;
189
+ /**
190
+ * Handles key input
191
+ * @param event Key down event object
192
+ * @returns {void}
193
+ */
194
+ protected onKeyDown(event: KeyboardEvent): void;
195
+ /**
196
+ * Handle list on tap
197
+ * Typically it will select an item
198
+ * @param event Event to handle
199
+ * @returns {void}
200
+ */
201
+ protected onTap(event: TapEvent): void;
202
+ /**
203
+ * Handles mouse move
204
+ * Typically it will highlight an item
205
+ * @param event Event to handle
206
+ * @returns {void}
207
+ */
208
+ protected onMouse(event: Event): void;
209
+ /**
210
+ * Handles item focus out
211
+ * Typically it will remove highlighting
212
+ * @returns {void}
213
+ */
214
+ protected onBlur(): void;
215
+ /**
216
+ * Tries to find a known item element,
217
+ * from an event target
218
+ * @param target Event target
219
+ * @returns Found element, if available
220
+ */
221
+ protected findItemElementFromTarget(target: EventTarget | HTMLElement | null): HTMLElement | null;
222
+ /**
223
+ * Clears the current selected items
224
+ * @returns {void}
225
+ */
226
+ protected clearSelection(): void;
227
+ /**
228
+ * Queries and returns all renderable items.
229
+ * @returns Collection of renderable items
230
+ */
231
+ protected get renderItems(): readonly T[];
232
+ /**
233
+ * Proxy for creating list item elements.
234
+ * Allows for a mapping to be created between
235
+ * Data Item and Item Element.
236
+ * @param item Data item context
237
+ * @param recyclableElements Child elements available for reuse
238
+ * @returns List item element
239
+ */
240
+ private createListItem;
241
+ /**
242
+ * Clears all item-element and timestamp maps
243
+ * @returns {void}
244
+ */
245
+ private clearMaps;
246
+ /**
247
+ * Fire value changed event
248
+ * @returns {void}
249
+ */
250
+ private fireSelectionUpdate;
251
+ /**
252
+ * Calculates what elements can be recycled safely
253
+ * @param renderItems Current items to render
254
+ * @returns Collection of elements to be recycled
255
+ */
256
+ private calculateRecyclableElements;
257
+ /**
258
+ * Renders updates to light DOM
259
+ * @returns {void}
260
+ */
261
+ protected renderLightDOM(): void;
262
+ /**
263
+ * Invoked when the element is first updated. Implement to perform one time work on the element after update.
264
+ * @param changeProperties changed properties
265
+ * @returns {void}
266
+ */
267
+ protected firstUpdated(changeProperties: PropertyValues): void;
268
+ /**
269
+ * Invoked before update() to compute values needed during the update.
270
+ * @param changeProperties changed properties
271
+ * @returns {void}
272
+ */
273
+ protected willUpdate(changeProperties: PropertyValues): void;
274
+ /**
275
+ * A `CSSResultGroup` that will be used
276
+ * to style the host, slotted children
277
+ * and the internal template of the element.
278
+ * @return CSS template
279
+ */
280
+ static get styles(): CSSResultGroup;
281
+ /**
282
+ * A `TemplateResult` that will be used
283
+ * to render the updated internal template.
284
+ * @return Render template
285
+ */
286
+ protected render(): TemplateResult;
287
+ }
288
+ declare global {
289
+ interface HTMLElementTagNameMap {
290
+ 'ef-list': List;
291
+ }
292
+ }
293
+ export {};
294
+
295
+ declare global {
296
+ interface HTMLElementTagNameMap {
297
+ 'ef-list': List;
298
+ }
299
+
300
+ namespace JSX {
301
+ interface IntrinsicElements {
302
+ 'ef-list': Partial<List> | JSXInterface.HTMLAttributes<List>;
303
+ }
304
+ }
305
+ }
306
+
307
+ export {};