@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
|
@@ -70,7 +70,7 @@ const Col = class {
|
|
|
70
70
|
Col.Breakpoints = ['', 'sm', 'md', 'lg'];
|
|
71
71
|
Col.style = colCss;
|
|
72
72
|
|
|
73
|
-
const datePickerCss = ":host{display:block;position:relative}: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 .header{display:flex;align-items:center;justify-content:space-between}:host .disabled-item{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled);cursor:default}:host .selector{flex-basis:100%;display:flex;align-items:center;justify-content:center;padding:0 1rem}:host .selector .dropdown{color:var(--theme-menu-item--color);font-size:14px;line-height:20px}:host .selector .capitalize{text-transform:capitalize}:host .selector .month-dropdown-item{margin-left:4px;margin-right:4px}:host .selector .month-dropdown-item:focus-visible{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-btn--focus--outline-offset)}:host .selector .arrowYear{display:flex;position:relative;padding:0.75rem 2rem;align-items:center;cursor:pointer}:host .selector .arrowYear:hover{background-color:var(--theme-select-list-item--background--hover)}:host .selector .arrowYear.selected{background-color:var(--theme-select-list-item--background--selected)}:host .selector .arrowYear .arrowPosition{position:absolute;left:calc(1rem - 6px);top:calc(50% - 6px)}:host .selector .arrowYear .checkPosition{position:absolute;left:calc(1rem - 6px);top:calc(50% - 8px)}:host .selector .arrowYear .monthMargin{margin-left:10px}:host .wrapper{display:flex}:host .wrapper .overflow{overflow-y:scroll;max-height:250px}:host .grid{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(7, 40px);align-items:center;justify-items:center;justify-content:center;color:var(--theme-datepicker-today--color)}:host .grid--show-week-numbers{grid-template-columns:24px repeat(7, 40px)}:host .grid .calendar-item{position:relative;display:flex;justify-content:center;align-items:center;background-color:var(--theme-datepicker-day--background);border:1px solid var(--theme-datepicker-day--background);width:40px;height:40px;cursor:pointer}:host .grid .calendar-item:focus-visible{outline:1px solid var(--theme-color-focus-bdr);box-shadow:inset 0 0 0 1px var(--theme-color-inv-contrast-text);background-color:var(--theme-datepicker-day--background--selected);border:inset 1px solid var(--theme-datepicker-day--border-color--selected);color:var(--theme-datepicker-day--color--selected);font-size:14px;line-height:20px;letter-spacing:0}:host .grid .calendar-item.today{border:1px solid var(--theme-datepicker-today--border-color)}:host .grid .calendar-item.today:hover{background-color:var(--theme-datepicker-day--background--hover)}:host .grid .calendar-item.today:active{background-color:var(--theme-datepicker-day--background--active)}:host .grid .calendar-item.today.selected{box-shadow:inset 0 0 0 1px white}:host .grid .calendar-item.today.selected:hover{background-color:var(--theme-datepicker-day--background--selected-hover)}:host .grid .calendar-item.today.selected:active{background-color:var(--theme-datepicker-day--background--selected-active)}:host .grid .calendar-item.today.selected.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--selected-disabled);border:1px solid var(--theme-datepicker-day--background--selected-disabled);color:var(--theme-datepicker-day--color--selected-disabled)}:host .grid .calendar-item.today.range{background-color:var(--theme-datepicker-day--background--range);color:var(--theme-datepicker-day--color--range);border:1px solid var(--theme-datepicker-today--border-color--range);box-shadow:inset 0 0 0 1px white}:host .grid .calendar-item.today.range:hover{background-color:var(--theme-datepicker-day--background--range-hover);border:1px solid var(--theme-datepicker-today--border-color--range-hover)}:host .grid .calendar-item.today.range:active{background-color:var(--theme-datepicker-day--background--range-active);border:1px solid var(--theme-datepicker-today--border-color--range-active)}:host .grid .calendar-item.today.range.disabled{background-color:var(--theme-datepicker-day--background--range-disabled);color:var(--theme-datepicker-day--color--range-disabled);border:1px solid var(--theme-datepicker-today--border-color--range-disabled)}:host .grid .calendar-item.today.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled);cursor:default}:host .grid .calendar-item:hover{background-color:var(--theme-datepicker-day--background--hover)}:host .grid .calendar-item:active{background-color:var(--theme-datepicker-day--background--active)}:host .grid .calendar-item.selected{background-color:var(--theme-datepicker-day--background--selected);color:var(--theme-datepicker-day--color--selected);border:1px solid var(--theme-datepicker-day--background--selected);font-weight:var(--theme-font-weight-bold)}:host .grid .calendar-item.selected:hover{background-color:var(--theme-datepicker-day--background--selected-hover)}:host .grid .calendar-item.selected:active{background-color:var(--theme-datepicker-day--background--selected-active)}:host .grid .calendar-item.selected.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--selected-disabled);color:var(--theme-datepicker-day--color--selected-disabled)}:host .grid .calendar-item.range{background-color:var(--theme-datepicker-day--background--range);color:var(--theme-datepicker-day--color--range)}:host .grid .calendar-item.range:hover{background-color:var(--theme-datepicker-day--background--range-hover)}:host .grid .calendar-item.range:active{background-color:var(--theme-datepicker-day--background--range-active)}:host .grid .calendar-item.range.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--range-disabled);color:var(--theme-datepicker-day--color--range-disabled)}:host .grid .calendar-item.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled)}:host .grid .calendar-item.week-day{color:var(--theme-datepicker-weekday--color);font-size:var(--theme-ms-0);line-height:143%;border:none;background:none;cursor:initial}:host .grid .calendar-item.week-day .overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .grid .calendar-item.empty-day{border:none;background:none;cursor:initial}:host .grid .calendar-item.week-number{font-size:10px;line-height:14px;color:var(--theme-datepicker-weekday--color);border:none;background:none;cursor:initial;width:1.5rem}:host .button{display:flex;justify-content:flex-end;margin-top:1rem}:host .hidden{display:none}";
|
|
73
|
+
const datePickerCss = ":host{display:block;position:relative;max-width:21rem}: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 .header{display:flex;align-items:center;justify-content:space-between}:host .disabled-item{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled);cursor:default}:host .selector{flex-basis:100%;display:flex;align-items:center;justify-content:center;padding:0 1rem}:host .selector .dropdown{color:var(--theme-menu-item--color);font-size:14px;line-height:20px}:host .selector .capitalize{text-transform:capitalize}:host .selector .month-dropdown-item{margin-left:4px;margin-right:4px}:host .selector .month-dropdown-item:focus-visible{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-btn--focus--outline-offset)}:host .selector .arrowYear{display:flex;position:relative;padding:0.75rem 2rem;align-items:center;cursor:pointer}:host .selector .arrowYear:hover{background-color:var(--theme-select-list-item--background--hover)}:host .selector .arrowYear.selected{background-color:var(--theme-select-list-item--background--selected)}:host .selector .arrowYear .arrowPosition{position:absolute;left:calc(1rem - 6px);top:calc(50% - 6px)}:host .selector .arrowYear .checkPosition{position:absolute;left:calc(1rem - 6px);top:calc(50% - 8px)}:host .selector .arrowYear .monthMargin{margin-left:10px}:host .wrapper{display:flex}:host .wrapper .overflow{overflow-y:scroll;max-height:250px}:host .grid{display:grid;grid-template-columns:repeat(7, 40px);grid-template-rows:repeat(7, 40px);align-items:center;justify-items:center;justify-content:center;color:var(--theme-datepicker-today--color)}:host .grid--show-week-numbers{grid-template-columns:24px repeat(7, 40px)}:host .grid .calendar-item{position:relative;display:flex;justify-content:center;align-items:center;background-color:var(--theme-datepicker-day--background);border:1px solid var(--theme-datepicker-day--background);width:40px;height:40px;cursor:pointer}:host .grid .calendar-item:focus-visible{outline:1px solid var(--theme-color-focus-bdr);box-shadow:inset 0 0 0 1px var(--theme-color-inv-contrast-text);background-color:var(--theme-datepicker-day--background--selected);border:inset 1px solid var(--theme-datepicker-day--border-color--selected);color:var(--theme-datepicker-day--color--selected);font-size:14px;line-height:20px;letter-spacing:0}:host .grid .calendar-item.today{border:1px solid var(--theme-datepicker-today--border-color)}:host .grid .calendar-item.today:hover{background-color:var(--theme-datepicker-day--background--hover)}:host .grid .calendar-item.today:active{background-color:var(--theme-datepicker-day--background--active)}:host .grid .calendar-item.today.selected{box-shadow:inset 0 0 0 1px white}:host .grid .calendar-item.today.selected:hover{background-color:var(--theme-datepicker-day--background--selected-hover)}:host .grid .calendar-item.today.selected:active{background-color:var(--theme-datepicker-day--background--selected-active)}:host .grid .calendar-item.today.selected.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--selected-disabled);border:1px solid var(--theme-datepicker-day--background--selected-disabled);color:var(--theme-datepicker-day--color--selected-disabled)}:host .grid .calendar-item.today.range{background-color:var(--theme-datepicker-day--background--range);color:var(--theme-datepicker-day--color--range);border:1px solid var(--theme-datepicker-today--border-color--range);box-shadow:inset 0 0 0 1px white}:host .grid .calendar-item.today.range:hover{background-color:var(--theme-datepicker-day--background--range-hover);border:1px solid var(--theme-datepicker-today--border-color--range-hover)}:host .grid .calendar-item.today.range:active{background-color:var(--theme-datepicker-day--background--range-active);border:1px solid var(--theme-datepicker-today--border-color--range-active)}:host .grid .calendar-item.today.range.disabled{background-color:var(--theme-datepicker-day--background--range-disabled);color:var(--theme-datepicker-day--color--range-disabled);border:1px solid var(--theme-datepicker-today--border-color--range-disabled)}:host .grid .calendar-item.today.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled);cursor:default}:host .grid .calendar-item:hover{background-color:var(--theme-datepicker-day--background--hover)}:host .grid .calendar-item:active{background-color:var(--theme-datepicker-day--background--active)}:host .grid .calendar-item.selected{background-color:var(--theme-datepicker-day--background--selected);color:var(--theme-datepicker-day--color--selected);border:1px solid var(--theme-datepicker-day--background--selected);font-weight:var(--theme-font-weight-bold)}:host .grid .calendar-item.selected:hover{background-color:var(--theme-datepicker-day--background--selected-hover)}:host .grid .calendar-item.selected:active{background-color:var(--theme-datepicker-day--background--selected-active)}:host .grid .calendar-item.selected.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--selected-disabled);color:var(--theme-datepicker-day--color--selected-disabled)}:host .grid .calendar-item.range{background-color:var(--theme-datepicker-day--background--range);color:var(--theme-datepicker-day--color--range)}:host .grid .calendar-item.range:hover{background-color:var(--theme-datepicker-day--background--range-hover)}:host .grid .calendar-item.range:active{background-color:var(--theme-datepicker-day--background--range-active)}:host .grid .calendar-item.range.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--range-disabled);color:var(--theme-datepicker-day--color--range-disabled)}:host .grid .calendar-item.disabled{pointer-events:none;background-color:var(--theme-datepicker-day--background--disabled);color:var(--theme-datepicker-day--color--disabled)}:host .grid .calendar-item.week-day{color:var(--theme-datepicker-weekday--color);font-size:var(--theme-ms-0);line-height:143%;border:none;background:none;cursor:initial}:host .grid .calendar-item.week-day .overflow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .grid .calendar-item.empty-day{border:none;background:none;cursor:initial}:host .grid .calendar-item.week-number{font-size:10px;line-height:14px;color:var(--theme-datepicker-weekday--color);border:none;background:none;cursor:initial;width:1.5rem}:host .button{display:flex;justify-content:flex-end;margin-top:1rem}:host .hidden{display:none}";
|
|
74
74
|
|
|
75
75
|
/*
|
|
76
76
|
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
|
-
var validation = require('./validation-
|
|
4
|
+
var validation = require('./validation-DTmSqO2d.js');
|
|
5
5
|
|
|
6
6
|
const customFieldCss = ":host{display:block;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}";
|
|
7
7
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
var index$1 = require('./index-Dyz3z1FD.js');
|
|
5
5
|
var datetime = require('./datetime-Dvtv5O8f.js');
|
|
6
|
-
var input_fc = require('./input.fc-
|
|
7
|
-
var validation = require('./validation-
|
|
6
|
+
var input_fc = require('./input.fc-DrxRYq_G.js');
|
|
7
|
+
var validation = require('./validation-DTmSqO2d.js');
|
|
8
8
|
var makeRef = require('./make-ref-BaH6_YJk.js');
|
|
9
9
|
var pickerInput_util = require('./picker-input.util-DJNAVluZ.js');
|
|
10
10
|
require('./a11y-B_6chCvu.js');
|
|
@@ -259,15 +259,13 @@ const DateInput = class {
|
|
|
259
259
|
}
|
|
260
260
|
render() {
|
|
261
261
|
var _a;
|
|
262
|
-
const invalidText = this.isInputInvalid
|
|
263
|
-
|
|
264
|
-
: this.invalidText;
|
|
265
|
-
return (index.h(index.Host, { key: '011a0643000de99532a82efcecdcc48d20a817e1', class: {
|
|
262
|
+
const invalidText = validation.getValidationText(this.isInputInvalid, this.invalidText, this.i18nErrorDateUnparsable);
|
|
263
|
+
return (index.h(index.Host, { key: '4a7f986c62a82763e46faa0203a5b6ff82415aaf', class: {
|
|
266
264
|
disabled: this.disabled,
|
|
267
265
|
readonly: this.readonly,
|
|
268
|
-
} }, index.h("ix-field-wrapper", { key: '
|
|
266
|
+
} }, index.h("ix-field-wrapper", { key: 'c366d9ef3a538fd71e8d0f33d305e46da824421e', label: this.label, helperText: this.helperText, isInvalid: this.isInvalid, invalidText: invalidText, infoText: this.infoText, isInfo: this.isInfo, isWarning: this.isWarning, warningText: this.warningText, isValid: this.isValid, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, required: this.required, controlRef: this.inputElementRef }, this.renderInput()), index.h("ix-dropdown", { key: '6f10990b1e667f0e079f951d920707c15e24e50e', "data-testid": "date-dropdown", trigger: this.inputElementRef.waitForCurrent(), ref: this.dropdownElementRef, closeBehavior: "outside", suppressOverflowBehavior: true, show: this.show, onShowChanged: (event) => {
|
|
269
267
|
this.show = event.detail;
|
|
270
|
-
} }, index.h("ix-date-picker", { key: '
|
|
268
|
+
} }, index.h("ix-date-picker", { key: 'df14f590271c8177fa10360e72b0338088ed79be', ref: this.datepickerRef, format: this.format, locale: this.locale, singleSelection: true, from: (_a = this.from) !== null && _a !== void 0 ? _a : '', minDate: this.minDate, maxDate: this.maxDate, onDateChange: (event) => {
|
|
271
269
|
const { from } = event.detail;
|
|
272
270
|
this.onInput(from);
|
|
273
271
|
}, showWeekNumbers: this.showWeekNumbers, ariaLabelNextMonthButton: this.ariaLabelNextMonthButton, ariaLabelPreviousMonthButton: this.ariaLabelPreviousMonthButton, embedded: true }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-date-input.entry.cjs.js","sources":["src/components/date-input/date-input.scss?tag=ix-date-input&encapsulation=shadow","src/components/date-input/date-input.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 */\n@use 'mixins/shadow-dom/component';\n@use 'mixins/input';\n@use './../input/input.mixins.scss' as input-mixins;\n\n@include input-mixins.input-field;\n\n:host {\n display: inline-block;\n position: relative;\n\n @include component.ix-component;\n\n input {\n width: 100%;\n height: 100%;\n }\n\n .calendar-hidden {\n display: none;\n }\n}\n\n:host(.readonly) {\n input {\n pointer-events: none;\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 { iconCalendar } from '@siemens/ix-icons/icons';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { SlotEnd, SlotStart } from '../input/input.fc';\nimport {\n DisposableChangesAndVisibilityObservers,\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n handleSubmitOnEnterKeydown,\n} from '../input/input.util';\nimport {\n ClassMutationObserver,\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n createClassMutationObserver,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport type { DateInputValidityState } from './date-input.types';\nimport {\n closeDropdown as closeDropdownUtil,\n createValidityState,\n handleIconClick,\n openDropdown as openDropdownUtil,\n} from '../utils/input/picker-input.util';\n\n/**\n * @form-ready\n *\n * @slot start - Element will be displayed at the start of the input\n * @slot end - Element will be displayed at the end of the input\n */\n@Component({\n tag: 'ix-date-input',\n styleUrl: 'date-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DateInput implements IxInputFieldComponent<string | undefined> {\n @Element() hostElement!: HTMLIxDateInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * Name of the input element\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Placeholder of the input element\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * Value of the input element\n */\n @Prop({ reflect: true, mutable: true }) value?: string = '';\n\n @Watch('value') watchValuePropHandler(newValue: string) {\n this.onInput(newValue);\n }\n\n /**\n * The earliest date that can be selected by the date input/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 input/picker.\n * If not set there will be no restriction.\n */\n @Prop() maxDate = '';\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 /**\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 * Required attribute\n */\n @Prop() required?: boolean;\n\n /**\n * Helper text below the input field\n */\n @Prop() helperText?: string;\n\n /**\n * Label of the input field\n */\n @Prop() label?: string;\n\n /**\n * ARIA label for the calendar icon button\n * Will be set as aria-label on the nested HTML button element\n *\n * @since 3.2.0\n */\n @Prop() ariaLabelCalendarButton?: string;\n\n /**\n * Error text below the input field\n */\n @Prop({ reflect: true }) invalidText?: string;\n\n /**\n * Readonly attribute\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Disabled attribute\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Info text below the input field\n */\n @Prop() infoText?: string;\n\n /**\n * Warning text below the input field\n */\n @Prop() warningText?: string;\n\n /**\n * Valid text below the input field\n */\n @Prop() validText?: string;\n\n /**\n * Show text as tooltip\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * I18n string for the error message when the date is not parsable\n */\n @Prop({ attribute: 'i18n-error-date-unparsable' }) i18nErrorDateUnparsable =\n 'Date is not valid';\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 /**\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 * 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 * If false, pressing Enter will submit the form (if inside a form).\n * Set to true to suppress submit on Enter.\n */\n @Prop({ reflect: true }) suppressSubmitOnEnter: boolean = false;\n\n /**\n * Text alignment within the date input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.\n */\n @Prop() textAlignment: 'start' | 'end' = 'start';\n\n /**\n * Input change event.\n */\n @Event({ cancelable: false }) valueChange!: EventEmitter<string | undefined>;\n\n /**\n * Validation state change event.\n */\n @Event() validityStateChange!: EventEmitter<DateInputValidityState>;\n\n /** @internal */\n @Event() ixFocus!: EventEmitter<void>;\n\n /** @internal */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() show = false;\n @State() from?: string | null = null;\n @State() isInputInvalid = false;\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() focus = false;\n\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n\n private readonly datepickerRef = makeRef<HTMLIxDatePickerElement>();\n\n private readonly inputElementRef = makeRef<HTMLInputElement>();\n private readonly dropdownElementRef = makeRef<HTMLIxDropdownElement>();\n private classObserver?: ClassMutationObserver;\n private invalidReason?: string;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n updateFormInternalValue(value: string | undefined): void {\n if (value) {\n this.formInternals.setFormValue(value);\n } else {\n this.formInternals.setFormValue(null);\n }\n this.value = value;\n }\n\n connectedCallback(): void {\n this.classObserver = createClassMutationObserver(this.hostElement, () =>\n this.checkClassList()\n );\n\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n componentWillLoad(): void {\n this.onInput(this.value);\n if (this.isInputInvalid) {\n this.from = null;\n } else {\n this.watchValue();\n }\n\n this.checkClassList();\n this.updateFormInternalValue(this.value);\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputElementRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.classObserver?.destroy();\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n @Watch('value')\n watchValue() {\n this.from = this.value;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /** @internal */\n @Method()\n getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return Promise.resolve(this.formInternals.form);\n }\n\n async onInput(value: string | undefined) {\n this.value = value;\n if (!value) {\n this.valueChange.emit(value);\n return;\n }\n\n if (!this.format) {\n return;\n }\n\n const date = DateTime.fromFormat(value, this.format);\n const minDate = DateTime.fromFormat(this.minDate, this.format);\n const maxDate = DateTime.fromFormat(this.maxDate, this.format);\n\n this.isInputInvalid = !date.isValid || date < minDate || date > maxDate;\n\n if (this.isInputInvalid) {\n this.invalidReason = date.invalidReason || undefined;\n this.from = undefined;\n } else {\n this.updateFormInternalValue(value);\n this.closeDropdown();\n }\n\n this.valueChange.emit(value);\n }\n\n onCalenderClick(event: Event) {\n handleIconClick(\n event,\n this.show,\n () => this.openDropdown(),\n this.inputElementRef\n );\n }\n\n async openDropdown() {\n return openDropdownUtil(this.dropdownElementRef);\n }\n\n async closeDropdown() {\n return closeDropdownUtil(this.dropdownElementRef);\n }\n\n private checkClassList() {\n this.isInvalid = this.hostElement.classList.contains('ix-invalid');\n }\n\n private handleInputKeyDown(event: KeyboardEvent) {\n handleSubmitOnEnterKeydown(\n event,\n this.suppressSubmitOnEnter,\n this.formInternals.form\n );\n }\n\n private renderInput() {\n return (\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <input\n autoComplete=\"off\"\n class={{\n 'is-invalid': this.isInputInvalid,\n }}\n disabled={this.disabled}\n readOnly={this.readonly}\n readonly={this.readonly}\n required={this.required}\n ref={this.inputElementRef}\n type=\"text\"\n value={this.value ?? ''}\n placeholder={this.placeholder}\n name={this.name}\n onInput={(event) => {\n const target = event.target as HTMLInputElement;\n this.onInput(target.value);\n }}\n onClick={(event) => {\n if (this.show) {\n event.stopPropagation();\n event.preventDefault();\n }\n }}\n onFocus={async () => {\n this.openDropdown();\n this.ixFocus.emit();\n }}\n onBlur={() => {\n this.ixBlur.emit();\n this.touched = true;\n }}\n onKeyDown={(event) => this.handleInputKeyDown(event)}\n style={{\n textAlign: this.textAlignment,\n }}\n ></input>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n data-testid=\"open-calendar\"\n class={{ 'calendar-hidden': this.disabled || this.readonly }}\n variant=\"subtle-tertiary\"\n icon={iconCalendar}\n onClick={(event) => this.onCalenderClick(event)}\n aria-label={this.ariaLabelCalendarButton}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n );\n }\n\n @HookValidationLifecycle()\n hookValidationLifecycle({\n isInfo,\n isInvalid,\n isInvalidByRequired,\n isValid,\n isWarning,\n }: ValidationResults) {\n this.isInvalid = isInvalid || isInvalidByRequired || this.isInputInvalid;\n this.isInfo = isInfo;\n this.isValid = isValid;\n this.isWarning = isWarning;\n }\n\n @Watch('isInputInvalid')\n async onInputValidationChange() {\n const state = await this.getValidityState();\n this.validityStateChange.emit({\n patternMismatch: state.patternMismatch,\n invalidReason: this.invalidReason,\n });\n }\n\n /** @internal */\n @Method()\n getValidityState(): Promise<ValidityState> {\n return Promise.resolve(\n createValidityState(this.isInputInvalid, !!this.required, this.value)\n );\n }\n\n /**\n * Get the native input element\n */\n @Method()\n getNativeInputElement(): Promise<HTMLInputElement> {\n return this.inputElementRef.waitForCurrent();\n }\n\n /**\n * Focuses the input field\n */\n @Method()\n async focusInput(): Promise<void> {\n return (await this.getNativeInputElement()).focus();\n }\n\n /**\n * Returns whether the text field has been touched.\n * @internal\n */\n @Method()\n isTouched(): Promise<boolean> {\n return Promise.resolve(this.touched);\n }\n\n render() {\n const invalidText = this.isInputInvalid\n ? this.i18nErrorDateUnparsable\n : this.invalidText;\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n label={this.label}\n helperText={this.helperText}\n isInvalid={this.isInvalid}\n invalidText={invalidText}\n infoText={this.infoText}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n warningText={this.warningText}\n isValid={this.isValid}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n required={this.required}\n controlRef={this.inputElementRef}\n >\n {this.renderInput()}\n </ix-field-wrapper>\n <ix-dropdown\n data-testid=\"date-dropdown\"\n trigger={this.inputElementRef.waitForCurrent()}\n ref={this.dropdownElementRef}\n closeBehavior=\"outside\"\n suppressOverflowBehavior={true}\n show={this.show}\n onShowChanged={(event) => {\n this.show = event.detail;\n }}\n >\n <ix-date-picker\n ref={this.datepickerRef}\n format={this.format}\n locale={this.locale}\n singleSelection\n from={this.from ?? ''}\n minDate={this.minDate}\n maxDate={this.maxDate}\n onDateChange={(event) => {\n const { from } = event.detail;\n this.onInput(from);\n }}\n showWeekNumbers={this.showWeekNumbers}\n ariaLabelNextMonthButton={this.ariaLabelNextMonthButton}\n ariaLabelPreviousMonthButton={this.ariaLabelPreviousMonthButton}\n embedded\n ></ix-date-picker>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"names":["makeRef","createClassMutationObserver","addDisposableChangesAndVisibilityObservers","adjustPaddingForStartAndEnd","DateTime","handleIconClick","openDropdownUtil","closeDropdownUtil","handleSubmitOnEnterKeydown","h","SlotStart","SlotEnd","iconCalendar","createValidityState","Host","HookValidationLifecycle"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,4ieAA4ie;;ACAjke;;;;;;;AAOG;;;;;;;;;;;MAoDU,SAAS,GAAA,MAAA;AANtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;;AAoBE;;AAEG;AACqC,QAAA,IAAK,CAAA,KAAA,GAAY,EAAE;AAM3D;;;AAGG;AACK,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;AAEpB;;;AAGG;AACK,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;AAWpB;;;AAGG;AACK,QAAA,IAAM,CAAA,MAAA,GAAW,YAAY;AA8BrC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAsBjC;;AAEG;AACgD,QAAA,IAAuB,CAAA,uBAAA,GACxE,mBAAmB;AAErB;;;;AAIG;AACK,QAAA,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Ae,EACrC,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,4BAA4B,EAAE,IAAI,CAAC,4BAA4B,EAC/D,QAAQ,EACQ,IAAA,EAAA,CAAA,CACN,CACT;;;;;;;;;AAjHX,UAAA,CAAA;AADC,IAAAM,kCAAuB;CAYvB,EAAA,SAAA,CAAA,SAAA,EAAA,yBAAA,EAAA,IAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ix-date-input.entry.cjs.js","sources":["src/components/date-input/date-input.scss?tag=ix-date-input&encapsulation=shadow","src/components/date-input/date-input.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 */\n@use 'mixins/shadow-dom/component';\n@use 'mixins/input';\n@use './../input/input.mixins.scss' as input-mixins;\n\n@include input-mixins.input-field;\n\n:host {\n display: inline-block;\n position: relative;\n\n @include component.ix-component;\n\n input {\n width: 100%;\n height: 100%;\n }\n\n .calendar-hidden {\n display: none;\n }\n}\n\n:host(.readonly) {\n input {\n pointer-events: none;\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 { iconCalendar } from '@siemens/ix-icons/icons';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { SlotEnd, SlotStart } from '../input/input.fc';\nimport {\n DisposableChangesAndVisibilityObservers,\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n handleSubmitOnEnterKeydown,\n} from '../input/input.util';\nimport {\n ClassMutationObserver,\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n createClassMutationObserver,\n getValidationText,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport type { DateInputValidityState } from './date-input.types';\nimport {\n closeDropdown as closeDropdownUtil,\n createValidityState,\n handleIconClick,\n openDropdown as openDropdownUtil,\n} from '../utils/input/picker-input.util';\n\n/**\n * @form-ready\n *\n * @slot start - Element will be displayed at the start of the input\n * @slot end - Element will be displayed at the end of the input\n */\n@Component({\n tag: 'ix-date-input',\n styleUrl: 'date-input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class DateInput implements IxInputFieldComponent<string | undefined> {\n @Element() hostElement!: HTMLIxDateInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * Name of the input element\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Placeholder of the input element\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * Value of the input element\n */\n @Prop({ reflect: true, mutable: true }) value?: string = '';\n\n @Watch('value') watchValuePropHandler(newValue: string) {\n this.onInput(newValue);\n }\n\n /**\n * The earliest date that can be selected by the date input/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 input/picker.\n * If not set there will be no restriction.\n */\n @Prop() maxDate = '';\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 /**\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 * Required attribute\n */\n @Prop() required?: boolean;\n\n /**\n * Helper text below the input field\n */\n @Prop() helperText?: string;\n\n /**\n * Label of the input field\n */\n @Prop() label?: string;\n\n /**\n * ARIA label for the calendar icon button\n * Will be set as aria-label on the nested HTML button element\n *\n * @since 3.2.0\n */\n @Prop() ariaLabelCalendarButton?: string;\n\n /**\n * Error text below the input field\n */\n @Prop({ reflect: true }) invalidText?: string;\n\n /**\n * Readonly attribute\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Disabled attribute\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Info text below the input field\n */\n @Prop() infoText?: string;\n\n /**\n * Warning text below the input field\n */\n @Prop() warningText?: string;\n\n /**\n * Valid text below the input field\n */\n @Prop() validText?: string;\n\n /**\n * Show text as tooltip\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * I18n string for the error message when the date is not parsable\n */\n @Prop({ attribute: 'i18n-error-date-unparsable' }) i18nErrorDateUnparsable =\n 'Date is not valid';\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 /**\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 * 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 * If false, pressing Enter will submit the form (if inside a form).\n * Set to true to suppress submit on Enter.\n */\n @Prop({ reflect: true }) suppressSubmitOnEnter: boolean = false;\n\n /**\n * Text alignment within the date input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.\n */\n @Prop() textAlignment: 'start' | 'end' = 'start';\n\n /**\n * Input change event.\n */\n @Event({ cancelable: false }) valueChange!: EventEmitter<string | undefined>;\n\n /**\n * Validation state change event.\n */\n @Event() validityStateChange!: EventEmitter<DateInputValidityState>;\n\n /** @internal */\n @Event() ixFocus!: EventEmitter<void>;\n\n /** @internal */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() show = false;\n @State() from?: string | null = null;\n @State() isInputInvalid = false;\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() focus = false;\n\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n\n private readonly datepickerRef = makeRef<HTMLIxDatePickerElement>();\n\n private readonly inputElementRef = makeRef<HTMLInputElement>();\n private readonly dropdownElementRef = makeRef<HTMLIxDropdownElement>();\n private classObserver?: ClassMutationObserver;\n private invalidReason?: string;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n updateFormInternalValue(value: string | undefined): void {\n if (value) {\n this.formInternals.setFormValue(value);\n } else {\n this.formInternals.setFormValue(null);\n }\n this.value = value;\n }\n\n connectedCallback(): void {\n this.classObserver = createClassMutationObserver(this.hostElement, () =>\n this.checkClassList()\n );\n\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n componentWillLoad(): void {\n this.onInput(this.value);\n if (this.isInputInvalid) {\n this.from = null;\n } else {\n this.watchValue();\n }\n\n this.checkClassList();\n this.updateFormInternalValue(this.value);\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputElementRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.classObserver?.destroy();\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n @Watch('value')\n watchValue() {\n this.from = this.value;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /** @internal */\n @Method()\n getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return Promise.resolve(this.formInternals.form);\n }\n\n async onInput(value: string | undefined) {\n this.value = value;\n if (!value) {\n this.valueChange.emit(value);\n return;\n }\n\n if (!this.format) {\n return;\n }\n\n const date = DateTime.fromFormat(value, this.format);\n const minDate = DateTime.fromFormat(this.minDate, this.format);\n const maxDate = DateTime.fromFormat(this.maxDate, this.format);\n\n this.isInputInvalid = !date.isValid || date < minDate || date > maxDate;\n\n if (this.isInputInvalid) {\n this.invalidReason = date.invalidReason || undefined;\n this.from = undefined;\n } else {\n this.updateFormInternalValue(value);\n this.closeDropdown();\n }\n\n this.valueChange.emit(value);\n }\n\n onCalenderClick(event: Event) {\n handleIconClick(\n event,\n this.show,\n () => this.openDropdown(),\n this.inputElementRef\n );\n }\n\n async openDropdown() {\n return openDropdownUtil(this.dropdownElementRef);\n }\n\n async closeDropdown() {\n return closeDropdownUtil(this.dropdownElementRef);\n }\n\n private checkClassList() {\n this.isInvalid = this.hostElement.classList.contains('ix-invalid');\n }\n\n private handleInputKeyDown(event: KeyboardEvent) {\n handleSubmitOnEnterKeydown(\n event,\n this.suppressSubmitOnEnter,\n this.formInternals.form\n );\n }\n\n private renderInput() {\n return (\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <input\n autoComplete=\"off\"\n class={{\n 'is-invalid': this.isInputInvalid,\n }}\n disabled={this.disabled}\n readOnly={this.readonly}\n readonly={this.readonly}\n required={this.required}\n ref={this.inputElementRef}\n type=\"text\"\n value={this.value ?? ''}\n placeholder={this.placeholder}\n name={this.name}\n onInput={(event) => {\n const target = event.target as HTMLInputElement;\n this.onInput(target.value);\n }}\n onClick={(event) => {\n if (this.show) {\n event.stopPropagation();\n event.preventDefault();\n }\n }}\n onFocus={async () => {\n this.openDropdown();\n this.ixFocus.emit();\n }}\n onBlur={() => {\n this.ixBlur.emit();\n this.touched = true;\n }}\n onKeyDown={(event) => this.handleInputKeyDown(event)}\n style={{\n textAlign: this.textAlignment,\n }}\n ></input>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n data-testid=\"open-calendar\"\n class={{ 'calendar-hidden': this.disabled || this.readonly }}\n variant=\"subtle-tertiary\"\n icon={iconCalendar}\n onClick={(event) => this.onCalenderClick(event)}\n aria-label={this.ariaLabelCalendarButton}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n );\n }\n\n @HookValidationLifecycle()\n hookValidationLifecycle({\n isInfo,\n isInvalid,\n isInvalidByRequired,\n isValid,\n isWarning,\n }: ValidationResults) {\n this.isInvalid = isInvalid || isInvalidByRequired || this.isInputInvalid;\n this.isInfo = isInfo;\n this.isValid = isValid;\n this.isWarning = isWarning;\n }\n\n @Watch('isInputInvalid')\n async onInputValidationChange() {\n const state = await this.getValidityState();\n this.validityStateChange.emit({\n patternMismatch: state.patternMismatch,\n invalidReason: this.invalidReason,\n });\n }\n\n /** @internal */\n @Method()\n getValidityState(): Promise<ValidityState> {\n return Promise.resolve(\n createValidityState(this.isInputInvalid, !!this.required, this.value)\n );\n }\n\n /**\n * Get the native input element\n */\n @Method()\n getNativeInputElement(): Promise<HTMLInputElement> {\n return this.inputElementRef.waitForCurrent();\n }\n\n /**\n * Focuses the input field\n */\n @Method()\n async focusInput(): Promise<void> {\n return (await this.getNativeInputElement()).focus();\n }\n\n /**\n * Returns whether the text field has been touched.\n * @internal\n */\n @Method()\n isTouched(): Promise<boolean> {\n return Promise.resolve(this.touched);\n }\n\n render() {\n const invalidText = getValidationText(\n this.isInputInvalid,\n this.invalidText,\n this.i18nErrorDateUnparsable\n );\n\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n label={this.label}\n helperText={this.helperText}\n isInvalid={this.isInvalid}\n invalidText={invalidText}\n infoText={this.infoText}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n warningText={this.warningText}\n isValid={this.isValid}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n required={this.required}\n controlRef={this.inputElementRef}\n >\n {this.renderInput()}\n </ix-field-wrapper>\n <ix-dropdown\n data-testid=\"date-dropdown\"\n trigger={this.inputElementRef.waitForCurrent()}\n ref={this.dropdownElementRef}\n closeBehavior=\"outside\"\n suppressOverflowBehavior={true}\n show={this.show}\n onShowChanged={(event) => {\n this.show = event.detail;\n }}\n >\n <ix-date-picker\n ref={this.datepickerRef}\n format={this.format}\n locale={this.locale}\n singleSelection\n from={this.from ?? ''}\n minDate={this.minDate}\n maxDate={this.maxDate}\n onDateChange={(event) => {\n const { from } = event.detail;\n this.onInput(from);\n }}\n showWeekNumbers={this.showWeekNumbers}\n ariaLabelNextMonthButton={this.ariaLabelNextMonthButton}\n ariaLabelPreviousMonthButton={this.ariaLabelPreviousMonthButton}\n embedded\n ></ix-date-picker>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"names":["makeRef","createClassMutationObserver","addDisposableChangesAndVisibilityObservers","adjustPaddingForStartAndEnd","DateTime","handleIconClick","openDropdownUtil","closeDropdownUtil","handleSubmitOnEnterKeydown","h","SlotStart","SlotEnd","iconCalendar","createValidityState","getValidationText","Host","HookValidationLifecycle"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,YAAY,GAAG,4ieAA4ie;;ACAjke;;;;;;;AAOG;;;;;;;;;;;MAqDU,SAAS,GAAA,MAAA;AANtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;;;;AAoBE;;AAEG;AACqC,QAAA,IAAK,CAAA,KAAA,GAAY,EAAE;AAM3D;;;AAGG;AACK,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;AAEpB;;;AAGG;AACK,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE;AAWpB;;;AAGG;AACK,QAAA,IAAM,CAAA,MAAA,GAAW,YAAY;AA8BrC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAsBjC;;AAEG;AACgD,QAAA,IAAuB,CAAA,uBAAA,GACxE,mBAAmB;AAErB;;;;AAIG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;AAE/B;;;AAGG;AACK,QAAA,IAAc,CAAA,cAAA,GAAG,CAAC;AA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AAE,IAAI,CAAC,4BAA4B,EAC/D,QAAQ,EACQ,IAAA,EAAA,CAAA,CACN,CACT;;;;;;;;;AAnHX,UAAA,CAAA;AADC,IAAAO,kCAAuB;CAYvB,EAAA,SAAA,CAAA,SAAA,EAAA,yBAAA,EAAA,IAAA,CAAA;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
|
|
5
|
-
const datetimePickerCss = ":host{display:block;background-color:var(--theme-menu--background);border-radius:4px;position:relative;width:-moz-min-content;width:min-content}: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 ix-layout-grid{border-radius:0.25rem;box-shadow:var(--theme-shadow-4)}:host ix-time-picker{width:100%}:host .no-padding{padding:0}:host ix-col{display:flex;flex-direction:column;padding:0}:host .flex{display:flex;justify-content:center;flex-direction:column}@media (min-width: 576px){:host{min-width:-moz-max-content;min-width:max-content}:host .btn-select-date-container{display:inline-flex;flex-grow:1}:host .btn-select-date-container ix-button{margin-left:auto;margin-top:auto}:host .min-width{width:-moz-min-content;width:min-content}:host ix-time-picker{width:initial}}:host .individual{box-shadow:none;border:none}:host .btn-select-date-container{padding:1rem}@media (max-width: 576px){:host .btn-select-date-container .btn-select-date{width:100%}}
|
|
5
|
+
const datetimePickerCss = ":host{display:block;background-color:var(--theme-menu--background);border-radius:4px;position:relative;width:-moz-min-content;width:min-content}: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 ix-layout-grid{border-radius:0.25rem;box-shadow:var(--theme-shadow-4)}:host ix-time-picker{width:100%}:host .no-padding{padding:0}:host ix-col{display:flex;flex-direction:column;padding:0}:host .flex{display:flex;justify-content:center;flex-direction:column}:host .row-separator,:host .col-separator{border-bottom:0.0625rem solid var(--theme-datepicker-separator--background)}:host .col-separator{border-right:none}@media (min-width: 576px){:host{min-width:-moz-max-content;min-width:max-content}:host .btn-select-date-container{display:inline-flex;flex-grow:1}:host .btn-select-date-container ix-button{margin-left:auto;margin-top:auto}:host .min-width{width:-moz-min-content;width:min-content}:host ix-time-picker{width:initial}:host .col-separator{border-right:0.0625rem solid var(--theme-datepicker-separator--background);border-bottom:none}}:host .individual{box-shadow:none;border:none}:host .btn-select-date-container{padding:1rem}@media (max-width: 576px){:host .btn-select-date-container .btn-select-date{width:100%}}";
|
|
6
6
|
|
|
7
7
|
const DatetimePicker = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-datetime-picker.entry.cjs.js","sources":["src/components/datetime-picker/datetime-picker.scss?tag=ix-datetime-picker&encapsulation=shadow","src/components/datetime-picker/datetime-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\n:host {\n display: block;\n background-color: var(--theme-menu--background);\n border-radius: 4px;\n position: relative;\n width: min-content;\n\n @include component.ix-component;\n\n ix-layout-grid {\n border-radius: 0.25rem;\n box-shadow: var(--theme-shadow-4);\n }\n\n ix-time-picker {\n width: 100%;\n }\n\n .no-padding {\n padding: 0;\n }\n\n ix-col {\n display: flex;\n flex-direction: column;\n padding: 0;\n }\n\n .flex {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n @media (min-width: 576px) {\n min-width: max-content;\n\n .btn-select-date-container {\n display: inline-flex;\n flex-grow: 1;\n\n ix-button {\n margin-left: auto;\n margin-top: auto;\n }\n }\n\n .min-width {\n width: min-content;\n }\n\n ix-time-picker {\n width: initial;\n }\n }\n\n .individual {\n box-shadow: none;\n border: none;\n }\n\n .btn-select-date-container {\n padding: vars.$default-space;\n\n @media (max-width: 576px) {\n & .btn-select-date {\n width: 100%;\n }\n }\n }\n\n .row-separator {\n border-bottom: 1px solid var(--theme-datepicker-separator--background);\n }\n\n .col-separator {\n border-right: 1px solid var(--theme-datepicker-separator--background);\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 { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { IxDatePickerComponent } from '../date-picker/date-picker-component';\nimport type { DateChangeEvent } from '../date-picker/date-picker.events';\nimport type {\n DateTimeDateChangeEvent,\n DateTimeSelectEvent,\n} from './datetime-picker.types';\n\n@Component({\n tag: 'ix-datetime-picker',\n styleUrl: 'datetime-picker.scss',\n shadow: true,\n})\nexport class DatetimePicker\n implements Omit<IxDatePickerComponent, 'corners' | 'format'>\n{\n /**\n * If true disables date range selection (from/to).\n */\n @Prop() singleSelection = false;\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?: string;\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?: string;\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() dateFormat: string = 'yyyy/LL/dd';\n\n /**\n * Time format string.\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n */\n @Prop() timeFormat: string = 'HH:mm:ss';\n\n /**\n * The selected starting date. If the picker is not in range mode this is the selected date.\n * Format has to match the `format` property.\n */\n @Prop() from?: string;\n\n /**\n * The selected end date. If the the picker is not in range mode this property has no impact.\n * Format has to match the `format` property.\n */\n @Prop() to?: string;\n\n /**\n * Select time with format string\n */\n @Prop() time?: string;\n\n /**\n * Show time reference input\n * Time reference is default aligned with @see {this.timeFormat}\n */\n @Prop() showTimeReference: boolean = false;\n\n /**\n * Set time reference\n */\n @Prop() timeReference?: 'AM' | 'PM';\n\n /**\n * Text of date select button\n */\n @Prop({ attribute: 'i18n-done' }) i18nDone: string = 'Done';\n\n /**\n * Top label of time picker\n *\n * @since 3.0.0\n */\n @Prop({ attribute: 'i18n-time' }) i18nTime: string = 'Time';\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 * Format of time string\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n */\n @Prop() locale?: string;\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 /**\n * Time change\n */\n @Event() timeChange!: EventEmitter<string>;\n\n /**\n * Date change\n */\n @Event() dateChange!: EventEmitter<DateTimeDateChangeEvent>;\n\n /**\n * Datetime selection event is fired after confirm button is pressed\n */\n @Event() dateSelect!: EventEmitter<DateTimeSelectEvent>;\n\n private datePickerElement?: HTMLIxDatePickerElement;\n private timePickerElement?: HTMLIxTimePickerElement;\n\n private async onDone() {\n const date = await this.datePickerElement?.getCurrentDate();\n const time = await this.timePickerElement?.getCurrentTime();\n\n this.dateSelect.emit({\n from: date?.from ?? '',\n to: date?.to ?? '',\n time: time ?? '',\n });\n }\n\n private async onDateChange(event: CustomEvent<string | DateChangeEvent>) {\n event.preventDefault();\n event.stopPropagation();\n\n const { detail: date } = event;\n this.dateChange.emit(date);\n }\n\n private async onTimeChange(event: CustomEvent<string>) {\n event.preventDefault();\n event.stopPropagation();\n\n const { detail: time } = event;\n this.timeChange.emit(time);\n }\n\n render() {\n return (\n <Host>\n <ix-layout-grid class=\"no-padding\">\n <ix-row class=\"row-separator\">\n <ix-col class=\"col-separator\">\n <ix-date-picker\n ref={(ref) => (this.datePickerElement = ref)}\n corners=\"left\"\n singleSelection={this.singleSelection}\n onDateChange={(event) => this.onDateChange(event)}\n from={this.from}\n to={this.to}\n format={this.dateFormat}\n minDate={this.minDate}\n maxDate={this.maxDate}\n weekStartIndex={this.weekStartIndex}\n embedded\n locale={this.locale}\n showWeekNumbers={this.showWeekNumbers}\n ariaLabelPreviousMonthButton={this.ariaLabelPreviousMonthButton}\n ariaLabelNextMonthButton={this.ariaLabelNextMonthButton}\n ></ix-date-picker>\n </ix-col>\n\n <ix-col>\n <ix-time-picker\n class=\"min-width\"\n ref={(ref) => (this.timePickerElement = ref)}\n embedded\n dateTimePickerAppearance={true}\n onTimeChange={(event) => this.onTimeChange(event)}\n format={this.timeFormat}\n time={this.time}\n ></ix-time-picker>\n </ix-col>\n </ix-row>\n <ix-row>\n <ix-col>\n <div class=\"btn-select-date-container\">\n <ix-button\n class=\"btn-select-date\"\n onClick={() => this.onDone()}\n >\n {this.i18nDone}\n </ix-button>\n </div>\n </ix-col>\n </ix-row>\n </ix-layout-grid>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,m1DAAm1D;;MCsBh2D,cAAc,GAAA,MAAA;AAL3B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAQE;;AAEG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;AAc/B;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,YAAY;AAEzC;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,UAAU;AAmBvC;;;AAGG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;AAO1C;;AAEG;AAC+B,QAAA,IAAQ,CAAA,QAAA,GAAW,MAAM;AAE3D;;;;AAIG;AAC+B,QAAA,IAAQ,CAAA,QAAA,GAAW,MAAM;AAc3D;;;AAGG;AACK,QAAA,IAAc,CAAA,cAAA,GAAG,CAAC;AAQ1B;;;;AAIG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;AAoGhC;AAhFS,IAAA,MAAM,MAAM,GAAA;;AAClB,QAAA,MAAM,IAAI,GAAG,OAAM,CAAA,EAAA,GAAA,IAAI,CAAC,iBAAiB,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,cAAc,EAAE,CAAA;AAC3D,QAAA,MAAM,IAAI,GAAG,OAAM,CAAA,EAAA,GAAA,IAAI,CAAC,iBAAiB,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,cAAc,EAAE,CAAA;AAE3D,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACnB,YAAA,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EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,2BAA2B,EAAA,EACpCA,OACE,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAE3B,EAAA,IAAI,CAAC,QAAQ,CACJ,CACR,CACC,CACF,CACM,CACZ;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ix-datetime-picker.entry.cjs.js","sources":["src/components/datetime-picker/datetime-picker.scss?tag=ix-datetime-picker&encapsulation=shadow","src/components/datetime-picker/datetime-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\n:host {\n display: block;\n background-color: var(--theme-menu--background);\n border-radius: 4px;\n position: relative;\n width: min-content;\n\n @include component.ix-component;\n\n ix-layout-grid {\n border-radius: 0.25rem;\n box-shadow: var(--theme-shadow-4);\n }\n\n ix-time-picker {\n width: 100%;\n }\n\n .no-padding {\n padding: 0;\n }\n\n ix-col {\n display: flex;\n flex-direction: column;\n padding: 0;\n }\n\n .flex {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n .row-separator,\n .col-separator {\n border-bottom: 0.0625rem solid var(--theme-datepicker-separator--background);\n }\n\n .col-separator {\n border-right: none;\n }\n\n @media (min-width: 576px) {\n min-width: max-content;\n\n .btn-select-date-container {\n display: inline-flex;\n flex-grow: 1;\n\n ix-button {\n margin-left: auto;\n margin-top: auto;\n }\n }\n\n .min-width {\n width: min-content;\n }\n\n ix-time-picker {\n width: initial;\n }\n\n .col-separator {\n border-right: 0.0625rem solid\n var(--theme-datepicker-separator--background);\n border-bottom: none;\n }\n }\n\n .individual {\n box-shadow: none;\n border: none;\n }\n\n .btn-select-date-container {\n padding: vars.$default-space;\n\n @media (max-width: 576px) {\n & .btn-select-date {\n width: 100%;\n }\n }\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 { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { IxDatePickerComponent } from '../date-picker/date-picker-component';\nimport type { DateChangeEvent } from '../date-picker/date-picker.events';\nimport type {\n DateTimeDateChangeEvent,\n DateTimeSelectEvent,\n} from './datetime-picker.types';\n\n@Component({\n tag: 'ix-datetime-picker',\n styleUrl: 'datetime-picker.scss',\n shadow: true,\n})\nexport class DatetimePicker\n implements Omit<IxDatePickerComponent, 'corners' | 'format'>\n{\n /**\n * If true disables date range selection (from/to).\n */\n @Prop() singleSelection = false;\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?: string;\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?: string;\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() dateFormat: string = 'yyyy/LL/dd';\n\n /**\n * Time format string.\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n */\n @Prop() timeFormat: string = 'HH:mm:ss';\n\n /**\n * The selected starting date. If the picker is not in range mode this is the selected date.\n * Format has to match the `format` property.\n */\n @Prop() from?: string;\n\n /**\n * The selected end date. If the the picker is not in range mode this property has no impact.\n * Format has to match the `format` property.\n */\n @Prop() to?: string;\n\n /**\n * Select time with format string\n */\n @Prop() time?: string;\n\n /**\n * Show time reference input\n * Time reference is default aligned with @see {this.timeFormat}\n */\n @Prop() showTimeReference: boolean = false;\n\n /**\n * Set time reference\n */\n @Prop() timeReference?: 'AM' | 'PM';\n\n /**\n * Text of date select button\n */\n @Prop({ attribute: 'i18n-done' }) i18nDone: string = 'Done';\n\n /**\n * Top label of time picker\n *\n * @since 3.0.0\n */\n @Prop({ attribute: 'i18n-time' }) i18nTime: string = 'Time';\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 * Format of time string\n * See {@link https://moment.github.io/luxon/#/formatting?id=table-of-tokens} for all available tokens.\n */\n @Prop() locale?: string;\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 /**\n * Time change\n */\n @Event() timeChange!: EventEmitter<string>;\n\n /**\n * Date change\n */\n @Event() dateChange!: EventEmitter<DateTimeDateChangeEvent>;\n\n /**\n * Datetime selection event is fired after confirm button is pressed\n */\n @Event() dateSelect!: EventEmitter<DateTimeSelectEvent>;\n\n private datePickerElement?: HTMLIxDatePickerElement;\n private timePickerElement?: HTMLIxTimePickerElement;\n\n private async onDone() {\n const date = await this.datePickerElement?.getCurrentDate();\n const time = await this.timePickerElement?.getCurrentTime();\n\n this.dateSelect.emit({\n from: date?.from ?? '',\n to: date?.to ?? '',\n time: time ?? '',\n });\n }\n\n private async onDateChange(event: CustomEvent<string | DateChangeEvent>) {\n event.preventDefault();\n event.stopPropagation();\n\n const { detail: date } = event;\n this.dateChange.emit(date);\n }\n\n private async onTimeChange(event: CustomEvent<string>) {\n event.preventDefault();\n event.stopPropagation();\n\n const { detail: time } = event;\n this.timeChange.emit(time);\n }\n\n render() {\n return (\n <Host>\n <ix-layout-grid class=\"no-padding\">\n <ix-row class=\"row-separator\">\n <ix-col class=\"col-separator\">\n <ix-date-picker\n ref={(ref) => (this.datePickerElement = ref)}\n corners=\"left\"\n singleSelection={this.singleSelection}\n onDateChange={(event) => this.onDateChange(event)}\n from={this.from}\n to={this.to}\n format={this.dateFormat}\n minDate={this.minDate}\n maxDate={this.maxDate}\n weekStartIndex={this.weekStartIndex}\n embedded\n locale={this.locale}\n showWeekNumbers={this.showWeekNumbers}\n ariaLabelPreviousMonthButton={this.ariaLabelPreviousMonthButton}\n ariaLabelNextMonthButton={this.ariaLabelNextMonthButton}\n ></ix-date-picker>\n </ix-col>\n\n <ix-col>\n <ix-time-picker\n class=\"min-width\"\n ref={(ref) => (this.timePickerElement = ref)}\n embedded\n dateTimePickerAppearance={true}\n onTimeChange={(event) => this.onTimeChange(event)}\n format={this.timeFormat}\n time={this.time}\n ></ix-time-picker>\n </ix-col>\n </ix-row>\n <ix-row>\n <ix-col>\n <div class=\"btn-select-date-container\">\n <ix-button\n class=\"btn-select-date\"\n onClick={() => this.onDone()}\n >\n {this.i18nDone}\n </ix-button>\n </div>\n </ix-col>\n </ix-row>\n </ix-layout-grid>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,86DAA86D;;MCsB37D,cAAc,GAAA,MAAA;AAL3B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;AAQE;;AAEG;AACK,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;AAc/B;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,YAAY;AAEzC;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,UAAU;AAmBvC;;;AAGG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAY,KAAK;AAO1C;;AAEG;AAC+B,QAAA,IAAQ,CAAA,QAAA,GAAW,MAAM;AAE3D;;;;AAIG;AAC+B,QAAA,IAAQ,CAAA,QAAA,GAAW,MAAM;AAc3D;;;AAGG;AACK,QAAA,IAAc,CAAA,cAAA,GAAG,CAAC;AAQ1B;;;;AAIG;AACK,QAAA,IAAe,C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ACjB,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,iBAAiB,GAAG,GAAG,CAAC,EAC5C,QAAQ,EACR,IAAA,EAAA,wBAAwB,EAAE,IAAI,EAC9B,YAAY,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EACjD,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,EACC,CAAA,CACX,CACF,EACTA,OAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACEA,OAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACEA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,2BAA2B,EAAA,EACpCA,OACE,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,iBAAiB,EACvB,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAE3B,EAAA,IAAI,CAAC,QAAQ,CACJ,CACR,CACC,CACF,CACM,CACZ;;;;;;;"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
var index$1 = require('./index-Dyz3z1FD.js');
|
|
5
5
|
var makeRef = require('./make-ref-BaH6_YJk.js');
|
|
6
|
+
var a11y = require('./a11y-B_6chCvu.js');
|
|
6
7
|
|
|
7
8
|
const dropdownButtonCss = ":host{display:inline-block;position:relative;height:2rem;width:auto}: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 .hide{display:none}:host .dropdown-button{display:block;position:relative;width:100%;height:100%}:host .dropdown-button>ix-button{width:100%;height:100%}:host .dropdown-button .button-label{margin-right:auto;min-width:0px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .dropdown-button .dropdown-icon{margin-right:0.25rem}:host .triangle{position:absolute;margin-inline-start:1.5625rem;margin-block-start:-0.4375rem;border-right:0 solid transparent;border-left:4px solid transparent;border-top:0 solid transparent;border-bottom:4px solid;color:var(--theme-btn-primary--color)}:host .triangle.primary{color:var(--theme-btn-primary--color)}:host .triangle.secondary{color:var(--theme-btn-secondary--color)}:host .triangle.tertiary{color:var(--theme-btn-tertiary--color)}:host .triangle.primary.disabled{color:var(--theme-btn-primary--color--disabled)}:host .triangle.secondary.disabled{color:var(--theme-btn-secondary--color--disabled)}:host .triangle.tertiary.disabled{color:var(--theme-btn-tertiary--color--disabled)}:host .triangle.subtle-primary{color:var(--theme-btn-subtle-primary--color)}:host .triangle.subtle-secondary{color:var(--theme-btn-subtle-secondary--color)}:host .triangle.subtle-tertiary{color:var(--theme-btn-subtle-tertiary--color)}:host .triangle.subtle-primary.disabled{color:var(--theme-btn-subtle-primary--color--disabled)}:host .triangle.subtle-secondary.disabled{color:var(--theme-btn-subtle-secondary--color--disabled)}:host .triangle.subtle-tertiary.disabled{color:var(--theme-btn-subtle-tertiary--color--disabled)}:host .triangle.danger-primary{color:var(--theme-btn-danger-primary--color)}:host .triangle.danger-secondary{color:var(--theme-btn-danger-secondary--color)}:host .triangle.danger-tertiary{color:var(--theme-btn-danger-tertiary--color)}:host .triangle.danger-primary.disabled{color:var(--theme-btn-danger-primary--color--disabled)}:host .triangle.danger-secondary.disabled{color:var(--theme-btn-danger-secondary--color--disabled)}:host .triangle.danger-tertiary.disabled{color:var(--theme-btn-danger-tertiary--color--disabled)}:host .content{display:flex;align-items:center}:host(.disabled){pointer-events:none}";
|
|
8
9
|
|
|
@@ -24,6 +25,9 @@ const DropdownButton = class {
|
|
|
24
25
|
this.dropdownShow = false;
|
|
25
26
|
this.dropdownAnchor = makeRef.makeRef();
|
|
26
27
|
this.onDropdownShowChanged = (event) => {
|
|
28
|
+
if (this.disabled && event.detail) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
27
31
|
this.dropdownShow = event.detail;
|
|
28
32
|
};
|
|
29
33
|
}
|
|
@@ -36,11 +40,11 @@ const DropdownButton = class {
|
|
|
36
40
|
} }));
|
|
37
41
|
}
|
|
38
42
|
render() {
|
|
39
|
-
return (index.h(index.Host, { key: '
|
|
43
|
+
return (index.h(index.Host, { key: '8e8bd476bd9a3dccfbd21fe10a10046f725d6e59', "aria-disabled": a11y.a11yBoolean(this.disabled), class: {
|
|
40
44
|
disabled: this.disabled,
|
|
41
|
-
}, ref: this.dropdownAnchor }, index.h("div", { key: '
|
|
45
|
+
}, ref: this.dropdownAnchor }, index.h("div", { key: '0fa67ef9f3f779316882f38b17099394f0e99e04', class: "dropdown-button" }, this.label ? (index.h("ix-button", { variant: this.variant, disabled: this.disabled, alignment: "start", ariaLabel: this.ariaLabelDropdownButton, tabIndex: this.disabled ? -1 : 0 }, index.h("div", { class: 'content' }, this.icon ? (index.h("ix-icon", { name: this.icon, size: "24", class: 'dropdown-icon' })) : null, index.h("div", { class: 'button-label' }, this.label), index.h("ix-icon", { name: this.dropdownShow
|
|
42
46
|
? index$1.iconChevronUpSmall
|
|
43
|
-
: index$1.iconChevronDownSmall, size: "24" })))) : (index.h("div", null, index.h("ix-icon-button", { icon: this.icon, variant: this.variant, disabled: this.disabled }), this.getTriangle()))), index.h("ix-dropdown", { key: '
|
|
47
|
+
: index$1.iconChevronDownSmall, size: "24" })))) : (index.h("div", null, index.h("ix-icon-button", { icon: this.icon, variant: this.variant, disabled: this.disabled, tabIndex: this.disabled ? -1 : 0 }), this.getTriangle()))), index.h("ix-dropdown", { key: 'bf09de1c2af43bc3ea2085cf11c26e6fb56b694a', class: "dropdown", trigger: this.dropdownAnchor.waitForCurrent(), placement: this.placement, closeBehavior: this.closeBehavior, onShowChanged: this.onDropdownShowChanged }, index.h("slot", { key: '89bf77cd9781f906d801ffb0c874028f3feef6de' }))));
|
|
44
48
|
}
|
|
45
49
|
get hostElement() { return index.getElement(this); }
|
|
46
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-dropdown-button.entry.cjs.js","sources":["src/components/dropdown-button/dropdown-button.scss?tag=ix-dropdown-button&encapsulation=shadow","src/components/dropdown-button/dropdown-button.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@use './common-variables' as vars;\n@use 'mixins/shadow-dom/component';\n\n@mixin triangle($name: '') {\n @if ($name != '') {\n $name: '#{$name}-';\n }\n\n .triangle.#{$name}primary {\n color: var(--theme-btn-#{$name}primary--color);\n }\n .triangle.#{$name}secondary {\n color: var(--theme-btn-#{$name}secondary--color);\n }\n .triangle.#{$name}tertiary {\n color: var(--theme-btn-#{$name}tertiary--color);\n }\n\n .triangle.#{$name}primary.disabled {\n color: var(--theme-btn-#{$name}primary--color--disabled);\n }\n .triangle.#{$name}secondary.disabled {\n color: var(--theme-btn-#{$name}secondary--color--disabled);\n }\n .triangle.#{$name}tertiary.disabled {\n color: var(--theme-btn-#{$name}tertiary--color--disabled);\n }\n}\n\n:host {\n display: inline-block;\n position: relative;\n height: vars.$x-large-space;\n width: auto;\n\n @include component.ix-component;\n\n .hide {\n display: none;\n }\n\n .dropdown-button {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button > ix-button {\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button .button-label {\n margin-right: auto;\n min-width: 0px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .dropdown-button .dropdown-icon {\n margin-right: 0.25rem;\n }\n\n .triangle {\n position: absolute;\n margin-inline-start: 1.5625rem;\n margin-block-start: -0.4375rem;\n border-right: 0 solid transparent;\n border-left: 4px solid transparent;\n border-top: 0 solid transparent;\n border-bottom: 4px solid;\n color: var(--theme-btn-primary--color);\n }\n\n @include triangle();\n @include triangle('subtle');\n @include triangle('danger');\n\n .content {\n display: flex;\n align-items: center;\n }\n}\n\n:host(.disabled) {\n pointer-events: none;\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, Element, h, Host, Prop, State } from '@stencil/core';\nimport { AlignedPlacement } from '../dropdown/placement';\nimport {\n iconChevronDownSmall,\n iconChevronUpSmall,\n} from '@siemens/ix-icons/icons';\nimport { makeRef } from '../utils/make-ref';\nimport type { DropdownButtonVariant } from './dropdown-button.types';\n\n@Component({\n tag: 'ix-dropdown-button',\n styleUrl: 'dropdown-button.scss',\n shadow: true,\n})\nexport class DropdownButton {\n @Element() hostElement!: HTMLIxDropdownButtonElement;\n\n /**\n * Button variant\n */\n @Prop() variant: DropdownButtonVariant = 'primary';\n\n /**\n * Disable button\n */\n @Prop() disabled = false;\n\n /**\n * Set label\n */\n @Prop() label?: string;\n\n /**\n * Button icon\n */\n @Prop() icon?: string;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n */\n @Prop() closeBehavior: 'inside' | 'outside' | 'both' | boolean = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement?: AlignedPlacement;\n\n /**\n * ARIA label for the dropdown button\n * Will be set as aria-label on the nested HTML button element\n *\n * @since 3.2.0\n */\n @Prop() ariaLabelDropdownButton?: string;\n\n @State() dropdownShow = false;\n\n private readonly dropdownAnchor = makeRef<HTMLElement>();\n\n private getTriangle() {\n return (\n <div\n class={{\n triangle: true,\n [this.variant]: true,\n hide: !!this.label,\n disabled: this.disabled,\n }}\n ></div>\n );\n }\n\n private readonly onDropdownShowChanged = (event: CustomEvent<boolean>) => {\n this.dropdownShow = event.detail;\n };\n\n render() {\n return (\n <Host\n class={{\n disabled: this.disabled,\n }}\n ref={this.dropdownAnchor}\n >\n <div class=\"dropdown-button\">\n {this.label ? (\n <ix-button\n variant={this.variant}\n disabled={this.disabled}\n alignment=\"start\"\n ariaLabel={this.ariaLabelDropdownButton}\n >\n <div class={'content'}>\n {this.icon ? (\n <ix-icon\n name={this.icon}\n size=\"24\"\n class={'dropdown-icon'}\n ></ix-icon>\n ) : null}\n <div class={'button-label'}>{this.label}</div>\n <ix-icon\n name={\n this.dropdownShow\n ? iconChevronUpSmall\n : iconChevronDownSmall\n }\n size=\"24\"\n ></ix-icon>\n </div>\n </ix-button>\n ) : (\n <div>\n <ix-icon-button\n icon={this.icon}\n variant={this.variant}\n disabled={this.disabled}\n ></ix-icon-button>\n {this.getTriangle()}\n </div>\n )}\n </div>\n\n <ix-dropdown\n class=\"dropdown\"\n trigger={this.dropdownAnchor.waitForCurrent()}\n placement={this.placement}\n closeBehavior={this.closeBehavior}\n onShowChanged={this.onDropdownShowChanged}\n >\n <slot></slot>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"names":["makeRef","h","Host","iconChevronUpSmall","iconChevronDownSmall"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ix-dropdown-button.entry.cjs.js","sources":["src/components/dropdown-button/dropdown-button.scss?tag=ix-dropdown-button&encapsulation=shadow","src/components/dropdown-button/dropdown-button.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@use './common-variables' as vars;\n@use 'mixins/shadow-dom/component';\n\n@mixin triangle($name: '') {\n @if ($name != '') {\n $name: '#{$name}-';\n }\n\n .triangle.#{$name}primary {\n color: var(--theme-btn-#{$name}primary--color);\n }\n .triangle.#{$name}secondary {\n color: var(--theme-btn-#{$name}secondary--color);\n }\n .triangle.#{$name}tertiary {\n color: var(--theme-btn-#{$name}tertiary--color);\n }\n\n .triangle.#{$name}primary.disabled {\n color: var(--theme-btn-#{$name}primary--color--disabled);\n }\n .triangle.#{$name}secondary.disabled {\n color: var(--theme-btn-#{$name}secondary--color--disabled);\n }\n .triangle.#{$name}tertiary.disabled {\n color: var(--theme-btn-#{$name}tertiary--color--disabled);\n }\n}\n\n:host {\n display: inline-block;\n position: relative;\n height: vars.$x-large-space;\n width: auto;\n\n @include component.ix-component;\n\n .hide {\n display: none;\n }\n\n .dropdown-button {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button > ix-button {\n width: 100%;\n height: 100%;\n }\n\n .dropdown-button .button-label {\n margin-right: auto;\n min-width: 0px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .dropdown-button .dropdown-icon {\n margin-right: 0.25rem;\n }\n\n .triangle {\n position: absolute;\n margin-inline-start: 1.5625rem;\n margin-block-start: -0.4375rem;\n border-right: 0 solid transparent;\n border-left: 4px solid transparent;\n border-top: 0 solid transparent;\n border-bottom: 4px solid;\n color: var(--theme-btn-primary--color);\n }\n\n @include triangle();\n @include triangle('subtle');\n @include triangle('danger');\n\n .content {\n display: flex;\n align-items: center;\n }\n}\n\n:host(.disabled) {\n pointer-events: none;\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, Element, h, Host, Prop, State } from '@stencil/core';\nimport { AlignedPlacement } from '../dropdown/placement';\nimport {\n iconChevronDownSmall,\n iconChevronUpSmall,\n} from '@siemens/ix-icons/icons';\nimport { makeRef } from '../utils/make-ref';\nimport type { DropdownButtonVariant } from './dropdown-button.types';\nimport { a11yBoolean } from '../utils/a11y';\n\n@Component({\n tag: 'ix-dropdown-button',\n styleUrl: 'dropdown-button.scss',\n shadow: true,\n})\nexport class DropdownButton {\n @Element() hostElement!: HTMLIxDropdownButtonElement;\n\n /**\n * Button variant\n */\n @Prop() variant: DropdownButtonVariant = 'primary';\n\n /**\n * Disable button\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Set label\n */\n @Prop() label?: string;\n\n /**\n * Button icon\n */\n @Prop() icon?: string;\n\n /**\n * Controls if the dropdown will be closed in response to a click event depending on the position of the event relative to the dropdown.\n */\n @Prop() closeBehavior: 'inside' | 'outside' | 'both' | boolean = 'both';\n\n /**\n * Placement of the dropdown\n */\n @Prop() placement?: AlignedPlacement;\n\n /**\n * ARIA label for the dropdown button\n * Will be set as aria-label on the nested HTML button element\n *\n * @since 3.2.0\n */\n @Prop() ariaLabelDropdownButton?: string;\n\n @State() dropdownShow = false;\n\n private readonly dropdownAnchor = makeRef<HTMLElement>();\n\n private getTriangle() {\n return (\n <div\n class={{\n triangle: true,\n [this.variant]: true,\n hide: !!this.label,\n disabled: this.disabled,\n }}\n ></div>\n );\n }\n\n private readonly onDropdownShowChanged = (event: CustomEvent<boolean>) => {\n if (this.disabled && event.detail) {\n return;\n }\n this.dropdownShow = event.detail;\n };\n\n render() {\n return (\n <Host\n aria-disabled={a11yBoolean(this.disabled)}\n class={{\n disabled: this.disabled,\n }}\n ref={this.dropdownAnchor}\n >\n <div class=\"dropdown-button\">\n {this.label ? (\n <ix-button\n variant={this.variant}\n disabled={this.disabled}\n alignment=\"start\"\n ariaLabel={this.ariaLabelDropdownButton}\n tabIndex={this.disabled ? -1 : 0}\n >\n <div class={'content'}>\n {this.icon ? (\n <ix-icon\n name={this.icon}\n size=\"24\"\n class={'dropdown-icon'}\n ></ix-icon>\n ) : null}\n <div class={'button-label'}>{this.label}</div>\n <ix-icon\n name={\n this.dropdownShow\n ? iconChevronUpSmall\n : iconChevronDownSmall\n }\n size=\"24\"\n ></ix-icon>\n </div>\n </ix-button>\n ) : (\n <div>\n <ix-icon-button\n icon={this.icon}\n variant={this.variant}\n disabled={this.disabled}\n tabIndex={this.disabled ? -1 : 0}\n ></ix-icon-button>\n {this.getTriangle()}\n </div>\n )}\n </div>\n\n <ix-dropdown\n class=\"dropdown\"\n trigger={this.dropdownAnchor.waitForCurrent()}\n placement={this.placement}\n closeBehavior={this.closeBehavior}\n onShowChanged={this.onDropdownShowChanged}\n >\n <slot></slot>\n </ix-dropdown>\n </Host>\n );\n }\n}\n"],"names":["makeRef","h","Host","a11yBoolean","iconChevronUpSmall","iconChevronDownSmall"],"mappings":";;;;;;;AAAA,MAAM,iBAAiB,GAAG,w9FAAw9F;;MCwBr+F,cAAc,GAAA,MAAA;AAL3B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAQE;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAA0B,SAAS;AAElD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAYzC;;AAEG;AACK,QAAA,IAAa,CAAA,aAAA,GAA4C,MAAM;AAe9D,QAAA,IAAY,CAAA,YAAA,GAAG,KAAK;AAEZ,QAAA,IAAc,CAAA,cAAA,GAAGA,eAAO,EAAe;AAevC,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,KAA2B,KAAI;YACvE,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE;gBACjC;;AAEF,YAAA,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM;AAClC,SAAC;AAgEF;IAlFS,WAAW,GAAA;AACjB,QAAA,QACEC,OACE,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE;AACL,gBAAA,QAAQ,EAAE,IAAI;AACd,gBAAA,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI;AACpB,gBAAA,IAAI,EAAE,CAAC,CAAC,I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,CAAC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,CAAC,EAChB,CAAA,EACjB,IAAI,CAAC,WAAW,EAAE,CACf,CACP,CACG,EAENA,OAAA,CAAA,aAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,EAC7C,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,qBAAqB,EAAA,EAEzCA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACD,CACT;;;;;;;;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
var index$1 = require('./index-Dyz3z1FD.js');
|
|
5
|
+
var a11y = require('./a11y-B_6chCvu.js');
|
|
5
6
|
|
|
6
7
|
const dropdownItemCss = ":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}";
|
|
7
8
|
|
|
@@ -40,15 +41,20 @@ const DropdownItem = class {
|
|
|
40
41
|
this.icon !== undefined);
|
|
41
42
|
}
|
|
42
43
|
render() {
|
|
43
|
-
return (index.h(index.Host, { key: '
|
|
44
|
+
return (index.h(index.Host, { key: '89d6023460273b60bf52f129e456e0d92e51c09d', class: {
|
|
44
45
|
hover: this.hover,
|
|
45
46
|
'icon-only': this.isIconOnly(),
|
|
46
47
|
disabled: this.disabled,
|
|
47
48
|
submenu: this.isSubMenu,
|
|
48
|
-
}, role: "listitem" }, index.h("button", { key: '
|
|
49
|
+
}, role: "listitem" }, index.h("button", { key: '32feebb5d24eb19af7b5081c4f771a489913180f', type: "button", tabIndex: this.disabled ? -1 : 0, class: {
|
|
49
50
|
'dropdown-item': true,
|
|
50
51
|
'no-checked-field': this.suppressChecked,
|
|
51
|
-
|
|
52
|
+
disabled: this.disabled,
|
|
53
|
+
}, onClick: () => {
|
|
54
|
+
if (!this.disabled) {
|
|
55
|
+
this.emitItemClick();
|
|
56
|
+
}
|
|
57
|
+
}, "aria-label": this.ariaLabelButton, "aria-disabled": a11y.a11yBoolean(this.disabled), disabled: this.disabled }, !this.suppressChecked ? (index.h("div", { class: "dropdown-item-checked" }, this.checked ? (index.h("ix-icon", { class: "checkmark", name: index$1.iconSingleCheck, size: "16" })) : null)) : null, this.icon ? (index.h("ix-icon", { class: "dropdown-item-icon", name: this.icon, "aria-label": this.ariaLabelIcon })) : null, index.h("div", { key: 'dbc0b8352eb200eca806604da06e884bc398c5f0', class: "dropdown-item-text" }, this.label, index.h("slot", { key: 'e9a0a489086d0990f613b9e44fbe16cd00a0794b' })), this.isSubMenu ? (index.h("ix-icon", { name: index$1.iconChevronRightSmall, class: 'submenu-icon' })) : null)));
|
|
52
58
|
}
|
|
53
59
|
get hostElement() { return index.getElement(this); }
|
|
54
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-dropdown-item.entry.cjs.js","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"],"names":["h","Host","iconSingleCheck","iconChevronRightSmall"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ix-dropdown-item.entry.cjs.js","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';\nimport { a11yBoolean } from '../utils/a11y';\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({ reflect: true }) 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={this.disabled ? -1 : 0}\n class={{\n 'dropdown-item': true,\n 'no-checked-field': this.suppressChecked,\n disabled: this.disabled,\n }}\n onClick={() => {\n if (!this.disabled) {\n this.emitItemClick();\n }\n }}\n aria-label={this.ariaLabelButton}\n aria-disabled={a11yBoolean(this.disabled)}\n disabled={this.disabled}\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={iconChevronRight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./index-C8Xo8L1k.js');
|
|
4
4
|
var a11y = require('./a11y-B_6chCvu.js');
|
|
5
5
|
var makeRef = require('./make-ref-BaH6_YJk.js');
|
|
6
|
-
var validation = require('./validation-
|
|
6
|
+
var validation = require('./validation-DTmSqO2d.js');
|
|
7
7
|
var helperTextUtil = require('./helper-text-util-D2W-yNmK.js');
|
|
8
8
|
require('./index-Dyz3z1FD.js');
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
|
-
var validation = require('./validation-
|
|
4
|
+
var validation = require('./validation-DTmSqO2d.js');
|
|
5
5
|
var helperTextUtil = require('./helper-text-util-D2W-yNmK.js');
|
|
6
6
|
require('./index-Dyz3z1FD.js');
|
|
7
7
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
var index$1 = require('./index-Dyz3z1FD.js');
|
|
5
|
-
var validation = require('./validation-
|
|
5
|
+
var validation = require('./validation-DTmSqO2d.js');
|
|
6
6
|
var makeRef = require('./make-ref-BaH6_YJk.js');
|
|
7
|
-
var input_fc = require('./input.fc-
|
|
7
|
+
var input_fc = require('./input.fc-DrxRYq_G.js');
|
|
8
8
|
require('./a11y-B_6chCvu.js');
|
|
9
9
|
require('./mutation-observer-DE0YMfYu.js');
|
|
10
10
|
require('./rwd.util-GTn-vgCJ.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-C8Xo8L1k.js');
|
|
4
4
|
var index$1 = require('./index-Dyz3z1FD.js');
|
|
5
5
|
|
|
6
|
-
const linkButtonCss = ":host{display:inline-flex;height:2rem;font-size:0.875rem;font-weight:400;min-width:2rem}:host .link-button{display:inline-flex;position:relative;width:100%;padding:0 0.25rem 0 0;align-items:center;justify-content:center;background-color:transparent;color:var(--theme-color-primary);cursor:pointer;text-decoration:none}:host .link-button .link{display:block;position:relative;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .link-button:not(.disabled):not(:disabled){cursor:pointer}:host .link-button:not(.disabled):not(:disabled):hover,:host .link-button:not(.disabled):not(:disabled).hover{color:var(--theme-color-dynamic--hover)}:host .link-button:not(.disabled):not(:disabled)
|
|
6
|
+
const linkButtonCss = ":host{display:inline-flex;height:2rem;font-size:0.875rem;font-weight:400;min-width:2rem}:host .link-button{display:inline-flex;position:relative;width:100%;padding:0 0.25rem 0 0;align-items:center;justify-content:center;background-color:transparent;color:var(--theme-color-primary);cursor:pointer;text-decoration:none}:host .link-button .link{display:block;position:relative;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-decoration:underline;text-underline-offset:0.2rem}:host .link-button:not(.disabled):not(:disabled){cursor:pointer}:host .link-button:not(.disabled):not(:disabled):hover,:host .link-button:not(.disabled):not(:disabled).hover{color:var(--theme-color-dynamic--hover)}:host .link-button:not(.disabled):not(:disabled){cursor:pointer}:host .link-button:not(.disabled):not(:disabled):active,:host .link-button:not(.disabled):not(:disabled).active{color:var(--theme-color-dynamic--active)}:host .link-button.disabled{cursor:default;color:var(--theme-color-weak-text)}:host .link-button a{all:unset}:host :focus-visible{outline:1px solid var(--theme-color-focus-bdr)}";
|
|
7
7
|
|
|
8
8
|
const LinkButton = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-link-button.entry.cjs.js","sources":["src/components/link-button/link-button.scss?tag=ix-link-button&encapsulation=shadow","src/components/link-button/link-button.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/hover';\n\n:host {\n display: inline-flex;\n height: vars.$x-large-space;\n font-size: vars.$font-size-default;\n font-weight: vars.$font-weight-normal;\n min-width: vars.$x-large-space;\n\n .link-button {\n display: inline-flex;\n position: relative;\n width: 100%;\n padding: 0 vars.$tiny-space 0 0;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n color: var(--theme-color-primary);\n cursor: pointer;\n text-decoration: none;\n\n .link {\n display: block;\n position: relative;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n\n @include hover.hover {\n color: var(--theme-color-dynamic--hover);\n
|
|
1
|
+
{"version":3,"file":"ix-link-button.entry.cjs.js","sources":["src/components/link-button/link-button.scss?tag=ix-link-button&encapsulation=shadow","src/components/link-button/link-button.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/hover';\n\n:host {\n display: inline-flex;\n height: vars.$x-large-space;\n font-size: vars.$font-size-default;\n font-weight: vars.$font-weight-normal;\n min-width: vars.$x-large-space;\n\n .link-button {\n display: inline-flex;\n position: relative;\n width: 100%;\n padding: 0 vars.$tiny-space 0 0;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n color: var(--theme-color-primary);\n cursor: pointer;\n text-decoration: none;\n\n .link {\n display: block;\n position: relative;\n width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n text-decoration: underline;\n text-underline-offset: 0.2rem;\n }\n\n @include hover.hover {\n color: var(--theme-color-dynamic--hover);\n }\n\n @include hover.active {\n color: var(--theme-color-dynamic--active);\n }\n\n &.disabled {\n cursor: default;\n color: var(--theme-color-weak-text);\n }\n\n a {\n all: unset;\n }\n }\n\n :focus-visible {\n outline: 1px solid var(--theme-color-focus-bdr);\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 { iconChevronRightSmall } from '@siemens/ix-icons/icons';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'ix-link-button',\n styleUrl: 'link-button.scss',\n shadow: true,\n})\nexport class LinkButton {\n /**\n * Disable the link button\n */\n @Prop() disabled = false;\n\n /**\n * Url for the link button\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the link\n *\n * https://www.w3schools.com/html/html_links.asp\n */\n @Prop() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n render() {\n return (\n <Host>\n <a\n title={this.url}\n tabindex=\"0\"\n class={{\n 'link-button': true,\n disabled: this.disabled,\n }}\n href={this.disabled ? undefined : this.url}\n target={this.target}\n >\n <ix-icon\n class=\"icon\"\n name={iconChevronRightSmall}\n size=\"16\"\n aria-hidden=\"true\"\n ></ix-icon>\n <div\n class={{\n link: true,\n disabled: this.disabled,\n }}\n >\n <slot></slot>\n </div>\n </a>\n </Host>\n );\n }\n}\n"],"names":["h","Host","iconChevronRightSmall"],"mappings":";;;;;AAAA,MAAM,aAAa,GAAG,qlCAAqlC;;MCiB9lC,UAAU,GAAA,MAAA;AALvB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAOxB;;;;AAIG;AACK,QAAA,IAAM,CAAA,MAAA,GAA4C,OAAO;AAiClE;IA/BC,MAAM,GAAA;AACJ,QAAA,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OACE,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,GAAG,EACf,QAAQ,EAAC,GAAG,EACZ,KAAK,EAAE;AACL,gBAAA,aAAa,EAAE,IAAI;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,aAAA,EACD,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,EAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,EAEnBA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,MAAM,EACZ,IAAI,EAAEE,6BAAqB,EAC3B,IAAI,EAAC,IAAI,EAAA,aAAA,EACG,MAAM,EACT,CAAA,EACXF,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,IAAI;gBACV,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,aAAA,EAAA,EAEDA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACJ,CACC;;;;;;;"}
|