@refinitiv-ui/elements 7.0.0 → 7.0.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/CHANGELOG.md +195 -449
- package/LICENSE +2 -2
- package/README.md +12 -10
- package/cli.mjs +5 -3
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +4 -7
- package/lib/appstate-bar/index.d.ts +2 -2
- package/lib/appstate-bar/index.js +10 -4
- package/lib/autosuggest/index.d.ts +7 -7
- package/lib/autosuggest/index.js +80 -80
- package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
- package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
- package/lib/button/index.js +7 -10
- package/lib/button-bar/index.d.ts +1 -1
- package/lib/button-bar/index.js +12 -12
- package/lib/calendar/index.d.ts +39 -39
- package/lib/calendar/index.js +156 -123
- package/lib/calendar/utils.js +1 -1
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +2 -4
- 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/chart/elements/chart.d.ts +4 -4
- package/lib/chart/elements/chart.js +39 -33
- package/lib/chart/plugins/doughnut-center-label.d.ts +3 -3
- package/lib/chart/plugins/doughnut-center-label.js +13 -9
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +12 -13
- package/lib/clock/index.d.ts +55 -55
- package/lib/clock/index.js +84 -95
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +27 -18
- package/lib/collapse/themes/halo/dark/index.js +1 -1
- package/lib/collapse/themes/halo/light/index.js +1 -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-picker/index.d.ts +2 -2
- package/lib/color-picker/index.js +40 -34
- 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/configuration/elements/configuration.js +2 -2
- package/lib/counter/index.d.ts +4 -4
- package/lib/counter/index.js +9 -7
- package/lib/datetime-field/index.d.ts +4 -5
- package/lib/datetime-field/index.js +32 -23
- package/lib/datetime-field/utils.js +11 -1
- package/lib/datetime-picker/index.d.ts +75 -75
- package/lib/datetime-picker/index.js +150 -131
- package/lib/datetime-picker/locales.js +5 -5
- package/lib/datetime-picker/utils.js +9 -9
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +5 -5
- package/lib/dialog/index.js +51 -47
- package/lib/email-field/index.d.ts +1 -1
- package/lib/email-field/index.js +6 -6
- package/lib/events.d.ts +1 -1
- package/lib/flag/index.d.ts +1 -1
- package/lib/flag/index.js +6 -5
- 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 -1
- package/lib/header/themes/halo/light/index.js +1 -1
- package/lib/header/themes/solar/charcoal/index.js +1 -1
- package/lib/header/themes/solar/pearl/index.js +1 -1
- 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/index.d.ts +9 -9
- package/lib/heatmap/index.js +51 -42
- package/lib/icon/index.d.ts +2 -2
- package/lib/icon/index.js +8 -10
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +29 -29
- package/lib/interactive-chart/index.js +69 -55
- 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/jsx.d.ts +6 -4
- package/lib/label/index.d.ts +1 -1
- package/lib/label/index.js +10 -7
- package/lib/layout/index.d.ts +7 -7
- package/lib/layout/index.js +7 -7
- package/lib/led-gauge/index.d.ts +1 -1
- package/lib/led-gauge/index.js +10 -10
- 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/loader/index.js +7 -8
- package/lib/multi-input/index.d.ts +6 -6
- package/lib/multi-input/index.js +39 -45
- 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 +14 -13
- package/lib/notification/helpers/status.js +1 -1
- 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 +5 -6
- package/lib/number-field/index.js +37 -47
- 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 +152 -96
- 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-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 +14 -13
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +39 -14
- package/lib/panel/index.js +1 -1
- package/lib/password-field/index.d.ts +2 -2
- package/lib/password-field/index.js +3 -3
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +22 -19
- package/lib/progress-bar/index.d.ts +1 -1
- package/lib/progress-bar/index.js +38 -37
- 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/rating/index.d.ts +1 -1
- package/lib/rating/index.js +2 -5
- 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/select/index.d.ts +34 -34
- package/lib/select/index.js +68 -81
- package/lib/sidebar-layout/index.d.ts +2 -2
- package/lib/sidebar-layout/index.js +7 -9
- package/lib/slider/index.d.ts +2 -2
- package/lib/slider/index.js +57 -45
- 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/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/tab/index.d.ts +1 -1
- package/lib/tab/index.js +16 -27
- package/lib/tab/themes/halo/dark/index.js +1 -1
- package/lib/tab/themes/halo/light/index.js +1 -1
- package/lib/tab/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- 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 -1
- package/lib/tab-bar/themes/halo/light/index.js +1 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/index.js +34 -31
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +103 -89
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +4 -3
- package/lib/toggle/themes/halo/dark/index.js +1 -1
- package/lib/toggle/themes/halo/light/index.js +1 -1
- package/lib/toggle/themes/solar/charcoal/index.js +1 -1
- package/lib/toggle/themes/solar/pearl/index.js +1 -1
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- 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/tornado-chart/elements/tornado-chart.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.js +2 -2
- package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
- package/lib/tornado-chart/elements/tornado-item.js +12 -10
- 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/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- 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 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +17 -17
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
2
2
|
import '@refinitiv-ui/elements/label/themes/halo/dark';
|
|
3
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#404040;color:#ccc;height:36px;padding:9px 12px;outline:0;font-size:12px;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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
|
|
3
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#404040;color:#ccc;height:36px;padding:9px 12px;outline:0;font-size:12px;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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:#1429bd;box-shadow:-1em 0 .75em -.5em #1429bd}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#1429bd}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#1429bd;box-shadow:-1em 0 .75em -.5em #1429bd}: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:#1429bd}: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:#1429bd}: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[clears-on-hover]) [part=close-container],:host([level=\'3\']:hover[clears-on-hover]) [part=close-container],:host([level=\'3\'][active][clears-on-hover]) [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\']:hover){border-color:#1429bd}:host([level=\'3\']:active){border-color:#0f1e8a}' }}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
2
2
|
import '@refinitiv-ui/elements/label/themes/halo/light';
|
|
3
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#e6e6e6;color:#0d0d0d;height:36px;padding:9px 12px;outline:0;font-size:12px;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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
|
|
3
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#e6e6e6;color:#0d0d0d;height:36px;padding:9px 12px;outline:0;font-size:12px;font-weight:500;transition:120ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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:#1429bd;box-shadow:-1em 0 .75em -.5em #1429bd}:host([active]){color:#fff;background-color:#334bff}:host([active]:hover){background-color:#1429bd}:host([active]:hover[clears-on-hover]) [part=close-container]{background-color:#1429bd;box-shadow:-1em 0 .75em -.5em #1429bd}: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:#1429bd}: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:#1429bd}: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[clears-on-hover]) [part=close-container],:host([level=\'3\']:hover[clears-on-hover]) [part=close-container],:host([level=\'3\'][active][clears-on-hover]) [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\']:hover){border-color:#1429bd}:host([level=\'3\']:active){border-color:#0f1e8a}' }}));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
2
2
|
import '@refinitiv-ui/elements/label/themes/solar/charcoal';
|
|
3
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#3c3c42;color:#c2c2c2;height:23px;padding:7px 15px;outline:0;font-size:13px;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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
|
|
3
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#3c3c42;color:#c2c2c2;height:23px;padding:7px 15px;outline:0;font-size:13px;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
2
2
|
import '@refinitiv-ui/elements/label/themes/solar/pearl';
|
|
3
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#fafbfc;color:#505050;height:23px;padding:7px 15px;outline:0;font-size:13px;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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
|
|
3
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab', styles: ':host{cursor:pointer;background-color:#fafbfc;color:#505050;height:23px;padding:7px 15px;outline:0;font-size:13px;font-weight:500;transition:70ms;position:relative;box-sizing:border-box;-webkit-user-select:none;-moz-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}' }}));
|
|
@@ -34,7 +34,7 @@ const tweenAnimate = (configs) => {
|
|
|
34
34
|
const delta = endPosition - startPosition;
|
|
35
35
|
const tweenLoop = () => {
|
|
36
36
|
const currentTime = 'now' in window.performance ? performance.now() : new Date().getTime();
|
|
37
|
-
const step = Math.min(1, (
|
|
37
|
+
const step = Math.min(1, (currentTime - startTime) / duration);
|
|
38
38
|
const factor = functionEasings[easing](step); // factor can be a decimal
|
|
39
39
|
configs.target.scrollLeft = startPosition + delta * factor;
|
|
40
40
|
if (step < 1 && configs.target.scrollLeft !== endPosition) {
|
package/lib/tab-bar/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '../button/index.js';
|
|
4
4
|
import '../layout/index.js';
|
|
5
5
|
/**
|
package/lib/tab-bar/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
|
-
import { tweenAnimate } from './helpers/animate.js';
|
|
8
|
-
import { Tab } from '../tab/index.js';
|
|
9
6
|
import '../button/index.js';
|
|
10
7
|
import '../layout/index.js';
|
|
8
|
+
import { Tab } from '../tab/index.js';
|
|
9
|
+
import { VERSION } from '../version.js';
|
|
10
|
+
import { tweenAnimate } from './helpers/animate.js';
|
|
11
11
|
const BAR_TRAVEL_DISTANCE = 150; // scroll distance
|
|
12
12
|
/**
|
|
13
13
|
* Container for tabs
|
|
@@ -54,13 +54,13 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
54
54
|
:host {
|
|
55
55
|
display: flex;
|
|
56
56
|
}
|
|
57
|
-
:host([alignment=center]) {
|
|
57
|
+
:host([alignment='center']) {
|
|
58
58
|
justify-content: center;
|
|
59
59
|
}
|
|
60
|
-
:host([alignment=right]) {
|
|
60
|
+
:host([alignment='right']) {
|
|
61
61
|
justify-content: flex-end;
|
|
62
62
|
}
|
|
63
|
-
:host [part=content] {
|
|
63
|
+
:host [part='content'] {
|
|
64
64
|
flex-grow: 0;
|
|
65
65
|
}
|
|
66
66
|
`;
|
|
@@ -129,7 +129,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
129
129
|
*/
|
|
130
130
|
isValidValue(value) {
|
|
131
131
|
const tabList = this.getFocusableTabs();
|
|
132
|
-
return tabList.some(tab => this.getTabValue(tab) === value);
|
|
132
|
+
return tabList.some((tab) => this.getTabValue(tab) === value);
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* On *user-interaction* set the value and notify.
|
|
@@ -153,7 +153,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
153
153
|
}
|
|
154
154
|
this.setLevel();
|
|
155
155
|
// get tab value from active tab
|
|
156
|
-
const activeTab = tabList.find(tab => tab.active) || tabList[0];
|
|
156
|
+
const activeTab = tabList.find((tab) => tab.active) || tabList[0];
|
|
157
157
|
if (activeTab) {
|
|
158
158
|
this.value = this.getTabValue(activeTab);
|
|
159
159
|
}
|
|
@@ -170,7 +170,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
170
170
|
}
|
|
171
171
|
let hasActiveTab = false;
|
|
172
172
|
const tabList = this.getTabElements(); // get all tab elements include disabled tab
|
|
173
|
-
tabList.forEach(tab => {
|
|
173
|
+
tabList.forEach((tab) => {
|
|
174
174
|
const tabValue = this.getTabValue(tab);
|
|
175
175
|
// only mark tab as active once
|
|
176
176
|
if (tabValue === value && !hasActiveTab && !tab.disabled) {
|
|
@@ -231,7 +231,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
231
231
|
* @returns the array of focusable tab
|
|
232
232
|
*/
|
|
233
233
|
getFocusableTabs() {
|
|
234
|
-
return this.getTabElements().filter(tab => !tab.disabled);
|
|
234
|
+
return this.getTabElements().filter((tab) => !tab.disabled);
|
|
235
235
|
}
|
|
236
236
|
/**
|
|
237
237
|
* Set tab level attribute accordingly
|
|
@@ -332,7 +332,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
332
332
|
if (tabList.length <= 0) {
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
const focusedTabIndex = tabList.findIndex(tab => tab === document.activeElement);
|
|
335
|
+
const focusedTabIndex = tabList.findIndex((tab) => tab === document.activeElement);
|
|
336
336
|
const nextTab = direction === 'next'
|
|
337
337
|
? tabList[focusedTabIndex + 1] || tabList[0]
|
|
338
338
|
: tabList[focusedTabIndex - 1] || tabList[tabList.length - 1];
|
|
@@ -387,7 +387,7 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
387
387
|
manageTabIndex() {
|
|
388
388
|
const tabList = this.getFocusableTabs();
|
|
389
389
|
if (tabList && tabList.length > 0) {
|
|
390
|
-
const focusedTabIndex = tabList.findIndex(tab => tab.active);
|
|
390
|
+
const focusedTabIndex = tabList.findIndex((tab) => tab.active);
|
|
391
391
|
this.rovingTabIndex(tabList[focusedTabIndex], tabList);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -398,11 +398,27 @@ let TabBar = class TabBar extends BasicElement {
|
|
|
398
398
|
*/
|
|
399
399
|
render() {
|
|
400
400
|
return html `
|
|
401
|
-
${!this.vertical
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
401
|
+
${!this.vertical
|
|
402
|
+
? html `<ef-button
|
|
403
|
+
tabIndex="-1"
|
|
404
|
+
aria-hidden="true"
|
|
405
|
+
icon="left"
|
|
406
|
+
part="left-btn"
|
|
407
|
+
@tap=${this.handleScrollLeft}
|
|
408
|
+
></ef-button>`
|
|
409
|
+
: null}
|
|
410
|
+
<ef-layout part="content" @resize=${this.handleResize}>
|
|
411
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
412
|
+
</ef-layout>
|
|
413
|
+
${!this.vertical
|
|
414
|
+
? html `<ef-button
|
|
415
|
+
tabIndex="-1"
|
|
416
|
+
aria-hidden="true"
|
|
417
|
+
icon="right"
|
|
418
|
+
part="right-btn"
|
|
419
|
+
@tap=${this.handleScrollRight}
|
|
420
|
+
></ef-button>`
|
|
421
|
+
: null}
|
|
406
422
|
`;
|
|
407
423
|
}
|
|
408
424
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/tab/themes/halo/dark';
|
|
2
2
|
import '@refinitiv-ui/elements/button/themes/halo/dark';
|
|
3
3
|
import '@refinitiv-ui/elements/layout/themes/halo/dark';
|
|
4
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab-bar', styles: ':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:#1429bd}: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:#1429bd}: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
|
|
4
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab-bar', styles: ':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:#1429bd}: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:#1429bd}: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;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:#1429bd}: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
1
|
import '@refinitiv-ui/elements/tab/themes/halo/light';
|
|
2
2
|
import '@refinitiv-ui/elements/button/themes/halo/light';
|
|
3
3
|
import '@refinitiv-ui/elements/layout/themes/halo/light';
|
|
4
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab-bar', styles: ':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:#1429bd}: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:#1429bd}: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
|
|
4
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-tab-bar', styles: ':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:#1429bd}: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:#1429bd}: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;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:#1429bd}: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,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, FormFieldElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
|
|
4
4
|
import '../icon/index.js';
|
|
5
5
|
/**
|
package/lib/text-field/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { FormFieldElement, css,
|
|
2
|
+
import { FormFieldElement, css, html, nothing } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
6
|
import '../icon/index.js';
|
|
8
7
|
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
9
|
const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
|
|
10
10
|
/**
|
|
11
11
|
* Form control element for text.
|
|
@@ -76,24 +76,25 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
76
76
|
:host {
|
|
77
77
|
display: inline-block;
|
|
78
78
|
}
|
|
79
|
-
:host(:focus),
|
|
79
|
+
:host(:focus),
|
|
80
|
+
:host input:focus {
|
|
80
81
|
outline: none;
|
|
81
82
|
}
|
|
82
|
-
[part=input] {
|
|
83
|
+
[part='input'] {
|
|
83
84
|
font: inherit;
|
|
84
85
|
background: none;
|
|
85
86
|
color: currentColor;
|
|
86
87
|
border: none;
|
|
87
88
|
text-align: inherit;
|
|
88
89
|
}
|
|
89
|
-
:host([icon]) [part=icon]{
|
|
90
|
+
:host([icon]) [part='icon'] {
|
|
90
91
|
display: flex;
|
|
91
92
|
}
|
|
92
93
|
:host([transparent]) {
|
|
93
94
|
background: none !important;
|
|
94
95
|
border: none !important;
|
|
95
96
|
}
|
|
96
|
-
:host([icon][icon-has-action]) [part=icon] {
|
|
97
|
+
:host([icon][icon-has-action]) [part='icon'] {
|
|
97
98
|
cursor: pointer;
|
|
98
99
|
}
|
|
99
100
|
`;
|
|
@@ -105,7 +106,7 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
105
106
|
*/
|
|
106
107
|
firstUpdated(changedProperties) {
|
|
107
108
|
super.firstUpdated(changedProperties);
|
|
108
|
-
registerOverflowTooltip(this, () => this.inputValue, () => this.inputElement ? isElementOverflown(this.inputElement) : false);
|
|
109
|
+
registerOverflowTooltip(this, () => this.inputValue, () => (this.inputElement ? isElementOverflown(this.inputElement) : false));
|
|
109
110
|
}
|
|
110
111
|
/**
|
|
111
112
|
* Called when the element’s DOM has been updated and rendered
|
|
@@ -148,9 +149,12 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
148
149
|
/* c8 ignore start */
|
|
149
150
|
shouldValidateInput(changedProperties) {
|
|
150
151
|
// TODO: This validation should be refactored
|
|
151
|
-
return (changedProperties.has('pattern') ||
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
return (changedProperties.has('pattern') ||
|
|
153
|
+
!!(this.pattern && changedProperties.has('value')) ||
|
|
154
|
+
changedProperties.has('minLength') ||
|
|
155
|
+
!!(this.minLength && changedProperties.has('value')) ||
|
|
156
|
+
changedProperties.has('maxLength') ||
|
|
157
|
+
!!(this.maxLength && changedProperties.has('value')));
|
|
154
158
|
}
|
|
155
159
|
/* c8 ignore stop */
|
|
156
160
|
/**
|
|
@@ -207,11 +211,11 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
207
211
|
get decorateInputMap() {
|
|
208
212
|
return {
|
|
209
213
|
...super.decorateInputMap,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
type: 'text',
|
|
215
|
+
part: 'input',
|
|
216
|
+
maxlength: this.maxLength,
|
|
217
|
+
minlength: this.minLength,
|
|
218
|
+
pattern: this.pattern || null
|
|
215
219
|
};
|
|
216
220
|
}
|
|
217
221
|
/**
|
|
@@ -219,18 +223,20 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
219
223
|
* @returns {void}
|
|
220
224
|
*/
|
|
221
225
|
renderIcon() {
|
|
222
|
-
return this.icon
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
226
|
+
return this.icon
|
|
227
|
+
? html `
|
|
228
|
+
<ef-icon
|
|
229
|
+
role="${this.iconHasAction ? 'button' : nothing}"
|
|
230
|
+
tabindex="${this.iconHasAction ? '0' : nothing}"
|
|
231
|
+
aria-label="${this.iconHasAction ? this.icon : nothing}"
|
|
232
|
+
part="icon"
|
|
233
|
+
icon="${this.icon}"
|
|
234
|
+
?readonly="${this.readonly}"
|
|
235
|
+
?disabled="${this.disabled}"
|
|
236
|
+
@tap="${this.iconClick}"
|
|
237
|
+
></ef-icon>
|
|
238
|
+
`
|
|
239
|
+
: null;
|
|
234
240
|
}
|
|
235
241
|
/**
|
|
236
242
|
* A `TemplateResult` that will be used
|
|
@@ -238,10 +244,7 @@ let TextField = class TextField extends FormFieldElement {
|
|
|
238
244
|
* @return Render template
|
|
239
245
|
*/
|
|
240
246
|
render() {
|
|
241
|
-
return html `
|
|
242
|
-
${super.render()}
|
|
243
|
-
${this.renderIcon()}
|
|
244
|
-
`;
|
|
247
|
+
return html ` ${super.render()} ${this.renderIcon()} `;
|
|
245
248
|
}
|
|
246
249
|
};
|
|
247
250
|
__decorate([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
3
|
-
import '../number-field/index.js';
|
|
4
|
-
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
2
|
+
import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
5
3
|
import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
|
|
4
|
+
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
5
|
+
import '../number-field/index.js';
|
|
6
6
|
declare enum Segment {
|
|
7
7
|
HOURS = "hours",
|
|
8
8
|
MINUTES = "minutes",
|
|
@@ -90,9 +90,9 @@ export declare class TimePicker extends ControlElement {
|
|
|
90
90
|
*/
|
|
91
91
|
showSeconds: boolean;
|
|
92
92
|
/**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
* Value of the element
|
|
94
|
+
* @param value Element value
|
|
95
|
+
*/
|
|
96
96
|
set value(value: string);
|
|
97
97
|
get value(): string;
|
|
98
98
|
/**
|