@siemens/ix 0.0.0-pr-2269-20251117133306 → 0.0.0-pr-2297-20251211061723
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/READMEOSS.html +1 -1
- package/components/index.js.map +1 -1
- package/components/ix-breadcrumb.js +1 -1
- package/components/ix-checkbox-group.js +3 -3
- package/components/ix-checkbox.js +1 -1
- package/components/ix-custom-field.js +3 -3
- package/components/ix-date-dropdown.js +2 -2
- package/components/ix-date-input.js +9 -11
- package/components/ix-date-input.js.map +1 -1
- package/components/ix-date-picker.js +1 -1
- package/components/ix-datetime-picker.js +3 -3
- package/components/ix-datetime-picker.js.map +1 -1
- package/components/ix-dropdown-button.js +8 -4
- package/components/ix-dropdown-button.js.map +1 -1
- package/components/ix-dropdown-item.js +1 -1
- package/components/ix-field-label.js +1 -1
- package/components/ix-field-wrapper.js +1 -1
- package/components/ix-helper-text.js +1 -1
- package/components/ix-input.js +4 -4
- package/components/ix-link-button.js +1 -1
- package/components/ix-link-button.js.map +1 -1
- package/components/ix-menu-about.js +2 -2
- package/components/ix-menu-avatar-item.js +1 -1
- package/components/ix-menu-avatar.js +2 -2
- package/components/ix-menu-category.js +1 -1
- package/components/ix-menu-settings.js +1 -1
- package/components/ix-menu.js +20 -12
- package/components/ix-menu.js.map +1 -1
- package/components/ix-number-input.js +4 -4
- package/components/ix-pagination.js +36 -13
- package/components/ix-pagination.js.map +1 -1
- package/components/ix-radio-group.js +3 -3
- package/components/ix-radio.js +1 -1
- package/components/ix-select-item.js +1 -1
- package/components/ix-select.js +1 -1
- package/components/ix-tab-item.js +1 -1
- package/components/ix-textarea.js +4 -4
- package/components/ix-time-input.js +9 -11
- package/components/ix-time-input.js.map +1 -1
- package/components/ix-time-picker.js +1 -1
- package/components/ix-toggle.js +1 -1
- package/components/{p-DyGPjxFm.js → p-7E7AMiQV.js} +3 -3
- package/components/p-7E7AMiQV.js.map +1 -0
- package/components/{p-Bz7hxKB6.js → p-B1p0kpQJ.js} +3 -3
- package/components/{p-Bz7hxKB6.js.map → p-B1p0kpQJ.js.map} +1 -1
- package/components/{p-Dy6xvLn4.js → p-BCLcSQh4.js} +3 -3
- package/components/{p-Dy6xvLn4.js.map → p-BCLcSQh4.js.map} +1 -1
- package/components/{p-BVUD9f4A.js → p-BIg1TSrD.js} +3 -3
- package/components/{p-BVUD9f4A.js.map → p-BIg1TSrD.js.map} +1 -1
- package/components/{p-Cc4uqNv5.js → p-BiqdnsgA.js} +3 -3
- package/components/{p-Cc4uqNv5.js.map → p-BiqdnsgA.js.map} +1 -1
- package/components/{p-BrYfZ-wy.js → p-BmMUyJRQ.js} +38 -23
- package/components/p-BmMUyJRQ.js.map +1 -0
- package/components/{p-BZLbfHdO.js → p-Ce5NQ5Zo.js} +7 -7
- package/components/{p-BZLbfHdO.js.map → p-Ce5NQ5Zo.js.map} +1 -1
- package/components/{p-PF0VLH1Q.js → p-CjDPpSJX.js} +3 -3
- package/components/p-CjDPpSJX.js.map +1 -0
- package/components/{p-CcWC2eNL.js → p-DUU5I7wZ.js} +10 -6
- package/components/p-DUU5I7wZ.js.map +1 -0
- package/components/{p-BLeWaHpy.js → p-DYCKIBUp.js} +12 -6
- package/components/p-DYCKIBUp.js.map +1 -0
- package/components/{p-Bk0vKwmt.js → p-DmhyoH-k.js} +3 -3
- package/components/{p-Bk0vKwmt.js.map → p-DmhyoH-k.js.map} +1 -1
- package/components/{p-xHo-3QVy.js → p-Dq_H2flK.js} +9 -3
- package/components/p-Dq_H2flK.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{input.fc-BzxtQeW-.js → input.fc-DrxRYq_G.js} +10 -6
- package/dist/cjs/input.fc-DrxRYq_G.js.map +1 -0
- package/dist/cjs/ix-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ix-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-col_4.cjs.entry.js +1 -1
- package/dist/cjs/ix-custom-field.cjs.entry.js +1 -1
- package/dist/cjs/ix-date-input.cjs.entry.js +6 -8
- package/dist/cjs/ix-date-input.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/ix-datetime-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-dropdown-button.cjs.entry.js +7 -3
- package/dist/cjs/ix-dropdown-button.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-dropdown-item.cjs.entry.js +9 -3
- package/dist/cjs/ix-dropdown-item.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-field-label_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-helper-text.cjs.entry.js +1 -1
- package/dist/cjs/ix-input.cjs.entry.js +2 -2
- package/dist/cjs/ix-link-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-link-button.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js +19 -12
- package/dist/cjs/ix-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ix-pagination.cjs.entry.js +29 -7
- package/dist/cjs/ix-pagination.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ix-radio.cjs.entry.js +1 -1
- package/dist/cjs/ix-select.cjs.entry.js +1 -1
- package/dist/cjs/ix-tab-item.ix-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-tab-item_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ix-time-input.cjs.entry.js +6 -8
- package/dist/cjs/ix-time-input.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-time-picker.cjs.entry.js +36 -21
- package/dist/cjs/ix-time-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-toggle.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/cjs/{validation-CfL71_0d.js → validation-DTmSqO2d.js} +9 -2
- package/dist/{esm/validation-D_dk-JqT.js.map → cjs/validation-DTmSqO2d.js.map} +1 -1
- package/dist/collection/components/date-input/date-input.js +5 -7
- package/dist/collection/components/date-input/date-input.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.css +1 -0
- package/dist/collection/components/datetime-picker/datetime-picker.css +11 -6
- package/dist/collection/components/dropdown-button/dropdown-button.js +8 -4
- package/dist/collection/components/dropdown-button/dropdown-button.js.map +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +10 -4
- package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/collection/components/input/input.util.js +7 -3
- package/dist/collection/components/input/input.util.js.map +1 -1
- package/dist/collection/components/link-button/link-button.css +2 -8
- package/dist/collection/components/menu/menu.js +21 -12
- package/dist/collection/components/menu/menu.js.map +1 -1
- package/dist/collection/components/pagination/pagination.js +52 -7
- package/dist/collection/components/pagination/pagination.js.map +1 -1
- package/dist/collection/components/tab-item/tab-item.css +1 -1
- package/dist/collection/components/time-input/time-input.js +5 -7
- package/dist/collection/components/time-input/time-input.js.map +1 -1
- package/dist/collection/components/time-picker/time-picker.css +8 -8
- package/dist/collection/components/time-picker/time-picker.js +35 -20
- package/dist/collection/components/time-picker/time-picker.js.map +1 -1
- package/dist/collection/components/utils/input/validation.js +6 -0
- package/dist/collection/components/utils/input/validation.js.map +1 -1
- package/dist/collection/components/utils/modal/index.js.map +1 -1
- package/dist/collection/components/utils/modal/loading.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{input.fc-DQBMrK9J.js → input.fc-KJF8Z9iJ.js} +10 -6
- package/dist/esm/input.fc-KJF8Z9iJ.js.map +1 -0
- package/dist/esm/ix-checkbox-group.entry.js +1 -1
- package/dist/esm/ix-checkbox.entry.js +1 -1
- package/dist/esm/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.js.map +1 -1
- package/dist/esm/ix-col_4.entry.js +1 -1
- package/dist/esm/ix-custom-field.entry.js +1 -1
- package/dist/esm/ix-date-input.entry.js +6 -8
- package/dist/esm/ix-date-input.entry.js.map +1 -1
- package/dist/esm/ix-datetime-picker.entry.js +1 -1
- package/dist/esm/ix-datetime-picker.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-button.entry.js +7 -3
- package/dist/esm/ix-dropdown-button.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-item.entry.js +9 -3
- package/dist/esm/ix-dropdown-item.entry.js.map +1 -1
- package/dist/esm/ix-field-label_2.entry.js +1 -1
- package/dist/esm/ix-helper-text.entry.js +1 -1
- package/dist/esm/ix-input.entry.js +2 -2
- package/dist/esm/ix-link-button.entry.js +1 -1
- package/dist/esm/ix-link-button.entry.js.map +1 -1
- package/dist/esm/ix-menu.entry.js +19 -12
- package/dist/esm/ix-menu.entry.js.map +1 -1
- package/dist/esm/ix-number-input.entry.js +2 -2
- package/dist/esm/ix-pagination.entry.js +29 -7
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-radio-group.entry.js +1 -1
- package/dist/esm/ix-radio.entry.js +1 -1
- package/dist/esm/ix-select.entry.js +1 -1
- package/dist/esm/ix-tab-item.ix-tabs.entry.js.map +1 -1
- package/dist/esm/ix-tab-item_2.entry.js +1 -1
- package/dist/esm/ix-textarea.entry.js +2 -2
- package/dist/esm/ix-time-input.entry.js +6 -8
- package/dist/esm/ix-time-input.entry.js.map +1 -1
- package/dist/esm/ix-time-picker.entry.js +36 -21
- package/dist/esm/ix-time-picker.entry.js.map +1 -1
- package/dist/esm/ix-toggle.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/esm/{validation-D_dk-JqT.js → validation-LJh16vt2.js} +9 -3
- package/dist/{cjs/validation-CfL71_0d.js.map → esm/validation-LJh16vt2.js.map} +1 -1
- package/dist/siemens-ix/index.esm.js.map +1 -1
- package/dist/siemens-ix/ix-col.ix-date-picker.ix-layout-grid.ix-row.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-date-input.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-datetime-picker.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-dropdown-button.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-dropdown-item.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-link-button.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-menu.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-pagination.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-tab-item.ix-tabs.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-time-input.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-time-picker.entry.esm.js.map +1 -1
- package/dist/siemens-ix/p-0063d077.entry.js +2 -0
- package/dist/siemens-ix/p-0063d077.entry.js.map +1 -0
- package/dist/siemens-ix/p-051f428c.entry.js +2 -0
- package/dist/siemens-ix/{p-de416133.entry.js.map → p-051f428c.entry.js.map} +1 -1
- package/dist/siemens-ix/p-0c325f08.entry.js +2 -0
- package/dist/siemens-ix/p-0c325f08.entry.js.map +1 -0
- package/dist/siemens-ix/p-0eca5a77.entry.js +2 -0
- package/dist/siemens-ix/{p-3751c675.entry.js.map → p-0eca5a77.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-3d3bba47.entry.js → p-26c629c3.entry.js} +2 -2
- package/dist/siemens-ix/{p-07953481.entry.js → p-33b3ed5b.entry.js} +2 -2
- package/dist/siemens-ix/p-3ca8fd00.entry.js +2 -0
- package/dist/siemens-ix/p-3ca8fd00.entry.js.map +1 -0
- package/dist/siemens-ix/{p-7f90eeef.entry.js → p-4431f891.entry.js} +2 -2
- package/dist/siemens-ix/{p-620158aa.entry.js → p-4e77d861.entry.js} +2 -2
- package/dist/siemens-ix/p-68aaf0fe.entry.js +2 -0
- package/dist/siemens-ix/p-68aaf0fe.entry.js.map +1 -0
- package/dist/siemens-ix/{p-ebef3d52.entry.js → p-79537728.entry.js} +2 -2
- package/dist/siemens-ix/{p-fbdf1c7d.entry.js → p-7beba4ad.entry.js} +2 -2
- package/dist/siemens-ix/p-7beba4ad.entry.js.map +1 -0
- package/dist/siemens-ix/p-8b42ad35.entry.js +2 -0
- package/dist/siemens-ix/{p-b9e8d497.entry.js.map → p-8b42ad35.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-CAj3Tlcn.js → p-C7nQNUsO.js} +2 -2
- package/dist/siemens-ix/{p-CAj3Tlcn.js.map → p-C7nQNUsO.js.map} +1 -1
- package/dist/siemens-ix/p-DaswuiGO.js +2 -0
- package/dist/siemens-ix/p-DaswuiGO.js.map +1 -0
- package/dist/siemens-ix/{p-3b7573d6.entry.js → p-a4225101.entry.js} +2 -2
- package/dist/siemens-ix/{p-1c83cb5f.entry.js → p-b27a9744.entry.js} +2 -2
- package/dist/siemens-ix/{p-3f13b14e.entry.js → p-ba9ed3d1.entry.js} +2 -2
- package/dist/siemens-ix/{p-10f2a239.entry.js → p-c15e64a8.entry.js} +2 -2
- package/dist/siemens-ix/{p-7364534a.entry.js → p-c43b201b.entry.js} +2 -2
- package/dist/siemens-ix/{p-81491f7d.entry.js → p-d2c18c15.entry.js} +2 -2
- package/dist/siemens-ix/p-d2c18c15.entry.js.map +1 -0
- package/dist/siemens-ix/p-de12078d.entry.js +2 -0
- package/dist/siemens-ix/{p-534a0e0a.entry.js.map → p-de12078d.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-aa89d586.entry.js → p-f119c105.entry.js} +2 -2
- package/dist/siemens-ix/{p-b8f4b001.entry.js → p-f27c0a6c.entry.js} +2 -2
- package/dist/siemens-ix/p-f27c0a6c.entry.js.map +1 -0
- package/dist/siemens-ix/{p-6445a54f.entry.js → p-fc73c8cc.entry.js} +2 -2
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +8 -17
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/menu/menu.d.ts +1 -0
- package/dist/types/components/pagination/pagination.d.ts +8 -0
- package/dist/types/components/time-picker/time-picker.d.ts +3 -2
- package/dist/types/components/utils/input/validation.d.ts +1 -0
- package/dist/types/components/utils/modal/index.d.ts +1 -1
- package/dist/types/components/utils/modal/loading.d.ts +4 -0
- package/dist/types/components.d.ts +12 -0
- package/hydrate/index.js +129 -70
- package/hydrate/index.mjs +129 -70
- package/package.json +1 -1
- package/scss/components/_links.scss +2 -5
- package/scss/theme/classic/dark/_variables.scss +2 -4
- package/components/p-BLeWaHpy.js.map +0 -1
- package/components/p-BrYfZ-wy.js.map +0 -1
- package/components/p-CcWC2eNL.js.map +0 -1
- package/components/p-DyGPjxFm.js.map +0 -1
- package/components/p-PF0VLH1Q.js.map +0 -1
- package/components/p-xHo-3QVy.js.map +0 -1
- package/dist/cjs/input.fc-BzxtQeW-.js.map +0 -1
- package/dist/esm/input.fc-DQBMrK9J.js.map +0 -1
- package/dist/siemens-ix/p-0d621531.entry.js +0 -2
- package/dist/siemens-ix/p-0d621531.entry.js.map +0 -1
- package/dist/siemens-ix/p-19b9f862.entry.js +0 -2
- package/dist/siemens-ix/p-19b9f862.entry.js.map +0 -1
- package/dist/siemens-ix/p-3751c675.entry.js +0 -2
- package/dist/siemens-ix/p-37bd983a.entry.js +0 -2
- package/dist/siemens-ix/p-37bd983a.entry.js.map +0 -1
- package/dist/siemens-ix/p-534a0e0a.entry.js +0 -2
- package/dist/siemens-ix/p-81491f7d.entry.js.map +0 -1
- package/dist/siemens-ix/p-97ef77b3.entry.js +0 -2
- package/dist/siemens-ix/p-97ef77b3.entry.js.map +0 -1
- package/dist/siemens-ix/p-C1GTokd8.js +0 -2
- package/dist/siemens-ix/p-C1GTokd8.js.map +0 -1
- package/dist/siemens-ix/p-b8f4b001.entry.js.map +0 -1
- package/dist/siemens-ix/p-b9e8d497.entry.js +0 -2
- package/dist/siemens-ix/p-de416133.entry.js +0 -2
- package/dist/siemens-ix/p-fbdf1c7d.entry.js.map +0 -1
- /package/dist/siemens-ix/{p-3d3bba47.entry.js.map → p-26c629c3.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-07953481.entry.js.map → p-33b3ed5b.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7f90eeef.entry.js.map → p-4431f891.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-620158aa.entry.js.map → p-4e77d861.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ebef3d52.entry.js.map → p-79537728.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-3b7573d6.entry.js.map → p-a4225101.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-1c83cb5f.entry.js.map → p-b27a9744.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-3f13b14e.entry.js.map → p-ba9ed3d1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-10f2a239.entry.js.map → p-c15e64a8.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7364534a.entry.js.map → p-c43b201b.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-aa89d586.entry.js.map → p-f119c105.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6445a54f.entry.js.map → p-fc73c8cc.entry.js.map} +0 -0
package/package.json
CHANGED
|
@@ -16,26 +16,23 @@
|
|
|
16
16
|
|
|
17
17
|
a[href] {
|
|
18
18
|
color: var(--theme-color-primary);
|
|
19
|
-
text-
|
|
19
|
+
text-underline-offset: 0.2rem;
|
|
20
20
|
|
|
21
21
|
@include hover.hover {
|
|
22
22
|
color: var(--theme-color-dynamic);
|
|
23
|
-
text-decoration: underline;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
@include hover.active {
|
|
27
26
|
color: var(--theme-color-dynamic);
|
|
28
|
-
text-decoration: underline;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
@include hover.visited {
|
|
32
30
|
color: var(--theme-color-primary);
|
|
33
|
-
text-decoration: none;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
@include hover.focus-visible {
|
|
37
34
|
outline: 1px solid var(--theme-color-focus-bdr);
|
|
38
|
-
outline-offset: 0.
|
|
35
|
+
outline-offset: 0.2rem;
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
.glyph {
|
|
@@ -220,11 +220,9 @@
|
|
|
220
220
|
--theme-primary-bdr-1: 0.0625rem solid var(--theme-color-primary);
|
|
221
221
|
--theme-primary-bdr-2: 0.125rem solid var(--theme-color-primary);
|
|
222
222
|
--theme-shadow-1: 0 2px 2px 0 #000000, 0 1px 1px 0 rgba(0, 0, 0, 0.6);
|
|
223
|
-
--theme-shadow-2: -4px 0 8px 0 #000000, 4px 0 8px 0 #000000,
|
|
224
|
-
0 0 16px 0 rgba(0, 0, 0, 0.6);
|
|
223
|
+
--theme-shadow-2: -4px 0 8px 0 #000000, 4px 0 8px 0 #000000, 0 0 16px 0 rgba(0, 0, 0, 0.6);
|
|
225
224
|
--theme-shadow-3: 0 2px 6px 0 #000000, 0 0 8px 0 rgba(0, 0, 0, 0.6);
|
|
226
|
-
--theme-shadow-4: 0 0 2px 0 #000000, 0 4px 8px 0 rgba(0, 0, 0, 0.6),
|
|
227
|
-
0 12px 18px 0 rgba(0, 0, 0, 0.6);
|
|
225
|
+
--theme-shadow-4: 0 0 2px 0 #000000, 0 4px 8px 0 rgba(0, 0, 0, 0.6), 0 12px 18px 0 rgba(0, 0, 0, 0.6);
|
|
228
226
|
--theme-soft-bdr-1: 0.0625rem solid var(--theme-color-soft-bdr);
|
|
229
227
|
--theme-soft-bdr-2: 0.125rem solid var(--theme-color-soft-bdr);
|
|
230
228
|
--theme-soft-dashed-bdr-1: 0.0625rem dashed var(--theme-color-soft-bdr);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-BLeWaHpy.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,6iFAA6iF;;MC8BxjF,YAAY,iBAAAA,kBAAA,CAA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AAI,CAAC,eAAe,EAAA,EAE/B,CAAC,IAAI,CAAC,eAAe,IACpB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,uBAAuB,EAAA,EAC/B,IAAI,CAAC,OAAO,IACX,CACE,CAAA,SAAA,EAAA,EAAA,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,eAAe,EACrB,IAAI,EAAC,IAAI,EAAA,CACA,IACT,IAAI,CACJ,IACJ,IAAI,EACP,IAAI,CAAC,IAAI,IACR,CACE,CAAA,SAAA,EAAA,EAAA,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAE,IAAI,CAAC,IAAI,EAAA,YAAA,EACH,IAAI,CAAC,aAAa,EAAA,CACrB,IACT,IAAI,EACR,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAA,EAC5B,IAAI,CAAC,KAAK,EACX,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACL,IAAI,CAAC,SAAS,IACb,CAAA,CAAA,SAAA,EAAA,EACE,IAAI,EAAE,qBAAqB,EAC3B,KAAK,EAAE,cAAc,EACZ,CAAA,IACT,IAAI,CACD,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/dropdown-item/dropdown-item.scss?tag=ix-dropdown-item&encapsulation=shadow","src/components/dropdown-item/dropdown-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@use 'mixins/shadow-dom/component';\n@use 'mixins/shadow-dom/hover';\n\n$itemPadding: 0.5rem;\n$itemPaddingRight: 1.5rem;\n$focusBorder: 0.0625rem;\n\n@mixin applyItemWidth($padding, $paddingRight) {\n width: calc(100% - #{$padding} - #{$paddingRight});\n\n padding: 0 $padding;\n padding-right: $paddingRight;\n}\n\n:host {\n --ix-dropdown-item-checked-color: var(--theme-color-primary);\n\n display: flex;\n flex-direction: row;\n\n position: relative;\n height: 2.5rem;\n width: auto;\n overflow: hidden;\n cursor: pointer;\n\n @include component.ix-component;\n\n .dropdown-item {\n all: unset;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: relative;\n height: calc(100% - 2px);\n border: $focusBorder solid transparent;\n white-space: nowrap;\n\n @include applyItemWidth($itemPadding, $itemPaddingRight);\n }\n\n .dropdown-item.no-checked-field {\n @include applyItemWidth(1rem, $itemPaddingRight);\n }\n\n .dropdown-item:focus-visible {\n border-color: var(--theme-color-focus-bdr);\n }\n\n .dropdown-item-checked {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 100%;\n width: 1rem;\n min-width: 1rem;\n margin-right: 0.5rem;\n\n color: var(--ix-dropdown-item-checked-color);\n }\n\n .dropdown-item-icon {\n margin-right: 0.5rem;\n color: var(--theme-color-std-text);\n }\n\n .dropdown-item-text {\n display: block;\n position: relative;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: pre;\n }\n\n .submenu-icon {\n margin-left: auto;\n }\n}\n\n:host(.icon-only) {\n .dropdown-item-icon {\n margin-right: 0px;\n }\n\n .dropdown-item-checked {\n display: none;\n }\n\n .dropdown-item {\n @include applyItemWidth(0.5rem, 0.5rem);\n }\n}\n\n:host(.submenu) {\n .dropdown-item {\n @include applyItemWidth($itemPadding, 0.5rem);\n }\n}\n\n@include hover.ghost-hover-pressed;\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-color-weak-text) !important;\n\n .dropdown-item-icon {\n color: var(--theme-color-weak-text) !important;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n} from '@stencil/core';\nimport { DropdownItemWrapper } from '../dropdown/dropdown-controller';\nimport {\n iconChevronRightSmall,\n iconSingleCheck,\n} from '@siemens/ix-icons/icons';\n\n@Component({\n tag: 'ix-dropdown-item',\n styleUrl: 'dropdown-item.scss',\n shadow: true,\n})\nexport class DropdownItem implements DropdownItemWrapper {\n @Element() hostElement!: HTMLIxDropdownItemElement;\n\n /**\n * Label of dropdown item\n */\n @Prop() label?: string;\n\n /**\n * Icon of dropdown item\n */\n @Prop() icon?: string;\n\n /**\n * ARIA label for the icon\n */\n @Prop() ariaLabelIcon?: string;\n\n /**\n * ARIA label for the item's button\n * Will be set as aria-label for the nested HTML button element\n *\n * @since 3.2.0\n */\n @Prop() ariaLabelButton?: string;\n\n /**\n * Display hover state\n */\n @Prop() hover = false;\n\n /**\n * Disable item and remove event listeners\n */\n @Prop() disabled = false;\n\n /**\n * Whether the item is checked or not. If true a checkmark will mark the item as checked.\n */\n @Prop() checked = false;\n\n /** @internal */\n @Prop() isSubMenu = false;\n\n /** @internal */\n @Prop() suppressChecked = false;\n\n /** @internal */\n @Event() itemClick!: EventEmitter<HTMLIxDropdownItemElement>;\n\n /** @internal */\n @Method()\n async emitItemClick() {\n this.itemClick.emit(this.hostElement);\n }\n\n /** @internal */\n @Method()\n async getDropdownItemElement() {\n return this.hostElement;\n }\n\n private isIconOnly() {\n return (\n this.label === undefined &&\n this.hostElement.innerText === '' &&\n this.icon !== undefined\n );\n }\n\n render() {\n return (\n <Host\n class={{\n hover: this.hover,\n 'icon-only': this.isIconOnly(),\n disabled: this.disabled,\n submenu: this.isSubMenu,\n }}\n role=\"listitem\"\n >\n <button\n type=\"button\"\n tabIndex={0}\n class={{\n 'dropdown-item': true,\n 'no-checked-field': this.suppressChecked,\n }}\n onClick={() => this.emitItemClick()}\n aria-label={this.ariaLabelButton}\n >\n {!this.suppressChecked ? (\n <div class=\"dropdown-item-checked\">\n {this.checked ? (\n <ix-icon\n class=\"checkmark\"\n name={iconSingleCheck}\n size=\"16\"\n ></ix-icon>\n ) : null}\n </div>\n ) : null}\n {this.icon ? (\n <ix-icon\n class=\"dropdown-item-icon\"\n name={this.icon}\n aria-label={this.ariaLabelIcon}\n ></ix-icon>\n ) : null}\n <div class=\"dropdown-item-text\">\n {this.label}\n <slot></slot>\n </div>\n {this.isSubMenu ? (\n <ix-icon\n name={iconChevronRightSmall}\n class={'submenu-icon'}\n ></ix-icon>\n ) : null}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-BrYfZ-wy.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,2/mBAA2/mB;;ACAjhnB;;;;;;;AAOG;;;;;;;;;;;AAmCH,MAAM,qBAAqB,GAAG;;AAE5B,IAAA,KAAK,EAAE,0DAA0D;;AAEjE,IAAA,OAAO,EAAE,sCAAsC;;AAE/C,IAAA,OAAO,EAAE,kCAAkC;;AAE3C,IAAA,YAAY,EAAE,oBAAoB;CACnC;AAED,MAAM,qBAAqB,GAAG,CAAC;AAC/B,MAAM,uBAAuB,GAAG,CAAC;AACjC,MAAM,uBAAuB,GAAG,CAAC;AACjC,MAAM,4BAA4B,GAAG,GAAG;AAExC,MAAM,sBAAsB,GAAG,SAAS;AACxC,MAAM,cAAc,GAAG,MAAM;AAE7B,MAAM,oBAAoB,GAAqB;AAC7C,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,WAAW,EAAE,EAAE;CAChB;MAOY,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;AAQE;;;;AAIG;AACK,QAAA,IAAM,CAAA,MAAA,GAAW,IAAI;AAW7B;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAsB,SAAS;AAE9C;;AAEG;AACK,QAAA,IAAQ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C,MAAA,IAAI,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACxD,EAAA,EAEA,IAAI,CAAC,eAAe,CACX,CACR,CACY,CACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5nBX,UAAA,CAAA;IADC,UAAU,CAAa,SAAS;CAyDhC,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/time-picker/time-picker.scss?tag=ix-time-picker&encapsulation=shadow","src/components/time-picker/time-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@use './common-variables' as vars;\n@use 'mixins/shadow-dom/component';\n@use 'mixins/input';\n@use 'legacy/components/forms';\n\n@include input.form;\n\n:host {\n display: block;\n position: relative;\n width: fit-content;\n\n @include component.ix-component;\n\n .standaloneAppearance {\n box-shadow: none;\n }\n\n .hidden {\n display: none;\n }\n\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n height: vars.$default-control-height;\n }\n\n .clock {\n display: flex;\n justify-content: center;\n align-items: start;\n\n .flex {\n display: flex;\n height: 100%;\n align-items: start;\n\n .columns {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n\n .column-header {\n height: 2.5rem;\n width: 2.5rem;\n line-height: 2.5rem;\n text-align: center;\n color: var(--theme-color-soft-text);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n }\n\n .column-seperator {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 100%;\n margin-top: 3rem;\n width: 0.5rem;\n }\n }\n\n .element-list {\n list-style-type: none;\n overflow: auto;\n padding: 1px;\n margin: -1px;\n max-height: calc(2.5rem * 6 + 2px * 6);\n\n button {\n all: unset;\n }\n\n .element-container {\n box-sizing: border-box;\n width: 2.5rem;\n height: 2.5rem;\n margin-bottom: 2px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n color: var(--theme-color-primary);\n\n &:hover {\n background-color: var(--theme-datepicker-day--background--hover);\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 1px var(--theme-color-focus-bdr);\n }\n }\n\n .selected {\n background-color: var(--theme-datepicker-day--background--selected);\n color: var(--theme-datepicker-day--color--selected);\n font-weight: var(--theme-font-weight-bold);\n\n &:hover {\n background-color: var(\n --theme-datepicker-day--background--selected-hover\n );\n }\n\n &:focus-visible {\n border: 1px solid black;\n }\n }\n\n .element-list-padding {\n width: 2.5rem;\n height: calc(2.5rem * 5 + 5 * 2px);\n min-height: calc(2.5rem * 5 + 5 * 2px);\n }\n }\n\n div.element-list {\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n }\n\n .footer {\n display: flex;\n justify-content: space-between;\n gap: 0.5rem;\n flex-wrap: wrap;\n\n .confirm-button {\n margin-left: auto;\n }\n\n &--compact {\n flex-direction: column;\n align-items: center;\n\n .confirm-button {\n margin-left: initial;\n }\n }\n }\n\n .default-space {\n margin-left: vars.$default-space;\n }\n\n .text-align {\n text-align: center;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { OnListener } from '../utils/listener';\nimport type { TimePickerCorners } from './time-picker.types';\n\ntype TimePickerDescriptorUnit = 'hour' | 'minute' | 'second' | 'millisecond';\n\ninterface TimePickerDescriptor {\n unit: TimePickerDescriptorUnit;\n header: string;\n hidden: boolean;\n numberArray: number[];\n focusedValue: number;\n}\n\ninterface TimeOutputFormat {\n hour: string;\n minute: string;\n second: string;\n millisecond: string;\n}\n\nconst LUXON_FORMAT_PATTERNS = {\n // h, hh, H, HH and various time formats that include hours\n hours: /\\b[Hh]\\b|HH|hh|H{3,4}|h{3,4}|t|tt|ttt|tttt|T|TT|TTT|TTTT/,\n // m, mm and time formats that include minutes\n minutes: /\\bm\\b|mm|t|tt|ttt|tttt|T|TT|TTT|TTTT/,\n // s, ss and time formats that include seconds\n seconds: /\\bs\\b|ss|tt|ttt|tttt|TT|TTT|TTTT/,\n // S, SSS (milliseconds), u/uu/uuu (fractional seconds), x/X (timestamps)\n milliseconds: /\\bS\\b|SSS|u|uu|uuu/,\n};\n\nconst HOUR_INTERVAL_DEFAULT = 1;\nconst MINUTE_INTERVAL_DEFAULT = 1;\nconst SECOND_INTERVAL_DEFAULT = 1;\nconst MILLISECOND_INTERVAL_DEFAULT = 100;\n\nconst CONFIRM_BUTTON_DEFAULT = 'Confirm';\nconst HEADER_DEFAULT = 'Time';\n\nconst FORMATTED_TIME_EMPTY: TimeOutputFormat = {\n hour: '',\n minute: '',\n second: '',\n millisecond: '',\n};\n\n@Component({\n tag: 'ix-time-picker',\n styleUrl: 'time-picker.scss',\n shadow: true,\n})\nexport class TimePicker {\n @Element() hostElement!: HTMLIxTimePickerElement;\n\n /**\n * Format of time string\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n * Note: Formats that combine date and time (like f or F) are not supported. Timestamp tokens x and X are not supported either.\n */\n @Prop() format: string = 'TT';\n @Watch('format')\n watchFormatIntervalPropHandler(newValue: string) {\n if (!newValue) {\n return;\n }\n\n this.initPicker();\n this.updateScrollPositions();\n }\n\n /**\n * Corner style\n */\n @Prop() corners: TimePickerCorners = 'rounded';\n\n /**\n * Embedded style (for use in other components)\n */\n @Prop() embedded = false;\n\n /**\n * @internal Temporary prop needed until datetime-picker is reworked for new design\n */\n @Prop() dateTimePickerAppearance: boolean = false;\n\n /**\n * Hides the header of the picker.\n *\n * @since 3.2.0\n */\n @Prop() hideHeader: boolean = false;\n\n /**\n * Interval for hour selection\n *\n * @since 3.2.0\n */\n @Prop({ mutable: true }) hourInterval: number = HOUR_INTERVAL_DEFAULT;\n @Watch('hourInterval')\n watchHourIntervalPropHandler(newValue: number) {\n if (\n Number.isInteger(newValue) &&\n newValue >= 0 &&\n newValue <= (this.timeRef ? 12 : 23)\n ) {\n this.setTimePickerDescriptors();\n return;\n }\n\n this.printIntervalError('hour', newValue);\n this.hourInterval = HOUR_INTERVAL_DEFAULT;\n }\n\n /**\n * Interval for minute selection\n *\n * @since 3.2.0\n */\n @Prop({ mutable: true }) minuteInterval: number = MINUTE_INTERVAL_DEFAULT;\n @Watch('minuteInterval')\n watchMinuteIntervalPropHandler(newValue: number) {\n if (newValue >= 0 && newValue <= 59) {\n this.setTimePickerDescriptors();\n return;\n }\n\n this.printIntervalError('minute', newValue);\n this.minuteInterval = MINUTE_INTERVAL_DEFAULT;\n }\n\n /**\n * Interval for second selection\n *\n * @since 3.2.0\n */\n @Prop({ mutable: true }) secondInterval: number = SECOND_INTERVAL_DEFAULT;\n @Watch('secondInterval')\n watchSecondIntervalPropHandler(newValue: number) {\n if (newValue >= 0 && newValue <= 59) {\n this.setTimePickerDescriptors();\n return;\n }\n\n this.printIntervalError('second', newValue);\n this.secondInterval = SECOND_INTERVAL_DEFAULT;\n }\n\n /**\n * Interval for millisecond selection\n *\n * @since 3.2.0\n */\n @Prop({ mutable: true }) millisecondInterval: number =\n MILLISECOND_INTERVAL_DEFAULT;\n @Watch('millisecondInterval')\n watchMillisecondIntervalPropHandler(newValue: number) {\n if (newValue >= 0 && newValue <= 999) {\n this.setTimePickerDescriptors();\n return;\n }\n\n this.printIntervalError('millisecond', newValue);\n this.millisecondInterval = MILLISECOND_INTERVAL_DEFAULT;\n }\n\n private printIntervalError(intervalName: string, value: number) {\n console.error(\n `Value ${value} is not valid for ${intervalName}-interval. Falling back to default.`\n );\n }\n\n /**\n * Select time with format string\n * Format has to match the `format` property.\n */\n @Prop() time?: string;\n\n @Watch('time')\n watchTimePropHandler(newValue: string) {\n const timeFormat = DateTime.fromFormat(newValue, this.format);\n if (!timeFormat.isValid) {\n throw new Error('Format is not supported or not correct');\n }\n\n this._time = timeFormat;\n }\n\n /**\n * Get default time value\n * @returns undefined for empty state (no selection)\n */\n private getDefaultTime(): DateTime | undefined {\n return DateTime.now();\n }\n\n /**\n * Text of the time confirm button\n */\n @Prop({ attribute: 'i18n-confirm-time' }) i18nConfirmTime =\n CONFIRM_BUTTON_DEFAULT;\n\n /**\n * Text for top header\n */\n @Prop({ attribute: 'i18n-header' }) i18nHeader: string = HEADER_DEFAULT;\n\n /**\n * Text for hour column header\n */\n @Prop({ attribute: 'i18n-column-header' }) i18nHourColumnHeader: string =\n 'hr';\n\n /**\n * Text for minute column header\n */\n // eslint-disable-next-line @stencil-community/decorators-style\n @Prop({ attribute: 'i18n-minute-column-header' })\n i18nMinuteColumnHeader: string = 'min';\n\n /**\n * Text for second column header\n */\n // eslint-disable-next-line @stencil-community/decorators-style\n @Prop({ attribute: 'i18n-second-column-header' })\n i18nSecondColumnHeader: string = 'sec';\n\n /**\n * Text for millisecond column header\n */\n // eslint-disable-next-line @stencil-community/decorators-style\n @Prop({ attribute: 'i18n-millisecond-column-header' })\n i18nMillisecondColumnHeader: string = 'ms';\n\n /**\n * Time event\n */\n @Event() timeSelect!: EventEmitter<string>;\n\n /**\n * Time change event\n */\n @Event() timeChange!: EventEmitter<string>;\n\n /**\n * Get the current time based on the wanted format\n */\n @Method()\n async getCurrentTime(): Promise<string | undefined> {\n return this._time?.toFormat(this.format);\n }\n\n @State() private _time?: DateTime;\n @Watch('_time')\n onTimeChange() {\n const formattedTimeOld = this.formattedTime;\n this.setTimeRef();\n this.formattedTime = this.getFormattedTime();\n this.updateScrollPositions(formattedTimeOld);\n }\n\n @State() private timeRef?: 'AM' | 'PM' | undefined;\n @State() private formattedTime: TimeOutputFormat = FORMATTED_TIME_EMPTY;\n @State() private timePickerDescriptors: TimePickerDescriptor[] = [];\n\n @State() private isUnitFocused: boolean = false;\n @State() private focusedUnit: TimePickerDescriptorUnit = 'hour';\n @State() private focusedValue: number = 0;\n\n private visibilityObserver?: MutationObserver;\n private focusScrollAlignment: 'start' | 'end' = 'start';\n\n componentWillLoad() {\n this.initPicker();\n }\n\n private initPicker() {\n let parsedTime: DateTime | undefined;\n\n if (this.time) {\n parsedTime = DateTime.fromFormat(this.time, this.format);\n\n if (!parsedTime.isValid) {\n console.error(\n `Invalid time format. The configured format does not match the format of the passed time. ${parsedTime.invalidReason}: ${parsedTime.invalidExplanation}`\n );\n parsedTime = this.getDefaultTime();\n }\n } else {\n parsedTime = this.getDefaultTime();\n }\n\n this._time = parsedTime;\n\n this.setTimeRef();\n this.setTimePickerDescriptors();\n this.setInitialFocusedValueAndUnit();\n\n this.watchHourIntervalPropHandler(this.hourInterval);\n this.watchMinuteIntervalPropHandler(this.minuteInterval);\n this.watchSecondIntervalPropHandler(this.secondInterval);\n this.watchMillisecondIntervalPropHandler(this.millisecondInterval);\n }\n\n componentDidLoad() {\n this.updateScrollPositions();\n this.setupVisibilityObserver();\n }\n\n componentDidRender() {\n if (this.isUnitFocused) {\n const elementContainer = this.getElementContainer(\n this.focusedUnit,\n this.focusedValue\n );\n const elementList = this.getElementList(this.focusedUnit);\n\n if (elementContainer) {\n elementContainer.focus({ preventScroll: true });\n\n if (!this.isElementVisible(elementContainer, elementList)) {\n elementContainer.scrollIntoView({\n block: this.focusScrollAlignment,\n });\n\n if (this.focusScrollAlignment === 'end') {\n elementList.scrollTop += 4;\n } else {\n elementList.scrollTop -= 4;\n }\n }\n }\n }\n }\n\n disconnectedCallback() {\n if (this.visibilityObserver) {\n this.visibilityObserver.disconnect();\n }\n }\n\n @OnListener<TimePicker>('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.isUnitFocused) {\n return;\n }\n\n let newValue = this.focusedValue;\n let shouldPreventDefault = true;\n let newValueInterval;\n\n switch (this.focusedUnit) {\n case 'hour':\n newValueInterval = this.hourInterval;\n break;\n case 'minute':\n newValueInterval = this.minuteInterval;\n break;\n case 'second':\n newValueInterval = this.secondInterval;\n break;\n case 'millisecond':\n newValueInterval = this.millisecondInterval;\n break;\n }\n\n switch (event.key) {\n case 'Tab':\n shouldPreventDefault = false;\n this.isUnitFocused = false;\n break;\n\n case 'ArrowUp':\n newValue -= newValueInterval;\n this.focusScrollAlignment = 'start';\n this.updateFocusedValue(newValue);\n this.updateDescriptorFocusedValue(this.focusedUnit, this.focusedValue);\n break;\n\n case 'ArrowDown':\n newValue += newValueInterval;\n this.focusScrollAlignment = 'end';\n this.updateFocusedValue(newValue);\n this.updateDescriptorFocusedValue(this.focusedUnit, this.focusedValue);\n break;\n\n case 'Enter':\n case ' ':\n this.select(this.focusedUnit, this.focusedValue);\n break;\n\n default:\n return;\n }\n\n if (shouldPreventDefault) {\n event.preventDefault();\n }\n }\n\n onUnitCellBlur(unit: TimePickerDescriptorUnit) {\n this.isUnitFocused = false;\n const focusedValue = Number(this.formattedTime[unit]);\n\n this.updateDescriptorFocusedValue(unit, focusedValue);\n }\n\n onUnitCellFocus(unit: TimePickerDescriptorUnit, value: number) {\n this.isUnitFocused = true;\n this.focusedUnit = unit;\n this.focusedValue = value;\n\n this.updateDescriptorFocusedValue(unit, value);\n }\n\n private getElementList(unit: TimePickerDescriptorUnit): HTMLDivElement {\n return this.hostElement.shadowRoot?.querySelector(\n `[data-element-list-id=\"${unit}\"]`\n ) as HTMLDivElement;\n }\n\n private getElementContainer(\n unit: TimePickerDescriptorUnit,\n number: number\n ): HTMLDivElement {\n return this.hostElement.shadowRoot?.querySelector(\n `[data-element-container-id=\"${unit}-${number}\"]`\n ) as HTMLDivElement;\n }\n\n private isElementVisible(\n element: HTMLElement,\n container: HTMLElement\n ): boolean {\n const elementRect = element.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n\n return (\n elementRect.top >= containerRect.top &&\n elementRect.bottom <= containerRect.bottom\n );\n }\n\n private updateFocusedValue(value: number) {\n const numberArray = this.getNumberArrayForUnit(this.focusedUnit);\n const maxValue = numberArray[numberArray.length - 1];\n const minValue = numberArray[0];\n\n if (value > maxValue) {\n value = minValue;\n this.focusScrollAlignment = 'start';\n } else if (value < minValue) {\n value = maxValue;\n this.focusScrollAlignment = 'end';\n }\n\n this.focusedValue = value;\n }\n\n private setInitialFocusedValueAndUnit() {\n const firstVisibleDescriptor = this.timePickerDescriptors.find(\n (descriptor) => !descriptor.hidden\n );\n if (!firstVisibleDescriptor) {\n return;\n }\n\n const selectedValue = Number(\n this.formattedTime[firstVisibleDescriptor.unit]\n );\n const isValidSelection =\n firstVisibleDescriptor.numberArray.includes(selectedValue);\n\n this.focusedValue = isValidSelection\n ? selectedValue\n : firstVisibleDescriptor.numberArray[0];\n\n this.focusedUnit = firstVisibleDescriptor.unit;\n }\n\n private setupVisibilityObserver() {\n let dropdownElement: Element | null = this.hostElement;\n while (dropdownElement && dropdownElement.tagName !== 'IX-DROPDOWN') {\n dropdownElement = dropdownElement.parentElement;\n }\n\n if (!dropdownElement) {\n return;\n }\n\n this.visibilityObserver = new MutationObserver((mutations) =>\n this.mutationObserverCallback(mutations)\n );\n\n this.visibilityObserver.observe(dropdownElement, {\n attributes: true,\n attributeFilter: ['class', 'style'],\n });\n }\n\n private mutationObserverCallback(mutations: MutationRecord[]) {\n for (const mutation of mutations) {\n if (mutation.type !== 'attributes') {\n continue;\n }\n\n const dropdown = mutation.target as HTMLElement;\n\n if (!dropdown.classList.contains('show')) {\n // keep picker in sync with input\n if (this.time) {\n const timeFormat = DateTime.fromFormat(this.time, this.format);\n if (timeFormat.isValid) {\n this._time = DateTime.fromFormat(this.time, this.format);\n this.setInitialFocusedValueAndUnit();\n }\n }\n\n continue;\n }\n\n const elementsReady = this.areElementsRendered();\n if (!elementsReady) {\n continue;\n }\n\n this.updateScrollPositions();\n }\n }\n\n private areElementsRendered(): boolean {\n const elementLists =\n this.hostElement.shadowRoot?.querySelectorAll('.element-list');\n\n if (!elementLists || elementLists.length === 0) {\n return false;\n }\n\n return Array.from(elementLists).some(\n (list) => (list as HTMLElement).offsetHeight > 0\n );\n }\n\n private getFormattedTime(): TimeOutputFormat {\n if (!this._time) {\n return FORMATTED_TIME_EMPTY;\n }\n\n return {\n hour:\n this.timeRef !== undefined\n ? this._time.toFormat('h')\n : this._time.toFormat('H'),\n minute: this._time.toFormat('m'),\n second: this._time.toFormat('s'),\n millisecond: this._time.toFormat('S'),\n };\n }\n\n private timeUpdate(unit: TimePickerDescriptorUnit, value: number): number {\n let maxValue = DateTime.now().endOf('day').get(unit);\n\n if (unit === 'hour') {\n if (this.timeRef === 'PM') {\n // 12 PM should remain 12, other PM hours add 12\n value = value === 12 ? 12 : value + 12;\n } else if (this.timeRef === 'AM') {\n // 12 AM should be 0, other AM hours remain as is\n value = value === 12 ? 0 : value;\n maxValue = 12;\n }\n }\n\n if (value > maxValue) {\n value = maxValue;\n } else if (value < 0) {\n value = 0;\n }\n\n if (!this._time) {\n this._time = DateTime.now().startOf('day');\n }\n\n this._time = this._time.set({\n [unit]: value,\n });\n\n return value;\n }\n\n private changeTimeReference(newTimeRef: 'AM' | 'PM') {\n if (this.timeRef === newTimeRef) {\n return;\n }\n\n if (!this._time) {\n this._time = DateTime.now().startOf('day');\n }\n\n this.timeRef = newTimeRef;\n const currentHour = this._time.hour;\n\n if (newTimeRef === 'PM' && currentHour < 12) {\n this._time = this._time.plus({ hours: 12 });\n } else if (newTimeRef === 'AM' && currentHour >= 12) {\n this._time = this._time.minus({ hours: 12 });\n }\n\n this.timeChange.emit(this._time.toFormat(this.format));\n }\n\n private isFormat12Hour(format: string): boolean {\n // Remove any text that's inside quotes (literal text in Luxon format strings)\n let cleanFormat = '';\n let inQuote = false;\n\n for (let i = 0; i < format.length; i++) {\n const char = format[i];\n if (char === \"'\") {\n inQuote = !inQuote;\n } else if (!inQuote) {\n cleanFormat += char;\n }\n }\n\n // Check for specific 12-hour format tokens\n // Case-sensitive matching to distinguish between 'h' and 'H'\n return /h|a|t/.test(cleanFormat);\n }\n\n private setTimeRef() {\n const uses12HourFormat = this.isFormat12Hour(this.format);\n\n if (uses12HourFormat && this._time) {\n this.timeRef = this._time!.hour >= 12 ? 'PM' : 'AM';\n } else {\n this.timeRef = undefined;\n }\n }\n\n private getInitialFocusedValueForUnit(\n unit: TimePickerDescriptorUnit,\n numberArray: number[]\n ): number {\n const selectedValue = Number(this.formattedTime[unit]);\n return numberArray.includes(selectedValue) ? selectedValue : numberArray[0];\n }\n\n private setTimePickerDescriptors() {\n let hourNumbers = [];\n let minuteNumbers = [];\n let secondNumbers = [];\n let millisecondsNumbers = [];\n\n if (this.timeRef !== undefined) {\n hourNumbers = Array.from(\n { length: Math.ceil(12 / this.hourInterval) },\n (_, i) => i * this.hourInterval + 1\n ).filter((hour) => hour <= 12);\n } else {\n hourNumbers = Array.from(\n { length: Math.ceil(24 / this.hourInterval) },\n (_, i) => i * this.hourInterval\n );\n }\n\n minuteNumbers = Array.from(\n { length: Math.ceil(60 / this.minuteInterval) },\n (_, i) => i * this.minuteInterval\n );\n secondNumbers = Array.from(\n { length: Math.ceil(60 / this.secondInterval) },\n (_, i) => i * this.secondInterval\n );\n millisecondsNumbers = Array.from(\n { length: Math.ceil(1000 / this.millisecondInterval) },\n (_, i) => i * this.millisecondInterval\n );\n\n this.timePickerDescriptors = [\n {\n unit: 'hour',\n header: this.i18nHourColumnHeader,\n hidden: !LUXON_FORMAT_PATTERNS.hours.test(this.format),\n numberArray: hourNumbers,\n focusedValue: this.getInitialFocusedValueForUnit('hour', hourNumbers),\n },\n {\n unit: 'minute',\n header: this.i18nMinuteColumnHeader,\n hidden: !LUXON_FORMAT_PATTERNS.minutes.test(this.format),\n numberArray: minuteNumbers,\n focusedValue: this.getInitialFocusedValueForUnit(\n 'minute',\n minuteNumbers\n ),\n },\n {\n unit: 'second',\n header: this.i18nSecondColumnHeader,\n hidden: !LUXON_FORMAT_PATTERNS.seconds.test(this.format),\n numberArray: secondNumbers,\n focusedValue: this.getInitialFocusedValueForUnit(\n 'second',\n secondNumbers\n ),\n },\n {\n unit: 'millisecond',\n header: this.i18nMillisecondColumnHeader,\n hidden: !LUXON_FORMAT_PATTERNS.milliseconds.test(this.format),\n numberArray: millisecondsNumbers,\n focusedValue: this.getInitialFocusedValueForUnit(\n 'millisecond',\n millisecondsNumbers\n ),\n },\n ];\n\n this.timePickerDescriptors = this.timePickerDescriptors.filter(\n (item) => !item.hidden\n );\n }\n\n private getNumberArrayForUnit(unit: TimePickerDescriptorUnit): number[] {\n const descriptor = this.timePickerDescriptors.find(\n (descriptor) => descriptor.unit === unit\n );\n return descriptor ? descriptor.numberArray : [];\n }\n\n private isSelected(unit: TimePickerDescriptorUnit, number: number): boolean {\n return this.formattedTime![unit] === String(number);\n }\n\n private select(unit: TimePickerDescriptorUnit, number: number) {\n this.formattedTime = {\n ...this.formattedTime!,\n [unit]: String(number),\n };\n\n this.timeUpdate(unit, number);\n this.elementListScrollToTop(unit, number, 'smooth');\n this.timeChange.emit(this._time!.toFormat(this.format));\n }\n\n private updateDescriptorFocusedValue(\n unit: TimePickerDescriptorUnit,\n value: number\n ) {\n const descriptorIndex = this.timePickerDescriptors.findIndex(\n (d) => d.unit === unit\n );\n if (descriptorIndex !== -1) {\n this.timePickerDescriptors = [\n ...this.timePickerDescriptors.slice(0, descriptorIndex),\n {\n ...this.timePickerDescriptors[descriptorIndex],\n focusedValue: value,\n },\n ...this.timePickerDescriptors.slice(descriptorIndex + 1),\n ];\n }\n }\n\n private elementListScrollToTop(\n unit: TimePickerDescriptorUnit,\n number: number,\n scrollBehaviour: 'smooth' | 'instant'\n ) {\n const elementList = this.getElementList(unit);\n const elementContainer = this.getElementContainer(unit, number);\n\n if (elementList && elementContainer) {\n const elementListHeight = elementList.clientHeight;\n const elementContainerHeight = elementContainer.clientHeight;\n\n // Offset which is used to adjust the scroll position to account for margins, elements being hidden, etc.\n let scrollPositionOffset = 11;\n if (this.hideHeader) {\n // 56 + 1 --> height of the header container and separator\n scrollPositionOffset -= 57;\n }\n\n const scrollPosition =\n elementContainer.offsetTop -\n elementListHeight / 2 +\n elementContainerHeight -\n scrollPositionOffset;\n\n elementList.scrollTo({\n top: scrollPosition,\n behavior: scrollBehaviour,\n });\n }\n }\n\n /**\n * Updates all scroll positions of the time picker elements\n * Updates only the elements that have changed if `formattedTimeOld` is provided\n */\n private updateScrollPositions(\n formattedTimeOld: TimeOutputFormat | undefined = undefined\n ) {\n for (const key in this.formattedTime) {\n const unitKey = key as keyof TimeOutputFormat;\n\n if (\n !formattedTimeOld ||\n this.formattedTime[unitKey] !== formattedTimeOld[unitKey]\n ) {\n this.elementListScrollToTop(\n unitKey as TimePickerDescriptorUnit,\n Number(this.formattedTime[unitKey]),\n 'instant'\n );\n }\n }\n }\n\n private formatUnitValue(\n unit: TimePickerDescriptorUnit,\n value: number\n ): string {\n if (unit === 'millisecond') {\n return value.toString().padStart(3, '0');\n }\n\n return value < 10 ? `0${value}` : value.toString();\n }\n\n private getColumnSeparator(currentIndex: number): string {\n if (currentIndex + 1 < this.timePickerDescriptors.length) {\n const nextUnit = this.timePickerDescriptors[currentIndex + 1].unit;\n return nextUnit === 'millisecond' ? '.' : ':';\n }\n\n return ':';\n }\n\n private getElementContainerTabIndex(\n number: number,\n descriptorUnit: TimePickerDescriptorUnit\n ): string {\n const descriptor = this.timePickerDescriptors.find(\n (d) => d.unit === descriptorUnit\n );\n\n if (number === descriptor?.focusedValue) {\n return '0';\n }\n\n return '-1';\n }\n\n render() {\n return (\n <Host>\n <ix-date-time-card\n embedded={this.embedded}\n timePickerAppearance={true}\n corners={this.corners}\n hasFooter={!this.dateTimePickerAppearance}\n hideHeader={this.hideHeader}\n >\n <div class=\"header\" slot=\"header\">\n <ix-typography format=\"body\">{this.i18nHeader}</ix-typography>\n </div>\n <div class=\"clock\">\n {this.timePickerDescriptors.map((descriptor, index: number) => (\n <div class=\"flex\">\n <div class={{ columns: true, hidden: descriptor.hidden }}>\n <div class=\"column-header\" title={descriptor.header}>\n {descriptor.header}\n </div>\n <div\n data-element-list-id={descriptor.unit}\n class=\"element-list\"\n tabIndex={-1}\n >\n {descriptor.numberArray.map((number) => {\n return (\n <button\n data-element-container-id={`${descriptor.unit}-${number}`}\n class={{\n selected: this.isSelected(descriptor.unit, number),\n 'element-container': true,\n }}\n onMouseDown={(e) => {\n e.preventDefault();\n }}\n onClick={() => {\n this.select(descriptor.unit, number);\n }}\n onFocus={() =>\n this.onUnitCellFocus(descriptor.unit, number)\n }\n onBlur={() => this.onUnitCellBlur(descriptor.unit)}\n tabindex={this.getElementContainerTabIndex(\n number,\n descriptor.unit\n )}\n aria-label={`${descriptor.header}: ${number}`}\n >\n {this.formatUnitValue(descriptor.unit, number)}\n </button>\n );\n })}\n <div class=\"element-list-padding\"></div>\n </div>\n </div>\n\n {index !== this.timePickerDescriptors.length - 1 && (\n <div\n class={{\n 'column-seperator': true,\n hidden: descriptor.hidden,\n }}\n >\n {this.getColumnSeparator(index)}\n </div>\n )}\n </div>\n ))}\n\n {this.timeRef && (\n <div class=\"flex\">\n <div class=\"column-seperator\"></div>\n <div class=\"columns\">\n <div class=\"column-header\" title=\"AM/PM\" />\n <div class=\"element-list\" tabIndex={-1}>\n <button\n data-am-pm-id=\"AM\"\n class={{\n selected: this.timeRef === 'AM',\n 'element-container': true,\n }}\n onClick={() => this.changeTimeReference('AM')}\n tabindex=\"0\"\n aria-label=\"AM\"\n >\n AM\n </button>\n <button\n data-am-pm-id=\"PM\"\n class={{\n selected: this.timeRef === 'PM',\n 'element-container': true,\n }}\n onClick={() => this.changeTimeReference('PM')}\n tabindex=\"0\"\n aria-label=\"PM\"\n >\n PM\n </button>\n </div>\n </div>\n </div>\n )}\n </div>\n\n <div\n class={{\n footer: true,\n 'footer--compact': this.timePickerDescriptors.length <= 2,\n }}\n slot=\"footer\"\n >\n <ix-button\n class=\"confirm-button\"\n onClick={() => {\n this.timeSelect.emit(this._time?.toFormat(this.format));\n }}\n >\n {this.i18nConfirmTime}\n </ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-CcWC2eNL.js","mappings":";;;;;;;;AAAA;;;;;;;AAOG;AAIG,SAAU,UAAU,CAAC,KAAuB,EAAA;IAChD,MAAM,IAAI,GAAG,CAAC;IACd,OAAO,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,SAAS,CAAC,WAAW;AAC/B,QAAA,MAAM,EAAE,eAAe;AACvB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,UAAU,EAAE;AACV,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;gBACE,KAAK,EAAE,IAAI,GAAG,CAAC;AAChB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,CAAC;AACT,aAAA;AACF,SAAA;AACF,KAAA,CAAC;AACJ;;ACnCA;;;;;;;AAOG;AAuBa,SAAA,mBAAmB,CACjC,GAA6B,EAC7B,MAAyB,EAAA;IAEzB,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB;AAC9D,IAAA,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;AAC5B,IAAA,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;AAC1B,IAAA,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS;AAClC;AAEgB,SAAA,gBAAgB,CAC9B,IAA8B,EAC9B,KAAoB,EAAA;AAEpB,IAAA,IAAI,IAAI,CAAC,wB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,CAAA,KAAA,EAAG,KAAK,CAAC,CAAA,EAAA;KAC3D,EACT,EAAA,OAAO,EAAE,CAAC,KAAK,KAAI,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAA,KAAK,CAAC,OAAO,MAAG,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,KAAA,EAAA,KAAK,CAAC,CAAA,EAAA,EAC1C,OAAO,EAAE,CAAC,UAAU,KAAI;AACtB,YAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAA0B;AACpD,YAAA,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC;AAC3C,YAAA,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;AACjC,SAAC,EACD,MAAM,EAAE,MAAM,KAAK,CAAC,MAAM,EAAE,IACxB,KAAK,CAAC,cAAc,CAAA,CACjB;AAEb;MAEa,OAAO,GAGf,CAAC,KAAK,EAAE,QAAQ,KAAI;AACvB,IAAA,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU,EAAA,EAC9C,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,KAAK,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAS,CAAA,EACzD,QAAQ,CACL;AAEV;AAEa,MAAA,SAAS,GAGjB,CAAC,KAAK,KAAI;AACb,IAAA,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY,EAAA,EAClD,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAA,CAAS,CACxD;AAEV;;;;","names":[],"sources":["src/components/input/input.animation.ts","src/components/input/input.util.ts","src/components/input/input.fc.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { animate } from 'animejs';\nimport Animation from '../utils/animation';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n animate(input, {\n duration: Animation.defaultTime,\n easing: 'easeInOutSine',\n loop: 2,\n translateX: [\n {\n value: xMax * -1,\n },\n {\n value: xMax,\n },\n {\n value: xMax / -2,\n },\n {\n value: xMax / 2,\n },\n {\n value: 0,\n },\n ],\n });\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-DyGPjxFm.js","mappings":";;AAAA,MAAM,UAAU,GAAG,81IAA81I;;MCiBp2I,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;AALpB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;AAME;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAExB;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;AAErB;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GA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W,CAAC,gBAAgB,EAAE;oBAChC,KAAK,CAAC,eAAe,EAAE;;AAE3B,aAAC,EAAA,EAED,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,OAAO;AACpB,gBAAA,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,EAAA,EAED,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACvB,gBAAA,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC;gBACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,aAAA,EAAA,EAEA,IAAI,CAAC,OAAO,CACT,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tab-item/tab-item.scss?tag=ix-tab-item&encapsulation=shadow","src/components/tab-item/tab-item.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@use './common-variables' as vars;\n@use 'mixins/text-truncation';\n@use 'mixins/hover';\n@use 'mixins/shadow-dom/component';\n\n:host {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 10px vars.$large-space;\n line-height: 20px;\n font-size: 14px;\n font-weight: bold;\n background-color: var(--theme-tab--background);\n color: var(--theme-tab--color);\n\n @include component.ix-component;\n\n &::after {\n content: '';\n position: absolute;\n background-color: var(--theme-tab-indicator--background);\n width: 100%;\n height: var(--theme-tab-indicator--height);\n left: 0;\n }\n\n .text {\n @include text-truncation.ellipsis;\n\n span,\n span::before {\n pointer-events: none;\n }\n\n vertical-align: middle;\n }\n\n .circle {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 3rem;\n width: 3rem;\n background-color: var(--theme-animated-tab-indicator--background);\n border-radius: 50%;\n border: 2px solid var(--theme-animated-tab-circle--border-color);\n color: var(--theme-an…icon--color);\n cursor: pointer;\n\n &.selected:not(.disabled) {\n background-color: var(--theme-animated-tab-circle--background--selected);\n color: var(--theme-animated-tab-icon--color--selected);\n border-color: var(--theme-animated-tab-circle--border-color--selected);\n\n &:hover {\n background-color: var(\n --theme-animated-tab-circle--background--selected\n );\n }\n }\n\n &:hover {\n background-color: var(--theme-animated-tab-circle--background--hover);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &:active {\n background-color: var(--theme-animated-tab-circle--background--active);\n }\n\n &.disabled {\n background-color: var(--theme-animated-tab-circle--background--disabled);\n border-color: var(--theme-animated-tab-circle--border-color--disabled);\n }\n }\n\n .counter {\n position: absolute;\n z-index: 1;\n height: 16px;\n width: auto;\n background-color: var(--theme-pill-outline--background);\n border: 1px solid var(--theme-tab-pill--border-color);\n border-radius: 100px;\n bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-left: vars.$tiny-space;\n padding-right: vars.$tiny-space;\n font-size: 12px;\n line-height: 14px;\n color: var(--theme-pill-outline--color);\n cursor: pointer;\n\n &.selected {\n border-color: var(--theme-tab-pill--border-color--selected);\n }\n\n &.disabled {\n border-color: var(--theme-tab-pill--border-color--disabled);\n }\n }\n\n .hidden {\n display: none;\n }\n}\n\n:host(.circle) {\n height: 72px;\n}\n\n:host(.top) {\n &::after {\n top: 0;\n }\n}\n\n:host(.bottom) {\n &::after {\n bottom: 0;\n }\n}\n\n:host(.stretched) {\n flex-basis: 100%;\n width: 100%;\n @include text-truncation.ellipsis;\n}\n\n:host(:hover:not(.circle)) {\n background-color: var(--theme-tab--background--hover);\n color: var(--theme-tab-color-hover);\n cursor: pointer;\n\n &::after {\n background-color: var(--theme-tab-indicator--background--hover);\n }\n}\n\n:host(:active:not(.circle)) {\n background-color: var(--theme-tab--background--active);\n color: var(--theme-tab-color--active);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--active);\n }\n}\n\n:host(:focus-visible) {\n outline: 0px solid var(--focus--border-color);\n\n .circle {\n outline: 1px solid var(--focus--border-color);\n }\n}\n\n:host(:focus-visible:not(.circle)) {\n outline: 1px solid var(--focus--border-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--theme-tab--color--disabled);\n background-color: var(--theme-tab--background--disabled);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--disabled);\n }\n}\n\n:host(.selected:not(.disabled)) {\n background-color: var(--theme-tab--background--selected);\n color: var(--theme-tab--color--selected);\n\n &::after {\n background-color: var(--theme-tab-indicator--background--selected);\n }\n}\n\n:host(.icon) {\n padding: vars.$large-space vars.$small-space;\n}\n\n:host(.small-tab) {\n height: 32px;\n padding: vars.$default-space;\n}\n\n:host(.small-tab.icon) {\n padding: vars.$default-space vars.$tiny-space;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport type { TabClickDetail } from './tab-item.types';\n\n@Component({\n tag: 'ix-tab-item',\n styleUrl: 'tab-item.scss',\n shadow: true,\n})\nexport class TabItem {\n /**\n * Set selected tab\n */\n @Prop() selected = false;\n\n /**\n * Set disabled tab\n */\n @Prop() disabled = false;\n\n /**\n * Set small size tab\n */\n @Prop() small = false;\n\n /**\n * Set icon only tab\n */\n @Prop() icon = false;\n\n /**\n * Set rounded tab\n */\n @Prop() rounded = false;\n\n /**\n * Set counter value\n */\n @Prop() counter?: number;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set selected placement\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * Emitted when the tab is clicked.\n */\n @Event() tabClick!: EventEmitter<TabClickDetail>;\n\n private tabItemClasses(props: {\n selected: boolean;\n disabled: boolean;\n small: boolean;\n icon: boolean;\n circle: boolean;\n layout: 'auto' | 'stretched';\n placement: 'bottom' | 'top';\n }) {\n return {\n selected: props.selected,\n disabled: props.disabled,\n 'small-tab': props.small,\n icon: props.small,\n stretched: props.layout === 'stretched',\n bottom: props.placement === 'bottom',\n top: props.placement === 'top',\n circle: props.circle,\n };\n }\n\n render() {\n return (\n <Host\n class={this.tabItemClasses({\n selected: this.selected,\n disabled: this.disabled,\n small: this.small,\n icon: this.icon,\n layout: this.layout,\n placement: this.placement,\n circle: this.rounded,\n })}\n tabIndex={0}\n onClick={(event: MouseEvent) => {\n if (event.defaultPrevented) return;\n\n const clientEvent = this.tabClick.emit({\n nativeEvent: event,\n });\n\n if (clientEvent.defaultPrevented) {\n event.stopPropagation();\n }\n }}\n >\n <div\n class={{\n circle: this.rounded,\n text: !this.rounded,\n selected: this.selected,\n disabled: this.disabled,\n }}\n >\n <slot></slot>\n </div>\n <div\n class={{\n counter: true,\n selected: this.selected,\n hidden: !(this.rounded && this.counter !== undefined),\n disabled: this.disabled,\n }}\n >\n {this.counter}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-PF0VLH1Q.js","mappings":";;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,2sOAA2sO;;ACAjuO;;;;;;;AAOG;;;;;;;;;;;MAqCU,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,CAAA,YAAA,EAAA;;;;;;;;;AAQE;;;AAGG;AACK,QAAA,IAAM,CA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AAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,MAAM,EAAE,IAAI;AACZ,gBAAA,MAAM,EAAE,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,QAAQ;AAC9C,aAAA,EAAA,EAED,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAW,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAAG,EAAA,IAAI,CAAC,QAAQ,CAAa,CAChE,CACY,CACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzlBX,UAAA,CAAA;IADC,UAAU,CAAa,SAAS;CAoChC,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/date-picker/date-picker.scss?tag=ix-date-picker&encapsulation=shadow","src/components/date-picker/date-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@use './common-variables' as vars;\n@use 'mixins/shadow-dom/component';\n@use 'mixins/text-truncation';\n\n:host {\n display: block;\n position: relative;\n\n @include component.ix-component;\n\n .header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .disabled-item {\n pointer-events: none;\n background-color: var(--theme-datepicker-day--background--disabled);\n color: var(--theme-datepicker-day--color--disabled);\n cursor: default;\n }\n\n .selector {\n flex-basis: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 vars.$default-space;\n\n .dropdown {\n color: var(--theme-menu-item--color);\n font-size: 14px;\n line-height: 20px;\n }\n\n .capitalize {\n text-transform: capitalize;\n }\n\n .month-dropdown-item {\n margin-left: 4px;\n margin-right: 4px;\n\n &:focus-visible {\n outline: 1px solid var(--theme-color-focus-bdr);\n outline-offset: var(--theme-btn--focus--outline-offset);\n }\n }\n\n .arrowYear {\n display: flex;\n position: relative;\n padding: vars.$medium-space vars.$x-large-space;\n align-items: center;\n cursor: pointer;\n\n &:hover {\n background-color: var(--theme-select-list-item--background--hover);\n }\n\n &.selected {\n background-color: var(--theme-select-list-item--background--selected);\n }\n\n .arrowPosition {\n position: absolute;\n left: calc((vars.$x-large-space / 2) - 6px);\n top: calc(50% - 6px);\n }\n\n .checkPosition {\n position: absolute;\n left: calc((vars.$x-large-space / 2) - 6px);\n top: calc(50% - 8px);\n }\n\n .monthMargin {\n margin-left: 10px;\n }\n }\n }\n\n .wrapper {\n display: flex;\n\n .overflow {\n overflow-y: scroll;\n max-height: 250px;\n }\n }\n\n .grid {\n display: grid;\n grid-template-columns: repeat(7, 40px);\n grid-template-rows: repeat(7, 40px);\n\n align-items: center;\n justify-items: center;\n justify-content: center;\n color: var(--theme-datepicker-today--color);\n\n &--show-week-numbers {\n grid-template-columns: 24px repeat(7, 40px);\n }\n\n .calendar-item {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--theme-datepicker-day--background);\n border: 1px solid var(--theme-datepicker-day--background);\n width: 40px;\n height: 40px;\n cursor: pointer;\n\n &:focus-visible {\n outline: 1px solid var(--theme-color-focus-bdr);\n box-shadow: inset 0 0 0 1px var(--theme-color-inv-contrast-text);\n background-color: var(--theme-datepicker-day--background--selected);\n border: inset 1px solid\n var(--theme-datepicker-day--border-color--selected);\n color: var(--theme-datepicker-day--color--selected);\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0;\n }\n\n &.today {\n border: 1px solid var(--theme-datepicker-today--border-color);\n\n &:hover {\n background-color: var(--theme-datepicker-day--background--hover);\n }\n\n &:active {\n background-color: var(--theme-datepicker-day--background--active);\n }\n\n &.selected {\n box-shadow: inset 0 0 0 1px white;\n &:hover {\n background-color: var(\n --theme-datepicker-day--background--selected-hover\n );\n }\n\n &:active {\n background-color: var(\n --theme-datepicker-day--background--selected-active\n );\n }\n\n &.disabled {\n pointer-events: none;\n background-color: var(\n --theme-datepicker-day--background--selected-disabled\n );\n border: 1px solid\n var(--theme-datepicker-day--background--selected-disabled);\n color: var(--theme-datepicker-day--color--selected-disabled);\n }\n }\n\n &.range {\n background-color: var(--theme-datepicker-day--background--range);\n color: var(--theme-datepicker-day--color--range);\n border: 1px solid var(--theme-datepicker-today--border-color--range);\n box-shadow: inset 0 0 0 1px white;\n\n &:hover {\n background-color: var(\n --theme-datepicker-day--background--range-hover\n );\n border: 1px solid\n var(--theme-datepicker-today--border-color--range-hover);\n }\n\n &:active {\n background-color: var(\n --theme-datepicker-day--background--range-active\n );\n border: 1px solid\n var(--theme-datepicker-today--border-color--range-active);\n }\n\n &.disabled {\n background-color: var(\n --theme-datepicker-day--background--range-disabled\n );\n color: var(--theme-datepicker-day--color--range-disabled);\n border: 1px solid\n var(--theme-datepicker-today--border-color--range-disabled);\n }\n }\n\n &.disabled {\n pointer-events: none;\n background-color: var(--theme-datepicker-day--background--disabled);\n color: var(--theme-datepicker-day--color--disabled);\n cursor: default;\n }\n }\n\n &:hover {\n background-color: var(--theme-datepicker-day--background--hover);\n }\n\n &:active {\n background-color: var(--theme-datepicker-day--background--active);\n }\n\n &.selected {\n background-color: var(--theme-datepicker-day--background--selected);\n color: var(--theme-datepicker-day--color--selected);\n border: 1px solid var(--theme-datepicker-day--background--selected);\n font-weight: var(--theme-font-weight-bold);\n\n &:hover {\n background-color: var(\n --theme-datepicker-day--background--selected-hover\n );\n }\n\n &:active {\n background-color: var(\n --theme-datepicker-day--background--selected-active\n );\n }\n\n &.disabled {\n pointer-events: none;\n background-color: var(\n --theme-datepicker-day--background--selected-disabled\n );\n color: var(--theme-datepicker-day--color--selected-disabled);\n }\n }\n\n &.range {\n background-color: var(--theme-datepicker-day--background--range);\n color: var(--theme-datepicker-day--color--range);\n\n &:hover {\n background-color: var(\n --theme-datepicker-day--background--range-hover\n );\n }\n\n &:active {\n background-color: var(\n --theme-datepicker-day--background--range-active\n );\n }\n\n &.disabled {\n pointer-events: none;\n background-color: var(\n --theme-datepicker-day--background--range-disabled\n );\n color: var(--theme-datepicker-day--color--range-disabled);\n }\n }\n\n &.disabled {\n pointer-events: none;\n background-color: var(--theme-datepicker-day--background--disabled);\n color: var(--theme-datepicker-day--color--disabled);\n }\n\n &.week-day {\n color: var(--theme-datepicker-weekday--color);\n font-size: var(--theme-ms-0);\n line-height: 143%;\n border: none;\n background: none;\n cursor: initial;\n\n .overflow {\n @include text-truncation.ellipsis;\n }\n }\n\n &.empty-day {\n border: none;\n background: none;\n cursor: initial;\n }\n\n &.week-number {\n font-size: 10px;\n line-height: 14px;\n color: var(--theme-datepicker-weekday--color);\n border: none;\n background: none;\n cursor: initial;\n width: 1.5rem;\n }\n }\n }\n\n .button {\n display: flex;\n justify-content: flex-end;\n margin-top: vars.$default-space;\n }\n\n .hidden {\n display: none;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n iconChevronLeftSmall,\n iconChevronRightSmall,\n iconSingleCheck,\n} from '@siemens/ix-icons/icons';\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { DateTime, Info } from 'luxon';\nimport type { DateTimeCardCorners } from '../date-time-card/date-time-card.types';\nimport { OnListener } from '../utils/listener';\nimport { makeRef } from '../utils/make-ref';\nimport { IxDatePickerComponent } from './date-picker-component';\nimport type { DateChangeEvent } from './date-picker.events';\n\ninterface CalendarWeek {\n weekNumber: number;\n dayNumbers: (number | undefined)[];\n}\n\n@Component({\n tag: 'ix-date-picker',\n styleUrl: 'date-picker.scss',\n shadow: true,\n})\nexport class DatePicker implements IxDatePickerComponent {\n @Element() hostElement!: HTMLIxDatePickerElement;\n\n /**\n * Date format string.\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n */\n @Prop() format: string = 'yyyy/LL/dd';\n\n /**\n * If true disables date range selection (from/to).\n */\n @Prop() singleSelection: boolean = false;\n\n /**\n * Corner style\n */\n @Prop() corners: DateTimeCardCorners = 'rounded';\n\n /**\n * The selected starting date. If the date-picker-rework is not in range mode this is the selected date.\n * Format has to match the `format` property.\n */\n @Prop() from: string | undefined;\n\n @Watch('from')\n watchFromPropHandler(newValue: string) {\n if (!newValue) {\n this.currFromDate = undefined;\n\n return;\n }\n\n const date = this.parseDateString(newValue);\n\n if (date) {\n this.currFromDate = date;\n this.updateSelectedYearMonth(date);\n }\n }\n\n /**\n * The selected end date. If the the date-picker-rework is not in range mode this property has no impact.\n * Format has to match the `format` property.\n */\n @Prop() to: string | undefined;\n\n @Watch('to')\n watchToPropHandler(newValue: string) {\n if (!newValue) {\n this.currToDate = undefined;\n\n return;\n }\n\n const date = this.parseDateString(newValue);\n\n if (date) {\n this.currToDate = date;\n this.updateSelectedYearMonth(date);\n }\n }\n\n /**\n * The earliest date that can be selected by the date picker.\n * If not set there will be no restriction.\n */\n @Prop() minDate = '';\n\n /**\n * The latest date that can be selected by the date picker.\n * If not set there will be no restriction.\n */\n @Prop() maxDate = '';\n\n /**\n * Text of date select button\n */\n @Prop({ attribute: 'i18n-done' }) i18nDone = 'Done';\n\n /**\n * ARIA label for the previous month icon button\n * Will be set as aria-label on the nested HTML button element\n */\n @Prop() ariaLabelPreviousMonthButton?: string;\n\n /**\n * ARIA label for the next month icon button\n * Will be set as aria-label on the nested HTML button element\n */\n @Prop() ariaLabelNextMonthButton?: string;\n\n /**\n * The index of which day to start the week on, based on the Locale#weekdays array.\n * E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.\n */\n @Prop() weekStartIndex = 0;\n\n /**\n * Locale identifier (e.g. 'en' or 'de').\n * The locale is used to translate the labels for weekdays and months.\n * It also determines the default order of weekdays based on the locale's conventions.\n * When the locale changes, the weekday labels are rotated according to the `weekStartIndex`.\n * It does not affect the values returned by methods and events.\n */\n @Prop() locale?: string;\n\n @Watch('locale')\n onLocaleChange() {\n this.setTranslations();\n }\n\n /**\n * Shows week numbers displayed on the left side of the date picker\n *\n * @since 3.0.0\n */\n @Prop() showWeekNumbers = false;\n\n /** @internal */\n @Prop() embedded = false;\n\n /** @internal */\n @Prop() today = DateTime.now().toISO();\n\n /**\n * Emitted when the date selection changes. The `DateChangeEvent` contains `from` and `to` properties.\n * The property strings are formatted according to the `format` property and not affected by the `locale` property.\n * The locale applied is always `en-US`.\n * Note: Since 2.0.0 `dateChange` does not dispatch detail property as `string`\n */\n @Event() dateChange!: EventEmitter<DateChangeEvent>;\n\n /**\n * Emitted when the date range selection changes and the component is in range mode. The `DateChangeEvent` contains `from` and `to` properties.\n * The property strings are formatted according to the `format` property and not affected by the `locale` property.\n * The locale applied is always `en-US`.\n */\n @Event() dateRangeChange!: EventEmitter<DateChangeEvent>;\n\n /**\n * Emitted when the selection is confirmed via the date select button. The `DateChangeEvent` contains `from` and `to` properties.\n * The property strings are formatted according to the `format` property and not affected by the `locale` property.\n * The locale applied is always `en-US`.\n */\n @Event() dateSelect!: EventEmitter<DateChangeEvent>;\n\n /**\n * Get the currently selected date or range. The object returned contains `from` and `to` properties.\n * The property strings are formatted according to the `format` property and not affected by the `locale` property.\n * The locale applied is always `en-US`.\n */\n @Method()\n async getCurrentDate(): Promise<DateChangeEvent> {\n const _from = this.currFromDate?.isValid\n ? this.currFromDate?.toFormat(this.format)\n : undefined;\n const _to = this.currToDate?.isValid\n ? this.currToDate?.toFormat(this.format)\n : undefined;\n\n if (!this.singleSelection) {\n return {\n from: _from,\n to: _to,\n };\n }\n\n return {\n from: _from,\n to: undefined,\n };\n }\n\n @State() currFromDate?: DateTime;\n @State() currToDate?: DateTime;\n\n @State() selectedYear = 0;\n @State() tempYear = 0;\n @State() startYear = 0;\n @State() endYear = 0;\n @State() selectedMonth = 0;\n @State() tempMonth = 0;\n\n private readonly dropdownButtonRef = makeRef<HTMLElement>();\n private readonly yearContainerRef = makeRef<HTMLElement>();\n private readonly firstMonthRef = makeRef<HTMLElement>();\n\n @State() dayNames!: string[];\n @State() monthNames!: string[];\n @State() focusedDay: number = 1;\n\n private isDayFocus = false;\n private monthChangedFromFocus = false;\n private readonly DAYS_IN_WEEK = 7;\n private calendar: CalendarWeek[] = [];\n\n @OnListener<DatePicker>('keydown')\n handleKeyUp(event: KeyboardEvent) {\n if (!this.isDayFocus) {\n return;\n }\n\n let _focusedDay = this.focusedDay;\n\n switch (event.key) {\n case 'ArrowLeft':\n _focusedDay--;\n break;\n case 'ArrowRight':\n _focusedDay++;\n break;\n case 'ArrowUp':\n _focusedDay = _focusedDay - 7;\n break;\n case 'ArrowDown':\n _focusedDay = _focusedDay + 7;\n break;\n default:\n return;\n }\n\n if (_focusedDay > this.getDaysInCurrentMonth()) {\n _focusedDay = _focusedDay - this.getDaysInCurrentMonth();\n this.changeToAdjacentMonth(1);\n this.monthChangedFromFocus = true;\n } else if (_focusedDay < 1) {\n this.changeToAdjacentMonth(-1);\n _focusedDay = _focusedDay + this.getDaysInCurrentMonth();\n this.monthChangedFromFocus = true;\n }\n\n this.focusedDay = _focusedDay;\n }\n\n private getDaysInCurrentMonth(): number {\n return (\n DateTime.utc(this.selectedYear, this.selectedMonth + 1).daysInMonth || 0\n );\n }\n\n private getDateTimeNow() {\n return DateTime.fromISO(this.today);\n }\n\n private parseDateString(dateString: string): DateTime | undefined {\n const date = DateTime.fromFormat(dateString, this.format);\n\n if (!date.isValid) {\n console.error(date.invalidExplanation);\n\n return undefined;\n }\n\n return date;\n }\n\n private updateSelectedYearMonth(date: DateTime) {\n this.selectedYear = date.year;\n this.selectedMonth = date.month - 1;\n }\n\n onDayBlur() {\n this.isDayFocus = false;\n }\n\n onDayFocus() {\n this.isDayFocus = true;\n }\n\n componentWillLoad() {\n this.setTranslations();\n\n this.currFromDate = this.from\n ? DateTime.fromFormat(this.from, this.format)\n : undefined;\n this.currToDate = this.to\n ? DateTime.fromFormat(this.to, this.format)\n : undefined;\n\n const year = this.currFromDate?.year ?? this.getDateTimeNow().year;\n this.startYear = year - 5;\n this.endYear = year + 5;\n\n this.selectedMonth =\n (this.currFromDate?.month ?? this.getDateTimeNow().month) - 1;\n this.selectedYear = year;\n this.tempMonth = this.selectedMonth;\n this.tempYear = this.selectedYear;\n }\n\n componentWillRender() {\n this.calculateCalendar();\n }\n\n componentDidRender() {\n if (!this.monthChangedFromFocus && !this.isDayFocus) {\n return;\n }\n\n const dayElem = this.hostElement.shadowRoot!.querySelector(\n `[id=day-cell-${this.focusedDay}]`\n ) as HTMLElement;\n dayElem.focus();\n }\n\n private setTranslations() {\n this.dayNames = this.rotateWeekDayNames(\n Info.weekdays('long', {\n locale: this.locale,\n }),\n this.weekStartIndex\n );\n\n this.monthNames = Info.months('long', {\n locale: this.locale,\n });\n }\n\n /**\n * Rotate the WeekdayNames array.\n * Based on the position that should be the new 0-index.\n */\n private rotateWeekDayNames(weekdays: string[], index: number): string[] {\n const clone = [...weekdays];\n\n if (index === 0) {\n return clone;\n }\n\n index = -index;\n const len = weekdays.length;\n\n clone.push(...clone.splice(0, ((-index % len) + len) % len));\n return clone;\n }\n\n private async onDone() {\n const date = await this.getCurrentDate();\n this.dateSelect.emit(date);\n }\n\n private calculateCalendar() {\n const calendar: CalendarWeek[] = [];\n const month = DateTime.utc(this.selectedYear, this.selectedMonth + 1);\n const monthStart = month.startOf('month');\n const monthEnd = month.endOf('month');\n let startWeek = monthStart.weekNumber;\n let endWeek = monthEnd.weekNumber;\n let monthStartWeekDayIndex = monthStart.weekday - 1;\n let monthEndWeekDayIndex = monthEnd.weekday - 1;\n\n if (this.weekStartIndex !== 0) {\n // Find the positions where to start/stop counting the day-numbers based on which day the week starts\n const weekdays = Info.weekdays();\n const monthStartWeekDayName = weekdays[monthStart.weekday];\n\n monthStartWeekDayIndex = this.dayNames.findIndex(\n (d) => d === monthStartWeekDayName\n );\n const monthEndWeekDayName = weekdays[monthEnd.weekday];\n monthEndWeekDayIndex = this.dayNames.findIndex(\n (d) => d === monthEndWeekDayName\n );\n }\n\n let correctLastWeek = false;\n if (endWeek === 1) {\n endWeek = monthEnd.weeksInWeekYear + 1;\n correctLastWeek = true;\n }\n\n let correctFirstWeek = false;\n if (startWeek === monthStart.weeksInWeekYear) {\n startWeek = 1;\n endWeek++;\n\n correctFirstWeek = true;\n }\n\n let currDayNumber = 1;\n for (\n let weekIndex = startWeek;\n weekIndex <= endWeek && currDayNumber <= 31;\n weekIndex++\n ) {\n const daysArr: (number | undefined)[] = [];\n\n for (let j = 0; j < this.DAYS_IN_WEEK && currDayNumber <= 31; j++) {\n // Display empty cells until the calender starts/has ended\n if (\n (weekIndex === startWeek && j < monthStartWeekDayIndex) ||\n (weekIndex === endWeek && j > monthEndWeekDayIndex)\n ) {\n daysArr.push(undefined);\n } else {\n daysArr.push(currDayNumber++);\n }\n }\n\n if (correctFirstWeek || correctLastWeek) {\n if (weekIndex === 1) {\n calendar.push({\n weekNumber: monthStart.weeksInWeekYear,\n dayNumbers: daysArr,\n });\n } else if (weekIndex === monthEnd.weekNumber) {\n calendar.push({\n weekNumber: 1,\n dayNumbers: daysArr,\n });\n } else {\n calendar.push({\n weekNumber: weekIndex - 1,\n dayNumbers: daysArr,\n });\n }\n continue;\n }\n\n calendar.push({\n weekNumber: weekIndex,\n dayNumbers: daysArr,\n });\n }\n\n this.calendar = calendar;\n }\n\n private selectTempYear(event: MouseEvent, year: number) {\n event?.stopPropagation();\n this.tempYear = year;\n }\n\n private focusMonth() {\n this.firstMonthRef.current?.focus();\n }\n\n private infiniteScrollYears() {\n const yearContainer = this.yearContainerRef.current;\n\n if (!yearContainer) {\n return;\n }\n\n const scroll = yearContainer.scrollTop;\n const maxScroll = yearContainer.scrollHeight;\n const atTop = scroll === 0;\n const atBottom =\n Math.round(scroll + yearContainer.offsetHeight) >= maxScroll;\n const limit = 200;\n\n if (this.endYear - this.startYear > limit) return;\n\n if (atTop) {\n const first = yearContainer.firstElementChild as HTMLElement;\n this.startYear -= 5;\n yearContainer.scrollTo(0, first.offsetTop);\n\n return;\n }\n\n if (atBottom) {\n const last = yearContainer.lastElementChild as HTMLElement;\n this.endYear += 5;\n yearContainer.scrollTo(0, last.offsetTop);\n }\n }\n\n private selectMonth(month: number) {\n this.selectedMonth = month;\n this.selectedYear = this.tempYear;\n this.tempMonth = month;\n\n const dropdown = this.hostElement.shadowRoot!.querySelector('ix-dropdown');\n if (dropdown) {\n dropdown.show = false;\n }\n }\n\n private changeToAdjacentMonth(number: -1 | 1) {\n if (this.selectedMonth + number < 0) {\n this.selectedYear--;\n this.selectedMonth = 11;\n } else if (this.selectedMonth + number > 11) {\n this.selectedYear++;\n this.selectedMonth = 0;\n } else {\n this.selectedMonth += number;\n }\n }\n\n private selectDay(selectedDay: number, target: Element) {\n if (target.classList.contains('disabled')) {\n return;\n }\n\n const date = DateTime.fromJSDate(\n new Date(this.selectedYear, this.selectedMonth, selectedDay)\n );\n\n if (this.singleSelection || this.currFromDate === undefined) {\n this.currFromDate = date;\n this.onDateChange();\n\n return;\n }\n\n // Reset the range selection\n if (this.currToDate !== undefined) {\n this.currFromDate = date;\n this.currToDate = undefined;\n this.onDateChange();\n\n return;\n }\n\n // Swap from/to if the second date is before the current date\n if (date < this.currFromDate) {\n this.currToDate = this.currFromDate;\n this.currFromDate = date;\n this.onDateChange();\n\n return;\n }\n\n // Set the range normally\n this.currToDate = date;\n this.onDateChange();\n }\n\n private onDateChange() {\n this.getCurrentDate().then((date) => {\n this.dateChange.emit(date);\n if (!this.singleSelection) {\n this.dateRangeChange.emit(date);\n }\n });\n }\n\n private getDayClasses(day: number): Record<string, boolean> {\n const todayObj = this.getDateTimeNow();\n const selectedDayObj = DateTime.fromJSDate(\n new Date(this.selectedYear, this.selectedMonth, day)\n );\n\n return {\n 'calendar-item': true,\n 'empty-day': day === undefined,\n today: todayObj.hasSame(selectedDayObj, 'day'),\n selected: !!(\n this.currFromDate?.hasSame(selectedDayObj, 'day') ||\n this.currToDate?.hasSame(selectedDayObj, 'day')\n ),\n range: !!(\n this.currFromDate &&\n selectedDayObj.startOf('day') > this.currFromDate.startOf('day') &&\n this.currToDate !== undefined &&\n selectedDayObj.startOf('day') < this.currToDate?.startOf('day')\n ),\n disabled: !this.isWithinMinMaxDate(selectedDayObj),\n };\n }\n\n private isWithinMinMaxYear(year: number): boolean {\n const minDateYear = this.minDate\n ? DateTime.fromFormat(this.minDate, this.format).year\n : undefined;\n const maxDateYear = this.maxDate\n ? DateTime.fromFormat(this.maxDate, this.format).year\n : undefined;\n const isBefore = minDateYear ? year < minDateYear : false;\n const isAfter = maxDateYear ? year > maxDateYear : false;\n\n return !isBefore && !isAfter;\n }\n\n private isWithinMinMaxMonth(month: number): boolean {\n const minDateObj = this.minDate\n ? DateTime.fromFormat(this.minDate, this.format)\n : undefined;\n const maxDateObj = this.maxDate\n ? DateTime.fromFormat(this.maxDate, this.format)\n : undefined;\n const minDateMonth = minDateObj?.month;\n const maxDateMonth = maxDateObj?.month;\n const isBefore = minDateMonth\n ? this.tempYear === minDateObj.year && month < minDateMonth\n : false;\n const isAfter = maxDateMonth\n ? this.tempYear === maxDateObj.year && month > maxDateMonth\n : false;\n\n return !isBefore && !isAfter;\n }\n\n private isWithinMinMaxDate(date: DateTime): boolean {\n const _minDate = this.minDate\n ? DateTime.fromFormat(this.minDate, this.format)\n : undefined;\n const _maxDate = this.maxDate\n ? DateTime.fromFormat(this.maxDate, this.format)\n : undefined;\n const isBefore = _minDate\n ? date.startOf('day') < _minDate.startOf('day')\n : false;\n const isAfter = _maxDate\n ? date.startOf('day') > _maxDate.startOf('day')\n : false;\n\n return !isBefore && !isAfter;\n }\n\n private renderYears() {\n const rows = [];\n\n for (let year = this.startYear; year <= this.endYear; year++) {\n rows.push(\n <div\n key={year}\n class={{\n arrowYear: true,\n 'month-dropdown-item': true,\n 'disabled-item': !this.isWithinMinMaxYear(year),\n }}\n onClick={(event) => this.selectTempYear(event, year)}\n onKeyUp={(event) => {\n if (event.key === 'Enter') {\n this.tempYear = year;\n this.focusMonth();\n }\n }}\n tabIndex={0}\n >\n <ix-icon\n class={{\n hidden: this.tempYear !== year,\n arrowPosition: true,\n }}\n name={iconChevronRightSmall}\n size=\"12\"\n ></ix-icon>\n <div style={{ 'min-width': 'max-content' }}>{`${year}`}</div>\n </div>\n );\n }\n\n return rows;\n }\n\n render() {\n return (\n <Host>\n <ix-date-time-card corners={this.corners} embedded={this.embedded}>\n <div class=\"header\" slot=\"header\">\n <ix-icon-button\n onClick={() => this.changeToAdjacentMonth(-1)}\n icon={iconChevronLeftSmall}\n variant=\"tertiary\"\n class=\"arrows\"\n aria-label={this.ariaLabelPreviousMonthButton}\n ></ix-icon-button>\n <div class=\"selector\">\n <ix-button\n variant=\"tertiary\"\n ref={this.dropdownButtonRef}\n data-testid=\"year-month-button\"\n >\n <span class=\"capitalize\">\n {this.monthNames[this.selectedMonth]} {this.selectedYear}\n </span>\n </ix-button>\n <ix-dropdown\n data-testid=\"year-month-dropdown\"\n class=\"dropdown\"\n trigger={this.dropdownButtonRef.waitForCurrent()}\n ignoreRelatedSubmenu\n placement=\"bottom-start\"\n >\n <div class=\"wrapper\">\n <div\n data-testid=\"year-container\"\n class=\"overflow\"\n onScroll={() => this.infiniteScrollYears()}\n ref={this.yearContainerRef}\n >\n {this.renderYears()}\n </div>\n <div class=\"overflow\" data-testid=\"month-container\">\n {this.monthNames.map((month, index) => (\n <div\n key={month}\n ref={(ref) => {\n if (month === this.monthNames[0]) {\n this.firstMonthRef(ref);\n }\n }}\n class={{\n arrowYear: true,\n 'month-dropdown-item': true,\n selected:\n this.tempYear === this.selectedYear &&\n this.tempMonth === index,\n 'disabled-item': !this.isWithinMinMaxMonth(index),\n }}\n onClick={() => this.selectMonth(index)}\n onKeyUp={(event) =>\n event.key === 'Enter' && this.selectMonth(index)\n }\n tabIndex={0}\n >\n <ix-icon\n class={{\n hidden:\n this.tempYear !== this.selectedYear ||\n this.tempMonth !== index,\n checkPosition: true,\n }}\n name={iconSingleCheck}\n size=\"16\"\n ></ix-icon>\n <div>\n <span class=\"capitalize monthMargin\">{`${month} ${this.tempYear}`}</span>\n </div>\n </div>\n ))}\n </div>\n </div>\n </ix-dropdown>\n </div>\n <ix-icon-button\n onClick={() => this.changeToAdjacentMonth(1)}\n icon={iconChevronRightSmall}\n variant=\"tertiary\"\n class=\"arrows\"\n aria-label={this.ariaLabelNextMonthButton}\n ></ix-icon-button>\n </div>\n <div\n class={{\n grid: true,\n 'grid--show-week-numbers': this.showWeekNumbers,\n }}\n >\n {this.showWeekNumbers && <div class=\"calendar-item week-day\"></div>}\n {this.dayNames.map((name) => (\n <div key={name} class=\"calendar-item week-day\">\n <div class=\"overflow\">{name.slice(0, 3)}</div>\n </div>\n ))}\n {this.calendar.map((week) => {\n return (\n <Fragment>\n {this.showWeekNumbers && (\n <div class=\"calendar-item week-number\">\n {week.weekNumber}\n </div>\n )}\n {week.dayNumbers.map((day) => {\n return day ? (\n <div\n key={day}\n id={`day-cell-${day}`}\n date-calender-day\n class={this.getDayClasses(day)}\n onClick={(e) => {\n const target = e.currentTarget as HTMLElement;\n this.selectDay(day, target);\n }}\n onKeyUp={(e) => {\n const target = e.currentTarget as HTMLElement;\n if (e.key === 'Enter') {\n this.selectDay(day, target);\n }\n }}\n tabIndex={day === this.focusedDay ? 0 : -1}\n onFocus={() => this.onDayFocus()}\n onBlur={() => this.onDayBlur()}\n aria-label={`${this.selectedMonth}: ${day}`}\n >\n {day}\n </div>\n ) : (\n <div></div>\n );\n })}\n </Fragment>\n );\n })}\n </div>\n <div\n class={{\n button: true,\n hidden: this.singleSelection || this.embedded,\n }}\n >\n <ix-button onClick={() => this.onDone()}>{this.i18nDone}</ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-xHo-3QVy.js","mappings":";;AAAA;;;;;;;AAOG;AASI,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AAA,GAAA,OAAO,CAAE,eAAe,CAAC;YAChE,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;YACpC,OAAO,iBAAiB,KAAjB,IAAA,IAAA,iBAAiB,KAAjB,MAAA,GAAA,MAAA,GAAA,iBAAiB,CAAE,IAAI,CAAC,IAAI,CAAC;AACtC,SAAC;QAED,KAAK,CAAC,oBAAoB,GAAG,YAAA;AAC3B,YAAA,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;AAE7B,YAAA,IAAI,IAAI,IAAI,qBAAqB,EAAE;gBACjC,qBAAqB,CAAC,OAAO,EAAE;gBAC/B,qBAAqB,GAAG,IAAI;;AAG9B,YAAA,IAAI,IAAI,IAAI,uBAAuB,EAAE;AACnC,gBAAA,IAAI,CAAC,mBAAmB,CAAC,eAAe,EAAE,uBAAuB,CAAC;AAClE,gBAAA,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,uBAAuB,CAAC;AAChE,gBAAA,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,uBAAuB,CAAC;gBAC3D,uBAAuB,GAAG,IAAI;;YAGhC,OAAO,oBAAoB,KAApB,IAAA,IAAA,oBAAoB,KAApB,MAAA,GAAA,MAAA,GAAA,oBAAoB,CAAE,IAAI,CAAC,IAAI,CAAC;AACzC,SAAC;AACH,KAAC;AACH;;;;","names":[],"sources":["src/components/utils/input/validation.ts"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { getElement } from '@stencil/core';\nimport { HTMLIxFormComponentElement, IxFormComponent } from '.';\nimport { IxComponent } from '../internal';\n\nexport type ClassMutationObserver = {\n destroy: () => void;\n};\n\nexport async function isTouched<T>(host: IxFormComponent<T>) {\n if (typeof host.isTouched === 'function') {\n return host.isTouched();\n }\n}\n\nexport async function shouldSuppressInternalValidation<T>(\n host: IxFormComponent<T>\n) {\n if (\n host.getAssociatedFormElement &&\n typeof host.getAssociatedFormElement === 'function'\n ) {\n const form = await host.getAssociatedFormElement();\n\n if (!form) {\n return false;\n }\n\n return form.noValidate;\n }\n\n return false;\n}\n\nexport function createClassMutationObserver(\n element: HTMLElement,\n callback: () => void,\n options?: {\n includeChildren?: boolean;\n }\n): ClassMutationObserver {\n const observer = new MutationObserver(callback);\n observer.observe(element, {\n subtree: options?.includeChildren,\n childList: options?.includeChildren,\n attributes: true,\n attributeFilter: ['class'],\n });\n\n return {\n destroy() {\n observer.disconnect();\n },\n };\n}\n\nexport type ValidationResultProperty =\n | 'isInvalid'\n | 'isInvalidByRequired'\n | 'isValid'\n | 'isInfo'\n | 'isWarning';\nexport type ValidationResults = Record<ValidationResultProperty, boolean>;\n\nfunction classListContains(\n hostElement: HTMLIxFormComponentElement<unknown>,\n className: string,\n includeChildren: boolean\n) {\n return (\n hostElement.classList.contains(`${className}`) ||\n (includeChildren ? !!hostElement.querySelector(`.${className}`) : false)\n );\n}\n\nexport function checkFieldClasses(\n hostElement: HTMLIxFormComponentElement<unknown>,\n includeChildren = false\n): ValidationResults {\n return {\n isInvalid:\n classListContains(hostElement, 'ix-invalid', includeChildren) ||\n classListContains(\n hostElement,\n 'ix-invalid--validity-invalid',\n includeChildren\n ),\n isInvalidByRequired: classListContains(\n hostElement,\n 'ix-invalid--required',\n includeChildren\n ),\n isValid: classListContains(hostElement, 'ix-valid', includeChildren),\n isInfo: classListContains(hostElement, 'ix-info', includeChildren),\n isWarning: classListContains(hostElement, 'ix-warning', includeChildren),\n };\n}\n\nexport function HookValidationLifecycle(options?: {\n includeChildren?: boolean;\n}) {\n return (proto: IxComponent, methodName: string) => {\n let checkIfRequiredFunction: (() => Promise<void>) | null;\n let classMutationObserver: ClassMutationObserver | null;\n const { componentWillLoad, disconnectedCallback, connectedCallback } =\n proto;\n\n proto.connectedCallback = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n\n checkIfRequiredFunction = async () => {\n const skipValidation = await shouldSuppressInternalValidation(host);\n if (skipValidation) {\n return;\n }\n\n if (host.hasValidValue && typeof host.hasValidValue === 'function') {\n const hasValue = await host.hasValidValue();\n const touched = await isTouched(host);\n\n if (host.required) {\n host.classList.toggle('ix-invalid--required', !hasValue && touched);\n } else {\n host.classList.remove('ix-invalid--required');\n }\n }\n\n if (\n host.getValidityState &&\n typeof host.getValidityState === 'function'\n ) {\n const validityState = await host.getValidityState();\n\n host.classList.toggle(\n `ix-invalid--validity-patternMismatch`,\n validityState.patternMismatch\n );\n }\n };\n\n host.addEventListener('checkedChange', checkIfRequiredFunction);\n host.addEventListener('valueChange', checkIfRequiredFunction);\n host.addEventListener('ixBlur', checkIfRequiredFunction);\n setTimeout(checkIfRequiredFunction);\n return connectedCallback?.call(this);\n };\n\n proto.componentWillLoad = function () {\n const host = getElement(\n this\n ) as unknown as HTMLIxFormComponentElement<unknown>;\n classMutationObserver = createClassMutationObserver(\n host,\n () => {\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n },\n options\n );\n const result = checkFieldClasses(host, options?.includeChildren);\n proto[methodName].call(this, result);\n return componentWillLoad?.call(this);\n };\n\n proto.disconnectedCallback = function () {\n const host = getElement(this);\n\n if (host && classMutationObserver) {\n classMutationObserver.destroy();\n classMutationObserver = null;\n }\n\n if (host && checkIfRequiredFunction) {\n host.removeEventListener('checkedChange', checkIfRequiredFunction);\n host.removeEventListener('valueChange', checkIfRequiredFunction);\n host.removeEventListener('ixBlur', checkIfRequiredFunction);\n checkIfRequiredFunction = null;\n }\n\n return disconnectedCallback?.call(this);\n };\n };\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.fc-BzxtQeW-.js","sources":["src/components/input/input.animation.ts","src/components/input/input.util.ts","src/components/input/input.fc.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { animate } from 'animejs';\nimport Animation from '../utils/animation';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n animate(input, {\n duration: Animation.defaultTime,\n easing: 'easeInOutSine',\n loop: 2,\n translateX: [\n {\n value: xMax * -1,\n },\n {\n value: xMax,\n },\n {\n value: xMax / -2,\n },\n {\n value: xMax / 2,\n },\n {\n value: 0,\n },\n ],\n });\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"],"names":["animate","Animation","shouldSuppressInternalValidation","convertToRemString","a11yBoolean","mutationObserver","createMutationObserver","h"],"mappings":";;;;;;;;;;AAAA;;;;;;;AAOG;AAIG,SAAU,UAAU,CAAC,KAAuB,EAAA;IAChD,MAAM,IAAI,GAAG,CAAC;IACdA,iBAAO,CAAC,KAAK,EAAE;QACb,QAAQ,EAAEC,mBAAS,CAAC,WAAW;AAC/B,QAAA,MAAM,EAAE,eAAe;AACvB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,UAAU,EAAE;AACV,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;A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,OAAO,GAGf,CAAC,KAAK,EAAE,QAAQ,KAAI;AACvB,IAAA,QACEA,OAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU,EAAA,EAC9CA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,KAAK,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAS,CAAA,EACzD,QAAQ,CACL;AAEV;AAEa,MAAA,SAAS,GAGjB,CAAC,KAAK,KAAI;AACb,IAAA,QACEA,OAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY,EAAA,EAClDA,OAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAA,CAAS,CACxD;AAEV;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.fc-DQBMrK9J.js","sources":["src/components/input/input.animation.ts","src/components/input/input.util.ts","src/components/input/input.fc.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { animate } from 'animejs';\nimport Animation from '../utils/animation';\n\nexport function shakeInput(input: HTMLInputElement) {\n const xMax = 5;\n animate(input, {\n duration: Animation.defaultTime,\n easing: 'easeInOutSine',\n loop: 2,\n translateX: [\n {\n value: xMax * -1,\n },\n {\n value: xMax,\n },\n {\n value: xMax / -2,\n },\n {\n value: xMax / 2,\n },\n {\n value: 0,\n },\n ],\n });\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;AAIG,SAAU,UAAU,CAAC,KAAuB,EAAA;IAChD,MAAM,IAAI,GAAG,CAAC;IACd,OAAO,CAAC,KAAK,EAAE;QACb,QAAQ,EAAE,SAAS,CAAC,WAAW;AAC/B,QAAA,MAAM,EAAE,eAAe;AACvB,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,UAAU,EAAE;AACV,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,IAAI,GAAG,EAAE;AACjB,aAAA;AACD,YAAA;gBACE,KAAK,EAAE,IAAI,GAAG,CAAC;AAChB,aAAA;AACD,YAAA;AACE,gBAAA,KAAK,EAAE,CAAC;AACT,aAAA;AACF,SAAA;AACF,KAAA,CAAC;AACJ;;ACnCA;;;;;;;AAOG;AAuBa,SAAA,mBAAmB,CACjC,GAA6B,EAC7B,MAAyB,EAAA;IAEzB,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB;AAC9D,IAAA,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;AAC5B,IAAA,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM;AAC1B,IAAA,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS;AAClC;AAEgB,SAAA,gBAAgB,CAC9B,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|
|
|
1
|
-
import{r as e,c as o,h as t,H as r,g as i}from"./p-CtoreFVF.js";import{N as s,v as d}from"./p-8HpPmDK_.js";const a=":host{--ix-dropdown-item-checked-color:var(--theme-color-primary);display:flex;flex-direction:row;position:relative;height:2.5rem;width:auto;overflow:hidden;cursor:pointer}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}@-moz-document url-prefix(){:host *{scrollbar-color:var(--theme-scrollbar-thumb--background) var(--theme-scrollbar-track--background);scrollbar-width:thin}}:host{}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host{}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host{}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host{}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .dropdown-item{all:unset;display:flex;flex-direction:row;align-items:center;position:relative;height:calc(100% - 2px);border:0.0625rem solid transparent;white-space:nowrap;width:calc(100% - 0.5rem - 1.5rem);padding:0 0.5rem;padding-right:1.5rem}:host .dropdown-item.no-checked-field{width:calc(100% - 1rem - 1.5rem);padding:0 1rem;padding-right:1.5rem}:host .dropdown-item:focus-visible{border-color:var(--theme-color-focus-bdr)}:host .dropdown-item-checked{display:flex;align-items:center;justify-content:center;position:relative;height:100%;width:1rem;min-width:1rem;margin-right:0.5rem;color:var(--ix-dropdown-item-checked-color)}:host .dropdown-item-icon{margin-right:0.5rem;color:var(--theme-color-std-text)}:host .dropdown-item-text{display:block;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:pre}:host .submenu-icon{margin-left:auto}:host(.icon-only) .dropdown-item-icon{margin-right:0px}:host(.icon-only) .dropdown-item-checked{display:none}:host(.icon-only) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(.submenu) .dropdown-item{width:calc(100% - 0.5rem - 0.5rem);padding:0 0.5rem;padding-right:0.5rem}:host(:not(.disabled):not(:disabled).hover),:host(:not(.disabled):not(:disabled):hover){background-color:var(--theme-ghost--background--hover)}:host(:not(.disabled):not(:disabled).active),:host(:not(.disabled):not(:disabled):active){background-color:var(--theme-ghost--background--active)}:host(.disabled){pointer-events:none;color:var(--theme-color-weak-text) !important}:host(.disabled) .dropdown-item-icon{color:var(--theme-color-weak-text) !important}";const n=class{constructor(t){e(this,t);this.itemClick=o(this,"itemClick",7);this.hover=false;this.disabled=false;this.checked=false;this.isSubMenu=false;this.suppressChecked=false}async emitItemClick(){this.itemClick.emit(this.hostElement)}async getDropdownItemElement(){return this.hostElement}isIconOnly(){return this.label===undefined&&this.hostElement.innerText===""&&this.icon!==undefined}render(){return t(r,{key:"4683b34a35d26f4cdce448ed24cdc5115f838fed",class:{hover:this.hover,"icon-only":this.isIconOnly(),disabled:this.disabled,submenu:this.isSubMenu},role:"listitem"},t("button",{key:"a655623c265f18e805a0f60a093dd4ac565ab35c",type:"button",tabIndex:0,class:{"dropdown-item":true,"no-checked-field":this.suppressChecked},onClick:()=>this.emitItemClick(),"aria-label":this.ariaLabelButton},!this.suppressChecked?t("div",{class:"dropdown-item-checked"},this.checked?t("ix-icon",{class:"checkmark",name:s,size:"16"}):null):null,this.icon?t("ix-icon",{class:"dropdown-item-icon",name:this.icon,"aria-label":this.ariaLabelIcon}):null,t("div",{key:"d88e90650387ce4dd0d440fe03bf21c19c785709",class:"dropdown-item-text"},this.label,t("slot",{key:"d892aabbb2e268d36c348b800c043d08f2ceef83"})),this.isSubMenu?t("ix-icon",{name:d,class:"submenu-icon"}):null))}get hostElement(){return i(this)}};n.style=a;export{n as ix_dropdown_item};
|
|
2
|
-
//# sourceMappingURL=p-0d621531.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["registerInstance","createEvent","h","Host","getElement","iconSingleCheck","iconChevronRightSmall","dropdownItemCss","DropdownItem","constructor","hostRef","this","itemClick","hover","disabled","checked","isSubMenu","suppressChecked","emitItemClick","emit","hostElement","getDropdownItemElement","isIconOnly","label","undefined","innerText","icon","render","key","class","submenu","role","type","tabIndex","onClick","ariaLabelButton","name","size","ariaLabelIcon","style"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,OAAQC,OAAWC,MAAkB,8BACzEC,OAAsBC,MAA6B,kBAEjE,MAAMC,EAAkB,8iFAExB,MAAMC,EAAe,MACjB,WAAAC,CAAYC,GACRV,EAAiBW,KAAMD,GACvBC,KAAKC,UAAYX,EAAYU,KAAM,YAAa,GAIhDA,KAAKE,MAAQ,MAIbF,KAAKG,SAAW,MAIhBH,KAAKI,QAAU,MAEfJ,KAAKK,UAAY,MAEjBL,KAAKM,gBAAkB,KAC3B,CAEA,mBAAMC,GACFP,KAAKC,UAAUO,KAAKR,KAAKS,YAC7B,CAEA,4BAAMC,GACF,OAAOV,KAAKS,WAChB,CACA,UAAAE,GACI,OAAQX,KAAKY,QAAUC,WACnBb,KAAKS,YAAYK,YAAc,IAC/Bd,KAAKe,OAASF,SACtB,CACA,MAAAG,GACI,OAAQzB,EAAEC,EAAM,CAAEyB,IAAK,2CAA4CC,MAAO,CAClEhB,MAAOF,KAAKE,MACZ,YAAaF,KAAKW,aAClBR,SAAUH,KAAKG,SACfgB,QAASnB,KAAKK,WACfe,KAAM,YAAc7B,EAAE,SAAU,CAAE0B,IAAK,2CAA4CI,KAAM,SAAUC,SAAU,EAAGJ,MAAO,CACtH,gBAAiB,KACjB,mBAAoBlB,KAAKM,iBAC1BiB,QAAS,IAAMvB,KAAKO,gBAAiB,aAAcP,KAAKwB,kBAAoBxB,KAAKM,gBAAmBf,EAAE,MAAO,CAAE2B,MAAO,yBAA2BlB,KAAKI,QAAWb,EAAE,UAAW,CAAE2B,MAAO,YAAaO,KAAM/B,EAAiBgC,KAAM,OAAW,MAAS,KAAM1B,KAAKe,KAA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