igniteui-webcomponents 7.3.0 → 7.3.2
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 +64 -1
- package/README.md +30 -0
- package/components/avatar/avatar.d.ts +1 -2
- package/components/avatar/avatar.js +4 -8
- package/components/avatar/avatar.js.map +1 -1
- package/components/avatar/themes/avatar.base.css.js +1 -1
- package/components/avatar/themes/avatar.base.css.js.map +1 -1
- package/components/badge/badge.d.ts +6 -1
- package/components/badge/badge.js +8 -5
- package/components/badge/badge.js.map +1 -1
- package/components/badge/themes/badge.base.css.js +1 -1
- package/components/badge/themes/badge.base.css.js.map +1 -1
- package/components/banner/themes/banner.base.css.js +1 -1
- package/components/banner/themes/banner.base.css.js.map +1 -1
- package/components/banner/themes/shared/banner.indigo.css.js +1 -1
- package/components/banner/themes/shared/banner.indigo.css.js.map +1 -1
- package/components/calendar/base.d.ts +7 -2
- package/components/calendar/base.js +8 -3
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.d.ts +4 -0
- package/components/calendar/calendar.js +41 -14
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +3 -6
- package/components/calendar/days-view/days-view.js +7 -16
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +13 -0
- package/components/calendar/helpers.js +15 -0
- package/components/calendar/helpers.js.map +1 -1
- package/components/calendar/themes/calendar.base.css.js +1 -1
- package/components/calendar/themes/calendar.base.css.js.map +1 -1
- package/components/calendar/themes/days-view.base.css.js +1 -1
- package/components/calendar/themes/days-view.base.css.js.map +1 -1
- package/components/calendar/themes/shared/bootstrap/calendar.bootstrap.css.js +1 -1
- package/components/calendar/themes/shared/bootstrap/calendar.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js +1 -1
- package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js.map +1 -1
- package/components/calendar/themes/shared/fluent/days-view.fluent.css.js +1 -1
- package/components/calendar/themes/shared/fluent/days-view.fluent.css.js.map +1 -1
- package/components/calendar/themes/shared/indigo/calendar.indigo.css.js +1 -1
- package/components/calendar/themes/shared/indigo/calendar.indigo.css.js.map +1 -1
- package/components/calendar/themes/shared/indigo/days-view.indigo.css.js +1 -1
- package/components/calendar/themes/shared/indigo/days-view.indigo.css.js.map +1 -1
- package/components/calendar/themes/shared/material/days-view.material.css.js +1 -1
- package/components/calendar/themes/shared/material/days-view.material.css.js.map +1 -1
- package/components/calendar/themes/year-month-view.base.css.js +1 -1
- package/components/calendar/themes/year-month-view.base.css.js.map +1 -1
- package/components/card/themes/container.base.css.js +1 -1
- package/components/card/themes/container.base.css.js.map +1 -1
- package/components/carousel/themes/carousel.base.css.js +1 -1
- package/components/carousel/themes/carousel.base.css.js.map +1 -1
- package/components/carousel/themes/shared/carousel.indigo.css.js +1 -1
- package/components/carousel/themes/shared/carousel.indigo.css.js.map +1 -1
- package/components/chat/themes/chat.base.css.js +1 -1
- package/components/chat/themes/chat.base.css.js.map +1 -1
- package/components/chat/themes/message.base.css.js +1 -1
- package/components/chat/themes/message.base.css.js.map +1 -1
- package/components/checkbox/themes/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js.map +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js +1 -1
- package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.fluent.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.fluent.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.indigo.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.indigo.css.js.map +1 -1
- package/components/checkbox/themes/shared/switch/switch.material.css.js +1 -1
- package/components/checkbox/themes/shared/switch/switch.material.css.js.map +1 -1
- package/components/checkbox/themes/switch.base.css.js +1 -1
- package/components/checkbox/themes/switch.base.css.js.map +1 -1
- package/components/chip/chip.d.ts +30 -14
- package/components/chip/chip.js +54 -48
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/dark/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/dark/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/dark/chip.fluent.css.js +1 -1
- package/components/chip/themes/dark/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/dark/chip.indigo.css.js +1 -1
- package/components/chip/themes/dark/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/dark/chip.material.css.js +1 -1
- package/components/chip/themes/dark/chip.material.css.js.map +1 -1
- package/components/chip/themes/light/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/light/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/light/chip.fluent.css.js +1 -1
- package/components/chip/themes/light/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/light/chip.indigo.css.js +1 -1
- package/components/chip/themes/light/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/light/chip.material.css.js +1 -1
- package/components/chip/themes/light/chip.material.css.js.map +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/shared/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/shared/chip.common.css.js +1 -1
- package/components/chip/themes/shared/chip.common.css.js.map +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js +1 -1
- package/components/chip/themes/shared/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js +1 -1
- package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
- package/components/color-picker/color-picker.d.ts +2 -2
- package/components/color-picker/color-picker.js.map +1 -1
- package/components/color-picker/picker-canvas.js +2 -1
- package/components/color-picker/picker-canvas.js.map +1 -1
- package/components/color-picker/themes/color-picker.base.css.js +1 -1
- package/components/color-picker/themes/color-picker.base.css.js.map +1 -1
- package/components/combo/themes/combo-item.base.css.js +1 -1
- package/components/combo/themes/combo-item.base.css.js.map +1 -1
- package/components/combo/themes/combo.base.css.js +1 -1
- package/components/combo/themes/combo.base.css.js.map +1 -1
- package/components/combo/themes/shared/combo.bootstrap.css.js +1 -1
- package/components/combo/themes/shared/combo.bootstrap.css.js.map +1 -1
- package/components/date-picker/date-picker.base.d.ts +11 -2
- package/components/date-picker/date-picker.base.js +8 -3
- package/components/date-picker/date-picker.base.js.map +1 -1
- package/components/date-picker/themes/date-picker.base.css.js +1 -1
- package/components/date-picker/themes/date-picker.base.css.js.map +1 -1
- package/components/date-range-picker/date-range-picker.base.css.js +1 -1
- package/components/date-range-picker/date-range-picker.base.css.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.base.css.js +1 -1
- package/components/date-range-picker/predefined-ranges-area.base.css.js.map +1 -1
- package/components/divider/themes/divider.base.css.js +1 -1
- package/components/divider/themes/divider.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown.base.css.js +1 -1
- package/components/dropdown/themes/dropdown.base.css.js.map +1 -1
- package/components/file-input/themes/file-input.base.css.js +1 -1
- package/components/file-input/themes/file-input.base.css.js.map +1 -1
- package/components/file-input/themes/shared/file-input.bootstrap.css.js +1 -1
- package/components/file-input/themes/shared/file-input.bootstrap.css.js.map +1 -1
- package/components/input/themes/shared/input.indigo.css.js +1 -1
- package/components/input/themes/shared/input.indigo.css.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/list/themes/item.base.css.js +1 -1
- package/components/list/themes/item.base.css.js.map +1 -1
- package/components/nav-drawer/themes/item.base.css.js +1 -1
- package/components/nav-drawer/themes/item.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/shared/linear.progress.bootstrap.css.js +3 -0
- package/components/progress/themes/linear/shared/linear.progress.bootstrap.css.js.map +1 -0
- package/components/progress/themes/linear/themes.js +3 -2
- package/components/progress/themes/linear/themes.js.map +1 -1
- package/components/qr-code/qr-code.d.ts +28 -1
- package/components/qr-code/qr-code.js +56 -13
- package/components/qr-code/qr-code.js.map +1 -1
- package/components/qr-code/renderer/export.d.ts +28 -0
- package/components/qr-code/renderer/export.js +120 -0
- package/components/qr-code/renderer/export.js.map +1 -0
- package/components/qr-code/types.d.ts +26 -0
- package/components/qr-code/types.js.map +1 -1
- package/components/radio/themes/radio.base.css.js +1 -1
- package/components/radio/themes/radio.base.css.js.map +1 -1
- package/components/radio/themes/shared/radio.bootstrap.css.js +1 -1
- package/components/radio/themes/shared/radio.bootstrap.css.js.map +1 -1
- package/components/radio/themes/shared/radio.indigo.css.js +1 -1
- package/components/radio/themes/shared/radio.indigo.css.js.map +1 -1
- package/components/resize-container/themes/resize-container.base.css.js +1 -1
- package/components/resize-container/themes/resize-container.base.css.js.map +1 -1
- package/components/select/themes/select.base.css.js +1 -1
- package/components/select/themes/select.base.css.js.map +1 -1
- package/components/select/themes/shared/select.bootstrap.css.js +1 -1
- package/components/select/themes/shared/select.bootstrap.css.js.map +1 -1
- package/components/slider/themes/shared/slider.material.css.js +1 -1
- package/components/slider/themes/shared/slider.material.css.js.map +1 -1
- package/components/slider/themes/slider.base.css.js +1 -1
- package/components/slider/themes/slider.base.css.js.map +1 -1
- package/components/snackbar/themes/snackbar.base.css.js +1 -1
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -1
- package/components/splitter/themes/splitter.base.css.js +1 -1
- package/components/splitter/themes/splitter.base.css.js.map +1 -1
- package/components/stepper/themes/step/step.base.css.js +1 -1
- package/components/stepper/themes/step/step.base.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.bootstrap.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.bootstrap.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.fluent.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.fluent.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.indigo.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.indigo.css.js.map +1 -1
- package/components/tabs/themes/shared/tab/tab.material.css.js +1 -1
- package/components/tabs/themes/shared/tab/tab.material.css.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.fluent.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.fluent.css.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.indigo.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.indigo.css.js.map +1 -1
- package/components/tabs/themes/shared/tabs/tabs.material.css.js +1 -1
- package/components/tabs/themes/shared/tabs/tabs.material.css.js.map +1 -1
- package/components/tabs/themes/tab.base.css.js +1 -1
- package/components/tabs/themes/tab.base.css.js.map +1 -1
- package/components/textarea/textarea.d.ts +2 -15
- package/components/textarea/textarea.js +48 -93
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
- package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js +1 -1
- package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
- package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
- package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
- package/components/tile-manager/position.d.ts +2 -9
- package/components/tile-manager/position.js +27 -42
- package/components/tile-manager/position.js.map +1 -1
- package/components/tile-manager/resize-state.d.ts +11 -22
- package/components/tile-manager/resize-state.js +60 -119
- package/components/tile-manager/resize-state.js.map +1 -1
- package/components/tile-manager/resize-util.d.ts +3 -7
- package/components/tile-manager/resize-util.js +65 -72
- package/components/tile-manager/resize-util.js.map +1 -1
- package/components/tile-manager/serializer.d.ts +1 -1
- package/components/tile-manager/serializer.js +9 -10
- package/components/tile-manager/serializer.js.map +1 -1
- package/components/tile-manager/themes/shared/tile/tile.common.css.js +1 -1
- package/components/tile-manager/themes/shared/tile/tile.common.css.js.map +1 -1
- package/components/tile-manager/themes/tile.base.css.js +1 -1
- package/components/tile-manager/themes/tile.base.css.js.map +1 -1
- package/components/tile-manager/tile-ghost-util.js +16 -20
- package/components/tile-manager/tile-ghost-util.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +5 -2
- package/components/tile-manager/tile-manager.js +27 -23
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.d.ts +32 -18
- package/components/tile-manager/tile.js +181 -161
- package/components/tile-manager/tile.js.map +1 -1
- package/components/tile-manager/types.d.ts +1 -5
- package/components/tile-manager/types.js.map +1 -1
- package/components/toast/themes/toast.base.css.js +1 -1
- package/components/toast/themes/toast.base.css.js.map +1 -1
- package/components/tooltip/themes/tooltip.base.css.js +1 -1
- package/components/tooltip/themes/tooltip.base.css.js.map +1 -1
- package/components/tree/themes/item.base.css.js +1 -1
- package/components/tree/themes/item.base.css.js.map +1 -1
- package/components/validation-container/themes/validator.base.css.js +1 -1
- package/components/validation-container/themes/validator.base.css.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +10 -12
- package/components/validation-container/validation-container.js +14 -17
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +1061 -946
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +2 -1
- package/index.js.map +1 -1
- package/internals/definitions/defineAllComponents.js +4 -0
- package/internals/definitions/defineAllComponents.js.map +1 -1
- package/internals/directives/drag.d.ts +144 -0
- package/internals/directives/drag.js +278 -0
- package/internals/directives/drag.js.map +1 -0
- package/internals/directives/resize.d.ts +109 -0
- package/internals/directives/resize.js +214 -0
- package/internals/directives/resize.js.map +1 -0
- package/internals/templates/input-shell.d.ts +12 -1
- package/internals/templates/input-shell.js +17 -10
- package/internals/templates/input-shell.js.map +1 -1
- package/internals/utils/dom.d.ts +2 -0
- package/internals/utils/dom.js +3 -0
- package/internals/utils/dom.js.map +1 -1
- package/internals/utils/events.d.ts +2 -0
- package/internals/utils/events.js +3 -0
- package/internals/utils/events.js.map +1 -1
- package/package.json +1 -1
- package/skills/README.md +1 -0
- package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +21 -0
- package/skills/igniteui-wc-integrate-with-framework/SKILL.md +4 -3
- package/skills/igniteui-wc-integrate-with-framework/references/vanilla-js.md +14 -0
- package/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +12 -2
- package/web-types.json +2 -2
- package/components/resize-container/default-ghost.d.ts +0 -5
- package/components/resize-container/default-ghost.js +0 -20
- package/components/resize-container/default-ghost.js.map +0 -1
- package/components/resize-container/resize-container.d.ts +0 -60
- package/components/resize-container/resize-container.js +0 -156
- package/components/resize-container/resize-container.js.map +0 -1
- package/components/resize-container/resize-controller.d.ts +0 -46
- package/components/resize-container/resize-controller.js +0 -195
- package/components/resize-container/resize-controller.js.map +0 -1
- package/components/resize-container/themes/dark/resize-indicator.bootstrap.css.js +0 -3
- package/components/resize-container/themes/dark/resize-indicator.bootstrap.css.js.map +0 -1
- package/components/resize-container/themes/dark/resize-indicator.fluent.css.d.ts +0 -1
- package/components/resize-container/themes/dark/resize-indicator.fluent.css.js +0 -3
- package/components/resize-container/themes/dark/resize-indicator.fluent.css.js.map +0 -1
- package/components/resize-container/themes/dark/resize-indicator.indigo.css.d.ts +0 -1
- package/components/resize-container/themes/dark/resize-indicator.indigo.css.js +0 -3
- package/components/resize-container/themes/dark/resize-indicator.indigo.css.js.map +0 -1
- package/components/resize-container/themes/dark/resize-indicator.material.css.d.ts +0 -1
- package/components/resize-container/themes/dark/resize-indicator.material.css.js +0 -3
- package/components/resize-container/themes/dark/resize-indicator.material.css.js.map +0 -1
- package/components/resize-container/themes/dark/resize-indicator.shared.css.d.ts +0 -1
- package/components/resize-container/themes/dark/resize-indicator.shared.css.js +0 -3
- package/components/resize-container/themes/dark/resize-indicator.shared.css.js.map +0 -1
- package/components/resize-container/themes/light/resize-indicator.bootstrap.css.d.ts +0 -1
- package/components/resize-container/themes/light/resize-indicator.bootstrap.css.js +0 -3
- package/components/resize-container/themes/light/resize-indicator.bootstrap.css.js.map +0 -1
- package/components/resize-container/themes/light/resize-indicator.fluent.css.d.ts +0 -1
- package/components/resize-container/themes/light/resize-indicator.fluent.css.js +0 -3
- package/components/resize-container/themes/light/resize-indicator.fluent.css.js.map +0 -1
- package/components/resize-container/themes/light/resize-indicator.indigo.css.d.ts +0 -1
- package/components/resize-container/themes/light/resize-indicator.indigo.css.js +0 -3
- package/components/resize-container/themes/light/resize-indicator.indigo.css.js.map +0 -1
- package/components/resize-container/themes/light/resize-indicator.material.css.d.ts +0 -1
- package/components/resize-container/themes/light/resize-indicator.material.css.js +0 -3
- package/components/resize-container/themes/light/resize-indicator.material.css.js.map +0 -1
- package/components/resize-container/themes/light/resize-indicator.shared.css.d.ts +0 -1
- package/components/resize-container/themes/light/resize-indicator.shared.css.js +0 -3
- package/components/resize-container/themes/light/resize-indicator.shared.css.js.map +0 -1
- package/components/resize-container/themes/shared/resize-container.common.css.d.ts +0 -1
- package/components/resize-container/themes/shared/resize-container.common.css.js +0 -3
- package/components/resize-container/themes/shared/resize-container.common.css.js.map +0 -1
- package/components/resize-container/themes/themes.d.ts +0 -2
- package/components/resize-container/themes/themes.js +0 -47
- package/components/resize-container/themes/themes.js.map +0 -1
- package/components/resize-container/types.d.ts +0 -40
- package/components/resize-container/types.js +0 -2
- package/components/resize-container/types.js.map +0 -1
- package/internals/controllers/drag.d.ts +0 -166
- package/internals/controllers/drag.js +0 -283
- package/internals/controllers/drag.js.map +0 -1
- /package/components/{resize-container/themes/dark/resize-indicator.bootstrap.css.d.ts → progress/themes/linear/shared/linear.progress.bootstrap.css.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,12 +4,73 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [7.3.2] - 2026-09-09
|
|
8
|
+
### Added
|
|
9
|
+
- #### Library
|
|
10
|
+
- Each GitHub release now carries a CycloneDX 1.6 SBOM for the published package and for the build environment, together with Sigstore attestations for the build provenance and for the SBOM. The release notes link the attestations, thus you can verify the tarball that you install. [#2370](https://github.com/IgniteUI/igniteui-webcomponents/pull/2370)
|
|
11
|
+
- #### QR code
|
|
12
|
+
- `toBlob()` serializes the rendered code to an `image/svg+xml` blob. Theme colors become plain `fill` attributes and a logo that is not a data URI is fetched and inlined, so the output renders the same outside the component. [#2367](https://github.com/IgniteUI/igniteui-webcomponents/pull/2367)
|
|
13
|
+
- `toImage(options)` exports the code as a `File` in `svg`, `png`, `jpeg` or `webp` format. The `scale` option multiplies the component `size`, thus a 256px code with `scale: 2` gives a 512x512 image. Set `download: true` to open the browser download dialog. The `QrCodeExportFormat` and `QrCodeExportOptions` types are exported from the package entry point.
|
|
14
|
+
- #### Themes
|
|
15
|
+
- All components now carry `forced-colors: active` styles in the Material, Bootstrap, Fluent and Indigo themes. Thus in Windows High Contrast mode they draw from the system palette (`CanvasText`, `Highlight`, `GrayText`, `LinkText`), and the disabled, hover, focus and selected states stay distinguishable. [#2347](https://github.com/IgniteUI/igniteui-webcomponents/pull/2347)
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- #### Calendar, Date picker, Date range picker
|
|
19
|
+
- When `week-start` is not set, the week starts on the first day of the week of the `locale`, as reported by `Intl.Locale.prototype.getWeekInfo()`. For example, `bg` starts on Monday and `en` stays on Sunday. An explicit `week-start` has priority. Set `weekStart` to `undefined` to return to the locale value. Browsers without `getWeekInfo()` keep the Sunday default. [#1020](https://github.com/IgniteUI/igniteui-webcomponents/issues/1020)
|
|
20
|
+
- The header date and the month/year navigation follow the field order of the `locale`. For `ja`, the header shows `7月15日(火)`, and the year button precedes the month button and shows `2025年`. The years view keeps plain numbers. In vertical header orientation, the weekday line has no trailing comma. [#1712](https://github.com/IgniteUI/igniteui-webcomponents/issues/1712)
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- #### Library
|
|
24
|
+
- `defineAllComponents()` did not register `igc-qr-code` and `igc-virtual-scroll`. Thus the two components stayed undefined when you relied on the bulk registration. [#2373](https://github.com/IgniteUI/igniteui-webcomponents/pull/2373)
|
|
25
|
+
- #### Validation
|
|
26
|
+
- A host that starts invalid, such as `<igc-input required invalid>`, showed no validation messages. The validation container keeps its first render neutral for SSR parity and skips the projection slots until the host updates, and a host that hydrated invalid never rendered again. [#2374](https://github.com/IgniteUI/igniteui-webcomponents/pull/2374)
|
|
27
|
+
|
|
28
|
+
## [7.3.1] - 2026-09-01
|
|
29
|
+
### Added
|
|
30
|
+
- #### Color picker
|
|
31
|
+
- `IgcColorPickerComponentEventMap` is now exported from the package entry point. [#2360](https://github.com/IgniteUI/igniteui-webcomponents/pull/2360)
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- #### Avatar
|
|
35
|
+
- The component now exposes `role="img"`. Before, it declared `image`, which is an ARIA 1.3 token that current tools do not know. [#2363](https://github.com/IgniteUI/igniteui-webcomponents/pull/2363)
|
|
36
|
+
- The accessible name now comes from `alt`, and then from `initials`. The role description is the static string `avatar`. Before, the two were inverted: the name was always the literal "avatar", and `alt` or `initials` became the role description.
|
|
37
|
+
- #### Badge
|
|
38
|
+
- The role description is the static string `badge`. The visual `variant` no longer reaches assistive technology. `role="status"` is unchanged. [#2363](https://github.com/IgniteUI/igniteui-webcomponents/pull/2363)
|
|
39
|
+
- The `icon` CSS part now applies only when an `igc-icon` is the only content of the badge, as the documentation already stated.
|
|
40
|
+
- #### Chip
|
|
41
|
+
- **Breaking for custom styles:** `part="base"` is now a plain wrapper. The selection control moved to the new `action` part, and the remove control to the new `remove` part. Move rules that target `::part(base)` for the interactive surface to `::part(action)`. [#2362](https://github.com/IgniteUI/igniteui-webcomponents/pull/2362)
|
|
42
|
+
- `igcRemove` is typed `CustomEvent<void>`. The type declared a boolean detail that the event never carried.
|
|
43
|
+
- The `start` and `end` slots, and the `action` and `remove` parts, are documented. Thus they reach the custom elements manifest.
|
|
44
|
+
- #### Tile manager
|
|
45
|
+
- `igc-tile` renders its resize handles directly. Before, an internal element rendered them and exported the parts. The `trigger-side`, `trigger` and `trigger-bottom` parts keep their names, and the new `tile-container` part wraps the tile content together with the handles. [#2359](https://github.com/IgniteUI/igniteui-webcomponents/pull/2359)
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
- #### Avatar
|
|
49
|
+
- The `<img>` element carried no `alt` attribute when you set no alt text. This is an `image-alt` violation in the page of the consumer. The component now renders `alt=""`, thus the image counts as decorative. [#2363](https://github.com/IgniteUI/igniteui-webcomponents/pull/2363)
|
|
50
|
+
- Removed the documented `icon` CSS part. The component never rendered it.
|
|
51
|
+
- #### Badge
|
|
52
|
+
- A badge that holds an `igc-icon` together with text lost its inline padding and clipped the text under `overflow: hidden`. The `icon` part became active for any slotted icon, but the padding rule matched `[part='base']` exactly and thus did not apply. [#2363](https://github.com/IgniteUI/igniteui-webcomponents/pull/2363)
|
|
53
|
+
- #### Chip
|
|
54
|
+
- A removable chip failed the `nested-interactive` accessibility audit. The chip rendered its full surface as a button, and the remove icon inside it declared `role="button"` and `tabindex="0"`. The two controls are now siblings. [#2362](https://github.com/IgniteUI/igniteui-webcomponents/pull/2362)
|
|
55
|
+
- The accessible name of the chip read "Chip remove chip" or "select chip Chip", because the labels of the remove icon and of the selection icon became part of it. The name is now the content of the chip.
|
|
56
|
+
- `Space` did not toggle the selection, and `igcRemove` fired on chips that are not removable. The remove keybindings applied to the host and cancelled the activation keys of the chip. They now apply to the remove control only.
|
|
57
|
+
- Focus on the remove control now also shows the focus state of the chip.
|
|
58
|
+
- The prefix wrapper hides only when the chip is selectable and selected, and the suffix wrapper no longer hides because of `removable`.
|
|
59
|
+
- #### Color picker
|
|
60
|
+
- The picker canvas did not respond to touch input. [#2357](https://github.com/IgniteUI/igniteui-webcomponents/pull/2357)
|
|
61
|
+
- #### Textarea
|
|
62
|
+
- A change of `resize` away from `auto` did not release the inline height. Thus the control stayed at its last automatic height. [#2361](https://github.com/IgniteUI/igniteui-webcomponents/pull/2361)
|
|
63
|
+
- Text that you project into the default slot now becomes the default value, as with a native `<textarea>`. Before, it became the value. Thus the control was not pristine, and a form reset cleared the visible text while the light DOM still held it.
|
|
64
|
+
- #### Tile manager
|
|
65
|
+
- A swap of two positioned tiles wrote a column value into `rowStart`. Thus the tiles moved to the wrong row. [#2359](https://github.com/IgniteUI/igniteui-webcomponents/pull/2359)
|
|
66
|
+
- A tile that you add next to a single positioned tile collided with it at position 0.
|
|
8
67
|
|
|
9
68
|
## [7.3.0] - 2026-08-26
|
|
10
69
|
### Added
|
|
11
70
|
- #### Calendar
|
|
12
71
|
- `igc-calendar` now exports the `label-inner`, `months-row` and `years-row` parts. The pickers export them as `calendar-label-inner`, `months-row` and `years-row`. The views rendered these parts but did not export them, thus you could not style them through the calendar.
|
|
72
|
+
- #### Color picker
|
|
73
|
+
- New `igc-color-picker` component. It provides a user interface for selecting colors, supporting various color formats and a customizable palette. [#1973](https://github.com/IgniteUI/igniteui-webcomponents/pull/1973)
|
|
13
74
|
- #### Chip
|
|
14
75
|
- `outlined` property. When you set it to `true`, the chip shows an outlined style. [#2307](https://github.com/IgniteUI/igniteui-webcomponents/pull/2307)
|
|
15
76
|
- #### Icon
|
|
@@ -1555,6 +1616,8 @@ Initial release of Ignite UI Web Components
|
|
|
1555
1616
|
- Ripple component
|
|
1556
1617
|
- Switch component
|
|
1557
1618
|
|
|
1619
|
+
[7.3.2]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.3.1...7.3.2
|
|
1620
|
+
[7.3.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.3.0...7.3.1
|
|
1558
1621
|
[7.3.0]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.2.4...7.3.0
|
|
1559
1622
|
[7.2.4]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.2.3...7.2.4
|
|
1560
1623
|
[7.2.3]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.2.2...7.2.3
|
package/README.md
CHANGED
|
@@ -26,6 +26,9 @@ See the [Storybook Here](https://igniteui.github.io/igniteui-webcomponents)
|
|
|
26
26
|
|
|
27
27
|
| Components | Status | Documentation | Released Version | License |
|
|
28
28
|
| :---------------------- | :----: | :----------------------------: | :--------------: | :------------: |
|
|
29
|
+
| Virtual Scroll | ✅ | [Storybook][Storybook] | [7.3.0] | [MIT](LICENSE) |
|
|
30
|
+
| QR Code | ✅ | [Storybook][Storybook] | [7.3.0] | [MIT](LICENSE) |
|
|
31
|
+
| Color Picker | ✅ | [Storybook][Storybook] | [7.3.0] | [MIT](LICENSE) |
|
|
29
32
|
| Splitter | ✅ | [Docs][Splitter Docs] | [7.1.0] | [MIT](LICENSE) |
|
|
30
33
|
| Chat | ✅ | [Docs][Chat Docs] | [6.3.0] | [MIT](LICENSE) |
|
|
31
34
|
| Date Range Picker | ✅ | [Docs][Date Range Picker Docs] | [6.1.0] | [MIT](LICENSE) |
|
|
@@ -148,6 +151,31 @@ Refer to the documentation of your editor of choice to see if you can take advan
|
|
|
148
151
|
| igniteui-webcomponents/igniteui-webcomponents.css-data.json | VSCode CSS custom data |
|
|
149
152
|
| igniteui-webcomponents/igniteui-webcomponents.html-data.json | VSCode HTML custom data |
|
|
150
153
|
|
|
154
|
+
### AI agent skills
|
|
155
|
+
|
|
156
|
+
The package also includes reusable skills for GitHub Copilot and other compatible AI agents. They provide task-specific guidance and current best practices for:
|
|
157
|
+
|
|
158
|
+
- [Choosing the right components](skills/igniteui-wc-choose-components/SKILL.md)
|
|
159
|
+
- [Integrating with React, Angular, Vue, or vanilla JavaScript](skills/igniteui-wc-integrate-with-framework/SKILL.md)
|
|
160
|
+
- [Customizing component themes](skills/igniteui-wc-customize-component-theme/SKILL.md)
|
|
161
|
+
- [Generating a view from an image or design](skills/igniteui-wc-generate-from-image-design/SKILL.md)
|
|
162
|
+
- [Optimizing bundle size](skills/igniteui-wc-optimize-bundle-size/SKILL.md)
|
|
163
|
+
- [Migrating from Grid Lite to the premium Data Grid](skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md)
|
|
164
|
+
|
|
165
|
+
After installing the package, copy the skills into your repository so your agent can discover them automatically:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
# Unix/macOS
|
|
169
|
+
cp -r node_modules/igniteui-webcomponents/skills/* .github/skills/
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```powershell
|
|
173
|
+
# Windows PowerShell
|
|
174
|
+
Copy-Item -Recurse node_modules\igniteui-webcomponents\skills\* .github\skills\
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
See the [AI agent skills guide](skills/README.md) for example prompts, supported workflows, and additional installation locations.
|
|
178
|
+
|
|
151
179
|
## Contributing
|
|
152
180
|
|
|
153
181
|
Follow the [Contribution Guidelines] to setup a development
|
|
@@ -199,6 +227,7 @@ npm run storybook:build
|
|
|
199
227
|
|
|
200
228
|
[Ignite UI for Web Components]: https://www.infragistics.com/products/ignite-ui-web-components
|
|
201
229
|
[Indigo.Design Design System]: https://www.infragistics.com/products/appbuilder/ui-toolkit
|
|
230
|
+
[Storybook]: https://igniteui.github.io/igniteui-webcomponents
|
|
202
231
|
[Ignite UI for WebComponents Grids]: https://www.npmjs.com/package/igniteui-webcomponents-grids
|
|
203
232
|
[Dock Manager Picture]: https://github.com/IgniteUI/igniteui-webcomponents/assets/52001020/a9643f17-f1c2-4554-87aa-96c9daea13b0
|
|
204
233
|
[Custom Elements Manifest]: https://github.com/webcomponents/custom-elements-manifest
|
|
@@ -282,3 +311,4 @@ npm run storybook:build
|
|
|
282
311
|
[6.1.0]: https://github.com/IgniteUI/igniteui-webcomponents/releases/tag/6.1.0
|
|
283
312
|
[6.3.0]: https://github.com/IgniteUI/igniteui-webcomponents/releases/tag/6.3.0
|
|
284
313
|
[7.1.0]: https://github.com/IgniteUI/igniteui-webcomponents/releases/tag/7.1.0
|
|
314
|
+
[7.3.0]: https://github.com/IgniteUI/igniteui-webcomponents/releases/tag/7.3.0
|
|
@@ -6,12 +6,11 @@ import type { AvatarShape } from '../types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* @element igc-avatar
|
|
8
8
|
*
|
|
9
|
-
* @slot - Renders an icon inside the default slot.
|
|
9
|
+
* @slot - Renders an icon inside the default slot. Ignored when `initials` is set.
|
|
10
10
|
*
|
|
11
11
|
* @csspart base - The base wrapper of the avatar.
|
|
12
12
|
* @csspart initials - The initials wrapper of the avatar.
|
|
13
13
|
* @csspart image - The image wrapper of the avatar.
|
|
14
|
-
* @csspart icon - The icon wrapper of the avatar.
|
|
15
14
|
*/
|
|
16
15
|
export default class IgcAvatarComponent extends LitElement {
|
|
17
16
|
static readonly tagName = "igc-avatar";
|
|
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement, nothing } from 'lit';
|
|
8
8
|
import { property, state } from 'lit/decorators.js';
|
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
9
|
import { addInternalsController } from '#internals/controllers/internals.js';
|
|
11
10
|
import { registerComponent } from '#internals/definitions/register.js';
|
|
12
11
|
import { addThemingController } from '#theming/theming-controller.js';
|
|
@@ -25,11 +24,8 @@ export default class IgcAvatarComponent extends LitElement {
|
|
|
25
24
|
this.shape = 'square';
|
|
26
25
|
addThemingController(this, all);
|
|
27
26
|
addInternalsController(this, {
|
|
28
|
-
initialARIA: {
|
|
29
|
-
|
|
30
|
-
ariaLabel: 'avatar',
|
|
31
|
-
},
|
|
32
|
-
aria: () => ({ ariaRoleDescription: this.alt ?? this.initials ?? null }),
|
|
27
|
+
initialARIA: { role: 'img', ariaRoleDescription: 'avatar' },
|
|
28
|
+
aria: () => ({ ariaLabel: this.alt ?? this.initials ?? null }),
|
|
33
29
|
});
|
|
34
30
|
}
|
|
35
31
|
willUpdate(changedProperties) {
|
|
@@ -50,8 +46,8 @@ export default class IgcAvatarComponent extends LitElement {
|
|
|
50
46
|
? html `
|
|
51
47
|
<img
|
|
52
48
|
part="image"
|
|
53
|
-
alt=${
|
|
54
|
-
src=${
|
|
49
|
+
alt=${this.alt ?? ''}
|
|
50
|
+
src=${this.src}
|
|
55
51
|
@error=${this._handleError}
|
|
56
52
|
/>
|
|
57
53
|
`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../src/components/avatar/avatar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../src/components/avatar/avatar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCA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C,CAAC,IAAI,CAAA,eACV;UAEE,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS;YACzB,CAAC,CAAC,IAAI,CAAA;;;wBAGM,IAAI,CAAC,GAAG,IAAI,EAAE;wBACd,IAAI,CAAC,GAAG;2BACL,IAAI,CAAC,YAAY;;eAE7B;YACH,CAAC,CAAC,OACN;;KAEH,CAAC;IACJ,CAAC;;AAxEO;IADP,KAAK,EAAE;qDACkB;AAOnB;IADN,QAAQ,EAAE;+CACS;AAOb;IADN,QAAQ,EAAE;+CACS;AAOb;IADN,QAAQ,EAAE;oDACc;AAOlB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACS","sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { addInternalsController } from '#internals/controllers/internals.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport type { AvatarShape } from '../types.js';\nimport { styles } from './themes/avatar.base.css.js';\nimport { styles as shared } from './themes/shared/avatar.common.css.js';\nimport { all } from './themes/themes.js';\n\n/**\n * An avatar component is used as a representation of a user identity\n * typically in a user profile.\n *\n * @element igc-avatar\n *\n * @slot - Renders an icon inside the default slot. Ignored when `initials` is set.\n *\n * @csspart base - The base wrapper of the avatar.\n * @csspart initials - The initials wrapper of the avatar.\n * @csspart image - The image wrapper of the avatar.\n */\nexport default class IgcAvatarComponent extends LitElement {\n public static readonly tagName = 'igc-avatar';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcAvatarComponent);\n }\n\n @state()\n private _hasError = false;\n\n /**\n * The image source to use.\n * @attr\n */\n @property()\n public src?: string;\n\n /**\n * Alternative text for the image.\n * @attr\n */\n @property()\n public alt?: string;\n\n /**\n * Initials to use as a fallback when no image is available.\n * @attr\n */\n @property()\n public initials?: string;\n\n /**\n * The shape of the avatar.\n * @attr\n */\n @property({ reflect: true })\n public shape: AvatarShape = 'square';\n\n constructor() {\n super();\n addThemingController(this, all);\n\n addInternalsController(this, {\n initialARIA: { role: 'img', ariaRoleDescription: 'avatar' },\n aria: () => ({ ariaLabel: this.alt ?? this.initials ?? null }),\n });\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n if (changedProperties.has('src')) {\n this._hasError = false;\n }\n }\n\n protected _handleError(): void {\n this._hasError = true;\n }\n\n protected override render() {\n return html`\n <div part=\"base\">\n ${\n this.initials\n ? html`<span part=\"initials\">${this.initials}</span>`\n : html`<slot></slot>`\n }\n ${\n this.src && !this._hasError\n ? html`\n <img\n part=\"image\"\n alt=${this.alt ?? ''}\n src=${this.src}\n @error=${this._handleError}\n />\n `\n : nothing\n }\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-avatar': IgcAvatarComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[part=base]{position:relative;display:inline-flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline-style:none;flex-shrink:0;overflow:hidden;font-family:var(--ig-font-family)}img{position:absolute;width:100%;height:100%;border-radius:inherit;background-color:inherit;-o-object-fit:cover;object-fit:cover}[part=initials]{text-transform:uppercase}:host([shape=square]) [part=base]{border-radius:0}`;
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[part=base]{position:relative;display:inline-flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline-style:none;flex-shrink:0;overflow:hidden;font-family:var(--ig-font-family)}img{position:absolute;width:100%;height:100%;border-radius:inherit;background-color:inherit;-o-object-fit:cover;object-fit:cover}[part=initials]{text-transform:uppercase}:host([shape=square]) [part=base]{border-radius:0}@media(forced-colors: active){[part=base]{border:.0625rem solid CanvasText}}`;
|
|
3
3
|
//# sourceMappingURL=avatar.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.base.css.js","sourceRoot":"","sources":["../../../../src/components/avatar/themes/avatar.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"avatar.base.css.js","sourceRoot":"","sources":["../../../../src/components/avatar/themes/avatar.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,+kDAA+kD,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:inline-flex;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}[part=base]{position:relative;display:inline-flex;justify-content:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;outline-style:none;flex-shrink:0;overflow:hidden;font-family:var(--ig-font-family)}img{position:absolute;width:100%;height:100%;border-radius:inherit;background-color:inherit;-o-object-fit:cover;object-fit:cover}[part=initials]{text-transform:uppercase}:host([shape=square]) [part=base]{border-radius:0}@media(forced-colors: active){[part=base]{border:.0625rem solid CanvasText}}`;\n "]}
|
|
@@ -9,7 +9,7 @@ import type { BadgeShape, StyleVariant } from '../types.js';
|
|
|
9
9
|
* @slot - Default slot for the badge content.
|
|
10
10
|
*
|
|
11
11
|
* @csspart base - The base wrapper of the badge.
|
|
12
|
-
* @csspart icon - The icon container, present when an icon
|
|
12
|
+
* @csspart icon - The icon container, present when an `igc-icon` is the only slotted element.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```html
|
|
@@ -54,6 +54,11 @@ export default class IgcBadgeComponent extends LitElement {
|
|
|
54
54
|
*/
|
|
55
55
|
dot: boolean;
|
|
56
56
|
constructor();
|
|
57
|
+
/**
|
|
58
|
+
* The `icon` part is reserved for a badge whose only content is a single
|
|
59
|
+
* `igc-icon`, which renders as a circle rather than a padded pill. The filter
|
|
60
|
+
* discards the whitespace text nodes that formatted markup leaves around it.
|
|
61
|
+
*/
|
|
57
62
|
protected _handleSlotChange(): void;
|
|
58
63
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
59
64
|
}
|
|
@@ -10,6 +10,8 @@ import { addInternalsController } from '#internals/controllers/internals.js';
|
|
|
10
10
|
import { addSlotController, setSlots } from '#internals/controllers/slot.js';
|
|
11
11
|
import { registerComponent } from '#internals/definitions/register.js';
|
|
12
12
|
import { partMap } from '#internals/part-map.js';
|
|
13
|
+
import { isEmpty } from '#internals/utils/arrays.js';
|
|
14
|
+
import { isElement } from '#internals/utils/dom.js';
|
|
13
15
|
import { addThemingController } from '#theming/theming-controller.js';
|
|
14
16
|
import { styles } from './themes/badge.base.css.js';
|
|
15
17
|
import { styles as shared } from './themes/shared/badge.common.css.js';
|
|
@@ -33,14 +35,15 @@ export default class IgcBadgeComponent extends LitElement {
|
|
|
33
35
|
this.dot = false;
|
|
34
36
|
addThemingController(this, all);
|
|
35
37
|
addInternalsController(this, {
|
|
36
|
-
initialARIA: { role: 'status' },
|
|
37
|
-
aria: () => ({ ariaRoleDescription: `badge ${this.variant}` }),
|
|
38
|
+
initialARIA: { role: 'status', ariaRoleDescription: 'badge' },
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
_handleSlotChange() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const [content, ...rest] = this._slots
|
|
43
|
+
.getAssignedNodes('[default]')
|
|
44
|
+
.filter((node) => isElement(node) || node.textContent?.trim());
|
|
45
|
+
this._hasIcon =
|
|
46
|
+
isEmpty(rest) && isElement(content) && content.matches('igc-icon');
|
|
44
47
|
}
|
|
45
48
|
render() {
|
|
46
49
|
return html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../src/components/badge/badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAoBzC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,UAAU;aAChC,YAAO,GAAG,WAAW,AAAd,CAAe;aACtB,WAAM,GAA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EkB,MAAM;QACvB,OAAO,IAAI,CAAA;mBACI,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;;;KAG1D,CAAC;IACJ,CAAC;;AA5DM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACa;AASlC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACnB;AASjB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDACS;AAU9B;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CACxB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { addInternalsController } from '#internals/controllers/internals.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { partMap } from '#internals/part-map.js';\nimport { isEmpty } from '#internals/utils/arrays.js';\nimport { isElement } from '#internals/utils/dom.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport type { BadgeShape, StyleVariant } from '../types.js';\nimport { styles } from './themes/badge.base.css.js';\nimport { styles as shared } from './themes/shared/badge.common.css.js';\nimport { all } from './themes/themes.js';\n\n/**\n * The badge is a component indicating a status on a related item or an area\n * where some active indication is required.\n *\n * @element igc-badge\n *\n * @slot - Default slot for the badge content.\n *\n * @csspart base - The base wrapper of the badge.\n * @csspart icon - The icon container, present when an `igc-icon` is the only slotted element.\n *\n * @example\n * ```html\n * <igc-badge variant=\"success\">New</igc-badge>\n * <igc-badge variant=\"danger\" shape=\"square\">5</igc-badge>\n * <igc-badge dot></igc-badge>\n * ```\n */\nexport default class IgcBadgeComponent extends LitElement {\n public static readonly tagName = 'igc-badge';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcBadgeComponent);\n }\n\n private readonly _slots = addSlotController(this, {\n slots: setSlots(),\n onChange: this._handleSlotChange,\n });\n\n private _hasIcon = false;\n\n /**\n * The type (style variant) of the badge.\n *\n * @attr variant\n * @default 'primary'\n */\n @property({ reflect: true })\n public variant: StyleVariant = 'primary';\n\n /**\n * Sets whether to draw an outlined version of the badge.\n *\n * @attr outlined\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The shape of the badge.\n *\n * @attr shape\n * @default 'rounded'\n */\n @property({ reflect: true })\n public shape: BadgeShape = 'rounded';\n\n /**\n * Sets whether to render a dot type badge.\n * When enabled, the badge appears as a small dot without any content.\n *\n * @attr dot\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public dot = false;\n\n constructor() {\n super();\n\n addThemingController(this, all);\n\n addInternalsController(this, {\n initialARIA: { role: 'status', ariaRoleDescription: 'badge' },\n });\n }\n\n /**\n * The `icon` part is reserved for a badge whose only content is a single\n * `igc-icon`, which renders as a circle rather than a padded pill. The filter\n * discards the whitespace text nodes that formatted markup leaves around it.\n */\n protected _handleSlotChange(): void {\n const [content, ...rest] = this._slots\n .getAssignedNodes('[default]')\n .filter((node) => isElement(node) || node.textContent?.trim());\n\n this._hasIcon =\n isEmpty(rest) && isElement(content) && content.matches('igc-icon');\n }\n\n protected override render() {\n return html`\n <span part=${partMap({ base: true, icon: this._hasIcon })}>\n <slot></slot>\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-badge': IgcBadgeComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;display:inline-flex;vertical-align:top}[part~=base]{display:inline-flex;min-width:var(--_badge-size);min-height:var(--_badge-size);justify-content:center;align-items:center;overflow:hidden;white-space:nowrap;font-size:max(var(--is-large, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-medium, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-small, 1)*max(var(--ig-caption-font-size), -1 * var(--ig-caption-font-size)));font-weight:max(var(--is-large, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-medium, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-small, 1)*max(var(--ig-caption-font-weight), -1 * var(--ig-caption-font-weight)));line-height:max(var(--is-large, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-medium, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-small, 1)*max(var(--ig-caption-line-height), -1 * var(--ig-caption-line-height)));letter-spacing:max(var(--is-large, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-medium, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-small, 1)*max(var(--ig-caption-letter-spacing), -1 * var(--ig-caption-letter-spacing)));text-transform:max(var(--is-large, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-medium, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-small, 1)*max(var(--ig-caption-text-transform), -1 * var(--ig-caption-text-transform)))}:host(:not(:empty,[dot])) [part
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;display:inline-flex;vertical-align:top}[part~=base]{display:inline-flex;min-width:var(--_badge-size);min-height:var(--_badge-size);justify-content:center;align-items:center;overflow:hidden;white-space:nowrap;font-size:max(var(--is-large, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-medium, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-small, 1)*max(var(--ig-caption-font-size), -1 * var(--ig-caption-font-size)));font-weight:max(var(--is-large, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-medium, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-small, 1)*max(var(--ig-caption-font-weight), -1 * var(--ig-caption-font-weight)));line-height:max(var(--is-large, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-medium, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-small, 1)*max(var(--ig-caption-line-height), -1 * var(--ig-caption-line-height)));letter-spacing:max(var(--is-large, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-medium, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-small, 1)*max(var(--ig-caption-letter-spacing), -1 * var(--ig-caption-letter-spacing)));text-transform:max(var(--is-large, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-medium, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-small, 1)*max(var(--ig-caption-text-transform), -1 * var(--ig-caption-text-transform)))}:host(:not(:empty,[dot])) [part~=base]:not([part~=icon]){padding-inline:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(0.25rem, -1 * 0.25rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))))}:host([variant=info]) [part~=base]{background:var(--ig-info-500)}:host([variant=success]) [part~=base]{background:var(--ig-success-500)}:host([variant=warning]) [part~=base]{background:var(--ig-warn-500);color:var(--ig-warn-500-contrast)}:host([variant=warning]) [part~=base] igc-icon,:host([variant=warning]) [part~=base] ::slotted(igc-icon){color:var(--ig-warn-500-contrast)}:host([variant=danger]) [part~=base]{background:var(--ig-error-500);color:var(--ig-error-900-contrast)}:host([shape=rounded]),:host([shape=rounded]) [part~=base],:host([dot]) [part~=base]{border-radius:calc(var(--_badge-size)*2)}@media(forced-colors: active){[part~=base]{border:.0625rem solid CanvasText}}`;
|
|
3
3
|
//# sourceMappingURL=badge.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.base.css.js","sourceRoot":"","sources":["../../../../src/components/badge/themes/badge.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"badge.base.css.js","sourceRoot":"","sources":["../../../../src/components/badge/themes/badge.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,owHAAowH,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content;display:inline-flex;vertical-align:top}[part~=base]{display:inline-flex;min-width:var(--_badge-size);min-height:var(--_badge-size);justify-content:center;align-items:center;overflow:hidden;white-space:nowrap;font-size:max(var(--is-large, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-medium, 1)*max(var(--ig-body-2-font-size), -1 * var(--ig-body-2-font-size)),var(--is-small, 1)*max(var(--ig-caption-font-size), -1 * var(--ig-caption-font-size)));font-weight:max(var(--is-large, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-medium, 1)*max(var(--ig-body-2-font-weight), -1 * var(--ig-body-2-font-weight)),var(--is-small, 1)*max(var(--ig-caption-font-weight), -1 * var(--ig-caption-font-weight)));line-height:max(var(--is-large, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-medium, 1)*max(var(--ig-body-2-line-height), -1 * var(--ig-body-2-line-height)),var(--is-small, 1)*max(var(--ig-caption-line-height), -1 * var(--ig-caption-line-height)));letter-spacing:max(var(--is-large, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-medium, 1)*max(var(--ig-body-2-letter-spacing), -1 * var(--ig-body-2-letter-spacing)),var(--is-small, 1)*max(var(--ig-caption-letter-spacing), -1 * var(--ig-caption-letter-spacing)));text-transform:max(var(--is-large, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-medium, 1)*max(var(--ig-body-2-text-transform), -1 * var(--ig-body-2-text-transform)),var(--is-small, 1)*max(var(--ig-caption-text-transform), -1 * var(--ig-caption-text-transform)))}:host(:not(:empty,[dot])) [part~=base]:not([part~=icon]){padding-inline:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(0.25rem, -1 * 0.25rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))))}:host([variant=info]) [part~=base]{background:var(--ig-info-500)}:host([variant=success]) [part~=base]{background:var(--ig-success-500)}:host([variant=warning]) [part~=base]{background:var(--ig-warn-500);color:var(--ig-warn-500-contrast)}:host([variant=warning]) [part~=base] igc-icon,:host([variant=warning]) [part~=base] ::slotted(igc-icon){color:var(--ig-warn-500-contrast)}:host([variant=danger]) [part~=base]{background:var(--ig-error-500);color:var(--ig-error-900-contrast)}:host([shape=rounded]),:host([shape=rounded]) [part~=base],:host([dot]) [part~=base]{border-radius:calc(var(--_badge-size)*2)}@media(forced-colors: active){[part~=base]{border:.0625rem solid CanvasText}}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{display:block;min-width:20rem;flex-basis:20rem}[part~=spacer]{display:flex;flex-wrap:wrap;padding-block:max(var(--is-large, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-large, var(--ig-spacing-block, var(--ig-spacing))),var(--is-medium, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-medium, var(--ig-spacing-block, var(--ig-spacing))),var(--is-small, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-small, var(--ig-spacing-block, var(--ig-spacing))));padding-inline:max(var(--is-large, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))));gap:.5rem;justify-content:flex-end}[part~=message]{min-width:9.375rem;flex-basis:9.375rem;flex-grow:1}[part~=illustration]{justify-content:center}[part~=illustration],[part~=message]{display:flex;align-items:center}[part~=actions]{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;align-self:flex-end}::slotted([slot=actions]){display:flex;flex-wrap:wrap;gap:.5rem}::slotted([slot=prefix]){margin-inline-end:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))))}[part~=base]{overflow:hidden}:host(:not([open])) [part~=base]{height:0}:host([open]) [part~=base]{height:auto}`;
|
|
2
|
+
export const styles = css `:host{display:block;min-width:20rem;flex-basis:20rem}[part~=spacer]{display:flex;flex-wrap:wrap;padding-block:max(var(--is-large, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-large, var(--ig-spacing-block, var(--ig-spacing))),var(--is-medium, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-medium, var(--ig-spacing-block, var(--ig-spacing))),var(--is-small, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-small, var(--ig-spacing-block, var(--ig-spacing))));padding-inline:max(var(--is-large, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))));gap:.5rem;justify-content:flex-end}[part~=message]{min-width:9.375rem;flex-basis:9.375rem;flex-grow:1}[part~=illustration]{justify-content:center}[part~=illustration],[part~=message]{display:flex;align-items:center}[part~=actions]{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;align-self:flex-end}::slotted([slot=actions]){display:flex;flex-wrap:wrap;gap:.5rem}::slotted([slot=prefix]){margin-inline-end:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))))}[part~=base]{overflow:hidden}:host(:not([open])) [part~=base]{height:0}:host([open]) [part~=base]{height:auto}@media(forced-colors: active){[part~=spacer]{border-block-end:.0625rem solid CanvasText}}`;
|
|
3
3
|
//# sourceMappingURL=banner.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.base.css.js","sourceRoot":"","sources":["../../../../src/components/banner/themes/banner.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"banner.base.css.js","sourceRoot":"","sources":["../../../../src/components/banner/themes/banner.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,ixDAAixD,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{display:block;min-width:20rem;flex-basis:20rem}[part~=spacer]{display:flex;flex-wrap:wrap;padding-block:max(var(--is-large, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-large, var(--ig-spacing-block, var(--ig-spacing))),var(--is-medium, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-medium, var(--ig-spacing-block, var(--ig-spacing))),var(--is-small, 1)*max(16px, -1 * 16px)*var(--ig-spacing-block-small, var(--ig-spacing-block, var(--ig-spacing))));padding-inline:max(var(--is-large, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(8px, -1 * 8px)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))));gap:.5rem;justify-content:flex-end}[part~=message]{min-width:9.375rem;flex-basis:9.375rem;flex-grow:1}[part~=illustration]{justify-content:center}[part~=illustration],[part~=message]{display:flex;align-items:center}[part~=actions]{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;align-self:flex-end}::slotted([slot=actions]){display:flex;flex-wrap:wrap;gap:.5rem}::slotted([slot=prefix]){margin-inline-end:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, var(--ig-spacing))))}[part~=base]{overflow:hidden}:host(:not([open])) [part~=base]{height:0}:host([open]) [part~=base]{height:auto}@media(forced-colors: active){[part~=spacer]{border-block-end:.0625rem solid CanvasText}}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `[part~=spacer]{padding:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-large, var(--ig-spacing, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-medium, var(--ig-spacing, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-small, var(--ig-spacing, var(--ig-spacing))));background:var(--banner-background);box-shadow:inset 0 0 0 .0625rem var(--banner-border-color);border-radius:var(--border-radius)}[part~=message]{gap:.5rem}::slotted([slot=prefix]){--default-size: 2;--component-size: var(--ig-size, var(--default-size)) !important;margin-inline-end:0;color:inherit}[part~=illustration]{color:var(--banner-illustration-color)}[part~=content]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);color:var(--banner-message-color)}`;
|
|
2
|
+
export const styles = css `[part~=spacer]{padding:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-large, var(--ig-spacing, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-medium, var(--ig-spacing, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-small, var(--ig-spacing, var(--ig-spacing))));background:var(--banner-background);box-shadow:inset 0 0 0 .0625rem var(--banner-border-color);border-radius:var(--border-radius)}[part~=message]{gap:.5rem}::slotted([slot=prefix]){--default-size: 2;--component-size: var(--ig-size, var(--default-size)) !important;margin-inline-end:0;color:inherit}[part~=illustration]{color:var(--banner-illustration-color)}[part~=content]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);color:var(--banner-message-color)}@media(forced-colors: active){[part~=spacer]{border:.0625rem solid CanvasText}}`;
|
|
3
3
|
//# sourceMappingURL=banner.indigo.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banner.indigo.css.js","sourceRoot":"","sources":["../../../../../src/components/banner/themes/shared/banner.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"banner.indigo.css.js","sourceRoot":"","sources":["../../../../../src/components/banner/themes/shared/banner.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,ysCAAysC,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`[part~=spacer]{padding:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-large, var(--ig-spacing, var(--ig-spacing))),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-medium, var(--ig-spacing, var(--ig-spacing))),var(--is-small, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-small, var(--ig-spacing, var(--ig-spacing))));background:var(--banner-background);box-shadow:inset 0 0 0 .0625rem var(--banner-border-color);border-radius:var(--border-radius)}[part~=message]{gap:.5rem}::slotted([slot=prefix]){--default-size: 2;--component-size: var(--ig-size, var(--default-size)) !important;margin-inline-end:0;color:inherit}[part~=illustration]{color:var(--banner-illustration-color)}[part~=content]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);color:var(--banner-message-color)}@media(forced-colors: active){[part~=spacer]{border:.0625rem solid CanvasText}}`;\n "]}
|
|
@@ -6,6 +6,7 @@ import type { CalendarSelection, DateRangeDescriptor, WeekDays } from './types.j
|
|
|
6
6
|
declare const IgcCalendarBaseComponent_base: import("../../internals/mixins/constructor.js").AbstractConstructor<import("#internals/mixins/i18n.js").I18nInterface<IgcCalendarResourceStrings | ICalendarResourceStrings, IgcCalendarResourceStrings & ICalendarResourceStrings>> & typeof LitElement;
|
|
7
7
|
export declare class IgcCalendarBaseComponent extends IgcCalendarBaseComponent_base {
|
|
8
8
|
private _initialActiveDateSet;
|
|
9
|
+
private _weekStart?;
|
|
9
10
|
protected get _hasValues(): boolean;
|
|
10
11
|
/**
|
|
11
12
|
* The index of the first day of the week (Sunday = 0) as derived from {@link weekStart}.
|
|
@@ -57,10 +58,14 @@ export declare class IgcCalendarBaseComponent extends IgcCalendarBaseComponent_b
|
|
|
57
58
|
showWeekNumbers: boolean;
|
|
58
59
|
/**
|
|
59
60
|
* Gets/Sets the first day of the week.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* When not set, the week starts on the first day of the week of the current {@link locale}.
|
|
64
|
+
* Setting `undefined` returns to the locale value.
|
|
60
65
|
* @attr week-start
|
|
61
|
-
* @default sunday
|
|
62
66
|
*/
|
|
63
|
-
weekStart: WeekDays;
|
|
67
|
+
set weekStart(value: WeekDays | undefined);
|
|
68
|
+
get weekStart(): WeekDays;
|
|
64
69
|
/**
|
|
65
70
|
* Gets/Sets the special dates for the component.
|
|
66
71
|
*
|
|
@@ -13,7 +13,7 @@ import { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';
|
|
|
13
13
|
import { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';
|
|
14
14
|
import { I18nMixin } from '#internals/mixins/i18n.js';
|
|
15
15
|
import { firstOf } from '#internals/utils/arrays.js';
|
|
16
|
-
import { getWeekDayNumber } from './helpers.js';
|
|
16
|
+
import { getLocaleWeekStart, getWeekDayNumber } from './helpers.js';
|
|
17
17
|
const i18n = {
|
|
18
18
|
defaultEN: CalendarResourceStringsEN,
|
|
19
19
|
resourceMapName: 'calendar',
|
|
@@ -29,7 +29,6 @@ let IgcCalendarBaseComponent = class IgcCalendarBaseComponent extends I18nMixin(
|
|
|
29
29
|
this._disabledDates = [];
|
|
30
30
|
this.selection = 'single';
|
|
31
31
|
this.showWeekNumbers = false;
|
|
32
|
-
this.weekStart = 'sunday';
|
|
33
32
|
}
|
|
34
33
|
get _hasValues() {
|
|
35
34
|
return this._values.length > 0;
|
|
@@ -67,6 +66,12 @@ let IgcCalendarBaseComponent = class IgcCalendarBaseComponent extends I18nMixin(
|
|
|
67
66
|
get activeDate() {
|
|
68
67
|
return this._activeDate.native;
|
|
69
68
|
}
|
|
69
|
+
set weekStart(value) {
|
|
70
|
+
this._weekStart = value ?? undefined;
|
|
71
|
+
}
|
|
72
|
+
get weekStart() {
|
|
73
|
+
return this._weekStart ?? getLocaleWeekStart(this.locale);
|
|
74
|
+
}
|
|
70
75
|
set specialDates(value) {
|
|
71
76
|
this._specialDates = value ?? [];
|
|
72
77
|
}
|
|
@@ -134,7 +139,7 @@ __decorate([
|
|
|
134
139
|
], IgcCalendarBaseComponent.prototype, "showWeekNumbers", void 0);
|
|
135
140
|
__decorate([
|
|
136
141
|
property({ attribute: 'week-start' })
|
|
137
|
-
], IgcCalendarBaseComponent.prototype, "weekStart",
|
|
142
|
+
], IgcCalendarBaseComponent.prototype, "weekStart", null);
|
|
138
143
|
__decorate([
|
|
139
144
|
property({ attribute: false })
|
|
140
145
|
], IgcCalendarBaseComponent.prototype, "specialDates", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/components/calendar/base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAGr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EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;iEAC5C;AAQxB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;2DACA;AAUtC;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DAG9B;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DAG9B;AApJU,wBAAwB;IAFpC,oBAAoB;IACpB,gBAAgB;GACJ,wBAAwB,CAiLpC","sourcesContent":["import {\n CalendarResourceStringsEN,\n type ICalendarResourceStrings,\n} from 'igniteui-i18n-core';\nimport { LitElement, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { convertToDate, convertToDates } from '#internals/date/converters.js';\nimport { CalendarDay, toCalendarDayOrNull } from '#internals/date/model.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';\nimport type { IgcCalendarResourceStrings } from '#internals/i18n/EN/calendar.resources.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { firstOf } from '#internals/utils/arrays.js';\nimport { getWeekDayNumber } from './helpers.js';\nimport type {\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from './types.js';\n\nconst i18n: I18nControllerConfig<\n IgcCalendarResourceStrings | ICalendarResourceStrings\n> = {\n defaultEN: CalendarResourceStringsEN,\n resourceMapName: 'calendar',\n};\n\n@blazorIndirectRender\n@blazorDeepImport\nexport class IgcCalendarBaseComponent extends I18nMixin<\n IgcCalendarResourceStrings | ICalendarResourceStrings,\n typeof LitElement,\n IgcCalendarResourceStrings & ICalendarResourceStrings\n>(LitElement, i18n) {\n private _initialActiveDateSet = false;\n\n protected get _hasValues(): boolean {\n return this._values.length > 0;\n }\n\n /**\n * The index of the first day of the week (Sunday = 0) as derived from {@link weekStart}.\n *\n * @remarks\n * Derived on access instead of in `update()`, so that its consumers are not sensitive\n * to the order in which the base class and its descendants update.\n */\n protected get _firstDayOfWeek(): number {\n return getWeekDayNumber(this.weekStart);\n }\n\n protected get _isSingle(): boolean {\n return this.selection === 'single';\n }\n\n protected get _isMultiple(): boolean {\n return this.selection === 'multiple';\n }\n\n protected get _isRange(): boolean {\n return this.selection === 'range';\n }\n\n @state()\n protected _rangePreviewDate?: CalendarDay;\n\n @state()\n protected _activeDate = CalendarDay.today;\n\n @state()\n protected _value: CalendarDay | null = null;\n\n @state()\n protected _values: CalendarDay[] = [];\n\n @state()\n protected _specialDates: DateRangeDescriptor[] = [];\n\n @state()\n protected _disabledDates: DateRangeDescriptor[] = [];\n\n /* blazorSuppress */\n /**\n * The current value of the calendar.\n * Used when selection is set to single\n *\n * @attr value\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._value = toCalendarDayOrNull(convertToDate(value));\n }\n\n public get value(): Date | null {\n return this._value ? this._value.native : null;\n }\n\n /* blazorSuppress */\n /**\n * The current values of the calendar.\n * Used when selection is set to multiple or range.\n *\n * @attr values\n */\n @property({ converter: convertToDates })\n public set values(values: (Date | string)[] | string | null | undefined) {\n const converted = convertToDates(values);\n this._values = converted ? converted.map((v) => CalendarDay.from(v)) : [];\n }\n\n public get values(): Date[] {\n return this._values ? this._values.map((v) => v.native) : [];\n }\n\n /* blazorSuppress */\n /** Get/Set the date which is shown in view and is highlighted. By default it is the current date. */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._initialActiveDateSet = true;\n this._activeDate =\n toCalendarDayOrNull(convertToDate(value)) ?? CalendarDay.today;\n }\n\n public get activeDate(): Date {\n return this._activeDate.native;\n }\n\n /**\n * Sets the type of selection in the component.\n * @attr selection\n * @default single\n */\n @property()\n public selection: CalendarSelection = 'single';\n\n /**\n * Whether to show the week numbers.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /**\n * Gets/Sets the first day of the week.\n * @attr week-start\n * @default sunday\n */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n /**\n * Gets/Sets the special dates for the component.\n *\n * @remarks\n * Returns `undefined` when no dates are set, which the setter accepts as well so that\n * a round trip through the property is valid.\n */\n @property({ attribute: false })\n public set specialDates(value: DateRangeDescriptor[] | undefined) {\n this._specialDates = value ?? [];\n }\n\n public get specialDates(): DateRangeDescriptor[] | undefined {\n return this._specialDates.length ? this._specialDates : undefined;\n }\n\n /**\n * Gets/Sets the disabled dates for the component.\n *\n * @remarks\n * Returns `undefined` when no dates are set, which the setter accepts as well so that\n * a round trip through the property is valid.\n */\n @property({ attribute: false })\n public set disabledDates(value: DateRangeDescriptor[] | undefined) {\n this._disabledDates = value ?? [];\n }\n\n public get disabledDates(): DateRangeDescriptor[] | undefined {\n return this._disabledDates.length ? this._disabledDates : undefined;\n }\n\n /** @internal */\n protected override update(props: PropertyValues): void {\n if (props.has('selection') && this.hasUpdated) {\n this._rangePreviewDate = undefined;\n this._value = null;\n this._values = [];\n }\n\n super.update(props);\n }\n\n /** @internal */\n protected override firstUpdated(): void {\n if (this._initialActiveDateSet) {\n return;\n }\n\n if (this._isSingle) {\n this.activeDate = this.value ?? this.activeDate;\n } else {\n this.activeDate = firstOf(this.values) ?? this.activeDate;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/components/calendar/base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+B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AGlC;IADT,KAAK,EAAE;yDAC8B;AAG5B;IADT,KAAK,EAAE;+DAC4C;AAG1C;IADT,KAAK,EAAE;gEAC6C;AAUrD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;qDAGtC;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;sDAIvC;AASD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;0DAKhE;AAYM;IADN,QAAQ,EAAE;2DACoC;AAQxC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;iEAC5C;AAW/B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;yDAGrC;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4DAG9B;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DAG9B;AA9JU,wBAAwB;IAFpC,oBAAoB;IACpB,gBAAgB;GACJ,wBAAwB,CA2LpC","sourcesContent":["import {\n CalendarResourceStringsEN,\n type ICalendarResourceStrings,\n} from 'igniteui-i18n-core';\nimport { LitElement, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { convertToDate, convertToDates } from '#internals/date/converters.js';\nimport { CalendarDay, toCalendarDayOrNull } from '#internals/date/model.js';\nimport { blazorDeepImport } from '#internals/decorators/blazorDeepImport.js';\nimport { blazorIndirectRender } from '#internals/decorators/blazorIndirectRender.js';\nimport type { IgcCalendarResourceStrings } from '#internals/i18n/EN/calendar.resources.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { firstOf } from '#internals/utils/arrays.js';\nimport { getLocaleWeekStart, getWeekDayNumber } from './helpers.js';\nimport type {\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from './types.js';\n\nconst i18n: I18nControllerConfig<\n IgcCalendarResourceStrings | ICalendarResourceStrings\n> = {\n defaultEN: CalendarResourceStringsEN,\n resourceMapName: 'calendar',\n};\n\n@blazorIndirectRender\n@blazorDeepImport\nexport class IgcCalendarBaseComponent extends I18nMixin<\n IgcCalendarResourceStrings | ICalendarResourceStrings,\n typeof LitElement,\n IgcCalendarResourceStrings & ICalendarResourceStrings\n>(LitElement, i18n) {\n private _initialActiveDateSet = false;\n private _weekStart?: WeekDays;\n\n protected get _hasValues(): boolean {\n return this._values.length > 0;\n }\n\n /**\n * The index of the first day of the week (Sunday = 0) as derived from {@link weekStart}.\n *\n * @remarks\n * Derived on access instead of in `update()`, so that its consumers are not sensitive\n * to the order in which the base class and its descendants update.\n */\n protected get _firstDayOfWeek(): number {\n return getWeekDayNumber(this.weekStart);\n }\n\n protected get _isSingle(): boolean {\n return this.selection === 'single';\n }\n\n protected get _isMultiple(): boolean {\n return this.selection === 'multiple';\n }\n\n protected get _isRange(): boolean {\n return this.selection === 'range';\n }\n\n @state()\n protected _rangePreviewDate?: CalendarDay;\n\n @state()\n protected _activeDate = CalendarDay.today;\n\n @state()\n protected _value: CalendarDay | null = null;\n\n @state()\n protected _values: CalendarDay[] = [];\n\n @state()\n protected _specialDates: DateRangeDescriptor[] = [];\n\n @state()\n protected _disabledDates: DateRangeDescriptor[] = [];\n\n /* blazorSuppress */\n /**\n * The current value of the calendar.\n * Used when selection is set to single\n *\n * @attr value\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._value = toCalendarDayOrNull(convertToDate(value));\n }\n\n public get value(): Date | null {\n return this._value ? this._value.native : null;\n }\n\n /* blazorSuppress */\n /**\n * The current values of the calendar.\n * Used when selection is set to multiple or range.\n *\n * @attr values\n */\n @property({ converter: convertToDates })\n public set values(values: (Date | string)[] | string | null | undefined) {\n const converted = convertToDates(values);\n this._values = converted ? converted.map((v) => CalendarDay.from(v)) : [];\n }\n\n public get values(): Date[] {\n return this._values ? this._values.map((v) => v.native) : [];\n }\n\n /* blazorSuppress */\n /** Get/Set the date which is shown in view and is highlighted. By default it is the current date. */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._initialActiveDateSet = true;\n this._activeDate =\n toCalendarDayOrNull(convertToDate(value)) ?? CalendarDay.today;\n }\n\n public get activeDate(): Date {\n return this._activeDate.native;\n }\n\n /**\n * Sets the type of selection in the component.\n * @attr selection\n * @default single\n */\n @property()\n public selection: CalendarSelection = 'single';\n\n /**\n * Whether to show the week numbers.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /**\n * Gets/Sets the first day of the week.\n *\n * @remarks\n * When not set, the week starts on the first day of the week of the current {@link locale}.\n * Setting `undefined` returns to the locale value.\n * @attr week-start\n */\n @property({ attribute: 'week-start' })\n public set weekStart(value: WeekDays | undefined) {\n this._weekStart = value ?? undefined;\n }\n\n public get weekStart(): WeekDays {\n return this._weekStart ?? getLocaleWeekStart(this.locale);\n }\n\n /**\n * Gets/Sets the special dates for the component.\n *\n * @remarks\n * Returns `undefined` when no dates are set, which the setter accepts as well so that\n * a round trip through the property is valid.\n */\n @property({ attribute: false })\n public set specialDates(value: DateRangeDescriptor[] | undefined) {\n this._specialDates = value ?? [];\n }\n\n public get specialDates(): DateRangeDescriptor[] | undefined {\n return this._specialDates.length ? this._specialDates : undefined;\n }\n\n /**\n * Gets/Sets the disabled dates for the component.\n *\n * @remarks\n * Returns `undefined` when no dates are set, which the setter accepts as well so that\n * a round trip through the property is valid.\n */\n @property({ attribute: false })\n public set disabledDates(value: DateRangeDescriptor[] | undefined) {\n this._disabledDates = value ?? [];\n }\n\n public get disabledDates(): DateRangeDescriptor[] | undefined {\n return this._disabledDates.length ? this._disabledDates : undefined;\n }\n\n /** @internal */\n protected override update(props: PropertyValues): void {\n if (props.has('selection') && this.hasUpdated) {\n this._rangePreviewDate = undefined;\n this._value = null;\n this._values = [];\n }\n\n super.update(props);\n }\n\n /** @internal */\n protected override firstUpdated(): void {\n if (this._initialActiveDateSet) {\n return;\n }\n\n if (this._isSingle) {\n this.activeDate = this.value ?? this.activeDate;\n } else {\n this.activeDate = firstOf(this.values) ?? this.activeDate;\n }\n }\n}\n"]}
|
|
@@ -158,6 +158,8 @@ export default class IgcCalendarComponent extends IgcCalendarComponent_base {
|
|
|
158
158
|
private _getNextEnabledDate;
|
|
159
159
|
protected _renderNavigationButtons(): TemplateResult<1>;
|
|
160
160
|
protected _renderMonthButtonNavigation(active: CalendarDay, viewIndex: number): TemplateResult;
|
|
161
|
+
/** The year with the unit of the locale - `2025年` for `ja`, `2025 г.` for `bg`. */
|
|
162
|
+
protected _formatYear(day: CalendarDay): string;
|
|
161
163
|
protected _renderYearButtonNavigation(active: CalendarDay, viewIndex: number): TemplateResult;
|
|
162
164
|
/**
|
|
163
165
|
* Renders the off screen live region announcing the period the calendar navigated to.
|
|
@@ -169,6 +171,8 @@ export default class IgcCalendarComponent extends IgcCalendarComponent_base {
|
|
|
169
171
|
*/
|
|
170
172
|
protected _renderActivePeriod(): typeof nothing | TemplateResult<1>;
|
|
171
173
|
protected _renderYearRangeNavigation(active: CalendarDay): TemplateResult;
|
|
174
|
+
/** Renders the month and year buttons of the days view in the field order of the locale. */
|
|
175
|
+
protected _renderDayViewNavigation(active: CalendarDay, viewIndex: number): TemplateResult[];
|
|
172
176
|
protected _renderNavigation(date?: CalendarDay, showButtons?: boolean, viewIndex?: number): TemplateResult;
|
|
173
177
|
protected _renderHeader(): typeof nothing | TemplateResult<1>;
|
|
174
178
|
protected _renderHeaderDateSingle(): TemplateResult;
|