igniteui-webcomponents 6.0.1 → 6.1.1-alpha.0
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 +32 -0
- package/components/accordion/accordion.js +3 -3
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.d.ts +8 -10
- package/components/avatar/avatar.js +26 -26
- package/components/avatar/avatar.js.map +1 -1
- package/components/badge/badge.d.ts +3 -4
- package/components/badge/badge.js +13 -13
- package/components/badge/badge.js.map +1 -1
- package/components/banner/banner.d.ts +2 -3
- package/components/banner/banner.js +8 -4
- package/components/banner/banner.js.map +1 -1
- package/components/button/button-base.d.ts +8 -16
- package/components/button/button-base.js +27 -42
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +2 -2
- package/components/button/icon-button.js +1 -1
- package/components/button/icon-button.js.map +1 -1
- package/components/button/themes/button/light/button.shared.css.js +1 -1
- package/components/button/themes/button/light/button.shared.css.js.map +1 -1
- package/components/button-group/button-group.js +2 -2
- package/components/button-group/button-group.js.map +1 -1
- package/components/button-group/toggle-button.d.ts +2 -8
- package/components/button-group/toggle-button.js +8 -12
- package/components/button-group/toggle-button.js.map +1 -1
- package/components/calendar/calendar.d.ts +1 -1
- package/components/calendar/calendar.js +13 -10
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +1 -1
- package/components/calendar/days-view/days-view.js +10 -11
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +12 -1
- package/components/calendar/helpers.js +35 -10
- package/components/calendar/helpers.js.map +1 -1
- package/components/calendar/model.d.ts +15 -1
- package/components/calendar/model.js +26 -5
- package/components/calendar/model.js.map +1 -1
- package/components/calendar/months-view/months-view.d.ts +1 -1
- package/components/calendar/months-view/months-view.js +10 -10
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/years-view/years-view.d.ts +1 -1
- package/components/calendar/years-view/years-view.js +10 -10
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.js +1 -1
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.js +1 -1
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.header.js +1 -1
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +1 -1
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.js +1 -1
- package/components/card/card.media.js.map +1 -1
- package/components/carousel/carousel-indicator-container.d.ts +2 -2
- package/components/carousel/carousel-indicator-container.js +9 -10
- package/components/carousel/carousel-indicator-container.js.map +1 -1
- package/components/carousel/carousel-indicator.d.ts +5 -7
- package/components/carousel/carousel-indicator.js +19 -19
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.d.ts +2 -3
- package/components/carousel/carousel-slide.js +17 -11
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.d.ts +6 -8
- package/components/carousel/carousel.js +36 -28
- package/components/carousel/carousel.js.map +1 -1
- package/components/chat/chat-input.d.ts +41 -0
- package/components/chat/chat-input.js +254 -0
- package/components/chat/chat-input.js.map +1 -0
- package/components/chat/chat-message-list.d.ts +24 -0
- package/components/chat/chat-message-list.js +88 -0
- package/components/chat/chat-message-list.js.map +1 -0
- package/components/chat/chat-message.d.ts +21 -0
- package/components/chat/chat-message.js +52 -0
- package/components/chat/chat-message.js.map +1 -0
- package/components/chat/chat.d.ts +41 -0
- package/components/chat/chat.js +98 -0
- package/components/chat/chat.js.map +1 -0
- package/components/chat/markdown-util.d.ts +2 -0
- package/components/chat/markdown-util.js +22 -0
- package/components/chat/markdown-util.js.map +1 -0
- package/components/chat/message-attachments.d.ts +28 -0
- package/components/chat/message-attachments.js +168 -0
- package/components/chat/message-attachments.js.map +1 -0
- package/components/chat/themes/chat.base.css.d.ts +1 -0
- package/components/chat/themes/chat.base.css.js +3 -0
- package/components/chat/themes/chat.base.css.js.map +1 -0
- package/components/chat/themes/input.base.css.d.ts +1 -0
- package/components/chat/themes/input.base.css.js +3 -0
- package/components/chat/themes/input.base.css.js.map +1 -0
- package/components/chat/themes/message-attachments.base.css.d.ts +1 -0
- package/components/chat/themes/message-attachments.base.css.js +3 -0
- package/components/chat/themes/message-attachments.base.css.js.map +1 -0
- package/components/chat/themes/message-list.base.css.d.ts +1 -0
- package/components/chat/themes/message-list.base.css.js +3 -0
- package/components/chat/themes/message-list.base.css.js.map +1 -0
- package/components/chat/themes/message.base.css.d.ts +1 -0
- package/components/chat/themes/message.base.css.js +3 -0
- package/components/chat/themes/message.base.css.js.map +1 -0
- package/components/chat/types.d.ts +46 -0
- package/components/chat/types.js +8 -0
- package/components/chat/types.js.map +1 -0
- package/components/checkbox/checkbox-base.d.ts +8 -10
- package/components/checkbox/checkbox-base.js +20 -23
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.d.ts +3 -3
- package/components/checkbox/checkbox.js +19 -20
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.d.ts +2 -2
- package/components/checkbox/switch.js +16 -20
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/validators.js.map +1 -1
- package/components/chip/chip.js +4 -4
- package/components/chip/chip.js.map +1 -1
- package/components/combo/combo-header.js +1 -1
- package/components/combo/combo-header.js.map +1 -1
- package/components/combo/combo-item.d.ts +4 -6
- package/components/combo/combo-item.js +20 -18
- package/components/combo/combo-item.js.map +1 -1
- package/components/combo/combo.d.ts +3 -3
- package/components/combo/combo.js +25 -24
- package/components/combo/combo.js.map +1 -1
- package/components/combo/themes/combo.base.css.js +1 -1
- package/components/combo/themes/combo.base.css.js.map +1 -1
- package/components/combo/themes/shared/combo.fluent.css.js +1 -1
- package/components/combo/themes/shared/combo.fluent.css.js.map +1 -1
- package/components/common/abort-handler.d.ts +39 -0
- package/components/common/abort-handler.js +19 -0
- package/components/common/abort-handler.js.map +1 -0
- package/components/common/context.d.ts +5 -1
- package/components/common/context.js +2 -1
- package/components/common/context.js.map +1 -1
- package/components/common/controllers/drag.d.ts +3 -2
- package/components/common/controllers/drag.js +7 -6
- package/components/common/controllers/drag.js.map +1 -1
- package/components/common/controllers/focus-ring.d.ts +22 -11
- package/components/common/controllers/focus-ring.js +17 -14
- package/components/common/controllers/focus-ring.js.map +1 -1
- package/components/common/controllers/gestures.d.ts +6 -2
- package/components/common/controllers/gestures.js +15 -11
- package/components/common/controllers/gestures.js.map +1 -1
- package/components/common/controllers/internals.d.ts +33 -0
- package/components/common/controllers/internals.js +25 -0
- package/components/common/controllers/internals.js.map +1 -0
- package/components/common/controllers/key-bindings.d.ts +41 -33
- package/components/common/controllers/key-bindings.js +85 -71
- package/components/common/controllers/key-bindings.js.map +1 -1
- package/components/common/controllers/mutation-observer.d.ts +25 -15
- package/components/common/controllers/mutation-observer.js +23 -12
- package/components/common/controllers/mutation-observer.js.map +1 -1
- package/components/common/controllers/resize-observer.js.map +1 -1
- package/components/common/controllers/root-click.d.ts +58 -13
- package/components/common/controllers/root-click.js +47 -35
- package/components/common/controllers/root-click.js.map +1 -1
- package/components/common/decorators/shadow-options.d.ts +10 -0
- package/components/common/decorators/shadow-options.js +10 -0
- package/components/common/decorators/shadow-options.js.map +1 -0
- package/components/common/definitions/defineAllComponents.js +16 -12
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/i18n/date-range-picker.resources.d.ts +11 -0
- package/components/common/i18n/date-range-picker.resources.js +12 -0
- package/components/common/i18n/date-range-picker.resources.js.map +1 -0
- package/components/common/mixins/alert.d.ts +1 -2
- package/components/common/mixins/alert.js +13 -9
- package/components/common/mixins/alert.js.map +1 -1
- package/components/common/mixins/combo-box.d.ts +2 -1
- package/components/common/mixins/combo-box.js +8 -4
- package/components/common/mixins/combo-box.js.map +1 -1
- package/components/common/mixins/forms/associated.js +2 -2
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/mixins/forms/form-value.d.ts +15 -1
- package/components/common/mixins/forms/form-value.js +25 -4
- package/components/common/mixins/forms/form-value.js.map +1 -1
- package/components/common/mixins/option.d.ts +3 -3
- package/components/common/mixins/option.js +13 -11
- package/components/common/mixins/option.js.map +1 -1
- package/components/common/part-map.d.ts +17 -0
- package/components/common/part-map.js +46 -0
- package/components/common/part-map.js.map +1 -0
- package/components/common/util.d.ts +14 -6
- package/components/common/util.js +26 -23
- package/components/common/util.js.map +1 -1
- package/components/common/validators.js +3 -7
- package/components/common/validators.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +4 -9
- package/components/date-picker/date-picker.js +24 -24
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/dark/date-picker.material.css.js +1 -1
- package/components/date-picker/themes/dark/date-picker.material.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/light/date-picker.material.css.js +1 -1
- package/components/date-picker/themes/light/date-picker.material.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.bootstrap.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.bootstrap.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.fluent.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.fluent.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.indigo.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.indigo.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.material.css.d.ts +1 -0
- package/components/date-picker/themes/shared/date-picker.material.css.js +3 -0
- package/components/date-picker/themes/shared/date-picker.material.css.js.map +1 -0
- package/components/date-picker/themes/themes.js +3 -2
- package/components/date-picker/themes/themes.js.map +1 -1
- package/components/date-picker/validators.js.map +1 -1
- package/components/date-range-picker/date-range-picker.base.css.d.ts +1 -0
- package/components/date-range-picker/date-range-picker.base.css.js +3 -0
- package/components/date-range-picker/date-range-picker.base.css.js.map +1 -0
- package/components/date-range-picker/date-range-picker.d.ts +360 -0
- package/components/date-range-picker/date-range-picker.js +811 -0
- package/components/date-range-picker/date-range-picker.js.map +1 -0
- package/components/date-range-picker/predefined-ranges-area.base.css.d.ts +1 -0
- package/components/date-range-picker/predefined-ranges-area.base.css.js +3 -0
- package/components/date-range-picker/predefined-ranges-area.base.css.js.map +1 -0
- package/components/date-range-picker/predefined-ranges-area.d.ts +36 -0
- package/components/date-range-picker/predefined-ranges-area.js +115 -0
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.d.ts +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js +3 -0
- package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js.map +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.d.ts +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js +3 -0
- package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js.map +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.d.ts +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +3 -0
- package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.d.ts +1 -0
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js +3 -0
- package/components/date-range-picker/themes/dark/date-range-picker.material.css.js.map +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.d.ts +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js +3 -0
- package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js.map +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.d.ts +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js +3 -0
- package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js.map +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.d.ts +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js +3 -0
- package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js.map +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.material.css.d.ts +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js +3 -0
- package/components/date-range-picker/themes/light/date-range-picker.material.css.js.map +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.shared.css.d.ts +1 -0
- package/components/date-range-picker/themes/light/date-range-picker.shared.css.js +3 -0
- package/components/date-range-picker/themes/light/date-range-picker.shared.css.js.map +1 -0
- package/components/date-range-picker/themes/ranges-themes.d.ts +2 -0
- package/components/date-range-picker/themes/ranges-themes.js +14 -0
- package/components/date-range-picker/themes/ranges-themes.js.map +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js +3 -0
- package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.common.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.common.css.js +3 -0
- package/components/date-range-picker/themes/shared/date-range-picker.common.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js +3 -0
- package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js +3 -0
- package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.material.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/date-range-picker.material.css.js +3 -0
- package/components/date-range-picker/themes/shared/date-range-picker.material.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.common.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.common.css.js +3 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.common.css.js.map +1 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.indigo.css.d.ts +1 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.indigo.css.js +3 -0
- package/components/date-range-picker/themes/shared/predefined-ranges-area.indigo.css.js.map +1 -0
- package/components/date-range-picker/themes/themes.d.ts +2 -0
- package/components/date-range-picker/themes/themes.js +50 -0
- package/components/date-range-picker/themes/themes.js.map +1 -0
- package/components/date-range-picker/validators.d.ts +26 -0
- package/components/date-range-picker/validators.js +57 -0
- package/components/date-range-picker/validators.js.map +1 -0
- package/components/date-time-input/date-time-input.d.ts +2 -2
- package/components/date-time-input/date-time-input.js +7 -9
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/date-util.d.ts +7 -0
- package/components/date-time-input/date-util.js +11 -0
- package/components/date-time-input/date-util.js.map +1 -1
- package/components/date-time-input/validators.js.map +1 -1
- package/components/dialog/dialog.js +12 -11
- package/components/dialog/dialog.js.map +1 -1
- package/components/dialog/themes/dialog.base.css.js +1 -1
- package/components/dialog/themes/dialog.base.css.js.map +1 -1
- package/components/dialog/themes/shared/dialog.indigo.css.js +1 -1
- package/components/dialog/themes/shared/dialog.indigo.css.js.map +1 -1
- package/components/divider/divider.d.ts +5 -3
- package/components/divider/divider.js +17 -15
- package/components/divider/divider.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +0 -1
- package/components/dropdown/dropdown-group.js +7 -3
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.js +1 -1
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +2 -1
- package/components/dropdown/dropdown.js +5 -2
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/expansion-panel/expansion-panel.js +1 -1
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/file-input/file-input.d.ts +11 -5
- package/components/file-input/file-input.js +23 -19
- package/components/file-input/file-input.js.map +1 -1
- package/components/file-input/themes/file-input.base.css.js +1 -1
- package/components/file-input/themes/file-input.base.css.js.map +1 -1
- package/components/file-input/validators.js.map +1 -1
- package/components/focus-trap/focus-trap.js +4 -4
- package/components/focus-trap/focus-trap.js.map +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +7 -5
- package/components/icon/icon.js.map +1 -1
- package/components/input/input-base.d.ts +1 -8
- package/components/input/input-base.js +9 -10
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +2 -3
- package/components/input/input.js +10 -9
- package/components/input/input.js.map +1 -1
- package/components/input/themes/dark/input.bootstrap.css.js +1 -1
- package/components/input/themes/dark/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/dark/input.indigo.css.js +1 -1
- package/components/input/themes/dark/input.indigo.css.js.map +1 -1
- package/components/input/themes/light/input.bootstrap.css.js +1 -1
- package/components/input/themes/light/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/light/input.indigo.css.js +1 -1
- package/components/input/themes/light/input.indigo.css.js.map +1 -1
- package/components/input/themes/light/input.shared.css.js +1 -1
- package/components/input/themes/light/input.shared.css.js.map +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js +1 -1
- package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.common.css.js +1 -1
- package/components/input/themes/shared/input.common.css.js.map +1 -1
- package/components/input/themes/shared/input.fluent.css.js +1 -1
- package/components/input/themes/shared/input.fluent.css.js.map +1 -1
- package/components/input/themes/shared/input.indigo.css.js +1 -1
- package/components/input/themes/shared/input.indigo.css.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/input/validators.js.map +1 -1
- package/components/list/list-header.d.ts +0 -1
- package/components/list/list-header.js +5 -3
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.d.ts +0 -1
- package/components/list/list-item.js +7 -3
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.d.ts +0 -1
- package/components/list/list.js +7 -3
- package/components/list/list.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +2 -3
- package/components/mask-input/mask-input.js +13 -12
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/mask-parser.d.ts +100 -14
- package/components/mask-input/mask-parser.js +134 -117
- package/components/mask-input/mask-parser.js.map +1 -1
- package/components/mask-input/validators.js.map +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.js +3 -7
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.js +6 -7
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/navbar/navbar.js +1 -1
- package/components/navbar/navbar.js.map +1 -1
- package/components/popover/popover.js +1 -1
- package/components/popover/popover.js.map +1 -1
- package/components/progress/base.d.ts +1 -2
- package/components/progress/base.js +34 -31
- package/components/progress/base.js.map +1 -1
- package/components/progress/circular-progress.js +7 -15
- package/components/progress/circular-progress.js.map +1 -1
- package/components/progress/linear-progress.js +5 -5
- package/components/progress/linear-progress.js.map +1 -1
- package/components/radio/radio.d.ts +11 -12
- package/components/radio/radio.js +40 -45
- package/components/radio/radio.js.map +1 -1
- package/components/radio/utils.js +6 -3
- package/components/radio/utils.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +1 -1
- package/components/radio-group/radio-group.js +9 -8
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating-symbol.js +1 -1
- package/components/rating/rating-symbol.js.map +1 -1
- package/components/rating/rating.d.ts +2 -2
- package/components/rating/rating.js +5 -5
- package/components/rating/rating.js.map +1 -1
- package/components/resize-container/resize-container.js +5 -5
- package/components/resize-container/resize-container.js.map +1 -1
- package/components/resize-container/resize-controller.d.ts +3 -2
- package/components/resize-container/resize-controller.js +6 -4
- package/components/resize-container/resize-controller.js.map +1 -1
- package/components/ripple/ripple.js +3 -2
- package/components/ripple/ripple.js.map +1 -1
- package/components/select/select-group.d.ts +1 -1
- package/components/select/select-group.js +9 -5
- package/components/select/select-group.js.map +1 -1
- package/components/select/select-header.js +1 -1
- package/components/select/select-header.js.map +1 -1
- package/components/select/select.d.ts +3 -2
- package/components/select/select.js +19 -15
- package/components/select/select.js.map +1 -1
- package/components/select/themes/shared/select.fluent.css.js +1 -1
- package/components/select/themes/shared/select.fluent.css.js.map +1 -1
- package/components/select/validators.js.map +1 -1
- package/components/slider/range-slider.js +1 -1
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.js +7 -7
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider-label.js +1 -1
- package/components/slider/slider-label.js.map +1 -1
- package/components/slider/slider.d.ts +2 -3
- package/components/slider/slider.js +7 -7
- package/components/slider/slider.js.map +1 -1
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/stepper/step.js +4 -4
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.js +1 -1
- package/components/stepper/stepper.js.map +1 -1
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tab.js.map +1 -1
- package/components/tabs/tabs.js +12 -10
- package/components/tabs/tabs.js.map +1 -1
- package/components/textarea/textarea.d.ts +3 -9
- package/components/textarea/textarea.js +13 -14
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/dark/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/dark/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/dark/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/dark/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/light/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/light/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/light/textarea.shared.css.js +1 -1
- package/components/textarea/themes/light/textarea.shared.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
- package/components/textarea/themes/textarea.base.css.js +1 -1
- package/components/textarea/themes/textarea.base.css.js.map +1 -1
- package/components/textarea/validators.js.map +1 -1
- package/components/tile-manager/position.d.ts +1 -1
- package/components/tile-manager/position.js.map +1 -1
- package/components/tile-manager/themes/container.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +0 -1
- package/components/tile-manager/tile-manager.js +9 -10
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.js +7 -6
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tooltip/controller.d.ts +2 -4
- package/components/tooltip/controller.js +11 -20
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/themes/themes.js +1 -1
- package/components/tooltip/themes/themes.js.map +1 -1
- package/components/tooltip/tooltip.d.ts +24 -10
- package/components/tooltip/tooltip.js +56 -49
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.d.ts +1 -0
- package/components/tree/tree-item.js +28 -26
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.d.ts +1 -1
- package/components/tree/tree.js +4 -3
- package/components/tree/tree.js.map +1 -1
- package/components/tree/tree.navigation.d.ts +1 -1
- package/components/tree/tree.navigation.js.map +1 -1
- package/components/tree/tree.selection.d.ts +1 -1
- package/components/tree/tree.selection.js.map +1 -1
- package/components/validation-container/themes/themes.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +1 -1
- package/components/validation-container/validation-container.js +5 -12
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +31449 -26970
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +11 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/theming/theming-controller.d.ts +1 -1
- package/theming/theming-controller.js +1 -1
- package/theming/theming-controller.js.map +1 -1
- package/web-types.json +2 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
import { styles as indigo } from './shared/tooltip.indigo.css.js';
|
|
3
2
|
import { styles as bootstrapDark } from './dark/tooltip.bootstrap.css.js';
|
|
4
3
|
import { styles as fluentDark } from './dark/tooltip.fluent.css.js';
|
|
5
4
|
import { styles as indigoDark } from './dark/tooltip.indigo.css.js';
|
|
@@ -9,6 +8,7 @@ import { styles as fluentLight } from './light/tooltip.fluent.css.js';
|
|
|
9
8
|
import { styles as indigoLight } from './light/tooltip.indigo.css.js';
|
|
10
9
|
import { styles as materialLight } from './light/tooltip.material.css.js';
|
|
11
10
|
import { styles as shared } from './light/tooltip.shared.css.js';
|
|
11
|
+
import { styles as indigo } from './shared/tooltip.indigo.css.js';
|
|
12
12
|
const light = {
|
|
13
13
|
shared: css `
|
|
14
14
|
${shared}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../src/components/tooltip/themes/themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../src/components/tooltip/themes/themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,GAAG,CAAA;MACP,MAAM;GACT;IACD,SAAS,EAAE,GAAG,CAAA;MACV,cAAc;GACjB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,aAAa;GAChB;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,MAAM,EAAE,GAAG,CAAA;MACP,MAAM,IAAI,WAAW;GACxB;CACF,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,GAAG,CAAA;MACP,MAAM;GACT;IACD,SAAS,EAAE,GAAG,CAAA;MACV,aAAa;GAChB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,YAAY;GACf;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,MAAM,EAAE,GAAG,CAAA;MACP,MAAM,IAAI,UAAU;GACvB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nimport type { Themes } from '../../../theming/types.js';\n// Dark Overrides\nimport { styles as bootstrapDark } from './dark/tooltip.bootstrap.css.js';\nimport { styles as fluentDark } from './dark/tooltip.fluent.css.js';\nimport { styles as indigoDark } from './dark/tooltip.indigo.css.js';\nimport { styles as materialDark } from './dark/tooltip.material.css.js';\n// Light Overrides\nimport { styles as bootstrapLight } from './light/tooltip.bootstrap.css.js';\nimport { styles as fluentLight } from './light/tooltip.fluent.css.js';\nimport { styles as indigoLight } from './light/tooltip.indigo.css.js';\nimport { styles as materialLight } from './light/tooltip.material.css.js';\nimport { styles as shared } from './light/tooltip.shared.css.js';\nimport { styles as indigo } from './shared/tooltip.indigo.css.js';\n\nconst light = {\n shared: css`\n ${shared}\n `,\n bootstrap: css`\n ${bootstrapLight}\n `,\n material: css`\n ${materialLight}\n `,\n fluent: css`\n ${fluentLight}\n `,\n indigo: css`\n ${indigo} ${indigoLight}\n `,\n};\n\nconst dark = {\n shared: css`\n ${shared}\n `,\n bootstrap: css`\n ${bootstrapDark}\n `,\n material: css`\n ${materialDark}\n `,\n fluent: css`\n ${fluentDark}\n `,\n indigo: css`\n ${indigo} ${indigoDark}\n `,\n};\n\nexport const all: Themes = { light, dark };\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
import type { Constructor } from '../common/mixins/constructor.js';
|
|
3
3
|
import { type PopoverPlacement } from '../popover/popover.js';
|
|
4
4
|
export interface IgcTooltipComponentEventMap {
|
|
5
|
-
igcOpening: CustomEvent<
|
|
6
|
-
igcOpened: CustomEvent<
|
|
7
|
-
igcClosing: CustomEvent<
|
|
8
|
-
igcClosed: CustomEvent<
|
|
5
|
+
igcOpening: CustomEvent<void>;
|
|
6
|
+
igcOpened: CustomEvent<void>;
|
|
7
|
+
igcClosing: CustomEvent<void>;
|
|
8
|
+
igcClosed: CustomEvent<void>;
|
|
9
9
|
}
|
|
10
10
|
declare const IgcTooltipComponent_base: Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcTooltipComponentEventMap>> & Constructor<LitElement>;
|
|
11
11
|
/**
|
|
@@ -51,10 +51,22 @@ export default class IgcTooltipComponent extends IgcTooltipComponent_base {
|
|
|
51
51
|
/**
|
|
52
52
|
* Whether to disable the rendering of the arrow indicator for the tooltip.
|
|
53
53
|
*
|
|
54
|
+
* @deprecated since 6.1.0. Use `with-arrow` to control the behavior of the tooltip arrow.
|
|
54
55
|
* @attr disable-arrow
|
|
55
56
|
* @default false
|
|
56
57
|
*/
|
|
57
|
-
disableArrow: boolean;
|
|
58
|
+
set disableArrow(value: boolean);
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated since 6.1.0. Use `with-arrow` to control the behavior of the tooltip arrow.
|
|
61
|
+
*/
|
|
62
|
+
get disableArrow(): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to render an arrow indicator for the tooltip.
|
|
65
|
+
*
|
|
66
|
+
* @attr with-arrow
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
withArrow: boolean;
|
|
58
70
|
/**
|
|
59
71
|
* The offset of the tooltip from the anchor in pixels.
|
|
60
72
|
*
|
|
@@ -66,12 +78,16 @@ export default class IgcTooltipComponent extends IgcTooltipComponent_base {
|
|
|
66
78
|
* Where to place the floating element relative to the parent anchor element.
|
|
67
79
|
*
|
|
68
80
|
* @attr placement
|
|
69
|
-
* @default
|
|
81
|
+
* @default bottom
|
|
70
82
|
*/
|
|
71
83
|
placement: PopoverPlacement;
|
|
72
84
|
/**
|
|
73
85
|
* An element instance or an IDREF to use as the anchor for the tooltip.
|
|
74
86
|
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Trying to bind to an IDREF that does not exist in the current DOM root at will not work.
|
|
89
|
+
* In such scenarios, it is better to get a DOM reference and pass it to the tooltip instance.
|
|
90
|
+
*
|
|
75
91
|
* @attr anchor
|
|
76
92
|
*/
|
|
77
93
|
anchor?: Element | string;
|
|
@@ -122,10 +138,8 @@ export default class IgcTooltipComponent extends IgcTooltipComponent_base {
|
|
|
122
138
|
* @default false
|
|
123
139
|
*/
|
|
124
140
|
sticky: boolean;
|
|
125
|
-
constructor();
|
|
126
141
|
protected firstUpdated(): void;
|
|
127
|
-
protected
|
|
128
|
-
protected _onStickyChange(): void;
|
|
142
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
129
143
|
private _emitEvent;
|
|
130
144
|
private _applyTooltipState;
|
|
131
145
|
/**
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var IgcTooltipComponent_1;
|
|
8
|
-
import {
|
|
8
|
+
import { html, LitElement, nothing } from 'lit';
|
|
9
9
|
import { property, query } from 'lit/decorators.js';
|
|
10
10
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
11
|
import { EaseOut } from '../../animations/easings.js';
|
|
@@ -13,17 +13,50 @@ import { addAnimationController } from '../../animations/player.js';
|
|
|
13
13
|
import { fadeOut } from '../../animations/presets/fade/index.js';
|
|
14
14
|
import { scaleInCenter } from '../../animations/presets/scale/index.js';
|
|
15
15
|
import { themes } from '../../theming/theming-decorator.js';
|
|
16
|
-
import {
|
|
16
|
+
import { addInternalsController } from '../common/controllers/internals.js';
|
|
17
17
|
import { registerComponent } from '../common/definitions/register.js';
|
|
18
18
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
19
19
|
import { asNumber, isLTR } from '../common/util.js';
|
|
20
20
|
import IgcIconComponent from '../icon/icon.js';
|
|
21
21
|
import IgcPopoverComponent from '../popover/popover.js';
|
|
22
|
-
import {
|
|
22
|
+
import { addTooltipController, TooltipRegexes } from './controller.js';
|
|
23
23
|
import { styles as shared } from './themes/shared/tooltip.common.css.js';
|
|
24
24
|
import { all } from './themes/themes.js';
|
|
25
25
|
import { styles } from './themes/tooltip.base.css.js';
|
|
26
26
|
let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent extends EventEmitterMixin(LitElement) {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this._internals = addInternalsController(this, {
|
|
30
|
+
initialARIA: {
|
|
31
|
+
role: 'tooltip',
|
|
32
|
+
ariaAtomic: 'true',
|
|
33
|
+
ariaLive: 'polite',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
this._controller = addTooltipController(this, {
|
|
37
|
+
onShow: this._showOnInteraction,
|
|
38
|
+
onHide: this._hideOnInteraction,
|
|
39
|
+
onEscape: this._hideOnEscape,
|
|
40
|
+
});
|
|
41
|
+
this._containerRef = createRef();
|
|
42
|
+
this._player = addAnimationController(this, this._containerRef);
|
|
43
|
+
this._showAnimation = scaleInCenter({
|
|
44
|
+
duration: 150,
|
|
45
|
+
easing: EaseOut.Quad,
|
|
46
|
+
});
|
|
47
|
+
this._hideAnimation = fadeOut({
|
|
48
|
+
duration: 75,
|
|
49
|
+
easing: EaseOut.Sine,
|
|
50
|
+
});
|
|
51
|
+
this._autoHideDelay = 180;
|
|
52
|
+
this._showDelay = 200;
|
|
53
|
+
this._hideDelay = 300;
|
|
54
|
+
this.withArrow = false;
|
|
55
|
+
this.offset = 6;
|
|
56
|
+
this.placement = 'bottom';
|
|
57
|
+
this.message = '';
|
|
58
|
+
this.sticky = false;
|
|
59
|
+
}
|
|
27
60
|
static register() {
|
|
28
61
|
registerComponent(IgcTooltipComponent_1, IgcPopoverComponent, IgcIconComponent);
|
|
29
62
|
}
|
|
@@ -50,6 +83,12 @@ let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent exte
|
|
|
50
83
|
get open() {
|
|
51
84
|
return this._controller.open;
|
|
52
85
|
}
|
|
86
|
+
set disableArrow(value) {
|
|
87
|
+
this.withArrow = !value;
|
|
88
|
+
}
|
|
89
|
+
get disableArrow() {
|
|
90
|
+
return !this.withArrow;
|
|
91
|
+
}
|
|
53
92
|
set showTriggers(value) {
|
|
54
93
|
this._controller.showTriggers = value;
|
|
55
94
|
}
|
|
@@ -74,36 +113,6 @@ let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent exte
|
|
|
74
113
|
get hideDelay() {
|
|
75
114
|
return this._hideDelay;
|
|
76
115
|
}
|
|
77
|
-
constructor() {
|
|
78
|
-
super();
|
|
79
|
-
this._controller = addTooltipController(this, {
|
|
80
|
-
onShow: this._showOnInteraction,
|
|
81
|
-
onHide: this._hideOnInteraction,
|
|
82
|
-
onEscape: this._hideOnEscape,
|
|
83
|
-
});
|
|
84
|
-
this._containerRef = createRef();
|
|
85
|
-
this._player = addAnimationController(this, this._containerRef);
|
|
86
|
-
this._showAnimation = scaleInCenter({
|
|
87
|
-
duration: 150,
|
|
88
|
-
easing: EaseOut.Quad,
|
|
89
|
-
});
|
|
90
|
-
this._hideAnimation = fadeOut({
|
|
91
|
-
duration: 75,
|
|
92
|
-
easing: EaseOut.Sine,
|
|
93
|
-
});
|
|
94
|
-
this._autoHideDelay = 180;
|
|
95
|
-
this._showDelay = 200;
|
|
96
|
-
this._hideDelay = 300;
|
|
97
|
-
this.disableArrow = false;
|
|
98
|
-
this.offset = 6;
|
|
99
|
-
this.placement = 'top';
|
|
100
|
-
this.message = '';
|
|
101
|
-
this.sticky = false;
|
|
102
|
-
this._internals = this.attachInternals();
|
|
103
|
-
this._internals.role = 'tooltip';
|
|
104
|
-
this._internals.ariaAtomic = 'true';
|
|
105
|
-
this._internals.ariaLive = 'polite';
|
|
106
|
-
}
|
|
107
116
|
firstUpdated() {
|
|
108
117
|
if (this.open) {
|
|
109
118
|
this.updateComplete.then(() => {
|
|
@@ -112,16 +121,17 @@ let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent exte
|
|
|
112
121
|
});
|
|
113
122
|
}
|
|
114
123
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
willUpdate(changedProperties) {
|
|
125
|
+
if (changedProperties.has('anchor')) {
|
|
126
|
+
this._controller.resolveAnchor(this.anchor);
|
|
127
|
+
}
|
|
128
|
+
if (changedProperties.has('sticky')) {
|
|
129
|
+
this._internals.setARIA({ role: this.sticky ? 'status' : 'tooltip' });
|
|
130
|
+
}
|
|
120
131
|
}
|
|
121
132
|
_emitEvent(name) {
|
|
122
133
|
return this.emitEvent(name, {
|
|
123
134
|
cancelable: name === 'igcOpening' || name === 'igcClosing',
|
|
124
|
-
detail: this._controller.anchor,
|
|
125
135
|
});
|
|
126
136
|
}
|
|
127
137
|
async _applyTooltipState({ show, withDelay = false, withEvents = false, }) {
|
|
@@ -207,7 +217,7 @@ let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent exte
|
|
|
207
217
|
.placement=${this.placement}
|
|
208
218
|
.offset=${this.offset}
|
|
209
219
|
.anchor=${this._controller.anchor ?? undefined}
|
|
210
|
-
.arrow=${this.
|
|
220
|
+
.arrow=${this.withArrow ? this._arrowElement : null}
|
|
211
221
|
.arrowOffset=${this._arrowOffset}
|
|
212
222
|
.shiftPadding=${8}
|
|
213
223
|
?open=${this.open}
|
|
@@ -227,7 +237,7 @@ let IgcTooltipComponent = IgcTooltipComponent_1 = class IgcTooltipComponent exte
|
|
|
227
237
|
</slot>
|
|
228
238
|
`
|
|
229
239
|
: nothing}
|
|
230
|
-
${this.
|
|
240
|
+
${this.withArrow ? html `<div id="arrow"></div>` : nothing}
|
|
231
241
|
</div>
|
|
232
242
|
</igc-popover>
|
|
233
243
|
`;
|
|
@@ -242,8 +252,11 @@ __decorate([
|
|
|
242
252
|
property({ type: Boolean, reflect: true })
|
|
243
253
|
], IgcTooltipComponent.prototype, "open", null);
|
|
244
254
|
__decorate([
|
|
245
|
-
property({ attribute: 'disable-arrow'
|
|
246
|
-
], IgcTooltipComponent.prototype, "disableArrow",
|
|
255
|
+
property({ type: Boolean, attribute: 'disable-arrow' })
|
|
256
|
+
], IgcTooltipComponent.prototype, "disableArrow", null);
|
|
257
|
+
__decorate([
|
|
258
|
+
property({ type: Boolean, reflect: true, attribute: 'with-arrow' })
|
|
259
|
+
], IgcTooltipComponent.prototype, "withArrow", void 0);
|
|
247
260
|
__decorate([
|
|
248
261
|
property({ type: Number })
|
|
249
262
|
], IgcTooltipComponent.prototype, "offset", void 0);
|
|
@@ -271,12 +284,6 @@ __decorate([
|
|
|
271
284
|
__decorate([
|
|
272
285
|
property({ type: Boolean, reflect: true })
|
|
273
286
|
], IgcTooltipComponent.prototype, "sticky", void 0);
|
|
274
|
-
__decorate([
|
|
275
|
-
watch('anchor')
|
|
276
|
-
], IgcTooltipComponent.prototype, "_onAnchorChange", null);
|
|
277
|
-
__decorate([
|
|
278
|
-
watch('sticky')
|
|
279
|
-
], IgcTooltipComponent.prototype, "_onStickyChange", null);
|
|
280
287
|
IgcTooltipComponent = IgcTooltipComponent_1 = __decorate([
|
|
281
288
|
themes(all)
|
|
282
289
|
], IgcTooltipComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,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;uDAGxC;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAGxC;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAGnD;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAGnD;AAYM;IADN,QAAQ,EAAE;oDACS;AASb;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACrB;AAqBZ;IADT,KAAK,CAAC,QAAQ,CAAC;0DAGf;AAGS;IADT,KAAK,CAAC,QAAQ,CAAC;0DAGf;AAlOkB,mBAAmB;IADvC,MAAM,CAAC,GAAG,CAAC;GACS,mBAAmB,CAmYvC;eAnYoB,mBAAmB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { EaseOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { fadeOut } from '../../animations/presets/fade/index.js';\nimport { scaleInCenter } from '../../animations/presets/scale/index.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, isLTR } from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent, {\n type PopoverPlacement,\n} from '../popover/popover.js';\nimport { TooltipRegexes, addTooltipController } from './controller.js';\nimport { styles as shared } from './themes/shared/tooltip.common.css.js';\nimport { all } from './themes/themes.js';\nimport { styles } from './themes/tooltip.base.css.js';\n\nexport interface IgcTooltipComponentEventMap {\n /* blazorAlternateType: CustomEvent<void> */\n igcOpening: CustomEvent<Element | null>;\n /* blazorAlternateType: CustomEvent<void> */\n igcOpened: CustomEvent<Element | null>;\n /* blazorAlternateType: CustomEvent<void> */\n igcClosing: CustomEvent<Element | null>;\n /* blazorAlternateType: CustomEvent<void> */\n igcClosed: CustomEvent<Element | null>;\n}\n\ntype TooltipStateOptions = {\n show: boolean;\n withDelay?: boolean;\n withEvents?: boolean;\n};\n\n/**\n * Provides a way to display supplementary information related to an element when a user interacts with it (e.g., hover, focus).\n * It offers features such as placement customization, delays, sticky mode, and animations.\n *\n * @element igc-tooltip\n *\n * @slot - Default slot of the tooltip component.\n * @slot close-button - Slot for custom sticky-mode close action (e.g., an icon/button).\n *\n * @csspart base - The wrapping container of the tooltip content.\n *\n * @fires igcOpening - Emitted before the tooltip begins to open. Can be canceled to prevent opening.\n * @fires igcOpened - Emitted after the tooltip has successfully opened and is visible.\n * @fires igcClosing - Emitted before the tooltip begins to close. Can be canceled to prevent closing.\n * @fires igcClosed - Emitted after the tooltip has been fully removed from view.\n */\n@themes(all)\nexport default class IgcTooltipComponent extends EventEmitterMixin<\n IgcTooltipComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-tooltip';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcTooltipComponent,\n IgcPopoverComponent,\n IgcIconComponent\n );\n }\n\n private readonly _internals: ElementInternals;\n\n private readonly _controller = addTooltipController(this, {\n onShow: this._showOnInteraction,\n onHide: this._hideOnInteraction,\n onEscape: this._hideOnEscape,\n });\n\n private readonly _containerRef = createRef<HTMLElement>();\n private readonly _player = addAnimationController(this, this._containerRef);\n\n private readonly _showAnimation = scaleInCenter({\n duration: 150,\n easing: EaseOut.Quad,\n });\n\n private readonly _hideAnimation = fadeOut({\n duration: 75,\n easing: EaseOut.Sine,\n });\n\n private _timeoutId?: number;\n private _autoHideDelay = 180;\n private _showDelay = 200;\n private _hideDelay = 300;\n\n @query('#arrow')\n private _arrowElement!: HTMLElement;\n\n private get _arrowOffset() {\n if (this.placement.includes('-')) {\n // Horizontal start | end placement\n\n if (TooltipRegexes.horizontalStart.test(this.placement)) {\n return -8;\n }\n\n if (TooltipRegexes.horizontalEnd.test(this.placement)) {\n return 8;\n }\n\n // Vertical start | end placement\n\n if (TooltipRegexes.start.test(this.placement)) {\n return isLTR(this) ? -8 : 8;\n }\n\n if (TooltipRegexes.end.test(this.placement)) {\n return isLTR(this) ? 8 : -8;\n }\n }\n\n return 0;\n }\n\n /**\n * Whether the tooltip is showing.\n *\n * @attr open\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public set open(value: boolean) {\n this._controller.open = value;\n }\n\n public get open(): boolean {\n return this._controller.open;\n }\n\n /**\n * Whether to disable the rendering of the arrow indicator for the tooltip.\n *\n * @attr disable-arrow\n * @default false\n */\n @property({ attribute: 'disable-arrow', type: Boolean, reflect: true })\n public disableArrow = false;\n\n /**\n * The offset of the tooltip from the anchor in pixels.\n *\n * @attr offset\n * @default 6\n */\n @property({ type: Number })\n public offset = 6;\n\n /**\n * Where to place the floating element relative to the parent anchor element.\n *\n * @attr placement\n * @default top\n */\n @property()\n public placement: PopoverPlacement = 'top';\n\n /**\n * An element instance or an IDREF to use as the anchor for the tooltip.\n *\n * @attr anchor\n */\n @property()\n public anchor?: Element | string;\n\n /**\n * Which event triggers will show the tooltip.\n * Expects a comma separate string of different event triggers.\n *\n * @attr show-triggers\n * @default pointerenter\n */\n @property({ attribute: 'show-triggers' })\n public set showTriggers(value: string) {\n this._controller.showTriggers = value;\n }\n\n public get showTriggers(): string {\n return this._controller.showTriggers;\n }\n\n /**\n * Which event triggers will hide the tooltip.\n * Expects a comma separate string of different event triggers.\n *\n * @attr hide-triggers\n * @default pointerleave, click\n */\n @property({ attribute: 'hide-triggers' })\n public set hideTriggers(value: string) {\n this._controller.hideTriggers = value;\n }\n\n public get hideTriggers(): string {\n return this._controller.hideTriggers;\n }\n\n /**\n * Specifies the number of milliseconds that should pass before showing the tooltip.\n *\n * @attr show-delay\n * @default 200\n */\n @property({ attribute: 'show-delay', type: Number })\n public set showDelay(value: number) {\n this._showDelay = Math.max(0, asNumber(value));\n }\n\n public get showDelay(): number {\n return this._showDelay;\n }\n\n /**\n * Specifies the number of milliseconds that should pass before hiding the tooltip.\n *\n * @attr hide-delay\n * @default 300\n */\n @property({ attribute: 'hide-delay', type: Number })\n public set hideDelay(value: number) {\n this._hideDelay = Math.max(0, asNumber(value));\n }\n\n public get hideDelay(): number {\n return this._hideDelay;\n }\n\n /**\n * Specifies a plain text as tooltip content.\n *\n * @attr message\n */\n @property()\n public message = '';\n\n /**\n * Specifies if the tooltip remains visible until the user closes it via the close button or Esc key.\n *\n * @attr sticky\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public sticky = false;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\n this._internals.role = 'tooltip';\n this._internals.ariaAtomic = 'true';\n this._internals.ariaLive = 'polite';\n }\n\n protected override firstUpdated(): void {\n if (this.open) {\n this.updateComplete.then(() => {\n this._player.playExclusive(this._showAnimation);\n this.requestUpdate();\n });\n }\n }\n\n @watch('anchor')\n protected _onAnchorChange(): void {\n this._controller.resolveAnchor(this.anchor);\n }\n\n @watch('sticky')\n protected _onStickyChange(): void {\n this._internals.role = this.sticky ? 'status' : 'tooltip';\n }\n\n private _emitEvent(name: keyof IgcTooltipComponentEventMap): boolean {\n return this.emitEvent(name, {\n cancelable: name === 'igcOpening' || name === 'igcClosing',\n detail: this._controller.anchor,\n });\n }\n\n private async _applyTooltipState({\n show,\n withDelay = false,\n withEvents = false,\n }: TooltipStateOptions): Promise<boolean> {\n if (show === this.open) {\n return false;\n }\n\n if (withEvents && !this._emitEvent(show ? 'igcOpening' : 'igcClosing')) {\n return false;\n }\n\n const commitStateChange = async () => {\n if (show) {\n this.open = true;\n }\n\n // Make the tooltip ignore most interactions while the animation\n // is running. In the rare case when the popover overlaps its anchor\n // this will prevent looping between the anchor and tooltip handlers.\n this.inert = true;\n\n const animationComplete = await this._player.playExclusive(\n show ? this._showAnimation : this._hideAnimation\n );\n\n this.inert = false;\n this.open = show;\n\n if (animationComplete && withEvents) {\n this._emitEvent(show ? 'igcOpened' : 'igcClosed');\n }\n\n return animationComplete;\n };\n\n if (withDelay) {\n clearTimeout(this._timeoutId);\n\n return new Promise(() => {\n this._timeoutId = setTimeout(\n async () => await commitStateChange(),\n show ? this.showDelay : this.hideDelay\n );\n });\n }\n\n return commitStateChange();\n }\n\n /**\n * Shows the tooltip if not already showing.\n * If a target is provided, sets it as a transient anchor.\n */\n public async show(target?: Element | string): Promise<boolean> {\n if (target) {\n this._stopTimeoutAndAnimation();\n this._controller.setAnchor(target, true);\n }\n\n return await this._applyTooltipState({ show: true });\n }\n\n /** Hides the tooltip if not already hidden. */\n public async hide(): Promise<boolean> {\n return await this._applyTooltipState({ show: false });\n }\n\n /** Toggles the tooltip between shown/hidden state */\n public async toggle(): Promise<boolean> {\n return await (this.open ? this.hide() : this.show());\n }\n\n protected _showWithEvent(): Promise<boolean> {\n return this._applyTooltipState({\n show: true,\n withDelay: true,\n withEvents: true,\n });\n }\n\n protected _hideWithEvent(): Promise<boolean> {\n return this._applyTooltipState({\n show: false,\n withDelay: true,\n withEvents: true,\n });\n }\n\n private _showOnInteraction(): void {\n this._stopTimeoutAndAnimation();\n this._showWithEvent();\n }\n\n private _stopTimeoutAndAnimation(): void {\n clearTimeout(this._timeoutId);\n this._player.stopAll();\n }\n\n private _setAutoHide(): void {\n this._stopTimeoutAndAnimation();\n\n this._timeoutId = setTimeout(\n this._hideWithEvent.bind(this),\n this._autoHideDelay\n );\n }\n\n private _hideOnInteraction(): void {\n if (!this.sticky) {\n this._setAutoHide();\n }\n }\n\n private async _hideOnEscape(): Promise<void> {\n await this.hide();\n this._emitEvent('igcClosed');\n }\n\n protected override render() {\n return html`\n <igc-popover\n .inert=${!this.open}\n .placement=${this.placement}\n .offset=${this.offset}\n .anchor=${this._controller.anchor ?? undefined}\n .arrow=${this.disableArrow ? null : this._arrowElement}\n .arrowOffset=${this._arrowOffset}\n .shiftPadding=${8}\n ?open=${this.open}\n flip\n shift\n >\n <div ${ref(this._containerRef)} part=\"base\">\n <slot>${this.message}</slot>\n ${this.sticky\n ? html`\n <slot name=\"close-button\" @click=${this._setAutoHide}>\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n `\n : nothing}\n ${this.disableArrow ? nothing : html`<div id=\"arrow\"></div>`}\n </div>\n </igc-popover>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tooltip': IgcTooltipComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAC/C,OAAO,mBAEN,MAA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AE,CAAC;mDACrB;AAnOH,mBAAmB;IADvC,MAAM,CAAC,GAAG,CAAC;GACS,mBAAmB,CAsZvC;eAtZoB,mBAAmB","sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { EaseOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { fadeOut } from '../../animations/presets/fade/index.js';\nimport { scaleInCenter } from '../../animations/presets/scale/index.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { addInternalsController } from '../common/controllers/internals.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, isLTR } from '../common/util.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent, {\n type PopoverPlacement,\n} from '../popover/popover.js';\nimport { addTooltipController, TooltipRegexes } from './controller.js';\nimport { styles as shared } from './themes/shared/tooltip.common.css.js';\nimport { all } from './themes/themes.js';\nimport { styles } from './themes/tooltip.base.css.js';\n\nexport interface IgcTooltipComponentEventMap {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n\ntype TooltipStateOptions = {\n show: boolean;\n withDelay?: boolean;\n withEvents?: boolean;\n};\n\n/**\n * Provides a way to display supplementary information related to an element when a user interacts with it (e.g., hover, focus).\n * It offers features such as placement customization, delays, sticky mode, and animations.\n *\n * @element igc-tooltip\n *\n * @slot - Default slot of the tooltip component.\n * @slot close-button - Slot for custom sticky-mode close action (e.g., an icon/button).\n *\n * @csspart base - The wrapping container of the tooltip content.\n *\n * @fires igcOpening - Emitted before the tooltip begins to open. Can be canceled to prevent opening.\n * @fires igcOpened - Emitted after the tooltip has successfully opened and is visible.\n * @fires igcClosing - Emitted before the tooltip begins to close. Can be canceled to prevent closing.\n * @fires igcClosed - Emitted after the tooltip has been fully removed from view.\n */\n@themes(all)\nexport default class IgcTooltipComponent extends EventEmitterMixin<\n IgcTooltipComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-tooltip';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcTooltipComponent,\n IgcPopoverComponent,\n IgcIconComponent\n );\n }\n\n private readonly _internals = addInternalsController(this, {\n initialARIA: {\n role: 'tooltip',\n ariaAtomic: 'true',\n ariaLive: 'polite',\n },\n });\n\n private readonly _controller = addTooltipController(this, {\n onShow: this._showOnInteraction,\n onHide: this._hideOnInteraction,\n onEscape: this._hideOnEscape,\n });\n\n private readonly _containerRef = createRef<HTMLElement>();\n private readonly _player = addAnimationController(this, this._containerRef);\n\n private readonly _showAnimation = scaleInCenter({\n duration: 150,\n easing: EaseOut.Quad,\n });\n\n private readonly _hideAnimation = fadeOut({\n duration: 75,\n easing: EaseOut.Sine,\n });\n\n private _timeoutId?: number;\n private _autoHideDelay = 180;\n private _showDelay = 200;\n private _hideDelay = 300;\n\n @query('#arrow')\n private _arrowElement!: HTMLElement;\n\n private get _arrowOffset() {\n if (this.placement.includes('-')) {\n // Horizontal start | end placement\n\n if (TooltipRegexes.horizontalStart.test(this.placement)) {\n return -8;\n }\n\n if (TooltipRegexes.horizontalEnd.test(this.placement)) {\n return 8;\n }\n\n // Vertical start | end placement\n\n if (TooltipRegexes.start.test(this.placement)) {\n return isLTR(this) ? -8 : 8;\n }\n\n if (TooltipRegexes.end.test(this.placement)) {\n return isLTR(this) ? 8 : -8;\n }\n }\n\n return 0;\n }\n\n /**\n * Whether the tooltip is showing.\n *\n * @attr open\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public set open(value: boolean) {\n this._controller.open = value;\n }\n\n public get open(): boolean {\n return this._controller.open;\n }\n\n /**\n * Whether to disable the rendering of the arrow indicator for the tooltip.\n *\n * @deprecated since 6.1.0. Use `with-arrow` to control the behavior of the tooltip arrow.\n * @attr disable-arrow\n * @default false\n */\n @property({ type: Boolean, attribute: 'disable-arrow' })\n public set disableArrow(value: boolean) {\n this.withArrow = !value;\n }\n\n /**\n * @deprecated since 6.1.0. Use `with-arrow` to control the behavior of the tooltip arrow.\n */\n public get disableArrow(): boolean {\n return !this.withArrow;\n }\n\n /**\n * Whether to render an arrow indicator for the tooltip.\n *\n * @attr with-arrow\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'with-arrow' })\n public withArrow = false;\n\n /**\n * The offset of the tooltip from the anchor in pixels.\n *\n * @attr offset\n * @default 6\n */\n @property({ type: Number })\n public offset = 6;\n\n /**\n * Where to place the floating element relative to the parent anchor element.\n *\n * @attr placement\n * @default bottom\n */\n @property()\n public placement: PopoverPlacement = 'bottom';\n\n /**\n * An element instance or an IDREF to use as the anchor for the tooltip.\n *\n * @remarks\n * Trying to bind to an IDREF that does not exist in the current DOM root at will not work.\n * In such scenarios, it is better to get a DOM reference and pass it to the tooltip instance.\n *\n * @attr anchor\n */\n @property()\n public anchor?: Element | string;\n\n /**\n * Which event triggers will show the tooltip.\n * Expects a comma separate string of different event triggers.\n *\n * @attr show-triggers\n * @default pointerenter\n */\n @property({ attribute: 'show-triggers' })\n public set showTriggers(value: string) {\n this._controller.showTriggers = value;\n }\n\n public get showTriggers(): string {\n return this._controller.showTriggers;\n }\n\n /**\n * Which event triggers will hide the tooltip.\n * Expects a comma separate string of different event triggers.\n *\n * @attr hide-triggers\n * @default pointerleave, click\n */\n @property({ attribute: 'hide-triggers' })\n public set hideTriggers(value: string) {\n this._controller.hideTriggers = value;\n }\n\n public get hideTriggers(): string {\n return this._controller.hideTriggers;\n }\n\n /**\n * Specifies the number of milliseconds that should pass before showing the tooltip.\n *\n * @attr show-delay\n * @default 200\n */\n @property({ attribute: 'show-delay', type: Number })\n public set showDelay(value: number) {\n this._showDelay = Math.max(0, asNumber(value));\n }\n\n public get showDelay(): number {\n return this._showDelay;\n }\n\n /**\n * Specifies the number of milliseconds that should pass before hiding the tooltip.\n *\n * @attr hide-delay\n * @default 300\n */\n @property({ attribute: 'hide-delay', type: Number })\n public set hideDelay(value: number) {\n this._hideDelay = Math.max(0, asNumber(value));\n }\n\n public get hideDelay(): number {\n return this._hideDelay;\n }\n\n /**\n * Specifies a plain text as tooltip content.\n *\n * @attr message\n */\n @property()\n public message = '';\n\n /**\n * Specifies if the tooltip remains visible until the user closes it via the close button or Esc key.\n *\n * @attr sticky\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public sticky = false;\n\n protected override firstUpdated(): void {\n if (this.open) {\n this.updateComplete.then(() => {\n this._player.playExclusive(this._showAnimation);\n this.requestUpdate();\n });\n }\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n if (changedProperties.has('anchor')) {\n this._controller.resolveAnchor(this.anchor);\n }\n\n if (changedProperties.has('sticky')) {\n this._internals.setARIA({ role: this.sticky ? 'status' : 'tooltip' });\n }\n }\n\n private _emitEvent(name: keyof IgcTooltipComponentEventMap): boolean {\n return this.emitEvent(name, {\n cancelable: name === 'igcOpening' || name === 'igcClosing',\n });\n }\n\n private async _applyTooltipState({\n show,\n withDelay = false,\n withEvents = false,\n }: TooltipStateOptions): Promise<boolean> {\n if (show === this.open) {\n return false;\n }\n\n if (withEvents && !this._emitEvent(show ? 'igcOpening' : 'igcClosing')) {\n return false;\n }\n\n const commitStateChange = async () => {\n if (show) {\n this.open = true;\n }\n\n // Make the tooltip ignore most interactions while the animation\n // is running. In the rare case when the popover overlaps its anchor\n // this will prevent looping between the anchor and tooltip handlers.\n this.inert = true;\n\n const animationComplete = await this._player.playExclusive(\n show ? this._showAnimation : this._hideAnimation\n );\n\n this.inert = false;\n this.open = show;\n\n if (animationComplete && withEvents) {\n this._emitEvent(show ? 'igcOpened' : 'igcClosed');\n }\n\n return animationComplete;\n };\n\n if (withDelay) {\n clearTimeout(this._timeoutId);\n\n return new Promise(() => {\n this._timeoutId = setTimeout(\n async () => await commitStateChange(),\n show ? this.showDelay : this.hideDelay\n );\n });\n }\n\n return commitStateChange();\n }\n\n /**\n * Shows the tooltip if not already showing.\n * If a target is provided, sets it as a transient anchor.\n */\n public async show(target?: Element | string): Promise<boolean> {\n if (target) {\n this._stopTimeoutAndAnimation();\n this._controller.setAnchor(target, true);\n }\n\n return await this._applyTooltipState({ show: true });\n }\n\n /** Hides the tooltip if not already hidden. */\n public async hide(): Promise<boolean> {\n return await this._applyTooltipState({ show: false });\n }\n\n /** Toggles the tooltip between shown/hidden state */\n public async toggle(): Promise<boolean> {\n return await (this.open ? this.hide() : this.show());\n }\n\n protected _showWithEvent(): Promise<boolean> {\n return this._applyTooltipState({\n show: true,\n withDelay: true,\n withEvents: true,\n });\n }\n\n protected _hideWithEvent(): Promise<boolean> {\n return this._applyTooltipState({\n show: false,\n withDelay: true,\n withEvents: true,\n });\n }\n\n private _showOnInteraction(): void {\n this._stopTimeoutAndAnimation();\n this._showWithEvent();\n }\n\n private _stopTimeoutAndAnimation(): void {\n clearTimeout(this._timeoutId);\n this._player.stopAll();\n }\n\n private _setAutoHide(): void {\n this._stopTimeoutAndAnimation();\n\n this._timeoutId = setTimeout(\n this._hideWithEvent.bind(this),\n this._autoHideDelay\n );\n }\n\n private _hideOnInteraction(): void {\n if (!this.sticky) {\n this._setAutoHide();\n }\n }\n\n private async _hideOnEscape(): Promise<void> {\n await this.hide();\n this._emitEvent('igcClosed');\n }\n\n protected override render() {\n return html`\n <igc-popover\n .inert=${!this.open}\n .placement=${this.placement}\n .offset=${this.offset}\n .anchor=${this._controller.anchor ?? undefined}\n .arrow=${this.withArrow ? this._arrowElement : null}\n .arrowOffset=${this._arrowOffset}\n .shiftPadding=${8}\n ?open=${this.open}\n flip\n shift\n >\n <div ${ref(this._containerRef)} part=\"base\">\n <slot>${this.message}</slot>\n ${this.sticky\n ? html`\n <slot name=\"close-button\" @click=${this._setAutoHide}>\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n `\n : nothing}\n ${this.withArrow ? html`<div id=\"arrow\"></div>` : nothing}\n </div>\n </igc-popover>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tooltip': IgcTooltipComponent;\n }\n}\n"]}
|
|
@@ -86,6 +86,7 @@ export default class IgcTreeItemComponent extends LitElement {
|
|
|
86
86
|
protected activeChange(): void;
|
|
87
87
|
protected disabledChange(): void;
|
|
88
88
|
protected selectedChange(): void;
|
|
89
|
+
constructor();
|
|
89
90
|
connectedCallback(): void;
|
|
90
91
|
disconnectedCallback(): void;
|
|
91
92
|
private get selectionService();
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var IgcTreeItemComponent_1;
|
|
8
|
-
import {
|
|
8
|
+
import { html, LitElement, nothing } from 'lit';
|
|
9
9
|
import { property, query, queryAssignedElements, state, } from 'lit/decorators.js';
|
|
10
10
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
11
|
import { addAnimationController } from '../../animations/player.js';
|
|
@@ -14,32 +14,14 @@ import { themes } from '../../theming/theming-decorator.js';
|
|
|
14
14
|
import IgcCheckboxComponent from '../checkbox/checkbox.js';
|
|
15
15
|
import { watch } from '../common/decorators/watch.js';
|
|
16
16
|
import { registerComponent } from '../common/definitions/register.js';
|
|
17
|
-
import {
|
|
17
|
+
import { partMap } from '../common/part-map.js';
|
|
18
|
+
import { addSafeEventListener, findElementFromEventPath, isLTR, } from '../common/util.js';
|
|
18
19
|
import IgcIconComponent from '../icon/icon.js';
|
|
19
20
|
import IgcCircularProgressComponent from '../progress/circular-progress.js';
|
|
20
21
|
import { styles } from './themes/item.base.css.js';
|
|
21
22
|
import { all } from './themes/item.js';
|
|
22
23
|
import { styles as shared } from './themes/shared/item.common.css.js';
|
|
23
24
|
let IgcTreeItemComponent = IgcTreeItemComponent_1 = class IgcTreeItemComponent extends LitElement {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(...arguments);
|
|
26
|
-
this.focusedProgrammatically = false;
|
|
27
|
-
this.groupRef = createRef();
|
|
28
|
-
this.animationPlayer = addAnimationController(this, this.groupRef);
|
|
29
|
-
this.parent = null;
|
|
30
|
-
this.init = false;
|
|
31
|
-
this.isFocused = false;
|
|
32
|
-
this.hasChildren = false;
|
|
33
|
-
this.level = 0;
|
|
34
|
-
this.indeterminate = false;
|
|
35
|
-
this.label = '';
|
|
36
|
-
this.expanded = false;
|
|
37
|
-
this.active = false;
|
|
38
|
-
this.disabled = false;
|
|
39
|
-
this.selected = false;
|
|
40
|
-
this.loading = false;
|
|
41
|
-
this.value = undefined;
|
|
42
|
-
}
|
|
43
25
|
static register() {
|
|
44
26
|
registerComponent(IgcTreeItemComponent_1, IgcIconComponent, IgcCheckboxComponent, IgcCircularProgressComponent);
|
|
45
27
|
}
|
|
@@ -101,15 +83,34 @@ let IgcTreeItemComponent = IgcTreeItemComponent_1 = class IgcTreeItemComponent e
|
|
|
101
83
|
this.selectionService?.deselectItemsWithNoEvent([this]);
|
|
102
84
|
}
|
|
103
85
|
}
|
|
86
|
+
constructor() {
|
|
87
|
+
super();
|
|
88
|
+
this.focusedProgrammatically = false;
|
|
89
|
+
this.groupRef = createRef();
|
|
90
|
+
this.animationPlayer = addAnimationController(this, this.groupRef);
|
|
91
|
+
this.parent = null;
|
|
92
|
+
this.init = false;
|
|
93
|
+
this.isFocused = false;
|
|
94
|
+
this.hasChildren = false;
|
|
95
|
+
this.level = 0;
|
|
96
|
+
this.indeterminate = false;
|
|
97
|
+
this.label = '';
|
|
98
|
+
this.expanded = false;
|
|
99
|
+
this.active = false;
|
|
100
|
+
this.disabled = false;
|
|
101
|
+
this.selected = false;
|
|
102
|
+
this.loading = false;
|
|
103
|
+
this.value = undefined;
|
|
104
|
+
addSafeEventListener(this, 'click', this.itemClick);
|
|
105
|
+
addSafeEventListener(this, 'focus', this.onFocus);
|
|
106
|
+
addSafeEventListener(this, 'blur', this.onBlur);
|
|
107
|
+
}
|
|
104
108
|
connectedCallback() {
|
|
105
109
|
super.connectedCallback();
|
|
106
110
|
this.tree = this.closest('igc-tree');
|
|
107
111
|
this.parent = this.parentElement?.closest('igc-tree-item');
|
|
108
112
|
this.level = this.parent ? this.parent.level + 1 : 0;
|
|
109
113
|
this.setAttribute('role', 'treeitem');
|
|
110
|
-
this.addEventListener('blur', this.onBlur);
|
|
111
|
-
this.addEventListener('focus', this.onFocus);
|
|
112
|
-
this.addEventListener('click', this.itemClick);
|
|
113
114
|
this.activeChange();
|
|
114
115
|
if (this.init) {
|
|
115
116
|
this.selectedChange();
|
|
@@ -132,6 +133,7 @@ let IgcTreeItemComponent = IgcTreeItemComponent_1 = class IgcTreeItemComponent e
|
|
|
132
133
|
}
|
|
133
134
|
get parts() {
|
|
134
135
|
return {
|
|
136
|
+
wrapper: true,
|
|
135
137
|
selected: this.selected,
|
|
136
138
|
focused: this.isFocused,
|
|
137
139
|
active: this.active,
|
|
@@ -324,7 +326,7 @@ let IgcTreeItemComponent = IgcTreeItemComponent_1 = class IgcTreeItemComponent e
|
|
|
324
326
|
rtl: !(this.tree ? isLTR(this.tree) : true),
|
|
325
327
|
};
|
|
326
328
|
return html `
|
|
327
|
-
<div id="wrapper" part
|
|
329
|
+
<div id="wrapper" part=${partMap(this.parts)}>
|
|
328
330
|
<div
|
|
329
331
|
style="width: calc(${this.level} * var(--igc-tree-indentation-size))"
|
|
330
332
|
part="indentation"
|
|
@@ -332,7 +334,7 @@ let IgcTreeItemComponent = IgcTreeItemComponent_1 = class IgcTreeItemComponent e
|
|
|
332
334
|
>
|
|
333
335
|
<slot name="indentation"></slot>
|
|
334
336
|
</div>
|
|
335
|
-
<div part
|
|
337
|
+
<div part=${partMap(indicatorParts)} aria-hidden="true">
|
|
336
338
|
${this.loading
|
|
337
339
|
? html `
|
|
338
340
|
<slot name="loading">
|