@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# ef-number-field
|
|
2
|
+
|
|
3
|
+
Form control element for numbers.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|----------------------------|---------------|---------------------------------------------|---------|--------------------------------------------------|
|
|
9
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
10
|
+
| `error` | `error` | `boolean` | false | Set error state |
|
|
11
|
+
| `max` | `max` | `string \| null` | null | Set maximum value.<br />This value must be greater than or equal to the value of the `min` attribute |
|
|
12
|
+
| `min` | `min` | `string \| null` | null | Set minimum value.<br />This value must be less than or equal to the value of the `max` attribute |
|
|
13
|
+
| `noSpinner` | `no-spinner` | `boolean` | false | Set spinner's visibility |
|
|
14
|
+
| `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
|
|
15
|
+
| `readonly` | `readonly` | `boolean` | false | Set readonly state |
|
|
16
|
+
| `selectionDirection` | | `"forward" \| "backward" \| "none" \| null` | | |
|
|
17
|
+
| `selectionEnd` | | `number \| null` | | |
|
|
18
|
+
| `selectionStart` | | `number \| null` | | |
|
|
19
|
+
| `step` | `step` | `string \| null` | null | Set step value |
|
|
20
|
+
| `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
|
|
21
|
+
| `value` | `value` | `string` | "" | The value of the number entered into the input. |
|
|
22
|
+
| `valueAsNumber (readonly)` | | `number` | | Returns the value of the element, interpreted as double number |
|
|
23
|
+
| `warning` | `warning` | `boolean` | false | Set warning state |
|
|
24
|
+
|
|
25
|
+
## Methods
|
|
26
|
+
|
|
27
|
+
| Method | Type | Description |
|
|
28
|
+
|---------------------|--------------------------------------------------|--------------------------------------------------|
|
|
29
|
+
| `checkValidity` | `(): boolean` | Returns true if an input element contains valid data. |
|
|
30
|
+
| `onInputChange` | `(event: any): void` | |
|
|
31
|
+
| `onInputInput` | `(event: any): void` | |
|
|
32
|
+
| `reportValidity` | `(): boolean` | Validate input. Mark as error if input is invalid |
|
|
33
|
+
| `setSelectionRange` | `(startSelection: number \| null, endSelection: number \| null, selectionDirection?: "forward" \| "backward" \| "none" \| undefined): void` | |
|
|
34
|
+
| `stepDown` | `(stepIncrement?: number \| undefined): void` | Decreases the input value by amount of step<br /><br />**stepIncrement**: The stepIncrement parameter is a numeric value. If no parameter is passed, stepIncrement defaults to 1. |
|
|
35
|
+
| `stepUp` | `(stepIncrement?: number \| undefined): void` | Increases the input value by amount of step<br /><br />**stepIncrement**: The stepIncrement parameter is a numeric value. If no parameter is passed, stepIncrement defaults to 1. |
|
|
36
|
+
|
|
37
|
+
## Events
|
|
38
|
+
|
|
39
|
+
| Event | Description |
|
|
40
|
+
|-----------------|-------------------------------------|
|
|
41
|
+
| `error-changed` | Dispatched when error state changes |
|
|
42
|
+
| `value-changed` | Dispatched when value changes |
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
2
|
+
import { FormFieldElement, CSSResultGroup, TemplateResult, PropertyValues, TapEvent } from '@refinitiv-ui/core';
|
|
3
|
+
import { TemplateMap } from '@refinitiv-ui/core/lib/directives/template-map.js';
|
|
4
|
+
import '../icon/index.js';
|
|
5
|
+
declare type SelectionDirection = 'forward' | 'backward' | 'none';
|
|
6
|
+
declare enum Direction {
|
|
7
|
+
Up = 1,
|
|
8
|
+
Down = -1
|
|
9
|
+
}
|
|
4
10
|
/**
|
|
5
|
-
* Form control element for numbers
|
|
11
|
+
* Form control element for numbers.
|
|
6
12
|
*
|
|
7
13
|
* @fires value-changed - Dispatched when value changes
|
|
8
14
|
* @fires error-changed - Dispatched when error state changes
|
|
9
15
|
*
|
|
10
|
-
* @attr {
|
|
11
|
-
* @prop {
|
|
16
|
+
* @attr {boolean} disabled - Set disabled state
|
|
17
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
18
|
+
*
|
|
19
|
+
* @attr {boolean} error - Set error state
|
|
20
|
+
* @prop {boolean} [error=false] - Set error state
|
|
21
|
+
*
|
|
22
|
+
* @attr {string} placeholder - Set placeholder text
|
|
23
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
12
24
|
*
|
|
13
25
|
* @attr {boolean} readonly - Set readonly state
|
|
14
26
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
15
27
|
*
|
|
16
|
-
* @attr {boolean}
|
|
17
|
-
* @prop {boolean} [
|
|
28
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
29
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
30
|
+
*
|
|
31
|
+
* @attr {boolean} warning - Set warning state
|
|
32
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
33
|
+
*
|
|
34
|
+
* @attr {string} value - Input's value
|
|
35
|
+
* @prop {string} [value=""] - Input's value
|
|
18
36
|
*/
|
|
19
|
-
export declare class NumberField extends
|
|
37
|
+
export declare class NumberField extends FormFieldElement {
|
|
20
38
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* and the internal template of the element.
|
|
24
|
-
* @return {CSSResult | CSSResult[]} CSS template
|
|
39
|
+
* Element version number
|
|
40
|
+
* @returns version number
|
|
25
41
|
*/
|
|
26
|
-
static get
|
|
42
|
+
static get version(): string;
|
|
27
43
|
/**
|
|
28
|
-
*
|
|
44
|
+
* A `CSSResultGroup` that will be used
|
|
45
|
+
* to style the host, slotted children
|
|
46
|
+
* and the internal template of the element.
|
|
47
|
+
* @return CSS template
|
|
29
48
|
*/
|
|
30
|
-
|
|
49
|
+
static get styles(): CSSResultGroup;
|
|
31
50
|
/**
|
|
32
51
|
* Set spinner's visibility
|
|
33
52
|
*/
|
|
@@ -46,22 +65,11 @@ export declare class NumberField extends ControlElement {
|
|
|
46
65
|
* This value must be greater than or equal to the value of the `min` attribute
|
|
47
66
|
*/
|
|
48
67
|
max: string | null;
|
|
49
|
-
/**
|
|
50
|
-
* Set state to transparent
|
|
51
|
-
*/
|
|
52
|
-
transparent: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Set state to error
|
|
55
|
-
*/
|
|
56
|
-
error: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Set state to warning
|
|
59
|
-
*/
|
|
60
|
-
warning: boolean;
|
|
61
68
|
private interimValueState;
|
|
62
69
|
/**
|
|
63
70
|
* The value of the number entered into the input.
|
|
64
71
|
* @param value number-field value
|
|
72
|
+
* @default -
|
|
65
73
|
*/
|
|
66
74
|
set value(value: string);
|
|
67
75
|
get value(): string;
|
|
@@ -69,10 +77,6 @@ export declare class NumberField extends ControlElement {
|
|
|
69
77
|
* Returns the value of the element, interpreted as double number
|
|
70
78
|
*/
|
|
71
79
|
get valueAsNumber(): number;
|
|
72
|
-
/**
|
|
73
|
-
* Get native input element from shadow root
|
|
74
|
-
*/
|
|
75
|
-
private inputEl;
|
|
76
80
|
/**
|
|
77
81
|
* Get spinner up element
|
|
78
82
|
*/
|
|
@@ -140,47 +144,49 @@ export declare class NumberField extends ControlElement {
|
|
|
140
144
|
* @returns string of input value
|
|
141
145
|
*/
|
|
142
146
|
private get internalValue();
|
|
143
|
-
/**
|
|
144
|
-
* Get native input value
|
|
145
|
-
* @returns string of input value
|
|
146
|
-
*/
|
|
147
|
-
private get inputValue();
|
|
148
|
-
/**
|
|
149
|
-
* Set native input value
|
|
150
|
-
* @param value input's value
|
|
151
|
-
*/
|
|
152
|
-
private set inputValue(value);
|
|
153
147
|
/**
|
|
154
148
|
* Handles key down input event
|
|
155
149
|
* @param event Key down event object
|
|
156
150
|
* @returns {void}
|
|
157
151
|
*/
|
|
158
|
-
|
|
152
|
+
protected onInputKeyDown(event: KeyboardEvent): void;
|
|
159
153
|
/**
|
|
160
154
|
* Run when spinner has been tapped
|
|
161
155
|
* @param event tap event
|
|
162
156
|
* @returns {void}
|
|
163
157
|
*/
|
|
164
|
-
|
|
158
|
+
protected onSpinnerTap(event: TapEvent): void;
|
|
165
159
|
/**
|
|
166
160
|
* Step down or up and notify value change
|
|
167
161
|
* @param direction Up or Down
|
|
168
162
|
* @returns {void}
|
|
169
163
|
*/
|
|
170
|
-
|
|
164
|
+
protected onApplyStep(direction: Direction): void;
|
|
171
165
|
/**
|
|
172
166
|
* Run before input changes
|
|
173
167
|
* Prevent invalid characters
|
|
174
168
|
* @param event before input event
|
|
175
169
|
* @returns {void}
|
|
176
170
|
*/
|
|
177
|
-
|
|
171
|
+
protected onBeforeInputChange(event: InputEvent): void;
|
|
172
|
+
/**
|
|
173
|
+
* Runs on input element `input` event
|
|
174
|
+
* @param event `input` event
|
|
175
|
+
* @returns {void}
|
|
176
|
+
*/
|
|
177
|
+
protected onInputInput(event: InputEvent): void;
|
|
178
|
+
/**
|
|
179
|
+
* Runs on input element `change` event
|
|
180
|
+
* @param event `change` event
|
|
181
|
+
* @returns {void}
|
|
182
|
+
*/
|
|
183
|
+
protected onInputChange(event: InputEvent): void;
|
|
178
184
|
/**
|
|
179
185
|
* Triggers when native input value change with input event or change event
|
|
180
186
|
* @param event Input event
|
|
181
187
|
* @returns {void}
|
|
182
188
|
*/
|
|
183
|
-
|
|
189
|
+
protected onNativeInputChange(event: InputEvent): void;
|
|
184
190
|
/**
|
|
185
191
|
* Stripe characters from input text based on previous input and data
|
|
186
192
|
* @param input The new input to process
|
|
@@ -257,15 +263,58 @@ export declare class NumberField extends ControlElement {
|
|
|
257
263
|
*/
|
|
258
264
|
reportValidity(): boolean;
|
|
259
265
|
/**
|
|
260
|
-
*
|
|
261
|
-
* @
|
|
266
|
+
* @ignore
|
|
267
|
+
* @inheritDoc
|
|
268
|
+
*/
|
|
269
|
+
get selectionStart(): number | null;
|
|
270
|
+
/**
|
|
271
|
+
* @ignore
|
|
272
|
+
* @inheritDoc
|
|
273
|
+
*/
|
|
274
|
+
set selectionStart(index: number | null);
|
|
275
|
+
/**
|
|
276
|
+
* @ignore
|
|
277
|
+
* @inheritDoc
|
|
262
278
|
*/
|
|
263
|
-
|
|
279
|
+
get selectionEnd(): number | null;
|
|
280
|
+
/**
|
|
281
|
+
* @ignore
|
|
282
|
+
* @inheritDoc
|
|
283
|
+
*/
|
|
284
|
+
set selectionEnd(index: number | null);
|
|
285
|
+
/**
|
|
286
|
+
* @ignore
|
|
287
|
+
* @inheritDoc
|
|
288
|
+
*/
|
|
289
|
+
get selectionDirection(): SelectionDirection | null;
|
|
290
|
+
/**
|
|
291
|
+
* @ignore
|
|
292
|
+
* @inheritDoc
|
|
293
|
+
*/
|
|
294
|
+
set selectionDirection(direction: SelectionDirection | null);
|
|
295
|
+
/**
|
|
296
|
+
* @ignore
|
|
297
|
+
* @inheritDoc
|
|
298
|
+
*/
|
|
299
|
+
setSelectionRange(startSelection: number | null, endSelection: number | null, selectionDirection?: SelectionDirection): void;
|
|
264
300
|
/**
|
|
265
301
|
* Renders spinner
|
|
266
302
|
* @returns {TemplateResult} spinner part template
|
|
267
303
|
*/
|
|
268
|
-
|
|
304
|
+
protected renderSpinner(): TemplateResult;
|
|
305
|
+
/**
|
|
306
|
+
* Decorate `<input>` element with common properties extended from form field element:
|
|
307
|
+
* type="text" - always `text`
|
|
308
|
+
* part="input" - always "input", used for styling
|
|
309
|
+
* inputmode="decimal" - show decimals keyboard by default
|
|
310
|
+
* pattern="'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$'" - numbers only
|
|
311
|
+
* role="spinbutton" - number field is actually a spinner
|
|
312
|
+
* aria-valuenow - current value or 0
|
|
313
|
+
* @keydown - Listener for `keydown` event. Runs `this.onInputKeyDown`
|
|
314
|
+
* @beforeinput - Listener for `beforeinput` event. Runs `this.onBeforeInputChange`
|
|
315
|
+
* @returns template map
|
|
316
|
+
*/
|
|
317
|
+
protected get decorateInputMap(): TemplateMap;
|
|
269
318
|
/**
|
|
270
319
|
* A `TemplateResult` that will be used
|
|
271
320
|
* to render the updated internal template.
|
|
@@ -273,6 +322,7 @@ export declare class NumberField extends ControlElement {
|
|
|
273
322
|
*/
|
|
274
323
|
protected render(): TemplateResult;
|
|
275
324
|
}
|
|
325
|
+
export {};
|
|
276
326
|
|
|
277
327
|
declare global {
|
|
278
328
|
interface HTMLElementTagNameMap {
|
|
@@ -281,7 +331,9 @@ declare global {
|
|
|
281
331
|
|
|
282
332
|
namespace JSX {
|
|
283
333
|
interface IntrinsicElements {
|
|
284
|
-
'ef-number-field': Partial<NumberField> | JSXInterface.
|
|
334
|
+
'ef-number-field': Partial<NumberField> | JSXInterface.HTMLAttributes<NumberField>;
|
|
285
335
|
}
|
|
286
336
|
}
|
|
287
|
-
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import
|
|
8
|
-
import '../icon';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { FormFieldElement, html, css, FocusedPropertyKey } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import '../icon/index.js';
|
|
9
8
|
const NUMBER_PATTERN = '^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$';
|
|
10
9
|
const DEFAULT_STEP_BASE = 1;
|
|
11
10
|
const ANY_STEP = 'any';
|
|
@@ -15,27 +14,35 @@ var Direction;
|
|
|
15
14
|
Direction[Direction["Down"] = -1] = "Down";
|
|
16
15
|
})(Direction || (Direction = {}));
|
|
17
16
|
/**
|
|
18
|
-
* Form control element for numbers
|
|
17
|
+
* Form control element for numbers.
|
|
19
18
|
*
|
|
20
19
|
* @fires value-changed - Dispatched when value changes
|
|
21
20
|
* @fires error-changed - Dispatched when error state changes
|
|
22
21
|
*
|
|
23
|
-
* @attr {
|
|
24
|
-
* @prop {
|
|
22
|
+
* @attr {boolean} disabled - Set disabled state
|
|
23
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
24
|
+
*
|
|
25
|
+
* @attr {boolean} error - Set error state
|
|
26
|
+
* @prop {boolean} [error=false] - Set error state
|
|
27
|
+
*
|
|
28
|
+
* @attr {string} placeholder - Set placeholder text
|
|
29
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
25
30
|
*
|
|
26
31
|
* @attr {boolean} readonly - Set readonly state
|
|
27
32
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
28
33
|
*
|
|
29
|
-
* @attr {boolean}
|
|
30
|
-
* @prop {boolean} [
|
|
34
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
35
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
36
|
+
*
|
|
37
|
+
* @attr {boolean} warning - Set warning state
|
|
38
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
39
|
+
*
|
|
40
|
+
* @attr {string} value - Input's value
|
|
41
|
+
* @prop {string} [value=""] - Input's value
|
|
31
42
|
*/
|
|
32
|
-
let NumberField = class NumberField extends
|
|
43
|
+
let NumberField = class NumberField extends FormFieldElement {
|
|
33
44
|
constructor() {
|
|
34
45
|
super(...arguments);
|
|
35
|
-
/**
|
|
36
|
-
* Set placeholder text
|
|
37
|
-
*/
|
|
38
|
-
this.placeholder = null;
|
|
39
46
|
/**
|
|
40
47
|
* Set spinner's visibility
|
|
41
48
|
*/
|
|
@@ -54,25 +61,20 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
54
61
|
* This value must be greater than or equal to the value of the `min` attribute
|
|
55
62
|
*/
|
|
56
63
|
this.max = null;
|
|
57
|
-
/**
|
|
58
|
-
* Set state to transparent
|
|
59
|
-
*/
|
|
60
|
-
this.transparent = false;
|
|
61
|
-
/**
|
|
62
|
-
* Set state to error
|
|
63
|
-
*/
|
|
64
|
-
this.error = false;
|
|
65
|
-
/**
|
|
66
|
-
* Set state to warning
|
|
67
|
-
*/
|
|
68
|
-
this.warning = false;
|
|
69
64
|
this.interimValueState = false; // make sure that internal input field value is updated only on external value change
|
|
70
65
|
}
|
|
71
66
|
/**
|
|
72
|
-
*
|
|
67
|
+
* Element version number
|
|
68
|
+
* @returns version number
|
|
69
|
+
*/
|
|
70
|
+
static get version() {
|
|
71
|
+
return VERSION;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A `CSSResultGroup` that will be used
|
|
73
75
|
* to style the host, slotted children
|
|
74
76
|
* and the internal template of the element.
|
|
75
|
-
* @return
|
|
77
|
+
* @return CSS template
|
|
76
78
|
*/
|
|
77
79
|
static get styles() {
|
|
78
80
|
return css `
|
|
@@ -112,6 +114,7 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
112
114
|
/**
|
|
113
115
|
* The value of the number entered into the input.
|
|
114
116
|
* @param value number-field value
|
|
117
|
+
* @default -
|
|
115
118
|
*/
|
|
116
119
|
set value(value) {
|
|
117
120
|
this.interimValueState = true;
|
|
@@ -224,28 +227,14 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
224
227
|
*/
|
|
225
228
|
get internalValue() {
|
|
226
229
|
// cover the case when value getter is called before first render or in interim state
|
|
227
|
-
return this.interimValueState || !this.
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Get native input value
|
|
231
|
-
* @returns string of input value
|
|
232
|
-
*/
|
|
233
|
-
get inputValue() {
|
|
234
|
-
return this.inputEl.value;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Set native input value
|
|
238
|
-
* @param value input's value
|
|
239
|
-
*/
|
|
240
|
-
set inputValue(value) {
|
|
241
|
-
this.inputEl.value = value;
|
|
230
|
+
return this.interimValueState || !this.inputElement ? super.value : this.inputValue;
|
|
242
231
|
}
|
|
243
232
|
/**
|
|
244
233
|
* Handles key down input event
|
|
245
234
|
* @param event Key down event object
|
|
246
235
|
* @returns {void}
|
|
247
236
|
*/
|
|
248
|
-
|
|
237
|
+
onInputKeyDown(event) {
|
|
249
238
|
if (this.readonly || this.disabled || event.defaultPrevented) {
|
|
250
239
|
return;
|
|
251
240
|
}
|
|
@@ -302,7 +291,7 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
302
291
|
* @returns {void}
|
|
303
292
|
*/
|
|
304
293
|
/* istanbul ignore next */
|
|
305
|
-
|
|
294
|
+
onBeforeInputChange(event) {
|
|
306
295
|
// The event is not supported in IE11 and old browsers
|
|
307
296
|
// Therefore just try to prevent some of invalid characters to be entered
|
|
308
297
|
// but still do full validation on actual `input` and `change` events
|
|
@@ -310,7 +299,8 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
310
299
|
// cover all insert types, such as type, paste, drag&drop and others
|
|
311
300
|
if (inputType.startsWith('insert')) {
|
|
312
301
|
const data = event.data || '';
|
|
313
|
-
|
|
302
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
303
|
+
const inputEl = this.inputElement;
|
|
314
304
|
const oldInput = this.inputValue;
|
|
315
305
|
// Calculate what could be the new input
|
|
316
306
|
const selectionStart = inputEl.selectionStart || 0;
|
|
@@ -330,6 +320,22 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
330
320
|
}
|
|
331
321
|
}
|
|
332
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Runs on input element `input` event
|
|
325
|
+
* @param event `input` event
|
|
326
|
+
* @returns {void}
|
|
327
|
+
*/
|
|
328
|
+
onInputInput(event) {
|
|
329
|
+
this.onNativeInputChange(event);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Runs on input element `change` event
|
|
333
|
+
* @param event `change` event
|
|
334
|
+
* @returns {void}
|
|
335
|
+
*/
|
|
336
|
+
onInputChange(event) {
|
|
337
|
+
this.onNativeInputChange(event);
|
|
338
|
+
}
|
|
333
339
|
/**
|
|
334
340
|
* Triggers when native input value change with input event or change event
|
|
335
341
|
* @param event Input event
|
|
@@ -339,7 +345,8 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
339
345
|
const currentInput = this.inputValue;
|
|
340
346
|
const inputValue = this.stripeInvalidCharacters(currentInput, this.value, event.data || '');
|
|
341
347
|
if (inputValue !== currentInput) {
|
|
342
|
-
|
|
348
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
349
|
+
const inputEl = this.inputElement;
|
|
343
350
|
// we can only stripe the characters, so try to make the best guess where the cursor should be
|
|
344
351
|
const selectionStart = inputEl.selectionStart || 0;
|
|
345
352
|
const selectionEnd = inputEl.selectionEnd || 0;
|
|
@@ -599,13 +606,61 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
599
606
|
return !hasError;
|
|
600
607
|
}
|
|
601
608
|
/**
|
|
602
|
-
*
|
|
603
|
-
* @
|
|
609
|
+
* @ignore
|
|
610
|
+
* @inheritDoc
|
|
604
611
|
*/
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
612
|
+
/* istanbul ignore next */
|
|
613
|
+
get selectionStart() {
|
|
614
|
+
return null;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* @ignore
|
|
618
|
+
* @inheritDoc
|
|
619
|
+
*/
|
|
620
|
+
/* istanbul ignore next */
|
|
621
|
+
set selectionStart(index) {
|
|
622
|
+
throw new Error('Failed to set the \'selectionStart\' property on \'NumberField\': The element does not support selection.');
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* @ignore
|
|
626
|
+
* @inheritDoc
|
|
627
|
+
*/
|
|
628
|
+
/* istanbul ignore next */
|
|
629
|
+
get selectionEnd() {
|
|
630
|
+
return null;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* @ignore
|
|
634
|
+
* @inheritDoc
|
|
635
|
+
*/
|
|
636
|
+
/* istanbul ignore next */
|
|
637
|
+
set selectionEnd(index) {
|
|
638
|
+
throw new Error('Failed to set the \'selectionEnd\' property on \'NumberField\': The element does not support selection.');
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* @ignore
|
|
642
|
+
* @inheritDoc
|
|
643
|
+
*/
|
|
644
|
+
/* istanbul ignore next */
|
|
645
|
+
get selectionDirection() {
|
|
646
|
+
return null;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* @ignore
|
|
650
|
+
* @inheritDoc
|
|
651
|
+
*/
|
|
652
|
+
/* istanbul ignore next */
|
|
653
|
+
set selectionDirection(direction) {
|
|
654
|
+
throw new Error('Failed to set the \'selectionDirection\' property on \'NumberField\': The element does not support selection.');
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* @ignore
|
|
658
|
+
* @inheritDoc
|
|
659
|
+
*/
|
|
660
|
+
/* istanbul ignore next */
|
|
661
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
662
|
+
setSelectionRange(startSelection, endSelection, selectionDirection) {
|
|
663
|
+
throw new Error('Failed to execute \'setSelectionRange\' on \'NumberField\': The element does not support selection.');
|
|
609
664
|
}
|
|
610
665
|
/**
|
|
611
666
|
* Renders spinner
|
|
@@ -631,6 +686,21 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
631
686
|
</div>
|
|
632
687
|
`;
|
|
633
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* Decorate `<input>` element with common properties extended from form field element:
|
|
691
|
+
* type="text" - always `text`
|
|
692
|
+
* part="input" - always "input", used for styling
|
|
693
|
+
* inputmode="decimal" - show decimals keyboard by default
|
|
694
|
+
* pattern="'^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$'" - numbers only
|
|
695
|
+
* role="spinbutton" - number field is actually a spinner
|
|
696
|
+
* aria-valuenow - current value or 0
|
|
697
|
+
* @keydown - Listener for `keydown` event. Runs `this.onInputKeyDown`
|
|
698
|
+
* @beforeinput - Listener for `beforeinput` event. Runs `this.onBeforeInputChange`
|
|
699
|
+
* @returns template map
|
|
700
|
+
*/
|
|
701
|
+
get decorateInputMap() {
|
|
702
|
+
return Object.assign(Object.assign({}, super.decorateInputMap), { 'type': 'text', 'part': 'input', 'inputmode': 'decimal', 'pattern': NUMBER_PATTERN, 'role': 'spinbutton', 'aria-valuenow': `${this.value || 0}`, '@keydown': this.onInputKeyDown, '@beforeinput': this.onBeforeInputChange });
|
|
703
|
+
}
|
|
634
704
|
/**
|
|
635
705
|
* A `TemplateResult` that will be used
|
|
636
706
|
* to render the updated internal template.
|
|
@@ -638,26 +708,10 @@ let NumberField = class NumberField extends ControlElement {
|
|
|
638
708
|
*/
|
|
639
709
|
render() {
|
|
640
710
|
return html `
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
type="text"
|
|
644
|
-
inputmode="decimal"
|
|
645
|
-
pattern="${NUMBER_PATTERN}"
|
|
646
|
-
?readonly=${this.readonly}
|
|
647
|
-
placeholder=${ifDefined(this.placeholder ? this.placeholder : undefined)}
|
|
648
|
-
@input="${this.onNativeInputChange}"
|
|
649
|
-
@keydown="${this.onNativeInputKeyDown}"
|
|
650
|
-
@beforeinput="${this.onNativeBeforeInputChange}"
|
|
651
|
-
@change="${this.onNativeInputChange}"
|
|
652
|
-
autocomplete="off"
|
|
653
|
-
>
|
|
654
|
-
${this.noSpinner ? null : this.renderSpinner()}
|
|
655
|
-
`;
|
|
711
|
+
${super.render()}
|
|
712
|
+
${this.noSpinner ? null : this.renderSpinner()}`;
|
|
656
713
|
}
|
|
657
714
|
};
|
|
658
|
-
__decorate([
|
|
659
|
-
property({ type: String, reflect: true })
|
|
660
|
-
], NumberField.prototype, "placeholder", void 0);
|
|
661
715
|
__decorate([
|
|
662
716
|
property({ type: Boolean, attribute: 'no-spinner', reflect: true })
|
|
663
717
|
], NumberField.prototype, "noSpinner", void 0);
|
|
@@ -670,21 +724,9 @@ __decorate([
|
|
|
670
724
|
__decorate([
|
|
671
725
|
property({ type: String, reflect: true })
|
|
672
726
|
], NumberField.prototype, "max", void 0);
|
|
673
|
-
__decorate([
|
|
674
|
-
property({ type: Boolean, reflect: true })
|
|
675
|
-
], NumberField.prototype, "transparent", void 0);
|
|
676
|
-
__decorate([
|
|
677
|
-
property({ type: Boolean, reflect: true })
|
|
678
|
-
], NumberField.prototype, "error", void 0);
|
|
679
|
-
__decorate([
|
|
680
|
-
property({ type: Boolean, reflect: true })
|
|
681
|
-
], NumberField.prototype, "warning", void 0);
|
|
682
727
|
__decorate([
|
|
683
728
|
property({ type: String })
|
|
684
729
|
], NumberField.prototype, "value", null);
|
|
685
|
-
__decorate([
|
|
686
|
-
query('[part=input]')
|
|
687
|
-
], NumberField.prototype, "inputEl", void 0);
|
|
688
730
|
__decorate([
|
|
689
731
|
query('[part=spinner-up]')
|
|
690
732
|
], NumberField.prototype, "spinnerUpEl", void 0);
|
|
@@ -697,4 +739,3 @@ NumberField = __decorate([
|
|
|
697
739
|
})
|
|
698
740
|
], NumberField);
|
|
699
741
|
export { NumberField };
|
|
700
|
-
//# 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-number-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;color:#ccc}:host([disabled]){border:1px solid rgba(64,64,64,.5);color:rgba(204,204,204,.5);background-color:rgba(13,13,13,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #ffc800}:host([warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(127,100,0,.5)}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(160,28,43,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#ccc;min-width:1em;padding-left:2px}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:grey;color:#fff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#6678ff}:host([warning]:hover:not([readonly]):not([focused])){color:#fff;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#fff;border-color:#faa8b1}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(250,168,177,.5)}:host([readonly]:not([focused])){border-color:rgba(64,64,64,.5);background-color:rgba(13,13,13,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(204,204,204,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#fff}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#6678ff}:host [part=input]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}:host [part=spinner-down],:host [part=spinner-up]{line-height:0;min-width:22px;color:#ccc}:host [part=spinner]{height:100%;margin-left:8px;border-left:inherit;border-color:inherit}:host(:not([no-spinner])){padding:0 0 0 8px}:host([transparent]),:host([transparent]) [part=spinner]{border:none}:host(:hover:not([readonly])) [part=spinner-down],:host(:hover:not([readonly])) [part=spinner-up]{color:#6678ff}:host(:hover:not([readonly])) [part=spinner-down]:hover,:host(:hover:not([readonly])) [part=spinner-up]:hover{color:#fff;background-color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:active,:host(:hover:not([readonly])) [part=spinner-up]:active{color:#fff;background:#0f1e8a}:host(:not([transparent]):not([readonly])) [part=spinner]:hover{border-left-color:#334bff!important;border-left-style:solid!important}:host(:not([transparent]):not([readonly])) [part=spinner]:hover::after{content:\'\';border:1px solid #334bff;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;pointer-events:none}:host([focused]) [part=spinner-down],:host([focused]) [part=spinner-up]{color:#6678ff}:host([disabled]) [part=spinner-down],:host([disabled]) [part=spinner-up],:host([readonly]:not([focused])) [part=spinner-down],:host([readonly]:not([focused])) [part=spinner-up]{color:rgba(204,204,204,.5)}:host([disabled][error]) [part=spinner],:host([readonly]:not([focused])[error]) [part=spinner]{border-color:rgba(250,168,177,.5)}:host([disabled][warning]) [part=spinner],:host([readonly]:not([focused])[warning]) [part=spinner]{border-color:rgba(255,233,153,.5)}');
|
|
3
|
+
elf.customStyles.define('ef-number-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;color:#ccc}:host([disabled]){border:1px solid rgba(64,64,64,.5);color:rgba(204,204,204,.5);background-color:rgba(13,13,13,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #ffc800}:host([warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(127,100,0,.5)}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(160,28,43,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#ccc;min-width:1em;padding-left:2px}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:grey;color:#fff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#6678ff}:host([warning]:hover:not([readonly]):not([focused])){color:#fff;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#fff;border-color:#faa8b1}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(250,168,177,.5)}:host([readonly]:not([focused])){border-color:rgba(64,64,64,.5);background-color:rgba(13,13,13,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(204,204,204,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#fff}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#6678ff}:host [part=input]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}:host [part=spinner-down],:host [part=spinner-up]{line-height:0;min-width:22px;color:#ccc}:host [part=spinner]{height:100%;margin-left:8px;border-left:inherit;border-color:inherit}:host(:not([no-spinner])){padding:0 0 0 8px}:host([transparent]),:host([transparent]) [part=spinner]{border:none}:host(:hover:not([readonly])) [part=spinner-down],:host(:hover:not([readonly])) [part=spinner-up]{color:#6678ff}:host(:hover:not([readonly])) [part=spinner-down]:hover,:host(:hover:not([readonly])) [part=spinner-up]:hover{color:#fff;background-color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:active,:host(:hover:not([readonly])) [part=spinner-up]:active{color:#fff;background:#0f1e8a}:host(:not([transparent]):not([readonly])) [part=spinner]:hover{border-left-color:#334bff!important;border-left-style:solid!important}:host(:not([transparent]):not([readonly])) [part=spinner]:hover::after{content:\'\';border:1px solid #334bff;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;pointer-events:none}:host([focused]) [part=spinner-down],:host([focused]) [part=spinner-up]{color:#6678ff}:host([disabled]) [part=spinner-down],:host([disabled]) [part=spinner-up],:host([readonly]:not([focused])) [part=spinner-down],:host([readonly]:not([focused])) [part=spinner-up]{color:rgba(204,204,204,.5)}:host([disabled][error]) [part=spinner],:host([readonly]:not([focused])[error]) [part=spinner]{border-color:rgba(250,168,177,.5)}:host([disabled][warning]) [part=spinner],:host([readonly]:not([focused])[warning]) [part=spinner]{border-color:rgba(255,233,153,.5)}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/lib/icon/themes/halo/light';
|
|
2
2
|
|
|
3
|
-
elf.customStyles.define('ef-number-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;color:#404040}:host([disabled]){border:1px solid rgba(89,89,89,.5);color:rgba(64,64,64,.5);background-color:rgba(255,255,255,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #cca000}:host([warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(204,160,0,.5)}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(182,50,67,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#404040;min-width:1em;padding-left:2px}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:#0d0d0d;color:#0d0d0d}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#334bff}:host([warning]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#eeacb4}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(238,172,180,.5)}:host([readonly]:not([focused])){border-color:rgba(89,89,89,.5);background-color:rgba(255,255,255,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(64,64,64,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#0d0d0d}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#334bff}:host [part=input]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}:host [part=spinner-down],:host [part=spinner-up]{line-height:0;min-width:22px;color:#404040}:host [part=spinner]{height:100%;margin-left:8px;border-left:inherit;border-color:inherit}:host(:not([no-spinner])){padding:0 0 0 8px}:host([transparent]),:host([transparent]) [part=spinner]{border:none}:host(:hover:not([readonly])) [part=spinner-down],:host(:hover:not([readonly])) [part=spinner-up]{color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:hover,:host(:hover:not([readonly])) [part=spinner-up]:hover{color:#fff;background-color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:active,:host(:hover:not([readonly])) [part=spinner-up]:active{color:#fff;background:#0f1e8a}:host(:not([transparent]):not([readonly])) [part=spinner]:hover{border-left-color:#334bff!important;border-left-style:solid!important}:host(:not([transparent]):not([readonly])) [part=spinner]:hover::after{content:\'\';border:1px solid #334bff;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;pointer-events:none}:host([focused]) [part=spinner-down],:host([focused]) [part=spinner-up]{color:#334bff}:host([disabled]) [part=spinner-down],:host([disabled]) [part=spinner-up],:host([readonly]:not([focused])) [part=spinner-down],:host([readonly]:not([focused])) [part=spinner-up]{color:rgba(64,64,64,.5)}:host([disabled][error]) [part=spinner],:host([readonly]:not([focused])[error]) [part=spinner]{border-color:rgba(238,172,180,.5)}:host([disabled][warning]) [part=spinner],:host([readonly]:not([focused])[warning]) [part=spinner]{border-color:rgba(255,233,153,.5)}');
|
|
3
|
+
elf.customStyles.define('ef-number-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;width:152px;max-width:100%;padding:0 8px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;color:#404040}:host([disabled]){border:1px solid rgba(89,89,89,.5);color:rgba(64,64,64,.5);background-color:rgba(255,255,255,.5)}:host([type=number]){padding-right:0}:host([warning]){border:1px solid #cca000}:host([warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(204,160,0,.5)}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(182,50,67,.5)}:host ::-ms-clear{display:none}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#404040;min-width:1em;padding-left:2px}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host ::-moz-selection{color:#fff;background-color:#334bff}:host ::selection{color:#fff;background-color:#334bff}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover){border-color:#0d0d0d;color:#0d0d0d}:host(:not([readonly]):not([error]):not([warning]):not([focused]):hover) [part=icon]{color:#334bff}:host([warning]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#ffe999}:host([warning][disabled]),:host([warning][readonly]:not([focused])){border-color:rgba(255,233,153,.5)}:host([error]:hover:not([readonly]):not([focused])){color:#0d0d0d;border-color:#eeacb4}:host([error][disabled]),:host([error][readonly]:not([focused])),:host([error][warning][disabled]){border-color:rgba(238,172,180,.5)}:host([readonly]:not([focused])){border-color:rgba(89,89,89,.5);background-color:rgba(255,255,255,.5)}:host([readonly]:not([focused])) [part=icon]{color:rgba(64,64,64,.5)}:host([focused]),:host([focused][error][warning]){border-color:#334bff;color:#0d0d0d}:host([focused]) [part=icon],:host([focused][error][warning]) [part=icon]{color:#334bff}:host [part=input]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}:host [part=spinner-down],:host [part=spinner-up]{line-height:0;min-width:22px;color:#404040}:host [part=spinner]{height:100%;margin-left:8px;border-left:inherit;border-color:inherit}:host(:not([no-spinner])){padding:0 0 0 8px}:host([transparent]),:host([transparent]) [part=spinner]{border:none}:host(:hover:not([readonly])) [part=spinner-down],:host(:hover:not([readonly])) [part=spinner-up]{color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:hover,:host(:hover:not([readonly])) [part=spinner-up]:hover{color:#fff;background-color:#334bff}:host(:hover:not([readonly])) [part=spinner-down]:active,:host(:hover:not([readonly])) [part=spinner-up]:active{color:#fff;background:#0f1e8a}:host(:not([transparent]):not([readonly])) [part=spinner]:hover{border-left-color:#334bff!important;border-left-style:solid!important}:host(:not([transparent]):not([readonly])) [part=spinner]:hover::after{content:\'\';border:1px solid #334bff;position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;pointer-events:none}:host([focused]) [part=spinner-down],:host([focused]) [part=spinner-up]{color:#334bff}:host([disabled]) [part=spinner-down],:host([disabled]) [part=spinner-up],:host([readonly]:not([focused])) [part=spinner-down],:host([readonly]:not([focused])) [part=spinner-up]{color:rgba(64,64,64,.5)}:host([disabled][error]) [part=spinner],:host([readonly]:not([focused])[error]) [part=spinner]{border-color:rgba(238,172,180,.5)}:host([disabled][warning]) [part=spinner],:host([readonly]:not([focused])[warning]) [part=spinner]{border-color:rgba(255,233,153,.5)}');
|