@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
package/lib/slider/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { ControlElement, WarningNotice, css, html, nothing } 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 { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
6
|
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
7
7
|
import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
|
|
8
8
|
import { styleMap } from '@refinitiv-ui/core/directives/style-map.js';
|
|
9
|
-
import { translate } from '@refinitiv-ui/translate';
|
|
10
9
|
import '@refinitiv-ui/phrasebook/locale/en/slider.js';
|
|
11
|
-
import {
|
|
10
|
+
import { translate } from '@refinitiv-ui/translate';
|
|
12
11
|
import '../number-field/index.js';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { VERSION } from '../version.js';
|
|
13
|
+
import { Direction, SliderDataName } from './constants.js';
|
|
14
|
+
import { clamp, countDecimalPlace, isDecimalNumber, preventDefault } from './utils.js';
|
|
15
15
|
/**
|
|
16
16
|
* Allows users to make selections from a range of values
|
|
17
17
|
*
|
|
@@ -45,67 +45,67 @@ let Slider = class Slider extends ControlElement {
|
|
|
45
45
|
:host {
|
|
46
46
|
display: flex;
|
|
47
47
|
}
|
|
48
|
-
[part=slider-wrapper] {
|
|
48
|
+
[part='slider-wrapper'] {
|
|
49
49
|
position: relative;
|
|
50
50
|
width: 100%;
|
|
51
51
|
}
|
|
52
|
-
[part=slider] {
|
|
52
|
+
[part='slider'] {
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
55
|
display: inline-block;
|
|
56
56
|
}
|
|
57
|
-
:host(:not([disabled]):focus){
|
|
58
|
-
outline:none;
|
|
57
|
+
:host(:not([disabled]):focus) {
|
|
58
|
+
outline: none;
|
|
59
59
|
}
|
|
60
|
-
:host([show-steps]) [part=track-wrapper]::after {
|
|
61
|
-
display:block;
|
|
60
|
+
:host([show-steps]) [part='track-wrapper']::after {
|
|
61
|
+
display: block;
|
|
62
62
|
position: absolute;
|
|
63
|
-
content:
|
|
63
|
+
content: '';
|
|
64
64
|
right: 0;
|
|
65
65
|
}
|
|
66
|
-
[part=track-wrapper]{
|
|
67
|
-
content:
|
|
66
|
+
[part='track-wrapper'] {
|
|
67
|
+
content: '';
|
|
68
68
|
position: absolute;
|
|
69
69
|
width: 100%;
|
|
70
70
|
top: 50%;
|
|
71
71
|
left: 0;
|
|
72
72
|
pointer-events: none;
|
|
73
73
|
}
|
|
74
|
-
[part=thumb-container]{
|
|
74
|
+
[part='thumb-container'] {
|
|
75
75
|
outline: none;
|
|
76
76
|
position: absolute;
|
|
77
77
|
top: 0;
|
|
78
78
|
width: 100%;
|
|
79
79
|
z-index: 3;
|
|
80
80
|
}
|
|
81
|
-
[part=thumb]{
|
|
81
|
+
[part='thumb'] {
|
|
82
82
|
position: absolute;
|
|
83
83
|
margin: 0 auto;
|
|
84
84
|
}
|
|
85
|
-
[part=pin]{
|
|
85
|
+
[part='pin'] {
|
|
86
86
|
display: flex;
|
|
87
87
|
position: absolute;
|
|
88
88
|
align-items: center;
|
|
89
89
|
justify-content: center;
|
|
90
90
|
z-index: 1;
|
|
91
91
|
}
|
|
92
|
-
:host([show-steps]) [part=step-container]{
|
|
92
|
+
:host([show-steps]) [part='step-container'] {
|
|
93
93
|
position: absolute;
|
|
94
94
|
left: 0;
|
|
95
95
|
width: 100%;
|
|
96
96
|
}
|
|
97
|
-
:host([show-steps]) [part=step]{
|
|
97
|
+
:host([show-steps]) [part='step'] {
|
|
98
98
|
width: 100%;
|
|
99
99
|
position: absolute;
|
|
100
100
|
left: 0;
|
|
101
101
|
}
|
|
102
|
-
[part=track-fill]{
|
|
102
|
+
[part='track-fill'] {
|
|
103
103
|
z-index: 2;
|
|
104
|
-
content:
|
|
104
|
+
content: '';
|
|
105
105
|
position: absolute;
|
|
106
106
|
left: 0;
|
|
107
107
|
}
|
|
108
|
-
:host([show-steps][step=
|
|
108
|
+
:host([show-steps][step='0']) [part='track-wrapper']::after {
|
|
109
109
|
width: 0;
|
|
110
110
|
}
|
|
111
111
|
`;
|
|
@@ -299,19 +299,19 @@ let Slider = class Slider extends ControlElement {
|
|
|
299
299
|
this.changedThumb = null;
|
|
300
300
|
/**
|
|
301
301
|
* @ignore
|
|
302
|
-
|
|
302
|
+
*/
|
|
303
303
|
this.onDrag = this.onDrag.bind(this);
|
|
304
304
|
/**
|
|
305
305
|
* @ignore
|
|
306
|
-
|
|
306
|
+
*/
|
|
307
307
|
this.onDragStart = this.onDragStart.bind(this);
|
|
308
308
|
/**
|
|
309
309
|
* @ignore
|
|
310
|
-
|
|
310
|
+
*/
|
|
311
311
|
this.onDragEnd = this.onDragEnd.bind(this);
|
|
312
312
|
/**
|
|
313
313
|
* @ignore
|
|
314
|
-
|
|
314
|
+
*/
|
|
315
315
|
this.onKeyDown = this.onKeyDown.bind(this);
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
@@ -332,8 +332,8 @@ let Slider = class Slider extends ControlElement {
|
|
|
332
332
|
*/
|
|
333
333
|
willUpdate(changedProperties) {
|
|
334
334
|
super.willUpdate(changedProperties);
|
|
335
|
-
if ((changedProperties.has('disabled') && changedProperties.get('disabled') !== undefined)
|
|
336
|
-
|
|
335
|
+
if ((changedProperties.has('disabled') && changedProperties.get('disabled') !== undefined) ||
|
|
336
|
+
(changedProperties.has('readonly') && changedProperties.get('readonly') !== undefined)) {
|
|
337
337
|
this.prepareSliderTrack();
|
|
338
338
|
}
|
|
339
339
|
changedProperties.forEach((_, changedProperty) => {
|
|
@@ -398,21 +398,21 @@ let Slider = class Slider extends ControlElement {
|
|
|
398
398
|
message = 'value should be more than min.';
|
|
399
399
|
}
|
|
400
400
|
else if (propName === 'from' && this.range) {
|
|
401
|
-
isValid =
|
|
401
|
+
isValid = this.fromNumber >= this.minNumber && this.fromNumber <= this.toNumber;
|
|
402
402
|
message = 'value should be more than min and less than to.';
|
|
403
403
|
}
|
|
404
404
|
else if (propName === 'to' && this.range) {
|
|
405
|
-
isValid =
|
|
405
|
+
isValid = this.toNumber <= this.maxNumber && this.toNumber >= this.fromNumber;
|
|
406
406
|
message = 'value should be less than max and more than from.';
|
|
407
407
|
}
|
|
408
408
|
else if (propName === 'step') {
|
|
409
|
-
isValid =
|
|
409
|
+
isValid = this.maxNumber - this.minNumber >= this.stepNumber;
|
|
410
410
|
message = 'value should be between min and max.';
|
|
411
411
|
}
|
|
412
412
|
else if (propName === 'minRange' && this.minRangeNumber > 0) {
|
|
413
413
|
const distanceFromTo = Math.abs(this.toNumber - this.fromNumber);
|
|
414
414
|
const distanceMinMax = Math.abs(this.maxNumber - this.minNumber);
|
|
415
|
-
isValid =
|
|
415
|
+
isValid = distanceMinMax >= this.minRangeNumber && distanceFromTo >= this.minRangeNumber;
|
|
416
416
|
message = 'value should be less than distance from and to, min and max.';
|
|
417
417
|
}
|
|
418
418
|
if (!isValid) {
|
|
@@ -439,8 +439,8 @@ let Slider = class Slider extends ControlElement {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
else {
|
|
442
|
-
this.from = clamp(
|
|
443
|
-
this.to = clamp(
|
|
442
|
+
this.from = clamp(this.fromNumber || this.minNumber, this.minNumber, this.toNumber);
|
|
443
|
+
this.to = clamp(this.toNumber || this.maxNumber, this.fromNumber, this.maxNumber);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
else {
|
|
@@ -681,7 +681,7 @@ let Slider = class Slider extends ControlElement {
|
|
|
681
681
|
shouldUpdate = this.isValueInBoundary(Number(value), '');
|
|
682
682
|
}
|
|
683
683
|
if (shouldUpdate) {
|
|
684
|
-
|
|
684
|
+
this[name] = value;
|
|
685
685
|
this.notifyPropertyChange(name, value);
|
|
686
686
|
}
|
|
687
687
|
else {
|
|
@@ -713,7 +713,7 @@ let Slider = class Slider extends ControlElement {
|
|
|
713
713
|
this.classList.add('grabbable');
|
|
714
714
|
if (this.range) {
|
|
715
715
|
const mousePosition = this.getMousePosition(event);
|
|
716
|
-
const relativeMousePosition = (
|
|
716
|
+
const relativeMousePosition = (this.maxNumber - this.minNumber) * mousePosition + this.minNumber;
|
|
717
717
|
const distanceFrom = Math.abs(relativeMousePosition - this.fromNumber);
|
|
718
718
|
const distanceTo = Math.abs(relativeMousePosition - this.toNumber);
|
|
719
719
|
if (distanceFrom < distanceTo) {
|
|
@@ -748,7 +748,9 @@ let Slider = class Slider extends ControlElement {
|
|
|
748
748
|
return 1;
|
|
749
749
|
}
|
|
750
750
|
// check drag desktop or mobile
|
|
751
|
-
const pageX = event.changedTouches
|
|
751
|
+
const pageX = event.changedTouches
|
|
752
|
+
? event.changedTouches[0].pageX
|
|
753
|
+
: event.pageX;
|
|
752
754
|
const positionSize = pageX - sliderRect.left;
|
|
753
755
|
if (positionSize <= sliderRect.width) {
|
|
754
756
|
return Math.min(Math.max((pageX - sliderRect.left) / sliderRect.width, 0), 1);
|
|
@@ -826,7 +828,7 @@ let Slider = class Slider extends ControlElement {
|
|
|
826
828
|
getNearestPossibleValue(thumbPosition) {
|
|
827
829
|
const stepSize = this.calculatePosition(this.minNumber + this.stepRange, 1);
|
|
828
830
|
const nearestValue = Math.round(thumbPosition / stepSize) * stepSize;
|
|
829
|
-
if (thumbPosition <= nearestValue +
|
|
831
|
+
if (thumbPosition <= nearestValue + stepSize / 2) {
|
|
830
832
|
if (nearestValue <= 1) {
|
|
831
833
|
return nearestValue;
|
|
832
834
|
}
|
|
@@ -954,11 +956,11 @@ let Slider = class Slider extends ControlElement {
|
|
|
954
956
|
// Check if value is in range
|
|
955
957
|
if (this.range) {
|
|
956
958
|
if (valueFor === SliderDataName.to) {
|
|
957
|
-
if (value <
|
|
959
|
+
if (value < this.fromNumber + this.minRangeNumber || value > this.maxNumber) {
|
|
958
960
|
return false;
|
|
959
961
|
}
|
|
960
962
|
}
|
|
961
|
-
else if (value < this.minNumber || value >
|
|
963
|
+
else if (value < this.minNumber || value > this.toNumber - this.minRangeNumber) {
|
|
962
964
|
return false;
|
|
963
965
|
}
|
|
964
966
|
}
|
|
@@ -1083,11 +1085,17 @@ let Slider = class Slider extends ControlElement {
|
|
|
1083
1085
|
*/
|
|
1084
1086
|
renderTrack(range) {
|
|
1085
1087
|
const stepContainerSize = this.calculatePosition(this.minNumber + this.stepNumber);
|
|
1086
|
-
const translateX =
|
|
1087
|
-
const stepsStyle = {
|
|
1088
|
+
const translateX = stepContainerSize / 2;
|
|
1089
|
+
const stepsStyle = {
|
|
1090
|
+
transform: `translateX(${translateX}%)`,
|
|
1091
|
+
backgroundSize: `${stepContainerSize}% 100%`
|
|
1092
|
+
};
|
|
1088
1093
|
const stepContainerStyle = { transform: `translateX(-${translateX}%)` };
|
|
1089
1094
|
const trackFillStyle = range
|
|
1090
|
-
? {
|
|
1095
|
+
? {
|
|
1096
|
+
width: `${this.calculatePosition(this.toNumber) - this.calculatePosition(this.fromNumber)}%`,
|
|
1097
|
+
left: `${this.calculatePosition(this.fromNumber)}%`
|
|
1098
|
+
}
|
|
1091
1099
|
: { width: `${this.calculatePosition(Number(this.value))}%` };
|
|
1092
1100
|
return html `
|
|
1093
1101
|
<div part="track-wrapper" ${ref(this.trackRef)}>
|
|
@@ -1108,10 +1116,21 @@ let Slider = class Slider extends ControlElement {
|
|
|
1108
1116
|
thumbTemplate(value, thumbPosition, name) {
|
|
1109
1117
|
const isActive = this.activeThumb?.getAttribute('name') === name;
|
|
1110
1118
|
const isChanged = this.changedThumb?.getAttribute('name') === name;
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1119
|
+
let valueNow = this.value;
|
|
1120
|
+
let valueMin = this.min;
|
|
1121
|
+
let valueMax = this.max;
|
|
1122
|
+
if (this.range) {
|
|
1123
|
+
if (name === SliderDataName.from) {
|
|
1124
|
+
valueNow = this.from;
|
|
1125
|
+
valueMax = String(this.toNumber - this.minRangeNumber);
|
|
1126
|
+
}
|
|
1127
|
+
else {
|
|
1128
|
+
valueNow = this.to;
|
|
1129
|
+
valueMin = String(this.fromNumber + this.minRangeNumber);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
const thumbZIndex = this.range ? (isChanged ? '4' : '3') : null;
|
|
1133
|
+
const thumbStyle = { left: `${thumbPosition}%`, zIndex: thumbZIndex };
|
|
1115
1134
|
return html `
|
|
1116
1135
|
<div
|
|
1117
1136
|
${ref(this[`${name}ThumbRef`])}
|
|
@@ -1186,11 +1205,15 @@ let Slider = class Slider extends ControlElement {
|
|
|
1186
1205
|
<div part="slider-wrapper">
|
|
1187
1206
|
<div part="slider" ${ref(this.sliderRef)}>
|
|
1188
1207
|
${this.renderTrack(this.range)}
|
|
1189
|
-
${this.range
|
|
1208
|
+
${this.range
|
|
1209
|
+
? this.renderThumb(this.fromNumber, this.toNumber)
|
|
1210
|
+
: this.renderThumb(this.valueNumber)}
|
|
1190
1211
|
</div>
|
|
1191
1212
|
</div>
|
|
1192
1213
|
${this.range && this.isShowInputField ? this.renderNumberField(this.to, SliderDataName.to) : null}
|
|
1193
|
-
${!this.range && this.isShowInputField
|
|
1214
|
+
${!this.range && this.isShowInputField
|
|
1215
|
+
? this.renderNumberField(this.value, SliderDataName.value)
|
|
1216
|
+
: null}
|
|
1194
1217
|
`;
|
|
1195
1218
|
}
|
|
1196
1219
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/halo/dark';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-slider', styles: ':host{touch-action:manipulation;height:24px;margin:1px 0;opacity:.9;opacity:1}:host(:not([disabled]):hover){opacity:1}:host [part=track-wrapper]{height:4px;background:var(--track-color,#333);top:calc((100% - 4px)/ 2)}:host(:not([disabled])) [part=track-fill]{height:inherit;background:var(--thumb-color,#ccc);background-color:var(--thumb-color,#6678ff)}:host([disabled]) [part=thumb],:host([disabled]) [part=thumb]:hover,:host([disabled]) [part=track-fill],:host([disabled]) [part=track-wrapper]::after{background:#333;content:\'\'}:host [part=thumb-container]{height:100%;top:0;margin-left:-4px;width:8px}:host([focused=visible]) [part=thumb-container][active] [part=thumb]{outline:#334bff solid 1px;outline-offset:2px}:host([show-steps]) [part=step-container]{height:inherit}:host([show-steps]:not([disabled])) [part=step]{height:inherit;background-image:linear-gradient(to right,var(--step-color,#6678ff),var(--step-color,#6678ff) 4px,transparent 0,transparent)}:host([show-steps]:not([disabled])) [part=track-wrapper]::after{height:inherit;width:4px;background-color:var(--step-color,#6678ff)}:host [part=pin]{width:26px;height:26px;margin-top:-6px;margin-left:-2px;transform:rotate(-45deg) scale(0) translate(0);transition:transform .1s ease-out;border-radius:50% 50% 50% 0;background-color:var(--pin-color,#ccc);display:none}:host [part=pin-value-marker]{font-family:inherit;font-size:.8em;color:var(--pin-text-color,#fff);line-height:1.25rem;font-weight:400;letter-spacing:.01786em;text-decoration:inherit;text-transform:inherit;transform:rotate(45deg);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([pin].grabbable) [part=pin]{transform:rotate(-45deg) scale(1) translate(19px,-20px)}:host([pin].grabbable) [part=thumb]{transform:scale(.7);transform:none}:host [part=input]{margin:0;padding:0;width:var(--input-field-width,40px);min-width:40px;text-align:center;height:100%}:host [part=input][name=to],:host [part=input][name=value]{margin-left:16px}:host [part=input][name=from]{margin-right:16px}:host(:not([disabled]):not([readonly]):hover){cursor:pointer}:host [part=thumb]{box-sizing:border-box;transform:scale(.7);background:var(--thumb-color,#ccc);top:calc(4px / 2);border-radius:0;width:8px;height:20px;transform:none;border:1px solid #0d0d0d}:host(:not([disabled]):not([readonly]):not(.grabbable)) [part=thumb]:hover{background-color:var(--thumb-color,#1429bd);border-color:var(--thumb-color,#0d0d0d)}:host(.grabbable) [part=thumb]{border-width:2px;transform:scale(1);border:1px solid var(--thumb-color,#0d0d0d);background-color:var(--thumb-color,#0f1e8a);transform:none}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/halo/light';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-slider', styles: ':host{touch-action:manipulation;height:24px;margin:1px 0;opacity:.9;opacity:1}:host(:not([disabled]):hover){opacity:1}:host [part=track-wrapper]{height:4px;background:var(--track-color,#d9d9d9);top:calc((100% - 4px)/ 2)}:host(:not([disabled])) [part=track-fill]{height:inherit;background:var(--thumb-color,#fafafa);background-color:var(--thumb-color,#334bff)}:host([disabled]) [part=thumb],:host([disabled]) [part=thumb]:hover,:host([disabled]) [part=track-fill],:host([disabled]) [part=track-wrapper]::after{background:#d9d9d9;content:\'\'}:host [part=thumb-container]{height:100%;top:0;margin-left:-4px;width:8px}:host([focused=visible]) [part=thumb-container][active] [part=thumb]{outline:#334bff solid 1px;outline-offset:2px}:host([show-steps]) [part=step-container]{height:inherit}:host([show-steps]:not([disabled])) [part=step]{height:inherit;background-image:linear-gradient(to right,var(--step-color,#334bff),var(--step-color,#334bff) 4px,transparent 0,transparent)}:host([show-steps]:not([disabled])) [part=track-wrapper]::after{height:inherit;width:4px;background-color:var(--step-color,#334bff)}:host [part=pin]{width:26px;height:26px;margin-top:-6px;margin-left:-2px;transform:rotate(-45deg) scale(0) translate(0);transition:transform .1s ease-out;border-radius:50% 50% 50% 0;background-color:var(--pin-color,#fafafa);display:none}:host [part=pin-value-marker]{font-family:inherit;font-size:.8em;color:var(--pin-text-color,#fff);line-height:1.25rem;font-weight:400;letter-spacing:.01786em;text-decoration:inherit;text-transform:inherit;transform:rotate(45deg);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([pin].grabbable) [part=pin]{transform:rotate(-45deg) scale(1) translate(19px,-20px)}:host([pin].grabbable) [part=thumb]{transform:scale(.7);transform:none}:host [part=input]{margin:0;padding:0;width:var(--input-field-width,40px);min-width:40px;text-align:center;height:100%}:host [part=input][name=to],:host [part=input][name=value]{margin-left:16px}:host [part=input][name=from]{margin-right:16px}:host(:not([disabled]):not([readonly]):hover){cursor:pointer}:host [part=thumb]{box-sizing:border-box;transform:scale(.7);background:var(--thumb-color,#fafafa);top:calc(4px / 2);border-radius:0;width:8px;height:20px;transform:none;border:1px solid #404040}:host([disabled]) [part=thumb]{border-color:#ccc}:host(:not([disabled]):not([readonly]):not(.grabbable)) [part=thumb]:hover{background-color:var(--thumb-color,#1429bd);border-color:var(--thumb-color,#1429bd)}:host(.grabbable) [part=thumb]{border-width:2px;transform:scale(1);border:1px solid var(--thumb-color,#0f1e8a);background-color:var(--thumb-color,#0f1e8a);transform:none}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/solar/charcoal';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-slider', styles: ':host{touch-action:manipulation;height:23px;margin:1px 0;opacity:.9}:host(:not([disabled]):hover){opacity:1}:host [part=track-wrapper]{height:3px;background:var(--track-color,#666570)}:host(:not([disabled])) [part=track-fill]{height:inherit;background:var(--thumb-color,#f93)}:host([disabled]) [part=thumb],:host([disabled]) [part=thumb]:hover,:host([disabled]) [part=track-fill],:host([disabled]) [part=track-wrapper]::after{background:#666570;content:\'\'}:host [part=thumb-container]{width:22px;height:100%;margin-left:-9.5px}:host [part=thumb]{top:calc((100% - 20px + 3px)/ 2);height:20px;width:20px;box-sizing:border-box;border:3px solid transparent;border-radius:100%;transform:scale(.7);background:var(--thumb-color,#f93)}:host([focused=visible]) [part=thumb-container][active] [part=thumb]{outline:#f93 solid 1px;outline-offset:2px}:host(.grabbable) [part=thumb]{border-width:2px;transform:scale(1)}:host([show-steps]) [part=step-container]{height:inherit}:host([show-steps]:not([disabled])) [part=step]{height:inherit;background-image:linear-gradient(to right,var(--step-color,#f93),var(--step-color,#f93) 3px,transparent 0,transparent)}:host([show-steps]:not([disabled])) [part=track-wrapper]::after{height:inherit;width:3px;background-color:var(--step-color,#f93)}:host [part=pin]{width:26px;height:26px;margin-top:-6px;margin-left:-2px;transform:rotate(-45deg) scale(0) translate(0);transition:transform .1s ease-out;border-radius:50% 50% 50% 0;background-color:var(--pin-color,#f93)}:host [part=pin-value-marker]{font-family:inherit;font-size:.8em;color:var(--pin-text-color,#fff);line-height:1.25rem;font-weight:400;letter-spacing:.01786em;text-decoration:inherit;text-transform:inherit;transform:rotate(45deg);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([pin].grabbable) [part=pin]{transform:rotate(-45deg) scale(1) translate(19px,-20px)}:host([pin].grabbable) [part=thumb]{transform:scale(.7)}:host [part=input]{margin:0;padding:0;width:var(--input-field-width,40px);min-width:40px;text-align:center;height:100%}:host [part=input][name=to],:host [part=input][name=value]{margin-left:16px}:host [part=input][name=from]{margin-right:16px}' }}));
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/solar/pearl';
|
|
2
|
-
|
|
3
2
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-slider', styles: ':host{touch-action:manipulation;height:23px;margin:1px 0;opacity:.9}:host(:not([disabled]):hover){opacity:1}:host [part=track-wrapper]{height:3px;background:var(--track-color,#d5d8db)}:host(:not([disabled])) [part=track-fill]{height:inherit;background:var(--thumb-color,#f93)}:host([disabled]) [part=thumb],:host([disabled]) [part=thumb]:hover,:host([disabled]) [part=track-fill],:host([disabled]) [part=track-wrapper]::after{background:#d5d8db;content:\'\'}:host [part=thumb-container]{width:22px;height:100%;margin-left:-9.5px}:host [part=thumb]{top:calc((100% - 20px + 3px)/ 2);height:20px;width:20px;box-sizing:border-box;border:3px solid transparent;border-radius:100%;transform:scale(.7);background:var(--thumb-color,#f93)}:host([focused=visible]) [part=thumb-container][active] [part=thumb]{outline:#f93 solid 1px;outline-offset:2px}:host(.grabbable) [part=thumb]{border-width:2px;transform:scale(1)}:host([show-steps]) [part=step-container]{height:inherit}:host([show-steps]:not([disabled])) [part=step]{height:inherit;background-image:linear-gradient(to right,var(--step-color,#f93),var(--step-color,#f93) 3px,transparent 0,transparent)}:host([show-steps]:not([disabled])) [part=track-wrapper]::after{height:inherit;width:3px;background-color:var(--step-color,#f93)}:host [part=pin]{width:26px;height:26px;margin-top:-6px;margin-left:-2px;transform:rotate(-45deg) scale(0) translate(0);transition:transform .1s ease-out;border-radius:50% 50% 50% 0;background-color:var(--pin-color,#f93)}:host [part=pin-value-marker]{font-family:inherit;font-size:.8em;color:var(--pin-text-color,#fff);line-height:1.25rem;font-weight:400;letter-spacing:.01786em;text-decoration:inherit;text-transform:inherit;transform:rotate(45deg);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([pin].grabbable) [part=pin]{transform:rotate(-45deg) scale(1) translate(19px,-20px)}:host([pin].grabbable) [part=thumb]{transform:scale(.7)}:host [part=input]{margin:0;padding:0;width:var(--input-field-width,40px);min-width:40px;text-align:center;height:100%}:host [part=input][name=to],:host [part=input][name=value]{margin-left:16px}:host [part=input][name=from]{margin-right:16px}' }}));
|
package/lib/slider/utils.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
* Set prevent default action and stop bubbles event
|
|
3
|
+
* @param event event mouse or touch
|
|
4
|
+
* @returns {void}
|
|
5
|
+
*/
|
|
6
6
|
declare const preventDefault: (event: Event) => Event;
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
* Return value that never exceed the maximum boundary
|
|
9
|
+
* @param value value for check clamp
|
|
10
|
+
* @param min max value
|
|
11
|
+
* @param max min value
|
|
12
|
+
* @returns number between two numbers
|
|
13
|
+
*/
|
|
14
14
|
declare const clamp: (value: number, min: number, max: number) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Check if number is a decimal number
|
package/lib/slider/utils.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
* Set prevent default action and stop bubbles event
|
|
3
|
+
* @param event event mouse or touch
|
|
4
|
+
* @returns {void}
|
|
5
|
+
*/
|
|
6
6
|
const preventDefault = (event) => {
|
|
7
7
|
event.preventDefault();
|
|
8
8
|
event.stopPropagation();
|
|
9
9
|
return event;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
* Return value that never exceed the maximum boundary
|
|
13
|
+
* @param value value for check clamp
|
|
14
|
+
* @param min max value
|
|
15
|
+
* @param max min value
|
|
16
|
+
* @returns number between two numbers
|
|
17
|
+
*/
|
|
18
18
|
const clamp = function (value, min, max) {
|
|
19
19
|
return Math.max(min, Math.min(value, max)).toString();
|
|
20
20
|
};
|
package/lib/sparkline/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { CSSResultGroup, PropertyValues, ResponsiveElement, TemplateResult
|
|
2
|
+
import { CSSResultGroup, ElementSize, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '@refinitiv-ui/browser-sparkline';
|
|
4
4
|
import type { BrowserSparklineChart } from '@refinitiv-ui/browser-sparkline';
|
|
5
5
|
import type { ThemeConfig } from '@refinitiv-ui/browser-sparkline/lib/browserSparklineCanvas';
|
package/lib/sparkline/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { ResponsiveElement, 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 { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
|
-
import { color } from '@refinitiv-ui/utils/color.js';
|
|
8
6
|
import '@refinitiv-ui/browser-sparkline';
|
|
7
|
+
import { color } from '@refinitiv-ui/utils/color.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
9
|
let Sparkline = class Sparkline extends ResponsiveElement {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -145,13 +145,14 @@ let Sparkline = class Sparkline extends ResponsiveElement {
|
|
|
145
145
|
display: block;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
browser-sparkline-chart,
|
|
148
|
+
browser-sparkline-chart,
|
|
149
|
+
browser-sparkline-canvas {
|
|
149
150
|
width: 100%;
|
|
150
151
|
height: 100%;
|
|
151
152
|
display: block;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
[part=chart] {
|
|
155
|
+
[part='chart'] {
|
|
155
156
|
height: 100%;
|
|
156
157
|
}
|
|
157
158
|
`;
|
|
@@ -162,9 +163,7 @@ let Sparkline = class Sparkline extends ResponsiveElement {
|
|
|
162
163
|
* @return Render template
|
|
163
164
|
*/
|
|
164
165
|
render() {
|
|
165
|
-
return html `
|
|
166
|
-
<browser-sparkline-chart part="chart" id="sparkline"></browser-sparkline-chart>
|
|
167
|
-
`;
|
|
166
|
+
return html ` <browser-sparkline-chart part="chart" id="sparkline"></browser-sparkline-chart> `;
|
|
168
167
|
}
|
|
169
168
|
};
|
|
170
169
|
__decorate([
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-sparkline', styles: ':host{min-height:30px;--line-color:#6678FF;--line-width:3px;--reference-line-color:rgba(38, 38, 38, 0.5);--upper-line-color:#39C46E;--lower-line-color:#F5475B;--line-width:1px}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-sparkline', styles: ':host{min-height:30px;--line-color:#334BFF;--line-width:3px;--reference-line-color:rgba(242, 242, 242, 0.5);--upper-line-color:#246B3E;--lower-line-color:#B63243;--line-width:1px}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-sparkline', styles: ':host{min-height:30px;--line-color:#FF9933;--line-width:3px;--reference-line-color:rgba(10, 10, 10, 0.5);--upper-line-color:#39C46E;--lower-line-color:#F5475B;--line-width:2px}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-sparkline', styles: ':host{min-height:30px;--line-color:#EE7600;--line-width:3px;--reference-line-color:rgba(213, 216, 219, 0.5);--upper-line-color:#309054;--lower-line-color:#D94255;--line-width:2px}' }}));
|
|
@@ -75,7 +75,7 @@ const draw = (drawData, drawCtx, drawParams) => {
|
|
|
75
75
|
ctx.setLineDash([5, 3]);
|
|
76
76
|
}
|
|
77
77
|
ctx.moveTo(data.width / 2, data.height - data.size * data.gaugeLowerBound);
|
|
78
|
-
ctx.lineTo(data.width / 2, data.height -
|
|
78
|
+
ctx.lineTo(data.width / 2, data.height - data.size * data.gaugeUpperBound + style.strokeWidth);
|
|
79
79
|
ctx.strokeStyle = style.centerlineColor;
|
|
80
80
|
ctx.stroke();
|
|
81
81
|
ctx.restore();
|
|
@@ -89,7 +89,7 @@ const elasticOut = ((amplitude, period) => {
|
|
|
89
89
|
return time;
|
|
90
90
|
}
|
|
91
91
|
const s = (period / pi2) * Math.asin(1 / amplitude);
|
|
92
|
-
return
|
|
92
|
+
return amplitude * Math.pow(2, -10 * time) * Math.sin(((time - s) * pi2) / period) + 1;
|
|
93
93
|
};
|
|
94
94
|
})(1.2, 0.5);
|
|
95
95
|
const textWidth = (drawCtx, text, fontSize, fontFamily) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '../canvas/index.js';
|
|
4
4
|
import '../label/index.js';
|
|
5
5
|
import type { SwingGaugeCanvasSize, SwingGaugeValueFormatter } from './types';
|
|
@@ -47,12 +47,12 @@ export declare class SwingGauge extends ResponsiveElement {
|
|
|
47
47
|
*/
|
|
48
48
|
duration: number;
|
|
49
49
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
* Primary value legend
|
|
51
|
+
*/
|
|
52
52
|
primaryLegend: string;
|
|
53
53
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
* Secondary value legend
|
|
55
|
+
*/
|
|
56
56
|
secondaryLegend: string;
|
|
57
57
|
/**
|
|
58
58
|
* Custom value formatter
|
|
@@ -74,36 +74,36 @@ export declare class SwingGauge extends ResponsiveElement {
|
|
|
74
74
|
private primaryLineRadian;
|
|
75
75
|
private secondaryLineRadian;
|
|
76
76
|
/**
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
* Data requires to draw swing gauge
|
|
78
|
+
*/
|
|
79
79
|
private data;
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
* Internal sizes and scales
|
|
82
|
+
*/
|
|
83
83
|
private width;
|
|
84
84
|
private height;
|
|
85
85
|
private size;
|
|
86
86
|
private lineLength;
|
|
87
87
|
private scale;
|
|
88
88
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
* Current fill percentage
|
|
90
|
+
*/
|
|
91
91
|
private fillPercentage;
|
|
92
92
|
/**
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
* Keeps previous percentage calculation to avoid re-rendering the same value
|
|
94
|
+
*/
|
|
95
95
|
private previousFillPercentage;
|
|
96
96
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
* This for keep line number of label for calculate new radius
|
|
98
|
+
*/
|
|
99
99
|
private labelLineNumber;
|
|
100
100
|
/**
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
* Get primary percentage
|
|
102
|
+
*/
|
|
103
103
|
private get primaryPercentage();
|
|
104
104
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
* Get secondary percentage
|
|
106
|
+
*/
|
|
107
107
|
private get secondaryPercentage();
|
|
108
108
|
/**
|
|
109
109
|
* Check width and height are valid
|