@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/time-picker/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var TimePicker_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
|
-
import { ControlElement,
|
|
4
|
-
import { guard } from '@refinitiv-ui/core/directives/guard.js';
|
|
3
|
+
import { ControlElement, css, html, nothing } from '@refinitiv-ui/core';
|
|
5
4
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
6
5
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
7
|
-
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
8
6
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
8
|
+
import { guard } from '@refinitiv-ui/core/directives/guard.js';
|
|
9
|
+
import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
|
|
10
|
+
import { translate } from '@refinitiv-ui/translate';
|
|
11
11
|
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
12
|
+
import { MILLISECONDS_IN_HOUR, MILLISECONDS_IN_MINUTE, MILLISECONDS_IN_SECOND, TimeFormat, addOffset, format, getFormat, isAM, isPM, isValidTime, padNumber, parse, toTimeSegment } from '@refinitiv-ui/utils/date.js';
|
|
12
13
|
import '../number-field/index.js';
|
|
13
|
-
import {
|
|
14
|
-
import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
|
|
14
|
+
import { VERSION } from '../version.js';
|
|
15
15
|
var Segment;
|
|
16
16
|
(function (Segment) {
|
|
17
17
|
Segment["HOURS"] = "hours";
|
|
@@ -163,9 +163,9 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
163
163
|
return this._seconds;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
* Value of the element
|
|
167
|
+
* @param value Element value
|
|
168
|
+
*/
|
|
169
169
|
set value(value) {
|
|
170
170
|
const oldValue = this.value;
|
|
171
171
|
value = this.castValue(value);
|
|
@@ -181,7 +181,8 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
181
181
|
this.seconds = null;
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
-
if (oldValue !== value) {
|
|
184
|
+
if (oldValue !== value) {
|
|
185
|
+
/** never store actual value, instead operate with hours/minutes/seconds */
|
|
185
186
|
const info = toTimeSegment(value);
|
|
186
187
|
const format = getFormat(value);
|
|
187
188
|
this.valueWithSeconds = format === TimeFormat.HHmmss || format === TimeFormat.HHmmssSSS;
|
|
@@ -234,8 +235,12 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
234
235
|
const _hours = this.hours;
|
|
235
236
|
let hours = _hours;
|
|
236
237
|
if (_hours !== null) {
|
|
237
|
-
hours =
|
|
238
|
-
|
|
238
|
+
hours =
|
|
239
|
+
this.amPm && _hours > HOURS_OF_NOON
|
|
240
|
+
? _hours - HOURS_OF_NOON
|
|
241
|
+
: this.amPm && !_hours
|
|
242
|
+
? HOURS_OF_NOON
|
|
243
|
+
: _hours;
|
|
239
244
|
}
|
|
240
245
|
return hours;
|
|
241
246
|
}
|
|
@@ -355,7 +360,9 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
355
360
|
if (segment === Segment.HOURS && this.minutes === null) {
|
|
356
361
|
this.minutes = 0;
|
|
357
362
|
}
|
|
358
|
-
if (this.isShowSeconds &&
|
|
363
|
+
if (this.isShowSeconds &&
|
|
364
|
+
this.seconds === null &&
|
|
365
|
+
(segment === Segment.HOURS || segment === Segment.MINUTES)) {
|
|
359
366
|
this.seconds = 0;
|
|
360
367
|
}
|
|
361
368
|
}
|
|
@@ -371,9 +378,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
371
378
|
* @returns True if changed
|
|
372
379
|
*/
|
|
373
380
|
static hasTimeChanged(changedProperties) {
|
|
374
|
-
return changedProperties.has('hours')
|
|
375
|
-
|| changedProperties.has('minutes')
|
|
376
|
-
|| changedProperties.has('seconds');
|
|
381
|
+
return (changedProperties.has('hours') || changedProperties.has('minutes') || changedProperties.has('seconds'));
|
|
377
382
|
}
|
|
378
383
|
/**
|
|
379
384
|
* Validates a given unit against a min and max value, returning a fallback if invalid.
|
|
@@ -683,7 +688,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
683
688
|
flex-flow: row nowrap;
|
|
684
689
|
align-items: center;
|
|
685
690
|
justify-content: center;
|
|
686
|
-
user-select:none;
|
|
691
|
+
user-select: none;
|
|
687
692
|
position: relative;
|
|
688
693
|
}
|
|
689
694
|
input {
|
|
@@ -703,19 +708,20 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
703
708
|
get hoursTemplate() {
|
|
704
709
|
const hours = this.formattedHours;
|
|
705
710
|
return html `<ef-number-field
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
711
|
+
id="hours"
|
|
712
|
+
part="input"
|
|
713
|
+
aria-label="${!isIE ? this.t('SELECT_HOURS', { value: this.periodHours }) : nothing}"
|
|
714
|
+
no-spinner
|
|
715
|
+
transparent
|
|
716
|
+
min="${this.amPm ? 1 : MIN_UNIT}"
|
|
717
|
+
max="${this.amPm ? HOURS_OF_NOON : MAX_HOURS}"
|
|
718
|
+
.value="${hours}"
|
|
719
|
+
placeholder="${hours ? nothing : Placeholder.HOURS}"
|
|
720
|
+
?disabled="${this.disabled}"
|
|
721
|
+
?readonly="${this.readonly}"
|
|
722
|
+
@value-changed="${this.onInputValueChanged}"
|
|
723
|
+
@focused-changed=${this.onInputFocusedChanged}
|
|
724
|
+
></ef-number-field>`;
|
|
719
725
|
}
|
|
720
726
|
/**
|
|
721
727
|
* Template for Minutes Segment
|
|
@@ -724,19 +730,20 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
724
730
|
get minutesTemplate() {
|
|
725
731
|
const minutes = this.formattedMinutes;
|
|
726
732
|
return html `<ef-number-field
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
733
|
+
id="minutes"
|
|
734
|
+
aria-label="${!isIE ? this.t('SELECT_MINUTES', { value: this.minutes }) : nothing}"
|
|
735
|
+
part="input"
|
|
736
|
+
no-spinner
|
|
737
|
+
min="${MIN_UNIT}"
|
|
738
|
+
max="${MAX_MINUTES}"
|
|
739
|
+
.value="${minutes}"
|
|
740
|
+
placeholder="${minutes ? nothing : Placeholder.MINUTES}"
|
|
741
|
+
?readonly="${this.readonly}"
|
|
742
|
+
?disabled="${this.disabled}"
|
|
743
|
+
transparent
|
|
744
|
+
@value-changed="${this.onInputValueChanged}"
|
|
745
|
+
@focused-changed=${this.onInputFocusedChanged}
|
|
746
|
+
></ef-number-field>`;
|
|
740
747
|
}
|
|
741
748
|
/**
|
|
742
749
|
* Template for Seconds Segment
|
|
@@ -744,21 +751,21 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
744
751
|
*/
|
|
745
752
|
get secondsTemplate() {
|
|
746
753
|
const seconds = this.formattedSeconds;
|
|
747
|
-
return html `
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
754
|
+
return html ` <ef-number-field
|
|
755
|
+
id="seconds"
|
|
756
|
+
part="input"
|
|
757
|
+
aria-label="${!isIE ? this.t('SELECT_SECONDS', { value: this.seconds }) : nothing}"
|
|
758
|
+
no-spinner
|
|
759
|
+
min="${MIN_UNIT}"
|
|
760
|
+
max="${MAX_SECONDS}"
|
|
761
|
+
.value="${seconds}"
|
|
762
|
+
placeholder="${seconds ? nothing : Placeholder.SECONDS}"
|
|
763
|
+
?readonly="${this.readonly}"
|
|
764
|
+
?disabled="${this.disabled}"
|
|
765
|
+
transparent
|
|
766
|
+
@value-changed="${this.onInputValueChanged}"
|
|
767
|
+
@focused-changed=${this.onInputFocusedChanged}
|
|
768
|
+
></ef-number-field>`;
|
|
762
769
|
}
|
|
763
770
|
/**
|
|
764
771
|
* Template for AmPm Segment
|
|
@@ -766,35 +773,45 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
766
773
|
*/
|
|
767
774
|
get getAmPmHtml() {
|
|
768
775
|
const hasHours = this.hours !== null;
|
|
769
|
-
return this.amPm
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
776
|
+
return this.amPm
|
|
777
|
+
? html `
|
|
778
|
+
<div
|
|
779
|
+
role="listbox"
|
|
780
|
+
aria-label="${this.t('TOGGLE_TIME_PERIOD')}"
|
|
781
|
+
aria-activedescendant="${hasHours ? (this.isAM() ? 'toggle-am' : 'toggle-pm') : nothing}"
|
|
782
|
+
id="toggle"
|
|
783
|
+
part="toggle"
|
|
784
|
+
@tap=${this.toggle}
|
|
785
|
+
tabindex="0"
|
|
786
|
+
>
|
|
787
|
+
<div
|
|
788
|
+
aria-label="${this.t('BEFORE_MIDDAY')}"
|
|
789
|
+
role="option"
|
|
790
|
+
id="toggle-am"
|
|
791
|
+
part="toggle-item"
|
|
792
|
+
?active=${hasHours && this.isAM()}
|
|
793
|
+
>
|
|
794
|
+
AM
|
|
795
|
+
</div>
|
|
796
|
+
<div
|
|
797
|
+
aria-label="${this.t('AFTER_MIDDAY')}"
|
|
798
|
+
role="option"
|
|
799
|
+
id="toggle-pm"
|
|
800
|
+
part="toggle-item"
|
|
801
|
+
?active=${hasHours && this.isPM()}
|
|
802
|
+
>
|
|
803
|
+
PM
|
|
804
|
+
</div>
|
|
805
|
+
</div>
|
|
806
|
+
`
|
|
807
|
+
: null;
|
|
791
808
|
}
|
|
792
809
|
/**
|
|
793
810
|
* Native input's template for mobile
|
|
794
811
|
* @returns input
|
|
795
812
|
*/
|
|
796
813
|
get nativeInputForMobile() {
|
|
797
|
-
return this.isMobile ? html `<input id="mtp" type="time" @change=${this.onMobileTimeChange}
|
|
814
|
+
return this.isMobile ? html `<input id="mtp" type="time" @change=${this.onMobileTimeChange} />` : null;
|
|
798
815
|
}
|
|
799
816
|
/**
|
|
800
817
|
* A template used to notify currently selected value for screen readers
|
|
@@ -815,18 +832,16 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
815
832
|
value: value ? parse(value) : null,
|
|
816
833
|
showSeconds,
|
|
817
834
|
amPm
|
|
818
|
-
})}"
|
|
835
|
+
})}"
|
|
836
|
+
></div>`;
|
|
819
837
|
}
|
|
820
838
|
/**
|
|
821
839
|
* Get time input template
|
|
822
840
|
* @returns template result
|
|
823
841
|
*/
|
|
824
842
|
get inputTemplate() {
|
|
825
|
-
return html `
|
|
826
|
-
|
|
827
|
-
${TimePicker_1.dividerTemplate}
|
|
828
|
-
${this.minutesTemplate}
|
|
829
|
-
${this.isShowSeconds ? html `${TimePicker_1.dividerTemplate}${this.secondsTemplate}` : undefined}`;
|
|
843
|
+
return html ` ${this.hoursTemplate} ${TimePicker_1.dividerTemplate} ${this.minutesTemplate}
|
|
844
|
+
${this.isShowSeconds ? html `${TimePicker_1.dividerTemplate}${this.secondsTemplate}` : undefined}`;
|
|
830
845
|
}
|
|
831
846
|
/**
|
|
832
847
|
* A `TemplateResult` that will be used
|
|
@@ -835,8 +850,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
835
850
|
*/
|
|
836
851
|
render() {
|
|
837
852
|
return html `
|
|
838
|
-
${this.inputTemplate}
|
|
839
|
-
${guard([this.value, this.lang, this.amPm], () => this.getAmPmHtml)}
|
|
853
|
+
${this.inputTemplate} ${guard([this.value, this.lang, this.amPm], () => this.getAmPmHtml)}
|
|
840
854
|
${guard([this.isMobile], () => this.nativeInputForMobile)}
|
|
841
855
|
${guard([this.value, this.lang, this.showSeconds, this.amPm, this.announceValues], () => this.selectionTemplate)}
|
|
842
856
|
`;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/halo/dark';
|
|
2
2
|
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
3
3
|
import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
|
|
4
|
-
|
|
5
4
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#ccc;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(64,64,64,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}' }}));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/halo/light';
|
|
2
2
|
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
3
3
|
import '@refinitiv-ui/elements/tooltip/themes/halo/light';
|
|
4
|
-
|
|
5
4
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#404040;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(89,89,89,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}' }}));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/solar/charcoal';
|
|
2
2
|
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
3
3
|
import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
|
|
4
|
-
|
|
5
4
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#000;border:1px solid #4a4a52;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #f93;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#f93}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}' }}));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/number-field/themes/solar/pearl';
|
|
2
2
|
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
3
3
|
import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
|
|
4
|
-
|
|
5
4
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#fff;border:1px solid #a9afba;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #ffb266;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#ffb266}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}' }}));
|
package/lib/toggle/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Form control that can toggle between 2 states
|
|
5
5
|
*
|
package/lib/toggle/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ControlElement,
|
|
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
5
|
import { VERSION } from '../version.js';
|
|
@@ -110,8 +110,9 @@ let Toggle = class Toggle extends ControlElement {
|
|
|
110
110
|
* @return Render template
|
|
111
111
|
*/
|
|
112
112
|
render() {
|
|
113
|
-
return html `
|
|
114
|
-
|
|
113
|
+
return html ` <div part="toggle">
|
|
114
|
+
${this.checked && this.checkedLabel ? this.checkedLabel : this.label}
|
|
115
|
+
</div>`;
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
__decorate([
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:12px;background-color:#0d0d0d;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.5);transition:box-shadow .1s,border-color .1s;width:44px;height:24px;font-weight:400;color:#ccc;line-height:18px;text-transform:uppercase}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #4d4d4d;border-radius:inherit;text-overflow:inherit;overflow:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host [part=toggle]::after{content:\'\';position:absolute;box-sizing:border-box;border-radius:inherit;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#ccc}:host([checked-label]),:host([label]){min-width:52px;width:54px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{left:auto;border-color:#334bff;background-color:#334bff;right:1px}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #334bff}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#334bff}:host(:hover:not([readonly])){color:#fff}:host(:hover:not([readonly])) [part=toggle]{border-color:#1429bd}:host(:hover:not([readonly])) [part=toggle]::after{background-color:#1429bd;border-color:#1429bd}}:host([checked]){color:#fff}:host([disabled]) [part=toggle]::after{opacity:.2}:host [part=toggle]::after,:host([checked]) [part=toggle]::after{border:1px solid #0d0d0d}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:12px;background-color:#0d0d0d;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.5);transition:box-shadow .1s,border-color .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:44px;height:24px;font-weight:400;color:#ccc;line-height:18px;text-transform:uppercase}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #4d4d4d;border-radius:inherit;text-overflow:inherit;overflow:inherit}:host [part=toggle]::after{content:\'\';position:absolute;box-sizing:border-box;border-radius:inherit;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#ccc}:host([checked-label]),:host([label]){min-width:52px;width:54px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{left:auto;border-color:#334bff;background-color:#334bff;right:1px}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #334bff}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#334bff}:host(:hover:not([readonly])){color:#fff}:host(:hover:not([readonly])) [part=toggle]{border-color:#1429bd}:host(:hover:not([readonly])) [part=toggle]::after{background-color:#1429bd;border-color:#1429bd}}:host([checked]){color:#fff}:host([disabled]) [part=toggle]::after{opacity:.2}:host [part=toggle]::after,:host([checked]) [part=toggle]::after{border:1px solid #0d0d0d}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:12px;background-color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.25);transition:box-shadow .1s,border-color .1s;width:44px;height:24px;font-weight:600;color:#0d0d0d;line-height:18px;text-transform:uppercase}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:inherit;text-overflow:inherit;overflow:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host [part=toggle]::after{content:\'\';position:absolute;box-sizing:border-box;border-radius:inherit;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#0d0d0d}:host([checked-label]),:host([label]){min-width:52px;width:54px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{left:auto;border-color:#334bff;background-color:#334bff;right:1px}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #334bff}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#334bff}:host(:hover:not([readonly])){color:#0d0d0d}:host(:hover:not([readonly])) [part=toggle]{border-color:#1429bd}:host(:hover:not([readonly])) [part=toggle]::after{background-color:#1429bd;border-color:#1429bd}}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:12px;background-color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.25);transition:box-shadow .1s,border-color .1s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:44px;height:24px;font-weight:600;color:#0d0d0d;line-height:18px;text-transform:uppercase}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #ccc;border-radius:inherit;text-overflow:inherit;overflow:inherit}:host [part=toggle]::after{content:\'\';position:absolute;box-sizing:border-box;border-radius:inherit;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#0d0d0d}:host([checked-label]),:host([label]){min-width:52px;width:54px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{left:auto;border-color:#334bff;background-color:#334bff;right:1px}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #334bff}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#334bff}:host(:hover:not([readonly])){color:#0d0d0d}:host(:hover:not([readonly])) [part=toggle]{border-color:#1429bd}:host(:hover:not([readonly])) [part=toggle]::after{background-color:#1429bd;border-color:#1429bd}}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:13px;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.6);transition:box-shadow .2s,border-color .2s;width:44px;height:24px;color:#e2e2e2;background-color:#000;line-height:18px}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #4a4a52;border-radius:inherit;text-overflow:inherit;overflow:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host [part=toggle]::after{content:\'\';position:absolute;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#555d6c;box-sizing:border-box;border-radius:inherit}:host([checked-label]),:host([label]){width:67.6px;min-width:52px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{right:1px;left:auto;border-color:#f93;background-color:#f93}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #f93}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#f93}}:host [part=toggle] ::after{top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}:host([checked]) [part=toggle] ::after{right:1px}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-style:dotted}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:13px;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.6);transition:box-shadow .2s,border-color .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:44px;height:24px;color:#e2e2e2;background-color:#000;line-height:18px}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #4a4a52;border-radius:inherit;text-overflow:inherit;overflow:inherit}:host [part=toggle]::after{content:\'\';position:absolute;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#555d6c;box-sizing:border-box;border-radius:inherit}:host([checked-label]),:host([label]){width:67.6px;min-width:52px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{right:1px;left:auto;border-color:#f93;background-color:#f93}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #f93}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#f93}}:host [part=toggle] ::after{top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}:host([checked]) [part=toggle] ::after{right:1px}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-style:dotted}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:13px;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.3);transition:box-shadow .2s,border-color .2s;width:44px;height:24px;color:#484848;background-color:#fff;line-height:18px}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #a9afba;border-radius:inherit;text-overflow:inherit;overflow:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host [part=toggle]::after{content:\'\';position:absolute;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#d4d7dd;box-sizing:border-box;border-radius:inherit}:host([checked-label]),:host([label]){width:67.6px;min-width:52px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{right:1px;left:auto;border-color:#f93;background-color:#f93}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #ffb266}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#ffb266}}:host [part=toggle] ::after{top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-image:linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.1) 100%)}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}:host([checked]) [part=toggle] ::after{right:1px}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-style:dotted}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-toggle', styles: ':host{touch-action:manipulation;font-size:13px;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0;border-radius:0;box-shadow:inset 0 0 0 rgba(0,0,0,.3);transition:box-shadow .2s,border-color .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:44px;height:24px;color:#484848;background-color:#fff;line-height:18px}:host [part=toggle]{cursor:pointer;display:block;position:relative;width:100%;height:100%;box-sizing:border-box;border:1px solid #a9afba;border-radius:inherit;text-overflow:inherit;overflow:inherit}:host [part=toggle]::after{content:\'\';position:absolute;top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-color:#d4d7dd;box-sizing:border-box;border-radius:inherit}:host([checked-label]),:host([label]){width:67.6px;min-width:52px;min-width:44px}:host([readonly]) [part=toggle]{cursor:default}:host([disabled]) [part=toggle]{opacity:.5}:host([checked]) [part=toggle]::after{right:1px;left:auto;border-color:#f93;background-color:#f93}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover:not([readonly])),:host([focused=visible]){box-shadow:0 0 0 #ffb266}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-color:#ffb266}}:host [part=toggle] ::after{top:1px;left:1px;width:calc(50% - 1px);height:calc(100% - (1px * 2));background-image:linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.1) 100%)}:host([checked-label][checked]) [part=toggle],:host([label][checked]) [part=toggle]{padding-right:24px;padding-left:3px}:host([checked-label]) [part=toggle],:host([label]) [part=toggle]{padding:3px 3px 3px 24px}:host([checked-label]) [part=toggle]::after,:host([label]) [part=toggle]::after{width:20px}:host([checked]) [part=toggle] ::after{right:1px}:host(:hover:not([readonly])) [part=toggle],:host([focused=visible]) [part=toggle]{border-style:dotted}' }}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { matches } from '@refinitiv-ui/core';
|
|
2
|
-
import { addTooltipCondition } from './tooltip-element.js';
|
|
3
2
|
import { tooltipRenderer } from '../helpers/renderer.js';
|
|
3
|
+
import { addTooltipCondition } from './tooltip-element.js';
|
|
4
4
|
// Support title attribute
|
|
5
5
|
Object.defineProperty(HTMLElement.prototype, 'title', {
|
|
6
6
|
get: function () {
|
|
@@ -15,4 +15,4 @@ Object.defineProperty(HTMLElement.prototype, 'title', {
|
|
|
15
15
|
this.setAttribute('tooltip', value);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
addTooltipCondition(element => matches(element, '[title]'), tooltipRenderer);
|
|
18
|
+
addTooltipCondition((element) => matches(element, '[title]'), tooltipRenderer);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A default renderer that renders `tooltip`
|
|
2
|
+
* A default renderer that renders `tooltip` or `data-tooltip` attributes
|
|
3
3
|
* @param target Target to check
|
|
4
4
|
* @returns tooltip or null or undefined
|
|
5
5
|
*/
|
|
6
6
|
const tooltipRenderer = (target) => {
|
|
7
|
-
if (target.hasAttribute('tooltip')) {
|
|
8
|
-
return target.getAttribute('tooltip');
|
|
7
|
+
if (target.hasAttribute('tooltip') || target.hasAttribute('data-tooltip')) {
|
|
8
|
+
return target.getAttribute('tooltip') || target.getAttribute('data-tooltip');
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
export { tooltipRenderer };
|
package/lib/tooltip/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '../overlay/index.js';
|
|
4
|
-
import type { OverlayTransitionStyle as TooltipTransitionStyle } from '../overlay';
|
|
5
4
|
import './elements/title-tooltip.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { deregister as deregisterOverflowTooltip, register as registerOverflowTooltip } from './helpers/overflow-tooltip.js';
|
|
6
|
+
import { TooltipCondition, TooltipPosition, TooltipRenderer } from './helpers/types.js';
|
|
7
|
+
import type { OverlayTransitionStyle as TooltipTransitionStyle } from '../overlay';
|
|
8
8
|
/**
|
|
9
9
|
* Tooltip displays extra information when the
|
|
10
10
|
* user hovers the pointer over an item.
|
|
@@ -44,37 +44,37 @@ declare class Tooltip extends BasicElement {
|
|
|
44
44
|
*/
|
|
45
45
|
private static elementHasMoved;
|
|
46
46
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
* CSS selector to match the tooltip
|
|
48
|
+
*/
|
|
49
49
|
selector: string;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
* Provide a function to test against the target.
|
|
52
|
+
* Return `true` if the target matches
|
|
53
|
+
* @type {TooltipCondition}
|
|
54
|
+
*/
|
|
55
55
|
condition: TooltipCondition | undefined;
|
|
56
56
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
* A renderer to define tooltip internal content.
|
|
58
|
+
* Return undefined, `String`, `HTMLElement` or `DocumentFragment`.
|
|
59
|
+
* If the content is not present, tooltip will not be displayed
|
|
60
|
+
* @type {TooltipRenderer}
|
|
61
|
+
*/
|
|
62
62
|
renderer: TooltipRenderer | undefined;
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
* The position of the tooltip. Use the following values:
|
|
65
|
+
* `auto` (default) - display based on mouse enter coordinates
|
|
66
|
+
* `above` - display above the element
|
|
67
|
+
* `right` - display to the right of the element
|
|
68
|
+
* `below` - display beneath the element
|
|
69
|
+
* `left` - display to the left of the element
|
|
70
|
+
*/
|
|
71
71
|
position: 'auto' | 'above' | 'right' | 'below' | 'left';
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
* Set the transition style.
|
|
74
|
+
* Value can be `fade`, `zoom`, `slide-down`, `slide-up`, `slide-right`,
|
|
75
|
+
* `slide-left`, `slide-right-down`, `slide-right-up`, `slide-left-down`, `slide-left-up`, or null in case of no transition
|
|
76
|
+
* @type {TooltipTransitionStyle}
|
|
77
|
+
*/
|
|
78
78
|
transitionStyle: TooltipTransitionStyle | null;
|
|
79
79
|
/**
|
|
80
80
|
* Get tooltip popup window
|