@refinitiv-ui/elements 5.3.3 → 5.3.4
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/lib/accordion/custom-elements.json +49 -0
- package/lib/accordion/index.d.ts +76 -0
- package/lib/accordion/index.js +139 -0
- package/lib/accordion/themes/halo/dark/index.js +3 -0
- package/lib/accordion/themes/halo/light/index.js +3 -0
- package/lib/accordion/themes/solar/charcoal/index.js +3 -0
- package/lib/accordion/themes/solar/pearl/index.js +3 -0
- package/lib/appstate-bar/custom-elements.json +49 -0
- package/lib/appstate-bar/index.d.ts +65 -0
- package/lib/appstate-bar/index.js +103 -0
- package/lib/appstate-bar/themes/halo/dark/index.js +3 -0
- package/lib/appstate-bar/themes/halo/light/index.js +3 -0
- package/lib/appstate-bar/themes/solar/charcoal/index.js +3 -0
- package/lib/appstate-bar/themes/solar/pearl/index.js +3 -0
- package/lib/autosuggest/custom-elements.json +223 -0
- package/lib/autosuggest/helpers/const.d.ts +2 -0
- package/lib/autosuggest/helpers/const.js +3 -0
- package/lib/autosuggest/helpers/types.d.ts +54 -0
- package/lib/autosuggest/helpers/types.js +1 -0
- package/lib/autosuggest/helpers/utils.d.ts +39 -0
- package/lib/autosuggest/helpers/utils.js +76 -0
- package/lib/autosuggest/index.d.ts +533 -0
- package/lib/autosuggest/index.js +1248 -0
- package/lib/autosuggest/themes/halo/dark/index.js +5 -0
- package/lib/autosuggest/themes/halo/light/index.js +5 -0
- package/lib/autosuggest/themes/solar/charcoal/index.js +5 -0
- package/lib/autosuggest/themes/solar/pearl/index.js +5 -0
- package/lib/button/custom-elements.json +119 -0
- package/lib/button/index.d.ts +132 -0
- package/lib/button/index.js +213 -0
- package/lib/button/themes/halo/dark/index.js +3 -0
- package/lib/button/themes/halo/light/index.js +3 -0
- package/lib/button/themes/solar/charcoal/index.js +3 -0
- package/lib/button/themes/solar/pearl/index.js +3 -0
- package/lib/button-bar/custom-elements.json +26 -0
- package/lib/button-bar/index.d.ts +76 -0
- package/lib/button-bar/index.js +157 -0
- package/lib/button-bar/themes/halo/dark/index.js +3 -0
- package/lib/button-bar/themes/halo/light/index.js +3 -0
- package/lib/button-bar/themes/solar/charcoal/index.js +3 -0
- package/lib/button-bar/themes/solar/pearl/index.js +3 -0
- package/lib/calendar/custom-elements.json +199 -0
- package/lib/calendar/index.d.ts +321 -0
- package/lib/calendar/index.js +926 -0
- package/lib/calendar/locales.d.ts +31 -0
- package/lib/calendar/locales.js +144 -0
- package/lib/calendar/themes/halo/dark/index.js +3 -0
- package/lib/calendar/themes/halo/light/index.js +3 -0
- package/lib/calendar/themes/solar/charcoal/index.js +3 -0
- package/lib/calendar/themes/solar/pearl/index.js +3 -0
- package/lib/calendar/types.d.ts +33 -0
- package/lib/calendar/types.js +6 -0
- package/lib/calendar/utils.d.ts +12 -0
- package/lib/calendar/utils.js +17 -0
- package/lib/canvas/custom-elements.json +69 -0
- package/lib/canvas/index.d.ts +100 -0
- package/lib/canvas/index.js +175 -0
- package/lib/canvas/themes/halo/dark/index.js +2 -0
- package/lib/canvas/themes/halo/light/index.js +2 -0
- package/lib/canvas/themes/solar/charcoal/index.js +2 -0
- package/lib/canvas/themes/solar/pearl/index.js +2 -0
- package/lib/card/custom-elements.json +59 -0
- package/lib/card/helpers/types.d.ts +12 -0
- package/lib/card/helpers/types.js +1 -0
- package/lib/card/index.d.ts +140 -0
- package/lib/card/index.js +247 -0
- package/lib/card/themes/halo/dark/index.js +5 -0
- package/lib/card/themes/halo/light/index.js +5 -0
- package/lib/card/themes/solar/charcoal/index.js +5 -0
- package/lib/card/themes/solar/pearl/index.js +5 -0
- package/lib/chart/custom-elements.json +42 -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 +5 -0
- package/lib/chart/helpers/legend.js +78 -0
- package/lib/chart/helpers/merge.d.ts +15 -0
- package/lib/chart/helpers/merge.js +28 -0
- package/lib/chart/helpers/types.d.ts +69 -0
- package/lib/chart/helpers/types.js +1 -0
- package/lib/chart/index.d.ts +187 -0
- package/lib/chart/index.js +493 -0
- package/lib/chart/plugins/doughnut-center-label.d.ts +3 -0
- package/lib/chart/plugins/doughnut-center-label.js +196 -0
- package/lib/chart/themes/halo/dark/index.js +4 -0
- package/lib/chart/themes/halo/light/index.js +4 -0
- package/lib/chart/themes/solar/charcoal/index.js +4 -0
- package/lib/chart/themes/solar/pearl/index.js +4 -0
- package/lib/checkbox/custom-elements.json +71 -0
- package/lib/checkbox/index.d.ts +89 -0
- package/lib/checkbox/index.js +170 -0
- package/lib/checkbox/themes/halo/dark/index.js +4 -0
- package/lib/checkbox/themes/halo/light/index.js +4 -0
- package/lib/checkbox/themes/solar/charcoal/index.js +4 -0
- package/lib/checkbox/themes/solar/pearl/index.js +4 -0
- package/lib/clock/custom-elements.json +108 -0
- package/lib/clock/index.d.ts +309 -0
- package/lib/clock/index.js +564 -0
- package/lib/clock/themes/halo/dark/index.js +2 -0
- package/lib/clock/themes/halo/light/index.js +2 -0
- package/lib/clock/themes/solar/charcoal/index.js +2 -0
- package/lib/clock/themes/solar/pearl/index.js +2 -0
- package/lib/clock/utils/TickManager.d.ts +14 -0
- package/lib/clock/utils/TickManager.js +66 -0
- package/lib/clock/utils/timestamps.d.ts +6 -0
- package/lib/clock/utils/timestamps.js +6 -0
- package/lib/collapse/custom-elements.json +79 -0
- package/lib/collapse/index.d.ts +119 -0
- package/lib/collapse/index.js +199 -0
- package/lib/collapse/themes/halo/dark/index.js +5 -0
- package/lib/collapse/themes/halo/light/index.js +5 -0
- package/lib/collapse/themes/solar/charcoal/index.js +5 -0
- package/lib/collapse/themes/solar/pearl/index.js +5 -0
- package/lib/color-dialog/custom-elements.json +193 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +52 -0
- package/lib/color-dialog/elements/color-palettes.js +105 -0
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +67 -0
- package/lib/color-dialog/elements/grayscale-palettes.js +164 -0
- package/lib/color-dialog/elements/palettes.d.ts +58 -0
- package/lib/color-dialog/elements/palettes.js +119 -0
- package/lib/color-dialog/helpers/color-helpers.d.ts +62 -0
- package/lib/color-dialog/helpers/color-helpers.js +258 -0
- package/lib/color-dialog/helpers/value-model.d.ts +75 -0
- package/lib/color-dialog/helpers/value-model.js +139 -0
- package/lib/color-dialog/index.d.ts +232 -0
- package/lib/color-dialog/index.js +457 -0
- package/lib/color-dialog/themes/halo/dark/index.js +7 -0
- package/lib/color-dialog/themes/halo/light/index.js +7 -0
- package/lib/color-dialog/themes/solar/charcoal/index.js +7 -0
- package/lib/color-dialog/themes/solar/pearl/index.js +7 -0
- package/lib/combo-box/custom-elements.json +207 -0
- package/lib/combo-box/helpers/filter.d.ts +10 -0
- package/lib/combo-box/helpers/filter.js +29 -0
- package/lib/combo-box/helpers/keyboard-event.d.ts +17 -0
- package/lib/combo-box/helpers/keyboard-event.js +19 -0
- package/lib/combo-box/helpers/types.d.ts +11 -0
- package/lib/combo-box/helpers/types.js +1 -0
- package/lib/combo-box/index.d.ts +523 -0
- package/lib/combo-box/index.js +1146 -0
- package/lib/combo-box/themes/halo/dark/index.js +8 -0
- package/lib/combo-box/themes/halo/light/index.js +8 -0
- package/lib/combo-box/themes/solar/charcoal/index.js +8 -0
- package/lib/combo-box/themes/solar/pearl/index.js +8 -0
- package/lib/counter/custom-elements.json +35 -0
- package/lib/counter/index.d.ts +89 -0
- package/lib/counter/index.js +155 -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 +333 -0
- package/lib/datetime-picker/index.d.ts +498 -0
- package/lib/datetime-picker/index.js +1164 -0
- package/lib/datetime-picker/locales.d.ts +8 -0
- package/lib/datetime-picker/locales.js +46 -0
- package/lib/datetime-picker/themes/halo/dark/index.js +7 -0
- package/lib/datetime-picker/themes/halo/light/index.js +7 -0
- package/lib/datetime-picker/themes/solar/charcoal/index.js +7 -0
- package/lib/datetime-picker/themes/solar/pearl/index.js +7 -0
- package/lib/datetime-picker/types.d.ts +3 -0
- package/lib/datetime-picker/types.js +1 -0
- package/lib/datetime-picker/utils.d.ts +55 -0
- package/lib/datetime-picker/utils.js +92 -0
- package/lib/dialog/custom-elements.json +136 -0
- package/lib/dialog/draggable-element.d.ts +14 -0
- package/lib/dialog/draggable-element.js +221 -0
- package/lib/dialog/index.d.ts +199 -0
- package/lib/dialog/index.js +331 -0
- package/lib/dialog/themes/halo/dark/index.js +7 -0
- package/lib/dialog/themes/halo/light/index.js +7 -0
- package/lib/dialog/themes/solar/charcoal/index.js +7 -0
- package/lib/dialog/themes/solar/pearl/index.js +7 -0
- package/lib/email-field/custom-elements.json +199 -0
- package/lib/email-field/index.d.ts +152 -0
- package/lib/email-field/index.js +287 -0
- package/lib/email-field/themes/halo/dark/index.js +3 -0
- package/lib/email-field/themes/halo/light/index.js +3 -0
- package/lib/email-field/themes/solar/charcoal/index.js +3 -0
- package/lib/email-field/themes/solar/pearl/index.js +3 -0
- package/lib/events.d.ts +121 -0
- package/lib/events.js +2 -0
- package/lib/flag/custom-elements.json +35 -0
- package/lib/flag/index.d.ts +94 -0
- package/lib/flag/index.js +168 -0
- package/lib/flag/themes/halo/dark/index.js +2 -0
- package/lib/flag/themes/halo/light/index.js +2 -0
- package/lib/flag/themes/solar/charcoal/index.js +2 -0
- package/lib/flag/themes/solar/pearl/index.js +2 -0
- package/lib/flag/utils/FlagLoader.d.ts +47 -0
- package/lib/flag/utils/FlagLoader.js +86 -0
- package/lib/header/custom-elements.json +36 -0
- package/lib/header/index.d.ts +46 -0
- package/lib/header/index.js +76 -0
- package/lib/header/themes/halo/dark/index.js +2 -0
- package/lib/header/themes/halo/light/index.js +2 -0
- package/lib/header/themes/solar/charcoal/index.js +2 -0
- package/lib/header/themes/solar/pearl/index.js +2 -0
- package/lib/heatmap/custom-elements.json +151 -0
- package/lib/heatmap/helpers/color.d.ts +30 -0
- package/lib/heatmap/helpers/color.js +68 -0
- package/lib/heatmap/helpers/text.d.ts +26 -0
- package/lib/heatmap/helpers/text.js +91 -0
- package/lib/heatmap/helpers/track.d.ts +102 -0
- package/lib/heatmap/helpers/track.js +160 -0
- package/lib/heatmap/helpers/types.d.ts +40 -0
- package/lib/heatmap/helpers/types.js +1 -0
- package/lib/heatmap/index.d.ts +453 -0
- package/lib/heatmap/index.js +1104 -0
- package/lib/heatmap/themes/halo/dark/index.js +4 -0
- package/lib/heatmap/themes/halo/light/index.js +4 -0
- package/lib/heatmap/themes/solar/charcoal/index.js +4 -0
- package/lib/heatmap/themes/solar/pearl/index.js +4 -0
- package/lib/icon/custom-elements.json +34 -0
- package/lib/icon/index.d.ts +87 -0
- package/lib/icon/index.js +161 -0
- package/lib/icon/themes/halo/dark/index.js +2 -0
- package/lib/icon/themes/halo/light/index.js +2 -0
- package/lib/icon/themes/solar/charcoal/index.js +2 -0
- package/lib/icon/themes/solar/pearl/index.js +2 -0
- package/lib/icon/utils/IconLoader.d.ts +47 -0
- package/lib/icon/utils/IconLoader.js +86 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/interactive-chart/custom-elements.json +86 -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 +45 -0
- package/lib/interactive-chart/helpers/types.js +6 -0
- package/lib/interactive-chart/index.d.ts +380 -0
- package/lib/interactive-chart/index.js +1093 -0
- package/lib/interactive-chart/themes/halo/dark/index.js +3 -0
- package/lib/interactive-chart/themes/halo/light/index.js +3 -0
- package/lib/interactive-chart/themes/solar/charcoal/index.js +3 -0
- package/lib/interactive-chart/themes/solar/pearl/index.js +3 -0
- package/lib/item/custom-elements.json +153 -0
- package/lib/item/helpers/types.d.ts +57 -0
- package/lib/item/helpers/types.js +1 -0
- package/lib/item/index.d.ts +149 -0
- package/lib/item/index.js +252 -0
- package/lib/item/themes/halo/dark/index.js +4 -0
- package/lib/item/themes/halo/light/index.js +4 -0
- package/lib/item/themes/solar/charcoal/index.js +4 -0
- package/lib/item/themes/solar/pearl/index.js +4 -0
- package/lib/jsx.d.ts +223 -0
- package/lib/label/custom-elements.json +52 -0
- package/lib/label/index.d.ts +102 -0
- package/lib/label/index.js +252 -0
- package/lib/label/themes/halo/dark/index.js +3 -0
- package/lib/label/themes/halo/light/index.js +3 -0
- package/lib/label/themes/solar/charcoal/index.js +3 -0
- package/lib/label/themes/solar/pearl/index.js +3 -0
- package/lib/layout/custom-elements.json +163 -0
- package/lib/layout/index.d.ts +107 -0
- package/lib/layout/index.js +215 -0
- package/lib/layout/themes/halo/dark/index.js +2 -0
- package/lib/layout/themes/halo/light/index.js +2 -0
- package/lib/layout/themes/solar/charcoal/index.js +2 -0
- package/lib/layout/themes/solar/pearl/index.js +2 -0
- package/lib/led-gauge/custom-elements.json +113 -0
- package/lib/led-gauge/index.d.ts +143 -0
- package/lib/led-gauge/index.js +440 -0
- package/lib/led-gauge/themes/halo/dark/index.js +3 -0
- package/lib/led-gauge/themes/halo/light/index.js +3 -0
- package/lib/led-gauge/themes/solar/charcoal/index.js +3 -0
- package/lib/led-gauge/themes/solar/pearl/index.js +3 -0
- package/lib/list/custom-elements.json +111 -0
- package/lib/list/extensible-function.d.ts +8 -0
- package/lib/list/extensible-function.js +13 -0
- package/lib/list/helpers/list-renderer.d.ts +9 -0
- package/lib/list/helpers/list-renderer.js +35 -0
- package/lib/list/helpers/types.d.ts +3 -0
- package/lib/list/helpers/types.js +1 -0
- package/lib/list/index.d.ts +292 -0
- package/lib/list/index.js +604 -0
- package/lib/list/renderer.d.ts +36 -0
- package/lib/list/renderer.js +9 -0
- package/lib/list/themes/halo/dark/index.js +3 -0
- package/lib/list/themes/halo/light/index.js +3 -0
- package/lib/list/themes/solar/charcoal/index.js +3 -0
- package/lib/list/themes/solar/pearl/index.js +3 -0
- package/lib/loader/custom-elements.json +9 -0
- package/lib/loader/index.d.ts +41 -0
- package/lib/loader/index.js +65 -0
- package/lib/loader/themes/halo/dark/index.js +2 -0
- package/lib/loader/themes/halo/light/index.js +2 -0
- package/lib/loader/themes/solar/charcoal/index.js +2 -0
- package/lib/loader/themes/solar/pearl/index.js +2 -0
- package/lib/multi-input/custom-elements.json +238 -0
- package/lib/multi-input/helpers/types.d.ts +11 -0
- package/lib/multi-input/helpers/types.js +1 -0
- package/lib/multi-input/index.d.ts +297 -0
- package/lib/multi-input/index.js +591 -0
- package/lib/multi-input/themes/halo/dark/index.js +4 -0
- package/lib/multi-input/themes/halo/light/index.js +4 -0
- package/lib/multi-input/themes/solar/charcoal/index.js +4 -0
- package/lib/multi-input/themes/solar/pearl/index.js +4 -0
- package/lib/notification/custom-elements.json +95 -0
- package/lib/notification/elements/notification-tray.d.ts +97 -0
- package/lib/notification/elements/notification-tray.js +170 -0
- package/lib/notification/elements/notification.d.ts +90 -0
- package/lib/notification/elements/notification.js +157 -0
- package/lib/notification/helpers/status.d.ts +30 -0
- package/lib/notification/helpers/status.js +130 -0
- package/lib/notification/helpers/types.d.ts +10 -0
- package/lib/notification/helpers/types.js +1 -0
- package/lib/notification/index.d.ts +2 -0
- package/lib/notification/index.js +2 -0
- package/lib/notification/themes/halo/dark/index.js +5 -0
- package/lib/notification/themes/halo/light/index.js +5 -0
- package/lib/notification/themes/solar/charcoal/index.js +5 -0
- package/lib/notification/themes/solar/pearl/index.js +5 -0
- package/lib/number-field/custom-elements.json +200 -0
- package/lib/number-field/index.d.ts +294 -0
- package/lib/number-field/index.js +708 -0
- package/lib/number-field/themes/halo/dark/index.js +3 -0
- package/lib/number-field/themes/halo/light/index.js +3 -0
- package/lib/number-field/themes/solar/charcoal/index.js +3 -0
- package/lib/number-field/themes/solar/pearl/index.js +3 -0
- package/lib/overlay/custom-elements.json +342 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +46 -0
- package/lib/overlay/elements/overlay-backdrop.js +67 -0
- package/lib/overlay/elements/overlay-viewport.d.ts +40 -0
- package/lib/overlay/elements/overlay-viewport.js +56 -0
- package/lib/overlay/elements/overlay.d.ts +403 -0
- package/lib/overlay/elements/overlay.js +1427 -0
- package/lib/overlay/helpers/functions.d.ts +13 -0
- package/lib/overlay/helpers/functions.js +16 -0
- package/lib/overlay/helpers/types.d.ts +97 -0
- package/lib/overlay/helpers/types.js +16 -0
- package/lib/overlay/index.d.ts +2 -0
- package/lib/overlay/index.js +1 -0
- package/lib/overlay/managers/backdrop-manager.d.ts +45 -0
- package/lib/overlay/managers/backdrop-manager.js +96 -0
- package/lib/overlay/managers/close-manager.d.ts +54 -0
- package/lib/overlay/managers/close-manager.js +138 -0
- package/lib/overlay/managers/focus-manager.d.ts +71 -0
- package/lib/overlay/managers/focus-manager.js +228 -0
- package/lib/overlay/managers/interaction-lock-manager.d.ts +138 -0
- package/lib/overlay/managers/interaction-lock-manager.js +375 -0
- package/lib/overlay/managers/viewport-manager.d.ts +93 -0
- package/lib/overlay/managers/viewport-manager.js +207 -0
- package/lib/overlay/managers/zindex-manager.d.ts +80 -0
- package/lib/overlay/managers/zindex-manager.js +195 -0
- package/lib/overlay/themes/halo/dark/index.js +4 -0
- package/lib/overlay/themes/halo/light/index.js +4 -0
- package/lib/overlay/themes/solar/charcoal/index.js +4 -0
- package/lib/overlay/themes/solar/pearl/index.js +4 -0
- package/lib/overlay-menu/custom-elements.json +196 -0
- package/lib/overlay-menu/helpers/types.d.ts +8 -0
- package/lib/overlay-menu/helpers/types.js +1 -0
- package/lib/overlay-menu/helpers/uuid.d.ts +7 -0
- package/lib/overlay-menu/helpers/uuid.js +13 -0
- package/lib/overlay-menu/index.d.ts +380 -0
- package/lib/overlay-menu/index.js +921 -0
- package/lib/overlay-menu/managers/menu-manager.d.ts +98 -0
- package/lib/overlay-menu/managers/menu-manager.js +240 -0
- package/lib/overlay-menu/themes/halo/dark/index.js +5 -0
- package/lib/overlay-menu/themes/halo/light/index.js +5 -0
- package/lib/overlay-menu/themes/solar/charcoal/index.js +5 -0
- package/lib/overlay-menu/themes/solar/pearl/index.js +5 -0
- package/lib/pagination/custom-elements.json +93 -0
- package/lib/pagination/helpers/types.d.ts +9 -0
- package/lib/pagination/helpers/types.js +1 -0
- package/lib/pagination/index.d.ts +207 -0
- package/lib/pagination/index.js +400 -0
- package/lib/pagination/themes/halo/dark/index.js +6 -0
- package/lib/pagination/themes/halo/light/index.js +6 -0
- package/lib/pagination/themes/solar/charcoal/index.js +6 -0
- package/lib/pagination/themes/solar/pearl/index.js +6 -0
- package/lib/panel/custom-elements.json +39 -0
- package/lib/panel/index.d.ts +48 -0
- package/lib/panel/index.js +77 -0
- package/lib/panel/themes/halo/dark/index.js +2 -0
- package/lib/panel/themes/halo/light/index.js +2 -0
- package/lib/panel/themes/solar/charcoal/index.js +2 -0
- package/lib/panel/themes/solar/pearl/index.js +2 -0
- package/lib/password-field/custom-elements.json +156 -0
- package/lib/password-field/index.d.ts +140 -0
- package/lib/password-field/index.js +258 -0
- package/lib/password-field/themes/halo/dark/index.js +3 -0
- package/lib/password-field/themes/halo/light/index.js +3 -0
- package/lib/password-field/themes/solar/charcoal/index.js +3 -0
- package/lib/password-field/themes/solar/pearl/index.js +3 -0
- package/lib/pill/custom-elements.json +95 -0
- package/lib/pill/index.d.ts +97 -0
- package/lib/pill/index.js +162 -0
- package/lib/pill/themes/halo/dark/index.js +3 -0
- package/lib/pill/themes/halo/light/index.js +3 -0
- package/lib/pill/themes/solar/charcoal/index.js +3 -0
- package/lib/pill/themes/solar/pearl/index.js +3 -0
- package/lib/progress-bar/custom-elements.json +58 -0
- package/lib/progress-bar/index.d.ts +82 -0
- package/lib/progress-bar/index.js +159 -0
- package/lib/progress-bar/themes/halo/dark/index.js +2 -0
- package/lib/progress-bar/themes/halo/light/index.js +2 -0
- package/lib/progress-bar/themes/solar/charcoal/index.js +2 -0
- package/lib/progress-bar/themes/solar/pearl/index.js +2 -0
- package/lib/radio-button/custom-elements.json +84 -0
- package/lib/radio-button/index.d.ts +106 -0
- package/lib/radio-button/index.js +195 -0
- package/lib/radio-button/radio-button-registry.d.ts +21 -0
- package/lib/radio-button/radio-button-registry.js +40 -0
- package/lib/radio-button/themes/halo/dark/index.js +3 -0
- package/lib/radio-button/themes/halo/light/index.js +3 -0
- package/lib/radio-button/themes/solar/charcoal/index.js +3 -0
- package/lib/radio-button/themes/solar/pearl/index.js +3 -0
- package/lib/rating/custom-elements.json +58 -0
- package/lib/rating/index.d.ts +91 -0
- package/lib/rating/index.js +158 -0
- package/lib/rating/themes/halo/dark/index.js +2 -0
- package/lib/rating/themes/halo/light/index.js +2 -0
- package/lib/rating/themes/solar/charcoal/index.js +2 -0
- package/lib/rating/themes/solar/pearl/index.js +2 -0
- package/lib/search-field/custom-elements.json +173 -0
- package/lib/search-field/index.d.ts +134 -0
- package/lib/search-field/index.js +254 -0
- package/lib/search-field/themes/halo/dark/index.js +3 -0
- package/lib/search-field/themes/halo/light/index.js +3 -0
- package/lib/search-field/themes/solar/charcoal/index.js +3 -0
- package/lib/search-field/themes/solar/pearl/index.js +3 -0
- package/lib/select/custom-elements.json +103 -0
- package/lib/select/helpers/types.d.ts +3 -0
- package/lib/select/helpers/types.js +1 -0
- package/lib/select/index.d.ts +388 -0
- package/lib/select/index.js +942 -0
- package/lib/select/themes/halo/dark/index.js +5 -0
- package/lib/select/themes/halo/light/index.js +5 -0
- package/lib/select/themes/solar/charcoal/index.js +5 -0
- package/lib/select/themes/solar/pearl/index.js +5 -0
- package/lib/sidebar-layout/custom-elements.json +72 -0
- package/lib/sidebar-layout/index.d.ts +69 -0
- package/lib/sidebar-layout/index.js +135 -0
- package/lib/sidebar-layout/themes/halo/dark/index.js +3 -0
- package/lib/sidebar-layout/themes/halo/light/index.js +3 -0
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +3 -0
- package/lib/sidebar-layout/themes/solar/pearl/index.js +3 -0
- package/lib/slider/custom-elements.json +181 -0
- package/lib/slider/index.d.ts +409 -0
- package/lib/slider/index.js +1188 -0
- package/lib/slider/themes/halo/dark/index.js +3 -0
- package/lib/slider/themes/halo/light/index.js +3 -0
- package/lib/slider/themes/solar/charcoal/index.js +3 -0
- package/lib/slider/themes/solar/pearl/index.js +3 -0
- package/lib/sparkline/custom-elements.json +59 -0
- package/lib/sparkline/index.d.ts +107 -0
- package/lib/sparkline/index.js +188 -0
- package/lib/sparkline/themes/halo/dark/index.js +2 -0
- package/lib/sparkline/themes/halo/light/index.js +2 -0
- package/lib/sparkline/themes/solar/charcoal/index.js +2 -0
- package/lib/sparkline/themes/solar/pearl/index.js +2 -0
- package/lib/swing-gauge/const.d.ts +22 -0
- package/lib/swing-gauge/const.js +26 -0
- package/lib/swing-gauge/custom-elements.json +109 -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 +294 -0
- package/lib/swing-gauge/index.js +762 -0
- package/lib/swing-gauge/themes/halo/dark/index.js +3 -0
- package/lib/swing-gauge/themes/halo/light/index.js +3 -0
- package/lib/swing-gauge/themes/solar/charcoal/index.js +3 -0
- package/lib/swing-gauge/themes/solar/pearl/index.js +3 -0
- package/lib/swing-gauge/types.d.ts +34 -0
- package/lib/swing-gauge/types.js +1 -0
- package/lib/tab/custom-elements.json +123 -0
- package/lib/tab/index.d.ts +118 -0
- package/lib/tab/index.js +211 -0
- package/lib/tab/themes/halo/dark/index.js +4 -0
- package/lib/tab/themes/halo/light/index.js +4 -0
- package/lib/tab/themes/solar/charcoal/index.js +4 -0
- package/lib/tab/themes/solar/pearl/index.js +4 -0
- package/lib/tab-bar/custom-elements.json +52 -0
- package/lib/tab-bar/helpers/animate.d.ts +16 -0
- package/lib/tab-bar/helpers/animate.js +53 -0
- package/lib/tab-bar/index.d.ts +108 -0
- package/lib/tab-bar/index.js +220 -0
- package/lib/tab-bar/themes/halo/dark/index.js +4 -0
- package/lib/tab-bar/themes/halo/light/index.js +4 -0
- package/lib/tab-bar/themes/solar/charcoal/index.js +4 -0
- package/lib/tab-bar/themes/solar/pearl/index.js +4 -0
- package/lib/text-field/custom-elements.json +210 -0
- package/lib/text-field/index.d.ts +171 -0
- package/lib/text-field/index.js +319 -0
- package/lib/text-field/themes/halo/dark/index.js +3 -0
- package/lib/text-field/themes/halo/light/index.js +3 -0
- package/lib/text-field/themes/solar/charcoal/index.js +3 -0
- package/lib/text-field/themes/solar/pearl/index.js +3 -0
- package/lib/time-picker/custom-elements.json +124 -0
- package/lib/time-picker/index.d.ts +379 -0
- package/lib/time-picker/index.js +777 -0
- package/lib/time-picker/themes/halo/dark/index.js +4 -0
- package/lib/time-picker/themes/halo/light/index.js +4 -0
- package/lib/time-picker/themes/solar/charcoal/index.js +4 -0
- package/lib/time-picker/themes/solar/pearl/index.js +4 -0
- package/lib/toggle/custom-elements.json +84 -0
- package/lib/toggle/index.d.ts +77 -0
- package/lib/toggle/index.js +134 -0
- package/lib/toggle/themes/halo/dark/index.js +2 -0
- package/lib/toggle/themes/halo/light/index.js +2 -0
- package/lib/toggle/themes/solar/charcoal/index.js +2 -0
- package/lib/toggle/themes/solar/pearl/index.js +2 -0
- package/lib/tooltip/custom-elements.json +62 -0
- package/lib/tooltip/elements/title-tooltip.d.ts +1 -0
- package/lib/tooltip/elements/title-tooltip.js +18 -0
- package/lib/tooltip/elements/tooltip-element.d.ts +21 -0
- package/lib/tooltip/elements/tooltip-element.js +54 -0
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +9 -0
- package/lib/tooltip/helpers/overflow-tooltip.js +19 -0
- package/lib/tooltip/helpers/renderer.d.ts +8 -0
- package/lib/tooltip/helpers/renderer.js +11 -0
- package/lib/tooltip/helpers/types.d.ts +23 -0
- package/lib/tooltip/helpers/types.js +1 -0
- package/lib/tooltip/index.d.ts +232 -0
- package/lib/tooltip/index.js +479 -0
- package/lib/tooltip/managers/tooltip-manager.d.ts +15 -0
- package/lib/tooltip/managers/tooltip-manager.js +144 -0
- package/lib/tooltip/themes/halo/dark/index.js +3 -0
- package/lib/tooltip/themes/halo/light/index.js +3 -0
- package/lib/tooltip/themes/solar/charcoal/index.js +3 -0
- package/lib/tooltip/themes/solar/pearl/index.js +3 -0
- package/lib/tornado-chart/custom-elements.json +45 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +78 -0
- package/lib/tornado-chart/elements/tornado-chart.js +125 -0
- package/lib/tornado-chart/elements/tornado-item.d.ts +110 -0
- package/lib/tornado-chart/elements/tornado-item.js +209 -0
- package/lib/tornado-chart/index.d.ts +2 -0
- package/lib/tornado-chart/index.js +2 -0
- package/lib/tornado-chart/themes/halo/dark/index.js +6 -0
- package/lib/tornado-chart/themes/halo/light/index.js +6 -0
- package/lib/tornado-chart/themes/solar/charcoal/index.js +6 -0
- package/lib/tornado-chart/themes/solar/pearl/index.js +6 -0
- package/lib/tree/custom-elements.json +100 -0
- package/lib/tree/elements/tree-item.d.ts +96 -0
- package/lib/tree/elements/tree-item.js +182 -0
- package/lib/tree/elements/tree.d.ts +156 -0
- package/lib/tree/elements/tree.js +286 -0
- package/lib/tree/helpers/renderer.d.ts +5 -0
- package/lib/tree/helpers/renderer.js +33 -0
- package/lib/tree/helpers/types.d.ts +17 -0
- package/lib/tree/helpers/types.js +1 -0
- package/lib/tree/index.d.ts +4 -0
- package/lib/tree/index.js +3 -0
- package/lib/tree/managers/tree-manager.d.ts +236 -0
- package/lib/tree/managers/tree-manager.js +379 -0
- package/lib/tree/themes/halo/dark/index.js +7 -0
- package/lib/tree/themes/halo/light/index.js +7 -0
- package/lib/tree/themes/solar/charcoal/index.js +7 -0
- package/lib/tree/themes/solar/pearl/index.js +7 -0
- package/lib/tree-select/custom-elements.json +107 -0
- package/lib/tree-select/helpers/types.d.ts +4 -0
- package/lib/tree-select/helpers/types.js +1 -0
- package/lib/tree-select/index.d.ts +400 -0
- package/lib/tree-select/index.js +881 -0
- package/lib/tree-select/themes/halo/dark/index.js +12 -0
- package/lib/tree-select/themes/halo/light/index.js +12 -0
- package/lib/tree-select/themes/solar/charcoal/index.js +12 -0
- package/lib/tree-select/themes/solar/pearl/index.js +12 -0
- package/package.json +9 -9
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { JSXInterface } from '../jsx';
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../overlay';
|
|
4
|
+
import { OverlayTransitionStyle as TooltipTransitionStyle } from '../overlay';
|
|
5
|
+
import './elements/title-tooltip';
|
|
6
|
+
import { TooltipCondition, TooltipRenderer, TooltipPosition } from './helpers/types';
|
|
7
|
+
import { register as registerOverflowTooltip } from './helpers/overflow-tooltip';
|
|
8
|
+
/**
|
|
9
|
+
* Tooltip displays extra information when the
|
|
10
|
+
* user hovers the pointer over an item.
|
|
11
|
+
*/
|
|
12
|
+
declare class Tooltip extends BasicElement {
|
|
13
|
+
/**
|
|
14
|
+
* Element version number
|
|
15
|
+
* @returns version number
|
|
16
|
+
*/
|
|
17
|
+
static get version(): string;
|
|
18
|
+
private matchTarget;
|
|
19
|
+
private matchTargetRect;
|
|
20
|
+
private showDelay;
|
|
21
|
+
private hideDelay;
|
|
22
|
+
private clicked;
|
|
23
|
+
private timerTimeout?;
|
|
24
|
+
private contentNodes?;
|
|
25
|
+
/**
|
|
26
|
+
* A `CSSResult` that will be used
|
|
27
|
+
* to style the host, slotted children
|
|
28
|
+
* and the internal template of the element.
|
|
29
|
+
* @return CSS template
|
|
30
|
+
*/
|
|
31
|
+
static get styles(): CSSResult | CSSResult[];
|
|
32
|
+
/**
|
|
33
|
+
* True if an element is an iframe
|
|
34
|
+
* @param relatedTarget Element to check
|
|
35
|
+
* @returns isIframe
|
|
36
|
+
*/
|
|
37
|
+
private static isIframe;
|
|
38
|
+
/**
|
|
39
|
+
* Check if the match target has moved position
|
|
40
|
+
* @param matchTargetRect Match target rect
|
|
41
|
+
* @param lastMatchTarget Previous match target
|
|
42
|
+
* @returns matches
|
|
43
|
+
*/
|
|
44
|
+
private static elementHasMoved;
|
|
45
|
+
/**
|
|
46
|
+
* CSS selector to match the tooltip
|
|
47
|
+
*/
|
|
48
|
+
selector: string;
|
|
49
|
+
/**
|
|
50
|
+
* Provide a function to test against the target.
|
|
51
|
+
* Return `true` if the target matches
|
|
52
|
+
* @type {TooltipCondition}
|
|
53
|
+
*/
|
|
54
|
+
condition: TooltipCondition | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* A renderer to define tooltip internal content.
|
|
57
|
+
* Return undefined, `String`, `HTMLElement` or `DocumentFragment`.
|
|
58
|
+
* If the content is not present, tooltip will not be displayed
|
|
59
|
+
* @type {TooltipRenderer}
|
|
60
|
+
*/
|
|
61
|
+
renderer: TooltipRenderer | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The position of the tooltip. Use the following values:
|
|
64
|
+
* `auto` (default) - display based on mouse enter coordinates
|
|
65
|
+
* `above` - display above the element
|
|
66
|
+
* `right` - display to the right of the element
|
|
67
|
+
* `below` - display beneath the element
|
|
68
|
+
* `left` - display to the left of the element
|
|
69
|
+
*/
|
|
70
|
+
position: 'auto' | 'above' | 'right' | 'below' | 'left';
|
|
71
|
+
/**
|
|
72
|
+
* Set the transition style.
|
|
73
|
+
* Value can be `fade`, `zoom`, `slide-down`, `slide-up`, `slide-right`,
|
|
74
|
+
* `slide-left`, `slide-right-down`, `slide-right-up`, `slide-left-down`, `slide-left-up`, or null in case of no transition
|
|
75
|
+
* @type {TooltipTransitionStyle}
|
|
76
|
+
*/
|
|
77
|
+
transitionStyle: TooltipTransitionStyle | null;
|
|
78
|
+
/**
|
|
79
|
+
* Get tooltip popup window
|
|
80
|
+
* Used for testing and legacy
|
|
81
|
+
*/
|
|
82
|
+
private tooltip;
|
|
83
|
+
/**
|
|
84
|
+
* Get position adjuster element.
|
|
85
|
+
* Used to adjust offsets if transforms are used
|
|
86
|
+
*/
|
|
87
|
+
private positionAdjusterEl;
|
|
88
|
+
private contentSlot;
|
|
89
|
+
private _x;
|
|
90
|
+
/**
|
|
91
|
+
* Set tooltip y coordinate
|
|
92
|
+
* @param x X coordinate
|
|
93
|
+
*/
|
|
94
|
+
private set x(value);
|
|
95
|
+
private _y;
|
|
96
|
+
/**
|
|
97
|
+
* Set tooltip y coordinate
|
|
98
|
+
* @param y Y coordinate
|
|
99
|
+
*/
|
|
100
|
+
private set y(value);
|
|
101
|
+
private _positionTarget;
|
|
102
|
+
/**
|
|
103
|
+
* Set tooltip position target
|
|
104
|
+
* @param positionTarget Position target
|
|
105
|
+
*/
|
|
106
|
+
private set positionTarget(value);
|
|
107
|
+
private _opened;
|
|
108
|
+
/**
|
|
109
|
+
* Run when opened attribute has changed. Map to popup window
|
|
110
|
+
* @param opened True if popup should be opened
|
|
111
|
+
* @returns {void}
|
|
112
|
+
*/
|
|
113
|
+
private setOpened;
|
|
114
|
+
connectedCallback(): void;
|
|
115
|
+
disconnectedCallback(): void;
|
|
116
|
+
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
117
|
+
/**
|
|
118
|
+
* Clear all timers
|
|
119
|
+
* @returns {void}
|
|
120
|
+
*/
|
|
121
|
+
private reset;
|
|
122
|
+
/**
|
|
123
|
+
* Check whether an element matches by condition
|
|
124
|
+
* If condition is not defined, checks by CSS selector
|
|
125
|
+
* @param element Element to check
|
|
126
|
+
* @param paths Event paths
|
|
127
|
+
* @returns true if element matches
|
|
128
|
+
*/
|
|
129
|
+
private isMatchElement;
|
|
130
|
+
/**
|
|
131
|
+
* Return true if the target matches condition. False otherwise
|
|
132
|
+
* @param paths Target to match against
|
|
133
|
+
* @returns matched element or null
|
|
134
|
+
*/
|
|
135
|
+
private getMatchedElement;
|
|
136
|
+
/**
|
|
137
|
+
* Check if the autosuggest has content
|
|
138
|
+
* @returns {Boolean} content exists
|
|
139
|
+
* @private
|
|
140
|
+
*/
|
|
141
|
+
private hasSlotContent;
|
|
142
|
+
/**
|
|
143
|
+
* Get content off the target element
|
|
144
|
+
* @param target Target to check against
|
|
145
|
+
* @returns contentNode or null
|
|
146
|
+
*/
|
|
147
|
+
private getContentNode;
|
|
148
|
+
/**
|
|
149
|
+
* Render content based on render to tooltip
|
|
150
|
+
* @param contentNode Content node to set
|
|
151
|
+
* @returns {void}
|
|
152
|
+
*/
|
|
153
|
+
private renderContentNode;
|
|
154
|
+
/**
|
|
155
|
+
* Hide tooltip
|
|
156
|
+
* @returns {void}
|
|
157
|
+
*/
|
|
158
|
+
private hideTooltip;
|
|
159
|
+
/**
|
|
160
|
+
* Reset tooltip
|
|
161
|
+
* @returns {void}
|
|
162
|
+
*/
|
|
163
|
+
private resetTooltip;
|
|
164
|
+
/**
|
|
165
|
+
* Run when mouse is moving over the document
|
|
166
|
+
* @param event Mouse move event
|
|
167
|
+
* @param paths Event paths
|
|
168
|
+
* @returns {void}
|
|
169
|
+
*/
|
|
170
|
+
private onMouseMove;
|
|
171
|
+
/**
|
|
172
|
+
* Try to show the tooltip if it matches the target
|
|
173
|
+
* @param paths The paths leading to target
|
|
174
|
+
* @param x X mouse coordinate
|
|
175
|
+
* @param y Y mouse coordinate
|
|
176
|
+
* @returns {void}
|
|
177
|
+
*/
|
|
178
|
+
private showTooltip;
|
|
179
|
+
/**
|
|
180
|
+
* Get the delay to show tooltip
|
|
181
|
+
*/
|
|
182
|
+
private get getTooltipShowDelay();
|
|
183
|
+
/**
|
|
184
|
+
* Show the tooltip corresponding to the correct position
|
|
185
|
+
* @param matchTarget Target to show the tooltip against
|
|
186
|
+
* @param x X coordinate
|
|
187
|
+
* @param y Y coordinate
|
|
188
|
+
* @returns {void}
|
|
189
|
+
*/
|
|
190
|
+
private showTooltipAtPosition;
|
|
191
|
+
/**
|
|
192
|
+
* Run when document click or contextmenu event happens
|
|
193
|
+
* @returns {void}
|
|
194
|
+
*/
|
|
195
|
+
private onClick;
|
|
196
|
+
/**
|
|
197
|
+
* Run when document mouse out event happens
|
|
198
|
+
* @returns {void}
|
|
199
|
+
*/
|
|
200
|
+
private onMouseOut;
|
|
201
|
+
/**
|
|
202
|
+
* Get popup position based on tooltip position
|
|
203
|
+
*/
|
|
204
|
+
private get tipPosition();
|
|
205
|
+
/**
|
|
206
|
+
* A `TemplateResult` that will be used
|
|
207
|
+
* to render the updated internal template.
|
|
208
|
+
* @returns Render template
|
|
209
|
+
*/
|
|
210
|
+
protected render(): TemplateResult;
|
|
211
|
+
/**
|
|
212
|
+
* true if tooltip is opened, false otherwise
|
|
213
|
+
* @returns opened
|
|
214
|
+
*/
|
|
215
|
+
private get opened();
|
|
216
|
+
}
|
|
217
|
+
export * from './elements/tooltip-element';
|
|
218
|
+
export { registerOverflowTooltip, Tooltip, TooltipCondition, TooltipRenderer, TooltipPosition, TooltipTransitionStyle };
|
|
219
|
+
|
|
220
|
+
declare global {
|
|
221
|
+
interface HTMLElementTagNameMap {
|
|
222
|
+
'ef-tooltip': Tooltip;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
namespace JSX {
|
|
226
|
+
interface IntrinsicElements {
|
|
227
|
+
'ef-tooltip': Partial<Tooltip> | JSXInterface.HTMLAttributes<Tooltip>;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export {};
|
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var Tooltip_1;
|
|
8
|
+
import { BasicElement, html, css, customElement, property, query, matches } from '@refinitiv-ui/core';
|
|
9
|
+
import { isSlotEmpty } from '@refinitiv-ui/utils';
|
|
10
|
+
import '../overlay';
|
|
11
|
+
import './elements/title-tooltip';
|
|
12
|
+
import { register, deregister } from './managers/tooltip-manager';
|
|
13
|
+
import { tooltipRenderer } from './helpers/renderer';
|
|
14
|
+
import { register as registerOverflowTooltip } from './helpers/overflow-tooltip';
|
|
15
|
+
import { VERSION } from '../';
|
|
16
|
+
const TooltipPositionMap = {
|
|
17
|
+
'auto': ['bottom-start', 'top-start'],
|
|
18
|
+
'above': ['top-middle'],
|
|
19
|
+
'right': ['right-middle'],
|
|
20
|
+
'below': ['bottom-middle'],
|
|
21
|
+
'left': ['left-middle']
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Tooltip displays extra information when the
|
|
25
|
+
* user hovers the pointer over an item.
|
|
26
|
+
*/
|
|
27
|
+
let Tooltip = Tooltip_1 = class Tooltip extends BasicElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.matchTarget = null;
|
|
31
|
+
this.matchTargetRect = null;
|
|
32
|
+
this.showDelay = 300;
|
|
33
|
+
this.hideDelay = 150;
|
|
34
|
+
this.clicked = false;
|
|
35
|
+
/**
|
|
36
|
+
* CSS selector to match the tooltip
|
|
37
|
+
*/
|
|
38
|
+
this.selector = '';
|
|
39
|
+
/**
|
|
40
|
+
* The position of the tooltip. Use the following values:
|
|
41
|
+
* `auto` (default) - display based on mouse enter coordinates
|
|
42
|
+
* `above` - display above the element
|
|
43
|
+
* `right` - display to the right of the element
|
|
44
|
+
* `below` - display beneath the element
|
|
45
|
+
* `left` - display to the left of the element
|
|
46
|
+
*/
|
|
47
|
+
this.position = 'auto';
|
|
48
|
+
/**
|
|
49
|
+
* Set the transition style.
|
|
50
|
+
* Value can be `fade`, `zoom`, `slide-down`, `slide-up`, `slide-right`,
|
|
51
|
+
* `slide-left`, `slide-right-down`, `slide-right-up`, `slide-left-down`, `slide-left-up`, or null in case of no transition
|
|
52
|
+
* @type {TooltipTransitionStyle}
|
|
53
|
+
*/
|
|
54
|
+
this.transitionStyle = 'fade';
|
|
55
|
+
this._x = 0;
|
|
56
|
+
this._y = 0;
|
|
57
|
+
this._positionTarget = null;
|
|
58
|
+
this._opened = false;
|
|
59
|
+
/**
|
|
60
|
+
* Clear all timers
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
this.reset = () => {
|
|
64
|
+
window.clearTimeout(this.timerTimeout);
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Reset tooltip
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
this.resetTooltip = () => {
|
|
71
|
+
this.hideTooltip();
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Run when mouse is moving over the document
|
|
75
|
+
* @param event Mouse move event
|
|
76
|
+
* @param paths Event paths
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
79
|
+
this.onMouseMove = (event, paths) => {
|
|
80
|
+
this.showTooltip(paths, event.clientX, event.clientY);
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Run when document click or contextmenu event happens
|
|
84
|
+
* @returns {void}
|
|
85
|
+
*/
|
|
86
|
+
this.onClick = () => {
|
|
87
|
+
this.clicked = true;
|
|
88
|
+
this.hideTooltip();
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Run when document mouse out event happens
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
this.onMouseOut = ({ relatedTarget }) => {
|
|
95
|
+
// document mouesemove, mouseleave and blur are not fired over iframe
|
|
96
|
+
// therefore create a special case for iframe to hide the tooltip
|
|
97
|
+
/* istanbul ignore next */
|
|
98
|
+
if (Tooltip_1.isIframe(relatedTarget)) {
|
|
99
|
+
this.resetTooltip();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Element version number
|
|
105
|
+
* @returns version number
|
|
106
|
+
*/
|
|
107
|
+
static get version() {
|
|
108
|
+
return VERSION;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* A `CSSResult` that will be used
|
|
112
|
+
* to style the host, slotted children
|
|
113
|
+
* and the internal template of the element.
|
|
114
|
+
* @return CSS template
|
|
115
|
+
*/
|
|
116
|
+
static get styles() {
|
|
117
|
+
return css `
|
|
118
|
+
:host {
|
|
119
|
+
display: contents;
|
|
120
|
+
position: absolute;
|
|
121
|
+
max-width: 0;
|
|
122
|
+
max-height: 0;
|
|
123
|
+
min-width: 0;
|
|
124
|
+
min-height: 0;
|
|
125
|
+
flex: none;
|
|
126
|
+
visibility: hidden;
|
|
127
|
+
}
|
|
128
|
+
[part=tooltip] {
|
|
129
|
+
visibility: visible;
|
|
130
|
+
overflow: visible;
|
|
131
|
+
}
|
|
132
|
+
[part=position-adjuster] {
|
|
133
|
+
position: fixed;
|
|
134
|
+
z-index: -1;
|
|
135
|
+
top: 0;
|
|
136
|
+
left: 0;
|
|
137
|
+
visibility: hidden;
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* True if an element is an iframe
|
|
143
|
+
* @param relatedTarget Element to check
|
|
144
|
+
* @returns isIframe
|
|
145
|
+
*/
|
|
146
|
+
static isIframe(relatedTarget) {
|
|
147
|
+
return relatedTarget !== null && relatedTarget.localName === 'iframe';
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Check if the match target has moved position
|
|
151
|
+
* @param matchTargetRect Match target rect
|
|
152
|
+
* @param lastMatchTarget Previous match target
|
|
153
|
+
* @returns matches
|
|
154
|
+
*/
|
|
155
|
+
static elementHasMoved(matchTargetRect, lastMatchTarget) {
|
|
156
|
+
if (lastMatchTarget === null) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
return lastMatchTarget.top !== matchTargetRect.top || lastMatchTarget.left !== matchTargetRect.left;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Set tooltip y coordinate
|
|
163
|
+
* @param x X coordinate
|
|
164
|
+
*/
|
|
165
|
+
set x(x) {
|
|
166
|
+
const oldX = this._x;
|
|
167
|
+
if (oldX !== x) {
|
|
168
|
+
this._x = x;
|
|
169
|
+
void this.requestUpdate('x', oldX);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Set tooltip y coordinate
|
|
174
|
+
* @param y Y coordinate
|
|
175
|
+
*/
|
|
176
|
+
set y(y) {
|
|
177
|
+
const oldY = this._y;
|
|
178
|
+
if (oldY !== y) {
|
|
179
|
+
this._y = y;
|
|
180
|
+
void this.requestUpdate('y', oldY);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Set tooltip position target
|
|
185
|
+
* @param positionTarget Position target
|
|
186
|
+
*/
|
|
187
|
+
set positionTarget(positionTarget) {
|
|
188
|
+
const oldPositionTarget = this._positionTarget;
|
|
189
|
+
if (positionTarget !== oldPositionTarget) {
|
|
190
|
+
this._positionTarget = positionTarget;
|
|
191
|
+
void this.requestUpdate('positionTarget', oldPositionTarget);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Run when opened attribute has changed. Map to popup window
|
|
196
|
+
* @param opened True if popup should be opened
|
|
197
|
+
* @returns {void}
|
|
198
|
+
*/
|
|
199
|
+
setOpened(opened) {
|
|
200
|
+
const oldOpened = this._opened;
|
|
201
|
+
if (oldOpened !== opened) {
|
|
202
|
+
this._opened = opened;
|
|
203
|
+
void this.requestUpdate('opened', oldOpened);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
connectedCallback() {
|
|
207
|
+
super.connectedCallback();
|
|
208
|
+
register(this, {
|
|
209
|
+
mousemove: this.reset,
|
|
210
|
+
mousemoveThrottled: this.onMouseMove,
|
|
211
|
+
click: this.onClick,
|
|
212
|
+
mouseout: this.onMouseOut,
|
|
213
|
+
mouseleave: this.resetTooltip,
|
|
214
|
+
wheel: this.resetTooltip,
|
|
215
|
+
keydown: this.resetTooltip,
|
|
216
|
+
blur: this.resetTooltip
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
disconnectedCallback() {
|
|
220
|
+
deregister(this);
|
|
221
|
+
this.setOpened(false);
|
|
222
|
+
this.reset();
|
|
223
|
+
this.matchTarget = null;
|
|
224
|
+
this.matchTargetRect = null;
|
|
225
|
+
this.positionTarget = null;
|
|
226
|
+
super.disconnectedCallback();
|
|
227
|
+
}
|
|
228
|
+
firstUpdated(changedProperties) {
|
|
229
|
+
super.firstUpdated(changedProperties);
|
|
230
|
+
this.showDelay = parseInt(this.getComputedVariable('--show-delay', '300'), 10);
|
|
231
|
+
this.hideDelay = parseInt(this.getComputedVariable('--hide-delay', '150'), 10);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Check whether an element matches by condition
|
|
235
|
+
* If condition is not defined, checks by CSS selector
|
|
236
|
+
* @param element Element to check
|
|
237
|
+
* @param paths Event paths
|
|
238
|
+
* @returns true if element matches
|
|
239
|
+
*/
|
|
240
|
+
isMatchElement(element, paths) {
|
|
241
|
+
if (this.condition) {
|
|
242
|
+
return this.condition(element, paths);
|
|
243
|
+
}
|
|
244
|
+
if (this.selector) {
|
|
245
|
+
return matches(element, this.selector);
|
|
246
|
+
}
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Return true if the target matches condition. False otherwise
|
|
251
|
+
* @param paths Target to match against
|
|
252
|
+
* @returns matched element or null
|
|
253
|
+
*/
|
|
254
|
+
getMatchedElement(paths) {
|
|
255
|
+
if (!this.condition && !this.selector) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
const l = paths.length;
|
|
259
|
+
for (let i = 0; i < l; i += 1) {
|
|
260
|
+
const node = paths[i];
|
|
261
|
+
if (node.nodeType !== Node.ELEMENT_NODE) {
|
|
262
|
+
continue;
|
|
263
|
+
}
|
|
264
|
+
if (node === document.body || node === document.documentElement) {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
const element = node;
|
|
268
|
+
if (this.isMatchElement(element, paths)) {
|
|
269
|
+
return element;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Check if the autosuggest has content
|
|
276
|
+
* @returns {Boolean} content exists
|
|
277
|
+
* @private
|
|
278
|
+
*/
|
|
279
|
+
hasSlotContent() {
|
|
280
|
+
if (this.contentNodes) {
|
|
281
|
+
/* show the slot. Default slotted content cannot work with tooltip or renderer */
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
return isSlotEmpty(this.contentSlot);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Get content off the target element
|
|
288
|
+
* @param target Target to check against
|
|
289
|
+
* @returns contentNode or null
|
|
290
|
+
*/
|
|
291
|
+
getContentNode(target) {
|
|
292
|
+
let content;
|
|
293
|
+
if (typeof this.renderer === 'function') {
|
|
294
|
+
content = this.renderer(target);
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
content = tooltipRenderer(target);
|
|
298
|
+
}
|
|
299
|
+
if (typeof content === 'string' && content) {
|
|
300
|
+
return document.createTextNode(content);
|
|
301
|
+
}
|
|
302
|
+
if (content instanceof HTMLElement) {
|
|
303
|
+
return content.cloneNode(true);
|
|
304
|
+
}
|
|
305
|
+
if (content instanceof DocumentFragment) {
|
|
306
|
+
return content.cloneNode(true);
|
|
307
|
+
}
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Render content based on render to tooltip
|
|
312
|
+
* @param contentNode Content node to set
|
|
313
|
+
* @returns {void}
|
|
314
|
+
*/
|
|
315
|
+
renderContentNode(contentNode) {
|
|
316
|
+
var _a;
|
|
317
|
+
if (contentNode instanceof Text && this.textContent === contentNode.textContent) {
|
|
318
|
+
return; /* Do not re-render the same text. Due to IE11 limitation we have to operate with text nodes */
|
|
319
|
+
}
|
|
320
|
+
if ((_a = this.contentNodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
321
|
+
this.contentNodes.forEach((node) => {
|
|
322
|
+
var _a;
|
|
323
|
+
(_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
if (contentNode instanceof DocumentFragment) {
|
|
327
|
+
this.contentNodes = [...contentNode.childNodes];
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
this.contentNodes = [contentNode];
|
|
331
|
+
}
|
|
332
|
+
this.appendChild(contentNode);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Hide tooltip
|
|
336
|
+
* @returns {void}
|
|
337
|
+
*/
|
|
338
|
+
hideTooltip() {
|
|
339
|
+
this.reset();
|
|
340
|
+
this.matchTarget = null;
|
|
341
|
+
this.matchTargetRect = null;
|
|
342
|
+
this.positionTarget = null;
|
|
343
|
+
this.setOpened(false);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Try to show the tooltip if it matches the target
|
|
347
|
+
* @param paths The paths leading to target
|
|
348
|
+
* @param x X mouse coordinate
|
|
349
|
+
* @param y Y mouse coordinate
|
|
350
|
+
* @returns {void}
|
|
351
|
+
*/
|
|
352
|
+
showTooltip(paths, x, y) {
|
|
353
|
+
// composedPath is only available on the direct event
|
|
354
|
+
this.timerTimeout = window.setTimeout(() => {
|
|
355
|
+
const lastMatchTarget = this.matchTarget;
|
|
356
|
+
const matchTarget = this.getMatchedElement(paths);
|
|
357
|
+
this.matchTarget = matchTarget;
|
|
358
|
+
if (!matchTarget) {
|
|
359
|
+
this.setOpened(false);
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const matchTargetRect = matchTarget.getBoundingClientRect();
|
|
363
|
+
if (lastMatchTarget === matchTarget && !Tooltip_1.elementHasMoved(matchTargetRect, this.matchTargetRect)) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
this.matchTargetRect = matchTargetRect;
|
|
367
|
+
this.clicked = false;
|
|
368
|
+
// adjust tooltip x & y vs clientX and clientY
|
|
369
|
+
const adjusterRect = this.positionAdjusterEl.getBoundingClientRect();
|
|
370
|
+
x = adjusterRect.left >= 0 ? x - adjusterRect.left : x;
|
|
371
|
+
y = adjusterRect.top >= 0 ? y - adjusterRect.top : y;
|
|
372
|
+
if (this.hasSlotContent()) {
|
|
373
|
+
this.showTooltipAtPosition(matchTarget, x, y);
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const contentNode = this.getContentNode(matchTarget);
|
|
377
|
+
if (contentNode) {
|
|
378
|
+
this.renderContentNode(contentNode);
|
|
379
|
+
this.showTooltipAtPosition(matchTarget, x, y);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
this.setOpened(false);
|
|
383
|
+
}, this.getTooltipShowDelay);
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Get the delay to show tooltip
|
|
387
|
+
*/
|
|
388
|
+
get getTooltipShowDelay() {
|
|
389
|
+
return this.clicked ? Math.round(this.hideDelay / 2) : this.opened ? this.hideDelay : this.showDelay;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Show the tooltip corresponding to the correct position
|
|
393
|
+
* @param matchTarget Target to show the tooltip against
|
|
394
|
+
* @param x X coordinate
|
|
395
|
+
* @param y Y coordinate
|
|
396
|
+
* @returns {void}
|
|
397
|
+
*/
|
|
398
|
+
showTooltipAtPosition(matchTarget, x, y) {
|
|
399
|
+
switch (this.position) {
|
|
400
|
+
case 'above':
|
|
401
|
+
case 'right':
|
|
402
|
+
case 'below':
|
|
403
|
+
case 'left':
|
|
404
|
+
this.x = 0;
|
|
405
|
+
this.y = 0;
|
|
406
|
+
this.positionTarget = matchTarget;
|
|
407
|
+
break;
|
|
408
|
+
default:
|
|
409
|
+
this.positionTarget = null;
|
|
410
|
+
this.x = x;
|
|
411
|
+
this.y = y;
|
|
412
|
+
}
|
|
413
|
+
this.setOpened(true);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Get popup position based on tooltip position
|
|
417
|
+
*/
|
|
418
|
+
get tipPosition() {
|
|
419
|
+
return TooltipPositionMap[this.position];
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* A `TemplateResult` that will be used
|
|
423
|
+
* to render the updated internal template.
|
|
424
|
+
* @returns Render template
|
|
425
|
+
*/
|
|
426
|
+
render() {
|
|
427
|
+
return html `<ef-overlay
|
|
428
|
+
part="tooltip"
|
|
429
|
+
.noCancelOnEscKey=${true}
|
|
430
|
+
.noCancelOnOutsideClick=${true}
|
|
431
|
+
.withShadow=${true}
|
|
432
|
+
.noInteractionLock=${true}
|
|
433
|
+
.noFocusManagement=${true}
|
|
434
|
+
?opened=${this._opened}
|
|
435
|
+
.position=${this.tipPosition}
|
|
436
|
+
.transitionStyle=${this.transitionStyle}
|
|
437
|
+
.positionTarget=${this._positionTarget}
|
|
438
|
+
.x=${this._x}
|
|
439
|
+
.y=${this._y}><slot id="contentSlot"></slot></ef-overlay><div part="position-adjuster"></div>`;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* true if tooltip is opened, false otherwise
|
|
443
|
+
* @returns opened
|
|
444
|
+
*/
|
|
445
|
+
get opened() {
|
|
446
|
+
return this._opened;
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
__decorate([
|
|
450
|
+
property({ type: String })
|
|
451
|
+
], Tooltip.prototype, "selector", void 0);
|
|
452
|
+
__decorate([
|
|
453
|
+
property({ type: Function, attribute: false })
|
|
454
|
+
], Tooltip.prototype, "condition", void 0);
|
|
455
|
+
__decorate([
|
|
456
|
+
property({ type: Function, attribute: false })
|
|
457
|
+
], Tooltip.prototype, "renderer", void 0);
|
|
458
|
+
__decorate([
|
|
459
|
+
property({ type: String })
|
|
460
|
+
], Tooltip.prototype, "position", void 0);
|
|
461
|
+
__decorate([
|
|
462
|
+
property({ type: String, attribute: 'transition-style' })
|
|
463
|
+
], Tooltip.prototype, "transitionStyle", void 0);
|
|
464
|
+
__decorate([
|
|
465
|
+
query('[part=tooltip]')
|
|
466
|
+
], Tooltip.prototype, "tooltip", void 0);
|
|
467
|
+
__decorate([
|
|
468
|
+
query('[part=position-adjuster]')
|
|
469
|
+
], Tooltip.prototype, "positionAdjusterEl", void 0);
|
|
470
|
+
__decorate([
|
|
471
|
+
query('#contentSlot')
|
|
472
|
+
], Tooltip.prototype, "contentSlot", void 0);
|
|
473
|
+
Tooltip = Tooltip_1 = __decorate([
|
|
474
|
+
customElement('ef-tooltip', {
|
|
475
|
+
alias: 'coral-tooltip'
|
|
476
|
+
})
|
|
477
|
+
], Tooltip);
|
|
478
|
+
export * from './elements/tooltip-element';
|
|
479
|
+
export { registerOverflowTooltip, Tooltip };
|