@siemens/element-ng 49.13.0 → 51.0.0-rc.3
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/README.md +1 -1
- package/fesm2022/siemens-element-ng-about.mjs +41 -25
- package/fesm2022/siemens-element-ng-about.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-accordion.mjs +56 -39
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-action-modal.mjs +81 -51
- package/fesm2022/siemens-element-ng-action-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ag-grid.mjs +15 -12
- package/fesm2022/siemens-element-ng-ag-grid.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +142 -137
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs +34 -28
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-autocomplete.mjs +27 -22
- package/fesm2022/siemens-element-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs +31 -21
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-badge.mjs +9 -8
- package/fesm2022/siemens-element-ng-badge.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs +17 -14
- package/fesm2022/siemens-element-ng-breadcrumb-router.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-breadcrumb.mjs +18 -15
- package/fesm2022/siemens-element-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-card.mjs +71 -46
- package/fesm2022/siemens-element-ng-card.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-carousel.mjs +55 -32
- package/fesm2022/siemens-element-ng-carousel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-chat-messages.mjs +175 -111
- package/fesm2022/siemens-element-ng-chat-messages.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs +37 -24
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-color-picker.mjs +24 -16
- package/fesm2022/siemens-element-ng-color-picker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs +52 -33
- package/fesm2022/siemens-element-ng-column-selection-dialog.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-common.mjs +12 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs +14 -12
- package/fesm2022/siemens-element-ng-connection-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +35 -26
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-copyright-notice.mjs +19 -14
- package/fesm2022/siemens-element-ng-copyright-notice.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs +327 -213
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datatable.mjs +8 -8
- package/fesm2022/siemens-element-ng-datatable.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs +119 -72
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +358 -234
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs +21 -16
- package/fesm2022/siemens-element-ng-electron-titlebar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-empty-state.mjs +15 -12
- package/fesm2022/siemens-element-ng-empty-state.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs +93 -81
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filter-bar.mjs +29 -22
- package/fesm2022/siemens-element-ng-filter-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs +243 -147
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-footer.mjs +12 -10
- package/fesm2022/siemens-element-ng-footer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs +267 -84
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-formly-legacy.mjs +99 -0
- package/fesm2022/siemens-element-ng-formly-legacy.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-formly.mjs +220 -315
- package/fesm2022/siemens-element-ng-formly.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +38 -29
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-help-button.mjs +5 -5
- package/fesm2022/siemens-element-ng-help-button.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-icon.mjs +46 -47
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-info-page.mjs +17 -11
- package/fesm2022/siemens-element-ng-info-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-inline-notification.mjs +19 -14
- package/fesm2022/siemens-element-ng-inline-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-ip-input.mjs +19 -15
- package/fesm2022/siemens-element-ng-ip-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-landing-page.mjs +118 -72
- package/fesm2022/siemens-element-ng-landing-page.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-language-switcher.mjs +16 -12
- package/fesm2022/siemens-element-ng-language-switcher.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-link.mjs +31 -21
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs +73 -54
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-loading-spinner.mjs +42 -33
- package/fesm2022/siemens-element-ng-loading-spinner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-localization.mjs +14 -12
- package/fesm2022/siemens-element-ng-localization.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +46 -29
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs +6 -5
- package/fesm2022/siemens-element-ng-markdown-renderer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +56 -48
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-modal.mjs +12 -10
- package/fesm2022/siemens-element-ng-modal.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs +133 -94
- package/fesm2022/siemens-element-ng-navbar-vertical-next.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +117 -81
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs +67 -41
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-notification-item.mjs +19 -11
- package/fesm2022/siemens-element-ng-notification-item.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs +38 -27
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pagination.mjs +31 -20
- package/fesm2022/siemens-element-ng-pagination.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-strength.mjs +31 -22
- package/fesm2022/siemens-element-ng-password-strength.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-password-toggle.mjs +18 -13
- package/fesm2022/siemens-element-ng-password-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs +121 -138
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +76 -45
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-pills-input.mjs +63 -58
- package/fesm2022/siemens-element-ng-pills-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover-legacy.mjs +43 -28
- package/fesm2022/siemens-element-ng-popover-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-popover.mjs +33 -26
- package/fesm2022/siemens-element-ng-popover.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-progressbar.mjs +23 -16
- package/fesm2022/siemens-element-ng-progressbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-resize-observer.mjs +32 -43
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-result-details-list.mjs +12 -10
- package/fesm2022/siemens-element-ng-result-details-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +32 -24
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-select.mjs +212 -154
- package/fesm2022/siemens-element-ng-select.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-shadow-root.mjs +3 -3
- package/fesm2022/siemens-element-ng-side-panel.mjs +119 -75
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-skip-links.mjs +14 -13
- package/fesm2022/siemens-element-ng-skip-links.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-slider.mjs +42 -28
- package/fesm2022/siemens-element-ng-slider.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs +268 -254
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs +57 -47
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-counter.mjs +15 -11
- package/fesm2022/siemens-element-ng-status-counter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +22 -14
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-chip.mjs +25 -16
- package/fesm2022/siemens-element-ng-summary-chip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-summary-widget.mjs +27 -17
- package/fesm2022/siemens-element-ng-summary-widget.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-system-banner.mjs +11 -8
- package/fesm2022/siemens-element-ng-system-banner.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs +16 -15
- package/fesm2022/siemens-element-ng-tabs-legacy.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tabs.mjs +59 -45
- package/fesm2022/siemens-element-ng-tabs.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-theme.mjs +5 -4
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-threshold.mjs +59 -40
- package/fesm2022/siemens-element-ng-threshold.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-toast-notification.mjs +45 -40
- package/fesm2022/siemens-element-ng-toast-notification.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tooltip.mjs +52 -54
- package/fesm2022/siemens-element-ng-tooltip.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tour.mjs +28 -19
- package/fesm2022/siemens-element-ng-tour.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-translate.mjs +0 -1
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +92 -73
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs +75 -67
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-wizard.mjs +72 -48
- package/fesm2022/siemens-element-ng-wizard.mjs.map +1 -1
- package/formly-legacy/package.json +4 -0
- package/package.json +20 -22
- package/schematics/migration.json +4 -4
- package/schematics/migrations/data/class-member-replacement.js +1 -19
- package/schematics/migrations/data/component-property-names.js +1 -25
- package/schematics/migrations/data/element-class-changes.js +1 -28
- package/schematics/migrations/data/element-migration-data.js +2 -0
- package/schematics/migrations/data/element-selectors.js +1 -11
- package/schematics/migrations/data/index.js +0 -4
- package/schematics/migrations/data/migration-test-data.js +9 -6
- package/schematics/migrations/data/provider-function-removals.js +7 -0
- package/schematics/migrations/data/symbol-removals.js +7 -7
- package/schematics/migrations/data/symbol-renaming.js +1 -48
- package/schematics/migrations/element-migration/element-migration.js +3 -6
- package/schematics/migrations/utilities/import-removal.js +39 -0
- package/schematics/migrations/utilities/index.js +2 -0
- package/schematics/migrations/utilities/provider-function-removal.migration.js +116 -0
- package/schematics/ng-update/index.js +1 -1
- package/schematics/ng-update/{migrate-to-v49.js → migrate-to-v51.js} +2 -2
- package/template-i18n.json +3 -6
- package/types/siemens-element-ng-application-header.d.ts +1 -21
- package/types/siemens-element-ng-chat-messages.d.ts +6 -4
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +1 -12
- package/types/siemens-element-ng-file-uploader.d.ts +5 -23
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +134 -37
- package/types/siemens-element-ng-formly-legacy.d.ts +40 -0
- package/types/siemens-element-ng-formly.d.ts +34 -167
- package/types/siemens-element-ng-icon.d.ts +2 -19
- package/types/siemens-element-ng-navbar-vertical-next.d.ts +6 -1
- package/types/siemens-element-ng-notification-item.d.ts +12 -0
- package/types/siemens-element-ng-phone-number.d.ts +5 -8
- package/types/siemens-element-ng-resize-observer.d.ts +0 -17
- package/types/siemens-element-ng-split.d.ts +95 -63
- package/types/siemens-element-ng-status-bar.d.ts +5 -13
- package/types/siemens-element-ng-status-counter.d.ts +1 -1
- package/types/siemens-element-ng-toast-notification.d.ts +0 -1
- package/types/siemens-element-ng-translate.d.ts +1 -5
- package/fesm2022/siemens-element-ng-icon-status.mjs +0 -46
- package/fesm2022/siemens-element-ng-icon-status.mjs.map +0 -1
- package/fesm2022/siemens-element-ng-sort-bar.mjs +0 -99
- package/fesm2022/siemens-element-ng-sort-bar.mjs.map +0 -1
- package/icon-status/package.json +0 -4
- package/schematics/vitest-setup.js +0 -5
- package/sort-bar/package.json +0 -4
- package/types/siemens-element-ng-icon-status.d.ts +0 -25
- package/types/siemens-element-ng-sort-bar.d.ts +0 -59
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, booleanAttribute, computed, signal, viewChild,
|
|
2
|
+
import { inject, input, booleanAttribute, computed, signal, viewChild, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { elementRight4 } from '@siemens/element-icons';
|
|
4
4
|
import { BlinkService } from '@siemens/element-ng/common';
|
|
5
5
|
import { STATUS_ICON_CONFIG, addIcons, SiIconComponent } from '@siemens/element-ng/icon';
|
|
@@ -14,7 +14,8 @@ class SiCircleStatusComponent {
|
|
|
14
14
|
/**
|
|
15
15
|
* The status (success, info, warning, danger) to be visualized.
|
|
16
16
|
*/
|
|
17
|
-
status = input(
|
|
17
|
+
status = input(/* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [undefined, { debugName: "status" }] : /* istanbul ignore next */ []));
|
|
18
19
|
/* DO NOT REMOVE: Even though the input is marked as deprecated, the core-team decided not to remove the
|
|
19
20
|
input. The possibility to have custom color is often requested by projects, so we keep it.
|
|
20
21
|
however in order to discourage it's use, we keep it marked deprecated.
|
|
@@ -23,57 +24,69 @@ class SiCircleStatusComponent {
|
|
|
23
24
|
* A custom color (e.g. `#fefefe`) for exceptional cases.
|
|
24
25
|
* @deprecated use the semantic `status` input instead.
|
|
25
26
|
*/
|
|
26
|
-
color = input(
|
|
27
|
+
color = input(/* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
27
29
|
/**
|
|
28
30
|
* Set a domain type icon (e.g. `element-door`) for which the status shall be shown.
|
|
29
31
|
* Leave undefined for visualizing the status without an icon.
|
|
30
32
|
*/
|
|
31
|
-
icon = input(
|
|
33
|
+
icon = input(/* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
32
35
|
/**
|
|
33
36
|
* Set the size using either regular or small only works when used together with `icon`
|
|
34
37
|
*
|
|
35
38
|
* @defaultValue 'regular'
|
|
36
39
|
*/
|
|
37
|
-
size = input('regular',
|
|
40
|
+
size = input('regular', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
38
42
|
/**
|
|
39
43
|
* event direction is out
|
|
40
44
|
*
|
|
41
45
|
* @defaultValue false
|
|
42
46
|
*/
|
|
43
|
-
eventOut = input(false, { ...(ngDevMode ? { debugName: "eventOut" } : {}), transform: booleanAttribute });
|
|
47
|
+
eventOut = input(false, { ...(ngDevMode ? { debugName: "eventOut" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
44
48
|
/**
|
|
45
49
|
* Custom icon class for event out
|
|
46
50
|
*/
|
|
47
|
-
eventIcon = input(
|
|
51
|
+
eventIcon = input(/* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [undefined, { debugName: "eventIcon" }] : /* istanbul ignore next */ []));
|
|
48
53
|
/**
|
|
49
54
|
* Whether the status should appear with a pulsing circle around the badge.
|
|
50
55
|
*
|
|
51
56
|
* @defaultValue false
|
|
52
57
|
*/
|
|
53
|
-
blink = input(false, { ...(ngDevMode ? { debugName: "blink" } : {}), transform: booleanAttribute });
|
|
58
|
+
blink = input(false, { ...(ngDevMode ? { debugName: "blink" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
54
59
|
/**
|
|
55
60
|
* Blink pulse generator for synchronized blinking with other components
|
|
56
61
|
*/
|
|
57
|
-
blinkPulse = input(
|
|
62
|
+
blinkPulse = input(/* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [undefined, { debugName: "blinkPulse" }] : /* istanbul ignore next */ []));
|
|
58
64
|
/**
|
|
59
65
|
* Aria label for icon and status combo. Needed for a11y
|
|
60
66
|
*/
|
|
61
|
-
ariaLabel = input(
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
ariaLabel = input(/* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
69
|
+
backgroundClass = computed(() => this.statusIcon()?.background ?? '', /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "backgroundClass" }] : /* istanbul ignore next */ []));
|
|
71
|
+
theAriaLabel = computed(() => this.ariaLabel() ?? this.autoLabel(), /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "theAriaLabel" }] : /* istanbul ignore next */ []));
|
|
64
73
|
autoLabel = computed(() => {
|
|
65
74
|
const status = this.status();
|
|
66
75
|
const statusName = status && this.statusIcons[status] ? status : 'none';
|
|
67
76
|
const direction = this.eventOut() ? ' out' : '';
|
|
68
77
|
const iconName = this.icon()?.replace(/^element-{0,1}(.+)/, '$1 ') ?? '';
|
|
69
78
|
return `${iconName.toLocaleLowerCase()}${this.status() && this.icon() ? 'in ' : ''}status ${statusName}${direction}`;
|
|
70
|
-
},
|
|
79
|
+
}, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "autoLabel" }] : /* istanbul ignore next */ []));
|
|
71
81
|
statusIcon = computed(() => {
|
|
72
82
|
const status = this.status();
|
|
73
83
|
return status ? this.statusIcons[status] : undefined;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
}, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "statusIcon" }] : /* istanbul ignore next */ []));
|
|
86
|
+
blinkOn = signal(false, /* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [{ debugName: "blinkOn" }] : /* istanbul ignore next */ []));
|
|
88
|
+
contrastFix = signal(false, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "contrastFix" }] : /* istanbul ignore next */ []));
|
|
77
90
|
icons = addIcons({ elementRight4 });
|
|
78
91
|
blinkSubs;
|
|
79
92
|
bg = viewChild.required('bg');
|
|
@@ -107,12 +120,12 @@ class SiCircleStatusComponent {
|
|
|
107
120
|
?.map(v => +v);
|
|
108
121
|
return !!rgb && Math.round((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000) <= 128;
|
|
109
122
|
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiCircleStatusComponent, isStandalone: true, selector: "si-circle-status", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, eventOut: { classPropertyName: "eventOut", publicName: "eventOut", isSignal: true, isRequired: false, transformFunction: null }, eventIcon: { classPropertyName: "eventIcon", publicName: "eventIcon", isSignal: true, isRequired: false, transformFunction: null }, blink: { classPropertyName: "blink", publicName: "blink", isSignal: true, isRequired: false, transformFunction: null }, blinkPulse: { classPropertyName: "blinkPulse", publicName: "blinkPulse", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "bg", first: true, predicate: ["bg"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n [class]=\"`bg ${backgroundClass()}`\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon [class]=\"`status-icon ${iconConfig.color}`\" [icon]=\"iconConfig.icon\" />\n <si-icon [class]=\"`status-icon ${iconConfig.stackedColor}`\" [icon]=\"iconConfig.stacked\" />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n", styles: [":host{display:inline-block;vertical-align:middle}:host .status-indication ::ng-deep .status-icon{font-size:1.25rem}:host .status-indication.has-icon.small ::ng-deep .status-icon,:host .status-indication.has-icon.small ::ng-deep .event-out{font-size:1rem}.deprecated-dot{inline-size:.625rem;block-size:.625rem;border-radius:50%}.event-out{position:absolute;inset-block-end:-.125rem;inset-inline-end:-.8125rem}.status-indication{position:relative;inline-size:calc(1.25rem + 20px);block-size:calc(1.25rem + 20px);border-radius:50%;border:1px solid transparent}.status-indication.has-icon{border-color:var(--element-ui-4);background-color:var(--element-base-1);margin-block:.375rem;margin-inline:0 .75rem}.status-indication.has-icon .deprecated-dot,.status-indication.has-icon .indicator{position:absolute}.status-indication.has-icon .deprecated-dot{inset-block-start:-.125rem;inset-inline-end:0}.status-indication.has-icon .indicator{inset-block-start:-.4375rem;inset-inline-end:-.6875rem}.status-indication.has-icon.small{inline-size:calc(1.25rem + 12px);block-size:calc(1.25rem + 12px);margin-block:.25rem;margin-inline:0 .5rem}.status-indication.has-icon.small .event-out{inset-block-end:.0625rem;inset-inline-end:-.5625rem}.status-indication.has-icon.small .deprecated-dot{inline-size:.5rem;block-size:.5rem;inset-block-start:-.0625rem;inset-inline-end:-.0625rem}.status-indication.has-icon.small .indicator{inset-block-start:-.375rem;inset-inline-end:-.5rem}.status-indication>*{pointer-events:none;line-height:0}.bg{position:absolute;inset:0;border-radius:50%;transition:opacity calc(.5s * var(--element-animations-enabled, 1));opacity:0}.pulse.deprecated-color{opacity:.5}.pulse.deprecated-color.contrast-fix{opacity:.25}.pulse:not(.deprecated-color){opacity:1}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
112
125
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusComponent, decorators: [{
|
|
114
127
|
type: Component,
|
|
115
|
-
args: [{ selector: 'si-circle-status', imports: [SiIconComponent, SiTranslatePipe],
|
|
128
|
+
args: [{ selector: 'si-circle-status', imports: [SiIconComponent, SiTranslatePipe], template: "<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n [class]=\"`bg ${backgroundClass()}`\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon [class]=\"`status-icon ${iconConfig.color}`\" [icon]=\"iconConfig.icon\" />\n <si-icon [class]=\"`status-icon ${iconConfig.stackedColor}`\" [icon]=\"iconConfig.stacked\" />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n", styles: [":host{display:inline-block;vertical-align:middle}:host .status-indication ::ng-deep .status-icon{font-size:1.25rem}:host .status-indication.has-icon.small ::ng-deep .status-icon,:host .status-indication.has-icon.small ::ng-deep .event-out{font-size:1rem}.deprecated-dot{inline-size:.625rem;block-size:.625rem;border-radius:50%}.event-out{position:absolute;inset-block-end:-.125rem;inset-inline-end:-.8125rem}.status-indication{position:relative;inline-size:calc(1.25rem + 20px);block-size:calc(1.25rem + 20px);border-radius:50%;border:1px solid transparent}.status-indication.has-icon{border-color:var(--element-ui-4);background-color:var(--element-base-1);margin-block:.375rem;margin-inline:0 .75rem}.status-indication.has-icon .deprecated-dot,.status-indication.has-icon .indicator{position:absolute}.status-indication.has-icon .deprecated-dot{inset-block-start:-.125rem;inset-inline-end:0}.status-indication.has-icon .indicator{inset-block-start:-.4375rem;inset-inline-end:-.6875rem}.status-indication.has-icon.small{inline-size:calc(1.25rem + 12px);block-size:calc(1.25rem + 12px);margin-block:.25rem;margin-inline:0 .5rem}.status-indication.has-icon.small .event-out{inset-block-end:.0625rem;inset-inline-end:-.5625rem}.status-indication.has-icon.small .deprecated-dot{inline-size:.5rem;block-size:.5rem;inset-block-start:-.0625rem;inset-inline-end:-.0625rem}.status-indication.has-icon.small .indicator{inset-block-start:-.375rem;inset-inline-end:-.5rem}.status-indication>*{pointer-events:none;line-height:0}.bg{position:absolute;inset:0;border-radius:50%;transition:opacity calc(.5s * var(--element-animations-enabled, 1));opacity:0}.pulse.deprecated-color{opacity:.5}.pulse.deprecated-color.contrast-fix{opacity:.25}.pulse:not(.deprecated-color){opacity:1}\n"] }]
|
|
116
129
|
}], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], eventOut: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventOut", required: false }] }], eventIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventIcon", required: false }] }], blink: [{ type: i0.Input, args: [{ isSignal: true, alias: "blink", required: false }] }], blinkPulse: [{ type: i0.Input, args: [{ isSignal: true, alias: "blinkPulse", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], bg: [{ type: i0.ViewChild, args: ['bg', { isSignal: true }] }] } });
|
|
117
130
|
|
|
118
131
|
/**
|
|
@@ -120,11 +133,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
120
133
|
* SPDX-License-Identifier: MIT
|
|
121
134
|
*/
|
|
122
135
|
class SiCircleStatusModule {
|
|
123
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
124
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
125
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
137
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusModule, imports: [SiCircleStatusComponent], exports: [SiCircleStatusComponent] });
|
|
138
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusModule, imports: [SiCircleStatusComponent] });
|
|
126
139
|
}
|
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiCircleStatusModule, decorators: [{
|
|
128
141
|
type: NgModule,
|
|
129
142
|
args: [{
|
|
130
143
|
imports: [SiCircleStatusComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-circle-status.mjs","sources":["../../../../projects/element-ng/circle-status/si-circle-status.component.ts","../../../../projects/element-ng/circle-status/si-circle-status.component.html","../../../../projects/element-ng/circle-status/si-circle-status.module.ts","../../../../projects/element-ng/circle-status/index.ts","../../../../projects/element-ng/circle-status/siemens-element-ng-circle-status.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport { elementRight4 } from '@siemens/element-icons';\nimport { BlinkService, EntityStatusType, StatusIcon } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent, STATUS_ICON_CONFIG } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Observable, Subscription } from 'rxjs';\n\n@Component({\n selector: 'si-circle-status',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-circle-status.component.html',\n styleUrl: './si-circle-status.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiCircleStatusComponent implements OnChanges, OnDestroy {\n private readonly statusIcons = inject(STATUS_ICON_CONFIG);\n /**\n * The status (success, info, warning, danger) to be visualized.\n */\n readonly status = input<EntityStatusType>();\n\n /* DO NOT REMOVE: Even though the input is marked as deprecated, the core-team decided not to remove the\n input. The possibility to have custom color is often requested by projects, so we keep it.\n however in order to discourage it's use, we keep it marked deprecated.\n */\n /**\n * A custom color (e.g. `#fefefe`) for exceptional cases.\n * @deprecated use the semantic `status` input instead.\n */\n readonly color = input<string>();\n\n /**\n * Set a domain type icon (e.g. `element-door`) for which the status shall be shown.\n * Leave undefined for visualizing the status without an icon.\n */\n readonly icon = input<string>();\n\n /**\n * Set the size using either regular or small only works when used together with `icon`\n *\n * @defaultValue 'regular'\n */\n readonly size = input<'regular' | 'small'>('regular');\n\n /**\n * event direction is out\n *\n * @defaultValue false\n */\n readonly eventOut = input(false, { transform: booleanAttribute });\n\n /**\n * Custom icon class for event out\n */\n readonly eventIcon = input<string>();\n\n /**\n * Whether the status should appear with a pulsing circle around the badge.\n *\n * @defaultValue false\n */\n readonly blink = input(false, { transform: booleanAttribute });\n\n /**\n * Blink pulse generator for synchronized blinking with other components\n */\n readonly blinkPulse = input<Observable<boolean>>();\n\n /**\n * Aria label for icon and status combo. Needed for a11y\n */\n readonly ariaLabel = input<TranslatableString>();\n\n protected readonly backgroundClass = computed(() => this.statusIcon()?.background ?? '');\n protected readonly theAriaLabel = computed(() => this.ariaLabel() ?? this.autoLabel());\n protected readonly autoLabel = computed(() => {\n const status = this.status();\n const statusName = status && this.statusIcons[status] ? status : 'none';\n const direction = this.eventOut() ? ' out' : '';\n const iconName = this.icon()?.replace(/^element-{0,1}(.+)/, '$1 ') ?? '';\n return `${iconName.toLocaleLowerCase()}${\n this.status() && this.icon() ? 'in ' : ''\n }status ${statusName}${direction}`;\n });\n protected readonly statusIcon = computed<StatusIcon | undefined>(() => {\n const status = this.status();\n return status ? this.statusIcons[status] : undefined;\n });\n protected readonly blinkOn = signal(false);\n protected readonly contrastFix = signal(false);\n protected readonly icons = addIcons({ elementRight4 });\n private blinkSubs?: Subscription;\n\n private readonly bg = viewChild.required<ElementRef>('bg');\n\n private blinkService = inject(BlinkService);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (this.blinkService && changes.blink) {\n this.blinkSubs?.unsubscribe();\n\n if (this.blink()) {\n const pulse = this.blinkPulse() ?? this.blinkService.pulse$;\n this.blinkSubs = pulse.subscribe(onOff => {\n this.blinkOn.set(onOff);\n });\n } else {\n this.blinkOn.set(false);\n }\n }\n if (changes.color || changes.blink) {\n queueMicrotask(() => {\n this.contrastFix.set(!!this.color() && this.blink() && this.calculateContrastFix());\n });\n }\n }\n\n ngOnDestroy(): void {\n this.blinkSubs?.unsubscribe();\n }\n\n private calculateContrastFix(): boolean {\n // see https://www.w3.org/TR/AERT/#color-contrast\n const rgb = getComputedStyle(this.bg().nativeElement)\n .backgroundColor?.match(/\\d+/g)\n ?.map(v => +v);\n return !!rgb && Math.round((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000) <= 128;\n }\n}\n","<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n [class]=\"`bg ${backgroundClass()}`\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon [class]=\"`status-icon ${iconConfig.color}`\" [icon]=\"iconConfig.icon\" />\n <si-icon [class]=\"`status-icon ${iconConfig.stackedColor}`\" [icon]=\"iconConfig.stacked\" />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiCircleStatusComponent } from './si-circle-status.component';\n\n@NgModule({\n imports: [SiCircleStatusComponent],\n exports: [SiCircleStatusComponent]\n})\nexport class SiCircleStatusModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-circle-status.component';\nexport * from './si-circle-status.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MA4BU,uBAAuB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACzD;;AAEG;IACM,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoB;AAE3C;;;AAGG;AACH;;;AAGG;IACM,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEhC;;;AAGG;IACM,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAE/B;;;;AAIG;AACM,IAAA,IAAI,GAAG,KAAK,CAAsB,SAAS,gDAAC;AAErD;;;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B,CAAC;oBAClC,OAAO,EAAE,CAAC,uBAAuB;AAClC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-circle-status.mjs","sources":["../../../../projects/element-ng/circle-status/si-circle-status.component.ts","../../../../projects/element-ng/circle-status/si-circle-status.component.html","../../../../projects/element-ng/circle-status/si-circle-status.module.ts","../../../../projects/element-ng/circle-status/index.ts","../../../../projects/element-ng/circle-status/siemens-element-ng-circle-status.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport { elementRight4 } from '@siemens/element-icons';\nimport { BlinkService, EntityStatusType, StatusIcon } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent, STATUS_ICON_CONFIG } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Observable, Subscription } from 'rxjs';\n\n@Component({\n selector: 'si-circle-status',\n imports: [SiIconComponent, SiTranslatePipe],\n templateUrl: './si-circle-status.component.html',\n styleUrl: './si-circle-status.component.scss'\n})\nexport class SiCircleStatusComponent implements OnChanges, OnDestroy {\n private readonly statusIcons = inject(STATUS_ICON_CONFIG);\n /**\n * The status (success, info, warning, danger) to be visualized.\n */\n readonly status = input<EntityStatusType>();\n\n /* DO NOT REMOVE: Even though the input is marked as deprecated, the core-team decided not to remove the\n input. The possibility to have custom color is often requested by projects, so we keep it.\n however in order to discourage it's use, we keep it marked deprecated.\n */\n /**\n * A custom color (e.g. `#fefefe`) for exceptional cases.\n * @deprecated use the semantic `status` input instead.\n */\n readonly color = input<string>();\n\n /**\n * Set a domain type icon (e.g. `element-door`) for which the status shall be shown.\n * Leave undefined for visualizing the status without an icon.\n */\n readonly icon = input<string>();\n\n /**\n * Set the size using either regular or small only works when used together with `icon`\n *\n * @defaultValue 'regular'\n */\n readonly size = input<'regular' | 'small'>('regular');\n\n /**\n * event direction is out\n *\n * @defaultValue false\n */\n readonly eventOut = input(false, { transform: booleanAttribute });\n\n /**\n * Custom icon class for event out\n */\n readonly eventIcon = input<string>();\n\n /**\n * Whether the status should appear with a pulsing circle around the badge.\n *\n * @defaultValue false\n */\n readonly blink = input(false, { transform: booleanAttribute });\n\n /**\n * Blink pulse generator for synchronized blinking with other components\n */\n readonly blinkPulse = input<Observable<boolean>>();\n\n /**\n * Aria label for icon and status combo. Needed for a11y\n */\n readonly ariaLabel = input<TranslatableString>();\n\n protected readonly backgroundClass = computed(() => this.statusIcon()?.background ?? '');\n protected readonly theAriaLabel = computed(() => this.ariaLabel() ?? this.autoLabel());\n protected readonly autoLabel = computed(() => {\n const status = this.status();\n const statusName = status && this.statusIcons[status] ? status : 'none';\n const direction = this.eventOut() ? ' out' : '';\n const iconName = this.icon()?.replace(/^element-{0,1}(.+)/, '$1 ') ?? '';\n return `${iconName.toLocaleLowerCase()}${\n this.status() && this.icon() ? 'in ' : ''\n }status ${statusName}${direction}`;\n });\n protected readonly statusIcon = computed<StatusIcon | undefined>(() => {\n const status = this.status();\n return status ? this.statusIcons[status] : undefined;\n });\n protected readonly blinkOn = signal(false);\n protected readonly contrastFix = signal(false);\n protected readonly icons = addIcons({ elementRight4 });\n private blinkSubs?: Subscription;\n\n private readonly bg = viewChild.required<ElementRef>('bg');\n\n private blinkService = inject(BlinkService);\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n if (this.blinkService && changes.blink) {\n this.blinkSubs?.unsubscribe();\n\n if (this.blink()) {\n const pulse = this.blinkPulse() ?? this.blinkService.pulse$;\n this.blinkSubs = pulse.subscribe(onOff => {\n this.blinkOn.set(onOff);\n });\n } else {\n this.blinkOn.set(false);\n }\n }\n if (changes.color || changes.blink) {\n queueMicrotask(() => {\n this.contrastFix.set(!!this.color() && this.blink() && this.calculateContrastFix());\n });\n }\n }\n\n ngOnDestroy(): void {\n this.blinkSubs?.unsubscribe();\n }\n\n private calculateContrastFix(): boolean {\n // see https://www.w3.org/TR/AERT/#color-contrast\n const rgb = getComputedStyle(this.bg().nativeElement)\n .backgroundColor?.match(/\\d+/g)\n ?.map(v => +v);\n return !!rgb && Math.round((rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000) <= 128;\n }\n}\n","<div\n class=\"status-indication d-flex align-items-center justify-content-center\"\n role=\"status\"\n [class.has-icon]=\"icon()\"\n [class.small]=\"size() === 'small'\"\n [attr.aria-label]=\"theAriaLabel() | translate\"\n>\n <div\n #bg\n [class]=\"`bg ${backgroundClass()}`\"\n [class.pulse]=\"blinkOn()\"\n [class.deprecated-color]=\"!status()\"\n [class.contrast-fix]=\"contrastFix()\"\n [style.background-color]=\"color()\"\n ></div>\n @if (!status()) {\n <div class=\"deprecated-dot\" [style.background-color]=\"color()\"></div>\n }\n @let iconConfig = statusIcon();\n @if (iconConfig) {\n <span class=\"status-icon icon-stack indicator\">\n <si-icon [class]=\"`status-icon ${iconConfig.color}`\" [icon]=\"iconConfig.icon\" />\n <si-icon [class]=\"`status-icon ${iconConfig.stackedColor}`\" [icon]=\"iconConfig.stacked\" />\n </span>\n }\n @let eventIconValue = eventIcon();\n @if (eventOut()) {\n <si-icon class=\"icon text-body event-out flip-rtl\" [icon]=\"icons.elementRight4\" />\n } @else if (eventIconValue) {\n <si-icon class=\"icon text-body event-out\" [icon]=\"eventIconValue\" />\n }\n @let iconValue = icon();\n @if (iconValue) {\n <si-icon class=\"icon position-relative text-body\" [icon]=\"iconValue\" />\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiCircleStatusComponent } from './si-circle-status.component';\n\n@NgModule({\n imports: [SiCircleStatusComponent],\n exports: [SiCircleStatusComponent]\n})\nexport class SiCircleStatusModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-circle-status.component';\nexport * from './si-circle-status.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;;AAGG;MA0BU,uBAAuB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACzD;;AAEG;AACM,IAAA,MAAM,GAAG,KAAK;0FAAoB;AAE3C;;;AAGG;AACH;;;AAGG;AACM,IAAA,KAAK,GAAG,KAAK;yFAAU;AAEhC;;;AAGG;AACM,IAAA,IAAI,GAAG,KAAK;wFAAU;AAE/B;;;;AAIG;IACM,IAAI,GAAG,KAAK,CAAsB,SAAS;6EAAC;AAErD;;;;AAIG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjE;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK;6FAAU;AAEpC;;;;AAIG;IACM,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D;;AAEG;AACM,IAAA,UAAU,GAAG,KAAK;8FAAuB;AAElD;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK;6FAAsB;AAE7B,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,UAAU,IAAI,EAAE;wFAAC;AACrE,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE;qFAAC;AACnE,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;AAC3C,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5B,QAAA,MAAM,UAAU,GAAG,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,MAAM;AACvE,QAAA,MAAM,SAAS,GAAG,I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A,CAAA;;2FAGtB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,uBAAuB,CAAC;oBAClC,OAAO,EAAE,CAAC,uBAAuB;AAClC,iBAAA;;;ACXD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, booleanAttribute, viewChild, viewChildren, computed, signal,
|
|
3
|
+
import { input, model, booleanAttribute, viewChild, viewChildren, computed, signal, Component } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { elementOk } from '@siemens/element-icons';
|
|
6
6
|
import { isRTL } from '@siemens/element-ng/common';
|
|
@@ -45,24 +45,26 @@ class SiColorPickerComponent {
|
|
|
45
45
|
*
|
|
46
46
|
* @defaultValue The first 16 colors of the Element data color palette.
|
|
47
47
|
*/
|
|
48
|
-
colorPalette = input(defaultDataColors,
|
|
48
|
+
colorPalette = input(defaultDataColors, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "colorPalette" }] : /* istanbul ignore next */ []));
|
|
49
50
|
/**
|
|
50
51
|
* The selected color.
|
|
51
52
|
*/
|
|
52
|
-
color = model(
|
|
53
|
+
color = model(/* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
53
55
|
/**
|
|
54
56
|
* Specifies whether the color popup should automatically close on a color selection.
|
|
55
57
|
*
|
|
56
58
|
* @defaultValue false
|
|
57
59
|
*/
|
|
58
|
-
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : {}), transform: booleanAttribute });
|
|
60
|
+
autoClose = input(false, { ...(ngDevMode ? { debugName: "autoClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
59
61
|
/**
|
|
60
62
|
* Specifies whether the color picker component is disabled.
|
|
61
63
|
*
|
|
62
64
|
* @defaultValue false
|
|
63
65
|
*/
|
|
64
66
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
65
|
-
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : {}), alias: 'disabled' });
|
|
67
|
+
disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled' });
|
|
66
68
|
/**
|
|
67
69
|
* Aria label for the color input button.
|
|
68
70
|
*
|
|
@@ -71,16 +73,22 @@ class SiColorPickerComponent {
|
|
|
71
73
|
* t(() => $localize`:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`)
|
|
72
74
|
* ```
|
|
73
75
|
*/
|
|
74
|
-
ariaLabel = input(t(() => $localize `:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`),
|
|
76
|
+
ariaLabel = input(t(() => $localize `:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`), /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
75
78
|
onChange = () => { };
|
|
76
79
|
onTouched = () => { };
|
|
77
80
|
colorInputRef = viewChild.required('colorInputBox');
|
|
78
|
-
swatchInputs = viewChildren('swatchInput',
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
swatchInputs = viewChildren('swatchInput', /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "swatchInputs" }] : /* istanbul ignore next */ []));
|
|
83
|
+
selectedSwatchInput = computed(() => this.swatchInputs().find(swatchInput => swatchInput.nativeElement.checked), /* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "selectedSwatchInput" }] : /* istanbul ignore next */ []));
|
|
85
|
+
disabledNgControl = signal(false, /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "disabledNgControl" }] : /* istanbul ignore next */ []));
|
|
81
87
|
numberOfColumns = 4;
|
|
82
|
-
disabled = computed(() => this.disabledInput() || this.disabledNgControl(),
|
|
83
|
-
|
|
88
|
+
disabled = computed(() => this.disabledInput() || this.disabledNgControl(), /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
90
|
+
isOverlayOpen = signal(false, /* @ts-ignore */
|
|
91
|
+
...(ngDevMode ? [{ debugName: "isOverlayOpen" }] : /* istanbul ignore next */ []));
|
|
84
92
|
icons = addIcons({ elementOk });
|
|
85
93
|
blur() {
|
|
86
94
|
if (!this.autoClose()) {
|
|
@@ -147,16 +155,16 @@ class SiColorPickerComponent {
|
|
|
147
155
|
setDisabledState(isDisabled) {
|
|
148
156
|
this.disabledNgControl.set(isDisabled);
|
|
149
157
|
}
|
|
150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
151
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SiColorPickerComponent, isStandalone: true, selector: "si-color-picker", inputs: { colorPalette: { classPropertyName: "colorPalette", publicName: "colorPalette", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, autoClose: { classPropertyName: "autoClose", publicName: "autoClose", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { color: "colorChange" }, providers: [
|
|
152
160
|
{
|
|
153
161
|
provide: NG_VALUE_ACCESSOR,
|
|
154
162
|
useExisting: SiColorPickerComponent,
|
|
155
163
|
multi: true
|
|
156
164
|
}
|
|
157
|
-
], viewQueries: [{ propertyName: "colorInputRef", first: true, predicate: ["colorInputBox"], descendants: true, isSignal: true }, { propertyName: "swatchInputs", predicate: ["swatchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #colorInputBox\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"input-color-box\"\n type=\"button\"\n [class.is-open]=\"isOverlayOpen()\"\n [attr.aria-label]=\"\n ariaLabel() ? (ariaLabel() | translate: { color: color() ?? '' }) : (color() ?? null)\n \"\n [disabled]=\"disabled()\"\n (keydown.arrowDown)=\"openOverlay()\"\n (blur)=\"blur()\"\n (click)=\"openOverlay()\"\n>\n <div class=\"inside-box\" [style.background-color]=\"'var(--' + color() + ')'\"></div>\n</button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOverlayOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n>\n <div #colorPaletteRef role=\"grid\" class=\"colors elevation-1 rounded-2 bg-base-1 p-4 mt-1\">\n <div role=\"row\" class=\"colors-row gap-4\">\n @for (paint of colorPalette(); track $index) {\n <div role=\"gridcell\" class=\"swatch\">\n <input\n #swatchInput\n type=\"radio\"\n name=\"color\"\n class=\"btn-check\"\n [id]=\"paint\"\n [attr.aria-label]=\"paint\"\n [value]=\"paint\"\n [checked]=\"color() === paint\"\n (change)=\"selectColor(paint)\"\n (keydown.enter)=\"selectColor(paint)\"\n (keydown.arrowUp)=\"arrowUp($index, $event)\"\n (keydown.arrowDown)=\"arrowDown($index, $event)\"\n (keydown.arrowLeft)=\"arrowLeft($index, $event)\"\n (keydown.arrowRight)=\"arrowRight($index, $event)\"\n (keydown.tab)=\"overlayDetach()\"\n />\n <label\n class=\"color-box swatch-label\"\n [attr.for]=\"paint\"\n [style.background]=\"'var(--' + paint + ')'\"\n >\n @if (color() === paint) {\n <si-icon class=\"icon text-inverse p-1\" [icon]=\"icons.elementOk\" />\n }\n </label>\n </div>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".colors-row{display:grid;grid-template-columns:repeat(4,1.5rem)}.color-box{position:relative;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem}input:focus~.color-box{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.input-color-box{cursor:pointer;position:relative;padding:7px;border-radius:var(--element-radius-1);border-width:1px;border-style:solid;border-color:var(--element-ui-2);background-color:var(--element-base-1)}.input-color-box:hover{border-color:var(--element-ui-1)}.input-color-box:not(:hover){border-color:var(--element-ui-2)}.input-color-box:not(:hover).is-open{border-color:var(--element-ui-1)}.input-color-box:disabled{cursor:default;border-color:var(--element-ui-3)}.swatch{block-size:1.5rem}.swatch-label{cursor:pointer}.swatch-label:hover{box-shadow:0 0 0 1px var(--element-button-focus-overlay-color),0 0 0 2px var(--element-ui-3)}.inside-box{block-size:1rem;inline-size:1rem}.colors{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }]
|
|
165
|
+
], viewQueries: [{ propertyName: "colorInputRef", first: true, predicate: ["colorInputBox"], descendants: true, isSignal: true }, { propertyName: "swatchInputs", predicate: ["swatchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n #colorInputBox\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"input-color-box\"\n type=\"button\"\n [class.is-open]=\"isOverlayOpen()\"\n [attr.aria-label]=\"\n ariaLabel() ? (ariaLabel() | translate: { color: color() ?? '' }) : (color() ?? null)\n \"\n [disabled]=\"disabled()\"\n (keydown.arrowDown)=\"openOverlay()\"\n (blur)=\"blur()\"\n (click)=\"openOverlay()\"\n>\n <div class=\"inside-box\" [style.background-color]=\"'var(--' + color() + ')'\"></div>\n</button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOverlayOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n>\n <div #colorPaletteRef role=\"grid\" class=\"colors elevation-1 rounded-2 bg-base-1 p-4 mt-1\">\n <div role=\"row\" class=\"colors-row gap-4\">\n @for (paint of colorPalette(); track $index) {\n <div role=\"gridcell\" class=\"swatch\">\n <input\n #swatchInput\n type=\"radio\"\n name=\"color\"\n class=\"btn-check\"\n [id]=\"paint\"\n [attr.aria-label]=\"paint\"\n [value]=\"paint\"\n [checked]=\"color() === paint\"\n (change)=\"selectColor(paint)\"\n (keydown.enter)=\"selectColor(paint)\"\n (keydown.arrowUp)=\"arrowUp($index, $event)\"\n (keydown.arrowDown)=\"arrowDown($index, $event)\"\n (keydown.arrowLeft)=\"arrowLeft($index, $event)\"\n (keydown.arrowRight)=\"arrowRight($index, $event)\"\n (keydown.tab)=\"overlayDetach()\"\n />\n <label\n class=\"color-box swatch-label\"\n [attr.for]=\"paint\"\n [style.background]=\"'var(--' + paint + ')'\"\n >\n @if (color() === paint) {\n <si-icon class=\"icon text-inverse p-1\" [icon]=\"icons.elementOk\" />\n }\n </label>\n </div>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".colors-row{display:grid;grid-template-columns:repeat(4,1.5rem)}.color-box{position:relative;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem}input:focus~.color-box{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.input-color-box{cursor:pointer;position:relative;padding:7px;border-radius:var(--element-radius-1);border-width:1px;border-style:solid;border-color:var(--element-ui-2);background-color:var(--element-base-1)}.input-color-box:hover{border-color:var(--element-ui-1)}.input-color-box:not(:hover){border-color:var(--element-ui-2)}.input-color-box:not(:hover).is-open{border-color:var(--element-ui-1)}.input-color-box:disabled{cursor:default;border-color:var(--element-ui-3)}.swatch{block-size:1.5rem}.swatch-label{cursor:pointer}.swatch-label:hover{box-shadow:0 0 0 1px var(--element-button-focus-overlay-color),0 0 0 2px var(--element-ui-3)}.inside-box{block-size:1rem;inline-size:1rem}.colors{cursor:pointer}\n"], dependencies: [{ kind: "component", type: SiIconComponent, selector: "si-icon", inputs: ["icon"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: SiTranslatePipe, name: "translate" }] });
|
|
158
166
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SiColorPickerComponent, decorators: [{
|
|
160
168
|
type: Component,
|
|
161
169
|
args: [{ selector: 'si-color-picker', imports: [SiIconComponent, SiTranslatePipe, CdkConnectedOverlay, CdkOverlayOrigin], providers: [
|
|
162
170
|
{
|
|
@@ -164,7 +172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
164
172
|
useExisting: SiColorPickerComponent,
|
|
165
173
|
multi: true
|
|
166
174
|
}
|
|
167
|
-
],
|
|
175
|
+
], template: "<button\n #colorInputBox\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"input-color-box\"\n type=\"button\"\n [class.is-open]=\"isOverlayOpen()\"\n [attr.aria-label]=\"\n ariaLabel() ? (ariaLabel() | translate: { color: color() ?? '' }) : (color() ?? null)\n \"\n [disabled]=\"disabled()\"\n (keydown.arrowDown)=\"openOverlay()\"\n (blur)=\"blur()\"\n (click)=\"openOverlay()\"\n>\n <div class=\"inside-box\" [style.background-color]=\"'var(--' + color() + ')'\"></div>\n</button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOverlayOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n>\n <div #colorPaletteRef role=\"grid\" class=\"colors elevation-1 rounded-2 bg-base-1 p-4 mt-1\">\n <div role=\"row\" class=\"colors-row gap-4\">\n @for (paint of colorPalette(); track $index) {\n <div role=\"gridcell\" class=\"swatch\">\n <input\n #swatchInput\n type=\"radio\"\n name=\"color\"\n class=\"btn-check\"\n [id]=\"paint\"\n [attr.aria-label]=\"paint\"\n [value]=\"paint\"\n [checked]=\"color() === paint\"\n (change)=\"selectColor(paint)\"\n (keydown.enter)=\"selectColor(paint)\"\n (keydown.arrowUp)=\"arrowUp($index, $event)\"\n (keydown.arrowDown)=\"arrowDown($index, $event)\"\n (keydown.arrowLeft)=\"arrowLeft($index, $event)\"\n (keydown.arrowRight)=\"arrowRight($index, $event)\"\n (keydown.tab)=\"overlayDetach()\"\n />\n <label\n class=\"color-box swatch-label\"\n [attr.for]=\"paint\"\n [style.background]=\"'var(--' + paint + ')'\"\n >\n @if (color() === paint) {\n <si-icon class=\"icon text-inverse p-1\" [icon]=\"icons.elementOk\" />\n }\n </label>\n </div>\n }\n </div>\n </div>\n</ng-template>\n", styles: [".colors-row{display:grid;grid-template-columns:repeat(4,1.5rem)}.color-box{position:relative;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem}input:focus~.color-box{outline:var(--element-button-focus-width) solid var(--element-focus-default);outline-offset:var(--element-button-focus-overlay-width)}.input-color-box{cursor:pointer;position:relative;padding:7px;border-radius:var(--element-radius-1);border-width:1px;border-style:solid;border-color:var(--element-ui-2);background-color:var(--element-base-1)}.input-color-box:hover{border-color:var(--element-ui-1)}.input-color-box:not(:hover){border-color:var(--element-ui-2)}.input-color-box:not(:hover).is-open{border-color:var(--element-ui-1)}.input-color-box:disabled{cursor:default;border-color:var(--element-ui-3)}.swatch{block-size:1.5rem}.swatch-label{cursor:pointer}.swatch-label:hover{box-shadow:0 0 0 1px var(--element-button-focus-overlay-color),0 0 0 2px var(--element-ui-3)}.inside-box{block-size:1rem;inline-size:1rem}.colors{cursor:pointer}\n"] }]
|
|
168
176
|
}], propDecorators: { colorPalette: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorPalette", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }, { type: i0.Output, args: ["colorChange"] }], autoClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClose", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], colorInputRef: [{ type: i0.ViewChild, args: ['colorInputBox', { isSignal: true }] }], swatchInputs: [{ type: i0.ViewChildren, args: ['swatchInput', { isSignal: true }] }] } });
|
|
169
177
|
|
|
170
178
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-color-picker.mjs","sources":["../../../../projects/element-ng/color-picker/si-color-picker.component.ts","../../../../projects/element-ng/color-picker/si-color-picker.component.html","../../../../projects/element-ng/color-picker/index.ts","../../../../projects/element-ng/color-picker/siemens-element-ng-color-picker.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n input,\n model,\n signal,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { elementOk } from '@siemens/element-icons';\nimport { isRTL } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\n\n/**\n * The Element data color palette is used as default.\n * Note: This array needs to be kept in sync with the design system data color tokens.\n */\nconst defaultDataColors: string[] = [\n 'element-data-1',\n 'element-data-2',\n 'element-data-3',\n 'element-data-4',\n 'element-data-5',\n 'element-data-6',\n 'element-data-7',\n 'element-data-8',\n 'element-data-9',\n 'element-data-10',\n 'element-data-11',\n 'element-data-12',\n 'element-data-13',\n 'element-data-14',\n 'element-data-15',\n 'element-data-16'\n];\n@Component({\n selector: 'si-color-picker',\n imports: [SiIconComponent, SiTranslatePipe, CdkConnectedOverlay, CdkOverlayOrigin],\n templateUrl: './si-color-picker.component.html',\n styleUrl: './si-color-picker.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiColorPickerComponent,\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SiColorPickerComponent implements ControlValueAccessor {\n // eslint-disable-next-line defaultValue/tsdoc-defaultValue-annotation\n /**\n * The color palette to choose the colors from. As colors, only valid CSS\n * variable names omitting the `--` prefix or Element color tokens omitting\n * the `$` prefix are supported.\n *\n * Note: If custom CSS variables are provided, they need to be defined for\n * both light and dark mode.\n *\n * @defaultValue The first 16 colors of the Element data color palette.\n */\n readonly colorPalette = input<string[]>(defaultDataColors);\n\n /**\n * The selected color.\n */\n readonly color = model<string>();\n\n /**\n * Specifies whether the color popup should automatically close on a color selection.\n *\n * @defaultValue false\n */\n readonly autoClose = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the color picker component is disabled.\n *\n * @defaultValue false\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled' });\n\n /**\n * Aria label for the color input button.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`)\n * ```\n */\n readonly ariaLabel = input(\n t(() => $localize`:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`)\n );\n\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n private readonly colorInputRef =\n viewChild.required<ElementRef<HTMLInputElement>>('colorInputBox');\n private readonly swatchInputs = viewChildren<ElementRef<HTMLInputElement>>('swatchInput');\n private readonly selectedSwatchInput = computed(() =>\n this.swatchInputs().find(swatchInput => swatchInput.nativeElement.checked)\n );\n private readonly disabledNgControl = signal(false);\n private readonly numberOfColumns = 4;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n protected readonly isOverlayOpen = signal(false);\n protected readonly icons = addIcons({ elementOk });\n\n protected blur(): void {\n if (!this.autoClose()) {\n this.onTouched();\n }\n }\n\n protected arrowDown(index: number, event: Event): void {\n const nextIndex = index + this.numberOfColumns;\n this.focusLabel(nextIndex);\n event.preventDefault();\n }\n\n protected arrowUp(index: number, event: Event): void {\n const prevIndex = index - this.numberOfColumns;\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n protected arrowLeft(index: number, event: Event): void {\n const prevIndex = index + (isRTL() ? 1 : -1);\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n protected arrowRight(index: number, event: Event): void {\n const prevIndex = index + (isRTL() ? -1 : +1);\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n private focusLabel(index: number): void {\n const labels = this.swatchInputs();\n const totalSwatches = labels.length;\n const normalizedIndex = (index + totalSwatches) % totalSwatches;\n labels[normalizedIndex].nativeElement.focus();\n }\n\n protected openOverlay(): void {\n this.isOverlayOpen.set(true);\n this.focusSelectedColor();\n }\n\n protected overlayDetach(): void {\n this.isOverlayOpen.set(false);\n setTimeout(() => {\n this.colorInputRef().nativeElement?.focus();\n });\n }\n\n private focusSelectedColor(): void {\n setTimeout(() => {\n this.selectedSwatchInput()?.nativeElement.focus();\n });\n }\n\n protected selectColor(color: string): void {\n this.color.set(color);\n this.onChange(color!);\n if (this.autoClose()) {\n this.overlayDetach();\n }\n }\n\n writeValue(value: string): void {\n this.color.set(value);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n}\n","<button\n #colorInputBox\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"input-color-box\"\n type=\"button\"\n [class.is-open]=\"isOverlayOpen()\"\n [attr.aria-label]=\"\n ariaLabel() ? (ariaLabel() | translate: { color: color() ?? '' }) : (color() ?? null)\n \"\n [disabled]=\"disabled()\"\n (keydown.arrowDown)=\"openOverlay()\"\n (blur)=\"blur()\"\n (click)=\"openOverlay()\"\n>\n <div class=\"inside-box\" [style.background-color]=\"'var(--' + color() + ')'\"></div>\n</button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOverlayOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n>\n <div #colorPaletteRef role=\"grid\" class=\"colors elevation-1 rounded-2 bg-base-1 p-4 mt-1\">\n <div role=\"row\" class=\"colors-row gap-4\">\n @for (paint of colorPalette(); track $index) {\n <div role=\"gridcell\" class=\"swatch\">\n <input\n #swatchInput\n type=\"radio\"\n name=\"color\"\n class=\"btn-check\"\n [id]=\"paint\"\n [attr.aria-label]=\"paint\"\n [value]=\"paint\"\n [checked]=\"color() === paint\"\n (change)=\"selectColor(paint)\"\n (keydown.enter)=\"selectColor(paint)\"\n (keydown.arrowUp)=\"arrowUp($index, $event)\"\n (keydown.arrowDown)=\"arrowDown($index, $event)\"\n (keydown.arrowLeft)=\"arrowLeft($index, $event)\"\n (keydown.arrowRight)=\"arrowRight($index, $event)\"\n (keydown.tab)=\"overlayDetach()\"\n />\n <label\n class=\"color-box swatch-label\"\n [attr.for]=\"paint\"\n [style.background]=\"'var(--' + paint + ')'\"\n >\n @if (color() === paint) {\n <si-icon class=\"icon text-inverse p-1\" [icon]=\"icons.elementOk\" />\n }\n </label>\n </div>\n }\n </div>\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-color-picker.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;AAoBH;;;AAGG;AACH,MAAM,iBAAiB,GAAa;IAClC,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB;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AA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,eAAe,yEACS,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9G1F;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-color-picker.mjs","sources":["../../../../projects/element-ng/color-picker/si-color-picker.component.ts","../../../../projects/element-ng/color-picker/si-color-picker.component.html","../../../../projects/element-ng/color-picker/index.ts","../../../../projects/element-ng/color-picker/siemens-element-ng-color-picker.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport {\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n input,\n model,\n signal,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { elementOk } from '@siemens/element-icons';\nimport { isRTL } from '@siemens/element-ng/common';\nimport { addIcons, SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe, t } from '@siemens/element-translate-ng/translate';\n\n/**\n * The Element data color palette is used as default.\n * Note: This array needs to be kept in sync with the design system data color tokens.\n */\nconst defaultDataColors: string[] = [\n 'element-data-1',\n 'element-data-2',\n 'element-data-3',\n 'element-data-4',\n 'element-data-5',\n 'element-data-6',\n 'element-data-7',\n 'element-data-8',\n 'element-data-9',\n 'element-data-10',\n 'element-data-11',\n 'element-data-12',\n 'element-data-13',\n 'element-data-14',\n 'element-data-15',\n 'element-data-16'\n];\n@Component({\n selector: 'si-color-picker',\n imports: [SiIconComponent, SiTranslatePipe, CdkConnectedOverlay, CdkOverlayOrigin],\n templateUrl: './si-color-picker.component.html',\n styleUrl: './si-color-picker.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SiColorPickerComponent,\n multi: true\n }\n ]\n})\nexport class SiColorPickerComponent implements ControlValueAccessor {\n // eslint-disable-next-line defaultValue/tsdoc-defaultValue-annotation\n /**\n * The color palette to choose the colors from. As colors, only valid CSS\n * variable names omitting the `--` prefix or Element color tokens omitting\n * the `$` prefix are supported.\n *\n * Note: If custom CSS variables are provided, they need to be defined for\n * both light and dark mode.\n *\n * @defaultValue The first 16 colors of the Element data color palette.\n */\n readonly colorPalette = input<string[]>(defaultDataColors);\n\n /**\n * The selected color.\n */\n readonly color = model<string>();\n\n /**\n * Specifies whether the color popup should automatically close on a color selection.\n *\n * @defaultValue false\n */\n readonly autoClose = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the color picker component is disabled.\n *\n * @defaultValue false\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input(false, { alias: 'disabled' });\n\n /**\n * Aria label for the color input button.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`)\n * ```\n */\n readonly ariaLabel = input(\n t(() => $localize`:@@SI_COLOR_PICKER.SELECTED_LABEL:Selected color {{color}}`)\n );\n\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n private readonly colorInputRef =\n viewChild.required<ElementRef<HTMLInputElement>>('colorInputBox');\n private readonly swatchInputs = viewChildren<ElementRef<HTMLInputElement>>('swatchInput');\n private readonly selectedSwatchInput = computed(() =>\n this.swatchInputs().find(swatchInput => swatchInput.nativeElement.checked)\n );\n private readonly disabledNgControl = signal(false);\n private readonly numberOfColumns = 4;\n protected readonly disabled = computed(() => this.disabledInput() || this.disabledNgControl());\n protected readonly isOverlayOpen = signal(false);\n protected readonly icons = addIcons({ elementOk });\n\n protected blur(): void {\n if (!this.autoClose()) {\n this.onTouched();\n }\n }\n\n protected arrowDown(index: number, event: Event): void {\n const nextIndex = index + this.numberOfColumns;\n this.focusLabel(nextIndex);\n event.preventDefault();\n }\n\n protected arrowUp(index: number, event: Event): void {\n const prevIndex = index - this.numberOfColumns;\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n protected arrowLeft(index: number, event: Event): void {\n const prevIndex = index + (isRTL() ? 1 : -1);\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n protected arrowRight(index: number, event: Event): void {\n const prevIndex = index + (isRTL() ? -1 : +1);\n this.focusLabel(prevIndex);\n event.preventDefault();\n }\n\n private focusLabel(index: number): void {\n const labels = this.swatchInputs();\n const totalSwatches = labels.length;\n const normalizedIndex = (index + totalSwatches) % totalSwatches;\n labels[normalizedIndex].nativeElement.focus();\n }\n\n protected openOverlay(): void {\n this.isOverlayOpen.set(true);\n this.focusSelectedColor();\n }\n\n protected overlayDetach(): void {\n this.isOverlayOpen.set(false);\n setTimeout(() => {\n this.colorInputRef().nativeElement?.focus();\n });\n }\n\n private focusSelectedColor(): void {\n setTimeout(() => {\n this.selectedSwatchInput()?.nativeElement.focus();\n });\n }\n\n protected selectColor(color: string): void {\n this.color.set(color);\n this.onChange(color!);\n if (this.autoClose()) {\n this.overlayDetach();\n }\n }\n\n writeValue(value: string): void {\n this.color.set(value);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledNgControl.set(isDisabled);\n }\n}\n","<button\n #colorInputBox\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"input-color-box\"\n type=\"button\"\n [class.is-open]=\"isOverlayOpen()\"\n [attr.aria-label]=\"\n ariaLabel() ? (ariaLabel() | translate: { color: color() ?? '' }) : (color() ?? null)\n \"\n [disabled]=\"disabled()\"\n (keydown.arrowDown)=\"openOverlay()\"\n (blur)=\"blur()\"\n (click)=\"openOverlay()\"\n>\n <div class=\"inside-box\" [style.background-color]=\"'var(--' + color() + ')'\"></div>\n</button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOverlayOpen()\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (backdropClick)=\"overlayDetach()\"\n (detach)=\"overlayDetach()\"\n>\n <div #colorPaletteRef role=\"grid\" class=\"colors elevation-1 rounded-2 bg-base-1 p-4 mt-1\">\n <div role=\"row\" class=\"colors-row gap-4\">\n @for (paint of colorPalette(); track $index) {\n <div role=\"gridcell\" class=\"swatch\">\n <input\n #swatchInput\n type=\"radio\"\n name=\"color\"\n class=\"btn-check\"\n [id]=\"paint\"\n [attr.aria-label]=\"paint\"\n [value]=\"paint\"\n [checked]=\"color() === paint\"\n (change)=\"selectColor(paint)\"\n (keydown.enter)=\"selectColor(paint)\"\n (keydown.arrowUp)=\"arrowUp($index, $event)\"\n (keydown.arrowDown)=\"arrowDown($index, $event)\"\n (keydown.arrowLeft)=\"arrowLeft($index, $event)\"\n (keydown.arrowRight)=\"arrowRight($index, $event)\"\n (keydown.tab)=\"overlayDetach()\"\n />\n <label\n class=\"color-box swatch-label\"\n [attr.for]=\"paint\"\n [style.background]=\"'var(--' + paint + ')'\"\n >\n @if (color() === paint) {\n <si-icon class=\"icon text-inverse p-1\" [icon]=\"icons.elementOk\" />\n }\n </label>\n </div>\n }\n </div>\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-color-picker.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;AAGG;AAmBH;;;AAGG;AACH,MAAM,iBAAiB,GAAa;IAClC,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,i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