igniteui-webcomponents 7.3.2 → 7.4.1
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 +87 -0
- package/animations/easings.d.ts +21 -31
- package/animations/easings.js +21 -34
- package/animations/easings.js.map +1 -1
- package/animations/player.d.ts +8 -16
- package/animations/player.js +5 -8
- package/animations/player.js.map +1 -1
- package/animations/view-transition.d.ts +10 -10
- package/animations/view-transition.js +26 -37
- package/animations/view-transition.js.map +1 -1
- package/components/breadcrumb/breadcrumb.d.ts +74 -0
- package/components/breadcrumb/breadcrumb.js +107 -0
- package/components/breadcrumb/breadcrumb.js.map +1 -0
- package/components/breadcrumb/breadcrumbs.d.ts +60 -0
- package/components/breadcrumb/breadcrumbs.js +50 -0
- package/components/breadcrumb/breadcrumbs.js.map +1 -0
- package/components/breadcrumb/themes/breadcrumb.base.css.js +3 -0
- package/components/breadcrumb/themes/breadcrumb.base.css.js.map +1 -0
- package/components/breadcrumb/themes/breadcrumbs.base.css.d.ts +1 -0
- package/components/{resize-container/themes/resize-container.base.css.js → breadcrumb/themes/breadcrumbs.base.css.js} +2 -2
- package/components/breadcrumb/themes/breadcrumbs.base.css.js.map +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.d.ts +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js +3 -0
- package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js.map +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.d.ts +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js +3 -0
- package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js.map +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.d.ts +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js +3 -0
- package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js.map +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.material.css.d.ts +1 -0
- package/components/breadcrumb/themes/dark/breadcrumb.material.css.js +3 -0
- package/components/breadcrumb/themes/dark/breadcrumb.material.css.js.map +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.d.ts +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js +3 -0
- package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js.map +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.fluent.css.d.ts +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js +3 -0
- package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js.map +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.indigo.css.d.ts +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js +3 -0
- package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js.map +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.material.css.d.ts +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.material.css.js +3 -0
- package/components/breadcrumb/themes/light/breadcrumb.material.css.js.map +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.shared.css.d.ts +1 -0
- package/components/breadcrumb/themes/light/breadcrumb.shared.css.js +3 -0
- package/components/breadcrumb/themes/light/breadcrumb.shared.css.js.map +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.d.ts +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js +3 -0
- package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js.map +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.common.css.d.ts +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.common.css.js +3 -0
- package/components/breadcrumb/themes/shared/breadcrumb.common.css.js.map +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.d.ts +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js +3 -0
- package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js.map +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.d.ts +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js +3 -0
- package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js.map +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.material.css.d.ts +1 -0
- package/components/breadcrumb/themes/shared/breadcrumb.material.css.js +3 -0
- package/components/breadcrumb/themes/shared/breadcrumb.material.css.js.map +1 -0
- package/components/breadcrumb/themes/themes.d.ts +2 -0
- package/components/breadcrumb/themes/themes.js +50 -0
- package/components/breadcrumb/themes/themes.js.map +1 -0
- package/components/button/button.d.ts +0 -2
- package/components/button/button.js.map +1 -1
- package/components/button-group/button-group.d.ts +42 -12
- package/components/button-group/button-group.js +82 -34
- package/components/button-group/button-group.js.map +1 -1
- package/components/button-group/toggle-button.d.ts +6 -1
- package/components/button-group/toggle-button.js +28 -2
- package/components/button-group/toggle-button.js.map +1 -1
- package/components/calendar/base.js +2 -1
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +2 -3
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +2 -2
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/carousel/carousel-indicator.js +1 -0
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.d.ts +1 -1
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.d.ts +3 -3
- package/components/carousel/carousel.js.map +1 -1
- package/components/chat/chat-input.d.ts +1 -2
- package/components/chat/chat-input.js +1 -1
- package/components/chat/chat-input.js.map +1 -1
- package/components/chat/chat-state.d.ts +8 -9
- package/components/chat/chat-state.js.map +1 -1
- package/components/chat/chat.d.ts +1 -3
- package/components/chat/chat.js +2 -2
- package/components/chat/chat.js.map +1 -1
- package/components/chat/message-attachments.d.ts +6 -15
- package/components/chat/message-attachments.js.map +1 -1
- package/components/chat/utils.d.ts +0 -1
- package/components/chat/utils.js +1 -1
- package/components/chat/utils.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +3 -1
- package/components/checkbox/checkbox-base.js +4 -0
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.js +4 -12
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +1 -8
- package/components/checkbox/switch.js.map +1 -1
- package/components/chip/chip.d.ts +2 -2
- package/components/chip/chip.js.map +1 -1
- package/components/color-picker/color-picker.d.ts +35 -34
- package/components/color-picker/color-picker.js +12 -7
- package/components/color-picker/color-picker.js.map +1 -1
- package/components/color-picker/common.d.ts +0 -2
- package/components/color-picker/common.js +2 -2
- package/components/color-picker/common.js.map +1 -1
- package/components/color-picker/converters.js.map +1 -1
- package/components/color-picker/picker-canvas.js.map +1 -1
- package/components/combo/combo.d.ts +24 -24
- package/components/combo/combo.js +21 -26
- package/components/combo/combo.js.map +1 -1
- package/components/combo/controllers/data.d.ts +7 -10
- package/components/combo/controllers/data.js.map +1 -1
- package/components/date-picker/date-picker.base.d.ts +22 -27
- package/components/date-picker/date-picker.base.js +9 -3
- package/components/date-picker/date-picker.base.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +5 -3
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-input.d.ts +0 -2
- package/components/date-range-picker/date-range-input.js +0 -6
- package/components/date-range-picker/date-range-input.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +22 -31
- package/components/date-range-picker/date-range-picker.js +7 -7
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/i18n.d.ts +21 -0
- package/components/date-range-picker/i18n.js +10 -0
- package/components/date-range-picker/i18n.js.map +1 -0
- package/components/date-range-picker/predefined-ranges-area.d.ts +3 -3
- package/components/date-range-picker/predefined-ranges-area.js +2 -5
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-range-picker/validators.d.ts +0 -4
- package/components/date-range-picker/validators.js +4 -4
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-time-input.base.d.ts +42 -40
- package/components/date-time-input/date-time-input.base.js +9 -5
- package/components/date-time-input/date-time-input.base.js.map +1 -1
- package/components/date-time-input/date-time-input.d.ts +1 -11
- package/components/date-time-input/date-time-input.js +0 -6
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/datetime-mask-parser.d.ts +0 -10
- package/components/date-time-input/datetime-mask-parser.js +1 -1
- package/components/date-time-input/datetime-mask-parser.js.map +1 -1
- package/components/dialog/dialog.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +2 -10
- package/components/dropdown/dropdown-group.js +2 -27
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +17 -23
- package/components/dropdown/dropdown.js +5 -17
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/file-input/file-input.d.ts +7 -2
- package/components/file-input/file-input.js +4 -0
- package/components/file-input/file-input.js.map +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.registry.d.ts +6 -6
- package/components/icon/icon.registry.js.map +1 -1
- package/components/input/input-base.d.ts +2 -2
- package/components/input/input-base.js +3 -5
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +3 -3
- package/components/input/input.js.map +1 -1
- package/components/mask-input/mask-history.d.ts +22 -18
- package/components/mask-input/mask-history.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +1 -1
- package/components/mask-input/mask-parser.d.ts +11 -13
- package/components/mask-input/mask-parser.js.map +1 -1
- package/components/popover/popover.d.ts +45 -34
- package/components/popover/popover.js +54 -122
- package/components/popover/popover.js.map +1 -1
- package/components/popover/position/arrow.d.ts +19 -0
- package/components/popover/position/arrow.js +33 -0
- package/components/popover/position/arrow.js.map +1 -0
- package/components/popover/position/floating.d.ts +40 -0
- package/components/popover/position/floating.js +146 -0
- package/components/popover/position/floating.js.map +1 -0
- package/components/popover/position/native.d.ts +45 -0
- package/components/popover/position/native.js +158 -0
- package/components/popover/position/native.js.map +1 -0
- package/components/popover/position/strategy.d.ts +37 -0
- package/components/popover/position/strategy.js +21 -0
- package/components/popover/position/strategy.js.map +1 -0
- package/components/popover/position/types.d.ts +26 -0
- package/components/popover/position/types.js +15 -0
- package/components/popover/position/types.js.map +1 -0
- package/components/popover/themes/light/popover.base.css.js +1 -1
- package/components/popover/themes/light/popover.base.css.js.map +1 -1
- package/components/progress/circular-progress.d.ts +0 -5
- package/components/progress/circular-progress.js.map +1 -1
- package/components/qr-code/qr-code.d.ts +1 -1
- package/components/radio/radio.d.ts +6 -4
- package/components/radio/radio.js +24 -25
- package/components/radio/radio.js.map +1 -1
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +9 -6
- package/components/rating/rating.js +17 -18
- package/components/rating/rating.js.map +1 -1
- package/components/select/select-group.d.ts +5 -10
- package/components/select/select-group.js +10 -34
- package/components/select/select-group.js.map +1 -1
- package/components/select/select.d.ts +12 -20
- package/components/select/select.js +5 -15
- package/components/select/select.js.map +1 -1
- package/components/slider/range-slider.d.ts +0 -1
- package/components/slider/range-slider.js +6 -11
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.d.ts +4 -1
- package/components/slider/slider-base.js +20 -18
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider.d.ts +2 -0
- package/components/slider/slider.js +5 -1
- package/components/slider/slider.js.map +1 -1
- package/components/splitter/splitter.d.ts +6 -6
- package/components/splitter/splitter.js.map +1 -1
- package/components/textarea/textarea.d.ts +2 -5
- package/components/textarea/textarea.js +3 -5
- package/components/textarea/textarea.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +6 -7
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.d.ts +3 -3
- package/components/tile-manager/tile.js.map +1 -1
- package/components/toast/toast.d.ts +0 -2
- package/components/toast/toast.js.map +1 -1
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/service.js +4 -5
- package/components/tooltip/service.js.map +1 -1
- package/components/tooltip/tooltip.d.ts +34 -13
- package/components/tooltip/tooltip.js +8 -4
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.d.ts +6 -6
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.navigation.d.ts +5 -6
- package/components/tree/tree.navigation.js.map +1 -1
- package/components/tree/tree.selection.js.map +1 -1
- package/components/types.d.ts +1 -1
- package/components/types.js.map +1 -1
- package/components/validation-container/validation-container.js +2 -1
- package/components/validation-container/validation-container.js.map +1 -1
- package/components/virtualization/engine.d.ts +40 -9
- package/components/virtualization/engine.js +126 -61
- package/components/virtualization/engine.js.map +1 -1
- package/components/virtualization/recycle.d.ts +13 -0
- package/components/virtualization/recycle.js +152 -0
- package/components/virtualization/recycle.js.map +1 -0
- package/components/virtualization/virtualization.d.ts +84 -65
- package/components/virtualization/virtualization.js +20 -16
- package/components/virtualization/virtualization.js.map +1 -1
- package/custom-elements.json +18455 -19551
- package/igniteui-webcomponents.css-data.json +2 -2
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +3 -1
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/internals/abort-handler.d.ts +13 -25
- package/internals/abort-handler.js +4 -6
- package/internals/abort-handler.js.map +1 -1
- package/internals/context.d.ts +13 -7
- package/internals/context.js +2 -1
- package/internals/context.js.map +1 -1
- package/internals/controllers/adopt-styles.d.ts +19 -20
- package/internals/controllers/adopt-styles.js +3 -8
- package/internals/controllers/adopt-styles.js.map +1 -1
- package/internals/controllers/aria-projection.d.ts +100 -61
- package/internals/controllers/aria-projection.js +81 -31
- package/internals/controllers/aria-projection.js.map +1 -1
- package/internals/controllers/async-consumer.js.map +1 -1
- package/internals/controllers/command.d.ts +15 -30
- package/internals/controllers/command.js +2 -7
- package/internals/controllers/command.js.map +1 -1
- package/internals/controllers/context-provider.d.ts +7 -13
- package/internals/controllers/context-provider.js.map +1 -1
- package/internals/controllers/focus-ring.d.ts +10 -30
- package/internals/controllers/focus-ring.js +6 -12
- package/internals/controllers/focus-ring.js.map +1 -1
- package/internals/controllers/fullscreen.d.ts +7 -23
- package/internals/controllers/fullscreen.js +3 -9
- package/internals/controllers/fullscreen.js.map +1 -1
- package/internals/controllers/gestures.d.ts +10 -29
- package/internals/controllers/gestures.js +1 -3
- package/internals/controllers/gestures.js.map +1 -1
- package/internals/controllers/group.d.ts +13 -30
- package/internals/controllers/group.js.map +1 -1
- package/internals/controllers/host-listeners.d.ts +28 -0
- package/internals/controllers/host-listeners.js +27 -0
- package/internals/controllers/host-listeners.js.map +1 -0
- package/internals/controllers/id-resolver.d.ts +8 -9
- package/internals/controllers/id-resolver.js +6 -14
- package/internals/controllers/id-resolver.js.map +1 -1
- package/internals/controllers/internals.d.ts +53 -104
- package/internals/controllers/internals.js +40 -13
- package/internals/controllers/internals.js.map +1 -1
- package/internals/controllers/key-bindings.d.ts +61 -158
- package/internals/controllers/key-bindings.js +68 -67
- package/internals/controllers/key-bindings.js.map +1 -1
- package/internals/controllers/keys.d.ts +32 -0
- package/internals/controllers/keys.js +20 -0
- package/internals/controllers/keys.js.map +1 -0
- package/internals/controllers/mutation-observer.d.ts +14 -37
- package/internals/controllers/mutation-observer.js +1 -1
- package/internals/controllers/mutation-observer.js.map +1 -1
- package/internals/controllers/resize-observer.d.ts +9 -19
- package/internals/controllers/resize-observer.js.map +1 -1
- package/internals/controllers/root-click.d.ts +11 -42
- package/internals/controllers/root-click.js +4 -6
- package/internals/controllers/root-click.js.map +1 -1
- package/internals/controllers/roving-focus.d.ts +16 -35
- package/internals/controllers/roving-focus.js.map +1 -1
- package/internals/controllers/slot.d.ts +25 -54
- package/internals/controllers/slot.js +6 -6
- package/internals/controllers/slot.js.map +1 -1
- package/internals/controllers/toggle.d.ts +44 -48
- package/internals/controllers/toggle.js.map +1 -1
- package/internals/date/compare.js.map +1 -1
- package/internals/date/converters.d.ts +10 -7
- package/internals/date/converters.js.map +1 -1
- package/internals/date/model.d.ts +9 -16
- package/internals/date/model.js +22 -25
- package/internals/date/model.js.map +1 -1
- package/internals/decorators/blazorAdditionalDependencies.d.ts +4 -2
- package/internals/decorators/blazorAdditionalDependencies.js.map +1 -1
- package/internals/decorators/blazorDeepImport.d.ts +1 -3
- package/internals/decorators/blazorDeepImport.js.map +1 -1
- package/internals/decorators/blazorInclude.d.ts +3 -2
- package/internals/decorators/blazorInclude.js.map +1 -1
- package/internals/decorators/blazorIndirectRender.d.ts +1 -3
- package/internals/decorators/blazorIndirectRender.js.map +1 -1
- package/internals/decorators/blazorSuppressComponent.d.ts +1 -3
- package/internals/decorators/blazorSuppressComponent.js.map +1 -1
- package/internals/decorators/coerced-property.d.ts +14 -20
- package/internals/decorators/coerced-property.js.map +1 -1
- package/internals/decorators/shadow-options.d.ts +2 -5
- package/internals/decorators/shadow-options.js.map +1 -1
- package/internals/definitions/defineAllComponents.js +2 -0
- package/internals/definitions/defineAllComponents.js.map +1 -1
- package/internals/directives/drag.d.ts +51 -81
- package/internals/directives/drag.js +27 -89
- package/internals/directives/drag.js.map +1 -1
- package/internals/directives/pointer-operation.d.ts +75 -0
- package/internals/directives/pointer-operation.js +92 -0
- package/internals/directives/pointer-operation.js.map +1 -0
- package/internals/directives/resize.d.ts +36 -64
- package/internals/directives/resize.js +18 -85
- package/internals/directives/resize.js.map +1 -1
- package/internals/i18n/EN/calendar.resources.d.ts +8 -2
- package/internals/i18n/EN/calendar.resources.js +2 -2
- package/internals/i18n/EN/calendar.resources.js.map +1 -1
- package/internals/i18n/EN/chat.resources.d.ts +8 -2
- package/internals/i18n/EN/chat.resources.js +3 -10
- package/internals/i18n/EN/chat.resources.js.map +1 -1
- package/internals/i18n/EN/date-picker.resources.d.ts +6 -4
- package/internals/i18n/EN/date-picker.resources.js +1 -7
- package/internals/i18n/EN/date-picker.resources.js.map +1 -1
- package/internals/i18n/EN/date-range-picker.resources.d.ts +9 -2
- package/internals/i18n/EN/date-range-picker.resources.js +2 -2
- package/internals/i18n/EN/date-range-picker.resources.js.map +1 -1
- package/internals/i18n/i18n-controller.d.ts +44 -46
- package/internals/i18n/i18n-controller.js +46 -33
- package/internals/i18n/i18n-controller.js.map +1 -1
- package/internals/i18n/utils.d.ts +9 -4
- package/internals/i18n/utils.js +4 -27
- package/internals/i18n/utils.js.map +1 -1
- package/internals/mixins/alert.d.ts +10 -25
- package/internals/mixins/alert.js.map +1 -1
- package/internals/mixins/combo-box.d.ts +21 -11
- package/internals/mixins/combo-box.js +16 -22
- package/internals/mixins/combo-box.js.map +1 -1
- package/internals/mixins/event-emitter.js +9 -11
- package/internals/mixins/event-emitter.js.map +1 -1
- package/internals/mixins/forms/associated-required.d.ts +4 -4
- package/internals/mixins/forms/associated-required.js.map +1 -1
- package/internals/mixins/forms/associated.d.ts +4 -2
- package/internals/mixins/forms/associated.js +42 -19
- package/internals/mixins/forms/associated.js.map +1 -1
- package/internals/mixins/forms/form-transformers.js.map +1 -1
- package/internals/mixins/forms/types.d.ts +27 -78
- package/internals/mixins/forms/types.js.map +1 -1
- package/internals/mixins/group.d.ts +18 -0
- package/internals/mixins/group.js +37 -0
- package/internals/mixins/group.js.map +1 -0
- package/internals/mixins/i18n.d.ts +10 -16
- package/internals/mixins/i18n.js.map +1 -1
- package/internals/mixins/mask-behavior.d.ts +8 -22
- package/internals/mixins/mask-behavior.js +1 -2
- package/internals/mixins/mask-behavior.js.map +1 -1
- package/internals/mixins/option.d.ts +1 -2
- package/internals/mixins/option.js +2 -1
- package/internals/mixins/option.js.map +1 -1
- package/internals/part-map.d.ts +4 -2
- package/internals/part-map.js +1 -1
- package/internals/part-map.js.map +1 -1
- package/internals/templates/input-shell.d.ts +8 -17
- package/internals/templates/input-shell.js +4 -1
- package/internals/templates/input-shell.js.map +1 -1
- package/internals/templates/masked-input.d.ts +7 -8
- package/internals/templates/masked-input.js.map +1 -1
- package/internals/templates/slotted-icon.d.ts +7 -12
- package/internals/templates/slotted-icon.js.map +1 -1
- package/internals/templates/toggle-shell.d.ts +19 -19
- package/internals/templates/toggle-shell.js +12 -8
- package/internals/templates/toggle-shell.js.map +1 -1
- package/internals/timing.d.ts +5 -14
- package/internals/timing.js.map +1 -1
- package/internals/utils/arrays.d.ts +21 -21
- package/internals/utils/arrays.js +14 -0
- package/internals/utils/arrays.js.map +1 -1
- package/internals/utils/dom.d.ts +53 -41
- package/internals/utils/dom.js +3 -4
- package/internals/utils/dom.js.map +1 -1
- package/internals/utils/events.d.ts +29 -16
- package/internals/utils/events.js +9 -1
- package/internals/utils/events.js.map +1 -1
- package/internals/utils/lit.d.ts +5 -2
- package/internals/utils/lit.js.map +1 -1
- package/internals/utils/math.d.ts +8 -6
- package/internals/utils/math.js.map +1 -1
- package/internals/utils/objects.d.ts +3 -20
- package/internals/utils/objects.js +1 -39
- package/internals/utils/objects.js.map +1 -1
- package/internals/utils/strings.d.ts +9 -11
- package/internals/utils/strings.js.map +1 -1
- package/internals/utils/types.d.ts +16 -3
- package/internals/utils/types.js +3 -0
- package/internals/utils/types.js.map +1 -1
- package/internals/validators.d.ts +9 -8
- package/internals/validators.js +12 -6
- package/internals/validators.js.map +1 -1
- package/package.json +1 -1
- package/skills/README.md +4 -3
- package/skills/igniteui-wc-choose-components/SKILL.md +2 -1
- package/skills/igniteui-wc-customize-component-theme/SKILL.md +2 -1
- package/skills/igniteui-wc-figma-to-app/SKILL.md +328 -0
- package/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +343 -0
- package/skills/igniteui-wc-figma-to-app/references/design-provenance.md +199 -0
- package/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +489 -0
- package/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +370 -0
- package/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +222 -0
- package/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +363 -0
- package/skills/igniteui-wc-figma-to-app/references/project-setup.md +105 -0
- package/skills/igniteui-wc-figma-to-app/references/theme-generation.md +180 -0
- package/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +370 -0
- package/skills/igniteui-wc-generate-from-image-design/SKILL.md +2 -1
- package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +3 -3
- package/skills/igniteui-wc-grids/SKILL.md +133 -0
- package/skills/igniteui-wc-integrate-with-framework/SKILL.md +2 -1
- package/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +2 -1
- package/skills/igniteui-wc-optimize-bundle-size/SKILL.md +2 -1
- package/theming/config.d.ts +14 -5
- package/theming/config.js +38 -18
- package/theming/config.js.map +1 -1
- package/theming/context.d.ts +1 -23
- package/theming/context.js.map +1 -1
- package/theming/theming-controller.d.ts +2 -32
- package/theming/theming-controller.js +15 -21
- package/theming/theming-controller.js.map +1 -1
- package/theming/theming-event.d.ts +0 -7
- package/theming/theming-event.js +0 -13
- package/theming/theming-event.js.map +1 -1
- package/theming/types.d.ts +1 -8
- package/theming/types.js.map +1 -1
- package/web-types.json +3 -3
- package/animations/presets/slide/index.d.ts +0 -3
- package/animations/presets/slide/index.js +0 -16
- package/animations/presets/slide/index.js.map +0 -1
- package/components/resize-container/themes/resize-container.base.css.js.map +0 -1
- package/internals/controllers/root-scroll.d.ts +0 -31
- package/internals/controllers/root-scroll.js +0 -71
- package/internals/controllers/root-scroll.js.map +0 -1
- package/theming/utils.d.ts +0 -11
- package/theming/utils.js +0 -20
- package/theming/utils.js.map +0 -1
- /package/components/{resize-container/themes/resize-container.base.css.d.ts → breadcrumb/themes/breadcrumb.base.css.d.ts} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The key names, and the case-insensitive key check.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The module has no imports, so a consumer of a key name depends on nothing
|
|
6
|
+
* else. The modifier table and the combination helpers live with their only
|
|
7
|
+
* consumer, the key-bindings controller.
|
|
8
|
+
*/
|
|
9
|
+
export declare const arrowLeft: "ArrowLeft";
|
|
10
|
+
export declare const arrowRight: "ArrowRight";
|
|
11
|
+
export declare const arrowUp: "ArrowUp";
|
|
12
|
+
export declare const arrowDown: "ArrowDown";
|
|
13
|
+
export declare const enterKey: "Enter";
|
|
14
|
+
export declare const spaceBar: " ";
|
|
15
|
+
export declare const escapeKey: "Escape";
|
|
16
|
+
export declare const homeKey: "Home";
|
|
17
|
+
export declare const endKey: "End";
|
|
18
|
+
export declare const pageUpKey: "PageUp";
|
|
19
|
+
export declare const pageDownKey: "PageDown";
|
|
20
|
+
export declare const tabKey: "Tab";
|
|
21
|
+
export declare const altKey: "Alt";
|
|
22
|
+
export declare const ctrlKey: "Control";
|
|
23
|
+
export declare const metaKey: "Meta";
|
|
24
|
+
export declare const shiftKey: "Shift";
|
|
25
|
+
/**
|
|
26
|
+
* Whether the key of the event matches `key`, without regard to case.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Prefer it over a direct comparison with `event.key`. A caller can hold a
|
|
30
|
+
* normalized lowercase name, while an event carries the canonical case.
|
|
31
|
+
*/
|
|
32
|
+
export declare function isKey(event: KeyboardEvent, key: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const arrowLeft = 'ArrowLeft';
|
|
2
|
+
export const arrowRight = 'ArrowRight';
|
|
3
|
+
export const arrowUp = 'ArrowUp';
|
|
4
|
+
export const arrowDown = 'ArrowDown';
|
|
5
|
+
export const enterKey = 'Enter';
|
|
6
|
+
export const spaceBar = ' ';
|
|
7
|
+
export const escapeKey = 'Escape';
|
|
8
|
+
export const homeKey = 'Home';
|
|
9
|
+
export const endKey = 'End';
|
|
10
|
+
export const pageUpKey = 'PageUp';
|
|
11
|
+
export const pageDownKey = 'PageDown';
|
|
12
|
+
export const tabKey = 'Tab';
|
|
13
|
+
export const altKey = 'Alt';
|
|
14
|
+
export const ctrlKey = 'Control';
|
|
15
|
+
export const metaKey = 'Meta';
|
|
16
|
+
export const shiftKey = 'Shift';
|
|
17
|
+
export function isKey(event, key) {
|
|
18
|
+
return event.key.toLowerCase() === key.toLowerCase();
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/internals/controllers/keys.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,SAAS,GAAG,WAAoB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,YAAqB,CAAC;AAChD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAkB,CAAC;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,WAAoB,CAAC;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAgB,CAAC;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAY,CAAC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,QAAiB,CAAC;AAC3C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAe,CAAC;AACvC,MAAM,CAAC,MAAM,MAAM,GAAG,KAAc,CAAC;AACrC,MAAM,CAAC,MAAM,SAAS,GAAG,QAAiB,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,UAAmB,CAAC;AAC/C,MAAM,CAAC,MAAM,MAAM,GAAG,KAAc,CAAC;AAGrC,MAAM,CAAC,MAAM,MAAM,GAAG,KAAc,CAAC;AACrC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAkB,CAAC;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAe,CAAC;AACvC,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAgB,CAAC;AASzC,MAAM,UAAU,KAAK,CAAC,KAAoB,EAAE,GAAW;IACrD,OAAO,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;AACvD,CAAC","sourcesContent":["/**\n * The key names, and the case-insensitive key check.\n *\n * @remarks\n * The module has no imports, so a consumer of a key name depends on nothing\n * else. The modifier table and the combination helpers live with their only\n * consumer, the key-bindings controller.\n */\n\n/* Common keys */\nexport const arrowLeft = 'ArrowLeft' as const;\nexport const arrowRight = 'ArrowRight' as const;\nexport const arrowUp = 'ArrowUp' as const;\nexport const arrowDown = 'ArrowDown' as const;\nexport const enterKey = 'Enter' as const;\nexport const spaceBar = ' ' as const;\nexport const escapeKey = 'Escape' as const;\nexport const homeKey = 'Home' as const;\nexport const endKey = 'End' as const;\nexport const pageUpKey = 'PageUp' as const;\nexport const pageDownKey = 'PageDown' as const;\nexport const tabKey = 'Tab' as const;\n\n/* Modifiers */\nexport const altKey = 'Alt' as const;\nexport const ctrlKey = 'Control' as const;\nexport const metaKey = 'Meta' as const;\nexport const shiftKey = 'Shift' as const;\n\n/**\n * Whether the key of the event matches `key`, without regard to case.\n *\n * @remarks\n * Prefer it over a direct comparison with `event.key`. A caller can hold a\n * normalized lowercase name, while an event carries the canonical case.\n */\nexport function isKey(event: KeyboardEvent, key: string): boolean {\n return event.key.toLowerCase() === key.toLowerCase();\n}\n"]}
|
|
@@ -1,54 +1,36 @@
|
|
|
1
1
|
import { type ReactiveController, type ReactiveControllerHost } from 'lit';
|
|
2
2
|
/** @hidden */
|
|
3
3
|
export interface MutationControllerConfig<T extends Node = Node> {
|
|
4
|
-
/** The callback function to run when a mutation occurs. */
|
|
5
4
|
callback: MutationControllerCallback<T>;
|
|
6
|
-
/** The
|
|
5
|
+
/** The options of the underlying `MutationObserver`. */
|
|
7
6
|
config: MutationObserverInit;
|
|
8
|
-
/**
|
|
9
|
-
* The element to observe.
|
|
10
|
-
* If left out, the observer will listen on the host component itself.
|
|
11
|
-
*/
|
|
7
|
+
/** The element to observe. Defaults to the host component. */
|
|
12
8
|
target?: Element;
|
|
13
|
-
/**
|
|
14
|
-
* A filter configuration.
|
|
15
|
-
* See {@link MutationControllerFilter|this} for additional information.
|
|
16
|
-
*/
|
|
9
|
+
/** See {@link MutationControllerFilter}. */
|
|
17
10
|
filter?: MutationControllerFilter<T>;
|
|
18
11
|
}
|
|
19
12
|
type MutationControllerCallback<T extends Node = Node> = (params: MutationControllerParams<T>) => unknown;
|
|
20
|
-
/**
|
|
21
|
-
* Filter configuration to return elements that either match
|
|
22
|
-
* an array of selector strings or a predicate function.
|
|
23
|
-
*/
|
|
13
|
+
/** Keeps the nodes that match a selector list or a predicate. */
|
|
24
14
|
type MutationControllerFilter<T extends Node = Node> = string[] | ((node: T) => boolean);
|
|
25
15
|
type MutationDOMChange<T extends Node = Node> = {
|
|
26
|
-
/** The parent of the added
|
|
16
|
+
/** The parent of the added element or of the removed element. */
|
|
27
17
|
target: Element;
|
|
28
|
-
/** The added
|
|
18
|
+
/** The added element or the removed element. */
|
|
29
19
|
node: T;
|
|
30
20
|
};
|
|
31
21
|
type MutationAttributeChange<T extends Node = Node> = {
|
|
32
|
-
/** The
|
|
22
|
+
/** The element of the changed attribute. */
|
|
33
23
|
node: T;
|
|
34
|
-
/** The changed attribute name. */
|
|
35
24
|
attributeName: string | null;
|
|
36
25
|
};
|
|
37
26
|
type MutationChange<T extends Node = Node> = {
|
|
38
|
-
/** Elements that have attribute(s) changes. */
|
|
39
27
|
attributes: MutationAttributeChange<T>[];
|
|
40
|
-
/** Elements that have been added. */
|
|
41
28
|
added: MutationDOMChange<T>[];
|
|
42
|
-
/** Elements that have been removed. */
|
|
43
29
|
removed: MutationDOMChange<T>[];
|
|
44
30
|
};
|
|
45
31
|
export type MutationControllerParams<T extends Node = Node> = {
|
|
46
|
-
/** The
|
|
47
|
-
records: MutationRecord[];
|
|
48
|
-
/** The aggregated changes. */
|
|
32
|
+
/** The changes that match the filter, grouped by kind. */
|
|
49
33
|
changes: MutationChange<T>;
|
|
50
|
-
/** The observer controller instance. */
|
|
51
|
-
observer: MutationController<T>;
|
|
52
34
|
};
|
|
53
35
|
declare class MutationController<T extends Node = Node> implements ReactiveController {
|
|
54
36
|
private readonly _host;
|
|
@@ -64,22 +46,17 @@ declare class MutationController<T extends Node = Node> implements ReactiveContr
|
|
|
64
46
|
hostDisconnected(): void;
|
|
65
47
|
private _collect;
|
|
66
48
|
private _process;
|
|
67
|
-
/**
|
|
68
|
-
* Begin receiving notifications of changes to the DOM based
|
|
69
|
-
* on the configured {@link MutationControllerConfig.target|target} and observer {@link MutationControllerConfig.config|options}.
|
|
70
|
-
*/
|
|
49
|
+
/** Starts the observation of the configured target. */
|
|
71
50
|
observe(): void;
|
|
72
|
-
/** Stop watching for mutations. */
|
|
73
51
|
disconnect(): void;
|
|
74
52
|
}
|
|
75
53
|
/**
|
|
76
|
-
* Creates
|
|
77
|
-
*
|
|
78
|
-
* Automatically starts/stops observing for mutation changes
|
|
79
|
-
* in the respective component connect/disconnect callbacks.
|
|
54
|
+
* Creates a mutation controller with `config`, and adds it to `host`.
|
|
80
55
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* The observation runs while the host is connected. The observer disconnects
|
|
58
|
+
* for the duration of the callback, so a change that the callback makes
|
|
59
|
+
* starts no new notification.
|
|
83
60
|
*/
|
|
84
61
|
export declare function createMutationController<T extends Node = Node>(host: ReactiveControllerHost & Element, config: MutationControllerConfig<T>): MutationController<T>;
|
|
85
62
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-observer.js","sourceRoot":"","sources":["../../../src/internals/controllers/mutation-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAGT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"mutation-observer.js","sourceRoot":"","sources":["../../../src/internals/controllers/mutation-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAGT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoD5C,SAAS,iBAAiB,CACxB,MAAoC;IAEpC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,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AAS,EAAE,UAAU,EAAE,CAAC;IAC/B,CAAC;CACF;AAUD,MAAM,UAAU,wBAAwB,CACtC,IAAsC,EACtC,MAAmC;IAEnC,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import {\n isServer,\n type ReactiveController,\n type ReactiveControllerHost,\n} from 'lit';\nimport { isElement } from '../utils/dom.js';\n\n/** @hidden */\nexport interface MutationControllerConfig<T extends Node = Node> {\n callback: MutationControllerCallback<T>;\n /** The options of the underlying `MutationObserver`. */\n config: MutationObserverInit;\n /** The element to observe. Defaults to the host component. */\n target?: Element;\n /** See {@link MutationControllerFilter}. */\n filter?: MutationControllerFilter<T>;\n}\n\ntype MutationControllerCallback<T extends Node = Node> = (\n params: MutationControllerParams<T>\n) => unknown;\n\n/** Keeps the nodes that match a selector list or a predicate. */\ntype MutationControllerFilter<T extends Node = Node> =\n | string[]\n | ((node: T) => boolean);\n\ntype MutationDOMChange<T extends Node = Node> = {\n /** The parent of the added element or of the removed element. */\n target: Element;\n /** The added element or the removed element. */\n node: T;\n};\n\ntype MutationAttributeChange<T extends Node = Node> = {\n /** The element of the changed attribute. */\n node: T;\n attributeName: string | null;\n};\n\ntype MutationChange<T extends Node = Node> = {\n attributes: MutationAttributeChange<T>[];\n added: MutationDOMChange<T>[];\n removed: MutationDOMChange<T>[];\n};\n\nexport type MutationControllerParams<T extends Node = Node> = {\n /** The changes that match the filter, grouped by kind. */\n changes: MutationChange<T>;\n};\n\n/**\n * Resolves a filter configuration into a node predicate.\n *\n * @remarks\n * The selectors join once, so a node match takes one `matches` call.\n */\nfunction createNodeMatcher<T extends Node = Node>(\n filter?: MutationControllerFilter<T>\n): (node: T) => boolean {\n if (!filter) {\n return () => true;\n }\n\n if (!Array.isArray(filter)) {\n return filter;\n }\n\n const selector = filter.join(',');\n\n return selector\n ? (node) => isElement(node) && node.matches(selector)\n : () => false;\n}\n\nclass MutationController<T extends Node = Node> implements ReactiveController {\n private readonly _host: ReactiveControllerHost & Element;\n private readonly _target: Element;\n private readonly _config: MutationObserverInit;\n private readonly _callback: MutationControllerCallback<T>;\n private readonly _matches: (node: T) => boolean;\n\n private _observer?: MutationObserver;\n\n constructor(\n host: ReactiveControllerHost & Element,\n options: MutationControllerConfig<T>\n ) {\n this._host = host;\n this._callback = options.callback;\n this._config = options.config;\n this._target = options.target ?? this._host;\n this._matches = createNodeMatcher(options.filter);\n\n if (!isServer) {\n this._observer = new MutationObserver((records) => {\n this.disconnect();\n this._callback.call(this._host, this._process(records));\n this.observe();\n });\n }\n\n host.addController(this);\n }\n\n /** @internal */\n public hostConnected(): void {\n this.observe();\n }\n\n /** @internal */\n public hostDisconnected(): void {\n this.disconnect();\n }\n\n private _collect(\n nodes: NodeList,\n target: Element,\n into: MutationDOMChange<T>[]\n ): void {\n for (const node of nodes) {\n if (this._matches(node as T)) {\n into.push({ target, node: node as T });\n }\n }\n }\n\n private _process(records: MutationRecord[]): MutationControllerParams<T> {\n const changes: MutationChange<T> = {\n attributes: [],\n added: [],\n removed: [],\n };\n\n for (const record of records) {\n const { type, target, attributeName, addedNodes, removedNodes } = record;\n\n if (type === 'attributes') {\n if (this._matches(target as T)) {\n changes.attributes.push({ node: target as T, attributeName });\n }\n } else if (type === 'childList') {\n this._collect(addedNodes, target as Element, changes.added);\n this._collect(removedNodes, target as Element, changes.removed);\n }\n }\n\n return { changes };\n }\n\n /** Starts the observation of the configured target. */\n public observe(): void {\n this._observer?.observe(this._target, this._config);\n }\n\n public disconnect(): void {\n this._observer?.disconnect();\n }\n}\n\n/**\n * Creates a mutation controller with `config`, and adds it to `host`.\n *\n * @remarks\n * The observation runs while the host is connected. The observer disconnects\n * for the duration of the callback, so a change that the callback makes\n * starts no new notification.\n */\nexport function createMutationController<T extends Node = Node>(\n host: ReactiveControllerHost & Element,\n config: MutationControllerConfig<T>\n): MutationController<T> {\n return new MutationController(host, config);\n}\n"]}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { type ReactiveController, type ReactiveControllerHost } from 'lit';
|
|
2
2
|
type ResizeObserverControllerCallback = (...args: Parameters<ResizeObserverCallback>) => unknown;
|
|
3
|
-
/**
|
|
4
|
-
* Configuration for initializing a resize controller.
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
3
|
+
/** @hidden */
|
|
7
4
|
export interface ResizeObserverControllerConfig {
|
|
8
|
-
/** The callback function to run when a resize mutation is triggered. */
|
|
9
5
|
callback: ResizeObserverControllerCallback;
|
|
10
|
-
/**
|
|
6
|
+
/** The options of the underlying `ResizeObserver`. */
|
|
11
7
|
options?: ResizeObserverOptions;
|
|
12
8
|
/**
|
|
13
|
-
* The
|
|
14
|
-
*
|
|
15
|
-
* If not provided, the host element will be set as initial target.
|
|
16
|
-
* Pass in `null` to skip setting an initial target.
|
|
9
|
+
* The first target element to observe. Defaults to the host. Pass `null`
|
|
10
|
+
* for no first target.
|
|
17
11
|
*/
|
|
18
12
|
target?: Element | null;
|
|
19
13
|
/**
|
|
20
|
-
* Whether
|
|
21
|
-
*
|
|
22
|
-
* Defaults to `true`. Set to `false` when the host already drives its own
|
|
23
|
-
* update cycle and an extra render per observed element is wasted work.
|
|
14
|
+
* Whether an observed target requests an update on the host. Defaults to
|
|
15
|
+
* `true`. Set it to `false` when the host controls its own update cycle.
|
|
24
16
|
*/
|
|
25
17
|
requestUpdate?: boolean;
|
|
26
18
|
}
|
|
@@ -30,12 +22,9 @@ declare class ResizeObserverController implements ReactiveController {
|
|
|
30
22
|
private readonly _observer;
|
|
31
23
|
private readonly _config;
|
|
32
24
|
constructor(host: ReactiveControllerHost & Element, config: ResizeObserverControllerConfig);
|
|
33
|
-
/** The elements currently being observed. */
|
|
34
25
|
get targets(): ReadonlySet<Element>;
|
|
35
|
-
/** Starts observing the `targe` element. */
|
|
36
26
|
observe(target: Element): void;
|
|
37
27
|
private _requestUpdate;
|
|
38
|
-
/** Stops observing the `target` element. */
|
|
39
28
|
unobserve(target: Element): void;
|
|
40
29
|
/** @internal */
|
|
41
30
|
hostConnected(): void;
|
|
@@ -43,8 +32,9 @@ declare class ResizeObserverController implements ReactiveController {
|
|
|
43
32
|
hostDisconnected(): void;
|
|
44
33
|
}
|
|
45
34
|
/**
|
|
46
|
-
* Creates a
|
|
47
|
-
*
|
|
35
|
+
* Creates a resize controller with
|
|
36
|
+
* {@link ResizeObserverControllerConfig | `config`}, adds it to `host`, and
|
|
37
|
+
* observes each target while the host is connected.
|
|
48
38
|
*/
|
|
49
39
|
export declare function createResizeObserverController(host: ReactiveControllerHost & Element, config: ResizeObserverControllerConfig): ResizeObserverController;
|
|
50
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-observer.js","sourceRoot":"","sources":["../../../src/internals/controllers/resize-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAGT,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"resize-observer.js","sourceRoot":"","sources":["../../../src/internals/controllers/resize-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,GAGT,MAAM,KAAK,CAAC;AAuBb,MAAM,wBAAwB;IAM5B,YACE,IAAsC,EACtC,MAAsC;QANvB,aAAQ,GAAG,IAAI,GAAG,EAAW,CAAC;QAQ7C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;QACjD,CAAC;QAGD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE,CAC9C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI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EAAE,MAAM,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import {\n isServer,\n type ReactiveController,\n type ReactiveControllerHost,\n} from 'lit';\n\ntype ResizeObserverControllerCallback = (\n ...args: Parameters<ResizeObserverCallback>\n) => unknown;\n\n/** @hidden */\nexport interface ResizeObserverControllerConfig {\n callback: ResizeObserverControllerCallback;\n /** The options of the underlying `ResizeObserver`. */\n options?: ResizeObserverOptions;\n /**\n * The first target element to observe. Defaults to the host. Pass `null`\n * for no first target.\n */\n target?: Element | null;\n /**\n * Whether an observed target requests an update on the host. Defaults to\n * `true`. Set it to `false` when the host controls its own update cycle.\n */\n requestUpdate?: boolean;\n}\n\nclass ResizeObserverController implements ReactiveController {\n private readonly _host: ReactiveControllerHost & Element;\n private readonly _targets = new Set<Element>();\n private readonly _observer!: ResizeObserver;\n private readonly _config: ResizeObserverControllerConfig;\n\n constructor(\n host: ReactiveControllerHost & Element,\n config: ResizeObserverControllerConfig\n ) {\n this._host = host;\n this._config = config;\n\n if (this._config.target !== null) {\n this._targets.add(this._config.target ?? host);\n }\n\n /* c8 ignore next 3 */\n if (isServer) {\n return;\n }\n\n this._observer = new ResizeObserver((entries) =>\n this._config.callback.call(this._host, entries, this._observer)\n );\n\n host.addController(this);\n }\n\n public get targets(): ReadonlySet<Element> {\n return this._targets;\n }\n\n public observe(target: Element): void {\n this._targets.add(target);\n this._observer.observe(target, this._config.options);\n this._requestUpdate();\n }\n\n private _requestUpdate(): void {\n if (this._config.requestUpdate ?? true) {\n this._host.requestUpdate();\n }\n }\n\n public unobserve(target: Element): void {\n this._targets.delete(target);\n this._observer.unobserve(target);\n }\n\n /** @internal */\n public hostConnected(): void {\n for (const target of this._targets) {\n this._observer.observe(target, this._config.options);\n }\n\n if (this._targets.size > 0) {\n this._requestUpdate();\n }\n }\n\n /** @internal */\n public hostDisconnected(): void {\n this._observer.disconnect();\n }\n}\n\n/**\n * Creates a resize controller with\n * {@link ResizeObserverControllerConfig | `config`}, adds it to `host`, and\n * observes each target while the host is connected.\n */\nexport function createResizeObserverController(\n host: ReactiveControllerHost & Element,\n config: ResizeObserverControllerConfig\n): ResizeObserverController {\n return new ResizeObserverController(host, config);\n}\n"]}
|
|
@@ -1,60 +1,32 @@
|
|
|
1
1
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
/** Configuration options for the RootClickController */
|
|
3
2
|
type RootClickControllerConfig = {
|
|
4
|
-
/**
|
|
5
|
-
* An optional callback function to execute when an outside click occurs.
|
|
6
|
-
* If not provided, the `hide()` method of the host will be called.
|
|
7
|
-
*/
|
|
3
|
+
/** Runs on an outside click. Defaults to the `hide()` method of the host. */
|
|
8
4
|
onHide?: () => void;
|
|
9
|
-
/**
|
|
10
|
-
* An optional additional HTMLElement that, if clicked, should not trigger the hide action.
|
|
11
|
-
* This is useful for elements like a toggle button that opens the component.
|
|
12
|
-
*/
|
|
5
|
+
/** An additional element whose clicks do not hide the host. */
|
|
13
6
|
target?: HTMLElement;
|
|
14
7
|
};
|
|
15
|
-
/** Interface for the host element that the RootClickController will be attached to. */
|
|
16
8
|
interface RootClickControllerHost extends ReactiveControllerHost, HTMLElement {
|
|
17
|
-
/**
|
|
18
|
-
* Indicates whether the host element is currently open or visible.
|
|
19
|
-
*/
|
|
20
9
|
open: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* If true, outside clicks will not trigger the hide action.
|
|
23
|
-
*/
|
|
24
10
|
keepOpenOnOutsideClick?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* A method on the host to hide or close itself.
|
|
27
|
-
* This will be called if `hideCallback` is not provided in the config.
|
|
28
|
-
*/
|
|
29
11
|
hide(): void;
|
|
30
12
|
}
|
|
31
13
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
14
|
+
* Hides a component when a click occurs outside of it, or outside the
|
|
15
|
+
* configured target.
|
|
34
16
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* subscribes to this single listener.
|
|
17
|
+
* @remarks
|
|
18
|
+
* The document keeps one pair of listeners for all active controllers, which
|
|
19
|
+
* act on the hosts of a shared set.
|
|
39
20
|
*/
|
|
40
21
|
declare class RootClickController implements ReactiveController {
|
|
41
22
|
private readonly _host;
|
|
42
23
|
private _config?;
|
|
43
24
|
constructor(host: RootClickControllerHost, config?: RootClickControllerConfig);
|
|
44
|
-
/**
|
|
45
|
-
* Adds the host to the set of active hosts and ensures the global
|
|
46
|
-
* document click listener is active if needed.
|
|
47
|
-
*/
|
|
25
|
+
/** Adds the host, and the document listeners for the first host. */
|
|
48
26
|
private _addActiveHost;
|
|
49
|
-
/**
|
|
50
|
-
* Removes the host from the set of active hosts and removes the global
|
|
51
|
-
* document click listener if no other hosts are active.
|
|
52
|
-
*/
|
|
27
|
+
/** Removes the host, and the document listeners for the last host. */
|
|
53
28
|
private _removeActiveHost;
|
|
54
|
-
/**
|
|
55
|
-
* Configures the active state of the controller based on the host's `open` property.
|
|
56
|
-
* If `host.open` is true, the controller becomes active; otherwise, it becomes inactive.
|
|
57
|
-
*/
|
|
29
|
+
/** Activates while the host is open and not kept open on an outside click. */
|
|
58
30
|
private _configureListeners;
|
|
59
31
|
/** Updates the controller configuration and active state. */
|
|
60
32
|
update(config?: RootClickControllerConfig): void;
|
|
@@ -63,9 +35,6 @@ declare class RootClickController implements ReactiveController {
|
|
|
63
35
|
/** @internal */
|
|
64
36
|
hostDisconnected(): void;
|
|
65
37
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Creates and adds a {@link RootClickController} instance with a {@link RootClickControllerConfig | configuration}
|
|
68
|
-
* to the given {@link RootClickControllerHost | host}.
|
|
69
|
-
*/
|
|
38
|
+
/** Creates a {@link RootClickController} and adds it to `host`. */
|
|
70
39
|
export declare function addRootClickController(host: RootClickControllerHost, config?: RootClickControllerConfig): RootClickController;
|
|
71
40
|
export type { RootClickController };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { createAbortHandle } from '../abort-handler.js';
|
|
2
2
|
import { isEmpty } from '../utils/arrays.js';
|
|
3
|
-
let ROOT_CLICK_LISTENER_ACTIVE = false;
|
|
4
3
|
const SHARED_ABORT_HANDLER = createAbortHandle();
|
|
5
4
|
const POINTER_DOWN_HOSTS = new Set();
|
|
6
5
|
const HOST_CONFIGURATIONS = new WeakMap();
|
|
7
6
|
const ACTIVE_HOSTS = new Set();
|
|
8
7
|
function isInsideHost(path, host, target) {
|
|
9
|
-
return path.
|
|
8
|
+
return path.includes(host) || (target != null && path.includes(target));
|
|
10
9
|
}
|
|
11
10
|
function handlePointerDown(event) {
|
|
12
11
|
POINTER_DOWN_HOSTS.clear();
|
|
@@ -40,8 +39,9 @@ class RootClickController {
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
_addActiveHost() {
|
|
42
|
+
const isFirstHost = isEmpty(ACTIVE_HOSTS);
|
|
43
43
|
ACTIVE_HOSTS.add(this._host);
|
|
44
|
-
if (
|
|
44
|
+
if (isFirstHost) {
|
|
45
45
|
const options = {
|
|
46
46
|
capture: true,
|
|
47
47
|
signal: SHARED_ABORT_HANDLER.signal,
|
|
@@ -51,15 +51,13 @@ class RootClickController {
|
|
|
51
51
|
passive: true,
|
|
52
52
|
});
|
|
53
53
|
document.addEventListener('click', handleRootClick, options);
|
|
54
|
-
ROOT_CLICK_LISTENER_ACTIVE = true;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
_removeActiveHost() {
|
|
58
57
|
ACTIVE_HOSTS.delete(this._host);
|
|
59
58
|
POINTER_DOWN_HOSTS.delete(this._host);
|
|
60
|
-
if (isEmpty(ACTIVE_HOSTS)
|
|
59
|
+
if (isEmpty(ACTIVE_HOSTS)) {
|
|
61
60
|
SHARED_ABORT_HANDLER.abort();
|
|
62
|
-
ROOT_CLICK_LISTENER_ACTIVE = false;
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
63
|
_configureListeners() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-click.js","sourceRoot":"","sources":["../../../src/internals/controllers/root-click.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"root-click.js","sourceRoot":"","sources":["../../../src/internals/controllers/root-click.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAgB7C,MAAM,oBAAoB,GAAG,iBAAiB,EAAE,CAAC;AAGjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAA2B,CAAC;AAE9D,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAGpC,CAAC;AAEJ,MAAM,YAAY,GAAG,IAAI,GAAG,EAA2B,CAAC;AASxD,SAAS,YAAY,CACnB,IAAmB,EACnB,IAA6B,EAC7B,MAAoB;IAEpB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAmB;IAC5C,kBAAkB,CAAC,KAAK,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAElC,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;YACpE,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAmB;IAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAGlC,KAAK,MAA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G,OAAO;gBACV,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;YACH,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAGO,iBAAiB;QACvB,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEtC,IAAI,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAC1B,oBAAoB,CAAC,KAAK,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;IAGO,mBAAmB;QACzB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB;YACnD,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE;YACvB,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC/B,CAAC;IAGM,MAAM,CAAC,MAAkC;QAC9C,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;YAC9C,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAGM,aAAa;QAClB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAGM,gBAAgB;QACrB,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;CACF;AAGD,MAAM,UAAU,sBAAsB,CACpC,IAA6B,EAC7B,MAAkC;IAElC,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport { createAbortHandle } from '../abort-handler.js';\nimport { isEmpty } from '../utils/arrays.js';\n\ntype RootClickControllerConfig = {\n /** Runs on an outside click. Defaults to the `hide()` method of the host. */\n onHide?: () => void;\n /** An additional element whose clicks do not hide the host. */\n target?: HTMLElement;\n};\n\ninterface RootClickControllerHost extends ReactiveControllerHost, HTMLElement {\n open: boolean;\n keepOpenOnOutsideClick?: boolean;\n hide(): void;\n}\n\n/** Aborts the shared document listeners. */\nconst SHARED_ABORT_HANDLER = createAbortHandle();\n\n/** The hosts that received a pointerdown event inside them. */\nconst POINTER_DOWN_HOSTS = new Set<RootClickControllerHost>();\n\nconst HOST_CONFIGURATIONS = new WeakMap<\n RootClickControllerHost,\n RootClickControllerConfig\n>();\n\nconst ACTIVE_HOSTS = new Set<RootClickControllerHost>();\n\n/**\n * Whether `path` contains the host or the `target` of its configuration.\n *\n * @remarks\n * The caller builds the composed path once per event, and a scan of it beats\n * a set for the one or two hosts that are open together.\n */\nfunction isInsideHost(\n path: EventTarget[],\n host: RootClickControllerHost,\n target?: HTMLElement\n): boolean {\n return path.includes(host) || (target != null && path.includes(target));\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n POINTER_DOWN_HOSTS.clear();\n const path = event.composedPath();\n\n for (const host of ACTIVE_HOSTS) {\n if (isInsideHost(path, host, HOST_CONFIGURATIONS.get(host)?.target)) {\n POINTER_DOWN_HOSTS.add(host);\n }\n }\n}\n\nfunction handleRootClick(event: PointerEvent): void {\n const path = event.composedPath();\n\n // A hidden host leaves ACTIVE_HOSTS, so the loop runs over a copy.\n for (const host of Array.from(ACTIVE_HOSTS)) {\n if (host.keepOpenOnOutsideClick || POINTER_DOWN_HOSTS.has(host)) {\n continue;\n }\n\n const config = HOST_CONFIGURATIONS.get(host);\n\n if (!isInsideHost(path, host, config?.target)) {\n config?.onHide ? config.onHide.call(host) : host.hide();\n }\n }\n\n POINTER_DOWN_HOSTS.clear();\n}\n\n/* blazorSuppress */\n/**\n * Hides a component when a click occurs outside of it, or outside the\n * configured target.\n *\n * @remarks\n * The document keeps one pair of listeners for all active controllers, which\n * act on the hosts of a shared set.\n */\nclass RootClickController implements ReactiveController {\n private readonly _host: RootClickControllerHost;\n private _config?: RootClickControllerConfig;\n\n constructor(\n host: RootClickControllerHost,\n config?: RootClickControllerConfig\n ) {\n this._host = host;\n this._config = config;\n this._host.addController(this);\n\n if (this._config) {\n HOST_CONFIGURATIONS.set(this._host, this._config);\n }\n }\n\n /** Adds the host, and the document listeners for the first host. */\n private _addActiveHost(): void {\n const isFirstHost = isEmpty(ACTIVE_HOSTS);\n ACTIVE_HOSTS.add(this._host);\n\n if (isFirstHost) {\n const options: AddEventListenerOptions = {\n capture: true,\n signal: SHARED_ABORT_HANDLER.signal,\n };\n\n document.addEventListener('pointerdown', handlePointerDown, {\n ...options,\n passive: true,\n });\n document.addEventListener('click', handleRootClick, options);\n }\n }\n\n /** Removes the host, and the document listeners for the last host. */\n private _removeActiveHost(): void {\n ACTIVE_HOSTS.delete(this._host);\n POINTER_DOWN_HOSTS.delete(this._host);\n\n if (isEmpty(ACTIVE_HOSTS)) {\n SHARED_ABORT_HANDLER.abort();\n }\n }\n\n /** Activates while the host is open and not kept open on an outside click. */\n private _configureListeners(): void {\n this._host.open && !this._host.keepOpenOnOutsideClick\n ? this._addActiveHost()\n : this._removeActiveHost();\n }\n\n /** Updates the controller configuration and active state. */\n public update(config?: RootClickControllerConfig): void {\n if (config) {\n this._config = { ...this._config, ...config };\n HOST_CONFIGURATIONS.set(this._host, this._config);\n }\n\n this._configureListeners();\n }\n\n /** @internal */\n public hostConnected(): void {\n this._configureListeners();\n }\n\n /** @internal */\n public hostDisconnected(): void {\n this._removeActiveHost();\n }\n}\n\n/** Creates a {@link RootClickController} and adds it to `host`. */\nexport function addRootClickController(\n host: RootClickControllerHost,\n config?: RootClickControllerConfig\n): RootClickController {\n return new RootClickController(host, config);\n}\n\nexport type { RootClickController };\n"]}
|
|
@@ -2,62 +2,43 @@ import type { ReactiveControllerHost } from 'lit';
|
|
|
2
2
|
import { type KeyBindingControllerOptions, type KeyBindingOptions } from './key-bindings.js';
|
|
3
3
|
type RovingFocusHost = ReactiveControllerHost & HTMLElement;
|
|
4
4
|
/**
|
|
5
|
-
* Whether an arrow axis navigates. A predicate keeps the keys bound
|
|
6
|
-
*
|
|
7
|
-
* for hosts that switch orientation at runtime.
|
|
5
|
+
* Whether an arrow axis navigates. A predicate keeps the keys bound and
|
|
6
|
+
* gates only the navigation, for a host that changes orientation at runtime.
|
|
8
7
|
*/
|
|
9
8
|
type RovingFocusAxis = boolean | (() => boolean);
|
|
10
9
|
type RovingFocusControllerOptions<T extends Element> = {
|
|
11
|
-
/**
|
|
12
|
-
* The keyboard-navigable items, in order, with non-interactive ones
|
|
13
|
-
* already excluded.
|
|
14
|
-
*/
|
|
10
|
+
/** The keyboard-navigable items, in order, without the inert ones. */
|
|
15
11
|
items: () => T[];
|
|
16
|
-
/**
|
|
17
|
-
* The item navigation moves relative to - typically resolved from the
|
|
18
|
-
* focused element. Arrow navigation and activation are no-ops while nullish.
|
|
19
|
-
*/
|
|
12
|
+
/** The item that navigation moves from, as the host resolves it. */
|
|
20
13
|
current: () => T | null | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Moves focus to `item`. The host owns the focus delegation and any side
|
|
23
|
-
* effects riding along with it (scrolling, selection-follows-focus).
|
|
24
|
-
*/
|
|
14
|
+
/** Moves the focus to `item`. The host owns any side effects. */
|
|
25
15
|
focusItem: (item: T) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Invoked with the current item on Enter/Space, when the item is part of
|
|
28
|
-
* {@link RovingFocusControllerOptions.items}. Omit to skip the activation
|
|
29
|
-
* binding altogether.
|
|
30
|
-
*/
|
|
16
|
+
/** Runs with the current item on Enter and on Space. */
|
|
31
17
|
activateItem?: (item: T) => void;
|
|
32
18
|
/** Binding options for the activation keys. */
|
|
33
19
|
activateOptions?: KeyBindingOptions;
|
|
34
|
-
/**
|
|
35
|
-
* Whether ArrowLeft/ArrowRight navigate, following the writing direction.
|
|
36
|
-
* Defaults to `true`.
|
|
37
|
-
*/
|
|
20
|
+
/** Whether ArrowLeft and ArrowRight navigate. Defaults to `true`. */
|
|
38
21
|
horizontal?: RovingFocusAxis;
|
|
39
|
-
/** Whether ArrowUp
|
|
22
|
+
/** Whether ArrowUp and ArrowDown navigate. Defaults to `false`. */
|
|
40
23
|
vertical?: RovingFocusAxis;
|
|
41
|
-
/** Whether Home
|
|
24
|
+
/** Whether Home and End jump to the first and last item. Default `true`. */
|
|
42
25
|
homeEnd?: boolean;
|
|
43
26
|
/**
|
|
44
27
|
* How arrow navigation treats a nullish current item:
|
|
45
28
|
* - `skip` - do nothing (default)
|
|
46
|
-
* - `wrap` - navigate from
|
|
47
|
-
*
|
|
29
|
+
* - `wrap` - navigate from outside the list, so "next" lands on the first
|
|
30
|
+
* item and "previous" on the last one
|
|
48
31
|
*/
|
|
49
32
|
missingCurrent?: 'skip' | 'wrap';
|
|
50
33
|
/** Options forwarded to the underlying key-bindings controller. */
|
|
51
34
|
keybindings?: KeyBindingControllerOptions;
|
|
52
35
|
};
|
|
53
36
|
/**
|
|
54
|
-
* Implements the roving keyboard navigation
|
|
55
|
-
* components: Home/End jumps and wrapping ArrowKey moves over a flat list of
|
|
56
|
-
* enabled items, relative to the currently focused one, with the horizontal
|
|
57
|
-
* axis following the writing direction.
|
|
37
|
+
* Implements the roving keyboard navigation of the container components.
|
|
58
38
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Moves wrap over a flat list, and the horizontal axis follows the writing
|
|
41
|
+
* direction. A hierarchy, such as the tree, needs its own navigation.
|
|
61
42
|
*/
|
|
62
43
|
declare class RovingFocusController<T extends Element> {
|
|
63
44
|
private readonly _host;
|
|
@@ -67,6 +48,6 @@ declare class RovingFocusController<T extends Element> {
|
|
|
67
48
|
private _move;
|
|
68
49
|
private _activate;
|
|
69
50
|
}
|
|
70
|
-
/** Creates
|
|
51
|
+
/** Creates a {@link RovingFocusController} for the given host. */
|
|
71
52
|
export declare function addRovingFocusController<T extends Element>(host: RovingFocusHost, options: RovingFocusControllerOptions<T>): RovingFocusController<T>;
|
|
72
53
|
export type { RovingFocusController, RovingFocusControllerOptions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roving-focus.js","sourceRoot":"","sources":["../../../src/internals/controllers/roving-focus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,GAGR,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"roving-focus.js","sourceRoot":"","sources":["../../../src/internals/controllers/roving-focus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,GAGR,MAAM,mBAAmB,CAAC;AA6C3B,MAAM,qBAAqB;IAIzB,YAAY,IAAqB,EAAE,OAAwC;QACzE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAExB,MAAM,EACJ,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,KAAK,EAChB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AAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,YAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;CACF;AAGD,MAAM,UAAU,wBAAwB,CACtC,IAAqB,EACrB,OAAwC;IAExC,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC","sourcesContent":["import type { ReactiveControllerHost } from 'lit';\nimport { firstOf, isEmpty, lastOf } from '../utils/arrays.js';\nimport { isLTR } from '../utils/dom.js';\nimport { wrap } from '../utils/math.js';\nimport { isFunction } from '../utils/types.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n endKey,\n homeKey,\n type KeyBindingControllerOptions,\n type KeyBindingOptions,\n} from './key-bindings.js';\n\ntype RovingFocusHost = ReactiveControllerHost & HTMLElement;\n\n/**\n * Whether an arrow axis navigates. A predicate keeps the keys bound and\n * gates only the navigation, for a host that changes orientation at runtime.\n */\ntype RovingFocusAxis = boolean | (() => boolean);\n\ntype RovingFocusControllerOptions<T extends Element> = {\n /** The keyboard-navigable items, in order, without the inert ones. */\n items: () => T[];\n /** The item that navigation moves from, as the host resolves it. */\n current: () => T | null | undefined;\n /** Moves the focus to `item`. The host owns any side effects. */\n focusItem: (item: T) => void;\n /** Runs with the current item on Enter and on Space. */\n activateItem?: (item: T) => void;\n /** Binding options for the activation keys. */\n activateOptions?: KeyBindingOptions;\n /** Whether ArrowLeft and ArrowRight navigate. Defaults to `true`. */\n horizontal?: RovingFocusAxis;\n /** Whether ArrowUp and ArrowDown navigate. Defaults to `false`. */\n vertical?: RovingFocusAxis;\n /** Whether Home and End jump to the first and last item. Default `true`. */\n homeEnd?: boolean;\n /**\n * How arrow navigation treats a nullish current item:\n * - `skip` - do nothing (default)\n * - `wrap` - navigate from outside the list, so \"next\" lands on the first\n * item and \"previous\" on the last one\n */\n missingCurrent?: 'skip' | 'wrap';\n /** Options forwarded to the underlying key-bindings controller. */\n keybindings?: KeyBindingControllerOptions;\n};\n\n/**\n * Implements the roving keyboard navigation of the container components.\n *\n * @remarks\n * Moves wrap over a flat list, and the horizontal axis follows the writing\n * direction. A hierarchy, such as the tree, needs its own navigation.\n */\nclass RovingFocusController<T extends Element> {\n private readonly _host: RovingFocusHost;\n private readonly _options: RovingFocusControllerOptions<T>;\n\n constructor(host: RovingFocusHost, options: RovingFocusControllerOptions<T>) {\n this._host = host;\n this._options = options;\n\n const {\n horizontal = true,\n vertical = false,\n homeEnd = true,\n activateItem,\n activateOptions,\n keybindings,\n } = options;\n\n const bindings = addKeybindings(host, keybindings);\n\n if (horizontal) {\n bindings\n .set(arrowLeft, () => this._move(-1, horizontal, true))\n .set(arrowRight, () => this._move(1, horizontal, true));\n }\n\n if (vertical) {\n bindings\n .set(arrowUp, () => this._move(-1, vertical, false))\n .set(arrowDown, () => this._move(1, vertical, false));\n }\n\n if (homeEnd) {\n bindings\n .set(homeKey, () => this._focus(firstOf(this._options.items())))\n .set(endKey, () => this._focus(lastOf(this._options.items())));\n }\n\n if (activateItem) {\n bindings.setActivateHandler(() => this._activate(), activateOptions);\n }\n }\n\n private _focus(item?: T): void {\n if (item) {\n this._options.focusItem.call(this._host, item);\n }\n }\n\n private _move(delta: -1 | 1, axis: RovingFocusAxis, rtlAware: boolean): void {\n if (isFunction(axis) && !axis.call(this._host)) {\n return;\n }\n\n const items = this._options.items();\n const current = this._options.current();\n\n if (\n isEmpty(items) ||\n (!current && this._options.missingCurrent !== 'wrap')\n ) {\n return;\n }\n\n // An item outside the set gives -1, so the move wraps in from an edge.\n const index = current ? items.indexOf(current) : -1;\n const direction = rtlAware && !isLTR(this._host) ? -delta : delta;\n const next = wrap(0, items.length - 1, index + direction);\n\n this._focus(items[next]);\n }\n\n private _activate(): void {\n const current = this._options.current();\n\n if (current && this._options.items().includes(current)) {\n this._options.activateItem!.call(this._host, current);\n }\n }\n}\n\n/** Creates a {@link RovingFocusController} for the given host. */\nexport function addRovingFocusController<T extends Element>(\n host: RovingFocusHost,\n options: RovingFocusControllerOptions<T>\n): RovingFocusController<T> {\n return new RovingFocusController(host, options);\n}\n\nexport type { RovingFocusController, RovingFocusControllerOptions };\n"]}
|