@refinitiv-ui/elements 5.0.0-beta.3 → 5.0.0-dev.204
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 +325 -73
- package/README.md +13 -2
- package/lib/accordion/custom-elements.json +0 -13
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +13 -10
- package/lib/accordion/index.js +15 -18
- package/lib/appstate-bar/custom-elements.json +1 -1
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +15 -6
- package/lib/appstate-bar/index.js +17 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +22 -1
- package/lib/autosuggest/helpers/types.js +0 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -3
- package/lib/autosuggest/index.d.ts +21 -9
- package/lib/autosuggest/index.js +45 -31
- package/lib/button/custom-elements.json +3 -3
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +27 -20
- package/lib/button/index.js +92 -74
- 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/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +60 -4
- package/lib/button-bar/index.js +164 -19
- package/lib/calendar/constants.d.ts +26 -0
- package/lib/calendar/constants.js +28 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +119 -21
- package/lib/calendar/index.js +512 -157
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +3 -107
- 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 +12 -13
- package/lib/calendar/types.js +1 -7
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +105 -3
- package/lib/canvas/custom-elements.json +9 -7
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +14 -6
- package/lib/canvas/index.js +17 -12
- package/lib/card/custom-elements.json +21 -9
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/helpers/types.js +0 -1
- package/lib/card/index.d.ts +67 -20
- package/lib/card/index.js +132 -35
- package/lib/card/themes/halo/dark/index.js +1 -1
- package/lib/card/themes/halo/light/index.js +1 -1
- package/lib/card/themes/solar/charcoal/index.js +1 -1
- package/lib/card/themes/solar/pearl/index.js +1 -1
- package/lib/chart/custom-elements.json +3 -3
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -0
- package/lib/chart/helpers/index.js +2 -0
- package/lib/chart/helpers/legend.d.ts +2 -2
- package/lib/chart/helpers/legend.js +2 -3
- package/lib/chart/helpers/merge.d.ts +15 -0
- package/lib/chart/helpers/merge.js +28 -0
- package/lib/chart/helpers/types.d.ts +40 -12
- package/lib/chart/helpers/types.js +0 -1
- package/lib/chart/index.d.ts +34 -26
- package/lib/chart/index.js +58 -55
- package/lib/chart/plugins/doughnut-center-label.js +4 -5
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +29 -14
- package/lib/checkbox/index.js +65 -34
- package/lib/checkbox/themes/halo/dark/index.js +1 -1
- package/lib/checkbox/themes/halo/light/index.js +1 -1
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +25 -6
- package/lib/clock/index.js +44 -18
- 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/clock/utils/TickManager.js +2 -3
- package/lib/clock/utils/timestamps.js +0 -1
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +15 -8
- package/lib/collapse/index.js +18 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +13 -6
- package/lib/color-dialog/elements/color-palettes.js +16 -13
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +13 -6
- package/lib/color-dialog/elements/grayscale-palettes.js +17 -13
- package/lib/color-dialog/elements/palettes.d.ts +15 -3
- package/lib/color-dialog/elements/palettes.js +65 -45
- package/lib/color-dialog/helpers/color-helpers.d.ts +7 -53
- package/lib/color-dialog/helpers/color-helpers.js +12 -110
- package/lib/color-dialog/helpers/value-model.d.ts +1 -1
- package/lib/color-dialog/helpers/value-model.js +18 -17
- package/lib/color-dialog/index.d.ts +27 -20
- package/lib/color-dialog/index.js +54 -45
- package/lib/combo-box/custom-elements.json +51 -17
- package/lib/combo-box/custom-elements.md +42 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/filter.js +0 -1
- package/lib/combo-box/helpers/keyboard-event.js +0 -1
- package/lib/combo-box/helpers/renderer.d.ts +8 -0
- package/lib/combo-box/helpers/renderer.js +24 -0
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/helpers/types.js +0 -1
- package/lib/combo-box/index.d.ts +63 -32
- package/lib/combo-box/index.js +102 -60
- package/lib/combo-box/themes/halo/dark/index.js +2 -3
- package/lib/combo-box/themes/halo/light/index.js +2 -3
- package/lib/combo-box/themes/solar/charcoal/index.js +2 -3
- package/lib/combo-box/themes/solar/pearl/index.js +2 -3
- package/lib/counter/custom-elements.json +39 -0
- package/lib/counter/custom-elements.md +11 -0
- package/lib/counter/index.d.ts +91 -0
- package/lib/counter/index.js +154 -0
- package/lib/counter/themes/halo/dark/index.js +3 -0
- package/lib/counter/themes/halo/light/index.js +3 -0
- package/lib/counter/themes/solar/charcoal/index.js +3 -0
- package/lib/counter/themes/solar/pearl/index.js +3 -0
- package/lib/counter/utils.d.ts +13 -0
- package/lib/counter/utils.js +52 -0
- package/lib/datetime-picker/custom-elements.json +53 -24
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +34 -16
- package/lib/datetime-picker/index.js +56 -38
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -2
- package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/types.js +0 -1
- package/lib/datetime-picker/utils.js +1 -2
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/draggable-element.js +25 -16
- package/lib/dialog/index.d.ts +25 -21
- package/lib/dialog/index.js +36 -32
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +47 -112
- package/lib/email-field/index.js +48 -241
- 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/events.d.ts +121 -0
- package/lib/events.js +1 -0
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +14 -5
- package/lib/flag/index.js +19 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -2
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +10 -3
- package/lib/header/index.js +12 -8
- package/lib/heatmap/custom-elements.json +13 -0
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -2
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/helpers/text.js +0 -1
- package/lib/heatmap/helpers/track.js +2 -3
- package/lib/heatmap/helpers/types.js +0 -1
- package/lib/heatmap/index.d.ts +32 -13
- package/lib/heatmap/index.js +61 -35
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +17 -7
- package/lib/icon/index.js +36 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -18
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +5 -11
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/merge.d.ts +15 -0
- package/lib/interactive-chart/helpers/merge.js +28 -0
- package/lib/interactive-chart/helpers/types.d.ts +10 -9
- package/lib/interactive-chart/helpers/types.js +6 -2
- package/lib/interactive-chart/index.d.ts +37 -18
- package/lib/interactive-chart/index.js +61 -51
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/helpers/types.js +0 -1
- package/lib/item/index.d.ts +26 -9
- package/lib/item/index.js +43 -16
- package/lib/label/custom-elements.json +7 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +41 -73
- package/lib/label/index.js +150 -187
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +11 -4
- package/lib/layout/index.js +13 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +13 -5
- package/lib/led-gauge/index.js +16 -11
- package/lib/list/custom-elements.json +37 -5
- package/lib/list/custom-elements.md +33 -0
- package/lib/list/extensible-function.js +2 -1
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -3
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/helpers/types.js +0 -1
- package/lib/list/index.d.ts +47 -12
- package/lib/list/index.js +100 -39
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -2
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.d.ts +8 -1
- package/lib/loader/index.js +11 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/helpers/types.js +0 -1
- package/lib/multi-input/index.d.ts +19 -8
- package/lib/multi-input/index.js +28 -18
- package/lib/multi-input/themes/solar/charcoal/index.js +1 -1
- package/lib/multi-input/themes/solar/pearl/index.js +1 -1
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +10 -4
- package/lib/notification/elements/notification-tray.js +15 -11
- package/lib/notification/elements/notification.d.ts +19 -7
- package/lib/notification/elements/notification.js +25 -13
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -2
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/helpers/types.js +0 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -3
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +104 -52
- package/lib/number-field/index.js +129 -88
- 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/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +12 -5
- package/lib/overlay/elements/overlay-backdrop.js +13 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +11 -4
- package/lib/overlay/elements/overlay-viewport.js +12 -9
- package/lib/overlay/elements/overlay.d.ts +18 -6
- package/lib/overlay/elements/overlay.js +35 -28
- package/lib/overlay/helpers/functions.js +0 -1
- package/lib/overlay/helpers/types.js +0 -1
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +1 -2
- package/lib/overlay/managers/backdrop-manager.d.ts +2 -2
- package/lib/overlay/managers/backdrop-manager.js +2 -3
- package/lib/overlay/managers/close-manager.d.ts +1 -1
- package/lib/overlay/managers/close-manager.js +1 -2
- package/lib/overlay/managers/focus-manager.d.ts +1 -1
- package/lib/overlay/managers/focus-manager.js +3 -5
- package/lib/overlay/managers/interaction-lock-manager.js +2 -3
- package/lib/overlay/managers/viewport-manager.d.ts +3 -3
- package/lib/overlay/managers/viewport-manager.js +6 -3
- package/lib/overlay/managers/zindex-manager.d.ts +1 -1
- package/lib/overlay/managers/zindex-manager.js +1 -4
- package/lib/overlay-menu/custom-elements.json +126 -12
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/helpers/types.js +0 -1
- package/lib/overlay-menu/index.d.ts +44 -12
- package/lib/overlay-menu/index.js +66 -35
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +8 -8
- package/lib/pagination/custom-elements.json +16 -33
- package/lib/pagination/custom-elements.md +26 -0
- package/lib/pagination/index.d.ts +156 -81
- package/lib/pagination/index.js +373 -214
- package/lib/pagination/themes/halo/dark/index.js +1 -1
- package/lib/pagination/themes/halo/light/index.js +1 -1
- package/lib/pagination/themes/solar/charcoal/index.js +1 -1
- package/lib/pagination/themes/solar/pearl/index.js +1 -1
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +11 -4
- package/lib/panel/index.js +13 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +46 -90
- package/lib/password-field/index.js +52 -190
- 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/custom-elements.json +9 -7
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +15 -7
- package/lib/pill/index.js +21 -27
- package/lib/pill/themes/halo/dark/index.js +1 -1
- package/lib/pill/themes/halo/light/index.js +1 -1
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +11 -15
- package/lib/progress-bar/index.js +14 -25
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +33 -9
- package/lib/radio-button/index.js +97 -24
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -5
- package/lib/radio-button/themes/halo/dark/index.js +1 -1
- package/lib/radio-button/themes/halo/light/index.js +1 -1
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +11 -4
- package/lib/rating/index.js +16 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +47 -97
- package/lib/search-field/index.js +50 -212
- 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/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/helpers/types.js +0 -1
- package/lib/select/index.d.ts +26 -11
- package/lib/select/index.js +93 -52
- package/lib/select/themes/halo/dark/index.js +1 -1
- package/lib/select/themes/halo/light/index.js +1 -1
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +15 -7
- package/lib/sidebar-layout/index.js +16 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +18 -5
- package/lib/slider/index.js +69 -16
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +14 -5
- package/lib/sparkline/index.js +17 -10
- package/lib/swing-gauge/const.d.ts +22 -0
- package/lib/swing-gauge/const.js +26 -0
- package/lib/swing-gauge/custom-elements.json +51 -22
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +8 -0
- package/lib/swing-gauge/helpers.js +105 -0
- package/lib/swing-gauge/index.d.ts +220 -72
- package/lib/swing-gauge/index.js +648 -168
- 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/swing-gauge/types.d.ts +34 -0
- package/lib/swing-gauge/types.js +1 -0
- package/lib/tab/custom-elements.json +10 -21
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +19 -14
- package/lib/tab/index.js +31 -40
- 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/custom-elements.json +0 -6
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/helpers/animate.d.ts +1 -1
- package/lib/tab-bar/helpers/animate.js +5 -2
- package/lib/tab-bar/index.d.ts +12 -5
- package/lib/tab-bar/index.js +18 -21
- package/lib/tab-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +1 -1
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +67 -80
- package/lib/text-field/index.js +106 -157
- 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/custom-elements.json +6 -8
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +105 -65
- package/lib/time-picker/index.js +297 -169
- package/lib/time-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/time-picker/themes/solar/pearl/index.js +1 -1
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +22 -5
- package/lib/toggle/index.js +58 -13
- 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/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -3
- package/lib/tooltip/elements/tooltip-element.d.ts +2 -3
- package/lib/tooltip/elements/tooltip-element.js +0 -2
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -2
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/renderer.js +0 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/helpers/types.js +0 -1
- package/lib/tooltip/index.d.ts +18 -11
- package/lib/tooltip/index.js +27 -23
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +17 -11
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +12 -5
- package/lib/tornado-chart/elements/tornado-chart.js +15 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +13 -6
- package/lib/tornado-chart/elements/tornado-item.js +17 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -3
- package/lib/tree/custom-elements.json +30 -2
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +53 -5
- package/lib/tree/elements/tree-item.js +114 -34
- package/lib/tree/elements/tree.d.ts +65 -20
- package/lib/tree/elements/tree.js +151 -34
- package/lib/tree/helpers/filter.d.ts +8 -0
- package/lib/tree/helpers/filter.js +33 -0
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +4 -4
- package/lib/tree/helpers/types.d.ts +13 -1
- package/lib/tree/helpers/types.js +0 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -4
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -41
- package/lib/tree/themes/halo/dark/index.js +1 -1
- package/lib/tree/themes/halo/light/index.js +1 -1
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/custom-elements.json +14 -5
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/helpers/types.js +0 -1
- package/lib/tree-select/index.d.ts +55 -27
- package/lib/tree-select/index.js +107 -45
- package/lib/tree-select/themes/halo/dark/index.js +3 -2
- package/lib/tree-select/themes/halo/light/index.js +3 -2
- package/lib/tree-select/themes/solar/charcoal/index.js +3 -2
- package/lib/tree-select/themes/solar/pearl/index.js +3 -2
- package/lib/version.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +601 -25
- package/lib/accordion/index.js.map +0 -1
- package/lib/appstate-bar/index.js.map +0 -1
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -4
- package/lib/autosuggest/helpers/const.js.map +0 -1
- package/lib/autosuggest/helpers/types.js.map +0 -1
- package/lib/autosuggest/helpers/utils.js.map +0 -1
- package/lib/autosuggest/index.js.map +0 -1
- package/lib/button/index.js.map +0 -1
- package/lib/button-bar/index.js.map +0 -1
- package/lib/calendar/index.js.map +0 -1
- package/lib/calendar/locales.js.map +0 -1
- package/lib/calendar/types.js.map +0 -1
- package/lib/calendar/utils.js.map +0 -1
- package/lib/canvas/index.js.map +0 -1
- package/lib/card/helpers/types.js.map +0 -1
- package/lib/card/index.js.map +0 -1
- package/lib/chart/helpers/legend.js.map +0 -1
- package/lib/chart/helpers/types.js.map +0 -1
- package/lib/chart/index.js.map +0 -1
- package/lib/chart/plugins/doughnut-center-label.js.map +0 -1
- package/lib/checkbox/index.js.map +0 -1
- package/lib/clock/index.js.map +0 -1
- package/lib/clock/utils/TickManager.js.map +0 -1
- package/lib/clock/utils/timestamps.js.map +0 -1
- package/lib/collapse/index.js.map +0 -1
- package/lib/color-dialog/elements/color-palettes.js.map +0 -1
- package/lib/color-dialog/elements/grayscale-palettes.js.map +0 -1
- package/lib/color-dialog/elements/palettes.js.map +0 -1
- package/lib/color-dialog/helpers/color-helpers.js.map +0 -1
- package/lib/color-dialog/helpers/value-model.js.map +0 -1
- package/lib/color-dialog/index.js.map +0 -1
- package/lib/combo-box/helpers/filter.js.map +0 -1
- package/lib/combo-box/helpers/keyboard-event.js.map +0 -1
- package/lib/combo-box/helpers/types.js.map +0 -1
- package/lib/combo-box/index.js.map +0 -1
- package/lib/datetime-picker/index.js.map +0 -1
- package/lib/datetime-picker/locales.js.map +0 -1
- package/lib/datetime-picker/types.js.map +0 -1
- package/lib/datetime-picker/utils.js.map +0 -1
- package/lib/dialog/draggable-element.js.map +0 -1
- package/lib/dialog/index.js.map +0 -1
- package/lib/email-field/index.js.map +0 -1
- package/lib/flag/index.js.map +0 -1
- package/lib/flag/utils/FlagLoader.js.map +0 -1
- package/lib/header/index.js.map +0 -1
- package/lib/heatmap/helpers/color.js.map +0 -1
- package/lib/heatmap/helpers/text.js.map +0 -1
- package/lib/heatmap/helpers/track.js.map +0 -1
- package/lib/heatmap/helpers/types.js.map +0 -1
- package/lib/heatmap/index.js.map +0 -1
- package/lib/icon/index.js.map +0 -1
- package/lib/icon/utils/IconLoader.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/interactive-chart/helpers/types.js.map +0 -1
- package/lib/interactive-chart/index.js.map +0 -1
- package/lib/item/helpers/types.js.map +0 -1
- package/lib/item/index.js.map +0 -1
- package/lib/label/helpers/text.d.ts +0 -35
- package/lib/label/helpers/text.js +0 -57
- package/lib/label/helpers/text.js.map +0 -1
- package/lib/label/index.js.map +0 -1
- package/lib/layout/index.js.map +0 -1
- package/lib/led-gauge/index.js.map +0 -1
- package/lib/list/extensible-function.js.map +0 -1
- package/lib/list/helpers/list-renderer.js.map +0 -1
- package/lib/list/helpers/types.js.map +0 -1
- package/lib/list/index.js.map +0 -1
- package/lib/list/renderer.js.map +0 -1
- package/lib/loader/index.js.map +0 -1
- package/lib/multi-input/helpers/types.js.map +0 -1
- package/lib/multi-input/index.js.map +0 -1
- package/lib/notification/elements/notification-tray.js.map +0 -1
- package/lib/notification/elements/notification.js.map +0 -1
- package/lib/notification/helpers/status.js.map +0 -1
- package/lib/notification/helpers/types.js.map +0 -1
- package/lib/notification/index.js.map +0 -1
- package/lib/number-field/index.js.map +0 -1
- package/lib/overlay/elements/overlay-backdrop.js.map +0 -1
- package/lib/overlay/elements/overlay-viewport.js.map +0 -1
- package/lib/overlay/elements/overlay.js.map +0 -1
- package/lib/overlay/helpers/functions.js.map +0 -1
- package/lib/overlay/helpers/types.js.map +0 -1
- package/lib/overlay/index.js.map +0 -1
- package/lib/overlay/managers/backdrop-manager.js.map +0 -1
- package/lib/overlay/managers/close-manager.js.map +0 -1
- package/lib/overlay/managers/focus-manager.js.map +0 -1
- package/lib/overlay/managers/interaction-lock-manager.js.map +0 -1
- package/lib/overlay/managers/viewport-manager.js.map +0 -1
- package/lib/overlay/managers/zindex-manager.js.map +0 -1
- package/lib/overlay-menu/helpers/types.js.map +0 -1
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -14
- package/lib/overlay-menu/helpers/uuid.js.map +0 -1
- package/lib/overlay-menu/index.js.map +0 -1
- package/lib/overlay-menu/managers/menu-manager.js.map +0 -1
- package/lib/pagination/helpers/types.d.ts +0 -9
- package/lib/pagination/helpers/types.js +0 -2
- package/lib/pagination/helpers/types.js.map +0 -1
- package/lib/pagination/index.js.map +0 -1
- package/lib/panel/index.js.map +0 -1
- package/lib/password-field/index.js.map +0 -1
- package/lib/pill/index.js.map +0 -1
- package/lib/progress-bar/index.js.map +0 -1
- package/lib/radio-button/index.js.map +0 -1
- package/lib/radio-button/radio-button-registry.js.map +0 -1
- package/lib/rating/index.js.map +0 -1
- package/lib/search-field/index.js.map +0 -1
- package/lib/select/helpers/types.js.map +0 -1
- package/lib/select/index.js.map +0 -1
- package/lib/sidebar-layout/index.js.map +0 -1
- package/lib/slider/index.js.map +0 -1
- package/lib/sparkline/index.js.map +0 -1
- package/lib/swing-gauge/helpers/canvas.d.ts +0 -8
- package/lib/swing-gauge/helpers/canvas.js +0 -115
- package/lib/swing-gauge/helpers/canvas.js.map +0 -1
- package/lib/swing-gauge/helpers/types.d.ts +0 -33
- package/lib/swing-gauge/helpers/types.js +0 -2
- package/lib/swing-gauge/helpers/types.js.map +0 -1
- package/lib/swing-gauge/index.js.map +0 -1
- package/lib/tab/index.js.map +0 -1
- package/lib/tab-bar/helpers/animate.js.map +0 -1
- package/lib/tab-bar/index.js.map +0 -1
- package/lib/text-field/index.js.map +0 -1
- package/lib/time-picker/index.js.map +0 -1
- package/lib/toggle/index.js.map +0 -1
- package/lib/tooltip/elements/title-tooltip.js.map +0 -1
- package/lib/tooltip/elements/tooltip-element.js.map +0 -1
- package/lib/tooltip/helpers/overflow-tooltip.js.map +0 -1
- package/lib/tooltip/helpers/renderer.js.map +0 -1
- package/lib/tooltip/helpers/types.js.map +0 -1
- package/lib/tooltip/index.js.map +0 -1
- package/lib/tooltip/managers/tooltip-manager.js.map +0 -1
- package/lib/tornado-chart/elements/tornado-chart.js.map +0 -1
- package/lib/tornado-chart/elements/tornado-item.js.map +0 -1
- package/lib/tornado-chart/index.js.map +0 -1
- package/lib/tree/elements/tree-item.js.map +0 -1
- package/lib/tree/elements/tree.js.map +0 -1
- package/lib/tree/helpers/renderer.js.map +0 -1
- package/lib/tree/helpers/types.js.map +0 -1
- package/lib/tree/index.js.map +0 -1
- package/lib/tree/managers/tree-manager.js.map +0 -1
- package/lib/tree-select/helpers/types.js.map +0 -1
- package/lib/tree-select/index.js.map +0 -1
package/lib/button/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ControlElement,
|
|
3
|
-
import '../icon';
|
|
2
|
+
import { ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import '../icon/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Use button for actions in forms, dialogs,
|
|
6
6
|
* and more with support for different states and styles.
|
|
7
7
|
* @attr {boolean} disabled - Set state to disabled
|
|
8
8
|
* @prop {boolean} [disabled=false] - Set state to disabled
|
|
9
|
+
* @fires active-changed - Dispatched on changing `active` property state by taping on button when property `toggles` is true.
|
|
9
10
|
*/
|
|
10
11
|
export declare class Button extends ControlElement {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* and the internal template of the element.
|
|
15
|
-
* @return {CSSResult | CSSResult[]} CSS template
|
|
13
|
+
* Element version number
|
|
14
|
+
* @returns version number
|
|
16
15
|
*/
|
|
17
|
-
static get
|
|
16
|
+
static get version(): string;
|
|
17
|
+
protected readonly defaultRole = "button";
|
|
18
18
|
/**
|
|
19
19
|
* Customises text alignment when specified alongside `icon` property
|
|
20
20
|
* Value can be `before` or `after`
|
|
@@ -52,6 +52,23 @@ export declare class Button extends ControlElement {
|
|
|
52
52
|
* Get native label element from shadow roots
|
|
53
53
|
*/
|
|
54
54
|
private labelElement;
|
|
55
|
+
/**
|
|
56
|
+
* Aria indicating state of toggle button
|
|
57
|
+
* @ignore
|
|
58
|
+
*/
|
|
59
|
+
ariaPressed: string;
|
|
60
|
+
/**
|
|
61
|
+
* Aria indicating state of toggle button.
|
|
62
|
+
* Used when role is radio.
|
|
63
|
+
* @ignore
|
|
64
|
+
*/
|
|
65
|
+
ariaChecked: string;
|
|
66
|
+
/**
|
|
67
|
+
* Updates the element
|
|
68
|
+
* @param changedProperties Properties that has changed
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
protected update(changedProperties: PropertyValues): void;
|
|
55
72
|
/**
|
|
56
73
|
* the lifecycle method called when properties changed first time
|
|
57
74
|
* @param changedProperties properties it's the Map object which has the updated properties
|
|
@@ -63,18 +80,6 @@ export declare class Button extends ControlElement {
|
|
|
63
80
|
* @returns {void}
|
|
64
81
|
*/
|
|
65
82
|
private onDefaultSlotChangeHandler;
|
|
66
|
-
/**
|
|
67
|
-
* Handle keydown event
|
|
68
|
-
* @param event the keyboard event
|
|
69
|
-
* @returns {void}
|
|
70
|
-
*/
|
|
71
|
-
private onKeyUpHandler;
|
|
72
|
-
/**
|
|
73
|
-
* Check key names
|
|
74
|
-
* @param key the keyboard key
|
|
75
|
-
* @returns true if space or enter pressed
|
|
76
|
-
*/
|
|
77
|
-
private isReturnOrSpaceKey;
|
|
78
83
|
/**
|
|
79
84
|
* Handle active property, when toggles is true
|
|
80
85
|
* @returns {void}
|
|
@@ -128,4 +133,6 @@ declare global {
|
|
|
128
133
|
'ef-button': Partial<Button> | JSXInterface.ControlHTMLAttributes<Button>;
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
|
-
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export {};
|
package/lib/button/index.js
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ControlElement, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
5
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import { registerOverflowTooltip } from '../tooltip/index.js';
|
|
8
|
+
import '../icon/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Return the attribute that converted from the property
|
|
11
|
+
* Prevent empty string that reflected to attribute
|
|
12
|
+
* @private
|
|
13
|
+
* @param value value from the property
|
|
14
|
+
* @returns string converted to attribute
|
|
15
|
+
*/
|
|
16
|
+
const emptyStringToNull = function (value) {
|
|
17
|
+
return value || null;
|
|
6
18
|
};
|
|
7
|
-
import { ControlElement, css, customElement, html, property, query } from '@refinitiv-ui/core';
|
|
8
|
-
import '../icon';
|
|
9
|
-
import { registerOverflowTooltip } from '../tooltip';
|
|
10
19
|
/**
|
|
11
20
|
* Use button for actions in forms, dialogs,
|
|
12
21
|
* and more with support for different states and styles.
|
|
13
22
|
* @attr {boolean} disabled - Set state to disabled
|
|
14
23
|
* @prop {boolean} [disabled=false] - Set state to disabled
|
|
24
|
+
* @fires active-changed - Dispatched on changing `active` property state by taping on button when property `toggles` is true.
|
|
15
25
|
*/
|
|
16
26
|
let Button = class Button extends ControlElement {
|
|
17
27
|
constructor() {
|
|
18
28
|
super(...arguments);
|
|
29
|
+
this.defaultRole = 'button';
|
|
19
30
|
/**
|
|
20
31
|
* Customises text alignment when specified alongside `icon` property
|
|
21
32
|
* Value can be `before` or `after`
|
|
@@ -50,66 +61,39 @@ let Button = class Button extends ControlElement {
|
|
|
50
61
|
*/
|
|
51
62
|
this.empty = false;
|
|
52
63
|
/**
|
|
53
|
-
*
|
|
54
|
-
* @
|
|
55
|
-
*/
|
|
56
|
-
this.onDefaultSlotChangeHandler = () => {
|
|
57
|
-
this.emptyComputed();
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Handle keydown event
|
|
61
|
-
* @param event the keyboard event
|
|
62
|
-
* @returns {void}
|
|
63
|
-
*/
|
|
64
|
-
this.onKeyUpHandler = (event) => {
|
|
65
|
-
if (this.isReturnOrSpaceKey(event.key)) {
|
|
66
|
-
this.click();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Handle active property, when toggles is true
|
|
71
|
-
* @returns {void}
|
|
72
|
-
*/
|
|
73
|
-
this.toggleActive = () => {
|
|
74
|
-
if (this.toggles) {
|
|
75
|
-
this.active = !this.active;
|
|
76
|
-
/**
|
|
77
|
-
* Fired on changing `active` property state by taping on button when property `toggles` is true.
|
|
78
|
-
* Provides new state of `active` property in detail.value field
|
|
79
|
-
*/
|
|
80
|
-
this.dispatchEvent(new CustomEvent('active-changed', {
|
|
81
|
-
detail: { value: this.active }
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Set pressed attribute
|
|
87
|
-
* @returns {void}
|
|
64
|
+
* Aria indicating state of toggle button
|
|
65
|
+
* @ignore
|
|
88
66
|
*/
|
|
89
|
-
this.
|
|
90
|
-
this.setAttribute('pressed', '');
|
|
91
|
-
};
|
|
67
|
+
this.ariaPressed = '';
|
|
92
68
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
69
|
+
* Aria indicating state of toggle button.
|
|
70
|
+
* Used when role is radio.
|
|
71
|
+
* @ignore
|
|
95
72
|
*/
|
|
96
|
-
this.
|
|
97
|
-
this.removeAttribute('pressed');
|
|
98
|
-
};
|
|
73
|
+
this.ariaChecked = '';
|
|
99
74
|
}
|
|
100
75
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* and the internal template of the element.
|
|
104
|
-
* @return {CSSResult | CSSResult[]} CSS template
|
|
76
|
+
* Element version number
|
|
77
|
+
* @returns version number
|
|
105
78
|
*/
|
|
106
|
-
static get
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
79
|
+
static get version() {
|
|
80
|
+
return VERSION;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Updates the element
|
|
84
|
+
* @param changedProperties Properties that has changed
|
|
85
|
+
* @returns {void}
|
|
86
|
+
*/
|
|
87
|
+
update(changedProperties) {
|
|
88
|
+
if (changedProperties.has('active') && this.toggles || changedProperties.has('toggles') && this.toggles) {
|
|
89
|
+
if (this.getAttribute('role') === 'radio') {
|
|
90
|
+
this.ariaChecked = String(this.active);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.ariaPressed = String(this.active);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
super.update(changedProperties);
|
|
113
97
|
}
|
|
114
98
|
/**
|
|
115
99
|
* the lifecycle method called when properties changed first time
|
|
@@ -121,20 +105,42 @@ let Button = class Button extends ControlElement {
|
|
|
121
105
|
this.addEventListener('tap', this.toggleActive);
|
|
122
106
|
this.addEventListener('tapstart', this.setPressed);
|
|
123
107
|
this.addEventListener('tapend', this.unsetPressed);
|
|
124
|
-
this.addEventListener('keyup', this.onKeyUpHandler);
|
|
125
108
|
this.emptyComputed();
|
|
126
109
|
registerOverflowTooltip(this.labelElement, () => this.textContent);
|
|
127
110
|
}
|
|
128
111
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @
|
|
131
|
-
* @returns true if space or enter pressed
|
|
112
|
+
* Handle the slotchange event of default slot
|
|
113
|
+
* @returns {void}
|
|
132
114
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
115
|
+
onDefaultSlotChangeHandler() {
|
|
116
|
+
this.emptyComputed();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Handle active property, when toggles is true
|
|
120
|
+
* @returns {void}
|
|
121
|
+
*/
|
|
122
|
+
toggleActive() {
|
|
123
|
+
if (this.toggles) {
|
|
124
|
+
this.active = !this.active;
|
|
125
|
+
/**
|
|
126
|
+
* Fired on changing `active` property state by taping on button when property `toggles` is true.
|
|
127
|
+
*/
|
|
128
|
+
this.notifyPropertyChange('active', this.active);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Set pressed attribute
|
|
133
|
+
* @returns {void}
|
|
134
|
+
*/
|
|
135
|
+
setPressed() {
|
|
136
|
+
this.setAttribute('pressed', '');
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Remove pressed attribute
|
|
140
|
+
* @returns {void}
|
|
141
|
+
*/
|
|
142
|
+
unsetPressed() {
|
|
143
|
+
this.removeAttribute('pressed');
|
|
138
144
|
}
|
|
139
145
|
/**
|
|
140
146
|
* Compute empty property based on textContent
|
|
@@ -182,8 +188,7 @@ let Button = class Button extends ControlElement {
|
|
|
182
188
|
*/
|
|
183
189
|
render() {
|
|
184
190
|
return html `
|
|
185
|
-
${this.iconTemplate}
|
|
186
|
-
${this.hoverIconTemplate}
|
|
191
|
+
${this.hoverIcon ? html `${this.iconTemplate} ${this.hoverIconTemplate}` : this.iconTemplate}
|
|
187
192
|
<span part="label">
|
|
188
193
|
<slot @slotchange="${this.onDefaultSlotChangeHandler}"></slot>
|
|
189
194
|
</span>
|
|
@@ -214,10 +219,23 @@ __decorate([
|
|
|
214
219
|
__decorate([
|
|
215
220
|
query('[part="label"]')
|
|
216
221
|
], Button.prototype, "labelElement", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
property({ type: String,
|
|
224
|
+
reflect: true,
|
|
225
|
+
attribute: 'aria-pressed',
|
|
226
|
+
converter: { toAttribute: emptyStringToNull } // TODO: Remove after typescript update to allow nullable for ARIAMixin
|
|
227
|
+
})
|
|
228
|
+
], Button.prototype, "ariaPressed", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: String,
|
|
231
|
+
reflect: true,
|
|
232
|
+
attribute: 'aria-checked',
|
|
233
|
+
converter: { toAttribute: emptyStringToNull } // TODO: Remove after typescript update to allow nullable for ARIAMixin
|
|
234
|
+
})
|
|
235
|
+
], Button.prototype, "ariaChecked", void 0);
|
|
217
236
|
Button = __decorate([
|
|
218
237
|
customElement('ef-button', {
|
|
219
238
|
alias: 'coral-button'
|
|
220
239
|
})
|
|
221
240
|
], Button);
|
|
222
241
|
export { Button };
|
|
223
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/halo/dark';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#333;color:#ccc;border:1px solid #0d0d0d;height:24px;box-shadow:0 0 0 0 rgba(0,0,0,.5);padding:0 12px;outline:0;font-family:inherit;font-size:12rem;font-weight:400;min-width:60px;margin:1px 0;transition:120ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;touch-action:manipulation}:host [part=icon]{flex:none;opacity:inherit;min-width:16px}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([cta]){background-color:#0d0d0d;color:#ccc;border-color:grey;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([toggles]){background-color:#333;color:#ccc;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([toggles][active]){background-color:#334bff;color:#fff;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([empty][icon]){min-width:24px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#ccc}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover) #icon{display:none}:host(:
|
|
3
|
+
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#333;color:#ccc;border:1px solid #0d0d0d;height:24px;box-shadow:0 0 0 0 rgba(0,0,0,.5);padding:0 12px;outline:0;font-family:inherit;font-size:12rem;font-weight:400;min-width:60px;margin:1px 0;transition:120ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;touch-action:manipulation}:host [part=icon]{flex:none;opacity:inherit;min-width:16px}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([hover-icon]) #hover-icon{display:none}:host([cta]){background-color:#0d0d0d;color:#ccc;border-color:grey;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([toggles]){background-color:#333;color:#ccc;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([toggles][active]){background-color:#334bff;color:#fff;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);outline:0}:host([empty][icon]){min-width:24px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#ccc}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}@media (-ms-high-contrast:none),(pointer:fine){:host([hover-icon]:hover) #icon{display:none}:host([hover-icon]:hover) #hover-icon{display:block}:host(:focus:not([focused])),:host([focused=visible]){background-color:#333;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host(:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host(:hover:not(:focus)){border-color:#334bff;outline:0}:host([cta]:focus:not([focused])),:host([cta][focused=visible]){background-color:#0d0d0d;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host([cta]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host([cta]:hover:not(:focus)){border-color:#334bff;outline:0}:host([toggles]:focus:not([focused])),:host([toggles][focused=visible]){background-color:#333;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host([toggles]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host([toggles]:hover:not(:focus)){border-color:#334bff;outline:0}:host([toggles][active]:focus:not([focused])),:host([toggles][active][focused=visible]){background-color:#334bff;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host([toggles][active]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host([toggles][active]:hover:not(:focus)){border-color:#334bff;outline:0}:host(:not([cta])[empty][icon][transparent]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][focused=visible]){background-color:transparent;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host(:not([cta])[empty][icon][transparent]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){border-color:#334bff;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]){background-color:transparent;color:#fff;box-shadow:none;border-color:#0d0d0d;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.8)}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover:not(:focus)){border-color:#334bff;outline:0}}@media all{:host(:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host(:active:not(:focus)){border-color:#0d0d0d;outline:0}:host([disabled]){background-color:#333;color:#ccc;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}:host([cta]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host([cta]:active:not(:focus)){border-color:#0d0d0d;outline:0}:host([cta][disabled]){background-color:#0d0d0d;color:#ccc;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}:host([toggles]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host([toggles]:active:not(:focus)){border-color:#0d0d0d;outline:0}:host([toggles][disabled]){background-color:#333;color:#ccc;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}:host([toggles][active]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host([toggles][active]:active:not(:focus)){border-color:#0d0d0d;outline:0}:host([toggles][active][disabled]){background-color:#334bff;color:#fff;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){border-color:#0d0d0d;outline:0}:host(:not([cta])[empty][icon][transparent][disabled]){background-color:transparent;color:#333;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent][toggles][active]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5)}:host(:not([cta])[empty][icon][transparent][toggles][active]:active:not(:focus)){border-color:#0d0d0d;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active][disabled]){background-color:transparent;color:#334bff;border-color:#0d0d0d;box-shadow:none;outline:0;pointer-events:none}}:host(:not([empty])[icon][textpos=before]) [part=icon]{order:1}:host(:not([empty])[icon][textpos=after]) [part=label]{padding-left:.3em}:host(:not([empty])[icon][textpos=before]) [part=label]{padding-right:.3em}:host [part=label]{line-height:22px}:host([toggles]:hover:not(:focus)){border-color:#0d0d0d}:host([toggles][active]:focus){color:#fff}:host([toggles]:focus:not([focused])),:host([toggles][active][focused=visible]){color:#ccc}:host([cta]:hover){border-color:#334bff}:host([cta]:active){border-color:#0d0d0d}:host([icon]:not([toggles])[cta][transparent]) [part=icon]{color:#ccc}:host([icon]:hover[transparent]) [empty]{color:#fff}:host([icon]:hover[transparent][cta]) [part=icon]{color:#fff}:host([icon]:hover[transparent][cta][toggles]) [part=icon]{color:#fff}@media (pointer:coarse){:host(:hover[transparent][cta]:not([toggles]):not(:active)){background-color:#0d0d0d;border-color:transparent}:host(:hover[transparent][cta][toggles]){border-color:#0d0d0d}:host(:hover[transparent][cta][toggles]:not([active]):not(:active)) [part=icon]{color:#ccc}}:host([toggles][active][transparent]){color:#fff}:host([toggles][active][transparent]:not(:focus)){color:#6678ff}:host([toggles][active][transparent]:hover){color:#fff}:host([toggles][active][transparent][cta]){color:#fff}:host(:not(:hover):not(:focus):not(:active):not([cta])[transparent]){background-color:transparent;border-color:transparent}:host(:not([cta])[empty][icon][transparent][toggles][active]){color:#6678ff}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]),:host(:not([cta])[empty][icon][transparent][toggles][active][focused]){color:#334bff}:host(:not([cta])[empty][icon][transparent]:not([active]):hover){color:#fff}:host(:not([cta])[empty][icon][transparent][disabled]){color:#ccc}:host([disabled]){opacity:.5}:host([disabled][transparent][empty]){color:#ccc}:host([disabled][cta]:not([empty])){color:#ccc;background-color:#0d0d0d;border-color:grey}:host([disabled][cta]:not([empty])) [part=icon]{color:inherit}:host([disabled][cta][icon][empty]:not([toggles])){border-color:grey}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){background-color:transparent!important}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){background-color:transparent!important;border-color:transparent!important}:host(:focus:not([focused])),:host([cta][focused=visible]),:host([focused=visible]),:host([toggles][focused=visible]){border-color:#0d0d0d;background-color:#334bff;color:#fff}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/halo/light';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#fafafa;color:#0d0d0d;border:1px solid #ccc;height:24px;box-shadow:0 0 0 0 rgba(0,0,0,.25);padding:0 12px;outline:0;font-family:inherit;font-size:12rem;font-weight:400;min-width:60px;margin:1px 0;transition:120ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;touch-action:manipulation}:host [part=icon]{flex:none;opacity:inherit;min-width:16px}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([cta]){background-color:#0d0d0d;color:#ccc;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([toggles]){background-color:#fafafa;color:#0d0d0d;border-color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([toggles][active]){background-color:#334bff;color:#fff;border-color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([empty][icon]){min-width:24px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#595959}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}@media (-ms-high-contrast:none),(pointer:fine){:host(:hover) #icon{display:none}:host(:
|
|
3
|
+
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#fafafa;color:#0d0d0d;border:1px solid #ccc;height:24px;box-shadow:0 0 0 0 rgba(0,0,0,.25);padding:0 12px;outline:0;font-family:inherit;font-size:12rem;font-weight:400;min-width:60px;margin:1px 0;transition:120ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;touch-action:manipulation}:host [part=icon]{flex:none;opacity:inherit;min-width:16px}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([hover-icon]) #hover-icon{display:none}:host([cta]){background-color:#0d0d0d;color:#ccc;border-color:#0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([toggles]){background-color:#fafafa;color:#0d0d0d;border-color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([toggles][active]){background-color:#334bff;color:#fff;border-color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);outline:0}:host([empty][icon]){min-width:24px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#595959}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}@media (-ms-high-contrast:none),(pointer:fine){:host([hover-icon]:hover) #icon{display:none}:host([hover-icon]:hover) #hover-icon{display:block}:host(:focus:not([focused])),:host([focused=visible]){background-color:#fafafa;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host(:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host(:hover:not(:focus)){border-color:#334bff;outline:0}:host([cta]:focus:not([focused])),:host([cta][focused=visible]){background-color:#0d0d0d;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host([cta]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host([cta]:hover:not(:focus)){border-color:#334bff;outline:0}:host([toggles]:focus:not([focused])),:host([toggles][focused=visible]){background-color:#fafafa;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host([toggles]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host([toggles]:hover:not(:focus)){border-color:#334bff;outline:0}:host([toggles][active]:focus:not([focused])),:host([toggles][active][focused=visible]){background-color:#334bff;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host([toggles][active]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host([toggles][active]:hover:not(:focus)){border-color:#334bff;outline:0}:host(:not([cta])[empty][icon][transparent]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][focused=visible]){background-color:transparent;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host(:not([cta])[empty][icon][transparent]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){border-color:#334bff;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]){background-color:transparent;color:#000;box-shadow:none;border-color:#ccc;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover){background-color:#334bff;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.55)}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover:not(:focus)){border-color:#334bff;outline:0}}@media all{:host(:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host(:active:not(:focus)){border-color:#ccc;outline:0}:host([disabled]){background-color:#fafafa;color:#0d0d0d;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}:host([cta]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host([cta]:active:not(:focus)){border-color:#ccc;outline:0}:host([cta][disabled]){background-color:#0d0d0d;color:#ccc;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}:host([toggles]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host([toggles]:active:not(:focus)){border-color:#ccc;outline:0}:host([toggles][disabled]){background-color:#fafafa;color:#0d0d0d;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}:host([toggles][active]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host([toggles][active]:active:not(:focus)){border-color:#ccc;outline:0}:host([toggles][active][disabled]){background-color:#334bff;color:#fff;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){border-color:#ccc;outline:0}:host(:not([cta])[empty][icon][transparent][disabled]){background-color:transparent;color:#fafafa;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent][toggles][active]:active){background-color:#0f1e8a;color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25)}:host(:not([cta])[empty][icon][transparent][toggles][active]:active:not(:focus)){border-color:#ccc;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active][disabled]){background-color:transparent;color:#334bff;border-color:#ccc;box-shadow:none;outline:0;pointer-events:none}}:host(:not([empty])[icon][textpos=before]) [part=icon]{order:1}:host(:not([empty])[icon][textpos=after]) [part=label]{padding-left:.3em}:host(:not([empty])[icon][textpos=before]) [part=label]{padding-right:.3em}:host [part=label]{line-height:22px}:host([toggles]:hover:not(:focus)){border-color:#ccc}:host([toggles][active]:focus){color:#fff}:host([toggles]:focus:not([focused])),:host([toggles][active][focused=visible]){color:#0d0d0d}:host([cta]:hover){border-color:#334bff}:host([cta]:active){border-color:#ccc}:host([icon]:not([toggles])[cta][transparent]) [part=icon]{color:#ccc}:host([icon]:hover[transparent]) [empty]{color:#0d0d0d}:host([icon]:hover[transparent][cta]) [part=icon]{color:#fff}:host([icon]:hover[transparent][cta][toggles]) [part=icon]{color:#fff}@media (pointer:coarse){:host(:hover[transparent][cta]:not([toggles]):not(:active)){background-color:#0d0d0d;border-color:transparent}:host(:hover[transparent][cta][toggles]){border-color:#ccc}:host(:hover[transparent][cta][toggles]:not([active]):not(:active)) [part=icon]{color:#0d0d0d}}:host([toggles][active][transparent]){color:#fff}:host([toggles][active][transparent]:not(:focus)){color:#6678ff}:host([toggles][active][transparent]:hover){color:#fff}:host([toggles][active][transparent][cta]){color:#fff}:host(:not(:hover):not(:focus):not(:active):not([cta])[transparent]){background-color:transparent;border-color:transparent}:host(:not([cta])[empty][icon][transparent][toggles][active]){color:#6678ff}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]),:host(:not([cta])[empty][icon][transparent][toggles][active][focused]){color:#334bff}:host(:not([cta])[empty][icon][transparent]:not([active]):hover){color:#0d0d0d}:host(:not([cta])[empty][icon][transparent][disabled]){color:#595959}:host([disabled]){opacity:.5}:host([disabled][transparent][empty]){color:#595959}:host([disabled][cta]:not([empty])){color:#ccc;background-color:#0d0d0d;border-color:#0d0d0d}:host([disabled][cta]:not([empty])) [part=icon]{color:inherit}:host([disabled][cta][icon][empty]:not([toggles])){border-color:#0d0d0d}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){background-color:transparent!important}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){background-color:transparent!important;border-color:transparent!important}:host(:focus:not([focused])),:host([cta][focused=visible]),:host([focused=visible]),:host([toggles][focused=visible]){border-color:#ccc;background-color:#334bff;color:#fff}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/solar/charcoal';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:0 0 0 0 rgba(0,0,0,.6);font-family:inherit;min-width:23px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;touch-action:manipulation}:host [part=icon]{flex:none}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}
|
|
3
|
+
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:0 0 0 0 rgba(0,0,0,.6);font-family:inherit;min-width:23px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;touch-action:manipulation}:host [part=icon]{flex:none}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([hover-icon]) #hover-icon{display:none}:host([empty][icon]){min-width:23px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#c2c2c2}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}:host(:not([cta])[empty][icon][transparent][toggles][active]){color:rgba(0,0,0,.07)}:host(:not([empty])[icon][textpos=before]) [part=icon]{order:1}:host(:not([empty])[icon][textpos=after]) [part=label]{padding-left:.3em}:host(:not([empty])[icon][textpos=before]) [part=label]{padding-right:.3em}:host{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#3c3c42;color:#c2c2c2;border:1px solid #000;height:23px;box-shadow:0 0 0 0 rgba(0,0,0,.6);padding:0 8px;outline:0;font-family:inherit;font-size:13rem;font-weight:400;min-width:23px;margin:1px 0;transition:70ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host([cta]){background-color:#f93;color:#0a0a0a;border-color:#000;box-shadow:0 0 0 0 rgba(0,0,0,.6);outline:0;background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host([toggles]){background-color:#3c3c42;color:#c2c2c2;border-color:#000;box-shadow:0 0 0 0 rgba(0,0,0,.6);outline:0}:host([toggles][active]){border-color:#000;box-shadow:0 0 0 0 rgba(0,0,0,.6);outline:0;color:#f93!important;background-color:#38383d!important;background-image:linear-gradient(rgba(255,255,255,0) 0,rgba(255,255,255,.1) 90%)}@media all{:host(:not([cta])[empty][icon][transparent]:active){background-color:rgba(0,0,0,.07);color:#3c3c42;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){border-color:#000;outline:0}:host(:not([cta])[empty][icon][transparent][disabled]){background-color:transparent;color:#3c3c42;border-color:#333;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent][toggles][active]:active){background-color:rgba(0,0,0,.07);color:rgba(0,0,0,.07);box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host(:not([cta])[empty][icon][transparent][toggles][active]:active:not(:focus)){border-color:#000;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active][disabled]){background-color:transparent;color:rgba(0,0,0,.07);border-color:#333;box-shadow:none;outline:0;pointer-events:none}:host(:active){background-color:#38383d;color:#c2c2c2;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host(:active:not(:focus)){border-color:#000;outline:0}:host([disabled]){background-color:#3c3c42;color:#c2c2c2;border-color:#333;box-shadow:none;outline:0;pointer-events:none}:host([cta]:active){background-color:#ed8e2f;color:#0a0a0a;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([cta]:active:not(:focus)){border-color:#000;outline:0}:host([cta][disabled]){background-color:#f93;color:#0a0a0a;border-color:#333;box-shadow:none;outline:0;pointer-events:none}:host([toggles]:active){background-color:#38383d;color:#c2c2c2;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([toggles]:active:not(:focus)){border-color:#000;outline:0}:host([toggles][disabled]){background-color:#3c3c42;color:#c2c2c2;border-color:#333;box-shadow:none;outline:0;pointer-events:none}:host([toggles][active]:active){background-color:#343439;color:#f93;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([toggles][active]:active:not(:focus)){border-color:#000;outline:0}:host([toggles][active][disabled]){background-color:#38383d;color:#f93;border-color:#333;box-shadow:none;outline:0;pointer-events:none}}:host([cta]:active){background-color:#f93;background-image:linear-gradient(rgba(0,0,0,.3) 0,rgba(0,0,0,0) 100%)}:host([cta][disabled]){opacity:.4}:host([disabled]){opacity:.4;border-color:#000}:host(:active){background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host(:not([cta])[empty][icon][transparent][disabled]){color:#c2c2c2}@media (-ms-high-contrast:none),(pointer:fine){:host([hover-icon]:hover) #icon{display:none}:host([hover-icon]:hover) #hover-icon{display:block}:host(:not([cta])[empty][icon][transparent]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][focused=visible]){background-color:transparent;color:#c2c2c2;box-shadow:inset 0 0 0 1px #000;border-color:#f93;outline:0}:host(:not([cta])[empty][icon][transparent]:hover){background-color:rgba(18,18,18,0);box-shadow:0 0 0 0 rgba(0,0,0,.9);color:#e2e2e2}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){border-color:#000;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]){background-color:transparent;color:#c2c2c2;box-shadow:inset 0 0 0 1px #000;border-color:#f93;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover){background-color:rgba(18,18,18,0);color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover:not(:focus)){border-color:#000;outline:0}:host(:focus:not([focused])),:host([focused=visible]){background-color:#3c3c42;color:#c2c2c2;box-shadow:inset 0 0 0 1px #000;border-color:#f93;outline:0;border-style:dotted;box-shadow:inset 0 0 0 1px #000}:host(:hover){background-color:#4d4d55;color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host(:hover:not(:focus)){border-color:#000;outline:0}:host([cta]:focus:not([focused])),:host([cta][focused=visible]){background-color:#f93;box-shadow:inset 0 0 0 1px #000;outline:0;border-color:#000;box-shadow:inset 0 0 0 1px #000;color:#0a0a0a}:host([cta]:hover){background-color:#ffab57;box-shadow:0 0 0 0 rgba(0,0,0,.9);color:#0a0a0a}:host([cta]:hover:not(:focus)){border-color:#000;outline:0}:host([toggles]:focus:not([focused])),:host([toggles][focused=visible]){background-color:#3c3c42;color:#c2c2c2;box-shadow:inset 0 0 0 1px #000;border-color:#f93;outline:0}:host([toggles]:hover){background-color:#4d4d55;color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host([toggles]:hover:not(:focus)){border-color:#000;outline:0}:host([toggles][active]:focus:not([focused])),:host([toggles][active][focused=visible]){background-color:#38383d;color:#c2c2c2;box-shadow:inset 0 0 0 1px #000;border-color:#f93;outline:0}:host([toggles][active]:hover){background-color:#494950;color:#e2e2e2;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host([toggles][active]:hover:not(:focus)){border-color:#000;outline:0}}:host(:not([readonly]):active){background-color:#38383d;color:#c2c2c2;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([cta]:not([readonly]):active){background-color:#f93;color:#0a0a0a}:host([toggles]:not([readonly]):active){background-color:#3c3c42;color:#c2c2c2}:host([toggles][active]:not([readonly]):active){background-color:#38383d;color:#f93}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/solar/pearl';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:0 0 0 0 rgba(0,0,0,.3);font-family:inherit;min-width:23px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;touch-action:manipulation}:host [part=icon]{flex:none}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}
|
|
3
|
+
elf.customStyles.define('ef-button', ':host{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:0 0 0 0 rgba(0,0,0,.3);font-family:inherit;min-width:23px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;touch-action:manipulation}:host [part=icon]{flex:none}:host(:not([empty])) [part=label]{white-space:inherit;overflow:inherit;text-overflow:inherit;min-width:0;flex:1 1 auto}:host([hover-icon]) #hover-icon{display:none}:host([empty][icon]){min-width:23px;padding:0}:host(:not([cta])[empty][icon][transparent]){background:0 0!important;box-shadow:none!important;border:none!important;color:#505050}:host(:not([cta])[empty][icon][transparent]:not(:focus)){border-color:transparent!important}:host(:not([cta])[empty][icon][transparent][toggles][active]){color:#fff}:host(:not([empty])[icon][textpos=before]) [part=icon]{order:1}:host(:not([empty])[icon][textpos=after]) [part=label]{padding-left:.3em}:host(:not([empty])[icon][textpos=before]) [part=label]{padding-right:.3em}:host{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;background-color:#fafbfc;color:#505050;border:1px solid #a9afba;height:23px;box-shadow:0 0 0 0 rgba(0,0,0,.3);padding:0 8px;outline:0;font-family:inherit;font-size:13rem;font-weight:400;min-width:23px;margin:1px 0;transition:70ms;text-align:center;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-flex;justify-content:center;align-items:center;vertical-align:bottom;position:relative;overflow:hidden;background-image:linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.1) 100%)}:host([cta]){background-color:#ffb266;color:#505050;border-color:#a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.3);outline:0;background-image:linear-gradient(rgba(255,255,255,.4) 0,rgba(255,255,255,0) 100%)}:host([toggles]){background-color:#fafbfc;color:#505050;border-color:#a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.3);outline:0}:host([toggles][active]){border-color:#a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.3);outline:0;color:#f93!important;background-color:#fff!important;background-image:linear-gradient(rgba(0,0,0,.1) 0,rgba(0,0,0,0) 100%)}@media all{:host(:not([cta])[empty][icon][transparent]:active){background-color:#fff;color:#bac8d6;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host(:not([cta])[empty][icon][transparent]:active:not(:focus)){border-color:#a9afba;outline:0}:host(:not([cta])[empty][icon][transparent][disabled]){background-color:transparent;color:#fafbfc;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}:host(:not([cta])[empty][icon][transparent][toggles][active]:active){background-color:#fff;color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host(:not([cta])[empty][icon][transparent][toggles][active]:active:not(:focus)){border-color:#a9afba;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active][disabled]){background-color:transparent;color:#fff;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}:host(:active){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host(:active:not(:focus)){border-color:#a9afba;outline:0}:host([disabled]){background-color:#fafbfc;color:#505050;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}:host([cta]:active){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host([cta]:active:not(:focus)){border-color:#a9afba;outline:0}:host([cta][disabled]){background-color:#ffb266;color:#505050;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}:host([toggles]:active){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host([toggles]:active:not(:focus)){border-color:#a9afba;outline:0}:host([toggles][disabled]){background-color:#fafbfc;color:#505050;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}:host([toggles][active]:active){background-color:#fff;color:#c60;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host([toggles][active]:active:not(:focus)){border-color:#a9afba;outline:0}:host([toggles][active][disabled]){background-color:#fff;color:#f93;border-color:#babfc8;box-shadow:none;outline:0;pointer-events:none}}:host([cta]:active){background-color:#ffb266;background-image:linear-gradient(rgba(255,255,255,0) 0,rgba(255,255,255,.4) 100%)}:host([cta][disabled]){opacity:.4}:host([disabled]){opacity:.4;border-color:#a9afba}:host(:active){background-image:none}:host(:not([cta])[empty][icon][transparent][disabled]){color:#505050}@media (-ms-high-contrast:none),(pointer:fine){:host([hover-icon]:hover) #icon{display:none}:host([hover-icon]:hover) #hover-icon{display:block}:host(:not([cta])[empty][icon][transparent]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][focused=visible]){background-color:transparent;color:#fafbfc;box-shadow:inset 0 0 0 1px #a9afba;border-color:#ee7600;outline:0}:host(:not([cta])[empty][icon][transparent]:hover){background-color:rgba(18,18,18,0);box-shadow:0 0 0 0 rgba(0,0,0,.6);color:#1d1d1d}:host(:not([cta])[empty][icon][transparent]:hover:not(:focus)){border-color:#a9afba;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:focus:not([focused])),:host(:not([cta])[empty][icon][transparent][toggles][active][focused=visible]){background-color:transparent;color:#fff;box-shadow:inset 0 0 0 1px #a9afba;border-color:#ee7600;outline:0}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover){background-color:rgba(18,18,18,0);color:#ccc;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host(:not([cta])[empty][icon][transparent][toggles][active]:hover:not(:focus)){border-color:#a9afba;outline:0}:host(:focus:not([focused])),:host([focused=visible]){background-color:#fafbfc;color:#505050;box-shadow:inset 0 0 0 1px #a9afba;border-color:#ee7600;outline:0;border-style:dotted;box-shadow:inset 0 0 0 1px #a9afba}:host(:hover){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host(:hover:not(:focus)){border-color:#a9afba;outline:0}:host([cta]:focus:not([focused])),:host([cta][focused=visible]){background-color:#ffb266;box-shadow:inset 0 0 0 1px #a9afba;outline:0;border-color:#a9afba;box-shadow:inset 0 0 0 1px #a9afba;color:#505050}:host([cta]:hover){background-color:#ffc48a;box-shadow:0 0 0 0 rgba(0,0,0,.6);color:#505050}:host([cta]:hover:not(:focus)){border-color:#a9afba;outline:0}:host([toggles]:focus:not([focused])),:host([toggles][focused=visible]){background-color:#fafbfc;color:#505050;box-shadow:inset 0 0 0 1px #a9afba;border-color:#ee7600;outline:0}:host([toggles]:hover){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([toggles]:hover:not(:focus)){border-color:#a9afba;outline:0}:host([toggles][active]:focus:not([focused])),:host([toggles][active][focused=visible]){background-color:#fff;color:#f93;box-shadow:inset 0 0 0 1px #a9afba;border-color:#ee7600;outline:0}:host([toggles][active]:hover){background-color:#fff;color:#c60;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host([toggles][active]:hover:not(:focus)){border-color:#a9afba;outline:0}}:host(:not([readonly]):active){background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3)}:host([cta]:not([readonly]):active){background-color:#ffb266;color:#505050}:host([toggles]:not([readonly]):active){background-color:#fafbfc;color:#505050}:host([toggles][active]:not([readonly]):active){background-color:#fff;color:#f93}');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# ef-button-bar
|
|
2
|
+
|
|
3
|
+
Used to display multiple buttons to create a list of commands bar.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-----------|-----------|-----------|---------|--------------------------------------------------|
|
|
9
|
+
| `managed` | `managed` | `boolean` | false | Manages user interaction, only allowing one toggle button to be active at any one time. |
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Used to display multiple buttons to create a list of commands bar.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ButtonBar extends BasicElement {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Element version number
|
|
9
|
+
* @returns version number
|
|
10
|
+
*/
|
|
11
|
+
static get version(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Element's role attribute for accessibility
|
|
14
|
+
* `role` should be `radiogroup` when it is managed.
|
|
15
|
+
*/
|
|
16
|
+
protected defaultRole: 'toolbar' | 'radiogroup';
|
|
17
|
+
/**
|
|
18
|
+
* A `CSSResultGroup` that will be used
|
|
9
19
|
* to style the host, slotted children
|
|
10
20
|
* and the internal template of the element.
|
|
11
21
|
* @return CSS template
|
|
12
22
|
*/
|
|
13
|
-
static get styles():
|
|
23
|
+
static get styles(): CSSResultGroup;
|
|
14
24
|
/**
|
|
15
25
|
* Manages user interaction, only allowing one toggle button to be active at any one time.
|
|
16
26
|
*/
|
|
@@ -25,6 +35,45 @@ export declare class ButtonBar extends BasicElement {
|
|
|
25
35
|
* @returns {void}
|
|
26
36
|
*/
|
|
27
37
|
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
38
|
+
/**
|
|
39
|
+
* Handles key down event
|
|
40
|
+
* @param event Key down event object
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
private onKeyDown;
|
|
44
|
+
/**
|
|
45
|
+
* Navigate to next or previous focusable button
|
|
46
|
+
* @param direction next | down
|
|
47
|
+
* @returns {void}
|
|
48
|
+
*/
|
|
49
|
+
private navigateToSibling;
|
|
50
|
+
/**
|
|
51
|
+
* Navigate to the first focusable button
|
|
52
|
+
* @returns {void}
|
|
53
|
+
*/
|
|
54
|
+
private first;
|
|
55
|
+
/**
|
|
56
|
+
* Navigate to the last focusable button
|
|
57
|
+
* @returns {void}
|
|
58
|
+
*/
|
|
59
|
+
private last;
|
|
60
|
+
/**
|
|
61
|
+
* Sets the tabindex to -1 for all buttons except the currently focused one.
|
|
62
|
+
* @param target the button to be focused
|
|
63
|
+
* @param buttons Array of Buttons that contains target
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
private rovingTabIndex;
|
|
67
|
+
/**
|
|
68
|
+
* Set tabIndex to all buttons
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
private manageTabIndex;
|
|
72
|
+
/**
|
|
73
|
+
* Check if button bar is nested, a.k.a. has parent button bar
|
|
74
|
+
* @returns `True` if button bar is nested
|
|
75
|
+
*/
|
|
76
|
+
private isNested;
|
|
28
77
|
/**
|
|
29
78
|
* Handles tap event
|
|
30
79
|
* @param event the param is the event of click and tap handlers
|
|
@@ -42,6 +91,11 @@ export declare class ButtonBar extends BasicElement {
|
|
|
42
91
|
* @returns the array of Element of the default slot
|
|
43
92
|
*/
|
|
44
93
|
private getElementsOfSlot;
|
|
94
|
+
/**
|
|
95
|
+
* Return the array of Buttons which focusable
|
|
96
|
+
* @returns the array of focusable Buttons
|
|
97
|
+
*/
|
|
98
|
+
private getFocusableButtons;
|
|
45
99
|
/**
|
|
46
100
|
* Filter Button classes by the toggles property
|
|
47
101
|
* @param buttons the array of Button items is the converted nodes of the default slot
|
|
@@ -66,4 +120,6 @@ declare global {
|
|
|
66
120
|
'ef-button-bar': Partial<ButtonBar> | JSXInterface.HTMLAttributes<ButtonBar>;
|
|
67
121
|
}
|
|
68
122
|
}
|
|
69
|
-
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export {};
|