@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
package/lib/chart/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/* eslint @typescript-eslint/no-unsafe-call: 0 */
|
|
2
|
+
/* eslint @typescript-eslint/no-unsafe-member-access: 0 */
|
|
1
3
|
import { __decorate } from "tslib";
|
|
2
4
|
import { BasicElement, html, css } 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/
|
|
5
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
6
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
7
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
8
|
import { VERSION } from '../version.js';
|
|
7
|
-
import { color as parseColor } from '@refinitiv-ui/utils/
|
|
9
|
+
import { color as parseColor } from '@refinitiv-ui/utils/color.js';
|
|
8
10
|
import 'chart.js/dist/Chart.bundle.min.js';
|
|
9
11
|
import { legendHelper, merge } from './helpers/index.js';
|
|
10
12
|
import '../header/index.js';
|
|
@@ -14,6 +16,7 @@ import doughnutCenterPlugin from './plugins/doughnut-center-label.js';
|
|
|
14
16
|
window.Chart.pluginService.register(doughnutCenterPlugin);
|
|
15
17
|
const CSS_COLOR_PREFIX = '--chart-color-';
|
|
16
18
|
const CHART_TYPE_OPAQUE = ['line', 'bubble', 'radar', 'polarArea'];
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
17
20
|
const DEFAULT_CHART_CONFIG = window.Chart.defaults;
|
|
18
21
|
const ELF_CHART_CONFIG = {
|
|
19
22
|
polarArea: {
|
|
@@ -54,8 +57,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
54
57
|
* @returns {Chart.ChartLegendLabelItem[]} Array of label configurations
|
|
55
58
|
*/
|
|
56
59
|
this.generateLegendLabels = (chart) => {
|
|
57
|
-
|
|
58
|
-
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
60
|
+
if (!this.config?.type) {
|
|
59
61
|
return [];
|
|
60
62
|
}
|
|
61
63
|
const chartOption = DEFAULT_CHART_CONFIG[this.config.type];
|
|
@@ -63,11 +65,11 @@ let Chart = class Chart extends BasicElement {
|
|
|
63
65
|
&& chartOption.legend
|
|
64
66
|
&& Array.isArray(this.datasets[0].backgroundColor)) {
|
|
65
67
|
let legends = [];
|
|
66
|
-
if (
|
|
67
|
-
legends =
|
|
68
|
+
if (chartOption.legend.labels?.generateLabels) {
|
|
69
|
+
legends = chartOption.legend.labels?.generateLabels(chart);
|
|
68
70
|
}
|
|
69
71
|
// Customize for doughnut chart change border color to background color
|
|
70
|
-
if (['pie', 'doughnut'].includes(
|
|
72
|
+
if (['pie', 'doughnut'].includes(this.config?.type) && this.datasets.length > 1) {
|
|
71
73
|
legends.forEach((label) => {
|
|
72
74
|
label.strokeStyle = label.fillStyle;
|
|
73
75
|
});
|
|
@@ -75,9 +77,8 @@ let Chart = class Chart extends BasicElement {
|
|
|
75
77
|
return legends;
|
|
76
78
|
}
|
|
77
79
|
return this.datasets.map((dataset, i) => {
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
const usePointStyle = ((_c = (_b = chart.options.legend) === null || _b === void 0 ? void 0 : _b.labels) === null || _c === void 0 ? void 0 : _c.usePointStyle) || false;
|
|
80
|
+
const solidFill = !CHART_TYPE_OPAQUE.includes(dataset.type || this.config?.type);
|
|
81
|
+
const usePointStyle = chart.options.legend?.labels?.usePointStyle || false;
|
|
81
82
|
return {
|
|
82
83
|
text: dataset.label,
|
|
83
84
|
fillStyle: legendHelper.getLegendFillStyle(dataset, usePointStyle, solidFill),
|
|
@@ -122,8 +123,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
122
123
|
* @returns chart title
|
|
123
124
|
*/
|
|
124
125
|
get chartTitle() {
|
|
125
|
-
|
|
126
|
-
const title = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.title) === null || _c === void 0 ? void 0 : _c.text;
|
|
126
|
+
const title = this.config?.options?.title?.text;
|
|
127
127
|
if (title) {
|
|
128
128
|
return typeof title === 'string' ? title : title.join();
|
|
129
129
|
}
|
|
@@ -134,8 +134,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
134
134
|
* @returns dataset array
|
|
135
135
|
*/
|
|
136
136
|
get datasets() {
|
|
137
|
-
|
|
138
|
-
return ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.datasets) || [];
|
|
137
|
+
return this.config?.data?.datasets || [];
|
|
139
138
|
}
|
|
140
139
|
/**
|
|
141
140
|
* List of available chart colors
|
|
@@ -186,7 +185,6 @@ let Chart = class Chart extends BasicElement {
|
|
|
186
185
|
* @returns {ChartConfig} chart config with theme
|
|
187
186
|
*/
|
|
188
187
|
get themableConfig() {
|
|
189
|
-
var _a;
|
|
190
188
|
const style = getComputedStyle(this);
|
|
191
189
|
// TODO: Try and remove the need for global object modification.
|
|
192
190
|
// It's easier to cover all areas by modifying the global object,
|
|
@@ -222,7 +220,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
222
220
|
displayColors: false
|
|
223
221
|
},
|
|
224
222
|
legend: {
|
|
225
|
-
position: ['pie', 'doughnut'].includes(
|
|
223
|
+
position: ['pie', 'doughnut'].includes(this.config?.type || '') ? 'right' : 'top',
|
|
226
224
|
labels: {
|
|
227
225
|
boxWidth: this.cssVarAsNumber('--legend-key-box-width', '10'),
|
|
228
226
|
generateLabels: this.generateLegendLabels
|
|
@@ -291,8 +289,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
291
289
|
* @returns {Chart.ChartDataSets} Information about the dataset
|
|
292
290
|
*/
|
|
293
291
|
datasetInfo(dataset) {
|
|
294
|
-
|
|
295
|
-
const type = dataset.type || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.type);
|
|
292
|
+
const type = dataset.type || this.config?.type;
|
|
296
293
|
let index = this.datasets.indexOf(dataset);
|
|
297
294
|
const isColorArray = (!!type && ['pie', 'doughnut', 'polarArea'].includes(type)) || type === 'bar' && this.datasets.length === 1;
|
|
298
295
|
const isSolidFill = !!type && !CHART_TYPE_OPAQUE.includes(type);
|
|
@@ -456,8 +453,7 @@ let Chart = class Chart extends BasicElement {
|
|
|
456
453
|
* @returns {void}
|
|
457
454
|
*/
|
|
458
455
|
onResize() {
|
|
459
|
-
|
|
460
|
-
(_a = this.chart) === null || _a === void 0 ? void 0 : _a.resize();
|
|
456
|
+
this.chart?.resize();
|
|
461
457
|
}
|
|
462
458
|
/**
|
|
463
459
|
* A `TemplateResult` that will be used
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const CHART = window.Chart;
|
|
2
2
|
const getPluginConfig = (chart) => {
|
|
3
|
-
|
|
4
|
-
return (_b = (_a = chart.config.options) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.centerLabel;
|
|
3
|
+
return chart.config.options?.plugins?.centerLabel;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
7
6
|
* Draw line
|
|
@@ -10,18 +9,17 @@ const getPluginConfig = (chart) => {
|
|
|
10
9
|
* @returns {void}
|
|
11
10
|
*/
|
|
12
11
|
const drawItemBorder = function (chart, active) {
|
|
13
|
-
var _a, _b, _c;
|
|
14
12
|
if (!chart.data.datasets) {
|
|
15
13
|
return;
|
|
16
14
|
}
|
|
17
|
-
if (active
|
|
15
|
+
if (active?.length) {
|
|
18
16
|
const ctx = chart.ctx;
|
|
19
17
|
const chartItem = active[0];
|
|
20
18
|
const vm = chartItem._view;
|
|
21
19
|
const datasets = chart.data.datasets[chartItem._datasetIndex];
|
|
22
20
|
vm.backgroundColor = datasets.backgroundColor[chartItem._index];
|
|
23
21
|
vm.backgroundColor = CHART.helpers.getHoverColor(vm.backgroundColor); // we need to make color bolder
|
|
24
|
-
vm.borderWidth = (datasets.borderWidth ||
|
|
22
|
+
vm.borderWidth = (datasets.borderWidth || chart.config.options?.elements?.arc?.borderWidth);
|
|
25
23
|
vm.borderColor = (getComputedStyle(chart.canvas).getPropertyValue('--doughnut-border-color') || CHART.defaults.global.defaultFontColor);
|
|
26
24
|
const sA = vm.startAngle;
|
|
27
25
|
const eA = vm.endAngle;
|
|
@@ -73,7 +71,6 @@ const plugins = {
|
|
|
73
71
|
}
|
|
74
72
|
},
|
|
75
73
|
beforeDraw: function (chart) {
|
|
76
|
-
var _a;
|
|
77
74
|
const config = getPluginConfig(chart);
|
|
78
75
|
if (!config) {
|
|
79
76
|
return;
|
|
@@ -83,7 +80,7 @@ const plugins = {
|
|
|
83
80
|
if (chart._select) {
|
|
84
81
|
active = chart._select;
|
|
85
82
|
}
|
|
86
|
-
if (
|
|
83
|
+
if (chart.active?.length) {
|
|
87
84
|
active = chart.active;
|
|
88
85
|
}
|
|
89
86
|
const renderText = config.onRenderLabel(chart, active);
|
|
@@ -155,7 +152,6 @@ const plugins = {
|
|
|
155
152
|
}
|
|
156
153
|
},
|
|
157
154
|
afterDatasetUpdate: function (chart) {
|
|
158
|
-
var _a;
|
|
159
155
|
// Check chart already init selected.
|
|
160
156
|
if (chart.selected !== undefined) {
|
|
161
157
|
return;
|
|
@@ -165,7 +161,7 @@ const plugins = {
|
|
|
165
161
|
if (!config || !config.selected || !chart.data.datasets) {
|
|
166
162
|
return;
|
|
167
163
|
}
|
|
168
|
-
const selectedIndex = Number(
|
|
164
|
+
const selectedIndex = Number(config.selected?.index);
|
|
169
165
|
const datasetIndex = Number(config.selected.datasetIndex || 0);
|
|
170
166
|
const visibleIndexes = chart.getVisibleDatasetCount() - 1;
|
|
171
167
|
// Validate index and datasetIndex
|
|
@@ -177,14 +173,13 @@ const plugins = {
|
|
|
177
173
|
chart.selected = items ? [items] : [];
|
|
178
174
|
},
|
|
179
175
|
afterDraw: function (chart) {
|
|
180
|
-
var _a;
|
|
181
176
|
if (getPluginConfig(chart)) {
|
|
182
177
|
// Draw active element
|
|
183
178
|
// Note: use logic from chart.js - chart.js/src/elements/element.arc.js :draw()
|
|
184
179
|
// hover
|
|
185
180
|
drawItemBorder(chart, chart.active);
|
|
186
181
|
// selected
|
|
187
|
-
if (
|
|
182
|
+
if (chart.selected?.length) {
|
|
188
183
|
chart._select = chart.selected;
|
|
189
184
|
chart.selected = [];
|
|
190
185
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/header/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/layout/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-chart', ':host{--grid-line-color:rgba(51, 51, 51, 0.5);--zero-line-color:rgba(51, 51, 51, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1A;--tooltip-background-color:rgba(204, 204, 204, 0.9);--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;font-size:12rem;--tooltip-background-color:#FFFFFF;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--chart-color-9:#999999;--chart-color-10:#3BBAFF;--chart-color-11:#198C8C;--chart-color-12:#C36241;--chart-color-13:#CCD2FF;--chart-color-14:#808080;--chart-color-15:#FFDE66;--chart-color-16:#BCA2E1;--chart-color-17:#59DFE1;--chart-color-18:#FF9666;--chart-color-19:#6CEFC8;--chart-color-20:#F281A7;--chart-color-21:#CCCCCC;--chart-color-22:#89D5FF;--chart-color-23:#75BABA;--chart-color-24:#DBA08D;--chart-color-25:#F6ABC4}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/header/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/layout/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-chart', ':host{--grid-line-color:rgba(224, 224, 224, 0.5);--zero-line-color:rgba(224, 224, 224, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FAFAFA;--tooltip-background-color:rgba(13, 13, 13, 0.9);--tooltip-title-color:#FFFFFF;--tooltip-body-color:#FFFFFF;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;font-size:12rem;--tooltip-background-color:#FFF4CC;--tooltip-title-color:#0D0D0D;--tooltip-body-color:#0D0D0D;--tooltip-padding-x:8px;--tooltip-padding-y:4px;--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--chart-color-9:#595959;--chart-color-10:#236F99;--chart-color-11:#147070;--chart-color-12:#AF583A;--chart-color-13:#0F1E8A;--chart-color-14:#737373;--chart-color-15:#4C3C00;--chart-color-16:#563F77;--chart-color-17:#004E4F;--chart-color-18:#993000;--chart-color-19:#00432F;--chart-color-20:#A3204C;--chart-color-21:#404040;--chart-color-22:#174A66;--chart-color-23:#116262;--chart-color-24:#88442D;--chart-color-25:#5D122B}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/header/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/layout/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-chart', ':host{--grid-line-color:rgba(10, 10, 10, 0.5);--zero-line-color:rgba(10, 10, 10, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#1A1A1C;--tooltip-background-color:rgba(194, 194, 194, 0.9);--tooltip-title-color:#151516;--tooltip-body-color:#151516;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;font-size:12rem;color:rgba(194,194,194,.8);--legend-key-box-width:12;--grid-line-color:rgba(194, 194, 194, 0.1);--zero-line-color:rgba(194, 194, 194, 0.1);--animation-duration:500;--tooltip-background-color:rgba(74, 74, 82, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#C2C2C2;--doughnut-border-color:#ffffff;--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#48CBF7;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#EFF748;--chart-color-15:#FF4043;--chart-color-16:#A7DB0B;--chart-color-17:#C2C2C2;--chart-color-18:#1578AD;--chart-color-19:#F2B530;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#60E65C;--chart-color-25:#2960A3}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/header/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/layout/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-chart', ':host{--grid-line-color:rgba(213, 216, 219, 0.5);--zero-line-color:rgba(213, 216, 219, 0.5);--animation-duration:1000;--line-width:2px;--line-tension:0;--multi-dataset-border-color:#FFFFFF;--tooltip-background-color:rgba(72, 72, 72, 0.9);--tooltip-title-color:#C2C2C2;--tooltip-body-color:#C2C2C2;--tooltip-border-radius:0px;--tooltip-caret-size:7px;--tooltip-padding-x:7px;--tooltip-padding-y:5px;--tooltip-title-spacing:0;--legend-key-box-width:4px;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;font-size:12rem;color:rgba(72,72,72,.8);--legend-key-box-width:12;--grid-line-color:rgba(72, 72, 72, 0.1);--zero-line-color:rgba(72, 72, 72, 0.1);--animation-duration:500;--tooltip-background-color:rgba(190, 195, 204, 0.9);--tooltip-title-color:#484848;--tooltip-body-color:#484848;--tooltip-caret-size:8px;--tooltip-padding-x:8px;--tooltip-padding-y:8px;--doughnut-center-text-color:#484848;--doughnut-border-color:#000000;--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#40B6DE;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#AAB218;--chart-color-15:#FF4043;--chart-color-16:#80A808;--chart-color-17:#707070;--chart-color-18:#1578AC;--chart-color-19:#D9A22B;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#4BB347;--chart-color-25:#2960A3}');
|
package/lib/checkbox/index.d.ts
CHANGED
|
@@ -81,6 +81,11 @@ export declare class Checkbox extends ControlElement {
|
|
|
81
81
|
*/
|
|
82
82
|
protected render(): TemplateResult;
|
|
83
83
|
}
|
|
84
|
+
declare global {
|
|
85
|
+
interface HTMLElementTagNameMap {
|
|
86
|
+
'ef-checkbox': Checkbox;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
84
89
|
|
|
85
90
|
declare global {
|
|
86
91
|
interface HTMLElementTagNameMap {
|
package/lib/checkbox/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ControlElement, html, css } 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 { registerOverflowTooltip } from '../tooltip/index.js';
|
|
8
8
|
import '../icon/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/tooltip/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#6678FF;color:#ccc}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#0d0d0d;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.5);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #404040;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#6678ff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#ccc)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:grey}:host(:hover:not([readonly])){color:#fff}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#404040}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
|
|
@@ -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/tooltip/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation;--check-color:#334BFF;color:#404040}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.25);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #595959;width:14px;height:14px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#334bff);width:95%;height:95%}:host [part=label]{margin:0 7px;cursor:default}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:70%;height:1px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#404040)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{border-color:#334bff;box-shadow:0 0 0 #334bff}}:host(:not([readonly])) [part=container]{cursor:pointer}:host(:hover:not([checked]):not([indeterminate]):not([readonly])) [part=container]{border-color:#0d0d0d}:host(:hover:not([readonly])){color:#0d0d0d}:host([disabled]),:host([disabled]) [part=label]{opacity:.5}:host([checked]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]:not([checked])) [part=container]{border-color:#595959}:host([focused=visible]){outline:#334bff solid 1px;outline-offset:2px}:host([indeterminate]) [part=container]{border:1px solid #334bff}:host(:focus[readonly]) [part=container],:host(:focus[readonly][indeterminate]) [part=container]{border-color:#334bff}');
|
|
@@ -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/tooltip/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#000;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.6);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #4a4a52;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#f93);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#e2e2e2)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(194,194,194,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#c2c2c2}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(194,194,194,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(194,194,194,.6);border-color:rgba(74,74,82,.6);background-color:rgba(0,0,0,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #f93;border:1px dotted #f93}}');
|
|
@@ -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/tooltip/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-checkbox', ':host{margin:1px 0;vertical-align:middle;display:inline-flex;align-items:center;flex-wrap:nowrap;font-size:inherit;font-weight:inherit;touch-action:manipulation}:host(:focus){outline:0}:host [part=container]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:0;background-color:#fff;transition:box-shadow 150ms,border-color 150ms;box-shadow:inset 0 0 0 rgba(0,0,0,.3);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border:1px solid #a9afba;height:11px;width:11px}:host [part=check]{display:flex;justify-content:center;align-items:center;box-sizing:border-box;color:var(--check-color,#ee7600);border-width:0 2px 2px 0;width:95%;height:95%}:host [part=label]{cursor:default;margin:0 4px}:host([indeterminate]) [part=check]{border:none;background-color:currentColor;transform:none;border-radius:1px;margin:0;width:5px;height:5px}:host([disabled]) [part=check],:host([readonly]) [part=check]{color:var(--check-color,#acafb5)}:host([disabled]) [part=check]{opacity:.5}:host([disabled][checked]) [part=check]{opacity:.5}:host([disabled]) [part=label]{opacity:.65;color:rgba(72,72,72,.6)}:host([disabled][checked]) [part=check],:host([disabled][indeterminate]) [part=check]{color:#a9afba}:host([readonly][checked]) [part=check],:host([readonly][indeterminate]) [part=check]{color:rgba(169,175,186,.5)}:host([disabled]) [part=container],:host([readonly]) [part=container]{color:rgba(72,72,72,.6);border-color:rgba(169,175,186,.6);background-color:rgba(255,255,255,.6)}@media (-ms-high-contrast:none),(pointer:fine){:host(:focus) [part=container]{box-shadow:0 0 0 #ffb266;border:1px dotted #ffb266}}');
|
package/lib/clock/index.d.ts
CHANGED
|
@@ -305,6 +305,11 @@ export declare class Clock extends ResponsiveElement {
|
|
|
305
305
|
*/
|
|
306
306
|
protected render(): TemplateResult;
|
|
307
307
|
}
|
|
308
|
+
declare global {
|
|
309
|
+
interface HTMLElementTagNameMap {
|
|
310
|
+
'ef-clock': Clock;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
308
313
|
|
|
309
314
|
declare global {
|
|
310
315
|
interface HTMLElementTagNameMap {
|
package/lib/clock/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, WarningNotice, 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/
|
|
6
|
-
import { state } from '@refinitiv-ui/core/
|
|
7
|
-
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 { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
7
|
+
import { ifDefined } from '@refinitiv-ui/core/directives/if-defined.js';
|
|
8
8
|
import { VERSION } from '../version.js';
|
|
9
|
-
import { MILLISECONDS_IN_SECOND, HOURS_OF_NOON, isValidTime, toTimeSegment, TimeFormat, format, padNumber } from '@refinitiv-ui/utils/
|
|
9
|
+
import { MILLISECONDS_IN_SECOND, HOURS_OF_NOON, isValidTime, toTimeSegment, TimeFormat, format, padNumber } from '@refinitiv-ui/utils/date.js';
|
|
10
10
|
import { HOURS_IN_DAY, MINUTES_IN_HOUR, SECONDS_IN_DAY, SECONDS_IN_HOUR, SECONDS_IN_MINUTE } from './utils/timestamps.js';
|
|
11
11
|
import { register, deRegister } from './utils/TickManager.js';
|
|
12
12
|
const UP = 'Up';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TimeoutTaskRunner } from '@refinitiv-ui/utils/
|
|
2
|
-
import { MILLISECONDS_IN_SECOND } from '@refinitiv-ui/utils/
|
|
1
|
+
import { TimeoutTaskRunner } from '@refinitiv-ui/utils/async.js';
|
|
2
|
+
import { MILLISECONDS_IN_SECOND } from '@refinitiv-ui/utils/date.js';
|
|
3
3
|
const tickSet = new Set();
|
|
4
4
|
let timeout = null;
|
|
5
5
|
/**
|
package/lib/collapse/index.d.ts
CHANGED
|
@@ -107,6 +107,11 @@ export declare class Collapse extends BasicElement {
|
|
|
107
107
|
*/
|
|
108
108
|
protected render(): TemplateResult;
|
|
109
109
|
}
|
|
110
|
+
declare global {
|
|
111
|
+
interface HTMLElementTagNameMap {
|
|
112
|
+
'ef-collapse': Collapse;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
110
115
|
|
|
111
116
|
declare global {
|
|
112
117
|
interface HTMLElementTagNameMap {
|
package/lib/collapse/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { BasicElement, 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/
|
|
6
|
-
import { state } from '@refinitiv-ui/core/
|
|
7
|
-
import { ref, createRef } 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
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
7
|
+
import { ref, createRef } from '@refinitiv-ui/core/directives/ref.js';
|
|
8
8
|
import { VERSION } from '../version.js';
|
|
9
9
|
import { preload } from '../icon/index.js';
|
|
10
10
|
import '../header/index.js';
|
|
@@ -123,9 +123,8 @@ let Collapse = class Collapse extends BasicElement {
|
|
|
123
123
|
* @returns {void}
|
|
124
124
|
*/
|
|
125
125
|
firstUpdated(changedProperties) {
|
|
126
|
-
var _a;
|
|
127
126
|
super.firstUpdated(changedProperties);
|
|
128
|
-
|
|
127
|
+
this.panelHolderRef.value?.setAttribute('no-animation', '');
|
|
129
128
|
}
|
|
130
129
|
/**
|
|
131
130
|
* Invoked whenever the element is updated
|
|
@@ -154,8 +153,7 @@ let Collapse = class Collapse extends BasicElement {
|
|
|
154
153
|
* @returns {void}
|
|
155
154
|
*/
|
|
156
155
|
showHide() {
|
|
157
|
-
|
|
158
|
-
(_a = this.panelHolderRef.value) === null || _a === void 0 ? void 0 : _a.removeAttribute(('no-animation'));
|
|
156
|
+
this.panelHolderRef.value?.removeAttribute(('no-animation'));
|
|
159
157
|
this.setAnimationTargetHeight(this.getContentHeight());
|
|
160
158
|
}
|
|
161
159
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
3
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/panel/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/header/themes/halo/dark';
|
|
3
|
+
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
4
4
|
|
|
5
5
|
elf.customStyles.define('ef-collapse', ':host [part=toggle]{transition:.1s;opacity:.5;margin-right:.25em;margin-left:8px;flex-shrink:0;pointer-events:none;opacity:1}:host([expanded]) [part=toggle]{transform:rotate(90deg)}:host [part~=header]{padding:0}:host [part~=header][focused=visible]{background-color:#334bff}:host [part=header-toggle]{touch-action:manipulation;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;outline:0}@-webkit-keyframes expand{from{height:0}to{height:var(--target-height)}}@keyframes expand{from{height:0}to{height:var(--target-height)}}@-webkit-keyframes collapse{from{height:var(--target-height)}to{height:0}}@keyframes collapse{from{height:var(--target-height)}to{height:0}}:host [part=content]{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-timing-function:ease;animation-timing-function:ease;text-transform:none}:host(:not([expanded])) [part=content]{height:0;-webkit-animation-name:collapse;animation-name:collapse}:host(:not([expanded])) [part=toggle]{transform:rotate(0)}:host([expanded]) [part=content]{-webkit-animation-name:expand;animation-name:expand}:host [part=content] ef-panel{overflow:auto}:host [part=content] ef-panel:not([spacing]){padding:var(--panel-padding)}:host{text-transform:uppercase}:host [part=header]{text-transform:inherit}:host [part=header]:hover,:host [part~=header][focused=visible],:host([expanded]) [part=header]{color:#fff;cursor:pointer;background-color:#404040}:host [part=header]:hover[level="1"],:host [part~=header][focused=visible][level="1"],:host([expanded]) [part=header][level="1"]{background-color:#5a5a5a}:host [part=header]:hover[level="2"],:host [part~=header][focused=visible][level="2"],:host([expanded]) [part=header][level="2"]{background-color:#4d4d4d}:host [part=header]:hover[level="4"],:host [part~=header][focused=visible][level="4"],:host([expanded]) [part=header][level="4"]{background-color:#343434}');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
3
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/panel/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/header/themes/halo/light';
|
|
3
|
+
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
4
4
|
|
|
5
5
|
elf.customStyles.define('ef-collapse', ':host [part=toggle]{transition:.1s;opacity:.5;margin-right:.25em;margin-left:8px;flex-shrink:0;pointer-events:none;opacity:1}:host([expanded]) [part=toggle]{transform:rotate(90deg)}:host [part~=header]{padding:0}:host [part~=header][focused=visible]{background-color:#334bff}:host [part=header-toggle]{touch-action:manipulation;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;outline:0}@-webkit-keyframes expand{from{height:0}to{height:var(--target-height)}}@keyframes expand{from{height:0}to{height:var(--target-height)}}@-webkit-keyframes collapse{from{height:var(--target-height)}to{height:0}}@keyframes collapse{from{height:var(--target-height)}to{height:0}}:host [part=content]{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-timing-function:ease;animation-timing-function:ease;text-transform:none}:host(:not([expanded])) [part=content]{height:0;-webkit-animation-name:collapse;animation-name:collapse}:host(:not([expanded])) [part=toggle]{transform:rotate(0)}:host([expanded]) [part=content]{-webkit-animation-name:expand;animation-name:expand}:host [part=content] ef-panel{overflow:auto}:host [part=content] ef-panel:not([spacing]){padding:var(--panel-padding)}:host{text-transform:uppercase}:host [part=header]{text-transform:inherit}:host [part=header]:hover,:host [part~=header][focused=visible],:host([expanded]) [part=header]{color:#0d0d0d;cursor:pointer;background-color:#eaeaea}:host [part=header]:hover[level="1"],:host [part~=header][focused=visible][level="1"],:host([expanded]) [part=header][level="1"]{background-color:#d1d1d1}:host [part=header]:hover[level="2"],:host [part~=header][focused=visible][level="2"],:host([expanded]) [part=header][level="2"]{background-color:#dedede}:host [part=header]:hover[level="4"],:host [part~=header][focused=visible][level="4"],:host([expanded]) [part=header][level="4"]{background-color:#f2f2f2}');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
3
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/panel/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/header/themes/solar/charcoal';
|
|
3
|
+
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
4
4
|
|
|
5
5
|
elf.customStyles.define('ef-collapse', ':host [part=toggle]{transition:.2s;opacity:.5;margin-right:.25em;margin-left:10px;flex-shrink:0;pointer-events:none}:host([expanded]) [part=toggle]{transform:rotate(90deg)}:host [part~=header]{padding:0}:host [part~=header][focused=visible]{background-color:#4d4d55}:host [part=header-toggle]{touch-action:manipulation;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;outline:0}@-webkit-keyframes expand{from{height:0}to{height:var(--target-height)}}@keyframes expand{from{height:0}to{height:var(--target-height)}}@-webkit-keyframes collapse{from{height:var(--target-height)}to{height:0}}@keyframes collapse{from{height:var(--target-height)}to{height:0}}:host [part=content]{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:ease;animation-timing-function:ease}:host(:not([expanded])) [part=content]{height:0;-webkit-animation-name:collapse;animation-name:collapse}:host(:not([expanded])) [part=toggle]{transform:rotate(0)}:host([expanded]) [part=content]{-webkit-animation-name:expand;animation-name:expand}:host [part=content] ef-panel{overflow:auto}:host [part=content] ef-panel:not([spacing]){padding:var(--panel-padding)}');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
3
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/panel/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/header/themes/solar/pearl';
|
|
3
|
+
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
4
4
|
|
|
5
5
|
elf.customStyles.define('ef-collapse', ':host [part=toggle]{transition:.2s;opacity:.5;margin-right:.25em;margin-left:10px;flex-shrink:0;pointer-events:none}:host([expanded]) [part=toggle]{transform:rotate(90deg)}:host [part~=header]{padding:0}:host [part~=header][focused=visible]{background-color:#fff}:host [part=header-toggle]{touch-action:manipulation;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;outline:0}@-webkit-keyframes expand{from{height:0}to{height:var(--target-height)}}@keyframes expand{from{height:0}to{height:var(--target-height)}}@-webkit-keyframes collapse{from{height:var(--target-height)}to{height:0}}@keyframes collapse{from{height:var(--target-height)}to{height:0}}:host [part=content]{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-timing-function:ease;animation-timing-function:ease}:host(:not([expanded])) [part=content]{height:0;-webkit-animation-name:collapse;animation-name:collapse}:host(:not([expanded])) [part=toggle]{transform:rotate(0)}:host([expanded]) [part=content]{-webkit-animation-name:expand;animation-name:expand}:host [part=content] ef-panel{overflow:auto}:host [part=content] ef-panel:not([spacing]){padding:var(--panel-padding)}');
|
|
@@ -36,6 +36,11 @@ export declare class ColorPalettes extends Palettes {
|
|
|
36
36
|
*/
|
|
37
37
|
protected render(): TemplateResult;
|
|
38
38
|
}
|
|
39
|
+
declare global {
|
|
40
|
+
interface HTMLElementTagNameMap {
|
|
41
|
+
'ef-color-palettes': ColorPalettes;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
39
44
|
|
|
40
45
|
declare global {
|
|
41
46
|
interface HTMLElementTagNameMap {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, svg } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { VERSION } from '../../version.js';
|
|
5
5
|
import { Palettes } from './palettes.js';
|
|
6
6
|
import { COLOR_ITEMS } from '../helpers/color-helpers.js';
|
|
@@ -51,6 +51,11 @@ export declare class GrayscalePalettes extends Palettes {
|
|
|
51
51
|
*/
|
|
52
52
|
protected render(): TemplateResult;
|
|
53
53
|
}
|
|
54
|
+
declare global {
|
|
55
|
+
interface HTMLElementTagNameMap {
|
|
56
|
+
'ef-grayscale-palettes': GrayscalePalettes;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
54
59
|
|
|
55
60
|
declare global {
|
|
56
61
|
interface HTMLElementTagNameMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, css, svg } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } 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
5
|
import { VERSION } from '../../version.js';
|
|
6
6
|
import { Palettes } from './palettes.js';
|
|
7
7
|
import { GRAYSCALE_ITEMS, NOCOLOR_POINTS } from '../helpers/color-helpers.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { BasicElement, svg } from '@refinitiv-ui/core';
|
|
3
|
-
import { property } from '@refinitiv-ui/core/
|
|
4
|
-
import { query } from '@refinitiv-ui/core/
|
|
3
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
4
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
5
5
|
import { VERSION } from '../../version.js';
|
|
6
|
-
import { rgb } from '@refinitiv-ui/utils/
|
|
6
|
+
import { rgb } from '@refinitiv-ui/utils/color.js';
|
|
7
7
|
import { isHex } from '../helpers/color-helpers.js';
|
|
8
8
|
/**
|
|
9
9
|
* Element base class usually used
|
|
@@ -89,14 +89,13 @@ export class Palettes extends BasicElement {
|
|
|
89
89
|
* @return {void}
|
|
90
90
|
*/
|
|
91
91
|
onTouchmove(event) {
|
|
92
|
-
var _a;
|
|
93
92
|
const touchOffsets = event.changedTouches[0];
|
|
94
93
|
// TODO: it is a bug of TypeScript@4.4 remove ts-ignore once it is fixed
|
|
95
94
|
// https://github.com/microsoft/TypeScript/issues/45047
|
|
96
95
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97
96
|
// @ts-ignore
|
|
98
97
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
99
|
-
const realTarget =
|
|
98
|
+
const realTarget = this.shadowRoot?.elementFromPoint(touchOffsets.clientX, touchOffsets.clientY);
|
|
100
99
|
this.updateValue(realTarget);
|
|
101
100
|
}
|
|
102
101
|
/**
|
|
@@ -7,7 +7,7 @@ import { Dialog } from '../dialog/index.js';
|
|
|
7
7
|
import './elements/color-palettes.js';
|
|
8
8
|
import './elements/grayscale-palettes.js';
|
|
9
9
|
import { Translate } from '@refinitiv-ui/translate';
|
|
10
|
-
import '@refinitiv-ui/phrasebook/
|
|
10
|
+
import '@refinitiv-ui/phrasebook/locale/en/color-dialog.js';
|
|
11
11
|
/**
|
|
12
12
|
* Displays a colour picker dialog,
|
|
13
13
|
* for selecting a predefined range of colours.
|
|
@@ -216,6 +216,11 @@ export declare class ColorDialog extends Dialog {
|
|
|
216
216
|
*/
|
|
217
217
|
protected get footerRegion(): TemplateResult;
|
|
218
218
|
}
|
|
219
|
+
declare global {
|
|
220
|
+
interface HTMLElementTagNameMap {
|
|
221
|
+
'ef-color-dialog': ColorDialog;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
219
224
|
|
|
220
225
|
declare global {
|
|
221
226
|
interface HTMLElementTagNameMap {
|