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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builds a string from format specifiers and replacement parameters.
|
|
3
|
-
* Will coerce non-string parameters to their string representations.
|
|
4
3
|
*
|
|
5
4
|
* @example
|
|
6
5
|
* ```typescript
|
|
@@ -10,24 +9,23 @@
|
|
|
10
9
|
*/
|
|
11
10
|
export declare function formatString(template: string, ...params: unknown[]): string;
|
|
12
11
|
/**
|
|
13
|
-
* Splits a string into
|
|
14
|
-
*
|
|
12
|
+
* Splits a string into words at whitespace, `-`, `_` and camelCase
|
|
13
|
+
* boundaries.
|
|
15
14
|
*/
|
|
16
15
|
export declare function splitToWords(text: string): string[];
|
|
17
16
|
/** Converts a string to kebab-case. */
|
|
18
17
|
export declare function toKebabCase(text: string): string;
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* Substitute with `RegExp.escape` once it has enough support:
|
|
19
|
+
* Escapes each regular expression character in a string, so that `RegExp()`
|
|
20
|
+
* reads it as a literal pattern.
|
|
25
21
|
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Replace with `RegExp.escape` once browser support is sufficient:
|
|
26
24
|
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape#browser_compatibility
|
|
27
25
|
*/
|
|
28
26
|
export declare function escapeRegex(value: string): string;
|
|
29
27
|
/**
|
|
30
|
-
* Creates a
|
|
28
|
+
* Creates a function that returns DOM ids with the given prefix.
|
|
31
29
|
*
|
|
32
30
|
* @example
|
|
33
31
|
* ```typescript
|
|
@@ -38,7 +36,7 @@ export declare function escapeRegex(value: string): string;
|
|
|
38
36
|
*/
|
|
39
37
|
export declare function createIdGenerator(prefix: string): () => string;
|
|
40
38
|
/**
|
|
41
|
-
* Generates a unique string
|
|
42
|
-
* The default
|
|
39
|
+
* Generates a unique string id of the given size, from a URL-safe alphabet.
|
|
40
|
+
* The default of 21 characters makes a collision very unlikely.
|
|
43
41
|
*/
|
|
44
42
|
export declare function nanoid(size?: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/internals/utils/strings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/internals/utils/strings.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,GAAG,MAAiB;IACjE,MAAM,MAAM,G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AAW,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC7B,UAAU,GAAG,CAAC,CAAC;IACjB,CAAC;SAAM,IAAI,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC5C,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC7B,UAAU,GAAG,CAAC,CAAC;IACjB,CAAC;IACD,UAAU,IAAI,KAAK,CAAC;AACtB,CAAC;AAMD,MAAM,UAAU,MAAM,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,UAAU,GAAG,KAAK,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QACrD,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * Builds a string from format specifiers and replacement parameters.\n *\n * @example\n * ```typescript\n * formatString('{0} says \"{1}\".', 'John', 'Hello'); // 'John says \"Hello\".'\n * formatString('{1} is greater than {0}', 0, 1); // '1 is greater than 0'\n * ```\n */\nexport function formatString(template: string, ...params: unknown[]): string {\n const length = params.length;\n\n return template.replace(/{(\\d+)}/g, (match: string, index: number) =>\n index >= length ? match : `${params[index]}`\n );\n}\n\n/**\n * Splits a string into words at whitespace, `-`, `_` and camelCase\n * boundaries.\n */\nexport function splitToWords(text: string) {\n const input = text.replaceAll(/[^a-zA-Z0-9\\s-_]/g, '');\n if (/[\\s-_]+/.test(input)) return input.split(/[\\s-_]+/);\n return input.split(/(?=[A-Z])+/);\n}\n\n/** Converts a string to kebab-case. */\nexport function toKebabCase(text: string): string {\n const input = text.trim();\n return splitToWords(input).join('-').toLowerCase();\n}\n\n/**\n * Escapes each regular expression character in a string, so that `RegExp()`\n * reads it as a literal pattern.\n *\n * @remarks\n * Replace with `RegExp.escape` once browser support is sufficient:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape#browser_compatibility\n */\nexport function escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * Creates a function that returns DOM ids with the given prefix.\n *\n * @example\n * ```typescript\n * const nextId = createIdGenerator('radio');\n * nextId(); // 'radio-1'\n * nextId(); // 'radio-2'\n * ```\n */\nexport function createIdGenerator(prefix: string): () => string {\n let id = 0;\n return () => `${prefix}-${++id}`;\n}\n\nlet pool: Uint8Array<ArrayBuffer>;\nlet poolOffset: number;\nconst urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';\n\nfunction fillPool(bytes: number): void {\n if (!pool || pool.length < bytes) {\n pool = new Uint8Array(new ArrayBuffer(bytes * 128));\n crypto.getRandomValues(pool);\n poolOffset = 0;\n } else if (poolOffset + bytes > pool.length) {\n crypto.getRandomValues(pool);\n poolOffset = 0;\n }\n poolOffset += bytes;\n}\n\n/**\n * Generates a unique string id of the given size, from a URL-safe alphabet.\n * The default of 21 characters makes a collision very unlikely.\n */\nexport function nanoid(size = 21): string {\n const bytes = size | 0;\n fillPool(bytes);\n\n let id = '';\n for (let i = poolOffset - bytes; i < poolOffset; i++) {\n id += urlAlphabet[pool[i] & 63];\n }\n\n return id;\n}\n"]}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
/** Returns whether the value is not `undefined`.
|
|
1
|
+
/** Returns whether the value is not `undefined`. `null` counts as defined. */
|
|
2
2
|
export declare function isDefined<T = unknown>(value: T): value is T & ({} | null);
|
|
3
3
|
export declare function isFunction(value: unknown): value is CallableFunction;
|
|
4
4
|
export declare function isString(value: unknown): value is string;
|
|
5
5
|
export declare function isObject(value: unknown): value is object;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Returns whether the value is a plain object from `{}`, `new Object()` or
|
|
8
|
+
* `Object.create(null)`.
|
|
9
|
+
*/
|
|
7
10
|
export declare function isPlainObject(value: unknown): value is Record<PropertyKey, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* Resolves a value that the caller gives either directly or as a factory.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* resolveValue(element); // element
|
|
17
|
+
* resolveValue(() => element); // element
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveValue<T>(source: T | (() => T)): T;
|
|
8
21
|
export declare function isRegExp(value: unknown): value is RegExp;
|
|
9
22
|
export declare function isEventListenerObject(x: unknown): x is EventListenerObject;
|
|
10
|
-
/**
|
|
23
|
+
/** Makes the given keys `K` of the type `T` required. */
|
|
11
24
|
export type RequiredProps<T, K extends keyof T> = T & {
|
|
12
25
|
[P in K]-?: T[P];
|
|
13
26
|
};
|
package/internals/utils/types.js
CHANGED
|
@@ -22,6 +22,9 @@ export function isPlainObject(value) {
|
|
|
22
22
|
? Object.prototype.toString.call(value) === '[object Object]'
|
|
23
23
|
: false;
|
|
24
24
|
}
|
|
25
|
+
export function resolveValue(source) {
|
|
26
|
+
return isFunction(source) ? source() : source;
|
|
27
|
+
}
|
|
25
28
|
export function isRegExp(value) {
|
|
26
29
|
return value instanceof RegExp;
|
|
27
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internals/utils/types.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,SAAS,CAAc,KAAQ;IAC7C,OAAO,KAAK,KAAK,SAAS,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC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AAC,CAAC,CAAC,CAAE,MAAkB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,KAAK,YAAY,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC9C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAa,IAAI,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/** Returns whether the value is not `undefined`. `null` counts as defined. */\nexport function isDefined<T = unknown>(value: T) {\n return value !== undefined;\n}\n\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\nexport function isObject(value: unknown): value is object {\n return value != null && typeof value === 'object';\n}\n\n/**\n * Returns whether the value is a plain object from `{}`, `new Object()` or\n * `Object.create(null)`.\n */\nexport function isPlainObject(\n value: unknown\n): value is Record<PropertyKey, unknown> {\n if (!isObject(value)) {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value) as typeof Object.prototype | null;\n\n const hasObjectPrototype =\n proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n\n return hasObjectPrototype\n ? Object.prototype.toString.call(value) === '[object Object]'\n : false;\n}\n\n/**\n * Resolves a value that the caller gives either directly or as a factory.\n *\n * @example\n * ```typescript\n * resolveValue(element); // element\n * resolveValue(() => element); // element\n * ```\n */\nexport function resolveValue<T>(source: T | (() => T)): T {\n return isFunction(source) ? (source as () => T)() : source;\n}\n\nexport function isRegExp(value: unknown): value is RegExp {\n return value instanceof RegExp;\n}\n\nexport function isEventListenerObject(x: unknown): x is EventListenerObject {\n return isObject(x) && 'handleEvent' in x;\n}\n\n/** Makes the given keys `K` of the type `T` required. */\nexport type RequiredProps<T, K extends keyof T> = T & {\n [P in K]-?: T[P];\n};\n"]}
|
|
@@ -53,25 +53,26 @@ export declare const maxDateValidator: Validator<{
|
|
|
53
53
|
value?: Date | null;
|
|
54
54
|
max?: Date | null;
|
|
55
55
|
}>;
|
|
56
|
-
/** A host
|
|
56
|
+
/** A host that compares bounds at the granularity of its own format. */
|
|
57
57
|
interface DatePartsHost {
|
|
58
58
|
hasDateParts(): boolean;
|
|
59
59
|
hasTimeParts(): boolean;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Creates a `rangeUnderflow` validator for
|
|
63
|
-
* respect the parts of the host's format - day granularity when the format has
|
|
64
|
-
* no time parts, time-of-day granularity when it has no date parts.
|
|
62
|
+
* Creates a `rangeUnderflow` validator for the `min` bound of a host.
|
|
65
63
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* The comparison follows the host format: day granularity without time
|
|
66
|
+
* parts, time-of-day granularity without date parts. `resolveValues` gives
|
|
67
|
+
* the dates to compare, and empty slots are skipped, so a partial range
|
|
68
|
+
* validates only the ends it has.
|
|
68
69
|
*/
|
|
69
70
|
export declare function createMinDateTimeValidator<T extends DatePartsHost & {
|
|
70
71
|
min?: Date | null;
|
|
71
72
|
}>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T>;
|
|
72
73
|
/**
|
|
73
|
-
* Creates a `rangeOverflow` validator for
|
|
74
|
-
*
|
|
74
|
+
* Creates a `rangeOverflow` validator for the `max` bound of a host.
|
|
75
|
+
* See {@link createMinDateTimeValidator}.
|
|
75
76
|
*/
|
|
76
77
|
export declare function createMaxDateTimeValidator<T extends DatePartsHost & {
|
|
77
78
|
max?: Date | null;
|
package/internals/validators.js
CHANGED
|
@@ -4,6 +4,12 @@ import { CalendarDay } from './date/model.js';
|
|
|
4
4
|
import { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';
|
|
5
5
|
import { formatString } from './utils/strings.js';
|
|
6
6
|
import { isDefined } from './utils/types.js';
|
|
7
|
+
function minBoundMessage(min) {
|
|
8
|
+
return formatString(ValidationResourceStringsEN.min_validation_error, min);
|
|
9
|
+
}
|
|
10
|
+
function maxBoundMessage(max) {
|
|
11
|
+
return formatString(ValidationResourceStringsEN.max_validation_error, max);
|
|
12
|
+
}
|
|
7
13
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
8
14
|
export const requiredValidator = {
|
|
9
15
|
key: 'valueMissing',
|
|
@@ -32,14 +38,14 @@ export const patternValidator = {
|
|
|
32
38
|
};
|
|
33
39
|
export const minValidator = {
|
|
34
40
|
key: 'rangeUnderflow',
|
|
35
|
-
message: ({ min }) =>
|
|
41
|
+
message: ({ min }) => minBoundMessage(min),
|
|
36
42
|
isValid: ({ min, value }) => isDefined(value) && value !== '' && isDefined(min)
|
|
37
43
|
? asNumber(value) >= asNumber(min)
|
|
38
44
|
: true,
|
|
39
45
|
};
|
|
40
46
|
export const maxValidator = {
|
|
41
47
|
key: 'rangeOverflow',
|
|
42
|
-
message: ({ max }) =>
|
|
48
|
+
message: ({ max }) => maxBoundMessage(max),
|
|
43
49
|
isValid: ({ max, value }) => isDefined(value) && value !== '' && isDefined(max)
|
|
44
50
|
? asNumber(value) <= asNumber(max)
|
|
45
51
|
: true,
|
|
@@ -70,12 +76,12 @@ export const urlValidator = {
|
|
|
70
76
|
};
|
|
71
77
|
export const minDateValidator = {
|
|
72
78
|
key: 'rangeUnderflow',
|
|
73
|
-
message: ({ min }) =>
|
|
79
|
+
message: ({ min }) => minBoundMessage(min),
|
|
74
80
|
isValid: ({ value, min }) => value && min ? CalendarDay.compare(value, min) >= 0 : true,
|
|
75
81
|
};
|
|
76
82
|
export const maxDateValidator = {
|
|
77
83
|
key: 'rangeOverflow',
|
|
78
|
-
message: ({ max }) =>
|
|
84
|
+
message: ({ max }) => maxBoundMessage(max),
|
|
79
85
|
isValid: ({ value, max }) => value && max ? CalendarDay.compare(value, max) <= 0 : true,
|
|
80
86
|
};
|
|
81
87
|
function isWithinBound(host, bound, values, exceeds) {
|
|
@@ -87,14 +93,14 @@ function isWithinBound(host, bound, values, exceeds) {
|
|
|
87
93
|
export function createMinDateTimeValidator(resolveValues) {
|
|
88
94
|
return {
|
|
89
95
|
key: 'rangeUnderflow',
|
|
90
|
-
message: (
|
|
96
|
+
message: (host) => minBoundMessage(host.min),
|
|
91
97
|
isValid: (host) => isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),
|
|
92
98
|
};
|
|
93
99
|
}
|
|
94
100
|
export function createMaxDateTimeValidator(resolveValues) {
|
|
95
101
|
return {
|
|
96
102
|
key: 'rangeOverflow',
|
|
97
|
-
message: (
|
|
103
|
+
message: (host) => maxBoundMessage(host.max),
|
|
98
104
|
isValid: (host) => isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),
|
|
99
105
|
};
|
|
100
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/internals/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY7C,MAAM,UAAU,GACd,sIAAsI,CAAC;AAEzI,MAAM,CAAC,MAAM,iBAAiB,GAGzB;IACH,GAAG,EAAE,cAAc;IACnB,OAAO,EAAE,2BAA2B,CAAC,yBAA0B;IAC/D,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,E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GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;KACxE,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACnB,YAAY,CAAC,2BAA2B,CAAC,oBAAqB,EAAE,GAAG,CAAC;QACtE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;KACzE,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationResourceStringsEN } from 'igniteui-i18n-core';\nimport { isDateExceedingMax, isDateLessThanMin } from './date/compare.js';\nimport { CalendarDay } from './date/model.js';\nimport { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';\nimport { formatString } from './utils/strings.js';\nimport { isDefined } from './utils/types.js';\n\ntype ValidatorHandler<T> = (host: T) => boolean;\ntype ValidatorMessageFormat<T> = (host: T) => string;\n\n/** @hidden */\nexport interface Validator<T = any> {\n key: keyof ValidityStateFlags;\n message: string | ValidatorMessageFormat<T>;\n isValid: ValidatorHandler<T>;\n}\n\nconst emailRegex =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport const requiredValidator: Validator<{\n required: boolean;\n value?: unknown;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, value }) => (required ? !!value : true),\n};\n\nexport const requiredBooleanValidator: Validator<{\n required: boolean;\n checked: boolean;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, checked }) => (required ? checked : true),\n};\n\nexport const minLengthValidator: Validator<{\n minLength?: number;\n value: string;\n}> = {\n key: 'tooShort',\n message: ({ minLength }) =>\n formatString(\n ValidationResourceStringsEN.min_length_validation_error!,\n minLength\n ),\n isValid: ({ minLength, value }) =>\n minLength && value ? value.length >= asNumber(minLength) : true,\n};\n\nexport const maxLengthValidator: Validator<{\n maxLength?: number;\n value: string;\n}> = {\n key: 'tooLong',\n message: ({ maxLength }) =>\n formatString(\n ValidationResourceStringsEN.max_length_validation_error!,\n maxLength\n ),\n isValid: ({ maxLength, value }) =>\n maxLength && value ? value.length <= asNumber(maxLength) : true,\n};\n\nexport const patternValidator: Validator<{ pattern?: string; value: string }> =\n {\n key: 'patternMismatch',\n message: ValidationResourceStringsEN.pattern_validation_error!,\n isValid: ({ pattern, value }) =>\n pattern && value ? new RegExp(pattern, 'u').test(value) : true,\n };\n\nexport const minValidator: Validator<{\n min?: number;\n value: number | string;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: ({ min, value }) =>\n isDefined(value) && value !== '' && isDefined(min)\n ? asNumber(value) >= asNumber(min)\n : true,\n};\n\nexport const maxValidator: Validator<{\n max?: number;\n value: number | string;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: ({ max, value }) =>\n isDefined(value) && value !== '' && isDefined(max)\n ? asNumber(value) <= asNumber(max)\n : true,\n};\n\nexport const stepValidator: Validator<{\n min?: number;\n step?: number;\n value: number | string;\n}> = {\n key: 'stepMismatch',\n message: 'Value does not conform to step constraint',\n isValid: ({ min, step, value }) => {\n if (isDefined(value) && value !== '' && isDefined(step)) {\n const _value = asNumber(value) - asNumber(min);\n const _step = asNumber(step);\n const magnitude = numberOfDecimals(_step) + 1;\n const rem = roundPrecise(\n Math.abs(_value - _step * Math.round(_value / _step)),\n magnitude\n );\n\n return !rem;\n }\n return true;\n },\n};\n\nexport const emailValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.email_validation_error!,\n isValid: ({ value }) => (value ? emailRegex.test(value) : true),\n};\n\nexport const urlValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.url_validation_error!,\n isValid: ({ value }) => (value ? URL.canParse(value) : true),\n};\n\nexport const minDateValidator: Validator<{\n value?: Date | null;\n min?: Date | null;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: ({ value, min }) =>\n value && min ? CalendarDay.compare(value, min) >= 0 : true,\n};\n\nexport const maxDateValidator: Validator<{\n value?: Date | null;\n max?: Date | null;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: ({ value, max }) =>\n value && max ? CalendarDay.compare(value, max) <= 0 : true,\n};\n\n/** A host whose bound comparisons follow the parts present in its format. */\ninterface DatePartsHost {\n hasDateParts(): boolean;\n hasTimeParts(): boolean;\n}\n\n/** Compares a date against a bound at the granularity of the host's format. */\ntype DateBoundComparer = (\n date: Date,\n bound: Date,\n hasTimeParts: boolean,\n hasDateParts: boolean\n) => boolean;\n\n/** Whether no value of the host exceeds `bound`. An absent bound holds. */\nfunction isWithinBound<T extends DatePartsHost>(\n host: T,\n bound: Date | null | undefined,\n values: (Date | null | undefined)[],\n exceeds: DateBoundComparer\n): boolean {\n return bound\n ? values.every(\n (date) =>\n !date ||\n !exceeds(date, bound, host.hasTimeParts(), host.hasDateParts())\n )\n : true;\n}\n\n/**\n * Creates a `rangeUnderflow` validator for hosts whose `min` comparison must\n * respect the parts of the host's format - day granularity when the format has\n * no time parts, time-of-day granularity when it has no date parts.\n *\n * `resolveValues` returns the dates checked against the bound; empty slots\n * are skipped, so a partial range validates only its present ends.\n */\nexport function createMinDateTimeValidator<\n T extends DatePartsHost & { min?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: (host) =>\n isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),\n };\n}\n\n/**\n * Creates a `rangeOverflow` validator for hosts whose `max` comparison must\n * respect the parts of the host's format. See {@link createMinDateTimeValidator}.\n */\nexport function createMaxDateTimeValidator<\n T extends DatePartsHost & { max?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: (host) =>\n isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/internals/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAa7C,SAAS,eAAe,CAAC,GAAY;IACnC,OAAO,YAAY,CAAC,2BAA2B,CAAC,oBAAqB,EAAE,GAAG,CAAC,CAAC;AAC9E,CAAC;AAGD,SAAS,eAAe,CAAC,GAAY;IACnC,OAAO,YAAY,CAAC,2BAA2B,CAAC,oBAAqB,EAAE,GAAG,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,GACd,sIAAsI,CAAC;AAEzI,MAAM,CAAC,MAAM,iBAAiB,GAGzB;IACH,GAAG,EAAE,cAAc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AC,EAAE,iBAAiB,CAAC;KACxE,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;KACzE,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationResourceStringsEN } from 'igniteui-i18n-core';\nimport { isDateExceedingMax, isDateLessThanMin } from './date/compare.js';\nimport { CalendarDay } from './date/model.js';\nimport { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';\nimport { formatString } from './utils/strings.js';\nimport { isDefined } from './utils/types.js';\n\ntype ValidatorHandler<T> = (host: T) => boolean;\ntype ValidatorMessageFormat<T> = (host: T) => string;\n\n/** @hidden */\nexport interface Validator<T = any> {\n key: keyof ValidityStateFlags;\n message: string | ValidatorMessageFormat<T>;\n isValid: ValidatorHandler<T>;\n}\n\n/** Formats the `rangeUnderflow` message with the `min` bound. */\nfunction minBoundMessage(min: unknown): string {\n return formatString(ValidationResourceStringsEN.min_validation_error!, min);\n}\n\n/** Formats the `rangeOverflow` message with the `max` bound. */\nfunction maxBoundMessage(max: unknown): string {\n return formatString(ValidationResourceStringsEN.max_validation_error!, max);\n}\n\nconst emailRegex =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport const requiredValidator: Validator<{\n required: boolean;\n value?: unknown;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, value }) => (required ? !!value : true),\n};\n\nexport const requiredBooleanValidator: Validator<{\n required: boolean;\n checked: boolean;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, checked }) => (required ? checked : true),\n};\n\nexport const minLengthValidator: Validator<{\n minLength?: number;\n value: string;\n}> = {\n key: 'tooShort',\n message: ({ minLength }) =>\n formatString(\n ValidationResourceStringsEN.min_length_validation_error!,\n minLength\n ),\n isValid: ({ minLength, value }) =>\n minLength && value ? value.length >= asNumber(minLength) : true,\n};\n\nexport const maxLengthValidator: Validator<{\n maxLength?: number;\n value: string;\n}> = {\n key: 'tooLong',\n message: ({ maxLength }) =>\n formatString(\n ValidationResourceStringsEN.max_length_validation_error!,\n maxLength\n ),\n isValid: ({ maxLength, value }) =>\n maxLength && value ? value.length <= asNumber(maxLength) : true,\n};\n\nexport const patternValidator: Validator<{ pattern?: string; value: string }> =\n {\n key: 'patternMismatch',\n message: ValidationResourceStringsEN.pattern_validation_error!,\n isValid: ({ pattern, value }) =>\n pattern && value ? new RegExp(pattern, 'u').test(value) : true,\n };\n\nexport const minValidator: Validator<{\n min?: number;\n value: number | string;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) => minBoundMessage(min),\n isValid: ({ min, value }) =>\n isDefined(value) && value !== '' && isDefined(min)\n ? asNumber(value) >= asNumber(min)\n : true,\n};\n\nexport const maxValidator: Validator<{\n max?: number;\n value: number | string;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) => maxBoundMessage(max),\n isValid: ({ max, value }) =>\n isDefined(value) && value !== '' && isDefined(max)\n ? asNumber(value) <= asNumber(max)\n : true,\n};\n\nexport const stepValidator: Validator<{\n min?: number;\n step?: number;\n value: number | string;\n}> = {\n key: 'stepMismatch',\n message: 'Value does not conform to step constraint',\n isValid: ({ min, step, value }) => {\n if (isDefined(value) && value !== '' && isDefined(step)) {\n const _value = asNumber(value) - asNumber(min);\n const _step = asNumber(step);\n const magnitude = numberOfDecimals(_step) + 1;\n const rem = roundPrecise(\n Math.abs(_value - _step * Math.round(_value / _step)),\n magnitude\n );\n\n return !rem;\n }\n return true;\n },\n};\n\nexport const emailValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.email_validation_error!,\n isValid: ({ value }) => (value ? emailRegex.test(value) : true),\n};\n\nexport const urlValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.url_validation_error!,\n isValid: ({ value }) => (value ? URL.canParse(value) : true),\n};\n\nexport const minDateValidator: Validator<{\n value?: Date | null;\n min?: Date | null;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) => minBoundMessage(min),\n isValid: ({ value, min }) =>\n value && min ? CalendarDay.compare(value, min) >= 0 : true,\n};\n\nexport const maxDateValidator: Validator<{\n value?: Date | null;\n max?: Date | null;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) => maxBoundMessage(max),\n isValid: ({ value, max }) =>\n value && max ? CalendarDay.compare(value, max) <= 0 : true,\n};\n\n/** A host that compares bounds at the granularity of its own format. */\ninterface DatePartsHost {\n hasDateParts(): boolean;\n hasTimeParts(): boolean;\n}\n\n/** Compares a date with a bound at the granularity of the host format. */\ntype DateBoundComparer = (\n date: Date,\n bound: Date,\n hasTimeParts: boolean,\n hasDateParts: boolean\n) => boolean;\n\n/**\n * Returns `true` when no value of the host exceeds `bound`. An unset bound\n * and an empty value both pass.\n */\nfunction isWithinBound<T extends DatePartsHost>(\n host: T,\n bound: Date | null | undefined,\n values: (Date | null | undefined)[],\n exceeds: DateBoundComparer\n): boolean {\n return bound\n ? values.every(\n (date) =>\n !date ||\n !exceeds(date, bound, host.hasTimeParts(), host.hasDateParts())\n )\n : true;\n}\n\n/**\n * Creates a `rangeUnderflow` validator for the `min` bound of a host.\n *\n * @remarks\n * The comparison follows the host format: day granularity without time\n * parts, time-of-day granularity without date parts. `resolveValues` gives\n * the dates to compare, and empty slots are skipped, so a partial range\n * validates only the ends it has.\n */\nexport function createMinDateTimeValidator<\n T extends DatePartsHost & { min?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeUnderflow',\n message: (host) => minBoundMessage(host.min),\n isValid: (host) =>\n isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),\n };\n}\n\n/**\n * Creates a `rangeOverflow` validator for the `max` bound of a host.\n * See {@link createMinDateTimeValidator}.\n */\nexport function createMaxDateTimeValidator<\n T extends DatePartsHost & { max?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeOverflow',\n message: (host) => maxBoundMessage(host.max),\n isValid: (host) =>\n isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-webcomponents",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.",
|
|
5
5
|
"author": "Infragistics",
|
|
6
6
|
"license": "MIT",
|
package/skills/README.md
CHANGED
|
@@ -14,8 +14,10 @@ Skills are structured instructions that help AI agents understand and execute co
|
|
|
14
14
|
| [igniteui-wc-integrate-with-framework](./igniteui-wc-integrate-with-framework/SKILL.md) | Integrate components into React, Angular, Vue, or vanilla JS applications | Setting up components in your project |
|
|
15
15
|
| [igniteui-wc-customize-component-theme](./igniteui-wc-customize-component-theme/SKILL.md) | Customize styling using CSS custom properties, parts, and theming system | Applying custom brand colors/styles |
|
|
16
16
|
| [igniteui-wc-generate-from-image-design](./igniteui-wc-generate-from-image-design/SKILL.md) | Implement a view from a screenshot or mockup using Ignite UI Web Components | Converting a design image into UI |
|
|
17
|
+
| [igniteui-wc-figma-to-app](./igniteui-wc-figma-to-app/SKILL.md) | Translate Figma screens from any UI kit (Indigo.Design, third-party, or plain frames) into a working app | Implementing a design from a Figma file |
|
|
17
18
|
| [igniteui-wc-optimize-bundle-size](./igniteui-wc-optimize-bundle-size/SKILL.md) | Reduce bundle size by importing only needed components and lazy loading | Optimizing production performance |
|
|
18
19
|
| [igniteui-wc-migrate-grid-lite-to-premium](./igniteui-wc-migrate-grid-lite-to-premium/SKILL.md) | Migrate from Grid Lite to the premium Data Grid | Adopting enterprise grid features |
|
|
20
|
+
| [igniteui-wc-grids](./igniteui-wc-grids/SKILL.md) | Set up a grid: package choice, theming, Shadow DOM, layout, sorting/filtering | Adding or debugging a grid in an app |
|
|
19
21
|
|
|
20
22
|
## How to Use
|
|
21
23
|
|
|
@@ -25,6 +27,7 @@ When working with an AI agent like GitHub Copilot, reference skills by name or a
|
|
|
25
27
|
- "How do I integrate igniteui-webcomponents with React?"
|
|
26
28
|
- "Help me customize the button colors to match my brand"
|
|
27
29
|
- "Build this screenshot with Ignite UI Web Components"
|
|
30
|
+
- "Implement this Figma design with Ignite UI Web Components"
|
|
28
31
|
- "My bundle size is too large, how can I reduce it?"
|
|
29
32
|
- "Show me how to use these components in Vue"
|
|
30
33
|
|
|
@@ -32,6 +35,7 @@ When working with an AI agent like GitHub Copilot, reference skills by name or a
|
|
|
32
35
|
- "Follow the integrate-with-framework skill for my Angular app"
|
|
33
36
|
- "Use the customize-component-theme skill to help me style components"
|
|
34
37
|
- "Use the generate-from-image-design skill to implement this mockup"
|
|
38
|
+
- "Use the figma-to-app skill to build this artboard"
|
|
35
39
|
- "Apply the optimize-bundle-size skill to reduce my bundle"
|
|
36
40
|
|
|
37
41
|
## Skill Structure
|
|
@@ -53,9 +57,6 @@ If you identify gaps in the skills or have suggestions for improvements:
|
|
|
53
57
|
|
|
54
58
|
1. [Open an issue](https://github.com/IgniteUI/igniteui-webcomponents/issues) describing the improvement
|
|
55
59
|
2. Submit a pull request with the proposed changes
|
|
56
|
-
3. Follow the skill format and structure of existing skills
|
|
57
|
-
|
|
58
|
-
For skills related to **contributing to the library itself** (creating components, reviewing PRs, etc.), see [`.github/skills/`](../.github/skills/).
|
|
59
60
|
|
|
60
61
|
## Additional Resources
|
|
61
62
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
license: MIT
|
|
2
3
|
name: igniteui-wc-choose-components
|
|
3
|
-
description: Identify
|
|
4
|
+
description: "Identify the right Ignite UI Web Components (igniteui-webcomponents, grids, charts, dock manager, React wrappers) for a UI requirement and point to official docs, examples, and API references. WHEN TO USE: the user asks which component fits a UI pattern (form, table, dashboard, navigation, chat, etc.), needs to compare options (e.g. Grid Lite vs. premium Grid), wants a component list for a screen, or asks which package a component lives in. WHEN NOT TO USE: implementing a view from a design image or Figma file (use generate-from-image-design or figma-to-app), installing/wiring packages into a framework (use integrate-with-framework), styling/theming (use customize-component-theme), reducing bundle size (use optimize-bundle-size), or migrating Grid Lite to the premium grid (use migrate-grid-lite-to-premium)."
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
license: MIT
|
|
2
3
|
name: igniteui-wc-customize-component-theme
|
|
3
|
-
description:
|
|
4
|
+
description: "Theme and style Ignite UI Web Components (and igniteui-react) apps using CSS custom properties, optional Sass, and the igniteui-theming MCP server. WHEN TO USE: the user wants to apply or switch a pre-built theme (Material, Fluent, Bootstrap, Indigo, light/dark), create a custom palette or global theme, restyle a specific component via design tokens or ::part, scope a theme to a container, adjust sizing/spacing/roundness, or toggle light/dark mode. WHEN NOT TO USE: choosing which component to use (use choose-components), building a full view from a design image or Figma file (use generate-from-image-design or figma-to-app, which include theming), installing packages or framework setup (use integrate-with-framework), or styling non-Ignite UI elements or libraries."
|
|
4
5
|
user-invocable: true
|
|
5
6
|
---
|
|
6
7
|
|