@refinitiv-ui/elements 5.12.2 → 6.0.0-next.2
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/README.md +4 -4
- package/lib/accordion/index.d.ts +5 -0
- package/lib/accordion/index.js +2 -2
- package/lib/accordion/themes/halo/dark/index.js +1 -1
- package/lib/accordion/themes/halo/light/index.js +1 -1
- package/lib/accordion/themes/solar/charcoal/index.js +1 -1
- package/lib/accordion/themes/solar/pearl/index.js +1 -1
- package/lib/appstate-bar/index.d.ts +11 -0
- package/lib/appstate-bar/index.js +8 -3
- package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
- package/lib/appstate-bar/themes/halo/light/index.js +1 -1
- package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
- package/lib/autosuggest/index.d.ts +5 -0
- package/lib/autosuggest/index.js +22 -12
- package/lib/autosuggest/themes/halo/dark/index.js +3 -3
- package/lib/autosuggest/themes/halo/light/index.js +3 -3
- package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
- package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
- package/lib/button/index.d.ts +7 -13
- package/lib/button/index.js +8 -43
- package/lib/button/themes/halo/dark/index.js +1 -1
- package/lib/button/themes/halo/light/index.js +1 -1
- package/lib/button/themes/solar/charcoal/index.js +1 -1
- package/lib/button/themes/solar/pearl/index.js +1 -1
- package/lib/button-bar/index.d.ts +5 -0
- package/lib/button-bar/index.js +4 -5
- package/lib/button-bar/themes/halo/dark/index.js +1 -1
- package/lib/button-bar/themes/halo/light/index.js +1 -1
- package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/button-bar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/constants.js +1 -1
- package/lib/calendar/index.d.ts +6 -1
- package/lib/calendar/index.js +39 -15
- package/lib/calendar/locales.js +5 -5
- package/lib/calendar/themes/halo/dark/index.js +1 -1
- package/lib/calendar/themes/halo/light/index.js +1 -1
- package/lib/calendar/themes/solar/charcoal/index.js +1 -1
- package/lib/calendar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/types.d.ts +1 -1
- package/lib/calendar/utils.js +5 -5
- package/lib/canvas/index.d.ts +5 -0
- package/lib/canvas/index.js +3 -4
- package/lib/card/index.d.ts +21 -0
- package/lib/card/index.js +37 -15
- package/lib/card/themes/halo/dark/index.js +3 -3
- package/lib/card/themes/halo/light/index.js +3 -3
- package/lib/card/themes/solar/charcoal/index.js +3 -3
- package/lib/card/themes/solar/pearl/index.js +3 -3
- package/lib/chart/index.d.ts +5 -0
- package/lib/chart/index.js +18 -22
- package/lib/chart/plugins/doughnut-center-label.js +6 -11
- package/lib/chart/themes/halo/dark/index.js +2 -2
- package/lib/chart/themes/halo/light/index.js +2 -2
- package/lib/chart/themes/solar/charcoal/index.js +2 -2
- package/lib/chart/themes/solar/pearl/index.js +2 -2
- package/lib/checkbox/index.d.ts +5 -0
- package/lib/checkbox/index.js +3 -3
- package/lib/checkbox/themes/halo/dark/index.js +2 -2
- package/lib/checkbox/themes/halo/light/index.js +2 -2
- package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
- package/lib/checkbox/themes/solar/pearl/index.js +2 -2
- package/lib/clock/index.d.ts +5 -0
- package/lib/clock/index.js +6 -6
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/index.d.ts +5 -0
- package/lib/collapse/index.js +7 -9
- package/lib/collapse/themes/halo/dark/index.js +3 -3
- package/lib/collapse/themes/halo/light/index.js +3 -3
- package/lib/collapse/themes/solar/charcoal/index.js +3 -3
- package/lib/collapse/themes/solar/pearl/index.js +3 -3
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/color-palettes.js +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
- package/lib/color-dialog/elements/palettes.js +4 -5
- package/lib/color-dialog/helpers/value-model.js +1 -1
- package/lib/color-dialog/index.d.ts +6 -1
- package/lib/color-dialog/index.js +17 -12
- package/lib/color-dialog/themes/halo/dark/index.js +5 -5
- package/lib/color-dialog/themes/halo/light/index.js +5 -5
- package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
- package/lib/combo-box/helpers/filter.d.ts +1 -1
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -4
- package/lib/combo-box/index.js +31 -14
- package/lib/combo-box/themes/halo/dark/index.js +5 -5
- package/lib/combo-box/themes/halo/light/index.js +5 -5
- package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
- package/lib/combo-box/themes/solar/pearl/index.js +5 -5
- package/lib/counter/index.d.ts +11 -6
- package/lib/counter/index.js +8 -8
- package/lib/counter/themes/halo/dark/index.js +1 -1
- package/lib/counter/themes/halo/light/index.js +1 -1
- package/lib/counter/themes/solar/charcoal/index.js +1 -1
- package/lib/counter/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-field/constants.d.ts +4 -0
- package/lib/datetime-field/constants.js +5 -0
- package/lib/datetime-field/custom-elements.json +345 -0
- package/lib/datetime-field/custom-elements.md +61 -0
- package/lib/datetime-field/index.d.ts +322 -0
- package/lib/datetime-field/index.js +660 -0
- package/lib/datetime-field/themes/halo/dark/index.js +3 -0
- package/lib/datetime-field/themes/halo/light/index.js +3 -0
- package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
- package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
- package/lib/datetime-field/types.d.ts +10 -0
- package/lib/datetime-field/types.js +1 -0
- package/lib/datetime-field/utils.d.ts +25 -0
- package/lib/datetime-field/utils.js +79 -0
- package/lib/datetime-picker/index.d.ts +5 -0
- package/lib/datetime-picker/index.js +6 -7
- package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
- package/lib/datetime-picker/themes/halo/light/index.js +5 -5
- package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
- package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +6 -1
- package/lib/dialog/index.js +5 -5
- package/lib/dialog/themes/halo/dark/index.js +5 -5
- package/lib/dialog/themes/halo/light/index.js +5 -5
- package/lib/dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/dialog/themes/solar/pearl/index.js +5 -5
- package/lib/email-field/index.d.ts +6 -1
- package/lib/email-field/index.js +8 -3
- package/lib/email-field/themes/halo/dark/index.js +1 -1
- package/lib/email-field/themes/halo/light/index.js +1 -1
- package/lib/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- package/lib/flag/index.d.ts +5 -0
- package/lib/flag/index.js +3 -3
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +5 -0
- package/lib/header/index.js +2 -2
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +3 -5
- package/lib/heatmap/helpers/text.d.ts +1 -7
- package/lib/heatmap/helpers/text.js +1 -18
- package/lib/heatmap/index.d.ts +5 -0
- package/lib/heatmap/index.js +22 -30
- package/lib/heatmap/themes/halo/dark/index.js +2 -2
- package/lib/heatmap/themes/halo/light/index.js +2 -2
- package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
- package/lib/heatmap/themes/solar/pearl/index.js +2 -2
- package/lib/icon/index.d.ts +5 -0
- package/lib/icon/index.js +3 -3
- package/lib/icon/utils/IconLoader.d.ts +1 -1
- package/lib/icon/utils/IconLoader.js +1 -1
- package/lib/interactive-chart/helpers/types.d.ts +1 -1
- package/lib/interactive-chart/index.d.ts +5 -12
- package/lib/interactive-chart/index.js +20 -36
- package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
- package/lib/interactive-chart/themes/halo/light/index.js +1 -1
- package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
- package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +24 -17
- package/lib/item/index.js +45 -48
- package/lib/item/themes/halo/dark/index.js +2 -2
- package/lib/item/themes/halo/light/index.js +2 -2
- package/lib/item/themes/solar/charcoal/index.js +2 -2
- package/lib/item/themes/solar/pearl/index.js +2 -2
- package/lib/label/index.d.ts +6 -1
- package/lib/label/index.js +6 -6
- package/lib/label/themes/halo/dark/index.js +1 -1
- package/lib/label/themes/halo/light/index.js +1 -1
- package/lib/label/themes/solar/charcoal/index.js +1 -1
- package/lib/label/themes/solar/pearl/index.js +1 -1
- package/lib/layout/index.d.ts +5 -0
- package/lib/layout/index.js +2 -2
- package/lib/led-gauge/index.d.ts +5 -0
- package/lib/led-gauge/index.js +2 -2
- package/lib/led-gauge/themes/halo/dark/index.js +1 -1
- package/lib/led-gauge/themes/halo/light/index.js +1 -1
- package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/list/custom-elements.json +0 -13
- package/lib/list/custom-elements.md +9 -10
- package/lib/list/helpers/item-id.d.ts +8 -0
- package/lib/list/helpers/item-id.js +13 -0
- package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
- package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +18 -12
- package/lib/list/index.js +30 -29
- package/lib/list/renderer.d.ts +1 -1
- package/lib/list/themes/halo/dark/index.js +2 -2
- package/lib/list/themes/halo/light/index.js +2 -2
- package/lib/list/themes/solar/charcoal/index.js +2 -2
- package/lib/list/themes/solar/pearl/index.js +2 -2
- package/lib/loader/index.d.ts +6 -0
- package/lib/loader/index.js +5 -1
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +5 -0
- package/lib/multi-input/index.js +6 -7
- package/lib/multi-input/themes/halo/dark/index.js +2 -2
- package/lib/multi-input/themes/halo/light/index.js +2 -2
- package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
- package/lib/multi-input/themes/solar/pearl/index.js +2 -2
- package/lib/notification/elements/notification-tray.d.ts +5 -0
- package/lib/notification/elements/notification-tray.js +4 -4
- package/lib/notification/elements/notification.d.ts +15 -0
- package/lib/notification/elements/notification.js +12 -3
- package/lib/notification/themes/halo/dark/index.js +1 -1
- package/lib/notification/themes/halo/light/index.js +1 -1
- package/lib/notification/themes/solar/charcoal/index.js +1 -1
- package/lib/notification/themes/solar/pearl/index.js +1 -1
- package/lib/number-field/index.d.ts +8 -3
- package/lib/number-field/index.js +14 -4
- package/lib/number-field/themes/halo/dark/index.js +1 -1
- package/lib/number-field/themes/halo/light/index.js +1 -1
- package/lib/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/number-field/themes/solar/pearl/index.js +1 -1
- package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
- package/lib/overlay/elements/overlay-backdrop.js +2 -2
- package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
- package/lib/overlay/elements/overlay-viewport.js +1 -1
- package/lib/overlay/elements/overlay.d.ts +5 -0
- package/lib/overlay/elements/overlay.js +7 -5
- package/lib/overlay/managers/focus-manager.js +11 -6
- package/lib/overlay/managers/interaction-lock-manager.js +1 -1
- package/lib/overlay/managers/viewport-manager.js +4 -5
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/helpers/types.d.ts +7 -1
- package/lib/overlay-menu/helpers/types.js +7 -1
- package/lib/overlay-menu/index.d.ts +14 -4
- package/lib/overlay-menu/index.js +57 -29
- package/lib/overlay-menu/managers/menu-manager.js +2 -1
- package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
- package/lib/overlay-menu/themes/halo/light/index.js +3 -3
- package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
- package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
- package/lib/pagination/index.d.ts +79 -91
- package/lib/pagination/index.js +205 -239
- package/lib/pagination/themes/halo/dark/index.js +4 -5
- package/lib/pagination/themes/halo/light/index.js +4 -5
- package/lib/pagination/themes/solar/charcoal/index.js +4 -5
- package/lib/pagination/themes/solar/pearl/index.js +4 -5
- package/lib/panel/index.d.ts +5 -0
- package/lib/panel/index.js +2 -2
- package/lib/password-field/index.d.ts +7 -2
- package/lib/password-field/index.js +7 -4
- package/lib/password-field/themes/halo/dark/index.js +1 -1
- package/lib/password-field/themes/halo/light/index.js +1 -1
- package/lib/password-field/themes/solar/charcoal/index.js +1 -1
- package/lib/password-field/themes/solar/pearl/index.js +1 -1
- package/lib/pill/index.d.ts +21 -0
- package/lib/pill/index.js +36 -5
- package/lib/pill/themes/halo/dark/index.js +2 -2
- package/lib/pill/themes/halo/light/index.js +2 -2
- package/lib/pill/themes/solar/charcoal/index.js +2 -2
- package/lib/pill/themes/solar/pearl/index.js +2 -2
- package/lib/progress-bar/index.d.ts +5 -0
- package/lib/progress-bar/index.js +3 -3
- package/lib/radio-button/index.d.ts +5 -0
- package/lib/radio-button/index.js +3 -3
- package/lib/radio-button/radio-button-registry.d.ts +1 -1
- package/lib/radio-button/radio-button-registry.js +4 -2
- package/lib/radio-button/themes/halo/dark/index.js +1 -1
- package/lib/radio-button/themes/halo/light/index.js +1 -1
- package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
- package/lib/radio-button/themes/solar/pearl/index.js +1 -1
- package/lib/rating/index.d.ts +5 -0
- package/lib/rating/index.js +4 -4
- package/lib/search-field/index.d.ts +7 -2
- package/lib/search-field/index.js +8 -4
- package/lib/search-field/themes/halo/dark/index.js +1 -1
- package/lib/search-field/themes/halo/light/index.js +1 -1
- package/lib/search-field/themes/solar/charcoal/index.js +1 -1
- package/lib/search-field/themes/solar/pearl/index.js +1 -1
- package/lib/select/index.d.ts +5 -0
- package/lib/select/index.js +11 -14
- package/lib/select/themes/halo/dark/index.js +3 -3
- package/lib/select/themes/halo/light/index.js +3 -3
- package/lib/select/themes/solar/charcoal/index.js +3 -3
- package/lib/select/themes/solar/pearl/index.js +3 -3
- package/lib/sidebar-layout/index.d.ts +5 -0
- package/lib/sidebar-layout/index.js +4 -4
- package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
- package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
- package/lib/slider/constants.d.ts +15 -0
- package/lib/slider/constants.js +18 -0
- package/lib/slider/index.d.ts +55 -80
- package/lib/slider/index.js +365 -460
- package/lib/slider/themes/halo/dark/index.js +1 -1
- package/lib/slider/themes/halo/light/index.js +1 -1
- package/lib/slider/themes/solar/charcoal/index.js +1 -1
- package/lib/slider/themes/solar/pearl/index.js +1 -1
- package/lib/slider/utils.d.ts +35 -0
- package/lib/slider/utils.js +54 -0
- package/lib/sparkline/index.d.ts +5 -0
- package/lib/sparkline/index.js +9 -10
- package/lib/swing-gauge/index.d.ts +5 -0
- package/lib/swing-gauge/index.js +14 -8
- package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
- package/lib/swing-gauge/themes/halo/light/index.js +1 -1
- package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/tab/index.d.ts +5 -0
- package/lib/tab/index.js +4 -4
- package/lib/tab/themes/halo/dark/index.js +2 -2
- package/lib/tab/themes/halo/light/index.js +2 -2
- package/lib/tab/themes/solar/charcoal/index.js +2 -2
- package/lib/tab/themes/solar/pearl/index.js +2 -2
- package/lib/tab-bar/index.d.ts +5 -0
- package/lib/tab-bar/index.js +6 -6
- package/lib/tab-bar/themes/halo/dark/index.js +2 -2
- package/lib/tab-bar/themes/halo/light/index.js +2 -2
- package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
- package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
- package/lib/text-field/index.d.ts +19 -1
- package/lib/text-field/index.js +35 -11
- package/lib/text-field/themes/halo/dark/index.js +1 -1
- package/lib/text-field/themes/halo/light/index.js +1 -1
- package/lib/text-field/themes/solar/charcoal/index.js +1 -1
- package/lib/text-field/themes/solar/pearl/index.js +1 -1
- package/lib/time-picker/index.d.ts +6 -1
- package/lib/time-picker/index.js +11 -11
- package/lib/time-picker/themes/halo/dark/index.js +2 -2
- package/lib/time-picker/themes/halo/light/index.js +2 -2
- package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
- package/lib/time-picker/themes/solar/pearl/index.js +2 -2
- package/lib/toggle/index.d.ts +5 -0
- package/lib/toggle/index.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
- package/lib/tooltip/index.d.ts +6 -0
- package/lib/tooltip/index.js +7 -8
- package/lib/tooltip/managers/tooltip-manager.js +2 -2
- package/lib/tooltip/themes/halo/dark/index.js +1 -1
- package/lib/tooltip/themes/halo/light/index.js +1 -1
- package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
- package/lib/tooltip/themes/solar/pearl/index.js +1 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-chart.js +2 -2
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-item.js +3 -3
- package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
- package/lib/tornado-chart/themes/halo/light/index.js +2 -2
- package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
- package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
- package/lib/tree/elements/tree-item.d.ts +8 -3
- package/lib/tree/elements/tree-item.js +5 -6
- package/lib/tree/elements/tree.d.ts +7 -3
- package/lib/tree/elements/tree.js +6 -7
- package/lib/tree/helpers/renderer.d.ts +4 -0
- package/lib/tree/helpers/renderer.js +20 -13
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/themes/halo/dark/index.js +4 -4
- package/lib/tree/themes/halo/light/index.js +4 -4
- package/lib/tree/themes/solar/charcoal/index.js +4 -4
- package/lib/tree/themes/solar/pearl/index.js +4 -4
- package/lib/tree-select/index.d.ts +8 -7
- package/lib/tree-select/index.js +39 -38
- package/lib/tree-select/themes/halo/dark/index.js +9 -9
- package/lib/tree-select/themes/halo/light/index.js +9 -9
- package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
- package/lib/tree-select/themes/solar/pearl/index.js +9 -9
- package/lib/version.js +1 -1
- package/package.json +35 -295
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/halo/dark';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-slider', ':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([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,#334bff);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,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/halo/light';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-slider', ':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([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,#334bff);border-color:var(--thumb-color,#334bff)}: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,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/solar/charcoal';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-slider', ':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(.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,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/solar/pearl';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-slider', ':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(.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}');
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set prevent default action and stop bubbles event
|
|
3
|
+
* @param event event mouse or touch
|
|
4
|
+
* @returns {void}
|
|
5
|
+
*/
|
|
6
|
+
declare const preventDefault: (event: Event) => Event;
|
|
7
|
+
/**
|
|
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
|
+
declare const clamp: (value: number, min: number, max: number) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Check if number is a decimal number
|
|
17
|
+
* @param value value for checking
|
|
18
|
+
* @returns true if value is decimal
|
|
19
|
+
*/
|
|
20
|
+
declare const isDecimalNumber: (value: number) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Count decimal number
|
|
23
|
+
* @param value value for checking
|
|
24
|
+
* @returns number of decimal points
|
|
25
|
+
*/
|
|
26
|
+
declare const countDecimalPlace: (value: string | number) => number;
|
|
27
|
+
/**
|
|
28
|
+
* Check if the value is a valid number and convert to string
|
|
29
|
+
* If not, return fallback value instead
|
|
30
|
+
* @param value value for checking
|
|
31
|
+
* @param fallbackValue fallback value when value is not number;
|
|
32
|
+
* @returns string of valid number
|
|
33
|
+
*/
|
|
34
|
+
declare const validateNumber: (value: number, fallbackValue: number | string) => string;
|
|
35
|
+
export { clamp, preventDefault, validateNumber, isDecimalNumber, countDecimalPlace };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set prevent default action and stop bubbles event
|
|
3
|
+
* @param event event mouse or touch
|
|
4
|
+
* @returns {void}
|
|
5
|
+
*/
|
|
6
|
+
const preventDefault = (event) => {
|
|
7
|
+
event.preventDefault();
|
|
8
|
+
event.stopPropagation();
|
|
9
|
+
return event;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
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
|
+
const clamp = function (value, min, max) {
|
|
19
|
+
return Math.max(min, Math.min(value, max)).toString();
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if number is a decimal number
|
|
23
|
+
* @param value value for checking
|
|
24
|
+
* @returns true if value is decimal
|
|
25
|
+
*/
|
|
26
|
+
const isDecimalNumber = (value) => {
|
|
27
|
+
return value % 1 !== 0;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Count decimal number
|
|
31
|
+
* @param value value for checking
|
|
32
|
+
* @returns number of decimal points
|
|
33
|
+
*/
|
|
34
|
+
const countDecimalPlace = (value) => {
|
|
35
|
+
return Number(value).toString().split('.')[1]?.length | 0;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if the value is a valid number and convert to string
|
|
39
|
+
* If not, return fallback value instead
|
|
40
|
+
* @param value value for checking
|
|
41
|
+
* @param fallbackValue fallback value when value is not number;
|
|
42
|
+
* @returns string of valid number
|
|
43
|
+
*/
|
|
44
|
+
const validateNumber = (value, fallbackValue) => {
|
|
45
|
+
let newValue;
|
|
46
|
+
if (!isNaN(value) && !isNaN(Number(value)) && typeof value === 'number') {
|
|
47
|
+
newValue = value.toString();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
newValue = fallbackValue;
|
|
51
|
+
}
|
|
52
|
+
return newValue.toString();
|
|
53
|
+
};
|
|
54
|
+
export { clamp, preventDefault, validateNumber, isDecimalNumber, countDecimalPlace };
|
package/lib/sparkline/index.d.ts
CHANGED
|
@@ -93,6 +93,11 @@ export declare class Sparkline extends ResponsiveElement {
|
|
|
93
93
|
*/
|
|
94
94
|
protected render(): TemplateResult;
|
|
95
95
|
}
|
|
96
|
+
declare global {
|
|
97
|
+
interface HTMLElementTagNameMap {
|
|
98
|
+
'ef-sparkline': Sparkline;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
96
101
|
|
|
97
102
|
declare global {
|
|
98
103
|
interface HTMLElementTagNameMap {
|
package/lib/sparkline/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { css, ResponsiveElement, html } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { query } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
6
|
import { VERSION } from '../version.js';
|
|
7
|
-
import { color } from '@refinitiv-ui/utils/
|
|
7
|
+
import { color } from '@refinitiv-ui/utils/color.js';
|
|
8
8
|
import '@refinitiv-ui/browser-sparkline';
|
|
9
9
|
let Sparkline = class Sparkline extends ResponsiveElement {
|
|
10
10
|
constructor() {
|
|
@@ -35,16 +35,15 @@ let Sparkline = class Sparkline extends ResponsiveElement {
|
|
|
35
35
|
* Get configuration for theme
|
|
36
36
|
*/
|
|
37
37
|
get defaultThemeConfig() {
|
|
38
|
-
var _a, _b, _c, _d, _e;
|
|
39
38
|
return {
|
|
40
39
|
width: this.width,
|
|
41
40
|
height: this.height,
|
|
42
|
-
lineColor:
|
|
41
|
+
lineColor: color(this.getComputedVariable('--line-color', '#ff9933'))?.formatHex(),
|
|
43
42
|
lineWidth: parseInt(this.getComputedVariable('--line-width', '2px'), 10),
|
|
44
|
-
referenceLineColor:
|
|
45
|
-
previousLineColor:
|
|
46
|
-
upperLineColor:
|
|
47
|
-
lowerLineColor:
|
|
43
|
+
referenceLineColor: color(this.getComputedVariable('--reference-line-color', 'rgba(120, 120, 130, 0.5)'))?.formatHex(),
|
|
44
|
+
previousLineColor: color(this.getComputedVariable('--previous-line-color', '#bfbfbf'))?.formatHex(),
|
|
45
|
+
upperLineColor: color(this.getComputedVariable('--upper-line-color', '#309054'))?.formatHex(),
|
|
46
|
+
lowerLineColor: color(this.getComputedVariable('--lower-line-color', '#d94255'))?.formatHex(),
|
|
48
47
|
fillColorStyle: this.getComputedVariable('--fill-color-style', 'gradient')
|
|
49
48
|
};
|
|
50
49
|
}
|
|
@@ -280,6 +280,11 @@ export declare class SwingGauge extends ResponsiveElement {
|
|
|
280
280
|
private get secondaryLegendTemplate();
|
|
281
281
|
render(): TemplateResult;
|
|
282
282
|
}
|
|
283
|
+
declare global {
|
|
284
|
+
interface HTMLElementTagNameMap {
|
|
285
|
+
'ef-swing-gauge': SwingGauge;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
283
288
|
|
|
284
289
|
declare global {
|
|
285
290
|
interface HTMLElementTagNameMap {
|
package/lib/swing-gauge/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ResponsiveElement, css, html, WarningNotice } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { query } from '@refinitiv-ui/core/
|
|
6
|
-
import { state } from '@refinitiv-ui/core/
|
|
7
|
-
import { styleMap } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
7
|
+
import { styleMap } from '@refinitiv-ui/core/directives/style-map.js';
|
|
8
8
|
import { VERSION } from '../version.js';
|
|
9
9
|
import '../canvas/index.js';
|
|
10
10
|
import '../label/index.js';
|
|
@@ -441,7 +441,7 @@ let SwingGauge = class SwingGauge extends ResponsiveElement {
|
|
|
441
441
|
* @returns number without CSS unit
|
|
442
442
|
*/
|
|
443
443
|
getValueFromStyle(styleValue) {
|
|
444
|
-
return Number(styleValue
|
|
444
|
+
return Number(styleValue?.replace('px', ''));
|
|
445
445
|
}
|
|
446
446
|
/**
|
|
447
447
|
* Compute and update style of containers and labels
|
|
@@ -453,8 +453,14 @@ let SwingGauge = class SwingGauge extends ResponsiveElement {
|
|
|
453
453
|
}
|
|
454
454
|
const primaryPosition = this.getPositionStyle(Segment.PRIMARY, this.primaryLineRadian, this.linePointerOffset, -this.lineLength);
|
|
455
455
|
const secondaryPosition = this.getPositionStyle(Segment.SECONDARY, this.secondaryLineRadian, this.linePointerOffset, 0);
|
|
456
|
-
this.primaryContainerStyle =
|
|
457
|
-
|
|
456
|
+
this.primaryContainerStyle = {
|
|
457
|
+
width: `${this.lineLength}px`,
|
|
458
|
+
...primaryPosition
|
|
459
|
+
};
|
|
460
|
+
this.secondaryContainerStyle = {
|
|
461
|
+
width: `${this.lineLength}px`,
|
|
462
|
+
...secondaryPosition
|
|
463
|
+
};
|
|
458
464
|
// position container over line pointer
|
|
459
465
|
if (this.primaryPercentage < GAUGE_PERCENTAGE_THRESHOLD) {
|
|
460
466
|
delete this.primaryContainerStyle.top;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/canvas/themes/halo/dark';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#6678FF;--secondary-color:#FFFFFF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#6678FF;--center-line:dotted}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px;border:1px solid var(--border-color,#6678ff);height:10px;width:10px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/canvas/themes/halo/light';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#334BFF;--secondary-color:#0D0D0D;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--secondary-color:#0D0D0D;--center-line-color:#FFFFFF;--border-color:#334BFF;--center-line:dotted}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px;height:12px;width:12px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/canvas/themes/solar/charcoal';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#FF9933;--secondary-color:#3780BF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{height:12px;width:12px;border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/canvas/themes/solar/pearl';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-swing-gauge', ':host{--primary-color:#EE7600;--secondary-color:#3780BF;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6;--primary-color:#2EB4C9;--secondary-color:#C93C4B;--border-color:#000000;--center-line:solid;--center-line-color:#000000;--center-line-opacity:0.6}:host [part=legend-container-outer]{padding-bottom:30px}:host [part=primary-legend],:host [part=secondary-legend]{margin-top:4px;align-items:center}:host [part=primary-legend-symbol],:host [part=secondary-legend-symbol]{height:12px;width:12px;border-radius:50%;margin-right:10px;align-self:baseline;margin-top:1px}:host [part=primary-legend-symbol]{background-color:var(--primary-color)}:host [part=secondary-legend-symbol]{background-color:var(--secondary-color)}:host [part=primary-value],:host [part=secondary-value]{font-weight:500}');
|
package/lib/tab/index.d.ts
CHANGED
|
@@ -120,6 +120,11 @@ export declare class Tab extends ControlElement {
|
|
|
120
120
|
*/
|
|
121
121
|
protected render(): TemplateResult;
|
|
122
122
|
}
|
|
123
|
+
declare global {
|
|
124
|
+
interface HTMLElementTagNameMap {
|
|
125
|
+
'ef-tab': Tab;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
123
128
|
|
|
124
129
|
declare global {
|
|
125
130
|
interface HTMLElementTagNameMap {
|
package/lib/tab/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, ControlElement } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { state } from '@refinitiv-ui/core/
|
|
6
|
-
import { isSlotEmpty } from '@refinitiv-ui/utils/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
6
|
+
import { isSlotEmpty } from '@refinitiv-ui/utils/is-slot-empty.js';
|
|
7
7
|
import { VERSION } from '../version.js';
|
|
8
8
|
import '../icon/index.js';
|
|
9
9
|
import '../label/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/label/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#404040;color:#ccc;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(204,204,204,.5);background-color:rgba(64,64,64,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#404040}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #0d0d0d}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#404040;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#262626}:host([level="2"][active]:not(:active):not(:hover)){color:#6678ff;background-color:#0d0d0d}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#ccc;background-color:#0d0d0d}:host([level="3"][clears-on-hover]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#fff;background-color:#262626}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#fff;background-color:#0d0d0d;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#0d0d0d;box-shadow:-1em 0 .75em -.5em #0d0d0d}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#fff}:host([level="3"]:active){border-color:#0f1e8a}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/label/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#e6e6e6;color:#0d0d0d;height:36px;padding:9px 12px;outline:0;font-size:12rem;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation}:host [part=icon]{min-width:1em;font-size:1.5em}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:46px}:host([sub-label]) [part=icon]{font-size:1.8em}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:46px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#fff}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:120ms;background:#334bff;box-shadow:-1em 0 .75em -.5em #334bff}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#4158ff}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#4158ff;box-shadow:-1em 0 .75em -.5em #4158ff}:host([active]:active){background-color:#0f1e8a}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([active][disabled]){color:rgba(255,255,255,.5);background-color:rgba(51,75,255,.5)}:host([disabled]){pointer-events:none;color:rgba(13,13,13,.5);background-color:rgba(230,230,230,.5)}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#4158ff}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#6678ff;background-color:#e6e6e6}:host(:hover){color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55);background-color:#334bff}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#fff;background-color:#0f1e8a}:host(:active[clears-on-hover]) [part=close-container]{background-color:#0f1e8a;box-shadow:-1em 0 .75em -.5em #0f1e8a}:host([level="1"]){border-right:1px solid #fff}:host([level="2"]:not(:last-child)){border-right:none}:host([level="2"]:not(:last-child)) [part=label-container]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#d9d9d9;height:70%;right:0;top:0;bottom:0;z-index:1}:host([level="2"]:not(:active):not([active]):not(:hover)){background-color:#f2f2f2}:host([level="2"][active]:not(:active):not(:hover)){color:#334bff;background-color:#fff}:host([level="2"][active]:focus:not([focused])),:host([level="2"][focused=visible]:not(:active):not(:hover)){color:#6678ff}:host([level="3"]){border-bottom:2px solid transparent;color:#404040;background-color:#fff}:host([level="3"][clears-on-hover]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:focus:not([focused])),:host([level="3"][focused=visible]){color:#0d0d0d;background-color:#f2f2f2}:host([level="3"]:active),:host([level="3"]:hover),:host([level="3"][active]){color:#0d0d0d;background-color:#fff;border-color:#334bff}:host([level="3"]:active) [part=close-container],:host([level="3"]:hover) [part=close-container],:host([level="3"][active]) [part=close-container]{background:#fff;box-shadow:-1em 0 .75em -.5em #fff}:host([level="3"]:active) [part=close],:host([level="3"]:hover) [part=close],:host([level="3"][active]) [part=close]{color:#0d0d0d}:host([level="3"]:active){border-color:#0f1e8a}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/label/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#3c3c42;color:#c2c2c2;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation;border:1px solid #000;border-left:none}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#e2e2e2}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#4a4a4f;box-shadow:-1em 0 .75em -.5em #4a4a4f}:host([active]){color:#0a0a0a;background-color:#f93}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#ffa041;box-shadow:-1em 0 .75em -.5em #ffa041}:host([active]:active){background-color:#ed8e2f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#ed8e2f;box-shadow:-1em 0 .75em -.5em #ed8e2f}:host([active][disabled]){background-color:#ffad5c;color:rgba(10,10,10,.7)}:host([disabled]){pointer-events:none;color:#c2c2c2;background-color:#636368}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#ffa041}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#e2e2e2;background-color:#3c3c42}:host(:hover){color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9);background-color:#4a4a4f}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#c2c2c2;background-color:#38383d}:host(:active[clears-on-hover]) [part=close-container]{background-color:#38383d;box-shadow:-1em 0 .75em -.5em #38383d}:host [part=icon]{min-width:1em;font-size:1em}:host([sub-label]) [part=icon]{font-size:1.2em}:host([active]:hover){color:#0a0a0a;background-color:#ffb366}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/label/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab', ':host{cursor:pointer;background-color:#fafbfc;color:#505050;height:23px;padding:7px 15px;outline:0;font-size:13rem;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-items:center;justify-content:center;touch-action:manipulation;border:1px solid #a9afba;border-left:none}:host [part=label-container]{display:flex;align-items:flex-start;flex-direction:column;width:100%;min-width:0}:host(:not([sub-label])) [part=label-container]{align-items:center}:host([icon]) [part=label-container]{padding-left:.3em}:host [part=sub-label]{font-weight:400;font-size:.875em}:host(:not([active]):not(:active):not(:hover)) [part=sub-label]{opacity:.7}:host([sub-label]){height:33px}:host([sub-label]) [part=close]{font-size:1.25em}:host([sub-label][clears]){padding-right:2.5em}:host([line-clamp="2"]),:host([line-clamp="3"]){height:33px}:host([icon][sub-label]) [part=label-container]{padding-left:.5em}:host([clears]){padding-right:2em}:host [part=close-container]{position:absolute;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}:host [part=close]{margin-right:.5em;min-width:1em;font-size:1em}:host([clears-on-hover]) [part=close]{color:#1d1d1d}:host([clears-on-hover]) [part=close-container]{width:2em;opacity:0;transition:70ms;background:#fafbfc;box-shadow:-1em 0 .75em -.5em #fafbfc}:host([active]){color:#505050;background-color:#ffb266}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#ffb771;box-shadow:-1em 0 .75em -.5em #ffb771}:host([active]:active){background-color:#eda65f}:host([active]:active[clears-on-hover]) [part=close-container]{background-color:#eda65f;box-shadow:-1em 0 .75em -.5em #eda65f}:host([active][disabled]){color:#a8896a;background-color:#ffc185}:host([disabled]){pointer-events:none;color:#505050;background-color:#fbfcfd}:host(:focus:not([focused])),:host([focused=visible]){box-shadow:none;background-color:#ffb771}:host(:focus:not([focused]):not([active]):not(:hover)),:host([focused=visible]:not([active]):not(:hover)){color:#1d1d1d;background-color:#fafbfc}:host(:hover){color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.6);background-color:#fafbfc}:host(:hover[clears-on-hover]) [part=close-container]{opacity:1}:host(:active){color:#505050;background-color:#e8e9ea}:host(:active[clears-on-hover]) [part=close-container]{background-color:#e8e9ea;box-shadow:-1em 0 .75em -.5em #e8e9ea}:host [part=icon]{min-width:1em;font-size:1em}:host([sub-label]) [part=icon]{font-size:1.2em}:host([active]:hover){color:#505050;background-color:#fc9}');
|
package/lib/tab-bar/index.d.ts
CHANGED
|
@@ -182,6 +182,11 @@ export declare class TabBar extends ResponsiveElement {
|
|
|
182
182
|
*/
|
|
183
183
|
protected render(): TemplateResult;
|
|
184
184
|
}
|
|
185
|
+
declare global {
|
|
186
|
+
interface HTMLElementTagNameMap {
|
|
187
|
+
'ef-tab-bar': TabBar;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
185
190
|
|
|
186
191
|
declare global {
|
|
187
192
|
interface HTMLElementTagNameMap {
|
package/lib/tab-bar/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, ResponsiveElement } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { query } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
6
|
import { VERSION } from '../version.js';
|
|
7
7
|
import { tweenAnimate } from './helpers/animate.js';
|
|
8
8
|
import { Tab } from '../tab/index.js';
|
|
@@ -229,7 +229,7 @@ let TabBar = class TabBar extends ResponsiveElement {
|
|
|
229
229
|
*/
|
|
230
230
|
setLevel() {
|
|
231
231
|
const tabList = this.getTabElements(); // get all tab elements include disabled tab
|
|
232
|
-
tabList
|
|
232
|
+
tabList?.forEach((tab) => {
|
|
233
233
|
tab.level = this.level;
|
|
234
234
|
});
|
|
235
235
|
}
|
|
@@ -391,11 +391,11 @@ let TabBar = class TabBar extends ResponsiveElement {
|
|
|
391
391
|
*/
|
|
392
392
|
render() {
|
|
393
393
|
return html `
|
|
394
|
-
${!this.vertical ? html `<ef-button tabIndex="-1" icon="left" part="left-btn" @tap=${this.handleScrollLeft}></ef-button>` : null}
|
|
394
|
+
${!this.vertical ? html `<ef-button tabIndex="-1" aria-hidden="true" icon="left" part="left-btn" @tap=${this.handleScrollLeft}></ef-button>` : null}
|
|
395
395
|
<div part="content">
|
|
396
396
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
397
397
|
</div>
|
|
398
|
-
${!this.vertical ? html `<ef-button tabIndex="-1" icon="right" part="right-btn" @tap=${this.handleScrollRight}></ef-button>` : null}
|
|
398
|
+
${!this.vertical ? html `<ef-button tabIndex="-1" aria-hidden="true" icon="right" part="right-btn" @tap=${this.handleScrollRight}></ef-button>` : null}
|
|
399
399
|
`;
|
|
400
400
|
}
|
|
401
401
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/tab/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/button/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#1a1a1a}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#404040;width:36px;border:none}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#334bff}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#0f1e8a}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#4158ff}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#6678ff;background-color:#404040}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border-bottom:1px solid #404040}:host [part=left-btn]::after,:host [part=right-btn]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#404040;height:70%;top:0;bottom:0}:host([level="1"]) [part=left-btn]::after,:host([level="1"]) [part=right-btn]::after{content:none}:host([level="1"]) [part=left-btn]{border-right:1px solid #0d0d0d}:host([level="1"]) [part=right-btn]{border-left:1px solid #0d0d0d}:host([level="2"]) [part=left-btn]::after,:host([level="3"]) [part=left-btn]::after{right:0}:host([level="2"]) [part=right-btn]::after,:host([level="3"]) [part=right-btn]::after{left:0}:host([level="2"]) [part=left-btn]:not(:active):not(:hover),:host([level="2"]) [part=right-btn]:not(:active):not(:hover){background-color:#262626}:host([level="2"]) [part=left-btn]::after,:host([level="2"]) [part=right-btn]::after{height:70%}:host([level="3"]) [part=left-btn],:host([level="3"]) [part=right-btn]{border-color:transparent}:host([level="3"]) [part=left-btn]:not(:active):not(:hover),:host([level="3"]) [part=right-btn]:not(:active):not(:hover){background-color:#0d0d0d}:host([level="3"]) [part=left-btn]::after,:host([level="3"]) [part=right-btn]::after{height:30%}:host([vertical]) [part=content] ::slotted(ef-tab){border-bottom-color:transparent;border-right:none!important;background:linear-gradient(#1a1a1a,#1a1a1a) left calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#1a1a1a,#1a1a1a) right calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#404040,#404040) center calc(100% + 1px)/100% 1px no-repeat}:host([vertical]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)){background:linear-gradient(#0d0d0d,#0d0d0d) left calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#0d0d0d,#0d0d0d) right calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#404040,#404040) center calc(100% + 1px)/100% 1px no-repeat}:host([vertical]) [part=content] ::slotted(ef-tab:not([active]):not(:active):not(:hover)){background-color:#1a1a1a}:host([vertical]) [part=content] ::slotted(ef-tab:hover){color:#fff;background-color:#334bff}:host([vertical]) [part=content] ::slotted(ef-tab:active){background-color:#0f1e8a}:host([vertical][level="1"]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)),:host([vertical][level="3"]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)){color:#6678ff;background-color:#0d0d0d}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/tab/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/button/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#f2f2f2}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#e6e6e6;width:36px;border:none}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#334bff}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#0f1e8a}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#4158ff}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#6678ff;background-color:#e6e6e6}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border-bottom:1px solid #d9d9d9}:host [part=left-btn]::after,:host [part=right-btn]::after{content:\'\';position:absolute;margin:auto;width:1px;background:#d9d9d9;height:70%;top:0;bottom:0}:host([level="1"]) [part=left-btn]::after,:host([level="1"]) [part=right-btn]::after{content:none}:host([level="1"]) [part=left-btn]{border-right:1px solid #fff}:host([level="1"]) [part=right-btn]{border-left:1px solid #fff}:host([level="2"]) [part=left-btn]::after,:host([level="3"]) [part=left-btn]::after{right:0}:host([level="2"]) [part=right-btn]::after,:host([level="3"]) [part=right-btn]::after{left:0}:host([level="2"]) [part=left-btn]:not(:active):not(:hover),:host([level="2"]) [part=right-btn]:not(:active):not(:hover){background-color:#f2f2f2}:host([level="2"]) [part=left-btn]::after,:host([level="2"]) [part=right-btn]::after{height:70%}:host([level="3"]) [part=left-btn],:host([level="3"]) [part=right-btn]{border-color:transparent}:host([level="3"]) [part=left-btn]:not(:active):not(:hover),:host([level="3"]) [part=right-btn]:not(:active):not(:hover){background-color:#fff}:host([level="3"]) [part=left-btn]::after,:host([level="3"]) [part=right-btn]::after{height:30%}:host([vertical]) [part=content] ::slotted(ef-tab){border-bottom-color:transparent;border-right:none!important;background:linear-gradient(#f2f2f2,#f2f2f2) left calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#f2f2f2,#f2f2f2) right calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#d9d9d9,#d9d9d9) center calc(100% + 1px)/100% 1px no-repeat}:host([vertical]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)){background:linear-gradient(#fff,#fff) left calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#fff,#fff) right calc(100% + 1px)/2% 1px no-repeat,linear-gradient(#d9d9d9,#d9d9d9) center calc(100% + 1px)/100% 1px no-repeat}:host([vertical]) [part=content] ::slotted(ef-tab:not([active]):not(:active):not(:hover)){background-color:#f2f2f2}:host([vertical]) [part=content] ::slotted(ef-tab:hover){color:#fff;background-color:#334bff}:host([vertical]) [part=content] ::slotted(ef-tab:active){background-color:#0f1e8a}:host([vertical][level="1"]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)),:host([vertical][level="3"]) [part=content] ::slotted(ef-tab[active]:not(:active):not(:hover)){color:#334bff;background-color:#fff}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/tab/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/button/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#151516}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#3c3c42}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#4a4a4f}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#38383d}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#ffa041}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#e2e2e2;background-color:#3c3c42}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border:none;border-bottom:1px solid #000}:host(:not([vertical])) [part=content] ::slotted(ef-tab:first-of-type){border-left:1px solid #000}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/tab/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/button/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tab-bar', ':host{position:relative;background-color:#c2c2c2}:host [part=content]{display:flex;overflow:hidden}:host [part=left-btn],:host [part=right-btn]{display:none;position:absolute;height:auto;margin:auto;z-index:2;top:0;bottom:0;background-color:#fafbfc}:host [part=left-btn]:hover,:host [part=right-btn]:hover{background-color:#fafbfc}:host [part=left-btn]:active,:host [part=right-btn]:active{background-color:#e8e9ea}:host [part=left-btn]:focus:not([focused]),:host [part=left-btn][focused=visible],:host [part=right-btn]:focus:not([focused]),:host [part=right-btn][focused=visible]{background-color:#ffb771}:host [part=left-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=left-btn][focused=visible]:not([active]):not(:hover),:host [part=right-btn]:focus:not([focused]):not([active]):not(:hover),:host [part=right-btn][focused=visible]:not([active]):not(:hover){color:#1d1d1d;background-color:#fafbfc}:host [part=left-btn]{left:0}:host [part=right-btn]{right:0}:host([vertical]){width:180px;flex-shrink:0}:host([vertical]) [part=content]{flex-direction:column}:host([vertical]) [part=content] ::slotted(ef-tab){justify-content:flex-start;border:none;border-bottom:1px solid #a9afba}:host(:not([vertical])) [part=content] ::slotted(ef-tab:first-of-type){border-left:1px solid #a9afba}');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
2
|
import { FormFieldElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
-
import { TemplateMap } from '@refinitiv-ui/core/
|
|
3
|
+
import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
|
|
4
4
|
import '../icon/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Form control element for text.
|
|
@@ -74,6 +74,19 @@ export declare class TextField extends FormFieldElement {
|
|
|
74
74
|
* @returns shouldUpdate
|
|
75
75
|
*/
|
|
76
76
|
protected updated(changedProperties: PropertyValues): void;
|
|
77
|
+
/**
|
|
78
|
+
* Check if input value should be synchronised with component value
|
|
79
|
+
* @param changedProperties Properties that has changed
|
|
80
|
+
* @returns True if input should be synchronised
|
|
81
|
+
*/
|
|
82
|
+
protected shouldSyncInputValue(changedProperties: PropertyValues): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Synchronise input value with value.
|
|
85
|
+
* Override the method if value and input value are not the same
|
|
86
|
+
* @param changedProperties Properties that has changed
|
|
87
|
+
* @returns {void}
|
|
88
|
+
*/
|
|
89
|
+
protected syncInputValue(changedProperties: PropertyValues): void;
|
|
77
90
|
/**
|
|
78
91
|
* Check if input should be re-validated
|
|
79
92
|
* @param changedProperties Properties that has changed
|
|
@@ -135,6 +148,11 @@ export declare class TextField extends FormFieldElement {
|
|
|
135
148
|
*/
|
|
136
149
|
protected render(): TemplateResult;
|
|
137
150
|
}
|
|
151
|
+
declare global {
|
|
152
|
+
interface HTMLElementTagNameMap {
|
|
153
|
+
'ef-text-field': TextField;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
138
156
|
|
|
139
157
|
declare global {
|
|
140
158
|
interface HTMLElementTagNameMap {
|
package/lib/text-field/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { FormFieldElement, css, html } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { ifDefined } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { ifDefined } from '@refinitiv-ui/core/directives/if-defined.js';
|
|
6
6
|
import { VERSION } from '../version.js';
|
|
7
|
-
import { isIE } from '@refinitiv-ui/utils/
|
|
7
|
+
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
8
8
|
import '../icon/index.js';
|
|
9
9
|
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
10
10
|
const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
|
|
@@ -119,13 +119,32 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
119
119
|
*/
|
|
120
120
|
updated(changedProperties) {
|
|
121
121
|
super.updated(changedProperties);
|
|
122
|
-
if (this.
|
|
123
|
-
this.
|
|
122
|
+
if (this.shouldSyncInputValue(changedProperties)) {
|
|
123
|
+
this.syncInputValue(changedProperties);
|
|
124
124
|
}
|
|
125
125
|
if (this.shouldValidateInput(changedProperties)) {
|
|
126
126
|
this.validateInput();
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Check if input value should be synchronised with component value
|
|
131
|
+
* @param changedProperties Properties that has changed
|
|
132
|
+
* @returns True if input should be synchronised
|
|
133
|
+
*/
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
135
|
+
shouldSyncInputValue(changedProperties) {
|
|
136
|
+
return this.inputValue !== this.value;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Synchronise input value with value.
|
|
140
|
+
* Override the method if value and input value are not the same
|
|
141
|
+
* @param changedProperties Properties that has changed
|
|
142
|
+
* @returns {void}
|
|
143
|
+
*/
|
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
145
|
+
syncInputValue(changedProperties) {
|
|
146
|
+
this.inputValue = this.value;
|
|
147
|
+
}
|
|
129
148
|
/**
|
|
130
149
|
* Check if input should be re-validated
|
|
131
150
|
* @param changedProperties Properties that has changed
|
|
@@ -160,8 +179,7 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
160
179
|
*/
|
|
161
180
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
162
181
|
onPossibleValueChange(event) {
|
|
163
|
-
|
|
164
|
-
const value = ((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
182
|
+
const value = this.inputElement?.value || '';
|
|
165
183
|
this.setValueAndNotify(value);
|
|
166
184
|
}
|
|
167
185
|
/**
|
|
@@ -170,8 +188,7 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
170
188
|
* @returns {void}
|
|
171
189
|
*/
|
|
172
190
|
validateInput() {
|
|
173
|
-
|
|
174
|
-
let error = !((_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.checkValidity());
|
|
191
|
+
let error = !this.inputElement?.checkValidity();
|
|
175
192
|
/* istanbul ignore next */
|
|
176
193
|
if (this.shouldValidateForMinLength(error)) {
|
|
177
194
|
error = !!this.minLength && (this.minLength > this.value.length);
|
|
@@ -205,7 +222,14 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
205
222
|
* @returns template map
|
|
206
223
|
*/
|
|
207
224
|
get decorateInputMap() {
|
|
208
|
-
return
|
|
225
|
+
return {
|
|
226
|
+
...super.decorateInputMap,
|
|
227
|
+
'type': 'text',
|
|
228
|
+
'part': 'input',
|
|
229
|
+
'maxlength': this.maxLength,
|
|
230
|
+
'minlength': this.minLength,
|
|
231
|
+
'pattern': this.pattern || null
|
|
232
|
+
};
|
|
209
233
|
}
|
|
210
234
|
/**
|
|
211
235
|
* Renders icon element if property present
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-text-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;color:#ccc}:host([disabled]){border:1px solid rgba(64,64,64,.5);color:rgba(204,204,204,.5);background-color:rgba(13,13,13,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #ffc800}:host([warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(127,100,0,.5)}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(160,28,43,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#ccc;min-width:1em;padding-left:2px}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:grey;color:#fff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#6678ff}:host([warning]:hover:not([readonly]):not([focused])){color:#fff;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#fff;border-color:#faa8b1}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(250,168,177,.5)}:host([readonly]:not([focused])){border-color:rgba(64,64,64,.5);background-color:rgba(13,13,13,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(204,204,204,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#fff}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#6678ff}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-text-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;color:#404040}:host([disabled]){border:1px solid rgba(89,89,89,.5);color:rgba(64,64,64,.5);background-color:rgba(255,255,255,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #cca000}:host([warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(204,160,0,.5)}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(182,50,67,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#404040;min-width:1em;padding-left:2px}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:#0d0d0d;color:#0d0d0d}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#334bff}:host([warning]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#eeacb4}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(238,172,180,.5)}:host([readonly]:not([focused])){border-color:rgba(89,89,89,.5);background-color:rgba(255,255,255,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(64,64,64,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#0d0d0d}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#334bff}');
|