@refinitiv-ui/elements 5.5.0 → 5.8.1
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.
- package/CHANGELOG.md +65 -8
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +5 -5
- package/lib/accordion/index.js +8 -11
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +5 -5
- package/lib/appstate-bar/index.js +8 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +1 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -2
- package/lib/autosuggest/index.d.ts +13 -8
- package/lib/autosuggest/index.js +38 -31
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +13 -13
- package/lib/button/index.js +41 -31
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +3 -3
- package/lib/button-bar/index.js +8 -10
- package/lib/calendar/constants.d.ts +22 -0
- package/lib/calendar/constants.js +23 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +9 -7
- package/lib/calendar/index.js +20 -38
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +0 -104
- package/lib/calendar/types.d.ts +1 -5
- package/lib/calendar/types.js +1 -6
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +104 -2
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +4 -3
- package/lib/canvas/index.js +8 -10
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/index.d.ts +10 -8
- package/lib/card/index.js +14 -13
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -2
- package/lib/chart/helpers/index.js +2 -2
- package/lib/chart/index.d.ts +6 -6
- package/lib/chart/index.js +12 -14
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +21 -13
- package/lib/checkbox/index.js +56 -31
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +17 -5
- package/lib/clock/index.js +37 -18
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +7 -7
- package/lib/collapse/index.js +11 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/color-palettes.js +8 -12
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -12
- package/lib/color-dialog/elements/palettes.d.ts +3 -3
- package/lib/color-dialog/elements/palettes.js +49 -47
- package/lib/color-dialog/helpers/value-model.js +2 -2
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +36 -35
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/index.d.ts +26 -18
- package/lib/combo-box/index.js +36 -27
- package/lib/combo-box/themes/halo/dark/index.js +1 -1
- package/lib/combo-box/themes/halo/light/index.js +1 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
- package/lib/combo-box/themes/solar/pearl/index.js +1 -1
- package/lib/counter/custom-elements.json +8 -4
- package/lib/counter/custom-elements.md +11 -0
- package/lib/counter/index.d.ts +5 -3
- package/lib/counter/index.js +11 -12
- package/lib/datetime-picker/custom-elements.json +52 -23
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +25 -14
- package/lib/datetime-picker/index.js +46 -35
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +17 -20
- package/lib/dialog/index.js +28 -31
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +44 -116
- package/lib/email-field/index.js +48 -249
- package/lib/events.d.ts +2 -2
- package/lib/events.js +1 -2
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +6 -4
- package/lib/flag/index.js +12 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +5 -8
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/index.d.ts +7 -7
- package/lib/heatmap/index.js +15 -16
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +9 -6
- package/lib/icon/index.js +28 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/types.d.ts +2 -2
- package/lib/interactive-chart/index.d.ts +11 -8
- package/lib/interactive-chart/index.js +17 -17
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +18 -8
- package/lib/item/index.js +36 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +3 -3
- package/lib/label/index.js +12 -20
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +6 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +5 -4
- package/lib/led-gauge/index.js +9 -11
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -2
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/index.d.ts +27 -10
- package/lib/list/index.js +54 -25
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.js +4 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +11 -7
- package/lib/multi-input/index.js +20 -17
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +6 -9
- package/lib/notification/elements/notification.d.ts +5 -5
- package/lib/notification/elements/notification.js +8 -11
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -2
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +96 -51
- package/lib/number-field/index.js +121 -89
- package/lib/overlay/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
- package/lib/overlay/elements/overlay-backdrop.js +6 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
- package/lib/overlay/elements/overlay-viewport.js +5 -9
- package/lib/overlay/elements/overlay.d.ts +10 -5
- package/lib/overlay/elements/overlay.js +18 -23
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +1 -1
- package/lib/overlay/managers/focus-manager.js +2 -2
- package/lib/overlay/managers/interaction-lock-manager.js +2 -2
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +6 -2
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/index.d.ts +21 -19
- package/lib/overlay-menu/index.js +32 -31
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +3 -3
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/pagination/index.d.ts +8 -8
- package/lib/pagination/index.js +13 -15
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +3 -3
- package/lib/panel/index.js +6 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +43 -94
- package/lib/password-field/index.js +52 -198
- package/lib/pill/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +5 -5
- package/lib/pill/index.js +9 -11
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +3 -3
- package/lib/progress-bar/index.js +7 -9
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +25 -8
- package/lib/radio-button/index.js +84 -21
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -4
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +3 -3
- package/lib/rating/index.js +9 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +44 -101
- package/lib/search-field/index.js +50 -220
- package/lib/select/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/index.d.ts +18 -10
- package/lib/select/index.js +84 -45
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +7 -6
- package/lib/sidebar-layout/index.js +9 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +9 -10
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +6 -4
- package/lib/sparkline/index.js +10 -10
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +1 -1
- package/lib/swing-gauge/helpers.js +1 -1
- package/lib/swing-gauge/index.d.ts +9 -7
- package/lib/swing-gauge/index.js +17 -15
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +5 -5
- package/lib/tab/index.js +9 -12
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/index.d.ts +4 -4
- package/lib/tab-bar/index.js +9 -11
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +59 -79
- package/lib/text-field/index.js +99 -158
- package/lib/time-picker/custom-elements.json +4 -4
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +7 -4
- package/lib/time-picker/index.js +15 -14
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +14 -4
- package/lib/toggle/index.js +31 -12
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/index.d.ts +9 -9
- package/lib/tooltip/index.js +18 -20
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +3 -7
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
- package/lib/tornado-chart/elements/tornado-chart.js +8 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
- package/lib/tornado-chart/elements/tornado-item.js +10 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -2
- package/lib/tree/custom-elements.json +4 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +4 -4
- package/lib/tree/elements/tree-item.js +10 -13
- package/lib/tree/elements/tree.d.ts +6 -5
- package/lib/tree/elements/tree.js +9 -12
- package/lib/tree/helpers/filter.d.ts +2 -2
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -3
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -40
- package/lib/tree/themes/halo/dark/index.js +1 -1
- package/lib/tree/themes/halo/light/index.js +1 -1
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/custom-elements.json +10 -6
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/index.d.ts +28 -20
- package/lib/tree-select/index.js +44 -31
- package/lib/tree-select/themes/halo/dark/index.js +1 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +298 -15
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -3
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,27 +3,84 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## [5.8.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.8.0...@refinitiv-ui/elements@5.8.1) (2021-12-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @refinitiv-ui/elements
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.8.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.7.0...@refinitiv-ui/elements@5.8.0) (2021-12-03)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
|
10
18
|
|
|
11
|
-
*
|
|
12
|
-
* **
|
|
13
|
-
* **
|
|
14
|
-
* **overlay:** incorrect change check for `interactiveElements` property ([d1da5b6](https://github.com/Refinitiv/refinitiv-ui/commit/d1da5b692df070f0bb8f08644dd30b43673ffb49))
|
|
19
|
+
* change default role to more generic type for better extendibility ([#100](https://github.com/Refinitiv/refinitiv-ui/issues/100)) ([fe999dc](https://github.com/Refinitiv/refinitiv-ui/commit/fe999dc66b5f42581a37329ced697ae6ac2dc929))
|
|
20
|
+
* **combo-box:** fix arrow icon not show in Solar when disabled ([55c1008](https://github.com/Refinitiv/refinitiv-ui/commit/55c1008b7b63f915a7575059c6539e63a757e389))
|
|
21
|
+
* **combo-box:** import counter instead of pill ([6410c03](https://github.com/Refinitiv/refinitiv-ui/commit/6410c03dd12077f25347dddb249b6a6700186abc))
|
|
15
22
|
|
|
16
23
|
|
|
17
24
|
### Features
|
|
18
25
|
|
|
19
|
-
*
|
|
20
|
-
* **
|
|
26
|
+
* **list:** improve screen reader ([0bc3a8c](https://github.com/Refinitiv/refinitiv-ui/commit/0bc3a8c9c4051200cd1a5c8ed655d1d3ebbd9021))
|
|
27
|
+
* **select:** improve screen reader support ([#80](https://github.com/Refinitiv/refinitiv-ui/issues/80)) ([a43fbcd](https://github.com/Refinitiv/refinitiv-ui/commit/a43fbcd4b23b2f508ddc94b8007913f66da1ae89))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [5.7.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.6.0...@refinitiv-ui/elements@5.7.0) (2021-11-22)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
21
37
|
|
|
38
|
+
* **tree:** correctly update dependant checked states ([#82](https://github.com/Refinitiv/refinitiv-ui/issues/82)) ([fdb7018](https://github.com/Refinitiv/refinitiv-ui/commit/fdb7018f9446f933f428448ada60f4a8cacc1acf))
|
|
22
39
|
|
|
23
40
|
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* **item:** improve screen reader support ([#74](https://github.com/Refinitiv/refinitiv-ui/issues/74)) ([b14b950](https://github.com/Refinitiv/refinitiv-ui/commit/b14b950897cb96cdc957e12d93b510cc4361c4f3))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# [5.6.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.5.0...@refinitiv-ui/elements@5.6.0) (2021-11-08)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* **datetime-picker:** values are not update synchronously ([#59](https://github.com/Refinitiv/refinitiv-ui/issues/59)) ([55500a3](https://github.com/Refinitiv/refinitiv-ui/commit/55500a30f4daab1110d7664b6c244dd2b83995cb))
|
|
55
|
+
* incorrect tap behaviour ([#57](https://github.com/Refinitiv/refinitiv-ui/issues/57)) ([a245fbe](https://github.com/Refinitiv/refinitiv-ui/commit/a245fbe1999057de0525313e35d5156cc497135f))
|
|
56
|
+
* **multi-input:** only focus input on click clear button ([#64](https://github.com/Refinitiv/refinitiv-ui/issues/64)) ([214452a](https://github.com/Refinitiv/refinitiv-ui/commit/214452ac02f77c91090226597c2c02e95fc3d084))
|
|
57
|
+
* **tree-select:** update selectAll condition when search no match ([#53](https://github.com/Refinitiv/refinitiv-ui/issues/53)) ([c3b5e46](https://github.com/Refinitiv/refinitiv-ui/commit/c3b5e461bdf56ad9d17ae921d1c5f980d44754ac))
|
|
24
58
|
|
|
25
59
|
|
|
26
|
-
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
* **button:** improve accessibility for screen readers ([#33](https://github.com/Refinitiv/refinitiv-ui/issues/33)) ([89f2e19](https://github.com/Refinitiv/refinitiv-ui/commit/89f2e19f631257e5572d2c74cf7449f9be265aca))
|
|
63
|
+
* **checkbox:** improve accessibility for screen readers ([#37](https://github.com/Refinitiv/refinitiv-ui/issues/37)) ([93509d0](https://github.com/Refinitiv/refinitiv-ui/commit/93509d0ec801b880b9bf68013d83c140075c59dd))
|
|
64
|
+
* **clock:** small analogue clock face ([#54](https://github.com/Refinitiv/refinitiv-ui/issues/54)) ([bc4b2a8](https://github.com/Refinitiv/refinitiv-ui/commit/bc4b2a816135ef70819d826d15ba9b36dda99207))
|
|
65
|
+
* **core:** add latest lit directives, add focused-changed event ([69168f6](https://github.com/Refinitiv/refinitiv-ui/commit/69168f6fe3e6eea8e9abb2a875a2f283eb06d42b))
|
|
66
|
+
* **icon:** support icon names and icon urls ([6d3a92d](https://github.com/Refinitiv/refinitiv-ui/commit/6d3a92db329c5198d56aeed4a1944ef3d0e29f1d))
|
|
67
|
+
* Lit@2 upgrade ([dbda63b](https://github.com/Refinitiv/refinitiv-ui/commit/dbda63be97257f891cb1f2c5ff46b638c70e0b15))
|
|
68
|
+
* **radio-button:** improve radio button accessibility ([#43](https://github.com/Refinitiv/refinitiv-ui/issues/43)) ([12d2b23](https://github.com/Refinitiv/refinitiv-ui/commit/12d2b238c988e880d8055afe280cfb93ace6dd51))
|
|
69
|
+
* **text-field:** improve screen reader support ([#65](https://github.com/Refinitiv/refinitiv-ui/issues/65)) ([65bfa44](https://github.com/Refinitiv/refinitiv-ui/commit/65bfa4404bb4b462f20163c733b75fd509485b1b))
|
|
70
|
+
* **toggle:** improve accessibility for screen readers ([#42](https://github.com/Refinitiv/refinitiv-ui/issues/42)) ([7554471](https://github.com/Refinitiv/refinitiv-ui/commit/755447104777606247bb06bfba5e97accb893ccf))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Performance Improvements
|
|
74
|
+
|
|
75
|
+
* **icon:** cache svg template results ([463c6ba](https://github.com/Refinitiv/refinitiv-ui/commit/463c6ba1f0403aa25605fd363ac863159ee4c492))
|
|
76
|
+
* **list:** check before positioning element in dom ([244b44f](https://github.com/Refinitiv/refinitiv-ui/commit/244b44fba553e1f40e0a55ecda93e7d943b13994))
|
|
77
|
+
* **tree:** reduce calculations for visible items ([c231f06](https://github.com/Refinitiv/refinitiv-ui/commit/c231f06a1a4a901bafefdee7dcc1e009a7902ac5))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# [5.5.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@5.3.3...@refinitiv-ui/elements@5.5.0) (2021-10-25)
|
|
27
84
|
|
|
28
85
|
|
|
29
86
|
### Bug Fixes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ef-accordion
|
|
2
|
+
|
|
3
|
+
Used to display a group of `Collapse` control.
|
|
4
|
+
Only one item will be able to expand by default but you can customize its behavior.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|------------------------|--------------------------|-----------|---------|--------------------------------------------------|
|
|
10
|
+
| `autoCollapseDisabled` | `auto-collapse-disabled` | `boolean` | false | Allow multiple sections expand at the same time |
|
|
11
|
+
| `spacing` | `spacing` | `boolean` | false | Add spacing to content section in all collapse items |
|
|
12
|
+
|
|
13
|
+
## Slots
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|----------------|--------------------------------------------------|
|
|
17
|
+
| `header-left` | Slot to add custom contents to the left side of header e.g. ef-icon, ef-checkbox |
|
|
18
|
+
| `header-right` | Slot to add custom contents to the right side of header e.g. ef-icon, ef-checkbox |
|
package/lib/accordion/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { PropertyValues, TemplateResult,
|
|
3
|
-
import { Collapse } from '../collapse';
|
|
2
|
+
import { PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
|
|
3
|
+
import { Collapse } from '../collapse/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Used to display a group of `Collapse` control.
|
|
6
6
|
* Only one item will be able to expand by default but you can customize its behavior.
|
|
@@ -16,12 +16,12 @@ export declare class Accordion extends Collapse {
|
|
|
16
16
|
*/
|
|
17
17
|
static get version(): string;
|
|
18
18
|
/**
|
|
19
|
-
* A `
|
|
19
|
+
* A `CSSResultGroup` that will be used
|
|
20
20
|
* to style the host, slotted children
|
|
21
21
|
* and the internal template of the element.
|
|
22
|
-
* @return
|
|
22
|
+
* @return CSS template
|
|
23
23
|
*/
|
|
24
|
-
static get styles():
|
|
24
|
+
static get styles(): CSSResultGroup;
|
|
25
25
|
/**
|
|
26
26
|
* Allow multiple sections expand at the same time
|
|
27
27
|
*/
|
package/lib/accordion/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
9
|
-
import { Collapse } from '../collapse';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../version.js';
|
|
6
|
+
import { Collapse } from '../collapse/index.js';
|
|
10
7
|
/**
|
|
11
8
|
* Finds closest accordion parent of element.
|
|
12
9
|
* Created, because IE11 doesn't support closest() method.
|
|
@@ -72,10 +69,10 @@ let Accordion = class Accordion extends Collapse {
|
|
|
72
69
|
return VERSION;
|
|
73
70
|
}
|
|
74
71
|
/**
|
|
75
|
-
* A `
|
|
72
|
+
* A `CSSResultGroup` that will be used
|
|
76
73
|
* to style the host, slotted children
|
|
77
74
|
* and the internal template of the element.
|
|
78
|
-
* @return
|
|
75
|
+
* @return CSS template
|
|
79
76
|
*/
|
|
80
77
|
static get styles() {
|
|
81
78
|
return css `
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ef-appstate-bar
|
|
2
|
+
|
|
3
|
+
Used to display at the top of application to provide a status or information.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-----------|-----------|---------------------------------|---------|--------------------------------------------------|
|
|
9
|
+
| `heading` | `heading` | `string` | "" | Text to display in heading section. |
|
|
10
|
+
| `state` | `state` | `"info" \| "highlight" \| null` | null | (optional) Type of state bar. Supported value are `info`, `highlight`. |
|
|
11
|
+
|
|
12
|
+
## Events
|
|
13
|
+
|
|
14
|
+
| Event | Description |
|
|
15
|
+
|---------|------------------------------------|
|
|
16
|
+
| `clear` | fired when clear button is clicked |
|
|
17
|
+
|
|
18
|
+
## Slots
|
|
19
|
+
|
|
20
|
+
| Name | Description |
|
|
21
|
+
|---------|-------------------------------------------|
|
|
22
|
+
| `right` | place custom content on the right of bar. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
3
|
-
import '../icon';
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../icon/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Used to display at the top of application to provide a status or information.
|
|
6
6
|
* @slot right - place custom content on the right of bar.
|
|
@@ -14,13 +14,13 @@ export declare class AppstateBar extends BasicElement {
|
|
|
14
14
|
*/
|
|
15
15
|
static get version(): string;
|
|
16
16
|
/**
|
|
17
|
-
* A `
|
|
17
|
+
* A `CSSResultGroup` that will be used
|
|
18
18
|
* to style the host, slotted children
|
|
19
19
|
* and the internal template of the element.
|
|
20
20
|
*
|
|
21
|
-
* @returns
|
|
21
|
+
* @returns CSS template
|
|
22
22
|
*/
|
|
23
|
-
static get styles():
|
|
23
|
+
static get styles(): CSSResultGroup;
|
|
24
24
|
/**
|
|
25
25
|
* Text to display in heading section.
|
|
26
26
|
*/
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { BasicElement, html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
9
|
-
import '../icon';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../version.js';
|
|
6
|
+
import '../icon/index.js';
|
|
10
7
|
/**
|
|
11
8
|
* Used to display at the top of application to provide a status or information.
|
|
12
9
|
* @slot right - place custom content on the right of bar.
|
|
@@ -50,11 +47,11 @@ let AppstateBar = class AppstateBar extends BasicElement {
|
|
|
50
47
|
return VERSION;
|
|
51
48
|
}
|
|
52
49
|
/**
|
|
53
|
-
* A `
|
|
50
|
+
* A `CSSResultGroup` that will be used
|
|
54
51
|
* to style the host, slotted children
|
|
55
52
|
* and the internal template of the element.
|
|
56
53
|
*
|
|
57
|
-
* @returns
|
|
54
|
+
* @returns CSS template
|
|
58
55
|
*/
|
|
59
56
|
static get styles() {
|
|
60
57
|
return css `
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"name": "more-search-text",
|
|
27
27
|
"description": "Custom text for More Search",
|
|
28
28
|
"type": "string",
|
|
29
|
-
"default": "\"
|
|
29
|
+
"default": "\"More results for {0}\""
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"name": "loading",
|
|
@@ -50,10 +50,20 @@
|
|
|
50
50
|
"name": "opened",
|
|
51
51
|
"description": "Auto suggest popup's open state",
|
|
52
52
|
"type": "boolean",
|
|
53
|
-
"default": "
|
|
53
|
+
"default": "false"
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
"properties": [
|
|
57
|
+
{
|
|
58
|
+
"name": "defaultDebounceRate (readonly)",
|
|
59
|
+
"type": "100",
|
|
60
|
+
"default": "100"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "defaultMoreSearchText (readonly)",
|
|
64
|
+
"type": "\"More results for {0}\"",
|
|
65
|
+
"default": "\"More results for {0}\""
|
|
66
|
+
},
|
|
57
67
|
{
|
|
58
68
|
"name": "attach",
|
|
59
69
|
"attribute": "attach",
|
|
@@ -79,7 +89,7 @@
|
|
|
79
89
|
"attribute": "more-search-text",
|
|
80
90
|
"description": "Custom text for More Search",
|
|
81
91
|
"type": "string",
|
|
82
|
-
"default": "\"
|
|
92
|
+
"default": "\"More results for {0}\""
|
|
83
93
|
},
|
|
84
94
|
{
|
|
85
95
|
"name": "loading",
|
|
@@ -130,7 +140,7 @@
|
|
|
130
140
|
"attribute": "opened",
|
|
131
141
|
"description": "Auto suggest popup's open state",
|
|
132
142
|
"type": "boolean",
|
|
133
|
-
"default": "
|
|
143
|
+
"default": "false"
|
|
134
144
|
}
|
|
135
145
|
],
|
|
136
146
|
"events": [
|
|
@@ -167,6 +177,16 @@
|
|
|
167
177
|
"description": "Fired when suggestions changed"
|
|
168
178
|
}
|
|
169
179
|
],
|
|
180
|
+
"slots": [
|
|
181
|
+
{
|
|
182
|
+
"name": "header",
|
|
183
|
+
"description": "Slot to add custom contents at the top of autosuggest popup"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "footer",
|
|
187
|
+
"description": "Slot to add custom contents at the bottom of autosuggest popup"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
170
190
|
"methods": [
|
|
171
191
|
{
|
|
172
192
|
"name": "onInputValueChange",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# ef-autosuggest
|
|
2
|
+
|
|
3
|
+
Shows suggestions based on users' query.
|
|
4
|
+
It can be used by attaching to text form control
|
|
5
|
+
such as TextField, Multi Input, etc.
|
|
6
|
+
Autosuggest supports various use cases such as
|
|
7
|
+
custom rendering, pagination, asynchronous data request, etc.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Attribute | Type | Default | Description |
|
|
12
|
+
|------------------|--------------------|----------------------------------------------|------------------------|--------------------------------------------------|
|
|
13
|
+
| `attach` | `attach` | `AutosuggestTargetElement \| string \| null` | null | An HTML Element or CSS selector |
|
|
14
|
+
| `debounceRate` | `debounce-rate` | `number` | "100" | Debounce rate in ms of the filter as a number.<br />Used to throttle the filter rate so as not to trigger unneeded filtering |
|
|
15
|
+
| `highlightable` | | `AutosuggestHighlightable` | "itemHighlightable" | A function that is applied to every suggestion during the render process<br />to say whether the item can be highlighted and selected. Only items that return true are considered.<br />By default the function checks for `item` `highlightable` property. |
|
|
16
|
+
| `htmlRenderer` | `html-renderer` | `boolean` | false | If set to true, the render function is not called. Instead the wrapper element<br />should populate and destroy suggestion elements. Rendering items manually<br />may have performance benefits in frameworks that use virtual DOM (such as `Vue`, `React`, `hyperHTML` and others) |
|
|
17
|
+
| `loading` | `loading` | `boolean` | false | If set to true show loading mask |
|
|
18
|
+
| `moreResults` | `more-results` | `boolean` | false | If set to true display 'Has more results' item |
|
|
19
|
+
| `moreSearchText` | `more-search-text` | `string` | "More results for {0}" | Custom text for More Search |
|
|
20
|
+
| `opened` | `opened` | `boolean` | false | Auto suggest popup's open state |
|
|
21
|
+
| `query` | | `AutosuggestQuery \| null` | null | An object that represents a query from attach target |
|
|
22
|
+
| `renderer` | | `AutosuggestRenderer` | "itemRenderer" | A renderer applied to suggestion.<br />By default a render maps data to item attributes |
|
|
23
|
+
| `requestOnFocus` | `request-on-focus` | `boolean` | false | Request suggestions when attach target is focused |
|
|
24
|
+
| `suggestions` | | `AutosuggestItem[]` | [] | A list of suggestion items |
|
|
25
|
+
|
|
26
|
+
## Methods
|
|
27
|
+
|
|
28
|
+
| Method | Type | Description |
|
|
29
|
+
|----------------------|----------------------|--------------------------------------------------|
|
|
30
|
+
| `onInputBlur` | `(event: any): void` | Run when input has lost focus<br /><br />**event**: by default `blur` event is listened |
|
|
31
|
+
| `onInputFocus` | `(event: any): void` | Run when input received focus<br /><br />**event**: by default `focus` event is listened |
|
|
32
|
+
| `onInputKeyDown` | `(event: any): void` | Run when input key down event has happened<br /><br />**event**: by default `keydown` event is listened |
|
|
33
|
+
| `onInputValueChange` | `(event: any): void` | Run when attach target value changes.<br /><br />**event**: by default `value-changed` event is listened |
|
|
34
|
+
| `refit` | `(): void` | Set the width |
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Event | Description |
|
|
39
|
+
|-------------------------------|--------------------------------------------------|
|
|
40
|
+
| `add-attach-target-events` | Fired when attach has been set |
|
|
41
|
+
| `item-highlight` | Fired when an item gets highlighted or highlight is removed |
|
|
42
|
+
| `item-select` | Fired when an item gets selected |
|
|
43
|
+
| `remove-attach-target-events` | Fired when attach has been removed |
|
|
44
|
+
| `suggestions-changed` | Fired when suggestions changed |
|
|
45
|
+
| `suggestions-clear-requested` | Fired when auto suggest requests to clear the data. If used in reactive application, prevent default and set suggestions to [] |
|
|
46
|
+
| `suggestions-fetch-requested` | Fired when auto suggest requests the data |
|
|
47
|
+
| `suggestions-query` | Fired when input value has changed and the query must be set |
|
|
48
|
+
|
|
49
|
+
## Slots
|
|
50
|
+
|
|
51
|
+
| Name | Description |
|
|
52
|
+
|----------|--------------------------------------------------|
|
|
53
|
+
| `footer` | Slot to add custom contents at the bottom of autosuggest popup |
|
|
54
|
+
| `header` | Slot to add custom contents at the top of autosuggest popup |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Item } from '../../item';
|
|
2
|
-
import { AutosuggestHighlightable, AutosuggestRenderer } from './types';
|
|
1
|
+
import type { Item } from '../../item';
|
|
2
|
+
import type { AutosuggestHighlightable, AutosuggestRenderer } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Check whether item can be highlighted
|
|
5
5
|
* @param suggestion Suggestion object
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Item } from '../../item';
|
|
2
1
|
/**
|
|
3
2
|
* Check whether item can be highlighted
|
|
4
3
|
* @param suggestion Suggestion object
|
|
@@ -54,7 +53,7 @@ export const updateElementContent = (el, query, label, value) => {
|
|
|
54
53
|
* @returns item
|
|
55
54
|
*/
|
|
56
55
|
export const itemRenderer = (suggestion, query) => {
|
|
57
|
-
const el =
|
|
56
|
+
const el = document.createElement('ef-item');
|
|
58
57
|
if (typeof suggestion === 'object') {
|
|
59
58
|
const { type, label, title, icon, disabled, value } = suggestion;
|
|
60
59
|
el.type = type || null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '../
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
export {
|
|
2
|
+
import { CSSResultGroup, ElementSize, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, AutosuggestSelectItemEvent, AutosuggestHighlightItemEvent } from './helpers/types';
|
|
4
|
+
import { Overlay } from '../overlay/index.js';
|
|
5
|
+
import '../loader/index.js';
|
|
6
|
+
import '../item/index.js';
|
|
7
|
+
export type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem } from './helpers/types';
|
|
8
|
+
export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils.js';
|
|
8
9
|
/**
|
|
9
10
|
* Shows suggestions based on users' query.
|
|
10
11
|
* It can be used by attaching to text form control
|
|
@@ -23,6 +24,9 @@ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateE
|
|
|
23
24
|
*
|
|
24
25
|
* @attr {boolean} opened - Set to open auto suggest popup
|
|
25
26
|
* @prop {boolean} [opened=false] - Auto suggest popup's open state
|
|
27
|
+
*
|
|
28
|
+
* @slot header - Slot to add custom contents at the top of autosuggest popup
|
|
29
|
+
* @slot footer - Slot to add custom contents at the bottom of autosuggest popup
|
|
26
30
|
*/
|
|
27
31
|
export declare class Autosuggest extends Overlay {
|
|
28
32
|
/**
|
|
@@ -31,12 +35,12 @@ export declare class Autosuggest extends Overlay {
|
|
|
31
35
|
*/
|
|
32
36
|
static get version(): string;
|
|
33
37
|
/**
|
|
34
|
-
* A `
|
|
38
|
+
* A `CSSResultGroup` that will be used
|
|
35
39
|
* to style the host, slotted children
|
|
36
40
|
* and the internal template of the element.
|
|
37
41
|
* @return CSS template
|
|
38
42
|
*/
|
|
39
|
-
static get styles():
|
|
43
|
+
static get styles(): CSSResultGroup;
|
|
40
44
|
/**
|
|
41
45
|
* A basic regexp matching pattern to replace text based on string input.
|
|
42
46
|
* @param text Value to test against
|
|
@@ -82,6 +86,7 @@ export declare class Autosuggest extends Overlay {
|
|
|
82
86
|
moreResults: boolean;
|
|
83
87
|
/**
|
|
84
88
|
* Custom text for More Search
|
|
89
|
+
* @default More results for {0}
|
|
85
90
|
*/
|
|
86
91
|
moreSearchText: string;
|
|
87
92
|
/**
|
package/lib/autosuggest/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
var Autosuggest_1;
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import '
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { VERSION } from '../';
|
|
15
|
-
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import { css, html } from '@refinitiv-ui/core';
|
|
4
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
7
|
+
import { unsafeHTML } from '@refinitiv-ui/core/lib/directives/unsafe-html.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
|
+
import { AnimationTaskRunner, TimeoutTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
10
|
+
import { escapeRegExp, itemHighlightable, itemRenderer, queryWordSelect } from './helpers/utils.js';
|
|
11
|
+
import { isIE, isMobile } from '@refinitiv-ui/utils/lib/browser.js';
|
|
12
|
+
import { Overlay } from '../overlay/index.js';
|
|
13
|
+
import '../loader/index.js';
|
|
14
|
+
import '../item/index.js';
|
|
15
|
+
export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateElementContent } from './helpers/utils.js';
|
|
16
16
|
/**
|
|
17
17
|
* Shows suggestions based on users' query.
|
|
18
18
|
* It can be used by attaching to text form control
|
|
@@ -31,6 +31,9 @@ export { queryWordSelect, itemRenderer, escapeRegExp, itemHighlightable, updateE
|
|
|
31
31
|
*
|
|
32
32
|
* @attr {boolean} opened - Set to open auto suggest popup
|
|
33
33
|
* @prop {boolean} [opened=false] - Auto suggest popup's open state
|
|
34
|
+
*
|
|
35
|
+
* @slot header - Slot to add custom contents at the top of autosuggest popup
|
|
36
|
+
* @slot footer - Slot to add custom contents at the bottom of autosuggest popup
|
|
34
37
|
*/
|
|
35
38
|
let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
36
39
|
/**
|
|
@@ -53,6 +56,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
53
56
|
this.moreResults = false;
|
|
54
57
|
/**
|
|
55
58
|
* Custom text for More Search
|
|
59
|
+
* @default More results for {0}
|
|
56
60
|
*/
|
|
57
61
|
this.moreSearchText = Autosuggest_1.defaultMoreSearchText;
|
|
58
62
|
/**
|
|
@@ -267,28 +271,31 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
267
271
|
return VERSION;
|
|
268
272
|
}
|
|
269
273
|
/**
|
|
270
|
-
* A `
|
|
274
|
+
* A `CSSResultGroup` that will be used
|
|
271
275
|
* to style the host, slotted children
|
|
272
276
|
* and the internal template of the element.
|
|
273
277
|
* @return CSS template
|
|
274
278
|
*/
|
|
275
279
|
static get styles() {
|
|
276
|
-
return [
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
280
|
+
return [
|
|
281
|
+
super.styles,
|
|
282
|
+
css `
|
|
283
|
+
:host {
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
display: flex;
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
}
|
|
288
|
+
[part=content] {
|
|
289
|
+
flex: 1 1 auto;
|
|
290
|
+
overflow-x: hidden;
|
|
291
|
+
overflow-y: auto;
|
|
292
|
+
-webkit-overflow-scrolling: touch;
|
|
293
|
+
}
|
|
294
|
+
[part=header], [part=footer] {
|
|
295
|
+
flex: none;
|
|
296
|
+
}
|
|
297
|
+
`
|
|
298
|
+
];
|
|
292
299
|
}
|
|
293
300
|
/**
|
|
294
301
|
* A basic regexp matching pattern to replace text based on string input.
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"name": "disabled",
|
|
50
50
|
"description": "Set state to disabled",
|
|
51
51
|
"type": "boolean",
|
|
52
|
-
"default": "
|
|
52
|
+
"default": "false"
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"properties": [
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"attribute": "disabled",
|
|
106
106
|
"description": "Set state to disabled",
|
|
107
107
|
"type": "boolean",
|
|
108
|
-
"default": "
|
|
108
|
+
"default": "false"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
111
|
"events": [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ef-button
|
|
2
|
+
|
|
3
|
+
Use button for actions in forms, dialogs,
|
|
4
|
+
and more with support for different states and styles.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------|---------------|-----------------------|---------|--------------------------------------------------|
|
|
10
|
+
| `active` | `active` | `boolean` | false | An active or inactive state, can only be used with toggles property/attribute |
|
|
11
|
+
| `cta` | `cta` | `boolean` | false | Set state to call-to-action |
|
|
12
|
+
| `disabled` | `disabled` | `boolean` | false | Set state to disabled |
|
|
13
|
+
| `hoverIcon` | `hover-icon` | `string \| null` | null | Specify icon to display when hovering. Value can be icon name |
|
|
14
|
+
| `icon` | `icon` | `string \| null` | null | Specify icon to display in button. Value can be icon name |
|
|
15
|
+
| `textpos` | `textpos` | `"before" \| "after"` | "after" | Customises text alignment when specified alongside `icon` property<br />Value can be `before` or `after` |
|
|
16
|
+
| `toggles` | `toggles` | `boolean` | false | Enable or disable ability to be toggled |
|
|
17
|
+
| `transparent` | `transparent` | `boolean` | false | Removes background when specified alongside `icon` property |
|
|
18
|
+
|
|
19
|
+
## Events
|
|
20
|
+
|
|
21
|
+
| Event | Description |
|
|
22
|
+
|------------------|--------------------------------------------------|
|
|
23
|
+
| `active-changed` | Dispatched on changing `active` property state by taping on button when property `toggles` is true. |
|