@refinitiv-ui/elements 6.9.0-next.0 → 6.9.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.
- package/CHANGELOG.md +218 -380
- package/LICENSE +1 -1
- package/README.md +12 -10
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +4 -7
- package/lib/accordion/themes/halo/dark/index.js +0 -1
- package/lib/accordion/themes/halo/light/index.js +0 -1
- package/lib/accordion/themes/solar/charcoal/index.js +0 -1
- package/lib/accordion/themes/solar/pearl/index.js +0 -1
- package/lib/appstate-bar/index.d.ts +2 -2
- package/lib/appstate-bar/index.js +10 -4
- package/lib/appstate-bar/themes/halo/dark/index.js +0 -1
- package/lib/appstate-bar/themes/halo/light/index.js +0 -1
- package/lib/appstate-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/appstate-bar/themes/solar/pearl/index.js +0 -1
- package/lib/autosuggest/index.d.ts +7 -7
- package/lib/autosuggest/index.js +89 -84
- package/lib/autosuggest/themes/halo/dark/index.js +0 -1
- package/lib/autosuggest/themes/halo/light/index.js +0 -1
- package/lib/autosuggest/themes/solar/charcoal/index.js +1 -2
- package/lib/autosuggest/themes/solar/pearl/index.js +1 -2
- package/lib/button/index.js +7 -10
- package/lib/button/themes/halo/dark/index.js +0 -1
- package/lib/button/themes/halo/light/index.js +0 -1
- package/lib/button/themes/solar/charcoal/index.js +0 -1
- package/lib/button/themes/solar/pearl/index.js +0 -1
- package/lib/button-bar/index.d.ts +1 -1
- package/lib/button-bar/index.js +12 -12
- package/lib/button-bar/themes/halo/dark/index.js +0 -1
- package/lib/button-bar/themes/halo/light/index.js +0 -1
- package/lib/button-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/button-bar/themes/solar/pearl/index.js +0 -1
- package/lib/calendar/index.d.ts +39 -39
- package/lib/calendar/index.js +165 -132
- package/lib/calendar/themes/halo/dark/index.js +0 -1
- package/lib/calendar/themes/halo/light/index.js +0 -1
- package/lib/calendar/themes/solar/charcoal/index.js +0 -1
- package/lib/calendar/themes/solar/pearl/index.js +0 -1
- package/lib/calendar/utils.js +2 -2
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +2 -4
- package/lib/canvas/themes/halo/dark/index.js +0 -1
- package/lib/canvas/themes/halo/light/index.js +0 -1
- package/lib/canvas/themes/solar/charcoal/index.js +0 -1
- package/lib/canvas/themes/solar/pearl/index.js +0 -1
- package/lib/card/helpers/types.d.ts +2 -2
- package/lib/card/index.d.ts +5 -5
- package/lib/card/index.js +34 -28
- package/lib/card/themes/halo/dark/index.js +0 -1
- package/lib/card/themes/halo/light/index.js +0 -1
- package/lib/card/themes/solar/charcoal/index.js +0 -1
- package/lib/card/themes/solar/pearl/index.js +0 -1
- package/lib/chart/helpers/legend.js +10 -8
- package/lib/chart/index.d.ts +3 -3
- package/lib/chart/index.js +17 -17
- package/lib/chart/plugins/doughnut-center-label.js +7 -6
- package/lib/chart/themes/halo/dark/index.js +0 -1
- package/lib/chart/themes/halo/light/index.js +0 -1
- package/lib/chart/themes/solar/charcoal/index.js +0 -1
- package/lib/chart/themes/solar/pearl/index.js +0 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +12 -13
- package/lib/checkbox/themes/halo/dark/index.js +0 -1
- package/lib/checkbox/themes/halo/light/index.js +0 -1
- package/lib/checkbox/themes/solar/charcoal/index.js +0 -1
- package/lib/checkbox/themes/solar/pearl/index.js +0 -1
- package/lib/clock/index.d.ts +55 -55
- package/lib/clock/index.js +84 -95
- package/lib/clock/themes/halo/dark/index.js +1 -2
- package/lib/clock/themes/halo/light/index.js +1 -2
- package/lib/clock/themes/solar/charcoal/index.js +1 -2
- package/lib/clock/themes/solar/pearl/index.js +1 -2
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +28 -19
- package/lib/collapse/themes/halo/dark/index.js +1 -2
- package/lib/collapse/themes/halo/light/index.js +1 -2
- package/lib/collapse/themes/solar/charcoal/index.js +0 -1
- package/lib/collapse/themes/solar/pearl/index.js +0 -1
- package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/color-palettes.js +5 -6
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
- package/lib/color-dialog/elements/palettes.js +5 -4
- package/lib/color-dialog/helpers/value-model.js +7 -9
- package/lib/color-dialog/index.d.ts +6 -6
- package/lib/color-dialog/index.js +53 -37
- package/lib/color-dialog/themes/halo/dark/index.js +0 -1
- package/lib/color-dialog/themes/halo/light/index.js +0 -1
- package/lib/color-dialog/themes/solar/charcoal/index.js +0 -1
- package/lib/color-dialog/themes/solar/pearl/index.js +0 -1
- package/lib/color-picker/index.d.ts +2 -2
- package/lib/color-picker/index.js +40 -34
- package/lib/color-picker/themes/halo/dark/index.js +0 -1
- package/lib/color-picker/themes/halo/light/index.js +0 -1
- package/lib/color-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/color-picker/themes/solar/pearl/index.js +0 -1
- package/lib/combo-box/helpers/filter.d.ts +2 -2
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -9
- package/lib/combo-box/index.js +61 -55
- package/lib/combo-box/themes/halo/dark/index.js +0 -1
- package/lib/combo-box/themes/halo/light/index.js +0 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +0 -1
- package/lib/combo-box/themes/solar/pearl/index.js +0 -1
- package/lib/configuration/custom-elements.json +15 -0
- package/lib/configuration/custom-elements.md +7 -0
- package/lib/{config/elements/config.d.ts → configuration/elements/configuration.d.ts} +14 -7
- package/lib/{config/elements/config.js → configuration/elements/configuration.js} +17 -15
- package/lib/configuration/helpers/context.d.ts +5 -0
- package/lib/configuration/helpers/context.js +3 -0
- package/lib/{config/helpers/context.d.ts → configuration/helpers/types.d.ts} +0 -3
- package/lib/configuration/helpers/types.js +1 -0
- package/lib/configuration/index.d.ts +3 -0
- package/lib/{config → configuration}/index.js +1 -1
- package/lib/counter/index.d.ts +4 -4
- package/lib/counter/index.js +9 -7
- package/lib/counter/themes/halo/dark/index.js +0 -1
- package/lib/counter/themes/halo/light/index.js +0 -1
- package/lib/counter/themes/solar/charcoal/index.js +0 -1
- package/lib/counter/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-field/index.d.ts +4 -5
- package/lib/datetime-field/index.js +32 -23
- package/lib/datetime-field/themes/halo/dark/index.js +0 -1
- package/lib/datetime-field/themes/halo/light/index.js +0 -1
- package/lib/datetime-field/themes/solar/charcoal/index.js +0 -1
- package/lib/datetime-field/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-field/utils.js +11 -1
- package/lib/datetime-picker/index.d.ts +75 -75
- package/lib/datetime-picker/index.js +154 -135
- package/lib/datetime-picker/locales.js +5 -5
- package/lib/datetime-picker/themes/halo/dark/index.js +0 -1
- package/lib/datetime-picker/themes/halo/light/index.js +0 -1
- package/lib/datetime-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-picker/utils.js +9 -9
- package/lib/dialog/custom-elements.json +0 -11
- package/lib/dialog/custom-elements.md +3 -4
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +7 -7
- package/lib/dialog/index.js +48 -38
- package/lib/dialog/themes/halo/dark/index.js +0 -1
- package/lib/dialog/themes/halo/light/index.js +0 -1
- package/lib/dialog/themes/solar/charcoal/index.js +0 -1
- package/lib/dialog/themes/solar/pearl/index.js +0 -1
- package/lib/email-field/index.d.ts +1 -1
- package/lib/email-field/index.js +6 -6
- package/lib/email-field/themes/halo/dark/index.js +0 -1
- package/lib/email-field/themes/halo/light/index.js +0 -1
- package/lib/email-field/themes/solar/charcoal/index.js +0 -1
- package/lib/email-field/themes/solar/pearl/index.js +0 -1
- package/lib/events.d.ts +1 -1
- package/lib/flag/custom-elements.json +0 -12
- package/lib/flag/custom-elements.md +0 -3
- package/lib/flag/index.d.ts +12 -8
- package/lib/flag/index.js +20 -12
- package/lib/flag/themes/halo/dark/index.js +0 -1
- package/lib/flag/themes/halo/light/index.js +0 -1
- package/lib/flag/themes/solar/charcoal/index.js +0 -1
- package/lib/flag/themes/solar/pearl/index.js +0 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +1 -1
- package/lib/header/index.js +2 -2
- package/lib/header/themes/halo/dark/index.js +1 -2
- package/lib/header/themes/halo/light/index.js +1 -2
- package/lib/header/themes/solar/charcoal/index.js +1 -2
- package/lib/header/themes/solar/pearl/index.js +1 -2
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +11 -5
- package/lib/heatmap/helpers/track.js +3 -3
- package/lib/heatmap/helpers/types.d.ts +10 -10
- package/lib/heatmap/index.d.ts +9 -9
- package/lib/heatmap/index.js +104 -65
- package/lib/heatmap/themes/halo/dark/index.js +0 -1
- package/lib/heatmap/themes/halo/light/index.js +0 -1
- package/lib/heatmap/themes/solar/charcoal/index.js +0 -1
- package/lib/heatmap/themes/solar/pearl/index.js +0 -1
- package/lib/icon/custom-elements.json +0 -13
- package/lib/icon/custom-elements.md +0 -1
- package/lib/icon/index.d.ts +16 -6
- package/lib/icon/index.js +22 -11
- package/lib/icon/themes/halo/dark/index.js +0 -1
- package/lib/icon/themes/halo/light/index.js +0 -1
- package/lib/icon/themes/solar/charcoal/index.js +0 -1
- package/lib/icon/themes/solar/pearl/index.js +0 -1
- package/lib/icon/utils/IconLoader.d.ts +1 -0
- package/lib/icon/utils/IconLoader.js +9 -1
- package/lib/interactive-chart/custom-elements.json +5 -0
- package/lib/interactive-chart/custom-elements.md +1 -0
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +40 -36
- package/lib/interactive-chart/index.js +78 -59
- package/lib/interactive-chart/themes/halo/dark/index.js +0 -1
- package/lib/interactive-chart/themes/halo/light/index.js +0 -1
- package/lib/interactive-chart/themes/solar/charcoal/index.js +0 -1
- package/lib/interactive-chart/themes/solar/pearl/index.js +0 -1
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +3 -3
- package/lib/item/index.js +24 -20
- package/lib/item/themes/halo/dark/index.js +0 -1
- package/lib/item/themes/halo/light/index.js +0 -1
- package/lib/item/themes/solar/charcoal/index.js +0 -1
- package/lib/item/themes/solar/pearl/index.js +0 -1
- package/lib/jsx.d.ts +6 -4
- package/lib/label/index.d.ts +1 -1
- package/lib/label/index.js +11 -8
- package/lib/label/themes/halo/dark/index.js +0 -1
- package/lib/label/themes/halo/light/index.js +0 -1
- package/lib/label/themes/solar/charcoal/index.js +0 -1
- package/lib/label/themes/solar/pearl/index.js +0 -1
- package/lib/layout/index.d.ts +7 -7
- package/lib/layout/index.js +7 -7
- package/lib/layout/themes/halo/dark/index.js +0 -1
- package/lib/layout/themes/halo/light/index.js +0 -1
- package/lib/layout/themes/solar/charcoal/index.js +0 -1
- package/lib/layout/themes/solar/pearl/index.js +0 -1
- package/lib/led-gauge/index.d.ts +1 -1
- package/lib/led-gauge/index.js +10 -10
- package/lib/led-gauge/themes/halo/dark/index.js +0 -1
- package/lib/led-gauge/themes/halo/light/index.js +0 -1
- package/lib/led-gauge/themes/solar/charcoal/index.js +0 -1
- package/lib/led-gauge/themes/solar/pearl/index.js +0 -1
- package/lib/list/elements/list.d.ts +3 -3
- package/lib/list/elements/list.js +10 -12
- package/lib/list/helpers/renderer.js +2 -2
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/renderer.d.ts +7 -7
- package/lib/list/themes/halo/dark/index.js +0 -2
- package/lib/list/themes/halo/light/index.js +0 -2
- package/lib/list/themes/solar/charcoal/index.js +0 -2
- package/lib/list/themes/solar/pearl/index.js +0 -2
- package/lib/loader/index.js +7 -8
- package/lib/loader/themes/halo/dark/index.js +0 -1
- package/lib/loader/themes/halo/light/index.js +0 -1
- package/lib/loader/themes/solar/charcoal/index.js +0 -1
- package/lib/loader/themes/solar/pearl/index.js +0 -1
- package/lib/multi-input/index.d.ts +6 -6
- package/lib/multi-input/index.js +39 -45
- package/lib/multi-input/themes/halo/dark/index.js +0 -1
- package/lib/multi-input/themes/halo/light/index.js +0 -1
- package/lib/multi-input/themes/solar/charcoal/index.js +0 -1
- package/lib/multi-input/themes/solar/pearl/index.js +0 -1
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +3 -3
- package/lib/notification/elements/notification.d.ts +2 -2
- package/lib/notification/elements/notification.js +17 -14
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/themes/halo/dark/index.js +1 -3
- package/lib/notification/themes/halo/light/index.js +1 -3
- package/lib/notification/themes/solar/charcoal/index.js +1 -3
- package/lib/notification/themes/solar/pearl/index.js +1 -3
- package/lib/number-field/index.d.ts +12 -6
- package/lib/number-field/index.js +64 -48
- package/lib/number-field/themes/halo/dark/index.js +0 -1
- package/lib/number-field/themes/halo/light/index.js +0 -1
- package/lib/number-field/themes/solar/charcoal/index.js +0 -1
- package/lib/number-field/themes/solar/pearl/index.js +0 -1
- package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
- package/lib/overlay/elements/overlay.d.ts +2 -2
- package/lib/overlay/elements/overlay.js +154 -98
- package/lib/overlay/helpers/types.d.ts +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 +2 -1
- package/lib/overlay/managers/focus-manager.js +23 -13
- package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
- package/lib/overlay/managers/interaction-lock-manager.js +33 -25
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +3 -2
- package/lib/overlay/managers/zindex-manager.js +4 -2
- package/lib/overlay/themes/halo/dark/index.js +0 -2
- package/lib/overlay/themes/halo/light/index.js +0 -2
- package/lib/overlay/themes/solar/charcoal/index.js +0 -2
- package/lib/overlay/themes/solar/pearl/index.js +0 -2
- package/lib/overlay-menu/helpers/types.d.ts +2 -2
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +44 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
- package/lib/overlay-menu/managers/menu-manager.js +15 -13
- package/lib/overlay-menu/themes/halo/dark/index.js +0 -1
- package/lib/overlay-menu/themes/halo/light/index.js +0 -1
- package/lib/overlay-menu/themes/solar/charcoal/index.js +0 -1
- package/lib/overlay-menu/themes/solar/pearl/index.js +0 -1
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +39 -14
- package/lib/pagination/themes/halo/dark/index.js +0 -1
- package/lib/pagination/themes/halo/light/index.js +0 -1
- package/lib/pagination/themes/solar/charcoal/index.js +0 -1
- package/lib/pagination/themes/solar/pearl/index.js +0 -1
- package/lib/panel/index.js +1 -1
- package/lib/panel/themes/halo/dark/index.js +0 -1
- package/lib/panel/themes/halo/light/index.js +0 -1
- package/lib/panel/themes/solar/charcoal/index.js +0 -1
- package/lib/panel/themes/solar/pearl/index.js +0 -1
- package/lib/password-field/index.d.ts +2 -2
- package/lib/password-field/index.js +7 -4
- package/lib/password-field/themes/halo/dark/index.js +1 -2
- package/lib/password-field/themes/halo/light/index.js +1 -2
- package/lib/password-field/themes/solar/charcoal/index.js +1 -2
- package/lib/password-field/themes/solar/pearl/index.js +1 -2
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +22 -19
- package/lib/pill/themes/halo/dark/index.js +0 -1
- package/lib/pill/themes/halo/light/index.js +0 -1
- package/lib/pill/themes/solar/charcoal/index.js +0 -1
- package/lib/pill/themes/solar/pearl/index.js +0 -1
- package/lib/progress-bar/index.d.ts +1 -1
- package/lib/progress-bar/index.js +38 -37
- package/lib/progress-bar/themes/halo/dark/index.js +0 -1
- package/lib/progress-bar/themes/halo/light/index.js +0 -1
- package/lib/progress-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/progress-bar/themes/solar/pearl/index.js +0 -1
- package/lib/radio-button/index.d.ts +2 -2
- package/lib/radio-button/index.js +17 -12
- package/lib/radio-button/radio-button-registry.js +8 -5
- package/lib/radio-button/themes/halo/dark/index.js +0 -1
- package/lib/radio-button/themes/halo/light/index.js +0 -1
- package/lib/radio-button/themes/solar/charcoal/index.js +0 -1
- package/lib/radio-button/themes/solar/pearl/index.js +0 -1
- package/lib/rating/index.d.ts +1 -1
- package/lib/rating/index.js +2 -5
- package/lib/rating/themes/halo/dark/index.js +0 -1
- package/lib/rating/themes/halo/light/index.js +0 -1
- package/lib/rating/themes/solar/charcoal/index.js +0 -1
- package/lib/rating/themes/solar/pearl/index.js +0 -1
- package/lib/rating/utils.d.ts +6 -6
- package/lib/rating/utils.js +6 -6
- package/lib/search-field/index.d.ts +2 -2
- package/lib/search-field/index.js +4 -4
- package/lib/search-field/themes/halo/dark/index.js +0 -1
- package/lib/search-field/themes/halo/light/index.js +0 -1
- package/lib/search-field/themes/solar/charcoal/index.js +0 -1
- package/lib/search-field/themes/solar/pearl/index.js +0 -1
- package/lib/select/index.d.ts +34 -34
- package/lib/select/index.js +70 -83
- package/lib/select/themes/halo/dark/index.js +0 -1
- package/lib/select/themes/halo/light/index.js +0 -1
- package/lib/select/themes/solar/charcoal/index.js +0 -1
- package/lib/select/themes/solar/pearl/index.js +0 -1
- package/lib/sidebar-layout/index.d.ts +2 -2
- package/lib/sidebar-layout/index.js +7 -9
- package/lib/sidebar-layout/themes/halo/dark/index.js +0 -1
- package/lib/sidebar-layout/themes/halo/light/index.js +0 -1
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +0 -1
- package/lib/sidebar-layout/themes/solar/pearl/index.js +0 -1
- package/lib/slider/index.d.ts +2 -2
- package/lib/slider/index.js +72 -49
- package/lib/slider/themes/halo/dark/index.js +0 -1
- package/lib/slider/themes/halo/light/index.js +0 -1
- package/lib/slider/themes/solar/charcoal/index.js +0 -1
- package/lib/slider/themes/solar/pearl/index.js +0 -1
- package/lib/slider/utils.d.ts +10 -10
- package/lib/slider/utils.js +10 -10
- package/lib/sparkline/index.d.ts +1 -1
- package/lib/sparkline/index.js +7 -8
- package/lib/sparkline/themes/halo/dark/index.js +0 -1
- package/lib/sparkline/themes/halo/light/index.js +0 -1
- package/lib/sparkline/themes/solar/charcoal/index.js +0 -1
- package/lib/sparkline/themes/solar/pearl/index.js +0 -1
- package/lib/swing-gauge/helpers.js +2 -2
- package/lib/swing-gauge/index.d.ts +19 -19
- package/lib/swing-gauge/index.js +91 -81
- package/lib/swing-gauge/themes/halo/dark/index.js +0 -1
- package/lib/swing-gauge/themes/halo/light/index.js +0 -1
- package/lib/swing-gauge/themes/solar/charcoal/index.js +0 -1
- package/lib/swing-gauge/themes/solar/pearl/index.js +0 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +16 -27
- package/lib/tab/themes/halo/dark/index.js +1 -2
- package/lib/tab/themes/halo/light/index.js +1 -2
- package/lib/tab/themes/solar/charcoal/index.js +1 -2
- package/lib/tab/themes/solar/pearl/index.js +1 -2
- package/lib/tab-bar/helpers/animate.js +1 -1
- package/lib/tab-bar/index.d.ts +1 -1
- package/lib/tab-bar/index.js +34 -18
- package/lib/tab-bar/themes/halo/dark/index.js +1 -2
- package/lib/tab-bar/themes/halo/light/index.js +1 -2
- package/lib/tab-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +0 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/index.js +36 -33
- package/lib/text-field/themes/halo/dark/index.js +0 -1
- package/lib/text-field/themes/halo/light/index.js +0 -1
- package/lib/text-field/themes/solar/charcoal/index.js +0 -1
- package/lib/text-field/themes/solar/pearl/index.js +0 -1
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +104 -90
- package/lib/time-picker/themes/halo/dark/index.js +0 -1
- package/lib/time-picker/themes/halo/light/index.js +0 -1
- package/lib/time-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/time-picker/themes/solar/pearl/index.js +0 -1
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +4 -3
- package/lib/toggle/themes/halo/dark/index.js +1 -2
- package/lib/toggle/themes/halo/light/index.js +1 -2
- package/lib/toggle/themes/solar/charcoal/index.js +1 -2
- package/lib/toggle/themes/solar/pearl/index.js +1 -2
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/renderer.js +3 -3
- package/lib/tooltip/index.d.ts +27 -27
- package/lib/tooltip/index.js +42 -38
- package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
- package/lib/tooltip/themes/halo/dark/index.js +0 -1
- package/lib/tooltip/themes/halo/light/index.js +0 -1
- package/lib/tooltip/themes/solar/charcoal/index.js +0 -1
- package/lib/tooltip/themes/solar/pearl/index.js +0 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.js +1 -1
- package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
- package/lib/tornado-chart/elements/tornado-item.js +12 -10
- package/lib/tornado-chart/themes/halo/dark/index.js +0 -2
- package/lib/tornado-chart/themes/halo/light/index.js +0 -2
- package/lib/tornado-chart/themes/solar/charcoal/index.js +0 -2
- package/lib/tornado-chart/themes/solar/pearl/index.js +0 -2
- package/lib/tree/elements/tree-item.d.ts +3 -3
- package/lib/tree/elements/tree-item.js +21 -19
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/elements/tree.js +12 -11
- package/lib/tree/helpers/renderer.js +4 -3
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/managers/tree-manager.js +17 -18
- package/lib/tree/themes/halo/dark/index.js +0 -2
- package/lib/tree/themes/halo/light/index.js +0 -2
- package/lib/tree/themes/solar/charcoal/index.js +1 -3
- package/lib/tree/themes/solar/pearl/index.js +1 -3
- package/lib/tree-select/index.d.ts +9 -9
- package/lib/tree-select/index.js +91 -82
- package/lib/tree-select/themes/halo/dark/index.js +1 -2
- package/lib/tree-select/themes/halo/light/index.js +1 -2
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -2
- package/lib/tree-select/themes/solar/pearl/index.js +1 -2
- package/lib/version.js +1 -1
- package/package.json +19 -18
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/config/custom-elements.json +0 -23
- package/lib/config/custom-elements.md +0 -8
- package/lib/config/helpers/context.js +0 -2
- package/lib/config/index.d.ts +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var InteractiveChart_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
|
-
import {
|
|
3
|
+
import { createChart as chart } from 'lightweight-charts';
|
|
4
|
+
import { DeprecationNotice, ResponsiveElement, css, html } from '@refinitiv-ui/core';
|
|
4
5
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
5
6
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
6
7
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
7
|
-
import { VERSION } from '../version.js';
|
|
8
8
|
import { color as parseColor } from '@refinitiv-ui/utils/color.js';
|
|
9
|
-
import { createChart as chart } from 'lightweight-charts';
|
|
10
9
|
import '../tooltip/index.js';
|
|
11
|
-
import {
|
|
10
|
+
import { VERSION } from '../version.js';
|
|
12
11
|
import { merge } from './helpers/merge.js';
|
|
12
|
+
import { LegendStyle } from './helpers/types.js';
|
|
13
13
|
const NOT_AVAILABLE_DATA = 'N/A';
|
|
14
14
|
const NO_DATA_POINT = '--';
|
|
15
15
|
/**
|
|
@@ -24,7 +24,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
24
24
|
/**
|
|
25
25
|
* Chart configurations for init chart
|
|
26
26
|
* @type {InteractiveChartConfig}
|
|
27
|
-
|
|
27
|
+
*/
|
|
28
28
|
this.config = null;
|
|
29
29
|
/**
|
|
30
30
|
* Hide legend
|
|
@@ -35,19 +35,23 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
35
35
|
*/
|
|
36
36
|
this.disabledJumpButton = false;
|
|
37
37
|
/**
|
|
38
|
-
* Deprecation
|
|
38
|
+
* Deprecation notice displays a warning message
|
|
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
42
|
/**
|
|
43
43
|
* @ignore
|
|
44
44
|
* Array of series instances in chart
|
|
45
45
|
*/
|
|
46
46
|
this.seriesList = [];
|
|
47
|
+
/**
|
|
48
|
+
* lightweight-charts object
|
|
49
|
+
* @type {IChartApi | null}
|
|
50
|
+
*/
|
|
51
|
+
this.chart = null;
|
|
47
52
|
this.jumpButtonInitialized = false;
|
|
48
53
|
this.legendInitialized = false;
|
|
49
54
|
this.isCrosshairVisible = false;
|
|
50
|
-
this.chart = null;
|
|
51
55
|
this.rowLegend = null;
|
|
52
56
|
this.timeScale = null;
|
|
53
57
|
this.width = 0;
|
|
@@ -169,7 +173,8 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
169
173
|
if (changedProperties.has('deprecatedLegendStyle')) {
|
|
170
174
|
this.deprecationNotice.show();
|
|
171
175
|
}
|
|
172
|
-
const oldLegendStyle = (changedProperties.get('legend-style') ||
|
|
176
|
+
const oldLegendStyle = (changedProperties.get('legend-style') ||
|
|
177
|
+
changedProperties.get('deprecatedLegendStyle'));
|
|
173
178
|
this.onLegendStyleChange(this.legendStyle, oldLegendStyle);
|
|
174
179
|
}
|
|
175
180
|
}
|
|
@@ -192,9 +197,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
192
197
|
}
|
|
193
198
|
}
|
|
194
199
|
/**
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
200
|
+
* Legend value observer
|
|
201
|
+
* @returns {void}
|
|
202
|
+
*/
|
|
198
203
|
onLegendChange() {
|
|
199
204
|
if (!this.disabledLegend) {
|
|
200
205
|
this.createLegend();
|
|
@@ -221,9 +226,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
221
226
|
}
|
|
222
227
|
}
|
|
223
228
|
/**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
229
|
+
* Jump last value observer
|
|
230
|
+
* @returns {void}
|
|
231
|
+
*/
|
|
227
232
|
onJumpButtonChange() {
|
|
228
233
|
if (!this.disabledJumpButton) {
|
|
229
234
|
this.createJumpButton(this.width, this.height);
|
|
@@ -417,9 +422,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
417
422
|
return color || {};
|
|
418
423
|
}
|
|
419
424
|
/**
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
425
|
+
* Create data configuration from theme
|
|
426
|
+
* @returns {void}
|
|
427
|
+
*/
|
|
423
428
|
createSeriesOptions() {
|
|
424
429
|
if (this.theme) {
|
|
425
430
|
let colorIndex = 0;
|
|
@@ -471,12 +476,12 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
471
476
|
wickDownColor: this.theme.chartDownColor
|
|
472
477
|
};
|
|
473
478
|
// Update color index
|
|
474
|
-
if (!seriesOptions.upColor
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
479
|
+
if (!seriesOptions.upColor ||
|
|
480
|
+
!seriesOptions.downColor ||
|
|
481
|
+
!seriesOptions.borderUpColor ||
|
|
482
|
+
!seriesOptions.borderDownColor ||
|
|
483
|
+
!seriesOptions.wickUpColor ||
|
|
484
|
+
!seriesOptions.wickDownColor) {
|
|
480
485
|
colorIndex++;
|
|
481
486
|
}
|
|
482
487
|
}
|
|
@@ -491,7 +496,8 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
491
496
|
}
|
|
492
497
|
// Update config seriesOptions not have seriesOptions
|
|
493
498
|
if (!this.internalConfig.series[index].seriesOptions) {
|
|
494
|
-
this.internalConfig.series[index].seriesOptions =
|
|
499
|
+
this.internalConfig.series[index].seriesOptions =
|
|
500
|
+
seriesThemeOptions;
|
|
495
501
|
}
|
|
496
502
|
else {
|
|
497
503
|
merge(seriesOptions, seriesThemeOptions);
|
|
@@ -500,10 +506,10 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
500
506
|
}
|
|
501
507
|
}
|
|
502
508
|
/**
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
509
|
+
* Apply Theme to chart
|
|
510
|
+
* @param config value config
|
|
511
|
+
* @returns {void}
|
|
512
|
+
*/
|
|
507
513
|
applyTheme(config) {
|
|
508
514
|
if (this.chart && this.theme) {
|
|
509
515
|
const style = getComputedStyle(this);
|
|
@@ -635,7 +641,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
635
641
|
for (let idx = 0; idx < this.internalConfig.series.length; idx++) {
|
|
636
642
|
const chartType = this.internalConfig.series[idx].type;
|
|
637
643
|
const dataSet = this.internalConfig.series[idx].data || [];
|
|
638
|
-
const symbol =
|
|
644
|
+
const symbol = this.internalConfig.series[idx].symbolName || this.internalConfig.series[idx].symbol || '';
|
|
639
645
|
const isLegendVisible = this.internalConfig.series[idx].legendVisible !== false;
|
|
640
646
|
// Create row legend element
|
|
641
647
|
if (!rowLegend) {
|
|
@@ -657,11 +663,11 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
657
663
|
}
|
|
658
664
|
this.legendContainer.appendChild(rowLegendElem);
|
|
659
665
|
}
|
|
660
|
-
/* Update value legend element on subscribeCrosshairMove.
|
|
661
|
-
* Don't need to be updated if chart has no data.
|
|
662
|
-
*/
|
|
663
|
-
/* istanbul ignore next */
|
|
664
666
|
else if (rowLegend && dataSet.length) {
|
|
667
|
+
/* Update value legend element on subscribeCrosshairMove.
|
|
668
|
+
* Don't need to be updated if chart has no data.
|
|
669
|
+
*/
|
|
670
|
+
/* istanbul ignore next */
|
|
665
671
|
let value;
|
|
666
672
|
let priceColor = '';
|
|
667
673
|
// When have price on event moved on the crosshair
|
|
@@ -682,7 +688,10 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
682
688
|
const latestData = dataSet[dataSet.length - 1];
|
|
683
689
|
if (latestData) {
|
|
684
690
|
priceColor = this.getColorInSeries(latestData, chartType, idx);
|
|
685
|
-
value =
|
|
691
|
+
value =
|
|
692
|
+
chartType === 'bar' || chartType === 'candlestick'
|
|
693
|
+
? latestData
|
|
694
|
+
: latestData.value;
|
|
686
695
|
this.isCrosshairVisible = false;
|
|
687
696
|
this.hasDataPoint = true;
|
|
688
697
|
}
|
|
@@ -710,7 +719,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
710
719
|
if (chartType === 'bar' || chartType === 'candlestick') {
|
|
711
720
|
if (!this.hasDataPoint && rowLegendElem instanceof NodeList) {
|
|
712
721
|
const spanElem = rowLegendElem[index].querySelectorAll('span.price,span.ohlc');
|
|
713
|
-
spanElem.forEach(span => rowLegendElem[index].removeChild(span));
|
|
722
|
+
spanElem.forEach((span) => rowLegendElem[index].removeChild(span));
|
|
714
723
|
const span = document.createElement('span');
|
|
715
724
|
span.className = 'price';
|
|
716
725
|
span.textContent = value;
|
|
@@ -738,16 +747,18 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
738
747
|
}
|
|
739
748
|
}
|
|
740
749
|
/**
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
750
|
+
* Create text used by several series types such as bars or candlesticks
|
|
751
|
+
* @param rowLegend Legend element
|
|
752
|
+
* @param rowData Value of series
|
|
753
|
+
* @param priceColor color of series
|
|
754
|
+
* @param index Series index
|
|
755
|
+
* @returns {void}
|
|
756
|
+
*/
|
|
748
757
|
createTextOHLC(rowLegend, rowData, priceColor, index) {
|
|
749
758
|
// Uses price formatter if provided
|
|
750
|
-
const formatter = this.internalConfig.series[index].hasOwnProperty('legendPriceFormatter')
|
|
759
|
+
const formatter = this.internalConfig.series[index].hasOwnProperty('legendPriceFormatter')
|
|
760
|
+
? this.internalConfig.series[index].legendPriceFormatter
|
|
761
|
+
: null;
|
|
751
762
|
if (formatter) {
|
|
752
763
|
rowData = {
|
|
753
764
|
open: formatter(rowData.open),
|
|
@@ -885,7 +896,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
885
896
|
return this.getLegendPriceColor(this.seriesList[index].options().color);
|
|
886
897
|
}
|
|
887
898
|
else if (chartType === 'candlestick') {
|
|
888
|
-
const value = seriesData.hasOwnProperty('seriesPrices')
|
|
899
|
+
const value = seriesData.hasOwnProperty('seriesPrices')
|
|
900
|
+
? seriesData?.seriesPrices.get(this.seriesList[index])
|
|
901
|
+
: seriesData;
|
|
889
902
|
const barStyle = this.seriesList[index].options();
|
|
890
903
|
const colorBar = value.close > value.open ? barStyle.borderUpColor : barStyle.borderDownColor;
|
|
891
904
|
return colorBar;
|
|
@@ -897,7 +910,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
897
910
|
return this.getLegendPriceColor(this.seriesList[index].options().lineColor);
|
|
898
911
|
}
|
|
899
912
|
else if (chartType === 'volume') {
|
|
900
|
-
const priceValue = seriesData.hasOwnProperty('seriesPrices')
|
|
913
|
+
const priceValue = seriesData.hasOwnProperty('seriesPrices')
|
|
914
|
+
? seriesData.seriesPrices.get(this.seriesList[index])
|
|
915
|
+
: seriesData.value;
|
|
901
916
|
let dataItem = {};
|
|
902
917
|
this.internalConfig.series[index].data.forEach((dataConfig) => {
|
|
903
918
|
const data = dataConfig;
|
|
@@ -905,10 +920,10 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
905
920
|
const timeSeriesData = seriesData.time;
|
|
906
921
|
// if via time point data string format 'yyyy-mm-dd' or object '{ year: 2019, month: 6, day: 1 }'
|
|
907
922
|
if (time.hasOwnProperty('day') && time.hasOwnProperty('month') && time.hasOwnProperty('year')) {
|
|
908
|
-
if (time.day === timeSeriesData.day
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
923
|
+
if (time.day === timeSeriesData.day &&
|
|
924
|
+
time.month === timeSeriesData.month &&
|
|
925
|
+
time.year === timeSeriesData.year &&
|
|
926
|
+
data.value === priceValue) {
|
|
912
927
|
dataItem = dataConfig;
|
|
913
928
|
}
|
|
914
929
|
}
|
|
@@ -942,7 +957,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
942
957
|
const position = this.getPriceScalePosition();
|
|
943
958
|
const pricePosition = position === 'left' ? 30 : 0;
|
|
944
959
|
const buttonTop = `${height - 70}px`;
|
|
945
|
-
const buttonLeft = `${
|
|
960
|
+
const buttonLeft = `${width + pricePosition - 100}px`;
|
|
946
961
|
this.jumpButtonContainer.style.top = buttonTop;
|
|
947
962
|
this.jumpButtonContainer.style.left = buttonLeft;
|
|
948
963
|
// Create subscribeVisibleTimeRangeChange
|
|
@@ -1001,11 +1016,11 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
1001
1016
|
return colors;
|
|
1002
1017
|
}
|
|
1003
1018
|
/**
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1019
|
+
* A `CSSResultGroup` that will be used
|
|
1020
|
+
* to style the host, slotted children
|
|
1021
|
+
* and the internal template of the element.
|
|
1022
|
+
* @return CSS template
|
|
1023
|
+
*/
|
|
1009
1024
|
static get styles() {
|
|
1010
1025
|
return css `
|
|
1011
1026
|
:host {
|
|
@@ -1015,7 +1030,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
1015
1030
|
z-index: 0;
|
|
1016
1031
|
}
|
|
1017
1032
|
|
|
1018
|
-
[part=legend] {
|
|
1033
|
+
[part='legend'] {
|
|
1019
1034
|
position: absolute;
|
|
1020
1035
|
z-index: 1000;
|
|
1021
1036
|
}
|
|
@@ -1035,8 +1050,12 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
1035
1050
|
<div part="jump-button"></div>
|
|
1036
1051
|
</div>
|
|
1037
1052
|
<div part="branding-container" title="" tooltip="Powered by Trading View">
|
|
1038
|
-
<svg width="33" height="19" viewBox="0 0 611 314"
|
|
1039
|
-
<path
|
|
1053
|
+
<svg width="33" height="19" viewBox="0 0 611 314" part="branding">
|
|
1054
|
+
<path
|
|
1055
|
+
fill-rule="evenodd"
|
|
1056
|
+
clip-rule="evenodd"
|
|
1057
|
+
d="M341 124C375.242 124 403 96.2417 403 62C403 27.7583 375.242 0 341 0C306.758 0 279 27.7583 279 62C279 96.2417 306.758 124 341 124ZM481 314H337L467 4H611L481 314ZM124 4H248V128V314H124V128H0V4H124Z"
|
|
1058
|
+
/>
|
|
1040
1059
|
</svg>
|
|
1041
1060
|
</div>
|
|
1042
1061
|
<div part="chart"></div>
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-interactive-chart', styles: ':host{--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--chart-color-9:#999999;--chart-color-10:#3BBAFF;--line-width:2;--fill-opacity:0.4;--text-color:rgba(204, 204, 204, 0.8);--background-color:#1A1A1A;--chart-up-color:#39C46E;--chart-down-color:#F5475B;--cross-hair-color:#CCCCCC;--grid-vert-line-color:rgba(38, 38, 38, 0.5);--grid-horz-line-color:rgba(38, 38, 38, 0.5);--scale-price-border-color:rgba(38, 38, 38, 0.5);--scale-times-border-color:rgba(38, 38, 38, 0.5)}:host [part=legend]{top:15px;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#ccc;border:1px solid #0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);border-radius:100%;z-index:1000;cursor:pointer;background-color:#1a1a1a}:host [part=jump-button-container]:hover{color:#fff;border-color:#1429bd;box-shadow:0 0 0 0 rgba(0,0,0,.8);background-color:#343434}:host [part=jump-button-container]:active{color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5);background-color:#1a1a1a}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #ccc;border-right:2px solid #ccc;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(204,204,204,.8)}:host [part=jump-button-container],:host [part=jump-button-container]:hover,:host [part=jump-button]{border-color:grey}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/tooltip/themes/halo/light';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-interactive-chart', styles: ':host{--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--chart-color-9:#595959;--chart-color-10:#236F99;--line-width:2;--fill-opacity:0.4;--text-color:rgba(13, 13, 13, 0.8);--background-color:#FAFAFA;--chart-up-color:#246B3E;--chart-down-color:#B63243;--cross-hair-color:#404040;--grid-vert-line-color:rgba(242, 242, 242, 0.5);--grid-horz-line-color:rgba(242, 242, 242, 0.5);--scale-price-border-color:rgba(242, 242, 242, 0.5);--scale-times-border-color:rgba(242, 242, 242, 0.5)}:host [part=legend]{top:15px;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#0d0d0d;border:1px solid #ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);border-radius:100%;z-index:1000;cursor:pointer;background-color:#fafafa}:host [part=jump-button-container]:hover{color:#fff;border-color:#1429bd;box-shadow:0 0 0 0 rgba(0,0,0,.55);background-color:#fff}:host [part=jump-button-container]:active{color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25);background-color:#fafafa}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #0d0d0d;border-right:2px solid #0d0d0d;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(13,13,13,.8)}:host [part=jump-button-container],:host [part=jump-button-container]:hover,:host [part=jump-button]{border-color:#8d8d8d}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-interactive-chart', styles: ':host{--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--line-width:2;--fill-opacity:0.4;--text-color:rgba(194, 194, 194, 0.8);--background-color:#1A1A1C;--chart-up-color:#39C46E;--chart-down-color:#F5475B;--cross-hair-color:#E2E2E2;--grid-vert-line-color:rgba(10, 10, 10, 0.5);--grid-horz-line-color:rgba(10, 10, 10, 0.5);--scale-price-border-color:rgba(10, 10, 10, 0.5);--scale-times-border-color:rgba(10, 10, 10, 0.5);--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#48CBF7;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#EFF748;--chart-color-15:#FF4043;--chart-color-16:#A7DB0B;--chart-color-17:#C2C2C2;--chart-color-18:#1578AD;--chart-color-19:#F2B530;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#60E65C;--chart-color-25:#2960A3;--grid-vert-line-color:rgba(194, 194, 194, 0.1);--grid-horz-line-color:rgba(194, 194, 194, 0.1);--scale-price-border-color:rgba(194, 194, 194, 0.1);--scale-times-border-color:rgba(194, 194, 194, 0.1)}:host [part=legend]{top:15px;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#c2c2c2;background-color:#3c3c42;border:1px solid #000;box-shadow:0 0 0 0 rgba(0,0,0,.6);border-radius:100%;z-index:1000;cursor:pointer;background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host [part=jump-button-container]:hover{color:#e2e2e2;background-color:#4d4d55;border-color:#000;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host [part=jump-button-container]:active{background-color:#38383d;color:#c2c2c2;box-shadow:0 0 0 0 rgba(0,0,0,.6);background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #c2c2c2;border-right:2px solid #c2c2c2;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(194,194,194,.8)}:host [part=jump-button-container]:hover [part=jump-button]{border-color:#e2e2e2}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-interactive-chart', styles: ':host{--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--line-width:2;--fill-opacity:0.4;--text-color:rgba(72, 72, 72, 0.8);--background-color:#FFFFFF;--chart-up-color:#309054;--chart-down-color:#D94255;--cross-hair-color:#ACAFB5;--grid-vert-line-color:rgba(213, 216, 219, 0.5);--grid-horz-line-color:rgba(213, 216, 219, 0.5);--scale-price-border-color:rgba(213, 216, 219, 0.5);--scale-times-border-color:rgba(213, 216, 219, 0.5);--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#40B6DE;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#AAB218;--chart-color-15:#FF4043;--chart-color-16:#80A808;--chart-color-17:#707070;--chart-color-18:#1578AC;--chart-color-19:#D9A22B;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#4BB347;--chart-color-25:#2960A3;--grid-vert-line-color:rgba(72, 72, 72, 0.1);--grid-horz-line-color:rgba(72, 72, 72, 0.1);--scale-price-border-color:rgba(72, 72, 72, 0.1);--scale-times-border-color:rgba(72, 72, 72, 0.1)}:host [part=legend]{top:15px;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#505050;background-color:#fafbfc;border:1px solid #a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.3);border-radius:100%;z-index:1000;cursor:pointer;background-image:linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.1) 100%)}:host [part=jump-button-container]:hover{color:#1d1d1d;background-color:#fff;border-color:#a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host [part=jump-button-container]:active{background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3);background-image:none}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #505050;border-right:2px solid #505050;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(72,72,72,.8)}:host [part=jump-button-container]:hover [part=jump-button]{border-color:#1d1d1d}' }}));
|
package/lib/item/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
3
|
-
import '../icon/index.js';
|
|
2
|
+
import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
4
3
|
import '../checkbox/index.js';
|
|
5
|
-
import
|
|
4
|
+
import '../icon/index.js';
|
|
5
|
+
import type { ItemData, ItemDivider, ItemHeader, ItemText, ItemType } from './helpers/types';
|
|
6
6
|
export type { ItemType, ItemText, ItemHeader, ItemDivider, ItemData };
|
|
7
7
|
/**
|
|
8
8
|
* Used as a basic building block to compose complex custom elements,
|
package/lib/item/index.js
CHANGED
|
@@ -2,14 +2,13 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { ControlElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
-
import {
|
|
6
|
-
import '
|
|
5
|
+
import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
|
|
6
|
+
import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
|
|
7
7
|
import '../checkbox/index.js';
|
|
8
|
+
import '../icon/index.js';
|
|
8
9
|
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const isAllWhitespaceTextNode = (node) => node.nodeType === document.TEXT_NODE
|
|
12
|
-
&& !node.textContent?.trim();
|
|
10
|
+
import { VERSION } from '../version.js';
|
|
11
|
+
const isAllWhitespaceTextNode = (node) => node.nodeType === document.TEXT_NODE && !node.textContent?.trim();
|
|
13
12
|
/**
|
|
14
13
|
* Used as a basic building block to compose complex custom elements,
|
|
15
14
|
* additionally it can be used by applications
|
|
@@ -85,7 +84,7 @@ let Item = class Item extends ControlElement {
|
|
|
85
84
|
*/
|
|
86
85
|
this.checkSlotChildren = (event) => {
|
|
87
86
|
const slot = event.target;
|
|
88
|
-
this.isSlotEmpty = !slot.assignedNodes().filter(node => !this.isIgnorable(node)).length;
|
|
87
|
+
this.isSlotEmpty = !slot.assignedNodes().filter((node) => !this.isIgnorable(node)).length;
|
|
89
88
|
this.requestUpdate();
|
|
90
89
|
};
|
|
91
90
|
}
|
|
@@ -107,18 +106,18 @@ let Item = class Item extends ControlElement {
|
|
|
107
106
|
display: flex;
|
|
108
107
|
align-items: center;
|
|
109
108
|
}
|
|
110
|
-
[part=checkbox] {
|
|
109
|
+
[part='checkbox'] {
|
|
111
110
|
pointer-events: none;
|
|
112
111
|
}
|
|
113
|
-
[part=left],
|
|
114
|
-
[part=right] {
|
|
112
|
+
[part='left'],
|
|
113
|
+
[part='right'] {
|
|
115
114
|
display: flex;
|
|
116
115
|
align-items: center;
|
|
117
116
|
}
|
|
118
|
-
[part=center] {
|
|
117
|
+
[part='center'] {
|
|
119
118
|
flex: 1;
|
|
120
119
|
}
|
|
121
|
-
:host([type=divider]) > * {
|
|
120
|
+
:host([type='divider']) > * {
|
|
122
121
|
display: none;
|
|
123
122
|
}
|
|
124
123
|
`;
|
|
@@ -128,8 +127,7 @@ let Item = class Item extends ControlElement {
|
|
|
128
127
|
* @returns whether node can be ignored.
|
|
129
128
|
*/
|
|
130
129
|
isIgnorable(node) {
|
|
131
|
-
return node.nodeType === document.COMMENT_NODE
|
|
132
|
-
|| isAllWhitespaceTextNode(node);
|
|
130
|
+
return node.nodeType === document.COMMENT_NODE || isAllWhitespaceTextNode(node);
|
|
133
131
|
}
|
|
134
132
|
/**
|
|
135
133
|
* Handles aria-selected or aria-checked when toggle between single and multiple selection mode
|
|
@@ -216,13 +214,15 @@ let Item = class Item extends ControlElement {
|
|
|
216
214
|
* @returns return true if an item is overflown.
|
|
217
215
|
*/
|
|
218
216
|
isItemOverflown() {
|
|
219
|
-
return this.isItemElementOverflown(this.labelRef.value) || this.isItemElementOverflown(this.subLabelRef.value);
|
|
217
|
+
return (this.isItemElementOverflown(this.labelRef.value) || this.isItemElementOverflown(this.subLabelRef.value));
|
|
220
218
|
}
|
|
221
219
|
/**
|
|
222
220
|
* Get icon template if icon attribute is defined
|
|
223
221
|
*/
|
|
224
222
|
get iconTemplate() {
|
|
225
|
-
return this.icon !== null && this.icon !== undefined
|
|
223
|
+
return this.icon !== null && this.icon !== undefined
|
|
224
|
+
? html `<ef-icon part="icon" .icon="${this.icon}"></ef-icon>`
|
|
225
|
+
: undefined;
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
228
|
* Get subLabel template if it is defined and no slot content present
|
|
@@ -241,7 +241,10 @@ let Item = class Item extends ControlElement {
|
|
|
241
241
|
*/
|
|
242
242
|
get slotContent() {
|
|
243
243
|
const nodes = this.slotRef.value?.assignedNodes() || [];
|
|
244
|
-
return nodes
|
|
244
|
+
return nodes
|
|
245
|
+
.map((node) => node.textContent)
|
|
246
|
+
.join(' ')
|
|
247
|
+
.trim();
|
|
245
248
|
}
|
|
246
249
|
/**
|
|
247
250
|
* Get template for `for` attribute.
|
|
@@ -256,7 +259,9 @@ let Item = class Item extends ControlElement {
|
|
|
256
259
|
*/
|
|
257
260
|
get multipleTemplate() {
|
|
258
261
|
const multiple = this.multiple && (!this.type || this.type === 'text');
|
|
259
|
-
return multiple
|
|
262
|
+
return multiple
|
|
263
|
+
? html `<ef-checkbox part="checkbox" .checked="${this.selected}" tabindex="-1"></ef-checkbox>`
|
|
264
|
+
: undefined;
|
|
260
265
|
}
|
|
261
266
|
/**
|
|
262
267
|
* Return true if the item can be highlighted. True if not disabled and type is Text
|
|
@@ -274,8 +279,7 @@ let Item = class Item extends ControlElement {
|
|
|
274
279
|
render() {
|
|
275
280
|
return html `
|
|
276
281
|
<div part="left">
|
|
277
|
-
${this.iconTemplate}
|
|
278
|
-
${this.multipleTemplate}
|
|
282
|
+
${this.iconTemplate} ${this.multipleTemplate}
|
|
279
283
|
<slot name="left"></slot>
|
|
280
284
|
</div>
|
|
281
285
|
<div part="center" ${ref(this.labelRef)}>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
2
2
|
import '@refinitiv-ui/elements/checkbox/themes/halo/dark';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-item', styles: ':host{line-height:normal;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,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
2
2
|
import '@refinitiv-ui/elements/checkbox/themes/halo/light';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-item', styles: ':host{line-height:normal;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}' }}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
2
2
|
import '@refinitiv-ui/elements/checkbox/themes/solar/charcoal';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-item', styles: ':host{line-height:normal;outline:0;cursor:pointer;padding:0 7px;min-height:22px;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:#f93}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:rgba(255,255,255,.1)}: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(194,194,194,.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:#c2c2c2;background-color:#4a4a52;font-size:100%;font-weight:400;border:1px solid #0a0a0a;height:22px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;border:none;border-top:1px solid #0a0a0a;border-bottom:1px solid transparent;text-transform:none;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#2e2e33,#2e2e33) 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=sub-label]{font-size:80%}:host [part=icon],:host [part=left] ::slotted(*){margin-right:.33em}:host [part=right] ::slotted(*){margin-left:.33em}' }}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
2
2
|
import '@refinitiv-ui/elements/checkbox/themes/solar/pearl';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-item', styles: ':host{line-height:normal;outline:0;cursor:pointer;padding:0 7px;min-height:22px;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:#ee7600}:host([readonly]){cursor:default}:host([focused]),:host([highlighted]){background-color:rgba(0,0,0,.08)}:host([focused]:not([selected])),:host([highlighted]:not([selected])){color:#000}:host [part=center],:host [part=sub-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}:host([disabled]){color:rgba(72,72,72,.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:#484848;background-color:#f2f3f7;font-size:100%;font-weight:400;border:1px solid #d5d8db;height:22px;align-items:flex-end;margin:0;min-height:0;text-transform:uppercase;border:none;border-top:1px solid #d5d8db;border-bottom:1px solid transparent;text-transform:none;align-items:center}:host([type=divider]){border:none;padding:0;margin:0;height:5px;background:linear-gradient(#a9afba,#a9afba) 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=sub-label]{font-size:80%}:host [part=icon],:host [part=left] ::slotted(*){margin-right:.33em}:host [part=right] ::slotted(*){margin-left:.33em}' }}));
|
package/lib/jsx.d.ts
CHANGED
|
@@ -48,9 +48,11 @@ export declare namespace JSXInterface {
|
|
|
48
48
|
innerHTML?: string;
|
|
49
49
|
key?: string | number;
|
|
50
50
|
accessKey?: string;
|
|
51
|
-
class?:
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
class?:
|
|
52
|
+
| string
|
|
53
|
+
| {
|
|
54
|
+
[className: string]: boolean;
|
|
55
|
+
};
|
|
54
56
|
contentEditable?: boolean | string;
|
|
55
57
|
contenteditable?: boolean | string;
|
|
56
58
|
contextMenu?: string;
|
|
@@ -220,4 +222,4 @@ export declare namespace JSXInterface {
|
|
|
220
222
|
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
221
223
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
222
224
|
}
|
|
223
|
-
}
|
|
225
|
+
}
|
package/lib/label/index.d.ts
CHANGED
package/lib/label/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { styleMap } from '@refinitiv-ui/core/directives/style-map.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
6
|
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
8
7
|
import { addTooltipCondition, removeTooltipCondition } from '../tooltip/index.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
9
|
/**
|
|
10
10
|
* Configuration object
|
|
11
11
|
* for mutations observers
|
|
@@ -156,7 +156,10 @@ let Label = class Label extends BasicElement {
|
|
|
156
156
|
recalculate(mutation = false) {
|
|
157
157
|
const oldValue = this.text;
|
|
158
158
|
const raw = this.textContent || '';
|
|
159
|
-
this.chunks = raw
|
|
159
|
+
this.chunks = raw
|
|
160
|
+
.split(_)
|
|
161
|
+
.map((chunk) => chunk.trim())
|
|
162
|
+
.filter((chunk) => chunk);
|
|
160
163
|
const newValue = this.text;
|
|
161
164
|
if (oldValue !== newValue) {
|
|
162
165
|
this.requestUpdate('text', oldValue);
|
|
@@ -190,7 +193,9 @@ let Label = class Label extends BasicElement {
|
|
|
190
193
|
}
|
|
191
194
|
const leftPart = html `<div class="split left ${browserType}">${left.join(_)}</div>`;
|
|
192
195
|
const centerPart = isSingleWord ? undefined : html `<div class="split center"> </div>`;
|
|
193
|
-
const rightPart = right.length
|
|
196
|
+
const rightPart = right.length
|
|
197
|
+
? html `<div class="split right ${browserType}"><span dir="ltr">${right.join(_)}</span></div>`
|
|
198
|
+
: undefined;
|
|
194
199
|
return html `${leftPart}${centerPart}${rightPart}`;
|
|
195
200
|
}
|
|
196
201
|
/**
|
|
@@ -205,13 +210,11 @@ let Label = class Label extends BasicElement {
|
|
|
205
210
|
/* istanbul ignore if */
|
|
206
211
|
if (browserType === 'legacy') {
|
|
207
212
|
const cs = getComputedStyle(this);
|
|
208
|
-
const lineHeight = parseFloat(cs.lineHeight) || 1.2 /* css default
|
|
213
|
+
const lineHeight = parseFloat(cs.lineHeight) || 1.2; /* css default */
|
|
209
214
|
styles.maxHeight = `calc(1em * ${lineHeight} * ${this.lineClamp})`; // faux clamp in legacy browsers
|
|
210
215
|
styles.whiteSpace = this.lineClamp === 1 ? 'nowrap' : ''; // show ellipsis in legacy browsers
|
|
211
216
|
}
|
|
212
|
-
return html `
|
|
213
|
-
<span class="clamp ${browserType}" style="${styleMap(styles)}">${this.text}</span>
|
|
214
|
-
`;
|
|
217
|
+
return html ` <span class="clamp ${browserType}" style="${styleMap(styles)}">${this.text}</span> `;
|
|
215
218
|
}
|
|
216
219
|
/**
|
|
217
220
|
* A `TemplateResult` that will be used
|