@siemens/ix 4.0.0 → 4.1.0
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/components/ix-action-card.js +1 -1
- package/components/ix-application-header.js +5 -5
- package/components/ix-application-switch-modal.js +5 -5
- package/components/ix-avatar.js +1 -1
- package/components/ix-blind.js +1 -1
- package/components/ix-breadcrumb-item.js +1 -1
- package/components/ix-breadcrumb.js +4 -4
- package/components/ix-button.js +1 -1
- package/components/ix-card-list.js +4 -4
- package/components/ix-category-filter.js +18 -12
- package/components/ix-category-filter.js.map +1 -1
- package/components/ix-checkbox-group.js +4 -4
- package/components/ix-checkbox.js +1 -1
- package/components/ix-chip.js +4 -4
- package/components/ix-content-header.js +3 -3
- package/components/ix-custom-field.js +4 -4
- package/components/ix-date-dropdown.js +9 -9
- package/components/ix-date-input.js +30 -14
- package/components/ix-date-input.js.map +1 -1
- package/components/ix-date-picker.js +1 -1
- package/components/ix-date-time-card.js +1 -1
- package/components/ix-datetime-picker.js +12 -12
- package/components/ix-datetime-picker.js.map +1 -1
- package/components/ix-divider.js +1 -1
- package/components/ix-drawer.js +7 -7
- package/components/ix-dropdown-button.js +7 -7
- package/components/ix-dropdown-header.js +2 -2
- package/components/ix-dropdown-item.js +1 -1
- package/components/ix-dropdown-quick-actions.js +1 -1
- package/components/ix-dropdown.js +1 -1
- package/components/ix-empty-state.js +4 -4
- package/components/ix-event-list-item.js +4 -4
- package/components/ix-event-list.js +2 -2
- package/components/ix-expanding-search.js +6 -6
- package/components/ix-field-label.js +1 -1
- package/components/ix-field-wrapper.js +1 -1
- package/components/ix-filter-chip.js +1 -1
- package/components/ix-flip-tile-content.js +1 -1
- package/components/ix-flip-tile.js +5 -5
- package/components/ix-group-context-menu.js +1 -1
- package/components/ix-group.js +11 -11
- package/components/ix-helper-text.js +3 -3
- package/components/ix-icon-button.js +1 -1
- package/components/ix-icon-toggle-button.js +2 -2
- package/components/ix-input-group.js +1 -1
- package/components/ix-input.js +23 -12
- package/components/ix-input.js.map +1 -1
- package/components/ix-key-value-list.js +1 -1
- package/components/ix-key-value.js +1 -1
- package/components/ix-kpi.js +3 -3
- package/components/ix-layout-auto.js +1 -1
- package/components/ix-layout-grid.js +1 -1
- package/components/ix-link-button.js +4 -4
- package/components/ix-link-button.js.map +1 -1
- package/components/ix-menu-about-item.js +1 -1
- package/components/ix-menu-about-news.js +8 -8
- package/components/ix-menu-about.js +10 -8
- package/components/ix-menu-about.js.map +1 -1
- package/components/ix-menu-avatar-item.js +1 -1
- package/components/ix-menu-avatar.js +10 -10
- package/components/ix-menu-category.js +11 -11
- package/components/ix-menu-expand-icon.js +1 -1
- package/components/ix-menu-item.js +1 -1
- package/components/ix-menu-settings-item.js +1 -1
- package/components/ix-menu-settings.js +1 -1
- package/components/ix-menu.js +18 -18
- package/components/ix-message-bar.js +3 -3
- package/components/ix-modal-content.js +1 -1
- package/components/ix-modal-footer.js +1 -1
- package/components/ix-modal-header.js +1 -1
- package/components/ix-modal-loading.js +2 -2
- package/components/ix-modal.js +3 -3
- package/components/ix-number-input.js +169 -36
- package/components/ix-number-input.js.map +1 -1
- package/components/ix-pagination.js +42 -19
- package/components/ix-pagination.js.map +1 -1
- package/components/ix-pane-layout.js +1 -1
- package/components/ix-pane.js +9 -9
- package/components/ix-pill.js +6 -6
- package/components/ix-progress-indicator.js +5 -5
- package/components/ix-push-card.js +2 -2
- package/components/ix-radio-group.js +6 -6
- package/components/ix-radio.js +4 -4
- package/components/ix-row.js +1 -1
- package/components/ix-select-item.js +1 -1
- package/components/ix-select.js +1 -1
- package/components/ix-slider.js +8 -8
- package/components/ix-spinner.js +1 -1
- package/components/ix-split-button.js +30 -16
- package/components/ix-split-button.js.map +1 -1
- package/components/ix-tab-item.js +1 -1
- package/components/ix-tabs.js +1 -1
- package/components/ix-textarea.js +7 -7
- package/components/ix-tile.js +4 -4
- package/components/ix-time-input.js +31 -15
- package/components/ix-time-input.js.map +1 -1
- package/components/ix-time-picker.js +1 -1
- package/components/ix-toast-container.js +6 -6
- package/components/ix-toast.js +1 -1
- package/components/ix-toggle-button.js +1 -1
- package/components/ix-toggle.js +4 -4
- package/components/ix-tooltip.js +1 -1
- package/components/ix-tree-item.js +1 -1
- package/components/ix-tree.js +2 -2
- package/components/ix-typography.js +1 -1
- package/components/ix-upload.js +5 -5
- package/components/ix-validation-tooltip.js +2 -2
- package/components/ix-workflow-step.js +3 -3
- package/components/ix-workflow-steps.js +1 -1
- package/components/{p-ChZQLy9v.js → p-10zMtvCF.js} +4 -4
- package/components/{p-ChZQLy9v.js.map → p-10zMtvCF.js.map} +1 -1
- package/components/{p-D8hPr0Kb.js → p-1pd_0dhF.js} +3 -3
- package/components/{p-D8hPr0Kb.js.map → p-1pd_0dhF.js.map} +1 -1
- package/components/{p-axBTucsn.js → p-B006bhbX.js} +3 -3
- package/components/{p-axBTucsn.js.map → p-B006bhbX.js.map} +1 -1
- package/components/{p-B-mB5dVY.js → p-BBwXlKhE.js} +3 -3
- package/components/{p-B-mB5dVY.js.map → p-BBwXlKhE.js.map} +1 -1
- package/components/{p-DInJFFDT.js → p-BEDohapR.js} +4 -4
- package/components/{p-DInJFFDT.js.map → p-BEDohapR.js.map} +1 -1
- package/components/{p-DkDGUG2W.js → p-BI7B-PUA.js} +4 -4
- package/components/{p-DkDGUG2W.js.map → p-BI7B-PUA.js.map} +1 -1
- package/components/{p-DvD1nW88.js → p-BLeWaHpy.js} +5 -5
- package/components/{p-DvD1nW88.js.map → p-BLeWaHpy.js.map} +1 -1
- package/components/{p-CFDRGf6r.js → p-BR5ayBuu.js} +3 -3
- package/components/{p-CFDRGf6r.js.map → p-BR5ayBuu.js.map} +1 -1
- package/components/{p-Cj9oZ8ym.js → p-BVUD9f4A.js} +8 -8
- package/components/{p-Cj9oZ8ym.js.map → p-BVUD9f4A.js.map} +1 -1
- package/components/{p-CvuFiT5X.js → p-BZLbfHdO.js} +66 -25
- package/components/p-BZLbfHdO.js.map +1 -0
- package/components/{p-BHcP7TVn.js → p-Bk0vKwmt.js} +4 -4
- package/components/{p-BHcP7TVn.js.map → p-Bk0vKwmt.js.map} +1 -1
- package/components/{p-GPVWLtS3.js → p-Bye33cYU.js} +7 -7
- package/components/{p-GPVWLtS3.js.map → p-Bye33cYU.js.map} +1 -1
- package/components/{p-4kEXJDiJ.js → p-Bz7hxKB6.js} +4 -4
- package/components/{p-4kEXJDiJ.js.map → p-Bz7hxKB6.js.map} +1 -1
- package/components/{p-D6KzHh-w.js → p-C4KxNeD2.js} +3 -3
- package/components/{p-D6KzHh-w.js.map → p-C4KxNeD2.js.map} +1 -1
- package/components/{p-DWRnKXkl.js → p-C6_1qmP4.js} +3 -3
- package/components/{p-DWRnKXkl.js.map → p-C6_1qmP4.js.map} +1 -1
- package/components/{p-OLe05BAC.js → p-COWPG_SD.js} +3 -3
- package/components/p-COWPG_SD.js.map +1 -0
- package/components/{p-C56HnkHy.js → p-Cc4uqNv5.js} +18 -11
- package/components/p-Cc4uqNv5.js.map +1 -0
- package/components/{p-FWLjfP4_.js → p-CjDPpSJX.js} +13 -13
- package/components/p-CjDPpSJX.js.map +1 -0
- package/components/{p-DkKuaBAh.js → p-ClQxnZ3d.js} +6 -6
- package/components/{p-DkKuaBAh.js.map → p-ClQxnZ3d.js.map} +1 -1
- package/components/{p-CL7Uj2A_.js → p-ColBHyXN.js} +5 -5
- package/components/{p-CL7Uj2A_.js.map → p-ColBHyXN.js.map} +1 -1
- package/components/{p-ChFNWyCb.js → p-CrqgL2m1.js} +8 -4
- package/components/p-CrqgL2m1.js.map +1 -0
- package/components/{p-De0habf3.js → p-CvD2yWeJ.js} +4 -4
- package/components/{p-De0habf3.js.map → p-CvD2yWeJ.js.map} +1 -1
- package/components/{p-B1sSJ2R2.js → p-DC9anobw.js} +6 -6
- package/components/{p-B1sSJ2R2.js.map → p-DC9anobw.js.map} +1 -1
- package/components/{p-BTR8UA6s.js → p-DSTHZygb.js} +8 -8
- package/components/{p-BTR8UA6s.js.map → p-DSTHZygb.js.map} +1 -1
- package/components/{p-Ow_osSm5.js → p-DXFN8JXp.js} +20 -9
- package/components/p-DXFN8JXp.js.map +1 -0
- package/components/{p-BtDCIGt3.js → p-Db0RazS2.js} +3 -3
- package/components/{p-BtDCIGt3.js.map → p-Db0RazS2.js.map} +1 -1
- package/components/{p-DTo0UW1Q.js → p-DlVaL0Yi.js} +7 -7
- package/components/{p-DTo0UW1Q.js.map → p-DlVaL0Yi.js.map} +1 -1
- package/components/{p-LVGd1t9U.js → p-Dp03DeD0.js} +5 -5
- package/components/{p-LVGd1t9U.js.map → p-Dp03DeD0.js.map} +1 -1
- package/components/{p-CMC0yuht.js → p-Dy6xvLn4.js} +4 -4
- package/components/{p-CMC0yuht.js.map → p-Dy6xvLn4.js.map} +1 -1
- package/components/{p-BAG4Ixzu.js → p-DyGPjxFm.js} +5 -5
- package/components/{p-BAG4Ixzu.js.map → p-DyGPjxFm.js.map} +1 -1
- package/components/{p-CwFNYtOl.js → p-PpLLlogo.js} +5 -5
- package/components/{p-CwFNYtOl.js.map → p-PpLLlogo.js.map} +1 -1
- package/components/{p-S6nC3Yb4.js → p-g2Y5blor.js} +68 -43
- package/components/p-g2Y5blor.js.map +1 -0
- package/components/{p-CDPfohEH.js → p-kJlC6ZD0.js} +62 -41
- package/components/p-kJlC6ZD0.js.map +1 -0
- package/dist/cjs/{helper-text-util-BlElJLxk.js → helper-text-util-D2W-yNmK.js} +8 -4
- package/dist/cjs/helper-text-util-D2W-yNmK.js.map +1 -0
- package/dist/cjs/{input.util-4AhBphgX.js → input.fc-B5JMSZbY.js} +68 -42
- package/dist/cjs/input.fc-B5JMSZbY.js.map +1 -0
- package/dist/cjs/ix-avatar_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +14 -8
- package/dist/cjs/ix-category-filter.entry.cjs.js.map +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 +9 -9
- package/dist/cjs/ix-date-input.cjs.entry.js +22 -8
- package/dist/cjs/ix-date-input.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-date-time-card.cjs.entry.js +1 -1
- package/dist/cjs/ix-date-time-card.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-datetime-picker.cjs.entry.js +2 -2
- package/dist/cjs/ix-datetime-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-divider.cjs.entry.js +1 -1
- package/dist/cjs/ix-drawer.cjs.entry.js +5 -5
- package/dist/cjs/ix-dropdown-button.cjs.entry.js +3 -3
- package/dist/cjs/ix-dropdown-header.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-item.cjs.entry.js +3 -3
- package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/ix-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ix-event-list-item.cjs.entry.js +4 -4
- package/dist/cjs/ix-event-list.cjs.entry.js +2 -2
- package/dist/cjs/ix-expanding-search.cjs.entry.js +4 -4
- package/dist/cjs/ix-field-label_2.cjs.entry.js +4 -4
- package/dist/cjs/ix-filter-chip_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-flip-tile-content.cjs.entry.js +1 -1
- package/dist/cjs/ix-flip-tile.cjs.entry.js +3 -3
- package/dist/cjs/ix-group-context-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-group.cjs.entry.js +8 -8
- package/dist/cjs/ix-helper-text.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-input-group.cjs.entry.js +1 -1
- package/dist/cjs/ix-input.cjs.entry.js +20 -11
- package/dist/cjs/ix-input.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-key-value-list.cjs.entry.js +1 -1
- package/dist/cjs/ix-key-value.cjs.entry.js +1 -1
- package/dist/cjs/ix-kpi.cjs.entry.js +3 -3
- package/dist/cjs/ix-layout-auto.cjs.entry.js +1 -1
- package/dist/cjs/ix-link-button.cjs.entry.js +4 -4
- package/dist/cjs/ix-link-button.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-menu-about-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu-about-news.cjs.entry.js +4 -4
- package/dist/cjs/ix-menu-about.cjs.entry.js +6 -4
- package/dist/cjs/ix-menu-about.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-menu-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ix-menu-category.cjs.entry.js +5 -5
- package/dist/cjs/ix-menu-expand-icon.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu-item.cjs.entry.js +4 -4
- package/dist/cjs/{ix-menu-settings-Cdqo0r8E.js → ix-menu-settings-CtWl0bME.js} +14 -7
- package/dist/cjs/ix-menu-settings-CtWl0bME.js.map +1 -0
- package/dist/cjs/ix-menu-settings-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu-settings.cjs.entry.js +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js +12 -12
- package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal-content_2.cjs.entry.js +2 -2
- package/dist/cjs/ix-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal-loading.cjs.entry.js +1 -1
- package/dist/cjs/ix-modal.cjs.entry.js +3 -3
- package/dist/cjs/ix-number-input.cjs.entry.js +161 -33
- package/dist/cjs/ix-number-input.entry.cjs.js.map +1 -1
- 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-pane-layout.cjs.entry.js +1 -1
- package/dist/cjs/ix-pane.cjs.entry.js +6 -6
- package/dist/cjs/ix-pill.cjs.entry.js +4 -4
- package/dist/cjs/ix-progress-indicator.cjs.entry.js +3 -3
- package/dist/cjs/ix-push-card.cjs.entry.js +1 -1
- package/dist/cjs/ix-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ix-radio.cjs.entry.js +3 -3
- package/dist/cjs/ix-select.cjs.entry.js +52 -13
- package/dist/cjs/ix-select.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-slider.cjs.entry.js +6 -6
- package/dist/cjs/ix-split-button.cjs.entry.js +24 -12
- package/dist/cjs/ix-split-button.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-tab-item_2.cjs.entry.js +5 -5
- package/dist/cjs/ix-textarea.cjs.entry.js +5 -5
- package/dist/cjs/ix-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-tile.cjs.entry.js +4 -4
- package/dist/cjs/ix-time-input.cjs.entry.js +22 -8
- package/dist/cjs/ix-time-input.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-time-picker.cjs.entry.js +56 -35
- package/dist/cjs/ix-time-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-toast-container.cjs.entry.js +2 -2
- package/dist/cjs/ix-toast.cjs.entry.js +2 -2
- package/dist/cjs/ix-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ix-tooltip.cjs.entry.js +17 -6
- package/dist/cjs/ix-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/ix-tree-item.cjs.entry.js +4 -4
- package/dist/cjs/ix-tree.cjs.entry.js +1 -1
- package/dist/cjs/ix-typography.cjs.entry.js +1 -1
- package/dist/cjs/ix-upload.cjs.entry.js +3 -3
- package/dist/cjs/ix-validation-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ix-workflow-step.cjs.entry.js +3 -3
- package/dist/cjs/ix-workflow-steps.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/category-filter/category-filter.css +321 -50
- package/dist/collection/components/category-filter/category-filter.js +13 -7
- package/dist/collection/components/category-filter/category-filter.js.map +1 -1
- package/dist/collection/components/date-input/date-input.js +58 -4
- package/dist/collection/components/date-input/date-input.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.css +6 -8
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/date-picker/date-picker.js.map +1 -1
- package/dist/collection/components/date-time-card/date-time-card.css +3 -2
- package/dist/collection/components/datetime-picker/datetime-picker.css +12 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js.map +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/drawer/drawer.js +5 -5
- package/dist/collection/components/dropdown/dropdown.js +2 -2
- package/dist/collection/components/dropdown-button/dropdown-button.js +3 -3
- package/dist/collection/components/dropdown-header/dropdown-header.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +3 -3
- package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.js +1 -1
- package/dist/collection/components/empty-state/empty-state.js +1 -1
- package/dist/collection/components/event-list/event-list.js +2 -2
- package/dist/collection/components/event-list-item/event-list-item.js +4 -4
- package/dist/collection/components/expanding-search/expanding-search.js +4 -4
- package/dist/collection/components/field-label/field-label.js +1 -1
- package/dist/collection/components/field-wrapper/field-wrapper.js +2 -2
- package/dist/collection/components/field-wrapper/helper-text-util.js +6 -2
- package/dist/collection/components/field-wrapper/helper-text-util.js.map +1 -1
- package/dist/collection/components/filter-chip/filter-chip.js +1 -1
- package/dist/collection/components/flip-tile/flip-tile.js +3 -3
- package/dist/collection/components/flip-tile-content/flip-tile-content.js +1 -1
- package/dist/collection/components/group/group-context-menu.js +1 -1
- package/dist/collection/components/group/group.js +8 -8
- package/dist/collection/components/helper-text/helper-text.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/icon-toggle-button/icon-toggle-button.js +1 -1
- package/dist/collection/components/input/input.fc.js +10 -1
- package/dist/collection/components/input/input.fc.js.map +1 -1
- package/dist/collection/components/input/input.js +54 -5
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input/input.util.js +20 -3
- package/dist/collection/components/input/input.util.js.map +1 -1
- package/dist/collection/components/input/number-input.js +228 -36
- package/dist/collection/components/input/number-input.js.map +1 -1
- package/dist/collection/components/input/textarea.js +2 -2
- package/dist/collection/components/input-group/input-group.js +1 -1
- package/dist/collection/components/key-value/key-value.js +1 -1
- package/dist/collection/components/key-value-list/key-value-list.js +1 -1
- package/dist/collection/components/kpi/kpi.js +3 -3
- package/dist/collection/components/layout-auto/layout-auto.js +1 -1
- package/dist/collection/components/layout-grid/layout-grid.js +2 -2
- package/dist/collection/components/link-button/link-button.css +2 -8
- package/dist/collection/components/link-button/link-button.js +3 -3
- package/dist/collection/components/menu/menu-expand-icon.js +1 -1
- package/dist/collection/components/menu/menu.js +12 -12
- package/dist/collection/components/menu-about/menu-about.js +6 -4
- package/dist/collection/components/menu-about/menu-about.js.map +1 -1
- package/dist/collection/components/menu-about-item/menu-about-item.js +1 -1
- package/dist/collection/components/menu-about-news/menu-about-news.js +4 -4
- package/dist/collection/components/menu-avatar/menu-avatar.js +2 -2
- package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +1 -1
- package/dist/collection/components/menu-category/menu-category.js +5 -5
- package/dist/collection/components/menu-item/menu-item.js +4 -4
- package/dist/collection/components/menu-settings/menu-settings.js +6 -4
- package/dist/collection/components/menu-settings/menu-settings.js.map +1 -1
- package/dist/collection/components/menu-settings-item/menu-settings-item.js +1 -1
- package/dist/collection/components/message-bar/message-bar.js +1 -1
- package/dist/collection/components/modal/modal.js +3 -3
- package/dist/collection/components/modal-content/modal-content.js +1 -1
- package/dist/collection/components/modal-footer/modal-footer.js +1 -1
- package/dist/collection/components/modal-header/modal-header.js +1 -1
- package/dist/collection/components/modal-loading/modal-loading.js +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/pane/pane.js +6 -6
- package/dist/collection/components/pane-layout/pane-layout.js +1 -1
- package/dist/collection/components/pill/pill.js +4 -4
- package/dist/collection/components/progress-indicator/progress-indicator.js +3 -3
- package/dist/collection/components/push-card/push-card.js +1 -1
- package/dist/collection/components/radio/radio.js +3 -3
- package/dist/collection/components/radio-group/radio-group.js +2 -2
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/select/select.js +94 -14
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-item/select-item.js +1 -1
- package/dist/collection/components/slider/slider.js +6 -6
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-button/split-button.js +70 -12
- package/dist/collection/components/split-button/split-button.js.map +1 -1
- package/dist/collection/components/tab-item/tab-item.js +3 -3
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tile/tile.js +4 -4
- package/dist/collection/components/time-input/time-input.js +59 -5
- package/dist/collection/components/time-input/time-input.js.map +1 -1
- package/dist/collection/components/time-picker/time-picker.css +20 -52
- package/dist/collection/components/time-picker/time-picker.js +58 -38
- package/dist/collection/components/time-picker/time-picker.js.map +1 -1
- package/dist/collection/components/time-picker/time-picker.types.js.map +1 -1
- package/dist/collection/components/toast/toast-container.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/tooltip/tooltip.css +2 -3
- package/dist/collection/components/tooltip/tooltip.js +17 -6
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +4 -4
- package/dist/collection/components/typography/typography.js +1 -1
- package/dist/collection/components/upload/upload.js +3 -3
- package/dist/collection/components/utils/menu-tabs/menu-tabs-utils.js +6 -1
- package/dist/collection/components/utils/menu-tabs/menu-tabs-utils.js.map +1 -1
- package/dist/collection/components/validation-tooltip/validation-tooltip.js +2 -2
- package/dist/collection/components/workflow-step/workflow-step.js +3 -3
- package/dist/collection/components/workflow-steps/workflow-steps.js +1 -1
- package/dist/esm/{helper-text-util-BurV4TiQ.js → helper-text-util-gKdL-wH2.js} +8 -4
- package/dist/esm/helper-text-util-gKdL-wH2.js.map +1 -0
- package/dist/esm/{input.util-VHrSuCP7.js → input.fc-CQbX6V05.js} +68 -43
- package/dist/esm/input.fc-CQbX6V05.js.map +1 -0
- package/dist/esm/ix-avatar_2.entry.js +1 -1
- package/dist/esm/ix-category-filter.entry.js +14 -8
- package/dist/esm/ix-category-filter.entry.js.map +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 +9 -9
- package/dist/esm/ix-date-input.entry.js +18 -4
- package/dist/esm/ix-date-input.entry.js.map +1 -1
- package/dist/esm/ix-date-time-card.entry.js +1 -1
- package/dist/esm/ix-date-time-card.entry.js.map +1 -1
- package/dist/esm/ix-datetime-picker.entry.js +2 -2
- package/dist/esm/ix-datetime-picker.entry.js.map +1 -1
- package/dist/esm/ix-divider.entry.js +1 -1
- package/dist/esm/ix-drawer.entry.js +5 -5
- package/dist/esm/ix-dropdown-button.entry.js +3 -3
- package/dist/esm/ix-dropdown-header.entry.js +1 -1
- package/dist/esm/ix-dropdown-item.entry.js +3 -3
- package/dist/esm/ix-dropdown-quick-actions.entry.js +1 -1
- package/dist/esm/ix-dropdown.entry.js +2 -2
- package/dist/esm/ix-empty-state.entry.js +1 -1
- package/dist/esm/ix-event-list-item.entry.js +4 -4
- package/dist/esm/ix-event-list.entry.js +2 -2
- package/dist/esm/ix-expanding-search.entry.js +4 -4
- package/dist/esm/ix-field-label_2.entry.js +4 -4
- package/dist/esm/ix-filter-chip_2.entry.js +2 -2
- package/dist/esm/ix-flip-tile-content.entry.js +1 -1
- package/dist/esm/ix-flip-tile.entry.js +3 -3
- package/dist/esm/ix-group-context-menu_2.entry.js +1 -1
- package/dist/esm/ix-group.entry.js +8 -8
- package/dist/esm/ix-helper-text.entry.js +2 -2
- package/dist/esm/ix-icon-button_2.entry.js +2 -2
- package/dist/esm/ix-icon-toggle-button.entry.js +1 -1
- package/dist/esm/ix-input-group.entry.js +1 -1
- package/dist/esm/ix-input.entry.js +15 -6
- package/dist/esm/ix-input.entry.js.map +1 -1
- package/dist/esm/ix-key-value-list.entry.js +1 -1
- package/dist/esm/ix-key-value.entry.js +1 -1
- package/dist/esm/ix-kpi.entry.js +3 -3
- package/dist/esm/ix-layout-auto.entry.js +1 -1
- package/dist/esm/ix-link-button.entry.js +4 -4
- package/dist/esm/ix-link-button.entry.js.map +1 -1
- package/dist/esm/ix-menu-about-item.entry.js +1 -1
- package/dist/esm/ix-menu-about-news.entry.js +4 -4
- package/dist/esm/ix-menu-about.entry.js +6 -4
- package/dist/esm/ix-menu-about.entry.js.map +1 -1
- package/dist/esm/ix-menu-avatar.entry.js +2 -2
- package/dist/esm/ix-menu-category.entry.js +5 -5
- package/dist/esm/ix-menu-expand-icon.entry.js +1 -1
- package/dist/esm/ix-menu-item.entry.js +4 -4
- package/dist/esm/{ix-menu-settings-Bif4wByb.js → ix-menu-settings-f9o5GGw5.js} +14 -7
- package/dist/esm/ix-menu-settings-f9o5GGw5.js.map +1 -0
- package/dist/esm/ix-menu-settings-item.entry.js +1 -1
- package/dist/esm/ix-menu-settings.entry.js +1 -1
- package/dist/esm/ix-menu.entry.js +12 -12
- package/dist/esm/ix-message-bar.entry.js +1 -1
- package/dist/esm/ix-modal-content_2.entry.js +2 -2
- package/dist/esm/ix-modal-footer.entry.js +1 -1
- package/dist/esm/ix-modal-loading.entry.js +1 -1
- package/dist/esm/ix-modal.entry.js +3 -3
- package/dist/esm/ix-number-input.entry.js +158 -30
- package/dist/esm/ix-number-input.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +29 -7
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-pane-layout.entry.js +1 -1
- package/dist/esm/ix-pane.entry.js +6 -6
- package/dist/esm/ix-pill.entry.js +4 -4
- package/dist/esm/ix-progress-indicator.entry.js +3 -3
- package/dist/esm/ix-push-card.entry.js +1 -1
- package/dist/esm/ix-radio-group.entry.js +2 -2
- package/dist/esm/ix-radio.entry.js +3 -3
- package/dist/esm/ix-select.entry.js +52 -13
- package/dist/esm/ix-select.entry.js.map +1 -1
- package/dist/esm/ix-slider.entry.js +6 -6
- package/dist/esm/ix-split-button.entry.js +24 -12
- package/dist/esm/ix-split-button.entry.js.map +1 -1
- package/dist/esm/ix-tab-item_2.entry.js +5 -5
- package/dist/esm/ix-textarea.entry.js +3 -3
- package/dist/esm/ix-tile.entry.js +4 -4
- package/dist/esm/ix-time-input.entry.js +19 -5
- package/dist/esm/ix-time-input.entry.js.map +1 -1
- package/dist/esm/ix-time-picker.entry.js +56 -35
- package/dist/esm/ix-time-picker.entry.js.map +1 -1
- package/dist/esm/ix-toast-container.entry.js +2 -2
- package/dist/esm/ix-toast.entry.js +2 -2
- package/dist/esm/ix-toggle.entry.js +3 -3
- package/dist/esm/ix-tooltip.entry.js +17 -6
- package/dist/esm/ix-tooltip.entry.js.map +1 -1
- package/dist/esm/ix-tree-item.entry.js +4 -4
- package/dist/esm/ix-tree.entry.js +1 -1
- package/dist/esm/ix-typography.entry.js +1 -1
- package/dist/esm/ix-upload.entry.js +3 -3
- package/dist/esm/ix-validation-tooltip.entry.js +2 -2
- package/dist/esm/ix-workflow-step.entry.js +3 -3
- package/dist/esm/ix-workflow-steps.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/ix-category-filter.entry.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-date-time-card.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-datetime-picker.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-input.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-about.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-number-input.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-pagination.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-select.entry.esm.js.map +1 -1
- package/dist/siemens-ix/ix-split-button.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/ix-tooltip.entry.esm.js.map +1 -1
- package/dist/siemens-ix/p-0411df39.entry.js +2 -0
- package/dist/siemens-ix/p-051f428c.entry.js +2 -0
- package/dist/siemens-ix/{p-4288bd66.entry.js.map → p-051f428c.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-49843cce.entry.js → p-086d31e7.entry.js} +2 -2
- package/dist/siemens-ix/p-086d31e7.entry.js.map +1 -0
- package/dist/siemens-ix/{p-9f7f5cd3.entry.js → p-0ce03ad3.entry.js} +2 -2
- package/dist/siemens-ix/{p-60d2f3db.entry.js → p-0d621531.entry.js} +2 -2
- package/dist/siemens-ix/{p-4a127027.entry.js → p-10f2a239.entry.js} +2 -2
- package/dist/siemens-ix/{p-d70cd703.entry.js → p-196cffb5.entry.js} +2 -2
- package/dist/siemens-ix/{p-94596bff.entry.js → p-1de1a2bf.entry.js} +2 -2
- package/dist/siemens-ix/{p-b7c64537.entry.js → p-2597a988.entry.js} +2 -2
- package/dist/siemens-ix/{p-a8f08878.entry.js → p-2ffde2d5.entry.js} +2 -2
- package/dist/siemens-ix/p-31a8eaf9.entry.js +2 -0
- package/dist/siemens-ix/{p-2e3ac12c.entry.js → p-33fcea65.entry.js} +2 -2
- package/dist/siemens-ix/{p-bd2127d0.entry.js → p-367df024.entry.js} +2 -2
- package/dist/siemens-ix/{p-65c759c5.entry.js → p-3751c675.entry.js} +2 -2
- package/dist/siemens-ix/{p-76bd4cf9.entry.js → p-37bd983a.entry.js} +2 -2
- package/dist/siemens-ix/{p-d2831f7b.entry.js → p-38e45020.entry.js} +2 -2
- package/dist/siemens-ix/{p-d997238b.entry.js → p-396e1f3d.entry.js} +2 -2
- package/dist/siemens-ix/{p-0fd006b9.entry.js → p-3b7573d6.entry.js} +2 -2
- package/dist/siemens-ix/p-3ce5fd87.entry.js +2 -0
- package/dist/siemens-ix/p-3ce5fd87.entry.js.map +1 -0
- package/dist/siemens-ix/p-3f13b14e.entry.js +2 -0
- package/dist/siemens-ix/p-3f13b14e.entry.js.map +1 -0
- package/dist/siemens-ix/p-3f62166e.entry.js +2 -0
- package/dist/siemens-ix/{p-6880e267.entry.js.map → p-3f62166e.entry.js.map} +1 -1
- package/dist/siemens-ix/p-425d6925.entry.js +2 -0
- package/dist/siemens-ix/{p-ec3ec461.entry.js → p-484bddf4.entry.js} +2 -2
- package/dist/siemens-ix/{p-df5494ff.entry.js → p-496e98ac.entry.js} +2 -2
- package/dist/siemens-ix/{p-ab6d123c.entry.js → p-4c18f123.entry.js} +2 -2
- package/dist/siemens-ix/{p-c96ce76c.entry.js → p-4c1f90cb.entry.js} +2 -2
- package/dist/siemens-ix/{p-a53d7dbb.entry.js → p-4e4d792d.entry.js} +2 -2
- package/dist/siemens-ix/p-51ae739e.entry.js +2 -0
- package/dist/siemens-ix/p-51ae739e.entry.js.map +1 -0
- package/dist/siemens-ix/{p-80981f03.entry.js → p-5779f16e.entry.js} +2 -2
- package/dist/siemens-ix/{p-4d0e900c.entry.js → p-5b57bde1.entry.js} +2 -2
- package/dist/siemens-ix/{p-6045dce9.entry.js → p-5d6f43fd.entry.js} +2 -2
- package/dist/siemens-ix/p-5iwF1M9X.js +2 -0
- package/dist/siemens-ix/p-5iwF1M9X.js.map +1 -0
- package/dist/siemens-ix/{p-2b2f339e.entry.js → p-6445a54f.entry.js} +2 -2
- package/dist/siemens-ix/{p-acb7c236.entry.js → p-667e3184.entry.js} +2 -2
- package/dist/siemens-ix/{p-92e0ebf1.entry.js → p-6a4bc78a.entry.js} +2 -2
- package/dist/siemens-ix/p-6dc6eb63.entry.js +2 -0
- package/dist/siemens-ix/{p-453aa17a.entry.js.map → p-6dc6eb63.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-319e292f.entry.js → p-74e7b03f.entry.js} +2 -2
- package/dist/siemens-ix/{p-7c474c82.entry.js → p-77fd2138.entry.js} +2 -2
- package/dist/siemens-ix/{p-11b1eaa3.entry.js → p-7bad0544.entry.js} +2 -2
- package/dist/siemens-ix/{p-23e4f5f3.entry.js → p-7beba4ad.entry.js} +2 -2
- package/dist/siemens-ix/p-7beba4ad.entry.js.map +1 -0
- package/dist/siemens-ix/{p-ffe0835b.entry.js → p-7f90eeef.entry.js} +2 -2
- package/dist/siemens-ix/{p-b76ed7c3.entry.js → p-84df2a86.entry.js} +2 -2
- package/dist/siemens-ix/p-84df2a86.entry.js.map +1 -0
- package/dist/siemens-ix/p-8b42ad35.entry.js +2 -0
- package/dist/siemens-ix/{p-31f77d98.entry.js.map → p-8b42ad35.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-5c22d3e5.entry.js → p-8f9368b8.entry.js} +2 -2
- package/dist/siemens-ix/p-8fa8d0e3.entry.js +2 -0
- package/dist/siemens-ix/p-92ec7f27.entry.js +2 -0
- package/dist/siemens-ix/{p-DBsKyLIP.js → p-BcCDexod.js} +2 -2
- package/dist/siemens-ix/p-BcCDexod.js.map +1 -0
- package/dist/siemens-ix/p-Cn013Iz8.js +2 -0
- package/dist/siemens-ix/p-Cn013Iz8.js.map +1 -0
- package/dist/siemens-ix/p-a3baca2f.entry.js +2 -0
- package/dist/siemens-ix/{p-75a10c1e.entry.js → p-b3453edf.entry.js} +2 -2
- package/dist/siemens-ix/p-b41a7abb.entry.js +2 -0
- package/dist/siemens-ix/{p-53df921a.entry.js.map → p-b41a7abb.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-9a4db5e9.entry.js → p-b76df1c7.entry.js} +2 -2
- package/dist/siemens-ix/{p-332dccc7.entry.js → p-b7ef70d4.entry.js} +2 -2
- package/dist/siemens-ix/{p-43ecc5c3.entry.js → p-b8f4b001.entry.js} +2 -2
- package/dist/siemens-ix/{p-531f9746.entry.js → p-b9880608.entry.js} +2 -2
- package/dist/siemens-ix/{p-619a3dc8.entry.js → p-c5c863e1.entry.js} +2 -2
- package/dist/siemens-ix/{p-bb744e91.entry.js → p-c94739d0.entry.js} +2 -2
- package/dist/siemens-ix/{p-8cb3d70c.entry.js → p-ca3b24b1.entry.js} +2 -2
- package/dist/siemens-ix/{p-4acf0d7b.entry.js → p-cd1afcc9.entry.js} +2 -2
- package/dist/siemens-ix/{p-713df610.entry.js → p-cf041cfd.entry.js} +2 -2
- package/dist/siemens-ix/{p-338c68ea.entry.js → p-d10b9798.entry.js} +2 -2
- package/dist/siemens-ix/{p-6fd7d11a.entry.js → p-d193381f.entry.js} +2 -2
- package/dist/siemens-ix/{p-d90d1310.entry.js → p-d3a60c52.entry.js} +2 -2
- package/dist/siemens-ix/p-d688f76e.entry.js +2 -0
- package/dist/siemens-ix/{p-2d96a4a1.entry.js.map → p-d688f76e.entry.js.map} +1 -1
- package/dist/siemens-ix/p-dc8de6cb.entry.js +2 -0
- package/dist/siemens-ix/p-dc8de6cb.entry.js.map +1 -0
- package/dist/siemens-ix/p-dd16efd4.entry.js +2 -0
- package/dist/siemens-ix/p-dd16efd4.entry.js.map +1 -0
- package/dist/siemens-ix/p-de12078d.entry.js +2 -0
- package/dist/siemens-ix/{p-418671c7.entry.js.map → p-de12078d.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-f40573e7.entry.js → p-df6bb698.entry.js} +2 -2
- package/dist/siemens-ix/p-e0b9cf68.entry.js +2 -0
- package/dist/siemens-ix/{p-5bb86bf7.entry.js → p-e42f62a1.entry.js} +2 -2
- package/dist/siemens-ix/{p-fb02d7fd.entry.js → p-e48977ed.entry.js} +2 -2
- package/dist/siemens-ix/{p-3099c12a.entry.js → p-e7bdc0a0.entry.js} +2 -2
- package/dist/siemens-ix/p-e7bdc0a0.entry.js.map +1 -0
- package/dist/siemens-ix/{p-ff6f13e1.entry.js → p-ea15fc79.entry.js} +2 -2
- package/dist/siemens-ix/{p-18d4645d.entry.js → p-ea37abf6.entry.js} +2 -2
- package/dist/siemens-ix/{p-f253d38c.entry.js → p-eba7f62c.entry.js} +2 -2
- package/dist/siemens-ix/{p-b64a3d8a.entry.js → p-ebef3d52.entry.js} +2 -2
- package/dist/siemens-ix/p-f05aa76f.entry.js +2 -0
- package/dist/siemens-ix/p-f05aa76f.entry.js.map +1 -0
- package/dist/siemens-ix/p-fb8877bc.entry.js +2 -0
- package/dist/siemens-ix/p-fb8877bc.entry.js.map +1 -0
- package/dist/siemens-ix/{p-e3dca831.entry.js → p-ff83eafd.entry.js} +2 -2
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +2 -5
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/types/components/date-input/date-input.d.ts +10 -0
- package/dist/types/components/field-wrapper/helper-text-util.d.ts +5 -1
- package/dist/types/components/input/input.d.ts +9 -0
- package/dist/types/components/input/input.fc.d.ts +6 -0
- package/dist/types/components/input/input.util.d.ts +1 -0
- package/dist/types/components/input/number-input.d.ts +31 -5
- package/dist/types/components/menu-about/menu-about.d.ts +1 -1
- package/dist/types/components/menu-settings/menu-settings.d.ts +1 -1
- package/dist/types/components/pagination/pagination.d.ts +8 -0
- package/dist/types/components/select/select.d.ts +11 -0
- package/dist/types/components/split-button/split-button.d.ts +15 -4
- package/dist/types/components/time-input/time-input.d.ts +10 -0
- package/dist/types/components/time-picker/time-picker.d.ts +6 -1
- package/dist/types/components/tooltip/tooltip.d.ts +2 -1
- package/dist/types/components/utils/menu-tabs/menu-tabs-utils.d.ts +1 -0
- package/dist/types/components.d.ts +160 -12
- package/hydrate/index.js +673 -347
- package/hydrate/index.mjs +673 -347
- package/package.json +1 -1
- package/scss/components/_links.scss +2 -5
- package/scss/mixins/_input.scss +2 -2
- package/scss/theme/classic/dark/_variables.scss +1 -1
- package/components/p-C56HnkHy.js.map +0 -1
- package/components/p-CDPfohEH.js.map +0 -1
- package/components/p-ChFNWyCb.js.map +0 -1
- package/components/p-CvuFiT5X.js.map +0 -1
- package/components/p-FWLjfP4_.js.map +0 -1
- package/components/p-OLe05BAC.js.map +0 -1
- package/components/p-Ow_osSm5.js.map +0 -1
- package/components/p-S6nC3Yb4.js.map +0 -1
- package/dist/cjs/helper-text-util-BlElJLxk.js.map +0 -1
- package/dist/cjs/input.util-4AhBphgX.js.map +0 -1
- package/dist/cjs/ix-menu-settings-Cdqo0r8E.js.map +0 -1
- package/dist/esm/helper-text-util-BurV4TiQ.js.map +0 -1
- package/dist/esm/input.util-VHrSuCP7.js.map +0 -1
- package/dist/esm/ix-menu-settings-Bif4wByb.js.map +0 -1
- package/dist/siemens-ix/p-10ed549b.entry.js +0 -2
- package/dist/siemens-ix/p-10ed549b.entry.js.map +0 -1
- package/dist/siemens-ix/p-1550973a.entry.js +0 -2
- package/dist/siemens-ix/p-1de6e736.entry.js +0 -2
- package/dist/siemens-ix/p-1de6e736.entry.js.map +0 -1
- package/dist/siemens-ix/p-23e4f5f3.entry.js.map +0 -1
- package/dist/siemens-ix/p-2d96a4a1.entry.js +0 -2
- package/dist/siemens-ix/p-3099c12a.entry.js.map +0 -1
- package/dist/siemens-ix/p-31f77d98.entry.js +0 -2
- package/dist/siemens-ix/p-418671c7.entry.js +0 -2
- package/dist/siemens-ix/p-4288bd66.entry.js +0 -2
- package/dist/siemens-ix/p-453aa17a.entry.js +0 -2
- package/dist/siemens-ix/p-45b53c34.entry.js +0 -2
- package/dist/siemens-ix/p-45b53c34.entry.js.map +0 -1
- package/dist/siemens-ix/p-49843cce.entry.js.map +0 -1
- package/dist/siemens-ix/p-53df921a.entry.js +0 -2
- package/dist/siemens-ix/p-598ece5a.entry.js +0 -2
- package/dist/siemens-ix/p-6880e267.entry.js +0 -2
- package/dist/siemens-ix/p-712e393d.entry.js +0 -2
- package/dist/siemens-ix/p-712e393d.entry.js.map +0 -1
- package/dist/siemens-ix/p-89a7705b.entry.js +0 -2
- package/dist/siemens-ix/p-89a7705b.entry.js.map +0 -1
- package/dist/siemens-ix/p-DBsKyLIP.js.map +0 -1
- package/dist/siemens-ix/p-DS9crO46.js +0 -2
- package/dist/siemens-ix/p-DS9crO46.js.map +0 -1
- package/dist/siemens-ix/p-DXAZefAa.js +0 -2
- package/dist/siemens-ix/p-DXAZefAa.js.map +0 -1
- package/dist/siemens-ix/p-a0ffeea7.entry.js +0 -2
- package/dist/siemens-ix/p-a6e398d2.entry.js +0 -2
- package/dist/siemens-ix/p-b76ed7c3.entry.js.map +0 -1
- package/dist/siemens-ix/p-b7da78c6.entry.js +0 -2
- package/dist/siemens-ix/p-b7da78c6.entry.js.map +0 -1
- package/dist/siemens-ix/p-c6536a88.entry.js +0 -2
- package/dist/siemens-ix/p-d18df859.entry.js +0 -2
- package/dist/siemens-ix/p-e5180acd.entry.js +0 -2
- package/dist/siemens-ix/p-e5180acd.entry.js.map +0 -1
- package/dist/siemens-ix/p-fdb802ac.entry.js +0 -2
- /package/dist/siemens-ix/{p-fdb802ac.entry.js.map → p-0411df39.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-9f7f5cd3.entry.js.map → p-0ce03ad3.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-60d2f3db.entry.js.map → p-0d621531.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-4a127027.entry.js.map → p-10f2a239.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d70cd703.entry.js.map → p-196cffb5.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-94596bff.entry.js.map → p-1de1a2bf.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-b7c64537.entry.js.map → p-2597a988.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-a8f08878.entry.js.map → p-2ffde2d5.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-598ece5a.entry.js.map → p-31a8eaf9.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-2e3ac12c.entry.js.map → p-33fcea65.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-bd2127d0.entry.js.map → p-367df024.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-65c759c5.entry.js.map → p-3751c675.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-76bd4cf9.entry.js.map → p-37bd983a.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d2831f7b.entry.js.map → p-38e45020.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d997238b.entry.js.map → p-396e1f3d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-0fd006b9.entry.js.map → p-3b7573d6.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-c6536a88.entry.js.map → p-425d6925.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ec3ec461.entry.js.map → p-484bddf4.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-df5494ff.entry.js.map → p-496e98ac.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ab6d123c.entry.js.map → p-4c18f123.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-c96ce76c.entry.js.map → p-4c1f90cb.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-a53d7dbb.entry.js.map → p-4e4d792d.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-80981f03.entry.js.map → p-5779f16e.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-4d0e900c.entry.js.map → p-5b57bde1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6045dce9.entry.js.map → p-5d6f43fd.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-2b2f339e.entry.js.map → p-6445a54f.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-acb7c236.entry.js.map → p-667e3184.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-92e0ebf1.entry.js.map → p-6a4bc78a.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-319e292f.entry.js.map → p-74e7b03f.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-7c474c82.entry.js.map → p-77fd2138.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-11b1eaa3.entry.js.map → p-7bad0544.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ffe0835b.entry.js.map → p-7f90eeef.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-5c22d3e5.entry.js.map → p-8f9368b8.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d18df859.entry.js.map → p-8fa8d0e3.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-a6e398d2.entry.js.map → p-92ec7f27.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-1550973a.entry.js.map → p-a3baca2f.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-75a10c1e.entry.js.map → p-b3453edf.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-9a4db5e9.entry.js.map → p-b76df1c7.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-332dccc7.entry.js.map → p-b7ef70d4.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-43ecc5c3.entry.js.map → p-b8f4b001.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-531f9746.entry.js.map → p-b9880608.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-619a3dc8.entry.js.map → p-c5c863e1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-bb744e91.entry.js.map → p-c94739d0.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-8cb3d70c.entry.js.map → p-ca3b24b1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-4acf0d7b.entry.js.map → p-cd1afcc9.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-713df610.entry.js.map → p-cf041cfd.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-338c68ea.entry.js.map → p-d10b9798.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-6fd7d11a.entry.js.map → p-d193381f.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-d90d1310.entry.js.map → p-d3a60c52.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-f40573e7.entry.js.map → p-df6bb698.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-a0ffeea7.entry.js.map → p-e0b9cf68.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-5bb86bf7.entry.js.map → p-e42f62a1.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-fb02d7fd.entry.js.map → p-e48977ed.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-ff6f13e1.entry.js.map → p-ea15fc79.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-18d4645d.entry.js.map → p-ea37abf6.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-f253d38c.entry.js.map → p-eba7f62c.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-b64a3d8a.entry.js.map → p-ebef3d52.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-e3dca831.entry.js.map → p-ff83eafd.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-text-util.js","sourceRoot":"","sources":["../../../src/components/field-wrapper/helper-text-util.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACZ,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,UAAU,CAAC,EACzB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,UAAU,
|
|
1
|
+
{"version":3,"file":"helper-text-util.js","sourceRoot":"","sources":["../../../src/components/field-wrapper/helper-text-util.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EACL,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACZ,MAA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ACE,KAAK,EAAC,mBAAmB,EACzB,IAAI,EAAE,WAAW,EACjB,IAAI,EAAC,IAAI,GACA;YACV,KAAK,CAAC,WAAW,CACJ,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACnE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,gBAAgB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,IAAI,GAAW;YACnE,KAAK,CAAC,QAAQ,CACD,CACjB,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACtE,OAAO,CACL,qBAAe,SAAS,EAAC,KAAK,EAAC,KAAK,EAAC,aAAa;YAChD,eAAS,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAC,IAAI,GAAW;YACvE,KAAK,CAAC,SAAS,CACF,CACjB,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAK,CAAC,UAAU;QAChB,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAChC,qBAAe,KAAK,EAAC,aAAa,EAAC,SAAS,EAAC,MAAM,IAChD,KAAK,CAAC,UAAU,CACH,CACjB,CACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { h } from '@stencil/core';\nimport {\n iconError,\n iconInfo,\n iconSuccess,\n iconWarning,\n} from '@siemens/ix-icons/icons';\n\nexport function hasAnyText({\n invalidText,\n isInvalid,\n warningText,\n isWarning,\n infoText,\n isInfo,\n validText,\n isValid,\n helperText,\n}: {\n invalidText?: string;\n isInvalid?: boolean;\n warningText?: string;\n isWarning?: boolean;\n infoText?: string;\n isInfo?: boolean;\n validText?: string;\n isValid?: boolean;\n helperText?: string;\n}) {\n return !!(\n (isInvalid && invalidText?.trim()) ||\n (isWarning && warningText?.trim()) ||\n (isInfo && infoText?.trim()) ||\n (isValid && validText?.trim()) ||\n helperText?.trim()\n );\n}\n\nexport function HelperText(\n props: Readonly<{\n isInvalid: boolean;\n invalidText?: string;\n isWarning: boolean;\n warningText?: string;\n isInfo: boolean;\n infoText?: string;\n isValid: boolean;\n validText?: string;\n helperText?: string;\n }>\n) {\n if (!hasAnyText(props)) return null;\n if (props.isInvalid && props.invalidText && props.invalidText.trim() !== '') {\n return (\n <ix-typography textColor=\"alarm\" class=\"bottom-text\">\n <ix-icon class=\"text-icon invalid\" name={iconError} size=\"16\"></ix-icon>\n {props.invalidText}\n </ix-typography>\n );\n }\n\n if (props.isWarning && props.warningText && props.warningText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon\n class=\"text-icon warning\"\n name={iconWarning}\n size=\"16\"\n ></ix-icon>\n {props.warningText}\n </ix-typography>\n );\n }\n\n if (props.isInfo && props.infoText && props.infoText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon info\" name={iconInfo} size=\"16\"></ix-icon>\n {props.infoText}\n </ix-typography>\n );\n }\n\n if (props.isValid && props.validText && props.validText.trim() !== '') {\n return (\n <ix-typography textColor=\"std\" class=\"bottom-text\">\n <ix-icon class=\"text-icon valid\" name={iconSuccess} size=\"16\"></ix-icon>\n {props.validText}\n </ix-typography>\n );\n }\n\n return (\n props.helperText &&\n props.helperText.trim() !== '' && (\n <ix-typography class=\"bottom-text\" textColor=\"soft\">\n {props.helperText}\n </ix-typography>\n )\n );\n}\n"]}
|
|
@@ -25,7 +25,7 @@ export class FilterChip {
|
|
|
25
25
|
this.closeClick.emit();
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '03b4a6c34e034efe267406a523a902e85665b351', class: { disabled: this.disabled, readonly: this.readonly }, title: this.hostElement.textContent }, h("div", { key: '75c8992cf2e8dc2d2ff76d1579219ff4bef46fd2', class: "slot-container" }, h("slot", { key: 'ea52727be5fa2cda2f9ddaa2a7a37a1c7c1f4f91' })), !this.disabled && !this.readonly ? (h("ix-icon-button", { variant: "tertiary", oval: true, icon: iconCloseSmall, size: "16", tabindex: this.disabled ? -1 : 0, disabled: this.disabled, onClick: (e) => this.onCloseClick(e), "aria-label": this.ariaLabelCloseIconButton })) : null));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "ix-filter-chip"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -117,7 +117,7 @@ export class FlipTile {
|
|
|
117
117
|
}, 2 * Animation.defaultTime);
|
|
118
118
|
}
|
|
119
119
|
render() {
|
|
120
|
-
return (h(Host, { key: '
|
|
120
|
+
return (h(Host, { key: '32727b4df750f9d1892f365a7e8d729447be05ac', class: {
|
|
121
121
|
[`flip-tile-variant-${this.variant}`]: true,
|
|
122
122
|
}, style: {
|
|
123
123
|
height: `${this.height}${this.height === 'auto' ? '' : 'rem'}`,
|
|
@@ -126,10 +126,10 @@ export class FlipTile {
|
|
|
126
126
|
width: `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
|
|
127
127
|
'min-width': `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
|
|
128
128
|
'max-width': `${this.width}${this.width === 'auto' ? '' : 'rem'}`,
|
|
129
|
-
} }, h("div", { key: '
|
|
129
|
+
} }, h("div", { key: 'e58093dce55ede49f9f1782327c73918ee21d2c6', class: "flip-tile-container" }, h("div", { key: 'bd60e44b5b04177c4003936aa15d6539cd093883', class: "flip-tile-header" }, h("div", { key: '792d0e39b406fb50561f3c35c0340ee827b568e6', class: "header-slot-container text-l-title" }, h("slot", { key: '9e320aef9f89689b594c9555e154c8795dbdb233', name: "header" })), h("ix-icon-button", { key: 'dc0a042565001a79ea17e33671f4c2486b702ebf', icon: iconEye, variant: "tertiary", onClick: () => this.toggleIndex(), "aria-label": this.ariaLabelEyeIconButton })), h("div", { key: 'fa61544ccf0e16884c4d747e0e7cc174216d7906', class: "content-container" }, h("slot", { key: '1ed79120c3e926bb5f48a0e1980f5dfb785050f8' })), h("div", { key: '543216df0a9e93c9a739b921259e529eb494e751', class: {
|
|
130
130
|
footer: true,
|
|
131
131
|
'show-footer': this.hasFooterSlot,
|
|
132
|
-
} }, h("slot", { key: '
|
|
132
|
+
} }, h("slot", { key: '271f61fc236be2813cec900c788fe4bfcb2c285d', name: "footer", onSlotchange: (event) => this.handleFooterSlotChange(event) })))));
|
|
133
133
|
}
|
|
134
134
|
static get is() { return "ix-flip-tile"; }
|
|
135
135
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,7 +17,7 @@ export class FlipTileContent {
|
|
|
17
17
|
this.contentVisible = false;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return h(Host, { key: '
|
|
20
|
+
return h(Host, { key: '264e3539d6c5abcd8716968a4128da99ca191375' }, this.contentVisible ? h("slot", null) : null);
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "ix-flip-tile-content"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,7 +38,7 @@ export class GroupContextMenu {
|
|
|
38
38
|
this.configureDropdown(dropdownElement, triggerElement);
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '13eed06b9866e6d59f3972d2940f752d8f245b52' }, h("ix-icon-button", { key: '6fc57583df2308b3fa234d8fd675cbcb05a55974', class: { hide: !this.showContextMenu }, size: "24", variant: "subtle-tertiary", icon: iconContextMenu }), h("slot", { key: 'b56d53e0b2154c0eefcd99fdd8eeb508457b7641', onSlotchange: () => this.onSlotChange() })));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "ix-group-context-menu"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -137,27 +137,27 @@ export class Group {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: 'b93d2c8f1290baa2983945ce349b90e95bf18696' }, h("div", { key: '3e9ce7ce3402f48bb17612a97bf9bee85767c6aa', class: {
|
|
141
141
|
'group-header': true,
|
|
142
142
|
expand: this.expanded,
|
|
143
143
|
selected: this.selected,
|
|
144
|
-
}, tabindex: "0" }, h("div", { key: '
|
|
144
|
+
}, tabindex: "0" }, h("div", { key: 'daeb1087643b9f0267b3e2ba13a3973486730888', class: "group-header-clickable", onClick: (e) => this.onHeaderClick(e) }, h("div", { key: '9771b2df1e5b68339aa9c4689de4b2d24bc09341', class: {
|
|
145
145
|
'group-header-selection-indicator': true,
|
|
146
146
|
'group-header-selection-indicator-item-selected': this.itemSelected,
|
|
147
|
-
} }), h("div", { key: '
|
|
147
|
+
} }), h("div", { key: 'e0e1454e780614a31955720bd7b62d7bfec1b7e0', class: "btn-expand-header" }, h("ix-icon", { key: '0742c7515bbac3d3ba0221a5c3b0860d6a1792a2', "data-testid": "expand-collapsed-icon", class: {
|
|
148
148
|
hidden: !this.showExpandCollapsedIcon,
|
|
149
|
-
}, name: this.expanded ? iconChevronUpSmall : iconChevronDownSmall, onClick: (event) => this.onExpandClick(event) })), h("div", { key: '
|
|
149
|
+
}, name: this.expanded ? iconChevronUpSmall : iconChevronDownSmall, onClick: (event) => this.onExpandClick(event) })), h("div", { key: '4aa355b5a3a7f70977275139779000b2474a4a91', class: "group-header-content" }, this.header ? (h("div", { class: "group-header-props-container" }, h("div", { class: "group-header-title" }, h("span", { title: this.header }, this.header)), h("div", { class: "group-subheader", title: this.subHeader }, this.subHeader))) : null, h("slot", { key: 'c782251ecc1044aa3f7923d8f58b7f9c28700b4f', name: "header" }))), this.hasDropdown && (h("ix-group-context-menu", { key: '0899d27a51f412aea136b00fcae9ab32859670f4' }, h("slot", { key: '76f9b3b94312879ac5e349546172e3d95aefce78', name: "dropdown" })))), h("div", { key: 'f6a6aac17d8685244c28b8c6ecd24c966985ba1b', class: {
|
|
150
150
|
'group-content': true,
|
|
151
|
-
} }, h("div", { key: '
|
|
151
|
+
} }, h("div", { key: 'f805cc015b7bf9c919ea9129500e4af8773b7f63', style: {
|
|
152
152
|
display: this.expanded ? 'contents' : 'none',
|
|
153
|
-
} }, h("slot", { key: '
|
|
153
|
+
} }, h("slot", { key: '703791e124429a91a5798429443c3494d18b262d', onSlotchange: () => {
|
|
154
154
|
var _a;
|
|
155
155
|
const slot = (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])');
|
|
156
156
|
this.showExpandCollapsedIcon = hasSlottedElements(slot);
|
|
157
|
-
} }), h("ix-group-item", { key: '
|
|
157
|
+
} }), h("ix-group-item", { key: '5e471c137730667bd459ac80943369b59f81c544', class: {
|
|
158
158
|
footer: true,
|
|
159
159
|
'footer-visible': this.footerVisible,
|
|
160
|
-
}, groupFooter: true, suppressSelection: true }, h("slot", { key: '
|
|
160
|
+
}, groupFooter: true, suppressSelection: true }, h("slot", { key: '84526685ab81de426a70ecfb52db3211b4a3219b', name: "footer", onSlotchange: () => this.onSlotChange() }))))));
|
|
161
161
|
}
|
|
162
162
|
static get is() { return "ix-group"; }
|
|
163
163
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,7 +43,7 @@ export class HelperText {
|
|
|
43
43
|
this.validationResults = checkFieldClasses(forElement);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '95d6dfb6a163ee5e6b4d7d478780af394427548c' }, h(HelperTextUtil, Object.assign({ key: 'dc7f97b4cb8b2563c1a1089764e25eb63c75b583', helperText: this.helperText,
|
|
47
47
|
invalidText: this.invalidText,
|
|
48
48
|
validText: this.validText,
|
|
49
49
|
infoText: this.infoText,
|
|
@@ -79,7 +79,7 @@ export class IconButton {
|
|
|
79
79
|
type: this.type,
|
|
80
80
|
extraClasses: this.getIconSizeClass(),
|
|
81
81
|
};
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '04486b7d26d2b34a920b53f683b3b1b591b95311', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: '94936955261d6fc13e78ea98ddb3cf98d3fda058' }, baseButtonProps))));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "ix-icon-button"; }
|
|
85
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -75,7 +75,7 @@ export class IconToggleButton {
|
|
|
75
75
|
},
|
|
76
76
|
extraClasses: Object.assign({ 'icon-button': true }, this.getIconSizeClass()),
|
|
77
77
|
};
|
|
78
|
-
return (h(Host, { key: '
|
|
78
|
+
return (h(Host, { key: 'cac43636bbec0b7a783309bc8acfff59dc899077', class: Object.assign(Object.assign({}, this.getIconSizeClass()), { disabled: this.disabled || this.loading }) }, h(BaseIconButton, Object.assign({ key: 'c1476c415753b630b480542ea220854ecb8c56a9' }, baseButtonProps))));
|
|
79
79
|
}
|
|
80
80
|
static get is() { return "ix-icon-toggle-button"; }
|
|
81
81
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import { h } from "@stencil/core";
|
|
10
|
+
import { handleSubmitOnEnterKeydown } from "./input.util";
|
|
10
11
|
export function TextareaElement(props) {
|
|
11
12
|
return (h("textarea", Object.assign({ readOnly: props.readonly, disabled: props.disabled, maxLength: props.maxLength, minLength: props.minLength, cols: props.textareaCols, rows: props.textareaRows, ref: props.textAreaRef, class: {
|
|
12
13
|
'is-invalid': props.isInvalid,
|
|
@@ -23,7 +24,15 @@ export function TextareaElement(props) {
|
|
|
23
24
|
export function InputElement(props) {
|
|
24
25
|
return (h("input", Object.assign({ id: props.id, autoComplete: "off", readOnly: props.readonly, disabled: props.disabled, step: props.step, min: props.min, max: props.max, maxLength: props.maxLength ? Number(props.maxLength) : undefined, minLength: props.minLength ? Number(props.minLength) : undefined, ref: props.inputRef, pattern: props.pattern, type: props.type, class: {
|
|
25
26
|
'is-invalid': props.isInvalid,
|
|
26
|
-
},
|
|
27
|
+
}, style: {
|
|
28
|
+
textAlign: props.textAlignment,
|
|
29
|
+
}, required: props.required, value: props.value, placeholder: props.placeholder, onKeyPress: (event) => props.onKeyPress(event), onKeyDown: (e) => {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
32
|
+
handleSubmitOnEnterKeydown(e, !!props.suppressSubmitOnEnter, props.form);
|
|
33
|
+
} }, {
|
|
34
|
+
onBeforeInput: (event) => { var _a; return (_a = props.onBeforeInput) === null || _a === void 0 ? void 0 : _a.call(props, event); },
|
|
35
|
+
}, { onPaste: (event) => { var _a; return (_a = props.onPaste) === null || _a === void 0 ? void 0 : _a.call(props, event); }, onInput: (inputEvent) => {
|
|
27
36
|
const target = inputEvent.target;
|
|
28
37
|
props.updateFormInternalValue(target.value);
|
|
29
38
|
props.valueChange(target.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.fc.js","sourceRoot":"","sources":["../../../src/components/input/input.fc.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"input.fc.js","sourceRoot":"","sources":["../../../src/components/input/input.fc.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,0BAA0B,E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;YACrD,KAAK,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC,EACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IACxB,KAAK,CAAC,cAAc,EACjB,CACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAGf,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;IACvB,OAAO,CACL,WAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU;QAC9C,YAAM,IAAI,EAAC,KAAK,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS;QACzD,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAGjB,CAAC,KAAK,EAAE,EAAE;IACb,OAAO,CACL,WAAK,KAAK,EAAC,iBAAiB,EAAC,GAAG,EAAE,KAAK,CAAC,YAAY;QAClD,YAAM,IAAI,EAAC,OAAO,EAAC,YAAY,EAAE,KAAK,CAAC,YAAY,GAAS,CACxD,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*\n * SPDX-FileCopyrightText: 2024 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { handleSubmitOnEnterKeydown } from './input.util';\nimport { MakeRef } from '../utils/make-ref';\n\nexport function TextareaElement(\n props: Readonly<{\n resizeBehavior: 'both' | 'horizontal' | 'vertical' | 'none';\n textareaHeight?: string;\n textareaWidth?: string;\n textareaRows?: number;\n textareaCols?: number;\n disabled: boolean;\n readonly: boolean;\n maxLength?: number;\n minLength?: number;\n isInvalid: boolean;\n required: boolean;\n value: string;\n placeholder?: string;\n textAreaRef: (el: HTMLTextAreaElement | undefined) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n }>\n) {\n return (\n <textarea\n readOnly={props.readonly}\n disabled={props.disabled}\n maxLength={props.maxLength}\n minLength={props.minLength}\n cols={props.textareaCols}\n rows={props.textareaRows}\n ref={props.textAreaRef}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n style={{\n resize: props.resizeBehavior,\n height: props.textareaHeight,\n width: props.textareaWidth,\n }}\n {...props.ariaAttributes}\n ></textarea>\n );\n}\n\nexport function InputElement(\n props: Readonly<{\n id: string;\n disabled: boolean;\n readonly: boolean;\n maxLength?: string | number;\n minLength?: string | number;\n max?: string | number;\n min?: string | number;\n step?: string | number;\n pattern?: string;\n type: string;\n isInvalid: boolean;\n required: boolean;\n value: string | number;\n placeholder?: string;\n textAlignment?: 'start' | 'end';\n inputRef: (el: HTMLInputElement | undefined) => void;\n onKeyPress: (event: KeyboardEvent) => void;\n onKeyDown?: (event: KeyboardEvent) => void;\n onBeforeInput?: (event: InputEvent) => void;\n onPaste?: (event: ClipboardEvent) => void;\n valueChange: (value: string) => void;\n updateFormInternalValue: (value: string) => void;\n onBlur: () => void;\n ariaAttributes?: A11yAttributes;\n form?: HTMLFormElement;\n suppressSubmitOnEnter?: boolean;\n }>\n) {\n return (\n <input\n id={props.id}\n autoComplete=\"off\"\n readOnly={props.readonly}\n disabled={props.disabled}\n step={props.step}\n min={props.min}\n max={props.max}\n maxLength={props.maxLength ? Number(props.maxLength) : undefined}\n minLength={props.minLength ? Number(props.minLength) : undefined}\n ref={props.inputRef}\n pattern={props.pattern}\n type={props.type}\n class={{\n 'is-invalid': props.isInvalid,\n }}\n style={{\n textAlign: props.textAlignment,\n }}\n required={props.required}\n value={props.value}\n placeholder={props.placeholder}\n onKeyPress={(event) => props.onKeyPress(event)}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n handleSubmitOnEnterKeydown(\n e,\n !!props.suppressSubmitOnEnter,\n props.form\n );\n }}\n {...({\n onBeforeInput: (event: InputEvent) => props.onBeforeInput?.(event),\n } as any)}\n onPaste={(event) => props.onPaste?.(event)}\n onInput={(inputEvent) => {\n const target = inputEvent.target as HTMLInputElement;\n props.updateFormInternalValue(target.value);\n props.valueChange(target.value);\n }}\n onBlur={() => props.onBlur()}\n {...props.ariaAttributes}\n ></input>\n );\n}\n\nexport const SlotEnd: FunctionalComponent<{\n slotEndRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props, children) => {\n return (\n <div class=\"end-container\" ref={props.slotEndRef}>\n <slot name=\"end\" onSlotchange={props.onSlotChange}></slot>\n {children}\n </div>\n );\n};\n\nexport const SlotStart: FunctionalComponent<{\n slotStartRef: MakeRef<HTMLDivElement>;\n onSlotChange?: (e: Event) => void;\n}> = (props) => {\n return (\n <div class=\"start-container\" ref={props.slotStartRef}>\n <slot name=\"start\" onSlotchange={props.onSlotChange}></slot>\n </div>\n );\n};\n"]}
|
|
@@ -50,6 +50,15 @@ export class Input {
|
|
|
50
50
|
* Specifies whether the text field is readonly.
|
|
51
51
|
*/
|
|
52
52
|
this.readonly = false;
|
|
53
|
+
/**
|
|
54
|
+
* If false, pressing Enter will submit the form (if inside a form).
|
|
55
|
+
* Set to true to suppress submit on Enter.
|
|
56
|
+
*/
|
|
57
|
+
this.suppressSubmitOnEnter = false;
|
|
58
|
+
/**
|
|
59
|
+
* Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.
|
|
60
|
+
*/
|
|
61
|
+
this.textAlignment = 'start';
|
|
53
62
|
this.isInvalid = false;
|
|
54
63
|
this.isValid = false;
|
|
55
64
|
this.isInfo = false;
|
|
@@ -122,15 +131,15 @@ export class Input {
|
|
|
122
131
|
return Promise.resolve(this.touched);
|
|
123
132
|
}
|
|
124
133
|
render() {
|
|
125
|
-
var _a;
|
|
134
|
+
var _a, _b;
|
|
126
135
|
const inputAria = getAriaAttributesForInput(this);
|
|
127
|
-
return (h(Host, { key: '
|
|
136
|
+
return (h(Host, { key: '07337a899a3b73d3cb37b1fc84da266d95cff84a', class: {
|
|
128
137
|
disabled: this.disabled,
|
|
129
138
|
readonly: this.readonly,
|
|
130
|
-
} }, h("ix-field-wrapper", { key: '
|
|
139
|
+
} }, h("ix-field-wrapper", { key: '64461a842b4a784192fd7ab9fdc972bd4810785a', htmlForLabel: this.inputId, required: this.required, label: this.label, helperText: this.helperText, invalidText: this.invalidText, infoText: this.infoText, warningText: this.warningText, validText: this.validText, showTextAsTooltip: this.showTextAsTooltip, isInvalid: this.isInvalid, isValid: this.isValid, isInfo: this.isInfo, isWarning: this.isWarning, controlRef: this.inputRef }, h("div", { key: 'aac87eb96cb2cba4b9f86527b6d7784d0a015474', class: "input-wrapper" }, h(SlotStart, { key: '87bcf8d63bd1a4020a680bc2b6def8034a9d65de', slotStartRef: this.slotStartRef, onSlotChange: () => this.updatePaddings() }), h(InputElement, { key: 'f6b81c671a36b00bde716d72a40c17b6cd409c24', id: this.inputId, readonly: this.readonly, disabled: this.disabled, maxLength: this.maxLength, minLength: this.minLength, pattern: this.pattern, type: this.inputType, isInvalid: this.isInvalid, required: this.required, value: this.value, placeholder: this.placeholder, inputRef: this.inputRef, onKeyPress: (event) => checkAllowedKeys(this, event), valueChange: (value) => this.valueChange.emit(value), updateFormInternalValue: (value) => this.updateFormInternalValue(value), onBlur: () => {
|
|
131
140
|
onInputBlur(this, this.inputRef.current);
|
|
132
141
|
this.touched = true;
|
|
133
|
-
}, ariaAttributes: inputAria }), h(SlotEnd, { key: '
|
|
142
|
+
}, ariaAttributes: inputAria, form: (_a = this.formInternals.form) !== null && _a !== void 0 ? _a : undefined, suppressSubmitOnEnter: this.suppressSubmitOnEnter, textAlignment: this.textAlignment }), h(SlotEnd, { key: 'c8f10373d93bba50d0c633b77fd7ec548e4590d5', slotEndRef: this.slotEndRef, onSlotChange: () => this.updatePaddings() }, h("ix-icon-button", { key: '169c36e6719204de19756a1cf8c0a7c141119417', color: "color-weak-text", class: {
|
|
134
143
|
'password-eye': true,
|
|
135
144
|
'eye-hidden': this.type !== 'password' || this.disabled,
|
|
136
145
|
}, variant: "tertiary", icon: this.inputType === 'password' ? iconEye : iconEyeCancelled, onClick: () => {
|
|
@@ -139,7 +148,7 @@ export class Input {
|
|
|
139
148
|
return;
|
|
140
149
|
}
|
|
141
150
|
this.inputType = 'password';
|
|
142
|
-
} }))), !!this.maxLength && this.maxLength > 0 && (h("ix-typography", { key: '
|
|
151
|
+
} }))), !!this.maxLength && this.maxLength > 0 && (h("ix-typography", { key: 'd4041de277ec45534274a6a4a739ff90cd4b98c1', class: "bottom-text", slot: "bottom-right", textColor: "soft" }, ((_b = this.value) !== null && _b !== void 0 ? _b : '').length, "/", this.maxLength)))));
|
|
143
152
|
}
|
|
144
153
|
static get is() { return "ix-input"; }
|
|
145
154
|
static get encapsulation() { return "shadow"; }
|
|
@@ -502,6 +511,46 @@ export class Input {
|
|
|
502
511
|
"getter": false,
|
|
503
512
|
"setter": false,
|
|
504
513
|
"reflect": false
|
|
514
|
+
},
|
|
515
|
+
"suppressSubmitOnEnter": {
|
|
516
|
+
"type": "boolean",
|
|
517
|
+
"attribute": "suppress-submit-on-enter",
|
|
518
|
+
"mutable": false,
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "boolean",
|
|
521
|
+
"resolved": "boolean",
|
|
522
|
+
"references": {}
|
|
523
|
+
},
|
|
524
|
+
"required": false,
|
|
525
|
+
"optional": false,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": "If false, pressing Enter will submit the form (if inside a form).\nSet to true to suppress submit on Enter."
|
|
529
|
+
},
|
|
530
|
+
"getter": false,
|
|
531
|
+
"setter": false,
|
|
532
|
+
"reflect": true,
|
|
533
|
+
"defaultValue": "false"
|
|
534
|
+
},
|
|
535
|
+
"textAlignment": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"attribute": "text-alignment",
|
|
538
|
+
"mutable": false,
|
|
539
|
+
"complexType": {
|
|
540
|
+
"original": "'start' | 'end'",
|
|
541
|
+
"resolved": "\"end\" | \"start\"",
|
|
542
|
+
"references": {}
|
|
543
|
+
},
|
|
544
|
+
"required": false,
|
|
545
|
+
"optional": false,
|
|
546
|
+
"docs": {
|
|
547
|
+
"tags": [],
|
|
548
|
+
"text": "Text alignment within the input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input."
|
|
549
|
+
},
|
|
550
|
+
"getter": false,
|
|
551
|
+
"setter": false,
|
|
552
|
+
"reflect": false,
|
|
553
|
+
"defaultValue": "'start'"
|
|
505
554
|
}
|
|
506
555
|
};
|
|
507
556
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;AAEH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,GAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,0CAA0C,EAC1C,2BAA2B,EAC3B,gBAAgB,EAEhB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,IAAI,QAAQ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AS,CAC7B,CACjB,CACgB,CACd,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAjLC;IADC,uBAAuB,EAAE;gDAGzB","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\nimport { iconEye, iconEyeCancelled } 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 { A11yAttributes } from '../utils/a11y';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n DisposableChangesAndVisibilityObservers,\n getAriaAttributesForInput,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet inputIds = 0;\n\n/**\n * @form-ready\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-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * The type of the text field. Possible values are 'text', 'email', or 'password'.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The name of the text field.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The placeholder text for the text field.\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Specifies whether the text field is required.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specifies whether the text field is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specifies whether the text field is readonly.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The helper text for the text field.\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the text field.\n */\n @Prop() infoText?: string;\n\n /**\n * Specifies whether to show the text as a tooltip.\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the text field.\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the text field.\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the text field.\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the text field.\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the text field.\n */\n @Prop() pattern?: string;\n\n /**\n * The maximum length of the text field.\n */\n @Prop() maxLength?: number;\n\n /**\n * The minimum length of the text field.\n */\n @Prop() minLength?: number;\n\n /**\n * The allowed characters pattern for the text field.\n */\n @Prop() allowedCharactersPattern?: string;\n\n /**\n * Event emitted when the value of the text field changes.\n */\n @Event() valueChange!: EventEmitter<string>;\n\n /**\n * Event emitted when the validity state of the text field changes.\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the text field loses focus.\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n @State() inputType = 'text';\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly inputId = `input-${inputIds++}`;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n @Watch('type')\n updateInputType() {\n this.inputType = this.type;\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n this.inputType = this.type;\n }\n\n connectedCallback(): void {\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n updateFormInternalValue(value: string) {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used in the text field.\n */\n @Method()\n getNativeInputElement() {\n return this.inputRef.waitForCurrent();\n }\n\n /**\n * Returns the validity state of the input field.\n */\n @Method()\n async getValidityState(): Promise<ValidityState> {\n const input = await this.inputRef.waitForCurrent();\n return Promise.resolve(input.validity);\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 inputAria: A11yAttributes = getAriaAttributesForInput(this);\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n htmlForLabel={this.inputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef}\n >\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n maxLength={this.maxLength}\n minLength={this.minLength}\n pattern={this.pattern}\n type={this.inputType}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(value)}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(value)\n }\n onBlur={() => {\n onInputBlur(this, this.inputRef.current);\n this.touched = true;\n }}\n ariaAttributes={inputAria}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n color=\"color-weak-text\"\n class={{\n 'password-eye': true,\n 'eye-hidden': this.type !== 'password' || this.disabled,\n }}\n variant=\"tertiary\"\n icon={\n this.inputType === 'password' ? iconEye : iconEyeCancelled\n }\n onClick={() => {\n if (this.inputType === 'password') {\n this.inputType = 'text';\n return;\n }\n\n this.inputType = 'password';\n }}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n {!!this.maxLength && this.maxLength > 0 && (\n <ix-typography\n class=\"bottom-text\"\n slot=\"bottom-right\"\n textColor=\"soft\"\n >\n {(this.value ?? '').length}/{this.maxLength}\n </ix-typography>\n )}\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;;;;;;;AAEH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,GACF,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,GAGxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,0CAA0C,EAC1C,2BAA2B,EAC3B,gBAAgB,EAEhB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB;;;;GAIG;AAOH,MAAM,OAAO,KAAK;IANlB;QAUE;;WAEG;QACK,SAAI,GAAkD,MAAM,CAAC;QAYrE;;WAEG;QACqC,UAAK,GAAW,EAAE,CAAC;QAE3D;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAEnD;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAEnD;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAyDnD;;;WAGG;QACsB,0BAAqB,GAAY,KAAK,CAAC;QAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AApLC;IADC,uBAAuB,EAAE;gDAGzB","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\nimport { iconEye, iconEyeCancelled } 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 { A11yAttributes } from '../utils/a11y';\nimport {\n HookValidationLifecycle,\n IxInputFieldComponent,\n ValidationResults,\n} from '../utils/input';\nimport { makeRef } from '../utils/make-ref';\nimport { InputElement, SlotEnd, SlotStart } from './input.fc';\nimport {\n addDisposableChangesAndVisibilityObservers,\n adjustPaddingForStartAndEnd,\n checkAllowedKeys,\n DisposableChangesAndVisibilityObservers,\n getAriaAttributesForInput,\n mapValidationResult,\n onInputBlur,\n} from './input.util';\n\nlet inputIds = 0;\n\n/**\n * @form-ready\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-input',\n styleUrl: 'input.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class Input implements IxInputFieldComponent<string> {\n @Element() hostElement!: HTMLIxInputElement;\n @AttachInternals() formInternals!: ElementInternals;\n\n /**\n * The type of the text field. Possible values are 'text', 'email', or 'password'.\n */\n @Prop() type: 'text' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The name of the text field.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The placeholder text for the text field.\n */\n @Prop({ reflect: true }) placeholder?: string;\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Specifies whether the text field is required.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specifies whether the text field is disabled.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Specifies whether the text field is readonly.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * The helper text for the text field.\n */\n @Prop() helperText?: string;\n\n /**\n * The info text for the text field.\n */\n @Prop() infoText?: string;\n\n /**\n * Specifies whether to show the text as a tooltip.\n */\n @Prop() showTextAsTooltip?: boolean;\n\n /**\n * The valid text for the text field.\n */\n @Prop() validText?: string;\n\n /**\n * The warning text for the text field.\n */\n @Prop() warningText?: string;\n\n /**\n * The label for the text field.\n */\n @Prop({ reflect: true }) label?: string;\n\n /**\n * The error text for the text field.\n */\n @Prop() invalidText?: string;\n\n /**\n * The pattern for the text field.\n */\n @Prop() pattern?: string;\n\n /**\n * The maximum length of the text field.\n */\n @Prop() maxLength?: number;\n\n /**\n * The minimum length of the text field.\n */\n @Prop() minLength?: number;\n\n /**\n * The allowed characters pattern for the text field.\n */\n @Prop() allowedCharactersPattern?: 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 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 * Event emitted when the value of the text field changes.\n */\n @Event() valueChange!: EventEmitter<string>;\n\n /**\n * Event emitted when the validity state of the text field changes.\n */\n @Event() validityStateChange!: EventEmitter<ValidityState>;\n\n /**\n * Event emitted when the text field loses focus.\n */\n @Event() ixBlur!: EventEmitter<void>;\n\n @State() isInvalid = false;\n @State() isValid = false;\n @State() isInfo = false;\n @State() isWarning = false;\n @State() isInvalidByRequired = false;\n\n @State() inputType = 'text';\n\n private readonly inputRef = makeRef<HTMLInputElement>();\n private readonly slotEndRef = makeRef<HTMLDivElement>();\n private readonly slotStartRef = makeRef<HTMLDivElement>();\n private readonly inputId = `input-${inputIds++}`;\n private touched = false;\n\n private disposableChangesAndVisibilityObservers?: DisposableChangesAndVisibilityObservers;\n\n @HookValidationLifecycle()\n updateClassMappings(result: ValidationResults) {\n mapValidationResult(this, result);\n }\n\n @Watch('type')\n updateInputType() {\n this.inputType = this.type;\n }\n\n componentWillLoad() {\n this.updateFormInternalValue(this.value);\n this.inputType = this.type;\n }\n\n connectedCallback(): void {\n this.disposableChangesAndVisibilityObservers =\n addDisposableChangesAndVisibilityObservers(\n this.hostElement,\n this.updatePaddings.bind(this)\n );\n }\n\n private updatePaddings() {\n adjustPaddingForStartAndEnd(\n this.slotStartRef.current,\n this.slotEndRef.current,\n this.inputRef.current\n );\n }\n\n disconnectedCallback(): void {\n this.disposableChangesAndVisibilityObservers?.();\n }\n\n updateFormInternalValue(value: string) {\n this.formInternals.setFormValue(value);\n this.value = value;\n }\n\n /** @internal */\n @Method()\n async getAssociatedFormElement(): Promise<HTMLFormElement | null> {\n return this.formInternals.form;\n }\n\n /** @internal */\n @Method()\n hasValidValue(): Promise<boolean> {\n return Promise.resolve(!!this.value);\n }\n\n /**\n * Returns the native input element used in the text field.\n */\n @Method()\n getNativeInputElement() {\n return this.inputRef.waitForCurrent();\n }\n\n /**\n * Returns the validity state of the input field.\n */\n @Method()\n async getValidityState(): Promise<ValidityState> {\n const input = await this.inputRef.waitForCurrent();\n return Promise.resolve(input.validity);\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 inputAria: A11yAttributes = getAriaAttributesForInput(this);\n return (\n <Host\n class={{\n disabled: this.disabled,\n readonly: this.readonly,\n }}\n >\n <ix-field-wrapper\n htmlForLabel={this.inputId}\n required={this.required}\n label={this.label}\n helperText={this.helperText}\n invalidText={this.invalidText}\n infoText={this.infoText}\n warningText={this.warningText}\n validText={this.validText}\n showTextAsTooltip={this.showTextAsTooltip}\n isInvalid={this.isInvalid}\n isValid={this.isValid}\n isInfo={this.isInfo}\n isWarning={this.isWarning}\n controlRef={this.inputRef}\n >\n <div class=\"input-wrapper\">\n <SlotStart\n slotStartRef={this.slotStartRef}\n onSlotChange={() => this.updatePaddings()}\n ></SlotStart>\n <InputElement\n id={this.inputId}\n readonly={this.readonly}\n disabled={this.disabled}\n maxLength={this.maxLength}\n minLength={this.minLength}\n pattern={this.pattern}\n type={this.inputType}\n isInvalid={this.isInvalid}\n required={this.required}\n value={this.value}\n placeholder={this.placeholder}\n inputRef={this.inputRef}\n onKeyPress={(event) => checkAllowedKeys(this, event)}\n valueChange={(value) => this.valueChange.emit(value)}\n updateFormInternalValue={(value) =>\n this.updateFormInternalValue(value)\n }\n onBlur={() => {\n onInputBlur(this, this.inputRef.current);\n this.touched = true;\n }}\n ariaAttributes={inputAria}\n form={this.formInternals.form ?? undefined}\n suppressSubmitOnEnter={this.suppressSubmitOnEnter}\n textAlignment={this.textAlignment}\n ></InputElement>\n <SlotEnd\n slotEndRef={this.slotEndRef}\n onSlotChange={() => this.updatePaddings()}\n >\n <ix-icon-button\n color=\"color-weak-text\"\n class={{\n 'password-eye': true,\n 'eye-hidden': this.type !== 'password' || this.disabled,\n }}\n variant=\"tertiary\"\n icon={\n this.inputType === 'password' ? iconEye : iconEyeCancelled\n }\n onClick={() => {\n if (this.inputType === 'password') {\n this.inputType = 'text';\n return;\n }\n\n this.inputType = 'password';\n }}\n ></ix-icon-button>\n </SlotEnd>\n </div>\n {!!this.maxLength && this.maxLength > 0 && (\n <ix-typography\n class=\"bottom-text\"\n slot=\"bottom-right\"\n textColor=\"soft\"\n >\n {(this.value ?? '').length}/{this.maxLength}\n </ix-typography>\n )}\n </ix-field-wrapper>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -34,9 +34,13 @@ export function checkAllowedKeys(comp, event) {
|
|
|
34
34
|
}
|
|
35
35
|
export async function checkInternalValidity(comp, input) {
|
|
36
36
|
const validityState = input.validity;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const currentValidityState = !comp.hostElement.classList.contains('ix-invalid--validity-invalid');
|
|
38
|
+
const newValidityState = validityState.valid;
|
|
39
|
+
if (currentValidityState !== newValidityState) {
|
|
40
|
+
const eventResult = comp.validityStateChange.emit(validityState);
|
|
41
|
+
if (eventResult.defaultPrevented) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
if (comp.value === null || comp.value === undefined) {
|
|
42
46
|
return;
|
|
@@ -125,4 +129,17 @@ function observeElementUntilVisible(hostElement, updateCallback) {
|
|
|
125
129
|
intersectionObserver.observe(hostElement);
|
|
126
130
|
return intersectionObserver;
|
|
127
131
|
}
|
|
132
|
+
export function handleSubmitOnEnterKeydown(event, suppressSubmitOnEnter, form) {
|
|
133
|
+
if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
const submitButton = form.querySelector('button[type="submit"], ix-button[type="submit"]');
|
|
138
|
+
if (submitButton) {
|
|
139
|
+
form.requestSubmit(submitButton);
|
|
140
|
+
}
|
|
141
|
+
if (form.length === 1) {
|
|
142
|
+
form.requestSubmit();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
128
145
|
//# sourceMappingURL=input.util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.util.js","sourceRoot":"","sources":["../../../src/components/input/input.util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAIL,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CACjC,OAAwB,EACxB,WAAmB,OAAO;IAE1B,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAA6B,EAC7B,MAAyB;IAEzB,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC;IAC/D,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC7B,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3B,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,IA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,CAAC;AAC9B,CAAC","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\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n\n const eventResult = comp.validityStateChange.emit(validityState);\n\n if (eventResult.defaultPrevented) {\n return;\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"input.util.js","sourceRoot":"","sources":["../../../src/components/input/input.util.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAIL,gCAAgC,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,mBAAmB,CACjC,OAAwB,EACxB,WAAmB,OAAO;IAE1B,OAAO,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAA6B,EAC7B,MAAyB;IAEzB,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,mBAAmB,CAAC;IAC/D,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAC7B,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3B,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,IAA8B,EAC9B,KAAoB;IAEpB,IAAI,IAAI,CAAC,w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,EAAE,CAAC;gBACzB,cAAc,EAAE,CAAC;YACnB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1C,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAoB,EACpB,qBAA8B,EAC9B,IAAwC;IAExC,IAAI,qBAAqB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5D,OAAO;IACT,CAAC;IAED,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CACrC,iDAAiD,CAClD,CAAC;IAEF,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;AACH,CAAC","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\nimport { A11yAttributes, a11yBoolean } from '../utils/a11y';\nimport {\n IxFormComponent,\n IxInputFieldComponent,\n ValidationResults,\n shouldSuppressInternalValidation,\n} from '../utils/input';\nimport { createMutationObserver } from '../utils/mutation-observer';\nimport { convertToRemString } from '../utils/rwd.util';\nimport { generateUUID } from '../utils/uuid';\nimport { shakeInput } from './input.animation';\n\nexport function createIdIfNotExists(\n element: IxFormComponent,\n idPrefix: string = 'input'\n) {\n return element.hasAttribute('id')\n ? element.getAttribute('id')\n : `${idPrefix}-${generateUUID()}`;\n}\n\nexport function mapValidationResult<T>(\n ref: IxInputFieldComponent<T>,\n result: ValidationResults\n) {\n ref.isInvalid = result.isInvalid || result.isInvalidByRequired;\n ref.isValid = result.isValid;\n ref.isInfo = result.isInfo;\n ref.isWarning = result.isWarning;\n}\n\nexport function checkAllowedKeys<T>(\n comp: IxInputFieldComponent<T>,\n event: KeyboardEvent\n) {\n if (comp.allowedCharactersPattern) {\n const regex = new RegExp(comp.allowedCharactersPattern);\n if (!regex.test(event.key)) {\n event.preventDefault();\n shakeInput(comp.inputRef.current);\n }\n }\n}\n\nexport async function checkInternalValidity<T>(\n comp: IxFormComponent<T>,\n input: HTMLInputElement | HTMLTextAreaElement\n) {\n const validityState = input.validity;\n const currentValidityState = !comp.hostElement.classList.contains(\n 'ix-invalid--validity-invalid'\n );\n const newValidityState = validityState.valid;\n\n if (currentValidityState !== newValidityState) {\n const eventResult = comp.validityStateChange.emit(validityState);\n if (eventResult.defaultPrevented) {\n return;\n }\n }\n\n if (comp.value === null || comp.value === undefined) {\n return;\n }\n\n const skipValidation = await shouldSuppressInternalValidation(comp);\n if (skipValidation) {\n return;\n }\n\n const { valid } = validityState;\n comp.hostElement.classList.toggle('ix-invalid--validity-invalid', !valid);\n}\n\nexport function onInputBlur<T>(\n comp: IxFormComponent<T>,\n input?: HTMLInputElement | HTMLTextAreaElement | null\n) {\n comp.ixBlur.emit();\n\n if (!input) {\n throw new Error('Input element is not available');\n }\n\n input.setAttribute('data-ix-touched', 'true');\n checkInternalValidity(comp, input);\n}\n\nexport function applyPaddingEnd(\n inputElement: HTMLElement | null,\n width: number,\n options: {\n slotEnd: boolean;\n additionalPaddingRight?: string;\n }\n) {\n if (!inputElement) {\n return;\n }\n\n const remInPixels = 16;\n const padding = convertToRemString(width + remInPixels / 2);\n\n if (options.slotEnd) {\n inputElement.style.paddingRight = `calc(${padding} + ${\n options.additionalPaddingRight ?? '0rem'\n })`;\n } else {\n inputElement.style.paddingLeft = padding;\n }\n}\n\nexport function adjustPaddingForStartAndEnd(\n startElement: HTMLElement | null,\n endElement: HTMLElement | null,\n inputElement: HTMLElement | null\n) {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (startElement) {\n const startBoundingRect = startElement.getBoundingClientRect();\n if (startBoundingRect) {\n applyPaddingEnd(inputElement, startBoundingRect.width, {\n slotEnd: false,\n });\n }\n }\n\n if (endElement) {\n const endBoundingRect = endElement.getBoundingClientRect();\n if (endBoundingRect) {\n applyPaddingEnd(inputElement, endBoundingRect.width, {\n slotEnd: true,\n });\n }\n }\n });\n });\n}\n\nexport function getAriaAttributesForInput(\n component: IxInputFieldComponent\n): A11yAttributes {\n const inputAria: A11yAttributes = {\n 'aria-invalid': `${a11yBoolean(component.isInvalid)}`,\n 'aria-required': `${a11yBoolean(component.required)}`,\n };\n\n if (component.isInvalid && component.invalidText) {\n inputAria['aria-errormessage'] = component.invalidText;\n }\n return inputAria;\n}\n\nexport type DisposableChangesAndVisibilityObservers = () => void;\n\nexport const addDisposableChangesAndVisibilityObservers = (\n element: HTMLElement,\n callback: () => void\n): DisposableChangesAndVisibilityObservers => {\n const intersectionObserver = observeElementUntilVisible(element, callback);\n const mutationObserver = createMutationObserver(callback);\n\n mutationObserver.observe(element, {\n subtree: true,\n attributes: true,\n });\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n};\n\nfunction observeElementUntilVisible(\n hostElement: HTMLElement,\n updateCallback: () => void\n): IntersectionObserver {\n const intersectionObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n updateCallback();\n }\n });\n });\n\n intersectionObserver.observe(hostElement);\n return intersectionObserver;\n}\n\nexport function handleSubmitOnEnterKeydown(\n event: KeyboardEvent,\n suppressSubmitOnEnter: boolean,\n form: HTMLFormElement | null | undefined\n) {\n if (suppressSubmitOnEnter || event.key !== 'Enter' || !form) {\n return;\n }\n\n event.preventDefault();\n const submitButton = form.querySelector<HTMLElement>(\n 'button[type=\"submit\"], ix-button[type=\"submit\"]'\n );\n\n if (submitButton) {\n form.requestSubmit(submitButton);\n }\n\n if (form.length === 1) {\n form.requestSubmit();\n }\n}\n"]}
|