@siemens/ix 2.0.3 → 2.0.4-beta.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/base-button.js +1 -1
- package/components/base-button.js.map +1 -1
- package/components/breadcrumb-item.js +1 -1
- package/components/breadcrumb-item.js.map +1 -1
- package/components/button.js +1 -1
- package/components/button.js.map +1 -1
- package/components/dropdown.js +53 -2
- package/components/dropdown.js.map +1 -1
- package/components/group-context-menu.js +1 -1
- package/components/group-context-menu.js.map +1 -1
- package/components/icon-button.js +1 -1
- package/components/icon-button.js.map +1 -1
- package/components/ix-blind.js +9 -14
- package/components/ix-blind.js.map +1 -1
- package/components/ix-category-filter.js +1 -1
- package/components/ix-category-filter.js.map +1 -1
- package/components/ix-dropdown-button.js +1 -1
- package/components/ix-dropdown-button.js.map +1 -1
- package/components/ix-dropdown-quick-actions.js +1 -1
- package/components/ix-dropdown-quick-actions.js.map +1 -1
- package/components/ix-event-list-item.js +1 -1
- package/components/ix-event-list-item.js.map +1 -1
- package/components/ix-expanding-search.js +1 -1
- package/components/ix-expanding-search.js.map +1 -1
- package/components/ix-form-field.js +1 -1
- package/components/ix-form-field.js.map +1 -1
- package/components/ix-group.js +1 -1
- package/components/ix-group.js.map +1 -1
- package/components/ix-icon-toggle-button.js +1 -1
- package/components/ix-icon-toggle-button.js.map +1 -1
- package/components/ix-input-group.js +7 -4
- package/components/ix-input-group.js.map +1 -1
- package/components/ix-kpi.js +1 -1
- package/components/ix-kpi.js.map +1 -1
- package/components/ix-map-navigation.js +1 -1
- package/components/ix-map-navigation.js.map +1 -1
- package/components/ix-menu.js +1 -1
- package/components/ix-menu.js.map +1 -1
- package/components/ix-modal-header.js +7 -5
- package/components/ix-modal-header.js.map +1 -1
- package/components/ix-modal.js +6 -3
- package/components/ix-modal.js.map +1 -1
- package/components/ix-pagination.js +1 -1
- package/components/ix-pagination.js.map +1 -1
- package/components/ix-row.js +1 -1
- package/components/ix-row.js.map +1 -1
- package/components/ix-slider.js +26 -4
- package/components/ix-slider.js.map +1 -1
- package/components/ix-tile.js +1 -1
- package/components/ix-tile.js.map +1 -1
- package/components/ix-toast-container.js +1 -1
- package/components/ix-toast-container.js.map +1 -1
- package/components/ix-tree.js +3 -2
- package/components/ix-tree.js.map +1 -1
- package/components/ix-upload.js +1 -1
- package/components/ix-upload.js.map +1 -1
- package/components/listener.js +69 -0
- package/components/listener.js.map +1 -0
- package/components/map-navigation-overlay.js +1 -1
- package/components/map-navigation-overlay.js.map +1 -1
- package/components/menu-service.js +7 -2
- package/components/menu-service.js.map +1 -1
- package/components/select.js +31 -5
- package/components/select.js.map +1 -1
- package/components/tabs.js +44 -12
- package/components/tabs.js.map +1 -1
- package/components/time-picker.js +1 -1
- package/components/time-picker.js.map +1 -1
- package/components/typography.js +1 -1
- package/components/typography.js.map +1 -1
- package/dist/cjs/{base-button-c158438e.js → base-button-7af4dae7.js} +2 -2
- package/dist/cjs/base-button-7af4dae7.js.map +1 -0
- package/dist/cjs/{base-icon-button-bbca2582.js → base-icon-button-d085fd45.js} +2 -2
- package/dist/cjs/{base-icon-button-bbca2582.js.map → base-icon-button-d085fd45.js.map} +1 -1
- package/dist/cjs/ix-application-header.cjs.entry.js +1 -1
- package/dist/cjs/ix-application.cjs.entry.js +1 -1
- package/dist/cjs/ix-basic-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ix-blind.cjs.entry.js +8 -13
- package/dist/cjs/ix-blind.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/ix-breadcrumb-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-burger-menu.cjs.entry.js +1 -1
- package/dist/cjs/ix-button.cjs.entry.js +2 -2
- package/dist/cjs/ix-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-category-filter.cjs.entry.js +2 -2
- package/dist/cjs/ix-category-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-date-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-date-picker_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +1 -1
- package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js +52 -1
- package/dist/cjs/ix-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-event-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ix-event-list-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-expanding-search.cjs.entry.js +1 -1
- package/dist/cjs/ix-expanding-search.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ix-form-field.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-group-context-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/ix-group-context-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-group.cjs.entry.js +1 -1
- package/dist/cjs/ix-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-button_2.cjs.entry.js +3 -3
- package/dist/cjs/ix-icon-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/ix-icon-toggle-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-input-group.cjs.entry.js +7 -4
- package/dist/cjs/ix-input-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-kpi.cjs.entry.js +1 -1
- package/dist/cjs/ix-kpi.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-map-navigation-overlay.cjs.entry.js +1 -1
- package/dist/cjs/ix-map-navigation-overlay.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-map-navigation.cjs.entry.js +1 -1
- package/dist/cjs/ix-map-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-menu.cjs.entry.js +2 -2
- package/dist/cjs/ix-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal-header.cjs.entry.js +7 -5
- package/dist/cjs/ix-modal-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-modal.cjs.entry.js +6 -3
- package/dist/cjs/ix-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-pagination.cjs.entry.js +2 -2
- package/dist/cjs/ix-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-row.cjs.entry.js +1 -1
- package/dist/cjs/ix-row.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-select.cjs.entry.js +30 -4
- package/dist/cjs/ix-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-slider.cjs.entry.js +25 -3
- package/dist/cjs/ix-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tab-item_2.cjs.entry.js +44 -10
- package/dist/cjs/ix-tab-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-tile.cjs.entry.js +1 -1
- package/dist/cjs/ix-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/ix-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/ix-tree.cjs.entry.js +3 -2
- package/dist/cjs/ix-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-typography.cjs.entry.js +1 -1
- package/dist/cjs/ix-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/ix-upload.cjs.entry.js +1 -1
- package/dist/cjs/ix-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/listener-0cce68b2.js +71 -0
- package/dist/cjs/listener-0cce68b2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{menu-service-000df68d.js → menu-service-777bf5ce.js} +8 -3
- package/dist/cjs/menu-service-777bf5ce.js.map +1 -0
- package/dist/cjs/siemens-ix.cjs.js +1 -1
- package/dist/collection/components/blind/blind.css +151 -70
- package/dist/collection/components/blind/blind.js +8 -13
- package/dist/collection/components/blind/blind.js.map +1 -1
- package/dist/collection/components/blind/test/blind.ct.js +16 -0
- package/dist/collection/components/blind/test/blind.ct.js.map +1 -0
- package/dist/collection/components/breadcrumb-item/breadcrumb-item.css +6 -0
- package/dist/collection/components/button/base-button.js +1 -1
- package/dist/collection/components/button/base-button.js.map +1 -1
- package/dist/collection/components/button/button.css +3 -0
- package/dist/collection/components/button/test/button.ct.js +1 -1
- package/dist/collection/components/button/test/button.ct.js.map +1 -1
- package/dist/collection/components/category-filter/category-filter.css +24 -35
- package/dist/collection/components/dropdown/dropdown.js +44 -16
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown-button/dropdown-button.css +2 -4
- package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.css +4 -8
- package/dist/collection/components/event-list-item/event-list-item.css +1 -0
- package/dist/collection/components/expanding-search/expanding-search.css +10 -31
- package/dist/collection/components/form-field/form-field.css +7 -0
- package/dist/collection/components/group/group-context-menu.css +3 -6
- package/dist/collection/components/group/group.css +1 -2
- package/dist/collection/components/icon-button/icon-button.css +3 -0
- package/dist/collection/components/icon-toggle-button/icon-toggle-button.css +3 -0
- package/dist/collection/components/input-group/input-group.js +7 -4
- package/dist/collection/components/input-group/input-group.js.map +1 -1
- package/dist/collection/components/input-group/tests/input-group.ct.js +66 -0
- package/dist/collection/components/input-group/tests/input-group.ct.js.map +1 -1
- package/dist/collection/components/kpi/kpi.css +4 -8
- package/dist/collection/components/map-navigation/map-navigation.css +1 -2
- package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +4 -8
- package/dist/collection/components/menu/menu.css +1 -7
- package/dist/collection/components/modal/modal.js +6 -3
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/modal-header/modal-header.js +7 -5
- package/dist/collection/components/modal-header/modal-header.js.map +1 -1
- package/dist/collection/components/pagination/pagination.css +16 -37
- package/dist/collection/components/pagination/test/pagination.ct.js +1 -1
- package/dist/collection/components/pagination/test/pagination.ct.js.map +1 -1
- package/dist/collection/components/row/row.css +1 -2
- package/dist/collection/components/select/select.js +22 -10
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select/test/select.ct.js +19 -0
- package/dist/collection/components/select/test/select.ct.js.map +1 -1
- package/dist/collection/components/slider/slider.js +15 -10
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +21 -12
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/tile/tile.css +2 -4
- package/dist/collection/components/time-picker/time-picker.css +17 -30
- package/dist/collection/components/toast/styles/toast-container.css +1 -2
- package/dist/collection/components/tooltip/test/tooltip.ct.js +22 -0
- package/dist/collection/components/tooltip/test/tooltip.ct.js.map +1 -0
- package/dist/collection/components/tree/tree.js +3 -2
- package/dist/collection/components/tree/tree.js.map +1 -1
- package/dist/collection/components/typography/typography.css +1 -1
- package/dist/collection/components/upload/upload.css +4 -8
- package/dist/collection/components/utils/application-layout/service.js +7 -2
- package/dist/collection/components/utils/application-layout/service.js.map +1 -1
- package/dist/collection/components/utils/listener.js +65 -0
- package/dist/collection/components/utils/listener.js.map +1 -0
- package/dist/collection/components/utils/requestAnimationFrame.js +24 -0
- package/dist/collection/components/utils/requestAnimationFrame.js.map +1 -0
- package/dist/esm/{base-button-87048318.js → base-button-a4078c61.js} +2 -2
- package/dist/esm/base-button-a4078c61.js.map +1 -0
- package/dist/esm/{base-icon-button-afac2d95.js → base-icon-button-a3dc30a2.js} +2 -2
- package/dist/esm/{base-icon-button-afac2d95.js.map → base-icon-button-a3dc30a2.js.map} +1 -1
- package/dist/esm/ix-application-header.entry.js +1 -1
- package/dist/esm/ix-application.entry.js +1 -1
- package/dist/esm/ix-basic-navigation.entry.js +1 -1
- package/dist/esm/ix-blind.entry.js +9 -14
- package/dist/esm/ix-blind.entry.js.map +1 -1
- package/dist/esm/ix-breadcrumb-item.entry.js +2 -2
- package/dist/esm/ix-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/ix-burger-menu.entry.js +1 -1
- package/dist/esm/ix-button.entry.js +2 -2
- package/dist/esm/ix-button.entry.js.map +1 -1
- package/dist/esm/ix-category-filter.entry.js +2 -2
- package/dist/esm/ix-category-filter.entry.js.map +1 -1
- package/dist/esm/ix-date-picker_2.entry.js +1 -1
- package/dist/esm/ix-date-picker_2.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-button.entry.js +1 -1
- package/dist/esm/ix-dropdown-button.entry.js.map +1 -1
- package/dist/esm/ix-dropdown-quick-actions.entry.js +1 -1
- package/dist/esm/ix-dropdown-quick-actions.entry.js.map +1 -1
- package/dist/esm/ix-dropdown.entry.js +52 -1
- package/dist/esm/ix-dropdown.entry.js.map +1 -1
- package/dist/esm/ix-event-list-item.entry.js +1 -1
- package/dist/esm/ix-event-list-item.entry.js.map +1 -1
- package/dist/esm/ix-expanding-search.entry.js +1 -1
- package/dist/esm/ix-expanding-search.entry.js.map +1 -1
- package/dist/esm/ix-form-field.entry.js +1 -1
- package/dist/esm/ix-form-field.entry.js.map +1 -1
- package/dist/esm/ix-group-context-menu_2.entry.js +1 -1
- package/dist/esm/ix-group-context-menu_2.entry.js.map +1 -1
- package/dist/esm/ix-group.entry.js +1 -1
- package/dist/esm/ix-group.entry.js.map +1 -1
- package/dist/esm/ix-icon-button_2.entry.js +3 -3
- package/dist/esm/ix-icon-button_2.entry.js.map +1 -1
- package/dist/esm/ix-icon-toggle-button.entry.js +3 -3
- package/dist/esm/ix-icon-toggle-button.entry.js.map +1 -1
- package/dist/esm/ix-input-group.entry.js +7 -4
- package/dist/esm/ix-input-group.entry.js.map +1 -1
- package/dist/esm/ix-kpi.entry.js +1 -1
- package/dist/esm/ix-kpi.entry.js.map +1 -1
- package/dist/esm/ix-map-navigation-overlay.entry.js +1 -1
- package/dist/esm/ix-map-navigation-overlay.entry.js.map +1 -1
- package/dist/esm/ix-map-navigation.entry.js +1 -1
- package/dist/esm/ix-map-navigation.entry.js.map +1 -1
- package/dist/esm/ix-menu.entry.js +2 -2
- package/dist/esm/ix-menu.entry.js.map +1 -1
- package/dist/esm/ix-modal-header.entry.js +7 -5
- package/dist/esm/ix-modal-header.entry.js.map +1 -1
- package/dist/esm/ix-modal.entry.js +6 -3
- package/dist/esm/ix-modal.entry.js.map +1 -1
- package/dist/esm/ix-pagination.entry.js +2 -2
- package/dist/esm/ix-pagination.entry.js.map +1 -1
- package/dist/esm/ix-row.entry.js +1 -1
- package/dist/esm/ix-row.entry.js.map +1 -1
- package/dist/esm/ix-select.entry.js +30 -4
- package/dist/esm/ix-select.entry.js.map +1 -1
- package/dist/esm/ix-slider.entry.js +25 -3
- package/dist/esm/ix-slider.entry.js.map +1 -1
- package/dist/esm/ix-tab-item_2.entry.js +44 -10
- package/dist/esm/ix-tab-item_2.entry.js.map +1 -1
- package/dist/esm/ix-tile.entry.js +1 -1
- package/dist/esm/ix-tile.entry.js.map +1 -1
- package/dist/esm/ix-toast-container.entry.js +1 -1
- package/dist/esm/ix-toast-container.entry.js.map +1 -1
- package/dist/esm/ix-toggle-button.entry.js +1 -1
- package/dist/esm/ix-tree.entry.js +3 -2
- package/dist/esm/ix-tree.entry.js.map +1 -1
- package/dist/esm/ix-typography.entry.js +1 -1
- package/dist/esm/ix-typography.entry.js.map +1 -1
- package/dist/esm/ix-upload.entry.js +1 -1
- package/dist/esm/ix-upload.entry.js.map +1 -1
- package/dist/esm/listener-3ed639e6.js +69 -0
- package/dist/esm/listener-3ed639e6.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{menu-service-5555b4fa.js → menu-service-04c1257c.js} +8 -3
- package/dist/esm/menu-service-04c1257c.js.map +1 -0
- package/dist/esm/siemens-ix.js +1 -1
- package/dist/siemens-ix/{p-aef14f96.entry.js → p-08420b3b.entry.js} +2 -2
- package/dist/siemens-ix/{p-aef14f96.entry.js.map → p-08420b3b.entry.js.map} +1 -1
- package/dist/siemens-ix/p-222b1672.entry.js +2 -0
- package/dist/siemens-ix/p-222b1672.entry.js.map +1 -0
- package/dist/siemens-ix/p-28633ffb.entry.js +2 -0
- package/dist/siemens-ix/{p-b803c716.entry.js.map → p-28633ffb.entry.js.map} +1 -1
- package/dist/siemens-ix/p-2ff2382a.entry.js +2 -0
- package/dist/siemens-ix/{p-737fca1b.entry.js.map → p-2ff2382a.entry.js.map} +1 -1
- package/dist/siemens-ix/p-3733b547.entry.js +2 -0
- package/dist/siemens-ix/{p-655d177c.entry.js.map → p-3733b547.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-fa7f3eef.entry.js → p-37e0706d.entry.js} +2 -2
- package/dist/siemens-ix/{p-fa7f3eef.entry.js.map → p-37e0706d.entry.js.map} +1 -1
- package/dist/siemens-ix/p-39a2bd9d.entry.js +2 -0
- package/dist/siemens-ix/p-39a2bd9d.entry.js.map +1 -0
- package/dist/siemens-ix/p-51853519.entry.js +2 -0
- package/dist/siemens-ix/{p-302cd093.entry.js.map → p-51853519.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-ad94f795.entry.js → p-556c4b0c.entry.js} +2 -2
- package/dist/siemens-ix/p-556c4b0c.entry.js.map +1 -0
- package/dist/siemens-ix/{p-f97f2394.entry.js → p-58fe5c24.entry.js} +2 -2
- package/dist/siemens-ix/p-5a0d7f95.entry.js +2 -0
- package/dist/siemens-ix/{p-355f9085.entry.js.map → p-5a0d7f95.entry.js.map} +1 -1
- package/dist/siemens-ix/p-5d907f16.entry.js +2 -0
- package/dist/siemens-ix/{p-b6d40648.entry.js.map → p-5d907f16.entry.js.map} +1 -1
- package/dist/siemens-ix/p-616b1eba.entry.js +2 -0
- package/dist/siemens-ix/{p-634da7f2.entry.js.map → p-616b1eba.entry.js.map} +1 -1
- package/dist/siemens-ix/p-68809439.entry.js +2 -0
- package/dist/siemens-ix/{p-9e0af149.entry.js.map → p-68809439.entry.js.map} +1 -1
- package/dist/siemens-ix/p-68b2dcca.entry.js +2 -0
- package/dist/siemens-ix/p-68b2dcca.entry.js.map +1 -0
- package/dist/siemens-ix/p-70bfeb3d.entry.js +2 -0
- package/dist/siemens-ix/{p-9249df8d.entry.js.map → p-70bfeb3d.entry.js.map} +1 -1
- package/dist/siemens-ix/p-79405d11.entry.js +2 -0
- package/dist/siemens-ix/{p-59dc0873.entry.js.map → p-79405d11.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-ab452b82.js → p-7c5fc1c9.js} +2 -2
- package/dist/siemens-ix/{p-ab452b82.js.map → p-7c5fc1c9.js.map} +1 -1
- package/dist/siemens-ix/{p-5516480a.entry.js → p-8968a070.entry.js} +2 -2
- package/dist/siemens-ix/{p-5516480a.entry.js.map → p-8968a070.entry.js.map} +1 -1
- package/dist/siemens-ix/p-8b0793be.js +2 -0
- package/dist/siemens-ix/p-8b0fa98a.entry.js +2 -0
- package/dist/siemens-ix/{p-32265ee2.entry.js.map → p-8b0fa98a.entry.js.map} +1 -1
- package/dist/siemens-ix/p-8ba5f3c5.entry.js +2 -0
- package/dist/siemens-ix/p-8ba5f3c5.entry.js.map +1 -0
- package/dist/siemens-ix/{p-d7e974a8.entry.js → p-939376fb.entry.js} +2 -2
- package/dist/siemens-ix/p-939376fb.entry.js.map +1 -0
- package/dist/siemens-ix/p-9594dcfb.entry.js +2 -0
- package/dist/siemens-ix/{p-9848e4de.entry.js.map → p-9594dcfb.entry.js.map} +1 -1
- package/dist/siemens-ix/p-9dda017b.entry.js +2 -0
- package/dist/siemens-ix/p-9dda017b.entry.js.map +1 -0
- package/dist/siemens-ix/{p-b2042a15.entry.js → p-a00079d9.entry.js} +2 -2
- package/dist/siemens-ix/p-a00079d9.entry.js.map +1 -0
- package/dist/siemens-ix/p-aa89afe7.entry.js +2 -0
- package/dist/siemens-ix/{p-5a5e155c.entry.js.map → p-aa89afe7.entry.js.map} +1 -1
- package/dist/siemens-ix/{p-847da072.entry.js → p-aaef1367.entry.js} +2 -2
- package/dist/siemens-ix/{p-847da072.entry.js.map → p-aaef1367.entry.js.map} +1 -1
- package/dist/siemens-ix/p-b59e7155.js +2 -0
- package/dist/siemens-ix/p-b59e7155.js.map +1 -0
- package/dist/siemens-ix/p-bdc0c1f8.entry.js +2 -0
- package/dist/siemens-ix/{p-b735ee5e.entry.js.map → p-bdc0c1f8.entry.js.map} +1 -1
- package/dist/siemens-ix/p-c996a0ba.entry.js +2 -0
- package/dist/siemens-ix/p-c996a0ba.entry.js.map +1 -0
- package/dist/siemens-ix/p-ccf212e4.entry.js +2 -0
- package/dist/siemens-ix/{p-4968df15.entry.js.map → p-ccf212e4.entry.js.map} +1 -1
- package/dist/siemens-ix/p-cd8c86e2.entry.js +2 -0
- package/dist/siemens-ix/{p-da133606.entry.js.map → p-cd8c86e2.entry.js.map} +1 -1
- package/dist/siemens-ix/p-ce050115.entry.js +2 -0
- package/dist/siemens-ix/{p-167c037c.entry.js.map → p-ce050115.entry.js.map} +1 -1
- package/dist/siemens-ix/p-ceeefa96.entry.js +2 -0
- package/dist/siemens-ix/{p-dcb957d8.entry.js.map → p-ceeefa96.entry.js.map} +1 -1
- package/dist/siemens-ix/p-d0630de9.entry.js +2 -0
- package/dist/siemens-ix/p-d0630de9.entry.js.map +1 -0
- package/dist/siemens-ix/{p-042b8889.entry.js → p-d11781e7.entry.js} +2 -2
- package/dist/siemens-ix/{p-574e3cd1.entry.js → p-db7a632e.entry.js} +2 -2
- package/dist/siemens-ix/{p-228c5657.entry.js → p-e483ad44.entry.js} +2 -2
- package/dist/siemens-ix/p-e7406217.entry.js +2 -0
- package/dist/siemens-ix/{p-d29bcf75.entry.js.map → p-e7406217.entry.js.map} +1 -1
- package/dist/siemens-ix/p-f18c11c5.js +2 -0
- package/dist/siemens-ix/p-f18c11c5.js.map +1 -0
- package/dist/siemens-ix/siemens-ix-core.css +1 -1
- package/dist/siemens-ix/siemens-ix.css +26 -48
- package/dist/siemens-ix/siemens-ix.esm.js +1 -1
- package/dist/siemens-ix/siemens-ix.esm.js.map +1 -1
- package/dist/types/components/blind/test/blind.ct.d.ts +1 -0
- package/dist/types/components/dropdown/dropdown.d.ts +1 -0
- package/dist/types/components/slider/slider.d.ts +1 -1
- package/dist/types/components/tabs/tabs.d.ts +3 -2
- package/dist/types/components/tooltip/test/tooltip.ct.d.ts +1 -0
- package/dist/types/components/utils/listener.d.ts +11 -0
- package/dist/types/components/utils/requestAnimationFrame.d.ts +7 -0
- package/package.json +1 -1
- package/scss/components/form/_input.scss +8 -1
- package/scss/legacy/components/_forms.scss +0 -13
- package/scss/mixins/_fonts.scss +1 -1
- package/dist/cjs/base-button-c158438e.js.map +0 -1
- package/dist/cjs/menu-service-000df68d.js.map +0 -1
- package/dist/esm/base-button-87048318.js.map +0 -1
- package/dist/esm/menu-service-5555b4fa.js.map +0 -1
- package/dist/siemens-ix/p-167c037c.entry.js +0 -2
- package/dist/siemens-ix/p-1b9b19e6.js +0 -2
- package/dist/siemens-ix/p-28d29e36.entry.js +0 -2
- package/dist/siemens-ix/p-28d29e36.entry.js.map +0 -1
- package/dist/siemens-ix/p-302cd093.entry.js +0 -2
- package/dist/siemens-ix/p-32265ee2.entry.js +0 -2
- package/dist/siemens-ix/p-355f9085.entry.js +0 -2
- package/dist/siemens-ix/p-3ab30153.entry.js +0 -2
- package/dist/siemens-ix/p-3ab30153.entry.js.map +0 -1
- package/dist/siemens-ix/p-4968df15.entry.js +0 -2
- package/dist/siemens-ix/p-59dc0873.entry.js +0 -2
- package/dist/siemens-ix/p-5a5e155c.entry.js +0 -2
- package/dist/siemens-ix/p-5d172daa.js +0 -2
- package/dist/siemens-ix/p-5d172daa.js.map +0 -1
- package/dist/siemens-ix/p-634da7f2.entry.js +0 -2
- package/dist/siemens-ix/p-655d177c.entry.js +0 -2
- package/dist/siemens-ix/p-737fca1b.entry.js +0 -2
- package/dist/siemens-ix/p-9249df8d.entry.js +0 -2
- package/dist/siemens-ix/p-9848e4de.entry.js +0 -2
- package/dist/siemens-ix/p-9e0af149.entry.js +0 -2
- package/dist/siemens-ix/p-ad94f795.entry.js.map +0 -1
- package/dist/siemens-ix/p-b2042a15.entry.js.map +0 -1
- package/dist/siemens-ix/p-b6d40648.entry.js +0 -2
- package/dist/siemens-ix/p-b735ee5e.entry.js +0 -2
- package/dist/siemens-ix/p-b803c716.entry.js +0 -2
- package/dist/siemens-ix/p-bd873b87.entry.js +0 -2
- package/dist/siemens-ix/p-bd873b87.entry.js.map +0 -1
- package/dist/siemens-ix/p-c1318e16.entry.js +0 -2
- package/dist/siemens-ix/p-c1318e16.entry.js.map +0 -1
- package/dist/siemens-ix/p-d16a4670.entry.js +0 -2
- package/dist/siemens-ix/p-d16a4670.entry.js.map +0 -1
- package/dist/siemens-ix/p-d214f57a.entry.js +0 -2
- package/dist/siemens-ix/p-d214f57a.entry.js.map +0 -1
- package/dist/siemens-ix/p-d29bcf75.entry.js +0 -2
- package/dist/siemens-ix/p-d7e974a8.entry.js.map +0 -1
- package/dist/siemens-ix/p-da133606.entry.js +0 -2
- package/dist/siemens-ix/p-dcb957d8.entry.js +0 -2
- package/dist/siemens-ix/p-fd6006d2.entry.js +0 -2
- package/dist/siemens-ix/p-fd6006d2.entry.js.map +0 -1
- /package/dist/siemens-ix/{p-f97f2394.entry.js.map → p-58fe5c24.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-1b9b19e6.js.map → p-8b0793be.js.map} +0 -0
- /package/dist/siemens-ix/{p-042b8889.entry.js.map → p-d11781e7.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-574e3cd1.entry.js.map → p-db7a632e.entry.js.map} +0 -0
- /package/dist/siemens-ix/{p-228c5657.entry.js.map → p-e483ad44.entry.js.map} +0 -0
package/components/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"tabs.js","mappings":";;AAAA,MAAM,OAAO,GAAG,0lEAA0lE;;MC0B7lE,IAAI;;;;;;IA2CP,oBAAe,GAAG,MAAM,CAAC,UAAU,CAAC;IAEpC,gBAAW,GAGf;MACF,OAAO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ACF,CAAC,CAAC;GACJ;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WACE,KAAK,EAAC,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAEjD,eAAS,IAAI,EAAE,oBAAoB,GAAY,CAC3C,EACN,WACE,KAAK,EAAE;QACL,WAAW,EAAE,IAAI;QACjB,iBAAiB,EAAE,IAAI;QACvB,aAAa,EAAE,IAAI,CAAC,iBAAiB,EAAE;QACvC,cAAc,EAAE,IAAI,CAAC,aAAa,EAAE;QACpC,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,iBAAiB,EAAE;OAChE,IAED,WAAK,KAAK,EAAC,eAAe,IACxB,eAAa,CACT,CACF,EACN,WACE,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,IAAI,CAAC,cAAc,EAC1B,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAElD,eAAS,IAAI,EAAE,qBAAqB,GAAY,CAC5C,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tabs/tabs.scss?tag=ix-tabs&encapsulation=shadow","./src/components/tabs/tabs.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n width: auto;\n display: flex;\n align-items: center;\n position: relative;\n\n .tab-items {\n overflow: hidden;\n scroll-behavior: smooth;\n width: 100%;\n\n .items-content {\n display: flex;\n align-items: center;\n }\n }\n\n .arrow {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n top: 0;\n bottom: 0;\n left: 0;\n margin: auto 0;\n border-radius: 4px;\n color: var(--theme-btn-invisible-primary--color);\n background-color: var(--theme-btn-invisible-primary--background);\n z-index: 2;\n\n &:hover {\n color: var(--theme-btn-invisible-primary--color--hover);\n background-color: var(--theme-btn-invisible-primary--background--hover);\n }\n\n &:active {\n color: var(--theme-btn-invisible-primary--color--active);\n background-color: var(--theme-btn-invisible-primary--background--active);\n }\n\n &.right {\n left: auto;\n right: 0;\n }\n }\n\n .overflow-shadow {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n pointer-events: all;\n\n &.shadow-left {\n mask-image: linear-gradient(90deg, transparent 0px, black 45px);\n }\n\n &.shadow-right {\n mask-image: linear-gradient(\n 90deg,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n\n &.shadow-both {\n mask-image: linear-gradient(\n 90deg,\n transparent 0px,\n black 45px,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'ix-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs {\n @Element() hostElement!: HTMLIxTabsElement;\n\n /**\n * Set tab items to small size\n */\n @Prop() small = false;\n\n /**\n * Set rounded tabs\n */\n @Prop() rounded = false;\n\n /**\n * Set default selected tab by index\n */\n @Prop({ mutable: true }) selected = 0;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set placement style\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * `selected` property changed\n *\n * @since 2.0.0\n */\n @Event() selectedChange: EventEmitter<number>;\n\n @State() totalItems = 0;\n @State() currentScrollAmount = 0;\n @State() scrollAmount = 100;\n @State() styleNextArrow = {};\n @State() stylePreviousArrow = {};\n\n @State() scrollActionAmount = 0;\n\n private windowStartSize = window.innerWidth;\n\n private clickAction: {\n timeout: NodeJS.Timeout;\n isClick: boolean;\n } = {\n timeout: null,\n isClick: true,\n };\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.totalItems = 0;\n this.totalItems = this.getTabs().length;\n\n if (this.windowStartSize === 0)\n return (this.windowStartSize = window.innerWidth);\n this.move(this.windowStartSize - window.innerWidth);\n this.windowStartSize = window.innerWidth;\n }\n\n private getTabs() {\n return Array.from(this.hostElement.querySelectorAll('ix-tab-item'));\n }\n\n private getTab(tabIndex: number) {\n return this.getTabs()[tabIndex];\n }\n\n private getTabsWrapper() {\n return this.hostElement.shadowRoot.querySelector('.items-content');\n }\n\n private showArrows() {\n try {\n const tabWrapper = this.getTabsWrapper();\n return (\n tabWrapper.scrollWidth >\n Math.ceil(tabWrapper.getBoundingClientRect().width) &&\n this.layout === 'auto'\n );\n } catch (error) {\n return false;\n }\n }\n\n private showPreviousArrow() {\n try {\n return this.showArrows() && this.scrollActionAmount < 0;\n } catch (error) {\n return false;\n }\n }\n\n private showNextArrow() {\n try {\n const tabWrapper = this.getTabsWrapper();\n const tabWrapperRect = tabWrapper.getBoundingClientRect();\n\n return (\n this.showArrows() &&\n this.scrollActionAmount >\n (tabWrapper.scrollWidth - tabWrapperRect.width) * -1\n );\n } catch (error) {\n return false;\n }\n }\n\n private getArrowStyle(condition: boolean) {\n return {\n opacity: condition ? '1' : '0',\n zIndex: condition ? '1' : '-1',\n };\n }\n\n private move(amount: number, click = false) {\n const tabWrapper = this.getTabsWrapper();\n const maxScrollWidth =\n (tabWrapper.scrollWidth - tabWrapper.getBoundingClientRect().width) * -1;\n\n amount = this.currentScrollAmount + amount;\n amount = amount > 0 ? 0 : amount < maxScrollWidth ? maxScrollWidth : amount;\n\n const styles = [\n `transform: translateX(${amount}px);`,\n click ? 'transition: all ease-in-out 400ms;' : '',\n ].join('');\n\n tabWrapper.setAttribute('style', styles);\n\n if (click) this.currentScrollAmount = this.scrollActionAmount = amount;\n else this.scrollActionAmount = amount;\n }\n\n private moveTabToView(tabIndex: number) {\n if (!this.showArrows()) return;\n\n const tab = this.getTab(tabIndex).getBoundingClientRect();\n const amount = tab.x * -1;\n this.move(amount, true);\n }\n\n private setSelected(index: number) {\n this.selected = index;\n }\n\n private clickTab(index: number) {\n if (this.dragStop()) {\n return;\n }\n\n const { defaultPrevented } = this.selectedChange.emit(index);\n if (defaultPrevented) {\n return;\n }\n\n this.setSelected(index);\n this.moveTabToView(index);\n }\n\n private dragStart(element: HTMLIxTabItemElement, event: MouseEvent) {\n if (!this.showArrows()) return;\n if (event.button > 0) return;\n\n this.clickAction.timeout =\n this.clickAction.timeout === null\n ? setTimeout(() => (this.clickAction.isClick = false), 300)\n : null;\n\n const tabPositionX = parseFloat(window.getComputedStyle(element).left);\n const mousedownPositionX = event.clientX;\n const move = (event: MouseEvent) =>\n this.dragMove(event, tabPositionX, mousedownPositionX);\n\n window.addEventListener('mouseup', () => {\n window.removeEventListener('mousemove', move, false);\n this.dragStop();\n });\n window.addEventListener('mousemove', move, false);\n }\n\n private dragMove(event: MouseEvent, tabX: number, mousedownX: number) {\n this.move(event.clientX + tabX - mousedownX);\n }\n\n private dragStop() {\n clearTimeout(this.clickAction.timeout);\n this.clickAction.timeout = null;\n\n if (this.clickAction.isClick) return false;\n\n this.currentScrollAmount = this.scrollActionAmount;\n this.clickAction.isClick = true;\n\n return true;\n }\n\n componentDidRender() {\n const tabs = this.getTabs();\n this.totalItems = tabs.length;\n\n tabs.forEach((element, index) => {\n if (this.small) element.setAttribute('small', 'true');\n\n if (this.rounded) element.setAttribute('rounded', 'true');\n\n element.setAttribute('layout', this.layout);\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n element.setAttribute('placement', this.placement);\n });\n }\n\n componentWillRender() {\n requestAnimationFrame(() => {\n const showNextArrow = this.showNextArrow();\n const previousArrow = this.showPreviousArrow();\n this.styleNextArrow = this.getArrowStyle(showNextArrow);\n this.stylePreviousArrow = this.getArrowStyle(previousArrow);\n });\n }\n\n componentDidLoad() {\n const tabs = this.getTabs();\n tabs.forEach((element) => {\n element.addEventListener('mousedown', (event) =>\n this.dragStart(element, event)\n );\n });\n }\n\n @Listen('tabClick')\n onTabClick(event: CustomEvent) {\n if (event.defaultPrevented) {\n return;\n }\n\n const target = event.target;\n const tabs = this.getTabs();\n\n tabs.forEach((tab, index) => {\n if (!tab.disabled && tab === target) {\n this.clickTab(index);\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"arrow\"\n style={this.stylePreviousArrow}\n onClick={() => this.move(this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-left-small'}></ix-icon>\n </div>\n <div\n class={{\n 'tab-items': true,\n 'overflow-shadow': true,\n 'shadow-left': this.showPreviousArrow(),\n 'shadow-right': this.showNextArrow(),\n 'shadow-both': this.showNextArrow() && this.showPreviousArrow(),\n }}\n >\n <div class=\"items-content\">\n <slot></slot>\n </div>\n </div>\n <div\n class=\"arrow right\"\n style={this.styleNextArrow}\n onClick={() => this.move(-this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-right-small'}></ix-icon>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"tabs.js","mappings":";;AAAA;;;;;;;;AAWA;;;;;;AAMO,MAAM,6BAA6B,GAAG,CAC3C,QAAkC;EAElC,IAAI,OAAO,oCAAoC,KAAK,UAAU,EAAE;IAC9D,OAAO,oCAAoC,CAAC,QAAQ,CAAC,CAAC;GACvD;EACD,IAAI,OAAO,qBAAqB,KAAK,UAAU,EAAE;IAC/C,OAAO,qBAAqB,CAAC,QAAQ,CAAC,CAAC;GACxC;EACD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;;AC3BD,MAAM,OAAO,GAAG,0lEAA0l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Y,EAAE,IAAI,CAAC,IAElD,eAAS,IAAI,EAAE,qBAAqB,GAAY,CAC5C,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/utils/requestAnimationFrame.ts","./src/components/tabs/tabs.scss?tag=ix-tabs&encapsulation=shadow","./src/components/tabs/tabs.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ndeclare const __zone_symbol__requestAnimationFrame: any;\n\n/**\n * Prevents angular from change detection when requesting an animation frame\n *\n * Credits goes to:\n * https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/helpers.ts\n */\nexport const requestAnimationFrameNoNgZone = (\n callback: (...args: any[]) => void\n) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(callback);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(callback);\n }\n return setTimeout(callback);\n};\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/text-truncation';\n@import 'mixins/shadow-dom/component';\n\n:host {\n @include ix-component;\n width: auto;\n display: flex;\n align-items: center;\n position: relative;\n\n .tab-items {\n overflow: hidden;\n scroll-behavior: smooth;\n width: 100%;\n\n .items-content {\n display: flex;\n align-items: center;\n }\n }\n\n .arrow {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n top: 0;\n bottom: 0;\n left: 0;\n margin: auto 0;\n border-radius: 4px;\n color: var(--theme-btn-invisible-primary--color);\n background-color: var(--theme-btn-invisible-primary--background);\n z-index: 2;\n\n &:hover {\n color: var(--theme-btn-invisible-primary--color--hover);\n background-color: var(--theme-btn-invisible-primary--background--hover);\n }\n\n &:active {\n color: var(--theme-btn-invisible-primary--color--active);\n background-color: var(--theme-btn-invisible-primary--background--active);\n }\n\n &.right {\n left: auto;\n right: 0;\n }\n }\n\n .overflow-shadow {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n pointer-events: all;\n\n &.shadow-left {\n mask-image: linear-gradient(90deg, transparent 0px, black 45px);\n }\n\n &.shadow-right {\n mask-image: linear-gradient(\n 90deg,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n\n &.shadow-both {\n mask-image: linear-gradient(\n 90deg,\n transparent 0px,\n black 45px,\n black calc(100% - 45px),\n transparent 100%\n );\n }\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { requestAnimationFrameNoNgZone } from '../utils/requestAnimationFrame';\n\n@Component({\n tag: 'ix-tabs',\n styleUrl: 'tabs.scss',\n shadow: true,\n})\nexport class Tabs {\n @Element() hostElement!: HTMLIxTabsElement;\n\n /**\n * Set tab items to small size\n */\n @Prop() small = false;\n\n /**\n * Set rounded tabs\n */\n @Prop() rounded = false;\n\n /**\n * Set default selected tab by index\n */\n @Prop({ mutable: true }) selected = 0;\n\n /**\n * Set layout width style\n */\n @Prop() layout: 'auto' | 'stretched' = 'auto';\n\n /**\n * Set placement style\n */\n @Prop() placement: 'bottom' | 'top' = 'bottom';\n\n /**\n * `selected` property changed\n *\n * @since 2.0.0\n */\n @Event() selectedChange: EventEmitter<number>;\n\n @State() totalItems = 0;\n @State() currentScrollAmount = 0;\n @State() scrollAmount = 100;\n\n @State() scrollActionAmount = 0;\n\n private windowStartSize = window.innerWidth;\n\n private get arrowLeftElement() {\n return this.hostElement.shadowRoot.querySelector(\n '[data-arrow-left]'\n ) as HTMLElement;\n }\n\n private get arrowRightElement() {\n return this.hostElement.shadowRoot.querySelector(\n '[data-arrow-right]'\n ) as HTMLElement;\n }\n\n private clickAction: {\n timeout: NodeJS.Timeout;\n isClick: boolean;\n } = {\n timeout: null,\n isClick: true,\n };\n\n @Listen('resize', { target: 'window' })\n onWindowResize() {\n this.totalItems = 0;\n this.totalItems = this.getTabs().length;\n\n if (this.windowStartSize === 0)\n return (this.windowStartSize = window.innerWidth);\n this.move(this.windowStartSize - window.innerWidth);\n this.windowStartSize = window.innerWidth;\n }\n\n private getTabs() {\n return Array.from(this.hostElement.querySelectorAll('ix-tab-item'));\n }\n\n private getTab(tabIndex: number) {\n return this.getTabs()[tabIndex];\n }\n\n private getTabsWrapper() {\n return this.hostElement.shadowRoot.querySelector('.items-content');\n }\n\n private showArrows() {\n try {\n const tabWrapper = this.getTabsWrapper();\n return (\n tabWrapper.scrollWidth >\n Math.ceil(tabWrapper.getBoundingClientRect().width) &&\n this.layout === 'auto'\n );\n } catch (error) {\n return false;\n }\n }\n\n private showPreviousArrow() {\n try {\n return this.showArrows() && this.scrollActionAmount < 0;\n } catch (error) {\n return false;\n }\n }\n\n private showNextArrow() {\n try {\n const tabWrapper = this.getTabsWrapper();\n const tabWrapperRect = tabWrapper.getBoundingClientRect();\n\n return (\n this.showArrows() &&\n this.scrollActionAmount >\n (tabWrapper.scrollWidth - tabWrapperRect.width) * -1\n );\n } catch (error) {\n return false;\n }\n }\n\n private getArrowStyle(condition: boolean) {\n return {\n opacity: condition ? '1' : '0',\n zIndex: condition ? '1' : '-1',\n };\n }\n\n private move(amount: number, click = false) {\n const tabWrapper = this.getTabsWrapper();\n const maxScrollWidth =\n (tabWrapper.scrollWidth - tabWrapper.getBoundingClientRect().width) * -1;\n\n amount = this.currentScrollAmount + amount;\n amount = amount > 0 ? 0 : amount < maxScrollWidth ? maxScrollWidth : amount;\n\n const styles = [\n `transform: translateX(${amount}px);`,\n click ? 'transition: all ease-in-out 400ms;' : '',\n ].join('');\n\n tabWrapper.setAttribute('style', styles);\n\n if (click) this.currentScrollAmount = this.scrollActionAmount = amount;\n else this.scrollActionAmount = amount;\n }\n\n private moveTabToView(tabIndex: number) {\n if (!this.showArrows()) return;\n\n const tab = this.getTab(tabIndex).getBoundingClientRect();\n const amount = tab.x * -1;\n this.move(amount, true);\n }\n\n private setSelected(index: number) {\n this.selected = index;\n }\n\n private clickTab(index: number) {\n if (this.dragStop()) {\n return;\n }\n\n const { defaultPrevented } = this.selectedChange.emit(index);\n if (defaultPrevented) {\n return;\n }\n\n this.setSelected(index);\n this.moveTabToView(index);\n }\n\n private dragStart(element: HTMLIxTabItemElement, event: MouseEvent) {\n if (!this.showArrows()) return;\n if (event.button > 0) return;\n\n this.clickAction.timeout =\n this.clickAction.timeout === null\n ? setTimeout(() => (this.clickAction.isClick = false), 300)\n : null;\n\n const tabPositionX = parseFloat(window.getComputedStyle(element).left);\n const mousedownPositionX = event.clientX;\n const move = (event: MouseEvent) =>\n this.dragMove(event, tabPositionX, mousedownPositionX);\n\n window.addEventListener('mouseup', () => {\n window.removeEventListener('mousemove', move, false);\n this.dragStop();\n });\n window.addEventListener('mousemove', move, false);\n }\n\n private dragMove(event: MouseEvent, tabX: number, mousedownX: number) {\n this.move(event.clientX + tabX - mousedownX);\n }\n\n private dragStop() {\n clearTimeout(this.clickAction.timeout);\n this.clickAction.timeout = null;\n\n if (this.clickAction.isClick) return false;\n\n this.currentScrollAmount = this.scrollActionAmount;\n this.clickAction.isClick = true;\n\n return true;\n }\n\n componentWillLoad() {\n const tabs = this.getTabs();\n\n tabs.map((element, index) => {\n if (this.small) element.setAttribute('small', 'true');\n\n if (this.rounded) element.setAttribute('rounded', 'true');\n\n element.setAttribute('layout', this.layout);\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n\n element.setAttribute('placement', this.placement);\n });\n }\n\n componentDidRender() {\n const tabs = this.getTabs();\n this.totalItems = tabs.length;\n\n tabs.map((element, index) => {\n element.setAttribute(\n 'selected',\n index === this.selected ? 'true' : 'false'\n );\n });\n }\n\n componentWillRender() {\n requestAnimationFrameNoNgZone(() => {\n const showNextArrow = this.showNextArrow();\n const previousArrow = this.showPreviousArrow();\n\n Object.assign(\n this.arrowLeftElement.style,\n this.getArrowStyle(previousArrow)\n );\n Object.assign(\n this.arrowRightElement.style,\n this.getArrowStyle(showNextArrow)\n );\n });\n }\n\n componentDidLoad() {\n const tabs = this.getTabs();\n tabs.forEach((element) => {\n element.addEventListener('mousedown', (event) =>\n this.dragStart(element, event)\n );\n });\n }\n\n @Listen('tabClick')\n onTabClick(event: CustomEvent) {\n if (event.defaultPrevented) {\n return;\n }\n\n const target = event.target;\n const tabs = this.getTabs();\n\n tabs.forEach((tab, index) => {\n if (!tab.disabled && tab === target) {\n this.clickTab(index);\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"arrow\"\n data-arrow-left\n onClick={() => this.move(this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-left-small'}></ix-icon>\n </div>\n <div\n class={{\n 'tab-items': true,\n 'overflow-shadow': true,\n 'shadow-left': this.showPreviousArrow(),\n 'shadow-right': this.showNextArrow(),\n 'shadow-both': this.showNextArrow() && this.showPreviousArrow(),\n }}\n >\n <div class=\"items-content\">\n <slot></slot>\n </div>\n </div>\n <div\n class=\"arrow right\"\n data-arrow-right\n onClick={() => this.move(-this.scrollAmount, true)}\n >\n <ix-icon name={'chevron-right-small'}></ix-icon>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -6,7 +6,7 @@ import { d as defineCustomElement$3 } from './icon-button.js';
|
|
|
6
6
|
import { d as defineCustomElement$2 } from './spinner.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './typography.js';
|
|
8
8
|
|
|
9
|
-
const timePickerCss = "label{color:var(--theme-color-soft-text);padding:2px 0px}label.label-alignment-left{padding:6px 0px}input,input:-webkit-autofill{font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;min-height:2rem;width:100%;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow)}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-input--background) inset !important;-webkit-text-fill-color:var(--theme-input--color) !important;border-color:var(--theme-input--border-color) !important}input::-moz-placeholder{color:var(--theme-input-hint--color)}input::placeholder{color:var(--theme-input-hint--color)}input.hover,input:hover{border-color:var(--theme-input--border-color--hover);background-color:var(--theme-input--background--hover)}input.focus,input:focus{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus)}input:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only,input:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only::-moz-placeholder,input:read-only::-moz-placeholder{color:transparent}input:-moz-read-only::placeholder{color:transparent}input.read-only::placeholder,input:read-only::placeholder{color:transparent}input:disabled{box-shadow:none;background-color:transparent;outline:none;border:none;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}input:disabled::-moz-placeholder{color:transparent}input:disabled::placeholder{color:transparent}input[type=number]{text-align:right}input[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}textarea{height:3.25rem;padding:0.375rem 1.25rem 0.375rem 0.5rem}textarea,textarea:-webkit-autofill{font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;min-height:2rem;width:100%;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow)}textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-input--background) inset !important;-webkit-text-fill-color:var(--theme-input--color) !important;border-color:var(--theme-input--border-color) !important}textarea::-moz-placeholder{color:var(--theme-input-hint--color)}textarea::placeholder{color:var(--theme-input-hint--color)}textarea.hover,textarea:hover{border-color:var(--theme-input--border-color--hover);background-color:var(--theme-input--background--hover)}textarea.focus,textarea:focus{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus)}textarea:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only,textarea:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only::-moz-placeholder,textarea:read-only::-moz-placeholder{color:transparent}textarea:-moz-read-only::placeholder{color:transparent}textarea.read-only::placeholder,textarea:read-only::placeholder{color:transparent}textarea:disabled{box-shadow:none;background-color:transparent;outline:none;border:none;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}textarea:disabled::-moz-placeholder{color:transparent}textarea:disabled::placeholder{color:transparent}textarea~.valid-feedback,textarea~.invalid-feedback,input~.valid-feedback,input~.invalid-feedback{display:none;font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}form textarea~.valid-feedback,form input~.valid-feedback{color:var(--theme-color-success)}form textarea~.invalid-feedback,form input~.invalid-feedback{color:var(--theme-color-alarm-text)}form:not([novalidate]) :invalid,form:not([novalidate]) .is-invalid,form.was-validated :invalid,form.was-validated .is-invalid{background-color:var(--theme-input-error--background);border-color:var(--theme-input-error--border-color);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: sketchtool 62 (101010) - https://sketch.com --%3E%3Ctitle%3Eerror%3C/title%3E%3Cdesc%3ECreated with sketchtool.%3C/desc%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' fill-opacity='0.75'%3E%3Cg id='error' fill='%23ff2640'%3E%3Cg id='error/error'%3E%3Cpath d='M256,42.6666667 C373.626371,42.6666667 469.333333,138.373627 469.333333,256 C469.333333,373.626371 373.626371,469.333333 256,469.333333 C138.373627,469.333333 42.6666667,373.626371 42.6666667,256 C42.6666667,138.373627 138.373627,42.6666667 256,42.6666667 Z M256,85.3333333 C161.559631,85.3333333 85.3333333,161.559631 85.3333333,256 C85.3333333,350.44037 161.559631,426.666667 256,426.666667 C350.44037,426.666667 426.666667,350.44037 426.666667,256 C426.666667,161.559631 350.44037,85.3333333 256,85.3333333 Z M326.248389,155.581722 L356.418278,185.751611 L286.168667,255.999667 L356.418278,326.248389 L326.248389,356.418278 L255.999667,286.168667 L185.751611,356.418278 L155.581722,326.248389 L225.829667,255.999667 L155.581722,185.751611 L185.751611,155.581722 L255.999667,225.829667 L326.248389,155.581722 Z' id='Combined-Shape'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\") !important;background-position:left calc(0.375em + 0.1875rem) center;padding-right:0.75rem;padding-left:calc(1.5em + 0.75rem);background-size:18px;background-repeat:no-repeat}form:not([novalidate]) :invalid~.invalid-feedback,form:not([novalidate]) .is-invalid~.invalid-feedback,form.was-validated :invalid~.invalid-feedback,form.was-validated .is-invalid~.invalid-feedback{display:block}form:not([novalidate]) :valid~.valid-feedback,form:not([novalidate]) .is-valid~.valid-feedback,form.was-validated :valid~.valid-feedback,form.was-validated .is-valid~.valid-feedback{display:block}:host{}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .form-control,:host .form-control-plaintext{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);color:var(--theme-input--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--theme-input--border-radius);height:2rem;min-height:2rem;min-width:2rem;background-color:var(--theme-input--background);border:solid 1px var(--theme-input--border-color);box-shadow:var(--theme-input--box-shadow);-webkit-padding-start:0.5rem;padding-inline-start:0.5rem;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem}:host .form-control::-moz-placeholder,:host .form-control-plaintext::-moz-placeholder{color:var(--theme-input-hint--color)}:host .form-control::placeholder,:host .form-control-plaintext::placeholder{color:var(--theme-input-hint--color)}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}:host .form-control:focus-visible{color:var(--theme-input--color)}:host .form-control[type=number]{text-align:right}:host .form-control[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}:host .form-control.readonly,:host .form-control[readonly]{background:transparent !important;-webkit-border-before:none !important;border-block-start:none !important;-webkit-border-start:none !important;border-inline-start:none !important;-webkit-border-end:none !important;border-inline-end:none !important;border-radius:0rem}:host .form-control:-moz-read-only{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}:host .form-control:read-only,:host .form-control[readonly],:host .form-control[readOnly],:host .form-control.readonly{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}:host .form-control:read-only::-moz-placeholder,:host .form-control[readonly]::-moz-placeholder,:host .form-control[readOnly]::-moz-placeholder,:host .form-control.readonly::-moz-placeholder{color:transparent}:host .form-control:-moz-read-only::placeholder{color:transparent}:host .form-control:read-only::placeholder,:host .form-control[readonly]::placeholder,:host .form-control[readOnly]::placeholder,:host .form-control.readonly::placeholder{color:transparent}:host .form-control:disabled,:host .form-control.disabled{background:transparent !important;-webkit-border-before:none !important;border-block-start:none !important;-webkit-border-start:none !important;border-inline-start:none !important;-webkit-border-end:none !important;border-inline-end:none !important;border-radius:0rem;color:var(--theme-color-weak-text);border-color:var(--theme-input--border-color-bottom--disabled)}:host .form-control:disabled::-moz-placeholder,:host .form-control.disabled::-moz-placeholder{color:transparent}:host .form-control:disabled::placeholder,:host .form-control.disabled::placeholder{color:transparent}:host .form-control-plaintext{outline:0}:host .form-group{position:relative}:host .input-wrapper{display:flex;position:relative;align-items:center;flex-wrap:nowrap}:host .input-wrapper>.glyph{display:block;position:absolute;-webkit-margin-start:0.312rem;margin-inline-start:0.312rem;color:var(--theme-color-std-text)}:host .input-wrapper>input{-webkit-padding-start:2.2rem;padding-inline-start:2.2rem}:host select.form-control{padding:0 0.312rem}:host textarea.form-control{padding:0.375rem 0.5rem}:host .was-validated .form-control:invalid,:host .was-validated .is-invalid{background-color:var(--theme-input-error--background);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: sketchtool 62 (101010) - https://sketch.com --%3E%3Ctitle%3Eerror%3C/title%3E%3Cdesc%3ECreated with sketchtool.%3C/desc%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' fill-opacity='0.75'%3E%3Cg id='error' fill='%23ff2640'%3E%3Cg id='error/error'%3E%3Cpath d='M256,42.6666667 C373.626371,42.6666667 469.333333,138.373627 469.333333,256 C469.333333,373.626371 373.626371,469.333333 256,469.333333 C138.373627,469.333333 42.6666667,373.626371 42.6666667,256 C42.6666667,138.373627 138.373627,42.6666667 256,42.6666667 Z M256,85.3333333 C161.559631,85.3333333 85.3333333,161.559631 85.3333333,256 C85.3333333,350.44037 161.559631,426.666667 256,426.666667 C350.44037,426.666667 426.666667,350.44037 426.666667,256 C426.666667,161.559631 350.44037,85.3333333 256,85.3333333 Z M326.248389,155.581722 L356.418278,185.751611 L286.168667,255.999667 L356.418278,326.248389 L326.248389,356.418278 L255.999667,286.168667 L185.751611,356.418278 L155.581722,326.248389 L225.829667,255.999667 L155.581722,185.751611 L185.751611,155.581722 L255.999667,225.829667 L326.248389,155.581722 Z' id='Combined-Shape'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\") !important;background-position:left calc(0.375em + 0.1875rem) center !important;padding-right:0.75rem;padding-left:calc(1.5em + 0.75rem);background-size:18px;background-repeat:no-repeat}:host input.disabled,:host input:disabled{color:var(--theme-input--color--disabled)}:host input:-moz-read-only{cursor:default}:host input:read-only,:host input.readonly{cursor:default}:host .header{display:flex;align-items:center;justify-content:center;height:2.5rem}:host .clock{display:flex;justify-content:center;align-items:center;padding:4.25rem 0}:host input,:host .time-reference{width:2.625rem;height:1.5rem;text-align:center;margin-top:0.25rem;margin-bottom:0.25rem;}:host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button,:host .time-reference::-webkit-outer-spin-button,:host .time-reference::-webkit-inner-spin-button{-webkit-appearance:none;margin:0 0.3125rem}:host input[type=number],:host .time-reference[type=number]{-moz-appearance:textfield}:host .form-control[type=number]{text-align:center}:host .columns{display:flex;flex-direction:column;align-items:center;justify-content:space-around}:host .column-seperator{display:flex;align-items:center;margin:0 0.25rem}:host .button{display:flex;justify-content:flex-end}:host .default-space{margin-left:1rem}:host .text-align{text-align:center}:host .hidden{display:none}:host .time-reference{margin-top:0.5rem;margin-bottom:0.5rem}";
|
|
9
|
+
const timePickerCss = "label{color:var(--theme-color-soft-text);padding:2px 0px}label.label-alignment-left{padding:6px 0px}input,input:-webkit-autofill{font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;min-height:2rem;width:100%;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow)}input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-input--background) inset !important;-webkit-text-fill-color:var(--theme-input--color) !important;border-color:var(--theme-input--border-color) !important}input::-moz-placeholder{color:var(--theme-input-hint--color)}input::placeholder{color:var(--theme-input-hint--color)}input.hover,input:hover{border-color:var(--theme-input--border-color--hover);background-color:var(--theme-input--background--hover)}input.focus,input:focus{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus)}input:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only,input:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}input.read-only::-moz-placeholder,input:read-only::-moz-placeholder{color:transparent}input:-moz-read-only::placeholder{color:transparent}input.read-only::placeholder,input:read-only::placeholder{color:transparent}input:disabled{box-shadow:none;background-color:transparent;outline:none;border:none;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}input:disabled::-moz-placeholder{color:transparent}input:disabled::placeholder{color:transparent}input[type=number]{text-align:right}input[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}textarea{height:3.25rem;padding:0.375rem 1.25rem 0.375rem 0.5rem}textarea,textarea:-webkit-autofill{font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;min-height:2rem;width:100%;padding:0.25rem 0.5rem;background-color:var(--theme-input--background);color:var(--theme-input--color);text-overflow:ellipsis;border:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color);border-radius:var(--theme-input--border-radius);box-shadow:var(--theme-input--box-shadow)}textarea:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--theme-input--background) inset !important;-webkit-text-fill-color:var(--theme-input--color) !important;border-color:var(--theme-input--border-color) !important}textarea::-moz-placeholder{color:var(--theme-input-hint--color)}textarea::placeholder{color:var(--theme-input-hint--color)}textarea.hover,textarea:hover{border-color:var(--theme-input--border-color--hover);background-color:var(--theme-input--background--hover)}textarea.focus,textarea:focus{outline:1px solid var(--theme-color-focus-bdr);outline-offset:var(--theme-input--focus--outline-offset);border-color:var(--theme-input--border-color--focus)}textarea:-moz-read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only,textarea:read-only{box-shadow:none;background-color:transparent;outline:none;border:none;border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--readonly)}textarea.read-only::-moz-placeholder,textarea:read-only::-moz-placeholder{color:transparent}textarea:-moz-read-only::placeholder{color:transparent}textarea.read-only::placeholder,textarea:read-only::placeholder{color:transparent}textarea:disabled{box-shadow:none;background-color:transparent;outline:none;border:none;color:var(--theme-input--color--disabled);border-bottom:var(--theme-input--border-thickness, 1px) solid var(--theme-input--border-color-bottom--disabled)}textarea:disabled::-moz-placeholder{color:transparent}textarea:disabled::placeholder{color:transparent}textarea~.valid-feedback,textarea~.invalid-feedback,input~.valid-feedback,input~.invalid-feedback{display:none;font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}form textarea~.valid-feedback,form input~.valid-feedback{color:var(--theme-color-success)}form textarea~.invalid-feedback,form input~.invalid-feedback{color:var(--theme-color-alarm-text)}form:not([novalidate]) :invalid,form:not([novalidate]) .is-invalid,form.was-validated :invalid,form.was-validated .is-invalid{background-color:var(--theme-input-error--background);border-color:var(--theme-input-error--border-color);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3C!-- Generator: sketchtool 62 (101010) - https://sketch.com --%3E%3Ctitle%3Eerror%3C/title%3E%3Cdesc%3ECreated with sketchtool.%3C/desc%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' fill-opacity='0.75'%3E%3Cg id='error' fill='%23ff2640'%3E%3Cg id='error/error'%3E%3Cpath d='M256,42.6666667 C373.626371,42.6666667 469.333333,138.373627 469.333333,256 C469.333333,373.626371 373.626371,469.333333 256,469.333333 C138.373627,469.333333 42.6666667,373.626371 42.6666667,256 C42.6666667,138.373627 138.373627,42.6666667 256,42.6666667 Z M256,85.3333333 C161.559631,85.3333333 85.3333333,161.559631 85.3333333,256 C85.3333333,350.44037 161.559631,426.666667 256,426.666667 C350.44037,426.666667 426.666667,350.44037 426.666667,256 C426.666667,161.559631 350.44037,85.3333333 256,85.3333333 Z M326.248389,155.581722 L356.418278,185.751611 L286.168667,255.999667 L356.418278,326.248389 L326.248389,356.418278 L255.999667,286.168667 L185.751611,356.418278 L155.581722,326.248389 L225.829667,255.999667 L155.581722,185.751611 L185.751611,155.581722 L255.999667,225.829667 L326.248389,155.581722 Z' id='Combined-Shape'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E\") !important;background-position:left calc(0.375em + 0.1875rem) center;padding-right:0.75rem;padding-left:calc(1.5em + 0.75rem);background-size:18px;background-repeat:no-repeat}form:not([novalidate]) :invalid~.invalid-feedback,form:not([novalidate]) .is-invalid~.invalid-feedback,form.was-validated :invalid~.invalid-feedback,form.was-validated .is-invalid~.invalid-feedback{display:block}form:not([novalidate]) :valid~.valid-feedback,form:not([novalidate]) .is-valid~.valid-feedback,form.was-validated :valid~.valid-feedback,form.was-validated .is-valid~.valid-feedback{display:block}form:not(.was-validated) .invalid-feedback,form:not(.was-validated) .valid-feedback{display:none !important}:host{}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .form-control,:host .form-control-plaintext{-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text);color:var(--theme-input--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--theme-input--border-radius);height:2rem;min-height:2rem;min-width:2rem;background-color:var(--theme-input--background);border:solid 1px var(--theme-input--border-color);box-shadow:var(--theme-input--box-shadow);padding-inline-start:0.5rem;padding-inline-end:0.5rem}:host .form-control::-moz-placeholder,:host .form-control-plaintext::-moz-placeholder{color:var(--theme-input-hint--color)}:host .form-control::placeholder,:host .form-control-plaintext::placeholder{color:var(--theme-input-hint--color)}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled),:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled){cursor:pointer}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover,:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):hover{background-color:var(--theme-input--background--hover);border-color:var(--theme-input--border-color--hover);cursor:auto}:host .form-control:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,:host .form-control-plaintext:not(:-moz-read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}:host .form-control:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible,:host .form-control-plaintext:not(:read-only):not([readonly]):not([readOnly]):not(.readonly):not(.disabled):not(:disabled):focus-visible{background-color:var(--theme-input--background--focus);border-color:var(--theme-input--border-color--focus);outline-offset:var(--theme-input--focus--outline-offset);box-shadow:var(--theme-input--box-shadow);outline:1px solid var(--theme-color-focus-bdr)}:host .form-control:focus-visible{color:var(--theme-input--color)}:host .form-control[type=number]{text-align:right}:host .form-control[type=number]::-webkit-inner-spin-button{margin-right:-2px;margin-left:2px;display:none}:host .form-control.readonly,:host .form-control[readonly]{background:transparent !important;border-block-start:none !important;border-inline-start:none !important;border-inline-end:none !important;border-radius:0rem}:host .form-control:-moz-read-only{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}:host .form-control:read-only,:host .form-control[readonly],:host .form-control[readOnly],:host .form-control.readonly{box-shadow:none !important;outline:none !important;border-color:var(--theme-input--border-color);cursor:default !important}:host .form-control:read-only::-moz-placeholder,:host .form-control[readonly]::-moz-placeholder,:host .form-control[readOnly]::-moz-placeholder,:host .form-control.readonly::-moz-placeholder{color:transparent}:host .form-control:-moz-read-only::placeholder{color:transparent}:host .form-control:read-only::placeholder,:host .form-control[readonly]::placeholder,:host .form-control[readOnly]::placeholder,:host .form-control.readonly::placeholder{color:transparent}:host .form-control:disabled,:host .form-control.disabled{background:transparent !important;border-block-start:none !important;border-inline-start:none !important;border-inline-end:none !important;border-radius:0rem;color:var(--theme-color-weak-text);border-color:var(--theme-input--border-color-bottom--disabled)}:host .form-control:disabled::-moz-placeholder,:host .form-control.disabled::-moz-placeholder{color:transparent}:host .form-control:disabled::placeholder,:host .form-control.disabled::placeholder{color:transparent}:host .form-control-plaintext{outline:0}:host .form-group{position:relative}:host .input-wrapper{display:flex;position:relative;align-items:center;flex-wrap:nowrap}:host .input-wrapper>.glyph{display:block;position:absolute;margin-inline-start:0.312rem;color:var(--theme-color-std-text)}:host .input-wrapper>input{padding-inline-start:2.2rem}:host select.form-control{padding:0 0.312rem}:host textarea.form-control{padding:0.375rem 0.5rem}:host input.disabled,:host input:disabled{color:var(--theme-input--color--disabled)}:host input:-moz-read-only{cursor:default}:host input:read-only,:host input.readonly{cursor:default}:host .header{display:flex;align-items:center;justify-content:center;height:2.5rem}:host .clock{display:flex;justify-content:center;align-items:center;padding:4.25rem 0}:host input,:host .time-reference{width:2.625rem;height:1.5rem;text-align:center;margin-top:0.25rem;margin-bottom:0.25rem;}:host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button,:host .time-reference::-webkit-outer-spin-button,:host .time-reference::-webkit-inner-spin-button{-webkit-appearance:none;margin:0 0.3125rem}:host input[type=number],:host .time-reference[type=number]{-moz-appearance:textfield}:host .form-control[type=number]{text-align:center}:host .columns{display:flex;flex-direction:column;align-items:center;justify-content:space-around}:host .column-seperator{display:flex;align-items:center;margin:0 0.25rem}:host .button{display:flex;justify-content:flex-end}:host .default-space{margin-left:1rem}:host .text-align{text-align:center}:host .hidden{display:none}:host .time-reference{margin-top:0.5rem;margin-bottom:0.5rem}";
|
|
10
10
|
|
|
11
11
|
const TimePicker = /*@__PURE__*/ proxyCustomElement(class TimePicker extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"time-picker.js","mappings":";;;;;;;;A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AAI,EACT,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACrC,KAAK,QACL,IAAI,EAAE,YAAY,EAClB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,QAAQ,GACE,EAClB,WAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,aAAa,CAAO,EACtD,sBACE,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACrC,KAAK,QACL,IAAI,EAAE,cAAc,EACpB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,QAAQ,GACE,CACd,CACF,EAEN,WAAK,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,IAClD,iBACE,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAE9D,IAAI,CAAC,cAAc,CACV,CACR,CACY,CACf,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["DateTime"],"sources":["./src/components/time-picker/time-picker.scss?tag=ix-time-picker&encapsulation=shadow","./src/components/time-picker/time-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n\n:host {\n @include ix-component;\n\n @import 'legacy/components/forms';\n\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n height: $large-control-height;\n }\n\n .clock {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 4.25rem 0;\n }\n\n input,\n .time-reference {\n width: 2.625rem;\n height: $large-space;\n text-align: center;\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0 0.3125rem;\n }\n\n /* Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n }\n\n .form-control[type='number'] {\n text-align: center;\n }\n\n .columns {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n }\n\n .column-seperator {\n display: flex;\n align-items: center;\n margin: 0 $tiny-space;\n }\n\n .button {\n display: flex;\n justify-content: flex-end;\n }\n\n .default-space {\n margin-left: $default-space;\n }\n\n .text-align {\n text-align: center;\n }\n\n .hidden {\n display: none;\n }\n\n .time-reference {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { DateTimeCardCorners } from '../date-time-card/date-time-card';\n\nexport type TimePickerCorners = DateTimeCardCorners;\n\n@Component({\n tag: 'ix-time-picker',\n styleUrl: 'time-picker.scss',\n shadow: true,\n})\nexport class TimePicker {\n /**\n * Format of time string\n *\n * @since 1.1.0\n */\n @Prop() format: string = 'TT';\n\n /**\n * Corner style\n */\n @Prop() corners: TimePickerCorners = 'rounded';\n\n /**\n * @deprecated Will be removed in 2.0.0\n */\n @Prop() individual: boolean = true;\n\n /**\n * Show hour input\n */\n @Prop() showHour = false;\n\n /**\n * Show minutes input\n */\n @Prop() showMinutes = false;\n\n /**\n * Show seconds input\n */\n @Prop() showSeconds = false;\n\n /**\n * Select time with format string\n *\n * @since 1.1.0\n */\n @Prop() time: string = DateTime.now().toFormat(this.format);\n\n /**\n * Show time reference input\n *\n * @since 1.1.0 time reference is default aligned with formt tt\n */\n @Prop({ mutable: true }) showTimeReference = undefined;\n\n /**\n * Set time reference\n */\n @Prop({ mutable: true }) timeReference: 'AM' | 'PM' = DateTime.fromFormat(\n this.time,\n this.format\n ).toFormat('a') as 'PM' | 'AM';\n\n /**\n * Text of date select button\n *\n * @since 1.1.0\n */\n @Prop() textSelectTime = 'Done';\n\n /**\n * Time event\n */\n @Event() done: EventEmitter<string>;\n\n /**\n * Time change event\n */\n @Event() timeChange: EventEmitter<string>;\n\n @State() hourInputRef: HTMLInputElement;\n @State() minuteInputRef: HTMLInputElement;\n @State() secondInputRef: HTMLInputElement;\n @State() referenceInputRef: HTMLInputElement;\n\n get hour() {\n return this._time.hour;\n }\n\n get minutes() {\n return this._time.minute;\n }\n\n get seconds() {\n return this._time.second;\n }\n\n private _time: DateTime = DateTime.now();\n\n private setInputValue(\n inputElement: HTMLInputElement,\n value: number,\n max: number\n ) {\n if (value > max) {\n inputElement.value = max.toString();\n } else if (value < 0) {\n inputElement.value = '0';\n } else {\n inputElement.value = value.toString();\n }\n\n this.updateAndEmitTime();\n }\n\n private updateAndEmitTime() {\n this._time = this._time.set({\n hour: Number(this.hourInputRef.value),\n minute: Number(this.minuteInputRef.value),\n second: Number(this.secondInputRef.value),\n });\n\n this.setHourAccordingToReference();\n\n this.emitTimeChange();\n }\n\n private toggleInputValue(\n inputElement: HTMLInputElement,\n currentValue: number,\n step: 'up' | 'down',\n max: number\n ) {\n if (step === 'up') {\n if (currentValue === max) {\n inputElement.value = '0';\n } else {\n inputElement.stepUp();\n }\n } else {\n if (currentValue === 0) {\n inputElement.value = max.toString();\n } else {\n inputElement.stepDown();\n }\n }\n }\n\n private toggleHourInputWithRef(\n inputElement: HTMLInputElement,\n currentValue: number,\n step: 'up' | 'down'\n ) {\n if (step === 'up') {\n if (currentValue === this.getMaxHour()) {\n inputElement.value = '0';\n } else {\n inputElement.stepUp();\n }\n } else {\n if (\n (this.showTimeReference &&\n this.timeReference === 'PM' &&\n currentValue === 12) ||\n currentValue === 0\n ) {\n inputElement.value = this.getMaxDisplayedHour().toString();\n } else {\n inputElement.stepDown();\n }\n }\n }\n\n private updateInput(\n step: 'up' | 'down',\n { hours = undefined, minutes = undefined, seconds = undefined }\n ) {\n if (hours) {\n if (this.showTimeReference) {\n this.toggleHourInputWithRef(this.hourInputRef, this.hour, step);\n } else {\n this.toggleInputValue(this.hourInputRef, this.hour, step, 23);\n }\n }\n\n if (minutes) {\n this.toggleInputValue(this.minuteInputRef, this.minutes, step, 59);\n }\n\n if (seconds) {\n this.toggleInputValue(this.secondInputRef, this.seconds, step, 59);\n }\n\n this.updateAndEmitTime();\n }\n\n private changeReference() {\n if (this.timeReference === 'AM') {\n this.timeReference = 'PM';\n } else {\n this.timeReference = 'AM';\n }\n\n this.setHourAccordingToReference();\n\n this.emitTimeChange();\n }\n\n private setHourAccordingToReference() {\n if (!this.showTimeReference) {\n return;\n }\n\n let hour = Number(this.hourInputRef.value);\n\n if (this.timeReference === 'PM') hour += 12;\n\n this._time = this._time.set({ hour });\n }\n\n private emitTimeChange() {\n const time = this._time.toFormat(this.format);\n this.timeChange.emit(time);\n }\n\n componentWillLoad() {\n this._time = DateTime.fromFormat(this.time, this.format);\n if (this.showTimeReference === undefined) {\n const matchedKeys = Object.keys(\n DateTime.fromFormatExplain(this.time, this.format).matches\n );\n this.showTimeReference = matchedKeys.includes('a');\n }\n }\n\n /**\n * Get current time\n */\n @Method()\n async getCurrentTime() {\n return this._time.toFormat(this.format);\n }\n\n private getDisplayedHour() {\n if (this.showTimeReference && this.timeReference === 'PM') {\n return this._time.hour - 12;\n }\n\n return this._time.hour;\n }\n\n private getMaxDisplayedHour() {\n if (this.showTimeReference) {\n return 11;\n }\n\n return 23;\n }\n\n private getMaxHour() {\n if (this.showTimeReference && this.timeReference === 'AM') {\n return 11;\n }\n\n return 23;\n }\n\n render() {\n let hideHour = !this.showHour;\n let hideMinutes = !this.showMinutes;\n let hideSeconds = !this.showSeconds;\n const hideTimeReference = !this.showTimeReference;\n const hideIndividual = !this.individual;\n\n if (hideHour && hideMinutes && hideSeconds) {\n hideHour = false;\n hideMinutes = false;\n hideSeconds = false;\n }\n\n const hideHourSeperator = hideMinutes || hideHour;\n const hideMinutesSeperator = hideSeconds || hideMinutes;\n\n return (\n <Host>\n <ix-date-time-card individual={this.individual} corners={this.corners}>\n <div class=\"header\" slot=\"header\">\n <ix-typography variant=\"default-title\">Time</ix-typography>\n </div>\n\n <div class=\"clock\">\n <div class={{ columns: true, hidden: hideHour }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { hours: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"hours\"\n type=\"number\"\n placeholder=\"HH\"\n min=\"0\"\n max={this.getMaxDisplayedHour()}\n value={this.getDisplayedHour()}\n ref={(ref) => (this.hourInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.hourInputRef,\n Number(this.hourInputRef.value),\n this.getMaxDisplayedHour()\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { hours: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{ 'column-seperator': true, hidden: hideHourSeperator }}\n >\n :\n </div>\n\n <div class={{ columns: true, hidden: hideMinutes }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { minutes: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"minutes\"\n type=\"number\"\n placeholder=\"MM\"\n min=\"0\"\n max=\"59\"\n value={this.minutes}\n ref={(ref) => (this.minuteInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.minuteInputRef,\n Number(this.minuteInputRef.value),\n 59\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { minutes: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{ 'column-seperator': true, hidden: hideMinutesSeperator }}\n >\n :\n </div>\n\n <div class={{ columns: true, hidden: hideSeconds }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { seconds: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"seconds\"\n type=\"number\"\n placeholder=\"SS\"\n min=\"0\"\n max=\"59\"\n value={this.seconds}\n ref={(ref) => (this.secondInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.secondInputRef,\n Number(this.secondInputRef.value),\n 59\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { seconds: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{\n columns: true,\n 'default-space': true,\n hidden: hideTimeReference,\n }}\n >\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeReference()}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <div class=\"time-reference\">{this.timeReference}</div>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeReference()}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n </div>\n\n <div class={{ button: true, hidden: hideIndividual }}>\n <ix-button\n onClick={() => this.done.emit(this._time.toFormat(this.format))}\n >\n {this.textSelectTime}\n </ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"time-picker.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,iheAAihe;;MC6B1he,UAAU;;;;;;;IAyFb,UAAK,GAAaA,cAAQ,CAAC,GAAG,EAAE,CAAC;kBAnFhB,IAAI;mBAKQ,SAAS;sBAKhB,IAAI;oBAKf,KAA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gB,IAAE,IAAI,CAAC,aAAa,CAAO,EACtD,sBACE,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,MAAM,IAAI,CAAC,eAAe,EAAE,EACrC,KAAK,QACL,IAAI,EAAE,cAAc,EACpB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,QAAQ,GACE,CACd,CACF,EAEN,WAAK,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,IAClD,iBACE,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAE9D,IAAI,CAAC,cAAc,CACV,CACR,CACY,CACf,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["DateTime"],"sources":["./src/components/time-picker/time-picker.scss?tag=ix-time-picker&encapsulation=shadow","./src/components/time-picker/time-picker.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'components/form/input';\n\n:host {\n @include ix-component;\n\n @import 'legacy/components/forms';\n\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n height: $large-control-height;\n }\n\n .clock {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 4.25rem 0;\n }\n\n input,\n .time-reference {\n width: 2.625rem;\n height: $large-space;\n text-align: center;\n margin-top: 0.25rem;\n margin-bottom: 0.25rem;\n\n /* Chrome, Safari, Edge, Opera */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0 0.3125rem;\n }\n\n /* Firefox */\n &[type='number'] {\n -moz-appearance: textfield;\n }\n }\n\n .form-control[type='number'] {\n text-align: center;\n }\n\n .columns {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n }\n\n .column-seperator {\n display: flex;\n align-items: center;\n margin: 0 $tiny-space;\n }\n\n .button {\n display: flex;\n justify-content: flex-end;\n }\n\n .default-space {\n margin-left: $default-space;\n }\n\n .text-align {\n text-align: center;\n }\n\n .hidden {\n display: none;\n }\n\n .time-reference {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { DateTime } from 'luxon';\nimport { DateTimeCardCorners } from '../date-time-card/date-time-card';\n\nexport type TimePickerCorners = DateTimeCardCorners;\n\n@Component({\n tag: 'ix-time-picker',\n styleUrl: 'time-picker.scss',\n shadow: true,\n})\nexport class TimePicker {\n /**\n * Format of time string\n *\n * @since 1.1.0\n */\n @Prop() format: string = 'TT';\n\n /**\n * Corner style\n */\n @Prop() corners: TimePickerCorners = 'rounded';\n\n /**\n * @deprecated Will be removed in 2.0.0\n */\n @Prop() individual: boolean = true;\n\n /**\n * Show hour input\n */\n @Prop() showHour = false;\n\n /**\n * Show minutes input\n */\n @Prop() showMinutes = false;\n\n /**\n * Show seconds input\n */\n @Prop() showSeconds = false;\n\n /**\n * Select time with format string\n *\n * @since 1.1.0\n */\n @Prop() time: string = DateTime.now().toFormat(this.format);\n\n /**\n * Show time reference input\n *\n * @since 1.1.0 time reference is default aligned with formt tt\n */\n @Prop({ mutable: true }) showTimeReference = undefined;\n\n /**\n * Set time reference\n */\n @Prop({ mutable: true }) timeReference: 'AM' | 'PM' = DateTime.fromFormat(\n this.time,\n this.format\n ).toFormat('a') as 'PM' | 'AM';\n\n /**\n * Text of date select button\n *\n * @since 1.1.0\n */\n @Prop() textSelectTime = 'Done';\n\n /**\n * Time event\n */\n @Event() done: EventEmitter<string>;\n\n /**\n * Time change event\n */\n @Event() timeChange: EventEmitter<string>;\n\n @State() hourInputRef: HTMLInputElement;\n @State() minuteInputRef: HTMLInputElement;\n @State() secondInputRef: HTMLInputElement;\n @State() referenceInputRef: HTMLInputElement;\n\n get hour() {\n return this._time.hour;\n }\n\n get minutes() {\n return this._time.minute;\n }\n\n get seconds() {\n return this._time.second;\n }\n\n private _time: DateTime = DateTime.now();\n\n private setInputValue(\n inputElement: HTMLInputElement,\n value: number,\n max: number\n ) {\n if (value > max) {\n inputElement.value = max.toString();\n } else if (value < 0) {\n inputElement.value = '0';\n } else {\n inputElement.value = value.toString();\n }\n\n this.updateAndEmitTime();\n }\n\n private updateAndEmitTime() {\n this._time = this._time.set({\n hour: Number(this.hourInputRef.value),\n minute: Number(this.minuteInputRef.value),\n second: Number(this.secondInputRef.value),\n });\n\n this.setHourAccordingToReference();\n\n this.emitTimeChange();\n }\n\n private toggleInputValue(\n inputElement: HTMLInputElement,\n currentValue: number,\n step: 'up' | 'down',\n max: number\n ) {\n if (step === 'up') {\n if (currentValue === max) {\n inputElement.value = '0';\n } else {\n inputElement.stepUp();\n }\n } else {\n if (currentValue === 0) {\n inputElement.value = max.toString();\n } else {\n inputElement.stepDown();\n }\n }\n }\n\n private toggleHourInputWithRef(\n inputElement: HTMLInputElement,\n currentValue: number,\n step: 'up' | 'down'\n ) {\n if (step === 'up') {\n if (currentValue === this.getMaxHour()) {\n inputElement.value = '0';\n } else {\n inputElement.stepUp();\n }\n } else {\n if (\n (this.showTimeReference &&\n this.timeReference === 'PM' &&\n currentValue === 12) ||\n currentValue === 0\n ) {\n inputElement.value = this.getMaxDisplayedHour().toString();\n } else {\n inputElement.stepDown();\n }\n }\n }\n\n private updateInput(\n step: 'up' | 'down',\n { hours = undefined, minutes = undefined, seconds = undefined }\n ) {\n if (hours) {\n if (this.showTimeReference) {\n this.toggleHourInputWithRef(this.hourInputRef, this.hour, step);\n } else {\n this.toggleInputValue(this.hourInputRef, this.hour, step, 23);\n }\n }\n\n if (minutes) {\n this.toggleInputValue(this.minuteInputRef, this.minutes, step, 59);\n }\n\n if (seconds) {\n this.toggleInputValue(this.secondInputRef, this.seconds, step, 59);\n }\n\n this.updateAndEmitTime();\n }\n\n private changeReference() {\n if (this.timeReference === 'AM') {\n this.timeReference = 'PM';\n } else {\n this.timeReference = 'AM';\n }\n\n this.setHourAccordingToReference();\n\n this.emitTimeChange();\n }\n\n private setHourAccordingToReference() {\n if (!this.showTimeReference) {\n return;\n }\n\n let hour = Number(this.hourInputRef.value);\n\n if (this.timeReference === 'PM') hour += 12;\n\n this._time = this._time.set({ hour });\n }\n\n private emitTimeChange() {\n const time = this._time.toFormat(this.format);\n this.timeChange.emit(time);\n }\n\n componentWillLoad() {\n this._time = DateTime.fromFormat(this.time, this.format);\n if (this.showTimeReference === undefined) {\n const matchedKeys = Object.keys(\n DateTime.fromFormatExplain(this.time, this.format).matches\n );\n this.showTimeReference = matchedKeys.includes('a');\n }\n }\n\n /**\n * Get current time\n */\n @Method()\n async getCurrentTime() {\n return this._time.toFormat(this.format);\n }\n\n private getDisplayedHour() {\n if (this.showTimeReference && this.timeReference === 'PM') {\n return this._time.hour - 12;\n }\n\n return this._time.hour;\n }\n\n private getMaxDisplayedHour() {\n if (this.showTimeReference) {\n return 11;\n }\n\n return 23;\n }\n\n private getMaxHour() {\n if (this.showTimeReference && this.timeReference === 'AM') {\n return 11;\n }\n\n return 23;\n }\n\n render() {\n let hideHour = !this.showHour;\n let hideMinutes = !this.showMinutes;\n let hideSeconds = !this.showSeconds;\n const hideTimeReference = !this.showTimeReference;\n const hideIndividual = !this.individual;\n\n if (hideHour && hideMinutes && hideSeconds) {\n hideHour = false;\n hideMinutes = false;\n hideSeconds = false;\n }\n\n const hideHourSeperator = hideMinutes || hideHour;\n const hideMinutesSeperator = hideSeconds || hideMinutes;\n\n return (\n <Host>\n <ix-date-time-card individual={this.individual} corners={this.corners}>\n <div class=\"header\" slot=\"header\">\n <ix-typography variant=\"default-title\">Time</ix-typography>\n </div>\n\n <div class=\"clock\">\n <div class={{ columns: true, hidden: hideHour }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { hours: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"hours\"\n type=\"number\"\n placeholder=\"HH\"\n min=\"0\"\n max={this.getMaxDisplayedHour()}\n value={this.getDisplayedHour()}\n ref={(ref) => (this.hourInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.hourInputRef,\n Number(this.hourInputRef.value),\n this.getMaxDisplayedHour()\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { hours: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{ 'column-seperator': true, hidden: hideHourSeperator }}\n >\n :\n </div>\n\n <div class={{ columns: true, hidden: hideMinutes }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { minutes: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"minutes\"\n type=\"number\"\n placeholder=\"MM\"\n min=\"0\"\n max=\"59\"\n value={this.minutes}\n ref={(ref) => (this.minuteInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.minuteInputRef,\n Number(this.minuteInputRef.value),\n 59\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { minutes: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{ 'column-seperator': true, hidden: hideMinutesSeperator }}\n >\n :\n </div>\n\n <div class={{ columns: true, hidden: hideSeconds }}>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('up', { seconds: true })}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <input\n class=\"form-control\"\n name=\"seconds\"\n type=\"number\"\n placeholder=\"SS\"\n min=\"0\"\n max=\"59\"\n value={this.seconds}\n ref={(ref) => (this.secondInputRef = ref)}\n onChange={() =>\n this.setInputValue(\n this.secondInputRef,\n Number(this.secondInputRef.value),\n 59\n )\n }\n ></input>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.updateInput('down', { seconds: true })}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n\n <div\n class={{\n columns: true,\n 'default-space': true,\n hidden: hideTimeReference,\n }}\n >\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeReference()}\n ghost\n icon={'chevron-up'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n <div class=\"time-reference\">{this.timeReference}</div>\n <ix-icon-button\n size=\"16\"\n onClick={() => this.changeReference()}\n ghost\n icon={'chevron-down'}\n variant=\"primary\"\n class=\"arrows\"\n ></ix-icon-button>\n </div>\n </div>\n\n <div class={{ button: true, hidden: hideIndividual }}>\n <ix-button\n onClick={() => this.done.emit(this._time.toFormat(this.format))}\n >\n {this.textSelectTime}\n </ix-button>\n </div>\n </ix-date-time-card>\n </Host>\n );\n }\n}\n"],"version":3}
|
package/components/typography.js
CHANGED
|
@@ -15,7 +15,7 @@ const VariantsMapping = {
|
|
|
15
15
|
'default-title-single': 'text-default-title-single',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const typographyCss = ".typography-label,:host(.typography-label){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-xs,:host(.typography-label-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-sm,:host(.typography-label-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-lg,:host(.typography-label-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body,:host(.typography-body){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-xs,:host(.typography-body-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-sm,:host(.typography-body-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-lg,:host(.typography-body-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display,:host(.typography-display){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xs,:host(.typography-display-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-sm,:host(.typography-display-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-lg,:host(.typography-display-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xl,:host(.typography-display-xl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-5);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xxl,:host(.typography-display-xxl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-6);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h6,.typography-h6,:host(.typography-h6){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h5,.typography-h5,:host(.typography-h5){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h4,.typography-h4,:host(.typography-h4){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h3,.typography-h3,:host(.typography-h3){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h2,.typography-h2,:host(.typography-h2){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h1,.typography-h1,:host(.typography-h1){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code,:host(.typography-code){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-lg,:host(.typography-code-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-sm,:host(.typography-code-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-decoration-none,:host(.typography-decoration-none){text-decoration:none !important}.typography-decoration-underline,:host(.typography-decoration-underline){text-decoration:underline !important}.typography-decoration-line-through,:host(.typography-decoration-line-through){text-decoration:line-through !important}.typography-weight-bold,:host(.typography-weight-bold){font-weight:700 !important}a{color:var(--theme-color-primary)}:host{display:block;position:relative}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host(.text-xs){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.625rem;font-weight:400;line-height:1.4em;color:var(--theme-color-std-text)}:host(.text-s){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1em;color:var(--theme-color-std-text)}:host(.text-default){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-default-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-l){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-l-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-h2){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text)}:host(.text-xl){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:400;line-height:1.091em;color:var(--theme-color-std-text)}";
|
|
18
|
+
const typographyCss = ".typography-label,:host(.typography-label){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-xs,:host(.typography-label-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-sm,:host(.typography-label-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-label-lg,:host(.typography-label-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body,:host(.typography-body){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-xs,:host(.typography-body-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xxl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-sm,:host(.typography-body-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-body-lg,:host(.typography-body-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display,:host(.typography-display){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xs,:host(.typography-display-xs){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-sm,:host(.typography-display-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-lg,:host(.typography-display-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xl,:host(.typography-display-xl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-5);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-display-xxl,:host(.typography-display-xxl){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-6);line-height:var(--theme-line-height-xs);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-sm);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h6,.typography-h6,:host(.typography-h6){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h5,.typography-h5,:host(.typography-h5){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h4,.typography-h4,:host(.typography-h4){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h3,.typography-h3,:host(.typography-h3){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-2);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-lg);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h2,.typography-h2,:host(.typography-h2){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-3);line-height:var(--theme-line-height-md);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}h1,.typography-h1,:host(.typography-h1){font-feature-settings:\"clig\" off, \"liga\" off;font-family:Siemens Sans, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-4);line-height:var(--theme-line-height-sm);font-weight:var(--theme-font-weight-bold);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code,:host(.typography-code){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-0);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-lg,:host(.typography-code-lg){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms-1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-md);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-code-sm,:host(.typography-code-sm){font-feature-settings:\"clig\" off, \"liga\" off;font-family:JetBrainsMono, Courier New, monospace, Siemens Sans, Arial, Helvetica, sans-serif;font-style:normal;font-size:var(--theme-ms--1);line-height:var(--theme-line-height-lg);font-weight:var(--theme-font-weight-normal);letter-spacing:var(--theme-letter-spacing-xl);text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale}.typography-decoration-none,:host(.typography-decoration-none){text-decoration:none !important}.typography-decoration-underline,:host(.typography-decoration-underline){text-decoration:underline !important}.typography-decoration-line-through,:host(.typography-decoration-line-through){text-decoration:line-through !important}.typography-weight-bold,:host(.typography-weight-bold){font-weight:700 !important}a{color:var(--theme-color-primary)}:host{display:block;position:relative}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host(.text-xs){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.625rem;font-weight:400;line-height:1.4em;color:var(--theme-color-std-text)}:host(.text-s){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-caption-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.75rem;font-weight:700;line-height:1em;color:var(--theme-color-std-text)}:host(.text-default){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:400;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-default-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.429em;color:var(--theme-color-std-text)}:host(.text-default-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.143em;color:var(--theme-color-std-text)}:host(.text-l){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:400;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-l-title){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.5em;color:var(--theme-color-std-text)}:host(.text-l-title-single){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1rem;font-weight:700;line-height:1.25em;color:var(--theme-color-std-text)}:host(.text-h2){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:700;line-height:1.455em;color:var(--theme-color-std-text)}:host(.text-xl){-webkit-font-smoothing:antialiased;-moz-osx-font-smooting:grayscale;font-family:Siemens Sans, sans-serif;font-size:1.375rem;font-weight:400;line-height:1.091em;color:var(--theme-color-std-text)}";
|
|
19
19
|
|
|
20
20
|
const IxTypography = /*@__PURE__*/ proxyCustomElement(class IxTypography extends HTMLElement {
|
|
21
21
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"typography.js","mappings":";;AAsBO,MAAM,eAAe,GAAuC;EACjE,SAAS,EAAE,SAAS;EACpB,KAAK,EAAE,QAAQ;EACf,OAAO,EAAE,cAAc;EACvB,gBAAgB,EAAE,qBAAqB;EACvC,OAAO,EAAE,cAAc;EACvB,gBAAgB,EAAE,qBAAqB;EACvC,KAAK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AAqB,IAAI,CAAC,KAAK,QAAQ;OAC/C,CAAC;KACH;IAED,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,IACxC,eAAa,CACR,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/typography/type-mapping.ts","./src/components/typography/typography.scss?tag=ix-typography&encapsulation=shadow","./src/components/typography/typography.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nexport type TypographyVariants =\n | 'x-small'\n | 'small'\n | 'caption'\n | 'caption-single'\n | 'default'\n | 'default-single'\n | 'default-title'\n | 'default-title-single'\n | 'large'\n | 'large-single'\n | 'h2'\n | 'display-large';\n\nexport const VariantsMapping: Record<TypographyVariants, string> = {\n 'x-small': 'text-xs',\n small: 'text-s',\n caption: 'text-caption',\n 'caption-single': 'text-caption-single',\n default: 'text-default',\n 'default-single': 'text-default-single',\n large: 'text-l',\n 'large-single': 'text-l-single',\n h2: 'text-h2',\n 'display-large': 'text-xl',\n 'default-title': 'text-default-title',\n 'default-title-single': 'text-default-title-single',\n};\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n@import 'common-variables';\n@import 'mixins/shadow-dom/component';\n@import 'legacy/mixins/fonts';\n@import 'components/fonts';\n@import 'mixins/fonts';\n\n:host {\n @include ix-component;\n\n display: block;\n position: relative;\n}\n\n:host(.text-xs) {\n @include text-xs;\n}\n\n:host(.text-s) {\n @include text-s;\n}\n\n:host(.text-caption) {\n @include text-caption;\n}\n\n:host(.text-caption-single) {\n @include text-caption-single;\n}\n\n:host(.text-default) {\n @include text-default;\n}\n\n:host(.text-default-single) {\n @include text-default-single;\n}\n\n:host(.text-default-title) {\n @include text-default-title;\n}\n\n:host(.text-default-title-single) {\n @include text-default-title-single;\n}\n\n:host(.text-l) {\n @include text-l;\n}\n\n:host(.text-l-single) {\n @include text-l-single;\n}\n\n:host(.text-l-title) {\n @include text-l-title;\n}\n\n:host(.text-l-title-single) {\n @include text-l-title-single;\n}\n\n:host(.text-h2) {\n @include text-h2;\n}\n\n:host(.text-xl) {\n @include text-xl;\n}\n\n$typography-formats: label, label-xs, label-sm, label-lg, body, body-xs, body-sm,\n body-lg, display, display-xs, display-sm, display-lg, display-xl, display-xxl,\n h6, h5, h4, h3, h2, h1, code, code-sm, code-lg;\n\n@each $format in $typography-formats {\n :host(.typography-#{$format}) {\n @extend .typography-#{$format};\n }\n}\n\n$typography-decoration: none, underline, line-through;\n@each $decoration in $typography-decoration {\n :host(.typography-decoration-#{$decoration}) {\n @extend .typography-decoration-#{$decoration};\n }\n}\n\n:host(.typography-weight-bold) {\n @extend .typography-weight-bold;\n}\n","/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Component, h, Host, Prop } from '@stencil/core';\nimport { VariantsMapping } from './type-mapping';\n\nexport type TypographyVariants =\n | 'x-small'\n | 'small'\n | 'caption'\n | 'caption-single'\n | 'default'\n | 'default-single'\n | 'default-title'\n | 'default-title-single'\n | 'large'\n | 'large-single'\n | 'large-title'\n | 'large-title-single'\n | 'h2'\n | 'display-large';\n\nexport type TypographyColors =\n | 'contrast'\n | 'std'\n | 'soft'\n | 'weak'\n | 'inv-contrast'\n | 'inv-std'\n | 'inv-soft'\n | 'inv-weak'\n | 'alarm';\n\ntype TypographyFormatLabel = 'label' | 'label-xs' | 'label-sm' | 'label-lg';\ntype TypographyFormatBody = 'body' | 'body-xs' | 'body-sm' | 'body-lg';\ntype TypographyFormatDisplay =\n | 'display'\n | 'display-xs'\n | 'display-sm'\n | 'display-lg'\n | 'display-xl'\n | 'display-xxl';\ntype TypographyFormatHeading = 'h6' | 'h5' | 'h4' | 'h3' | 'h2' | 'h1';\ntype TypographyFormatCode = 'code' | 'code-sm' | 'code-lg';\n\nexport type TypographyFormat =\n | TypographyFormatLabel\n | TypographyFormatBody\n | TypographyFormatDisplay\n | TypographyFormatHeading\n | TypographyFormatCode;\n\nexport type TextDecoration = 'none' | 'underline' | 'line-through';\n\n/**\n * @since 2.0.0\n */\n@Component({\n tag: 'ix-typography',\n styleUrl: 'typography.scss',\n shadow: true,\n})\nexport class IxTypography {\n /**\n * Font variant based on theme variables\n *\n * @deprecated Use `format` property\n * @internal\n */\n @Prop() variant: TypographyVariants;\n\n /**\n * Text format\n */\n @Prop() format: TypographyFormat;\n\n /**\n * Text color based on theme variables\n */\n @Prop() color: TypographyColors;\n\n /**\n * Display text bold\n */\n @Prop() bold = false;\n\n /**\n * Text decoration\n */\n @Prop() textDecoration: TextDecoration = 'none';\n\n render() {\n let typographyClass = {};\n\n if (this.variant) {\n typographyClass[VariantsMapping[this.variant ?? 'default']] = true;\n } else {\n typographyClass[`typography-${this.format ?? 'body'}`] = true;\n }\n\n if (this.textDecoration !== 'none') {\n typographyClass[`typography-decoration-${this.textDecoration}`] = true;\n }\n\n typographyClass['typography-weight-bold'] = this.bold;\n\n let style = {};\n\n if (this.color) {\n style = {\n color: `var(--theme-color-${this.color}-text)`,\n };\n }\n\n return (\n <Host class={typographyClass} style={style}>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -36,7 +36,7 @@ function BaseButton(props, children) {
|
|
|
36
36
|
const extraClasses = (_a = props.extraClasses) !== null && _a !== void 0 ? _a : {};
|
|
37
37
|
return (index.h("button", Object.assign({}, props.ariaAttributes, { onClick: (e) => (props.onClick ? props.onClick(e) : undefined), tabindex: props.disabled ? -1 : (_b = props.tabIndex) !== null && _b !== void 0 ? _b : 0, type: props.type, class: Object.assign(Object.assign({}, getButtonClasses(props.variant, props.outline, props.ghost, props.iconOnly, props.iconOval, props.selected, props.disabled || props.loading)), extraClasses) }),
|
|
38
38
|
props.loading ? index.h("ix-spinner", { size: "small", hideTrack: true }) : null,
|
|
39
|
-
props.icon && !props.loading ? (index.h("ix-icon", { name: props.icon, size: props.iconSize, color: props.iconColor })) : null,
|
|
39
|
+
props.icon && !props.loading ? (index.h("ix-icon", { class: "icon", name: props.icon, size: props.iconSize, color: props.iconColor })) : null,
|
|
40
40
|
index.h("div", { class: {
|
|
41
41
|
content: true,
|
|
42
42
|
[`content-${props.alignment}`]: !!props.alignment,
|
|
@@ -47,4 +47,4 @@ function BaseButton(props, children) {
|
|
|
47
47
|
exports.BaseButton = BaseButton;
|
|
48
48
|
exports.getButtonClasses = getButtonClasses;
|
|
49
49
|
|
|
50
|
-
//# sourceMappingURL=base-button-
|
|
50
|
+
//# sourceMappingURL=base-button-7af4dae7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"base-button-7af4dae7.js","mappings":";;;;AAAA;;;;;;;;AAcA,MAAM,SAAS,GAAG,CAAC,OAAe;EAChC,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,WAAW,EAAE,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,OAAe;EAClC,OAAO,OAAO,CAAC,WAAW,EAAE,KAAK,WAAW,CAAC,WAAW,EAAE,CAAC;AAC7D,CAAC,CAAC;MAEW,gBAAgB,GAAG,CAC9B,OAAsB,EACtB,OAAgB,EAChB,KAAc,EACd,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAiB,EACjB,QAAiB;EAEjB,OAAO;IACL,GAAG,EAAE,IAAI;IACT,aAAa,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK;IACvD,qBAAqB,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,KAAK;IAC9D,uBAAuB,EAAE,SAAS,CAAC,O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,IAAI,EAChB,IAAI,EAAE,KAAK,CAAC,QAAe,EAC3B,KAAK,EAAE,KAAK,CAAC,SAAS,GACb,IACT,IAAI;IACRA,iBACE,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QACb,CAAC,WAAW,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS;OAClD,IAEA,QAAQ,CACL;IACL,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CACxC,EACT;AACJ;;;;;","names":["h"],"sources":["./src/components/button/base-button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { h } from '@stencil/core';\nimport { A11yAttributes } from '../utils/a11y';\nimport { ButtonVariant } from './button';\n\nexport type ButtonAlignment = 'center' | 'start';\n\nconst isPrimary = (variant: string) => {\n return variant.toUpperCase() === 'Primary'.toUpperCase();\n};\n\nconst isSecondary = (variant: string) => {\n return variant.toUpperCase() === 'Secondary'.toUpperCase();\n};\n\nexport const getButtonClasses = (\n variant: ButtonVariant,\n outline: boolean,\n ghost: boolean,\n iconOnly = false,\n iconOval = false,\n selected: boolean,\n disabled: boolean\n) => {\n return {\n btn: true,\n 'btn-primary': isPrimary(variant) && !outline && !ghost,\n 'btn-outline-primary': isPrimary(variant) && outline && !ghost,\n 'btn-invisible-primary': isPrimary(variant) && !outline && ghost,\n 'btn-secondary': isSecondary(variant) && !outline && !ghost,\n 'btn-outline-secondary': isSecondary(variant) && outline && !ghost,\n 'btn-invisible-secondary': isSecondary(variant) && !outline && ghost,\n 'btn-icon': iconOnly,\n 'btn-oval': iconOval,\n selected: selected,\n disabled: disabled,\n };\n};\n\nexport type BaseButtonProps = {\n type: string;\n variant: ButtonVariant;\n outline: boolean;\n ghost: boolean;\n iconOnly: boolean;\n iconOval: boolean;\n selected: boolean;\n disabled: boolean;\n loading: boolean;\n icon: string;\n onClick?: Function;\n ariaAttributes?: A11yAttributes;\n extraClasses?: { [key: string]: boolean };\n iconSize?: string;\n iconColor?: string;\n alignment?: ButtonAlignment;\n tabIndex?: number;\n afterContent?: any;\n};\n\nexport function BaseButton(props: BaseButtonProps, children) {\n const extraClasses = props.extraClasses ?? {};\n\n return (\n <button\n {...props.ariaAttributes}\n onClick={(e: Event) => (props.onClick ? props.onClick(e) : undefined)}\n tabindex={props.disabled ? -1 : props.tabIndex ?? 0}\n type={props.type}\n class={{\n ...getButtonClasses(\n props.variant,\n props.outline,\n props.ghost,\n props.iconOnly,\n props.iconOval,\n props.selected,\n props.disabled || props.loading\n ),\n ...extraClasses,\n }}\n >\n {props.loading ? <ix-spinner size=\"small\" hideTrack></ix-spinner> : null}\n {props.icon && !props.loading ? (\n <ix-icon\n class=\"icon\"\n name={props.icon}\n size={props.iconSize as any}\n color={props.iconColor}\n ></ix-icon>\n ) : null}\n <div\n class={{\n content: true,\n [`content-${props.alignment}`]: !!props.alignment,\n }}\n >\n {children}\n </div>\n {props.afterContent ? props.afterContent : null}\n </button>\n );\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-be499a74.js');
|
|
4
|
-
const baseButton = require('./base-button-
|
|
4
|
+
const baseButton = require('./base-button-7af4dae7.js');
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* SPDX-FileCopyrightText: 2023 Siemens AG
|
|
@@ -17,4 +17,4 @@ function BaseIconButton(props) {
|
|
|
17
17
|
|
|
18
18
|
exports.BaseIconButton = BaseIconButton;
|
|
19
19
|
|
|
20
|
-
//# sourceMappingURL=base-icon-button-
|
|
20
|
+
//# sourceMappingURL=base-icon-button-d085fd45.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"base-icon-button-
|
|
1
|
+
{"file":"base-icon-button-d085fd45.js","mappings":";;;;;AAAA;;;;;;;;SAYgB,cAAc,CAAC,KAAoC;EACjE,OAAOA,QAACC,qBAAU,oBAAK,KAAK,IAAE,IAAI,EAAC,QAAQ,IAAc,CAAC;AAC5D;;;;","names":["h","BaseButton"],"sources":["./src/components/icon-button/base-icon-button.tsx"],"sourcesContent":["/*\n * SPDX-FileCopyrightText: 2023 Siemens AG\n *\n * SPDX-License-Identifier: MIT\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h } from '@stencil/core';\nimport { BaseButton, BaseButtonProps } from '../button/base-button';\n\nexport function BaseIconButton(props: Omit<BaseButtonProps, 'type'>) {\n return <BaseButton {...props} type=\"button\"></BaseButton>;\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-be499a74.js');
|
|
6
|
-
const menuService = require('./menu-service-
|
|
6
|
+
const menuService = require('./menu-service-777bf5ce.js');
|
|
7
7
|
const context = require('./context-0fdf2fa1.js');
|
|
8
8
|
require('./breakpoints-7ca69aa8.js');
|
|
9
9
|
require('./typed-event-f0f051da.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-be499a74.js');
|
|
6
6
|
const context = require('./context-0fdf2fa1.js');
|
|
7
|
-
const menuService = require('./menu-service-
|
|
7
|
+
const menuService = require('./menu-service-777bf5ce.js');
|
|
8
8
|
const shadowDom = require('./shadow-dom-9b10f758.js');
|
|
9
9
|
const themeSwitcher = require('./theme-switcher-d0386ac9.js');
|
|
10
10
|
require('./typed-event-f0f051da.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-be499a74.js');
|
|
6
6
|
const context = require('./context-0fdf2fa1.js');
|
|
7
|
-
const menuService = require('./menu-service-
|
|
7
|
+
const menuService = require('./menu-service-777bf5ce.js');
|
|
8
8
|
require('./typed-event-f0f051da.js');
|
|
9
9
|
require('./breakpoints-7ca69aa8.js');
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ const index = require('./index-be499a74.js');
|
|
|
6
6
|
const anime_es = require('./anime.es-8822f296.js');
|
|
7
7
|
const a11y = require('./a11y-7e1c1b86.js');
|
|
8
8
|
|
|
9
|
-
const blindCss = ":host{display:flex;flex-direction:column;border-radius:var(--theme-blind--border-radius);overflow:hidden}:host .blind-header{all:unset;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;min-height:3rem;height:3rem;border:solid var(--theme-blind--border-thickness) transparent;border-radius:var(--theme-blind--border-radius) var(--theme-blind--border-radius) 0 0;padding-right:0.5rem;cursor:pointer;z-index:1}:host .blind-header .collapse-icon{padding:0.25rem 0.5rem}:host .blind-header .blind-header-title-col{flex-grow:1;flex-basis:0;display:inline-flex;align-items:center;min-width:0}:host .blind-header ix-typography{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .blind-header .blind-header-title-col:not(:first-of-type){justify-content:flex-end}:host .blind-header .blind-header-title-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-padding-end:0.5rem;padding-inline-end:0.5rem}:host .blind-header .blind-header-title-sublabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:0.5rem}:host .blind-header .blind-header-title,:host .blind-header .blind-header-title-basic{display:flex;align-items:center;flex-grow:1;height:100%;min-width:0}:host .blind-header .blind-header-title-basic ix-icon{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host .blind-header:not(.disabled):not(:disabled):focus-visible{border-color:var(--theme-color-focus-bdr);outline:none}:host .blind-header .blind-header-labels{display:inline-flex;flex-grow:1;min-width:0}:host .blind-content{display:block;padding:1rem;transition-property:padding;transition-duration:150ms;transition-timing-function:ease-in}:host .blind-content.hide{max-height:0;padding-top:0px;padding-bottom:0px}:host(.blind-alarm){background-color:var(--theme-blind-base--background)}:host(.blind-alarm) .blind-header{background-color:var(--theme-color-alarm)}:host(.blind-alarm) .blind-header .blind-header-title-label,:host(.blind-alarm) .blind-header .blind-header-title-sublabel{color:var(--theme-color-alarm--contrast)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-alarm--hover)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-alarm--active)}:host(.blind-critical){background-color:var(--theme-blind-base--background)}:host(.blind-critical) .blind-header{background-color:var(--theme-color-critical)}:host(.blind-critical) .blind-header .blind-header-title-label,:host(.blind-critical) .blind-header .blind-header-title-sublabel{color:var(--theme-color-critical--contrast)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-critical--hover)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-critical) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-critical--active)}:host(.blind-info){background-color:var(--theme-blind-base--background)}:host(.blind-info) .blind-header{background-color:var(--theme-color-info)}:host(.blind-info) .blind-header .blind-header-title-label,:host(.blind-info) .blind-header .blind-header-title-sublabel{color:var(--theme-color-info--contrast)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-info--hover)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-info) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-info--active)}:host(.blind-insight){background-color:var(--theme-blind-base--background)}:host(.blind-insight) .blind-header{background-color:var(--theme-color-insight)}:host(.blind-insight) .blind-header .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-insight) .blind-header .blind-header-title-sublabel{color:var(--theme-color-soft-text)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host(.blind-neutral){background-color:var(--theme-blind-base--background)}:host(.blind-neutral) .blind-header{background-color:var(--theme-color-neutral)}:host(.blind-neutral) .blind-header .blind-header-title-label,:host(.blind-neutral) .blind-header .blind-header-title-sublabel{color:var(--theme-color-neutral--contrast)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-neutral--hover)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-neutral--active)}:host(.blind-notification){background-color:var(--theme-blind-base--background)}:host(.blind-notification) .blind-header{background-color:var(--theme-color-notification)}:host(.blind-notification) .blind-header .blind-header-title-label,:host(.blind-notification) .blind-header .blind-header-title-sublabel{color:var(--theme-color-notification--contrast)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-notification--hover)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-notification) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-notification--active)}:host(.blind-success){background-color:var(--theme-blind-base--background)}:host(.blind-success) .blind-header{background-color:var(--theme-color-success)}:host(.blind-success) .blind-header .blind-header-title-label,:host(.blind-success) .blind-header .blind-header-title-sublabel{color:var(--theme-color-success--contrast)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-success--hover)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-success) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-success--active)}:host(.blind-warning){background-color:var(--theme-blind-base--background)}:host(.blind-warning) .blind-header{background-color:var(--theme-color-warning)}:host(.blind-warning) .blind-header .blind-header-title-label,:host(.blind-warning) .blind-header .blind-header-title-sublabel{color:var(--theme-color-warning--contrast)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-warning--hover)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-warning) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-warning--active)}:host(.blind-primary){background-color:var(--theme-blind-base--background)}:host(.blind-primary) .blind-header{background-color:var(--theme-color-primary)}:host(.blind-primary) .blind-header .blind-header-title-label,:host(.blind-primary) .blind-header .blind-header-title-sublabel{color:var(--theme-color-primary--contrast)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-primary--hover)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-primary) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-primary--active)}:host(.blind-outline){border:solid var(--theme-blind--border-thickness) var(--theme-blind-base--border-color);border-color:var(--theme-color-soft-bdr)}:host(.blind-outline) .blind-header{background-color:var(--theme-color-ghost)}:host(.blind-outline) .blind-header .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-outline) .blind-header .blind-header-title-sublabel{color:var(--theme-color-soft-text)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}";
|
|
9
|
+
const blindCss = ":host{display:flex;flex-direction:column;border-radius:var(--theme-blind--border-radius);overflow:hidden}:host *,:host *::after,:host *::before{box-sizing:border-box}:host ::-webkit-scrollbar-button{display:none}:host ::-webkit-scrollbar{width:0.5rem;height:0.5rem}:host ::-webkit-scrollbar-track{border-radius:5px;background:var(--theme-scrollbar-track--background)}:host ::-webkit-scrollbar-track:hover{background:var(--theme-scrollbar-track--background--hover)}:host ::-webkit-scrollbar-thumb{border-radius:5px;background:var(--theme-scrollbar-thumb--background)}:host ::-webkit-scrollbar-thumb:hover{background:var(--theme-scrollbar-thumb--background--hover)}:host ::-webkit-scrollbar-corner{display:none}:host .blind-header-wrapper{display:block;position:relative;width:100%;min-height:3rem;height:3rem;overflow:hidden}:host .blind-header-content{display:flex;position:relative;align-items:center;justify-content:flex-start;width:100%;height:100%;z-index:1;pointer-events:none;padding-left:0.5rem}:host .blind-header-title{display:flex;position:relative;align-items:center;flex-grow:1;flex-shrink:0;margin-right:1rem}:host .blind-header{all:unset;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;position:absolute;top:0px;left:0px;pointer-events:all;padding-left:2.5rem;min-height:3rem;height:3rem;width:calc(100% - 2 * var(--theme-blind--border-thickness));border:solid var(--theme-blind--border-thickness) transparent;border-radius:var(--theme-blind--border-radius) var(--theme-blind--border-radius) 0 0;cursor:pointer}:host .blind-header:not(.disabled):not(:disabled):focus-visible{border-color:var(--theme-color-focus-bdr);outline:none}:host .blind-header-title-icon,:host .collapse-icon{margin-right:0.5rem}:host .blind-header-title-row{display:flex;flex-grow:1}:host .blind-header-title-col{flex-grow:1;flex-basis:0;display:inline-flex;align-items:center;min-width:0}:host .blind-header-title-col:not(:first-of-type){justify-content:flex-end}:host ix-typography{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host .blind-header-title-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline-end:0.5rem}:host .blind-header-title-sublabel{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:0.5rem}:host .blind-header-title{display:flex;align-items:center;flex-grow:1;height:100%;min-width:0}:host .blind-header-labels{display:inline-flex;flex-grow:1;min-width:0}:host .blind-content{display:block;padding:1rem;transition-property:padding;transition-duration:150ms;transition-timing-function:ease-in}:host .blind-content.hide{max-height:0;padding-top:0px;padding-bottom:0px}:host .header-actions{pointer-events:all}:host(.blind-alarm){background-color:var(--theme-blind-base--background)}:host(.blind-alarm) .blind-header{background-color:var(--theme-color-alarm)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-alarm--hover)}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-alarm) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-alarm--active)}:host(.blind-alarm) .blind-header-title-label,:host(.blind-alarm) .blind-header-title-sublabel{color:var(--theme-color-alarm--contrast)}:host(.blind-critical){background-color:var(--theme-blind-base--background)}:host(.blind-critical) .blind-header{background-color:var(--theme-color-critical)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-critical--hover)}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-critical) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-critical) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-critical--active)}:host(.blind-critical) .blind-header-title-label,:host(.blind-critical) .blind-header-title-sublabel{color:var(--theme-color-critical--contrast)}:host(.blind-info){background-color:var(--theme-blind-base--background)}:host(.blind-info) .blind-header{background-color:var(--theme-color-info)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-info--hover)}:host(.blind-info) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-info) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-info) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-info--active)}:host(.blind-info) .blind-header-title-label,:host(.blind-info) .blind-header-title-sublabel{color:var(--theme-color-info--contrast)}:host(.blind-insight){background-color:var(--theme-blind-base--background)}:host(.blind-insight) .blind-header{background-color:var(--theme-color-insight)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-insight) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-insight) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host(.blind-insight) .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-insight) .blind-header-title-sublabel{color:var(--theme-color-soft-text)}:host(.blind-neutral){background-color:var(--theme-blind-base--background)}:host(.blind-neutral) .blind-header{background-color:var(--theme-color-neutral)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-neutral--hover)}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-neutral) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-neutral--active)}:host(.blind-neutral) .blind-header-title-label,:host(.blind-neutral) .blind-header-title-sublabel{color:var(--theme-color-neutral--contrast)}:host(.blind-notification){background-color:var(--theme-blind-base--background)}:host(.blind-notification) .blind-header{background-color:var(--theme-color-notification)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-notification--hover)}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-notification) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-notification) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-notification--active)}:host(.blind-notification) .blind-header-title-label,:host(.blind-notification) .blind-header-title-sublabel{color:var(--theme-color-notification--contrast)}:host(.blind-success){background-color:var(--theme-blind-base--background)}:host(.blind-success) .blind-header{background-color:var(--theme-color-success)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-success--hover)}:host(.blind-success) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-success) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-success) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-success--active)}:host(.blind-success) .blind-header-title-label,:host(.blind-success) .blind-header-title-sublabel{color:var(--theme-color-success--contrast)}:host(.blind-warning){background-color:var(--theme-blind-base--background)}:host(.blind-warning) .blind-header{background-color:var(--theme-color-warning)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-warning--hover)}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-warning) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-warning) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-warning--active)}:host(.blind-warning) .blind-header-title-label,:host(.blind-warning) .blind-header-title-sublabel{color:var(--theme-color-warning--contrast)}:host(.blind-primary){background-color:var(--theme-blind-base--background)}:host(.blind-primary) .blind-header{background-color:var(--theme-color-primary)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-color-primary--hover)}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled){cursor:pointer}:host(.blind-primary) .blind-header:not(.disabled):not(:disabled):active,:host(.blind-primary) .blind-header:not(.disabled):not(:disabled).active{background-color:var(--theme-color-primary--active)}:host(.blind-primary) .blind-header-title-label,:host(.blind-primary) .blind-header-title-sublabel{color:var(--theme-color-primary--contrast)}:host(.blind-outline){border:solid var(--theme-blind--border-thickness) var(--theme-blind-base--border-color);border-color:var(--theme-color-soft-bdr)}:host(.blind-outline) .blind-header{background-color:var(--theme-color-ghost)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).hover,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):hover{background-color:var(--theme-ghost--background--hover)}:host(.blind-outline) .blind-header:not(.disabled):not(:disabled).active,:host(.blind-outline) .blind-header:not(.disabled):not(:disabled):active{background-color:var(--theme-ghost--background--active)}:host(.blind-outline) .blind-header-title-label{color:var(--theme-color-std-text)}:host(.blind-outline) .blind-header-title-sublabel{color:var(--theme-color-soft-text)}";
|
|
10
10
|
|
|
11
11
|
let sequentialInstanceId = 0;
|
|
12
12
|
const Blind = class {
|
|
@@ -20,12 +20,7 @@ const Blind = class {
|
|
|
20
20
|
this.icon = undefined;
|
|
21
21
|
this.variant = 'insight';
|
|
22
22
|
}
|
|
23
|
-
onHeaderClick(
|
|
24
|
-
if (e.target.closest('.header-actions')) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
e.stopImmediatePropagation();
|
|
23
|
+
onHeaderClick() {
|
|
29
24
|
this.collapsed = !this.collapsed;
|
|
30
25
|
this.collapsedChange.emit(this.collapsed);
|
|
31
26
|
}
|
|
@@ -77,15 +72,15 @@ const Blind = class {
|
|
|
77
72
|
render() {
|
|
78
73
|
return (index.h(index.Host, { class: {
|
|
79
74
|
[`blind-${this.variant}`]: true,
|
|
80
|
-
} }, index.h("
|
|
75
|
+
} }, index.h("div", { class: 'blind-header-wrapper' }, index.h("div", { class: 'blind-header-content' }, index.h("ix-icon", { class: "collapse-icon", name: 'chevron-right-small', color: this.variant === 'insight' || this.variant === 'outline'
|
|
76
|
+
? 'color-primary'
|
|
77
|
+
: `color-${this.variant}--contrast`, ref: (ref) => (this.chevronRef = ref) }), index.h("div", { class: "blind-header-title", id: `ix-blind-header-title-${this.blindId}` }, this.label !== undefined ? (index.h(index.Fragment, null, this.icon && (index.h("ix-icon", { class: "blind-header-title-icon", name: this.icon, color: this.variant === 'insight' || this.variant === 'outline'
|
|
78
|
+
? 'color-std-text'
|
|
79
|
+
: `color-${this.variant}--contrast` })), index.h("div", { class: 'blind-header-title-row' }, index.h("div", { class: "blind-header-title-col" }, index.h("ix-typography", { title: this.label, format: "label-lg", bold: true }, index.h("div", { class: "blind-header-title-label", title: this.label }, this.label))), this.sublabel && (index.h("div", { class: "blind-header-title-col" }, index.h("ix-typography", { title: this.sublabel }, index.h("div", { class: "blind-header-title-sublabel" }, this.sublabel))))), index.h("div", { class: "header-actions" }, index.h("slot", { name: "header-actions" })))) : null)), index.h("button", { class: {
|
|
81
80
|
'blind-header': true,
|
|
82
81
|
[`blind-${this.variant}`]: true,
|
|
83
82
|
closed: this.collapsed,
|
|
84
|
-
}, type: "button", "aria-labelledby": `ix-blind-header-title-${this.blindId}`, "aria-controls": `ix-blind-content-section-${this.blindId}`, "aria-expanded": a11y.a11yBoolean(!this.collapsed), onClick: (
|
|
85
|
-
? 'color-primary'
|
|
86
|
-
: `color-${this.variant}--contrast`, ref: (ref) => (this.chevronRef = ref) }), index.h("div", { class: "blind-header-title", id: `ix-blind-header-title-${this.blindId}` }, this.label !== undefined ? (index.h("span", { class: "blind-header-title-basic" }, index.h("div", { class: "blind-header-title-col" }, this.icon !== undefined ? (index.h("ix-icon", { name: this.icon, color: this.variant === 'insight' || this.variant === 'outline'
|
|
87
|
-
? 'color-std-text'
|
|
88
|
-
: `color-${this.variant}--contrast` })) : (''), index.h("ix-typography", { title: this.label, format: "label-lg", bold: true }, index.h("div", { class: "blind-header-title-label", title: this.label }, this.label))), index.h("div", { class: "blind-header-title-col" }, this.sublabel !== undefined ? (index.h("ix-typography", { title: this.sublabel }, index.h("div", { class: "blind-header-title-sublabel" }, this.sublabel))) : (''), index.h("span", { class: "header-actions", onClick: (e) => e.stopImmediatePropagation() }, index.h("slot", { name: "header-actions" }))))) : (index.h("slot", { name: "custom-header" })))), index.h("section", { id: `ix-blind-content-section-${this.blindId}`, "aria-labelledby": `ix-blind-header-title-${this.blindId}` }, index.h("div", { class: {
|
|
83
|
+
}, type: "button", "aria-labelledby": `ix-blind-header-title-${this.blindId}`, "aria-controls": `ix-blind-content-section-${this.blindId}`, "aria-expanded": a11y.a11yBoolean(!this.collapsed), onClick: () => this.onHeaderClick() }, index.h("slot", { name: "custom-header" }))), index.h("section", { id: `ix-blind-content-section-${this.blindId}`, "aria-labelledby": `ix-blind-header-title-${this.blindId}` }, index.h("div", { class: {
|
|
89
84
|
'blind-content': true,
|
|
90
85
|
hide: this.collapsed,
|
|
91
86
|
} }, !this.collapsed ? index.h("slot", null) : null))));
|