@infineon/infineon-design-system-stencil 37.4.1--canary.1962.c00a2d4858f461c2fcd54b47fafdce0348329889.0 → 37.4.1--canary.1962.bd8632192f8848270a8b0c53af90a64a5796bf0e.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/dist/cjs/{framework-detection-26d47e36.js → framework-detection-743932a3.js} +2 -12
- package/dist/cjs/framework-detection-743932a3.js.map +1 -0
- package/dist/cjs/ifx-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-badge.cjs.entry.js +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ifx-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card.cjs.entry.js +1 -1
- package/dist/cjs/ifx-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
- package/dist/cjs/ifx-content-switcher.cjs.entry.js +1 -1
- package/dist/cjs/ifx-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ifx-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/ifx-footer.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
- package/dist/cjs/ifx-indicator.cjs.entry.js +1 -1
- package/dist/cjs/ifx-link.cjs.entry.js +1 -1
- package/dist/cjs/ifx-modal.cjs.entry.js +1 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-navbar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-notification.cjs.entry.js +1 -1
- package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-search-field.cjs.entry.js +1 -1
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js +1 -1
- package/dist/cjs/ifx-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-slider.cjs.entry.js +1 -1
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +1 -1
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
- package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tree-view.cjs.entry.js +1 -1
- package/dist/collection/global/utils/framework-detection.js +0 -10
- package/dist/collection/global/utils/framework-detection.js.map +1 -1
- package/dist/collection/global/utils/tracking.js +1 -1
- package/dist/collection/global/utils/tracking.js.map +1 -1
- package/dist/components/ifx-accordion-item.js +1 -1
- package/dist/components/ifx-accordion.js +1 -1
- package/dist/components/ifx-alert.js +1 -1
- package/dist/components/ifx-badge.js +1 -1
- package/dist/components/ifx-basic-table.js +1 -1
- package/dist/components/ifx-breadcrumb-item-label.js +1 -1
- package/dist/components/ifx-breadcrumb.js +1 -1
- package/dist/components/ifx-button.js +1 -1
- package/dist/components/ifx-card.js +1 -1
- package/dist/components/ifx-checkbox-group.js +2 -2
- package/dist/components/ifx-checkbox.js +1 -1
- package/dist/components/ifx-chip-item.js +1 -1
- package/dist/components/ifx-chip.js +1 -1
- package/dist/components/ifx-content-switcher.js +1 -1
- package/dist/components/ifx-date-picker.js +2 -2
- package/dist/components/ifx-download.js +1 -1
- package/dist/components/ifx-dropdown-item.js +1 -1
- package/dist/components/ifx-dropdown-trigger-button.js +2 -2
- package/dist/components/ifx-dropdown.js +1 -1
- package/dist/components/ifx-faq.js +3 -3
- package/dist/components/ifx-file-upload.js +5 -5
- package/dist/components/ifx-filter-accordion.js +2 -2
- package/dist/components/ifx-filter-bar.js +2 -2
- package/dist/components/ifx-filter-search.js +2 -2
- package/dist/components/ifx-footer.js +1 -1
- package/dist/components/ifx-icon-button.js +1 -1
- package/dist/components/ifx-icon.js +1 -1
- package/dist/components/ifx-icons-preview.js +4 -4
- package/dist/components/ifx-indicator.js +1 -1
- package/dist/components/ifx-link.js +1 -1
- package/dist/components/ifx-list-entry.js +3 -3
- package/dist/components/ifx-list.js +2 -2
- package/dist/components/ifx-modal.js +3 -3
- package/dist/components/ifx-multiselect-option.js +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-navbar-item.js +2 -2
- package/dist/components/ifx-navbar.js +2 -2
- package/dist/components/ifx-notification.js +1 -1
- package/dist/components/ifx-overview-table.js +3 -3
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-progress-bar.js +1 -1
- package/dist/components/ifx-radio-button-group.js +2 -2
- package/dist/components/ifx-radio-button.js +1 -1
- package/dist/components/ifx-search-bar.js +3 -3
- package/dist/components/ifx-search-field.js +1 -1
- package/dist/components/ifx-segment.js +1 -1
- package/dist/components/ifx-segmented-control.js +2 -2
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +7 -7
- package/dist/components/ifx-sidebar-item.js +2 -2
- package/dist/components/ifx-sidebar.js +1 -1
- package/dist/components/ifx-slider.js +2 -2
- package/dist/components/ifx-spinner.js +1 -1
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-step.js +1 -1
- package/dist/components/ifx-stepper.js +1 -1
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-table.js +10 -10
- package/dist/components/ifx-tabs.js +2 -2
- package/dist/components/ifx-tag.js +2 -2
- package/dist/components/ifx-template.js +1 -1
- package/dist/components/ifx-templates-ui.js +8 -8
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +1 -1
- package/dist/components/ifx-tooltip.js +2 -2
- package/dist/components/ifx-tree-view-item.js +2 -2
- package/dist/components/ifx-tree-view.js +1 -1
- package/dist/components/{p-4cbea59b.js → p-00337208.js} +5 -5
- package/dist/components/{p-4cbea59b.js.map → p-00337208.js.map} +1 -1
- package/dist/components/{p-e8357008.js → p-19f7e10a.js} +3 -3
- package/dist/components/{p-e8357008.js.map → p-19f7e10a.js.map} +1 -1
- package/dist/components/{p-cb975b94.js → p-30c00f58.js} +2 -2
- package/dist/components/{p-cb975b94.js.map → p-30c00f58.js.map} +1 -1
- package/dist/components/{p-32a7e613.js → p-369c7803.js} +4 -4
- package/dist/components/{p-32a7e613.js.map → p-369c7803.js.map} +1 -1
- package/dist/components/{p-a8af9b7b.js → p-45aa49f0.js} +2 -2
- package/dist/components/{p-a8af9b7b.js.map → p-45aa49f0.js.map} +1 -1
- package/dist/components/{p-acbfa625.js → p-4d6cad33.js} +2 -12
- package/dist/components/p-4d6cad33.js.map +1 -0
- package/dist/components/{p-fc0793b1.js → p-5ddf54f9.js} +5 -5
- package/dist/components/{p-fc0793b1.js.map → p-5ddf54f9.js.map} +1 -1
- package/dist/components/{p-230bd20f.js → p-6504f099.js} +3 -3
- package/dist/components/{p-230bd20f.js.map → p-6504f099.js.map} +1 -1
- package/dist/components/{p-6342e893.js → p-6f5bd53d.js} +2 -2
- package/dist/components/{p-6342e893.js.map → p-6f5bd53d.js.map} +1 -1
- package/dist/components/{p-01eb3f5a.js → p-7568f4d4.js} +2 -2
- package/dist/components/{p-01eb3f5a.js.map → p-7568f4d4.js.map} +1 -1
- package/dist/components/{p-5c912934.js → p-7bec8c81.js} +3 -3
- package/dist/components/{p-5c912934.js.map → p-7bec8c81.js.map} +1 -1
- package/dist/components/{p-a306d3e7.js → p-8024c1f6.js} +3 -3
- package/dist/components/{p-a306d3e7.js.map → p-8024c1f6.js.map} +1 -1
- package/dist/components/{p-71ce7d58.js → p-87455224.js} +3 -3
- package/dist/components/{p-71ce7d58.js.map → p-87455224.js.map} +1 -1
- package/dist/components/{p-cd30bb7d.js → p-8a7696b0.js} +2 -2
- package/dist/components/{p-cd30bb7d.js.map → p-8a7696b0.js.map} +1 -1
- package/dist/components/{p-406ba50a.js → p-ab494b83.js} +2 -2
- package/dist/components/{p-406ba50a.js.map → p-ab494b83.js.map} +1 -1
- package/dist/components/{p-212b675c.js → p-b84aa364.js} +2 -2
- package/dist/components/{p-212b675c.js.map → p-b84aa364.js.map} +1 -1
- package/dist/components/{p-5c80b0e2.js → p-bd7f1b75.js} +3 -3
- package/dist/components/{p-5c80b0e2.js.map → p-bd7f1b75.js.map} +1 -1
- package/dist/components/{p-02917273.js → p-be7c30b7.js} +6 -6
- package/dist/components/{p-02917273.js.map → p-be7c30b7.js.map} +1 -1
- package/dist/components/{p-6be846ce.js → p-c070f22c.js} +4 -4
- package/dist/components/{p-6be846ce.js.map → p-c070f22c.js.map} +1 -1
- package/dist/components/{p-f611e5d5.js → p-c16130fb.js} +3 -3
- package/dist/components/{p-f611e5d5.js.map → p-c16130fb.js.map} +1 -1
- package/dist/components/{p-01d74827.js → p-d845bc51.js} +2 -2
- package/dist/components/{p-01d74827.js.map → p-d845bc51.js.map} +1 -1
- package/dist/components/{p-646c0aee.js → p-e27cd696.js} +2 -2
- package/dist/components/{p-646c0aee.js.map → p-e27cd696.js.map} +1 -1
- package/dist/components/{p-f347c4e9.js → p-e28b6d6d.js} +3 -3
- package/dist/components/{p-f347c4e9.js.map → p-e28b6d6d.js.map} +1 -1
- package/dist/esm/{framework-detection-e9695d02.js → framework-detection-33c31a6d.js} +2 -12
- package/dist/esm/framework-detection-33c31a6d.js.map +1 -0
- package/dist/esm/ifx-accordion_2.entry.js +1 -1
- package/dist/esm/ifx-alert_2.entry.js +1 -1
- package/dist/esm/ifx-badge.entry.js +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-breadcrumb.entry.js +1 -1
- package/dist/esm/ifx-button.entry.js +1 -1
- package/dist/esm/ifx-card.entry.js +1 -1
- package/dist/esm/ifx-checkbox-group.entry.js +1 -1
- package/dist/esm/ifx-checkbox.entry.js +1 -1
- package/dist/esm/ifx-chip_3.entry.js +1 -1
- package/dist/esm/ifx-content-switcher.entry.js +1 -1
- package/dist/esm/ifx-date-picker.entry.js +1 -1
- package/dist/esm/ifx-dropdown.entry.js +1 -1
- package/dist/esm/ifx-file-upload.entry.js +1 -1
- package/dist/esm/ifx-footer.entry.js +1 -1
- package/dist/esm/ifx-icon-button.entry.js +1 -1
- package/dist/esm/ifx-icon.entry.js +1 -1
- package/dist/esm/ifx-indicator.entry.js +1 -1
- package/dist/esm/ifx-link.entry.js +1 -1
- package/dist/esm/ifx-modal.entry.js +1 -1
- package/dist/esm/ifx-multiselect_2.entry.js +1 -1
- package/dist/esm/ifx-navbar.entry.js +1 -1
- package/dist/esm/ifx-notification.entry.js +1 -1
- package/dist/esm/ifx-progress-bar.entry.js +1 -1
- package/dist/esm/ifx-radio-button-group.entry.js +1 -1
- package/dist/esm/ifx-radio-button.entry.js +1 -1
- package/dist/esm/ifx-search-bar.entry.js +1 -1
- package/dist/esm/ifx-search-field.entry.js +1 -1
- package/dist/esm/ifx-segmented-control.entry.js +1 -1
- package/dist/esm/ifx-select.entry.js +1 -1
- package/dist/esm/ifx-sidebar.entry.js +1 -1
- package/dist/esm/ifx-slider.entry.js +1 -1
- package/dist/esm/ifx-spinner_2.entry.js +1 -1
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-stepper.entry.js +1 -1
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-table.entry.js +1 -1
- package/dist/esm/ifx-tabs.entry.js +1 -1
- package/dist/esm/ifx-tag.entry.js +1 -1
- package/dist/esm/ifx-textarea.entry.js +1 -1
- package/dist/esm/ifx-tooltip.entry.js +1 -1
- package/dist/esm/ifx-tree-view.entry.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/{p-f0a81689.entry.js → p-035c607d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1baede5b.entry.js → p-035d6c73.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2a6bbb1f.entry.js → p-0641415a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4fb8e2f3.entry.js → p-07f01391.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8c7ffd52.entry.js → p-0a7f91aa.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7c3b6e40.entry.js → p-0c05bf99.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-17071628.entry.js → p-0ebfdc05.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c8e8be4b.entry.js → p-11a06a8e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0d809b76.entry.js → p-17065b26.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-00ee896a.entry.js → p-203ac1ec.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-046acf7a.entry.js → p-342cbc7c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e3365ef8.entry.js → p-3b2e9bba.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-341ec9a9.entry.js → p-4784d899.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3cc5ece4.entry.js → p-4af9a89d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-4d6cad33.js +2 -0
- package/dist/infineon-design-system-stencil/p-4d6cad33.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-cc9ca7ad.entry.js → p-4f252031.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-863cc88f.entry.js → p-572179e4.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e6312b3a.entry.js → p-6802e12b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c5068ad9.entry.js → p-7305d359.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4b858e15.entry.js → p-82a5fc4d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-41c99cb0.entry.js → p-83527ae9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-10cf1407.entry.js → p-874a9210.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6a14c7aa.entry.js → p-878f0323.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8f3ce54b.entry.js → p-8a242736.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4710694a.entry.js → p-8b8688ea.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-148aa367.entry.js → p-8d02311e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-813d91ef.entry.js → p-9010b4a1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4306c893.entry.js → p-aa39a0b1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-29e20541.entry.js → p-b2dec2b5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0ebca0d6.entry.js → p-b5c64f31.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-819b6cde.entry.js → p-cfdbbfea.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-f98f363b.entry.js → p-ddfa1876.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-cafca519.entry.js → p-df32c417.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5bacdf4d.entry.js → p-df61f325.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-e0dd18fe.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-e5c87a08.entry.js.map → p-e0dd18fe.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-d81f3867.entry.js → p-e64414a5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c807fd12.entry.js → p-e80f64bf.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3ad6dad0.entry.js → p-eaa2ec9c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-67430c36.entry.js → p-edd1fc75.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b9157435.entry.js → p-eeebdafe.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-69ebf6df.entry.js → p-ef78ebda.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2177cd22.entry.js → p-f7ac9179.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-17a2e764.entry.js → p-fc76536a.entry.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/framework-detection-26d47e36.js.map +0 -1
- package/dist/components/p-acbfa625.js.map +0 -1
- package/dist/esm/framework-detection-e9695d02.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-acbfa625.js +0 -2
- package/dist/infineon-design-system-stencil/p-acbfa625.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-e5c87a08.entry.js +0 -2
- /package/dist/infineon-design-system-stencil/{p-f0a81689.entry.js.map → p-035c607d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1baede5b.entry.js.map → p-035d6c73.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2a6bbb1f.entry.js.map → p-0641415a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4fb8e2f3.entry.js.map → p-07f01391.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8c7ffd52.entry.js.map → p-0a7f91aa.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7c3b6e40.entry.js.map → p-0c05bf99.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-17071628.entry.js.map → p-0ebfdc05.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c8e8be4b.entry.js.map → p-11a06a8e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0d809b76.entry.js.map → p-17065b26.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-00ee896a.entry.js.map → p-203ac1ec.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-046acf7a.entry.js.map → p-342cbc7c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e3365ef8.entry.js.map → p-3b2e9bba.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-341ec9a9.entry.js.map → p-4784d899.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3cc5ece4.entry.js.map → p-4af9a89d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-cc9ca7ad.entry.js.map → p-4f252031.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-863cc88f.entry.js.map → p-572179e4.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e6312b3a.entry.js.map → p-6802e12b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c5068ad9.entry.js.map → p-7305d359.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4b858e15.entry.js.map → p-82a5fc4d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-41c99cb0.entry.js.map → p-83527ae9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-10cf1407.entry.js.map → p-874a9210.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6a14c7aa.entry.js.map → p-878f0323.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8f3ce54b.entry.js.map → p-8a242736.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4710694a.entry.js.map → p-8b8688ea.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-148aa367.entry.js.map → p-8d02311e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-813d91ef.entry.js.map → p-9010b4a1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4306c893.entry.js.map → p-aa39a0b1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-29e20541.entry.js.map → p-b2dec2b5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0ebca0d6.entry.js.map → p-b5c64f31.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-819b6cde.entry.js.map → p-cfdbbfea.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f98f363b.entry.js.map → p-ddfa1876.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-cafca519.entry.js.map → p-df32c417.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5bacdf4d.entry.js.map → p-df61f325.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d81f3867.entry.js.map → p-e64414a5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c807fd12.entry.js.map → p-e80f64bf.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3ad6dad0.entry.js.map → p-eaa2ec9c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-67430c36.entry.js.map → p-edd1fc75.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b9157435.entry.js.map → p-eeebdafe.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-69ebf6df.entry.js.map → p-ef78ebda.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2177cd22.entry.js.map → p-f7ac9179.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-17a2e764.entry.js.map → p-fc76536a.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as a,g as o}from"./p-b7a462e5.js";import{d as r,t as i}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as a,g as o}from"./p-b7a462e5.js";import{d as r,t as i}from"./p-4d6cad33.js";import{i as n}from"./p-1ecafb97.js";const t=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.container{display:inline-flex;align-items:center;padding:4px 16px;border:1px solid #BFBBBB;border-radius:9999px;background-color:#FFFFFF;gap:8px;font-family:var(--ifx-font-family)}.container:hover{cursor:pointer;border-color:#8D8786}.container:active,.container.active{border-color:#1D1D1D}.container:focus:not(:active,.active){outline:none;border-color:#1D1D1D}.container .label-wrapper{text-decoration:none}.container .label-wrapper .label{margin:0;font-weight:400;font-size:1rem;line-height:20px;color:#1D1D1D}';const c=t;const s=class{constructor(a){e(this,a)}async componentDidLoad(){if(!n(this.el)){const e=r();i("ifx-tag",await e)}}render(){return a("div",{key:"5796484a10082bc97cc68390b4d57ee9ec218e9b","aria-label":"a tag",class:"container"},this.icon&&a("ifx-icon",{key:"725efaea322cae7b8b2c99b8173ca882dfdec7af",icon:this.icon}),a("a",{key:"92be82c1ce510871dd1aa39985fd22397ea2a8f7",href:"javascript:void(null);",class:"label-wrapper"},a("p",{key:"9b45e564484d76705ca5afd17623a24b22ee8b58",class:"label"},a("slot",{key:"db94644055e0de0ef621f6d5ff467f1770a5ce08"}))))}get el(){return o(this)}};s.style=c;export{s as ifx_tag};
|
2
|
+
//# sourceMappingURL=p-8a242736.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,h as e,g as n}from"./p-b7a462e5.js";import{d as t,t as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,h as e,g as n}from"./p-b7a462e5.js";import{d as t,t as r}from"./p-4d6cad33.js";import{i as a}from"./p-1ecafb97.js";const o=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.indicator__container .dot__wrapper{display:flex;width:8px;height:8px;justify-content:center;align-items:center;flex-shrink:0;border-radius:50%;background-color:#0A8276}.indicator__container .number__container{height:16px;display:inline-flex;padding:0;min-width:16px;justify-content:center;align-items:center;border-radius:100px;background-color:#0A8276}.indicator__container .number__container .number__wrapper{padding:0 4px;color:#FFFFFF;text-align:center;font-size:0.875rem;font-style:normal;font-weight:600;line-height:16px}.indicator__container .number__container.inverted{background-color:#FFFFFF}.indicator__container .number__container.inverted .number__wrapper{color:#0A8276}';const c=o;const s=class{constructor(e){i(this,e);this.inverted=false;this.variant="number";this.number=0}handleNumber(){this.filteredNumber=!isNaN(this.number)&&this.number>99?"99+":this.number}componentWillLoad(){this.handleNumber()}async componentDidLoad(){if(!a(this.el)){const i=t();r("ifx-indicator",await i)}}componentWillUpdate(){this.handleNumber()}render(){return e("div",{key:"1a3c26dd11d7ad1c6b9b97ce64b040f4a87ac54f","aria-label":this.ariaLabel,class:"indicator__container"},this.variant==="number"&&e("div",{key:"067fa054ca187a9e9d204ed43e1c53a26a75d904",class:`number__container ${this.inverted?"inverted":""}`},e("div",{key:"602388e6b132f92cc5b5675fe041942e9895cbda",class:"number__wrapper"},this.filteredNumber)),this.variant==="dot"&&e("div",{key:"cb0a25df4c2319ad7572c9c350bbd930b8fc8165",class:"dot__wrapper"}))}get el(){return n(this)}};s.style=c;export{s as ifx_indicator};
|
2
|
+
//# sourceMappingURL=p-8b8688ea.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as e,h as t,g as s}from"./p-b7a462e5.js";import{d as a,t as n}from"./p-acbfa625.js";import{i as l}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.chip{position:relative}.chip__wrapper{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;border:1px solid #BFBBBB;border-radius:9999px;background:#FFFFFF;cursor:pointer;transition:border 100ms ease;font:400 0.875rem/1.25rem "Source Sans 3"}.chip__wrapper:hover,.chip__wrapper:focus-visible{outline:none;border:1px solid #575352}.chip__wrapper:focus{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--small{padding:4px 12px}.chip__wrapper.chip__wrapper--large{padding:8px 16px}.chip__wrapper.chip__wrapper--opened{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--opened .wrapper__open-button{transform:rotate(-180deg)}.chip__wrapper.chip__wrapper--selected{outline:3px solid #0A8276;outline-offset:-3px;color:#0A8276}.chip__wrapper.chip__wrapper--selected:hover,.chip__wrapper.chip__wrapper--selected:focus-visible{outline:3px solid #08665C;color:#08665C}.wrapper__label{display:inline-flex;align-items:center;gap:4px;font:400 0.875rem/1.25rem "Source Sans 3"}.wrapper__label .label__selected-options{font:600 0.875rem/1.25rem "Source Sans 3"}.wrapper__open-button{display:flex;align-items:center;transition:all 300ms ease}.wrapper__unselect-button{display:flex;align-items:center}.chip__dropdown{position:absolute;z-index:1;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;border-radius:1px;padding:8px 0;min-width:222px;background-color:#FFFFFF}';const c=r;const h=class{constructor(t){i(this,t);this.ifxChange=e(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;this.opened=false;this.selectedOptions=[]}handleValueChange(i){this.syncSelectedOptionsWithProp(i)}handleReadOnlyChange(i){if(i){this.opened=false}}closeDropdownOnOutsideClick(i){const e=i.composedPath();const t=this.chip.shadowRoot.querySelector(".chip__wrapper");const s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!e.includes(s)&&!e.includes(t)&&this.opened){this.toggleDropdownMenu()}}handleKeyDown(i){if(i.code!=="Tab"){i.preventDefault()}if(i.target.tagName==="IFX-CHIP"){this.handleWrapperKeyDown(i)}else if(i.target.tagName==="IFX-CHIP-ITEM"){this.handleDropdownKeyDown(i)}}updateSelectedOptions(i){const e=i.detail;const t=[...this.selectedOptions];if(this.variant!=="multi"){if(e.selected){this.opened=false;const t=this.getChipItems();t.forEach((e=>{if(e.selected&&e!==i.target){e.chipState=Object.assign(Object.assign({},e.chipState),{emitIfxChipItemSelect:false});e.selected=false}}));this.selectedOptions=[e]}else{this.selectedOptions=[]}this.value=this.selectedOptions[0]?this.selectedOptions[0].value:undefined}else{if(e.selected){if(!this.selectedOptions.find((i=>i.value===e.value))){this.selectedOptions=[...this.selectedOptions,e]}}else{this.selectedOptions=this.selectedOptions.filter((i=>i.value!==e.value))}this.value=this.selectedOptions.map((i=>i.value))}if(e.emitIfxChange){this.ifxChange.emit({previousSelection:t,currentSelection:this.selectedOptions,name:this.placeholder})}}getChipItems(){return this.chip.querySelectorAll("ifx-chip-item")}getSelectedOptions(){if(this.variant!=="multi"){return this.selectedOptions.map((i=>i.label)).join("")}return this.selectedOptions.slice(0,2).map((i=>i.label)).join(", ")}toggleDropdownMenu(){if(this.readOnly)return;this.opened=!this.opened}focusChipItemAt(i=0){this.opened=true;const e=this.getChipItems();let t;if(i===-1){t=e.item(e.length-1)}else if(i>=0&&i<e.length){t=e.item(i)}else{console.error(`Invalid index: ${i}`);return}const s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.focus()}),1)}}focusChip(){const i=this.chip.shadowRoot.querySelector(".chip__wrapper");i.focus()}handleUnselectButtonClick(i){i.stopPropagation();this.opened=false;let e=false;const t=this.getChipItems();t.forEach((i=>{if(i.selected){e=true;i.chipState=Object.assign(Object.assign({},i.chipState),{emitIfxChipItemSelect:false});i.selected=false}}));if(e){const i=this.selectedOptions;this.selectedOptions=[];this.value=[];this.ifxChange.emit({previousSelection:i,currentSelection:[],name:this.placeholder})}}handleWrapperClick(){if(!this.readOnly){this.toggleDropdownMenu()}}handleWrapperKeyDown(i){if(this.readOnly)return;if(!this.opened){switch(i.code){case"Space":case"Enter":case"ArrowDown":this.focusChipItemAt(0);break;case"ArrowUp":this.focusChipItemAt(-1);break}}else{switch(i.code){case"Escape":this.opened=false;this.focusChip();break}}}handleDropdownKeyDown(i){let e=this.getChipItems();let t=Array.from(e).indexOf(i.target);if(t===-1){console.error("Target not found in chip items");return}switch(i.code){case"ArrowDown":if(t===e.length-1)break;this.focusChipItemAt(t+1);break;case"ArrowUp":if(t===0)break;this.focusChipItemAt(t-1);break;case"Escape":this.opened=false;this.focusChip();break;case"Space":if(this.variant==="single"){this.opened=false;this.focusChip()}break;case"Enter":this.opened=false;this.focusChip();break}}syncChipState(){const i=this.getChipItems();let e=0;i.forEach((i=>{i.chipState={emitIfxChipItemSelect:true,size:this.size==="small"?"small":"large",variant:this.variant==="multi"?"multi":"single",key:e++}}))}syncSelectedOptionsWithProp(i){this.selectedOptions=[];const e=(()=>{let i=0;return()=>i++})();if(Array.isArray(i)){this.selectedOptions=i.map((i=>({value:i,label:i,selected:true,key:e(),emitIfxChange:true})))}else if(typeof i==="string"){this.selectedOptions=[{value:i,label:i,selected:true,key:e(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const i=a();n("ifx-chip",await i)}}render(){return t("div",{key:"c62bb701a1c1f86a192fb033913fe080568ca998",class:"chip"},t("div",{key:"ad5e28f9956e8196be89a1805f6e0cbe7f920b6f",class:`chip__wrapper chip__wrapper--${this.size==="small"?"small":"large"}\n chip__wrapper--${this.variant==="multi"?"multi":"single"}\n ${this.opened&&!this.readOnly?"chip__wrapper--opened":""}\n ${this.selectedOptions.length?"chip__wrapper--selected":""}`,tabIndex:0,onClick:!this.readOnly?()=>{this.handleWrapperClick()}:undefined,role:"combobox","aria-label":this.ariaLabel,"aria-value":this.getSelectedOptions(),"aria-haspopup":!this.readOnly?"listbox":undefined,"aria-expanded":!this.readOnly?this.opened.toString():undefined,"aria-controls":!this.readOnly?"dropdown":undefined,"aria-readonly":this.readOnly?"true":undefined,"aria-multiselectable":this.variant==="multi"?"true":undefined},t("div",{key:"ac373317983c2981e46411c03613efe5d21b53c5",class:"wrapper__label"},this.selectedOptions.length===0&&`${this.placeholder}`,this.selectedOptions.length!==0&&(this.variant==="multi"||this.readOnly)&&this.placeholder!==""&&`${this.placeholder}:`,this.selectedOptions.length!==0&&t("div",{key:"fcb947e3479d55ba328017c52ecc977ca08b9508",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"d020940bbb686b1092b80fb418c3f3b5b7f763a0",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"a7fa39998c461851afc9d7b9f8d390dd85cd3d3b",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"c0aeb3bca549ba6696ac9ac62ad9860de9867e44",class:"wrapper__unselect-button",onClick:i=>{this.handleUnselectButtonClick(i)}},t("ifx-icon",{key:2,icon:`cross16`})),this.selectedOptions.length>=1&&this.variant==="multi"&&t("div",{key:"e689165a99b8692479d0e1e8a18a82da852e7ae4",class:"wrapper__unselect-button",onClick:i=>{this.handleUnselectButtonClick(i)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"cb0f2a113f3773429100d167fc2bcc9f139b3caa",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"fe800e6907110ca6a44a425095911620fbb0b27b"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};h.style=c;const o=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.chip-item{display:flex;align-items:center;gap:8px;padding:8px 16px;user-select:none;transition:all 100ms ease;transition-property:background, color}.chip-item:hover{cursor:pointer;background-color:#EEEDED}.chip-item:active{background-color:#BFBBBB}.chip-item:focus{outline:2px solid #0A8276}.chip-item.chip-item--large{font:400 1rem/1.5rem "Source Sans 3"}.chip-item.chip-item--small{font:400 0.875rem/1.25rem "Source Sans 3"}.chip-item.chip-item--selected{color:#0A8276}.chip-item.chip-item--selected .chip-item__selected-indicator{display:block}.chip-item__selected-indicator{display:none;margin-left:auto}';const p=o;const d=class{constructor(t){i(this,t);this.ifxChipItemSelect=e(this,"ifxChipItemSelect",5);this.value=undefined;this.chipState={emitIfxChipItemSelect:true,variant:"multi",size:"large"};this.selected=false}updateItemSelection(i){if(this.chipState.variant==="single"){const e=i.target;if(this.chipItem!==e&&this.chipItem.parentElement===e.parentElement){this.selected=false}}}validateSelected(i,e){if(i!==e){if(this.chipState.emitIfxChipItemSelect){this.emitIfxChipItemSelectEvent()}else{this.chipState.emitIfxChipItemSelect=true}}}getItemLabel(){return this.chipItem.innerText}toggleItemSelection(){this.selected=!this.selected}emitIfxChipItemSelectEvent(i=true){this.ifxChipItemSelect.emit({emitIfxChange:i,key:this.chipState.key,label:this.getItemLabel(),selected:this.selected,value:this.value})}handleItemClick(){this.toggleItemSelection()}handleItemKeyDown(i){if(i.code==="Enter"||i.code==="Space"){this.toggleItemSelection()}}handleSelectedState(){if(this.selected){this.emitIfxChipItemSelectEvent(false)}}componentWillLoad(){this.handleSelectedState()}render(){return t("div",{key:"7ceff18d0a41b419a188d925fd854cc97d7a9ecd",class:`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected&&this.chipState.variant)==="single"?"selected":""}`,tabIndex:0,onClick:()=>{this.handleItemClick()},onKeyDown:i=>{this.handleItemKeyDown(i)},role:"option","aria-selected":this.selected.toString()},this.chipState.variant==="multi"&&t("ifx-checkbox",{key:"d2f717951d288aa0863081e54cabf7edd1c6f7e6",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"fff335d9009c93863012f6a4307ed4322413c4f7",class:"chip-item__label"}," ",t("slot",{key:"a093e9caf2eecba28c58674dde3f788be1f5849b"})," "),t("div",{key:"ea76c6b3d0bdd2a687acfbe323ebd9e6d6034a40",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"5d0ae125cb1ea0297d81d773c9981bd13f0c5759",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};d.style=p;const f='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}';const b=f;const m=class{constructor(t){i(this,t);this.ifxPageChange=e(this,"ifxPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=i=>{const e=i.currentTarget;const t=parseInt(e.dataset.page);if(!isNaN(t))this.changePage(t)}}setItemsPerPage(i){var e,t;const s=((e=i.detail)===null||e===void 0?void 0:e.value)||((t=i.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}async componentDidLoad(){if(!l(this.el)){const i=a();n("ifx-pagination",await i)}this.initPagination()}updateVisiblePages(){const i=2;const e=this.numberOfPages.length;const t=this.internalPage;let s=[];if(e<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>i+1)s.push("...");let a=Math.max(2,t-i);let n=Math.min(e-1,t+i);if(t<=i+1)n=i*2+1;if(t>=e-i)a=e-i*2;for(let i=a;i<=n;i++)s.push(i);if(t<e-i)s.push("...");s.push(e)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const i=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:i},((i,e)=>e+1));this.internalPage=Math.max(1,Math.min(this.currentPage,i))}filterOptionsArray(){const i=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=i.map((i=>Object.assign(Object.assign({},i),{label:i.label||i.value})))}componentWillLoad(){this.calculateNumberOfPages();this.filterOptionsArray();this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const i=this.el.shadowRoot.querySelector(".pagination");if(!i)return;const e=()=>{const e=i.querySelector(".prev");const t=i.querySelector(".next");if(e){e.disabled=this.internalPage===1;e.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};i.querySelectorAll("li").forEach((i=>{i.removeEventListener("click",this.handlePageClick);i.addEventListener("click",this.handlePageClick)}));e()}changePage(i){i=Math.max(1,Math.min(i,this.numberOfPages.length));if(i===this.internalPage)return;this.internalPage=i;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"cf90a5abda0315aa6d5d31b17808f404afb28959",class:"container"},t("div",{key:"e2f759804708561ecb2eda3caf853c79e1a6ebdc",class:"items__per-page-wrapper"},t("div",{key:"8d91221c9bc7309c24db46d645cba7bc24c7cfe8",class:"items__per-page-label"},"Results per Page"),t("div",{key:"55382e6df9526650bae630486ad66e3f7d6019cc",class:"items__per-page-field"},t("ifx-select",{key:"a504f0e55a7d87eecf69561e8c4897bd50a9a63b",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("div",{key:"75bf6a71d2cd3fdc0a5ab8985a581b6788c31bde",class:"items__total-wrapper"},t("div",{key:"0afa015556e0f55cb2eb766b67c81dc0286602a7",class:"pagination"},t("ifx-icon-button",{key:"f2b314f3ffc1a5fa9cef0a08c3f87b585b77ab23",class:"prev",icon:"arrow-left-16",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"72655cce8c6f7614c2dbe52b2442d82c0ced724c"},this.visiblePages.map(((i,e)=>typeof i==="number"?t("li",{key:`page-${i}`,class:{[this.CLASS_ACTIVE]:i===this.internalPage},"data-page":i},t("a",{href:"javascript:void(0)"},i)):t("li",{class:"ellipsis",key:`ellipsis-${e}`},t("span",null,"..."))))),t("ifx-icon-button",{key:"b33c31a5d5256f80b518ef28a2c97999cc7ae077",class:"next",icon:"arrow-right-16",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}};m.style=b;export{h as ifx_chip,d as ifx_chip_item,m as ifx_pagination};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as e,h as t,g as s}from"./p-b7a462e5.js";import{d as a,t as n}from"./p-4d6cad33.js";import{i as l}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-block}.chip{position:relative}.chip__wrapper{display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;border:1px solid #BFBBBB;border-radius:9999px;background:#FFFFFF;cursor:pointer;transition:border 100ms ease;font:400 0.875rem/1.25rem "Source Sans 3"}.chip__wrapper:hover,.chip__wrapper:focus-visible{outline:none;border:1px solid #575352}.chip__wrapper:focus{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--small{padding:4px 12px}.chip__wrapper.chip__wrapper--large{padding:8px 16px}.chip__wrapper.chip__wrapper--opened{border:1px solid #0A8276}.chip__wrapper.chip__wrapper--opened .wrapper__open-button{transform:rotate(-180deg)}.chip__wrapper.chip__wrapper--selected{outline:3px solid #0A8276;outline-offset:-3px;color:#0A8276}.chip__wrapper.chip__wrapper--selected:hover,.chip__wrapper.chip__wrapper--selected:focus-visible{outline:3px solid #08665C;color:#08665C}.wrapper__label{display:inline-flex;align-items:center;gap:4px;font:400 0.875rem/1.25rem "Source Sans 3"}.wrapper__label .label__selected-options{font:600 0.875rem/1.25rem "Source Sans 3"}.wrapper__open-button{display:flex;align-items:center;transition:all 300ms ease}.wrapper__unselect-button{display:flex;align-items:center}.chip__dropdown{position:absolute;z-index:1;box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843);border:1px solid #EEEDED;border-radius:1px;padding:8px 0;min-width:222px;background-color:#FFFFFF}';const c=r;const h=class{constructor(t){i(this,t);this.ifxChange=e(this,"ifxChange",7);this.placeholder="";this.size="large";this.value=undefined;this.variant="single";this.readOnly=false;this.opened=false;this.selectedOptions=[]}handleValueChange(i){this.syncSelectedOptionsWithProp(i)}handleReadOnlyChange(i){if(i){this.opened=false}}closeDropdownOnOutsideClick(i){const e=i.composedPath();const t=this.chip.shadowRoot.querySelector(".chip__wrapper");const s=this.chip.shadowRoot.querySelector(".chip__dropdown");if(!e.includes(s)&&!e.includes(t)&&this.opened){this.toggleDropdownMenu()}}handleKeyDown(i){if(i.code!=="Tab"){i.preventDefault()}if(i.target.tagName==="IFX-CHIP"){this.handleWrapperKeyDown(i)}else if(i.target.tagName==="IFX-CHIP-ITEM"){this.handleDropdownKeyDown(i)}}updateSelectedOptions(i){const e=i.detail;const t=[...this.selectedOptions];if(this.variant!=="multi"){if(e.selected){this.opened=false;const t=this.getChipItems();t.forEach((e=>{if(e.selected&&e!==i.target){e.chipState=Object.assign(Object.assign({},e.chipState),{emitIfxChipItemSelect:false});e.selected=false}}));this.selectedOptions=[e]}else{this.selectedOptions=[]}this.value=this.selectedOptions[0]?this.selectedOptions[0].value:undefined}else{if(e.selected){if(!this.selectedOptions.find((i=>i.value===e.value))){this.selectedOptions=[...this.selectedOptions,e]}}else{this.selectedOptions=this.selectedOptions.filter((i=>i.value!==e.value))}this.value=this.selectedOptions.map((i=>i.value))}if(e.emitIfxChange){this.ifxChange.emit({previousSelection:t,currentSelection:this.selectedOptions,name:this.placeholder})}}getChipItems(){return this.chip.querySelectorAll("ifx-chip-item")}getSelectedOptions(){if(this.variant!=="multi"){return this.selectedOptions.map((i=>i.label)).join("")}return this.selectedOptions.slice(0,2).map((i=>i.label)).join(", ")}toggleDropdownMenu(){if(this.readOnly)return;this.opened=!this.opened}focusChipItemAt(i=0){this.opened=true;const e=this.getChipItems();let t;if(i===-1){t=e.item(e.length-1)}else if(i>=0&&i<e.length){t=e.item(i)}else{console.error(`Invalid index: ${i}`);return}const s=t.shadowRoot.querySelector(".chip-item");if(s){setTimeout((()=>{s.focus()}),1)}}focusChip(){const i=this.chip.shadowRoot.querySelector(".chip__wrapper");i.focus()}handleUnselectButtonClick(i){i.stopPropagation();this.opened=false;let e=false;const t=this.getChipItems();t.forEach((i=>{if(i.selected){e=true;i.chipState=Object.assign(Object.assign({},i.chipState),{emitIfxChipItemSelect:false});i.selected=false}}));if(e){const i=this.selectedOptions;this.selectedOptions=[];this.value=[];this.ifxChange.emit({previousSelection:i,currentSelection:[],name:this.placeholder})}}handleWrapperClick(){if(!this.readOnly){this.toggleDropdownMenu()}}handleWrapperKeyDown(i){if(this.readOnly)return;if(!this.opened){switch(i.code){case"Space":case"Enter":case"ArrowDown":this.focusChipItemAt(0);break;case"ArrowUp":this.focusChipItemAt(-1);break}}else{switch(i.code){case"Escape":this.opened=false;this.focusChip();break}}}handleDropdownKeyDown(i){let e=this.getChipItems();let t=Array.from(e).indexOf(i.target);if(t===-1){console.error("Target not found in chip items");return}switch(i.code){case"ArrowDown":if(t===e.length-1)break;this.focusChipItemAt(t+1);break;case"ArrowUp":if(t===0)break;this.focusChipItemAt(t-1);break;case"Escape":this.opened=false;this.focusChip();break;case"Space":if(this.variant==="single"){this.opened=false;this.focusChip()}break;case"Enter":this.opened=false;this.focusChip();break}}syncChipState(){const i=this.getChipItems();let e=0;i.forEach((i=>{i.chipState={emitIfxChipItemSelect:true,size:this.size==="small"?"small":"large",variant:this.variant==="multi"?"multi":"single",key:e++}}))}syncSelectedOptionsWithProp(i){this.selectedOptions=[];const e=(()=>{let i=0;return()=>i++})();if(Array.isArray(i)){this.selectedOptions=i.map((i=>({value:i,label:i,selected:true,key:e(),emitIfxChange:true})))}else if(typeof i==="string"){this.selectedOptions=[{value:i,label:i,selected:true,key:e(),emitIfxChange:true}]}this.syncChipState()}componentWillLoad(){this.syncSelectedOptionsWithProp(this.value)}async componentDidLoad(){if(!l(this.chip)){const i=a();n("ifx-chip",await i)}}render(){return t("div",{key:"c62bb701a1c1f86a192fb033913fe080568ca998",class:"chip"},t("div",{key:"ad5e28f9956e8196be89a1805f6e0cbe7f920b6f",class:`chip__wrapper chip__wrapper--${this.size==="small"?"small":"large"}\n chip__wrapper--${this.variant==="multi"?"multi":"single"}\n ${this.opened&&!this.readOnly?"chip__wrapper--opened":""}\n ${this.selectedOptions.length?"chip__wrapper--selected":""}`,tabIndex:0,onClick:!this.readOnly?()=>{this.handleWrapperClick()}:undefined,role:"combobox","aria-label":this.ariaLabel,"aria-value":this.getSelectedOptions(),"aria-haspopup":!this.readOnly?"listbox":undefined,"aria-expanded":!this.readOnly?this.opened.toString():undefined,"aria-controls":!this.readOnly?"dropdown":undefined,"aria-readonly":this.readOnly?"true":undefined,"aria-multiselectable":this.variant==="multi"?"true":undefined},t("div",{key:"ac373317983c2981e46411c03613efe5d21b53c5",class:"wrapper__label"},this.selectedOptions.length===0&&`${this.placeholder}`,this.selectedOptions.length!==0&&(this.variant==="multi"||this.readOnly)&&this.placeholder!==""&&`${this.placeholder}:`,this.selectedOptions.length!==0&&t("div",{key:"fcb947e3479d55ba328017c52ecc977ca08b9508",class:"label__selected-options"},this.getSelectedOptions()),this.selectedOptions.length>2&&this.variant==="multi"&&t("ifx-indicator",{key:"d020940bbb686b1092b80fb418c3f3b5b7f763a0",variant:"number",number:this.selectedOptions.length-2})),!this.readOnly&&(this.variant!=="multi"||this.variant==="multi"&&this.selectedOptions.length===0)&&t("div",{key:"a7fa39998c461851afc9d7b9f8d390dd85cd3d3b",class:"wrapper__open-button"},t("ifx-icon",{key:1,icon:`chevron-down-16`})),this.variant!=="multi"&&this.readOnly!==false&&this.selectedOptions.length>0&&t("div",{key:"c0aeb3bca549ba6696ac9ac62ad9860de9867e44",class:"wrapper__unselect-button",onClick:i=>{this.handleUnselectButtonClick(i)}},t("ifx-icon",{key:2,icon:`cross16`})),this.selectedOptions.length>=1&&this.variant==="multi"&&t("div",{key:"e689165a99b8692479d0e1e8a18a82da852e7ae4",class:"wrapper__unselect-button",onClick:i=>{this.handleUnselectButtonClick(i)}},t("ifx-icon",{key:2,icon:`cross16`}))),this.opened&&!this.readOnly&&t("div",{key:"cb0f2a113f3773429100d167fc2bcc9f139b3caa",id:"dropdown",role:"listbox",class:"chip__dropdown"},t("slot",{key:"fe800e6907110ca6a44a425095911620fbb0b27b"})))}get chip(){return s(this)}static get watchers(){return{value:["handleValueChange"],readOnly:["handleReadOnlyChange"]}}};h.style=c;const o=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.chip-item{display:flex;align-items:center;gap:8px;padding:8px 16px;user-select:none;transition:all 100ms ease;transition-property:background, color}.chip-item:hover{cursor:pointer;background-color:#EEEDED}.chip-item:active{background-color:#BFBBBB}.chip-item:focus{outline:2px solid #0A8276}.chip-item.chip-item--large{font:400 1rem/1.5rem "Source Sans 3"}.chip-item.chip-item--small{font:400 0.875rem/1.25rem "Source Sans 3"}.chip-item.chip-item--selected{color:#0A8276}.chip-item.chip-item--selected .chip-item__selected-indicator{display:block}.chip-item__selected-indicator{display:none;margin-left:auto}';const p=o;const d=class{constructor(t){i(this,t);this.ifxChipItemSelect=e(this,"ifxChipItemSelect",5);this.value=undefined;this.chipState={emitIfxChipItemSelect:true,variant:"multi",size:"large"};this.selected=false}updateItemSelection(i){if(this.chipState.variant==="single"){const e=i.target;if(this.chipItem!==e&&this.chipItem.parentElement===e.parentElement){this.selected=false}}}validateSelected(i,e){if(i!==e){if(this.chipState.emitIfxChipItemSelect){this.emitIfxChipItemSelectEvent()}else{this.chipState.emitIfxChipItemSelect=true}}}getItemLabel(){return this.chipItem.innerText}toggleItemSelection(){this.selected=!this.selected}emitIfxChipItemSelectEvent(i=true){this.ifxChipItemSelect.emit({emitIfxChange:i,key:this.chipState.key,label:this.getItemLabel(),selected:this.selected,value:this.value})}handleItemClick(){this.toggleItemSelection()}handleItemKeyDown(i){if(i.code==="Enter"||i.code==="Space"){this.toggleItemSelection()}}handleSelectedState(){if(this.selected){this.emitIfxChipItemSelectEvent(false)}}componentWillLoad(){this.handleSelectedState()}render(){return t("div",{key:"7ceff18d0a41b419a188d925fd854cc97d7a9ecd",class:`chip-item chip-item--${this.chipState.size} \n chip-item--${(this.selected&&this.chipState.variant)==="single"?"selected":""}`,tabIndex:0,onClick:()=>{this.handleItemClick()},onKeyDown:i=>{this.handleItemKeyDown(i)},role:"option","aria-selected":this.selected.toString()},this.chipState.variant==="multi"&&t("ifx-checkbox",{key:"d2f717951d288aa0863081e54cabf7edd1c6f7e6",checked:this.selected,tabIndex:-1,size:"s"}),t("div",{key:"fff335d9009c93863012f6a4307ed4322413c4f7",class:"chip-item__label"}," ",t("slot",{key:"a093e9caf2eecba28c58674dde3f788be1f5849b"})," "),t("div",{key:"ea76c6b3d0bdd2a687acfbe323ebd9e6d6034a40",class:"chip-item__selected-indicator"},t("ifx-icon",{key:"5d0ae125cb1ea0297d81d773c9981bd13f0c5759",icon:"check-16"}," ")))}get chipItem(){return s(this)}static get watchers(){return{selected:["validateSelected"]}}};d.style=p;const f='@charset "UTF-8";:root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.container{display:inline-flex;justify-content:center;align-items:center;gap:32px;font-family:var(--ifx-font-family)}.container .items__per-page-wrapper{display:flex;align-items:center;gap:16px}.container .items__per-page-wrapper .items__per-page-label{color:#1D1D1D;font-size:14px;font-style:normal;font-weight:600;line-height:20px}.container .items__per-page-wrapper .items__per-page-field{display:flex;flex-direction:column;align-items:flex-start}.container .items__per-page-wrapper .items__per-page-field ifx-select{width:92px}.container .items__total-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .items__total-button{display:flex;width:40px;height:40px;justify-content:center;align-items:center;border-radius:100px;border:1px solid #BFBBBB;background:#FFF}.container .items__total-wrapper .page__numbers-wrapper{display:flex;justify-content:center;align-items:center;gap:12px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item{display:flex;padding:6px;flex-direction:column;justify-content:center;align-items:center;gap:10px;border-radius:100px}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active{background-color:#0A8276}.container .items__total-wrapper .page__numbers-wrapper .page__number-item.active span{color:#fff}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover{cursor:pointer}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:hover:not(.active){background-color:#ddd}.container .items__total-wrapper .page__numbers-wrapper .page__number-item:active:not(.active){background-color:#575352}.container .items__total-wrapper .page__numbers-wrapper .page__number-item span{display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px}.pagination{display:flex}.pagination ifx-icon-button:first-of-type{margin-right:12px}.pagination ifx-icon-button:last-of-type{margin-left:12px}a{padding:8px;border-radius:100px}ol{list-style-type:none;padding:0;margin:0;display:inline-flex;align-items:center;gap:12px}li{display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:100px}li:hover:not(.active) a{background-color:#EEEDED}li:active:not(.active) a{background-color:#575352;color:#fff}li.active{background-color:#0A8276}li.active a{color:#fff}li:hover{cursor:pointer}li a{text-decoration:none;display:flex;width:16px;height:16px;flex-direction:column;justify-content:center;color:#1D1D1D;text-align:center;font-size:13px;font-style:normal;font-weight:400;line-height:20px;align-items:center}.prev.disabled,.next.disabled{cursor:default}.prev.disabled:hover,.next.disabled:hover{cursor:default;text-decoration:none}.prev{margin-right:2.5px}.next{margin-left:2.5px}@media (min-width: 400px){li:first-child,li.active-sibling,li.active,li.active+li,li:last-child{display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8)~li{display:none}li:first-child:nth-last-child(n+8)~li.active-sibling:before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li.active+li:after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+5){display:inline-flex;flex-direction:row}li:first-child:nth-last-child(n+8)~li:nth-last-child(5):before{content:"…";font-size:13px;display:inline-block;margin-right:6px}li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-child(-n+2):after,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):before,li:first-child:nth-last-child(n+8)~li:nth-last-child(-n+2):after,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):before,li:first-child:nth-last-child(n+8)~li.active-sibling:nth-last-child(-n+4):after{display:none !important}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5){display:none}li:first-child:nth-last-child(n+8).active~li:nth-last-child(-n+5):before,li:first-child:nth-last-child(n+8)~li.active~li:nth-last-child(-n+5):before{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+5),li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+5){display:inline-flex !important;flex-direction:row}li:first-child:nth-last-child(n+8).active~li:nth-child(-n+4):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(-n+4):after{display:none}li:first-child:nth-last-child(n+8).active~li:nth-child(5):after,li:first-child:nth-last-child(n+8)~li.active~li:nth-child(5):after{content:"…";font-size:13px;display:inline-block;margin-left:6px}li:first-child:nth-last-child(n+8).active:before,li:first-child:nth-last-child(n+8).active:after,li:first-child:nth-last-child(n+8)~li.active:before,li:first-child:nth-last-child(n+8)~li.active:after{display:none}}';const b=f;const m=class{constructor(t){i(this,t);this.ifxPageChange=e(this,"ifxPageChange",7);this.currentPage=1;this.internalPage=1;this.internalItemsPerPage=10;this.numberOfPages=[];this.total=1;this.filteredItemsPerPage=[];this.visiblePages=[];this.CLASS_DISABLED="disabled";this.CLASS_ACTIVE="active";this.handlePageClick=i=>{const e=i.currentTarget;const t=parseInt(e.dataset.page);if(!isNaN(t))this.changePage(t)}}setItemsPerPage(i){var e,t;const s=((e=i.detail)===null||e===void 0?void 0:e.value)||((t=i.detail)===null||t===void 0?void 0:t.label);const a=parseInt(s)||10;if(a===this.internalItemsPerPage){return}this.internalItemsPerPage=a;this.internalPage=1;this.calculateNumberOfPages();this.updateVisiblePages();this.handleEventEmission()}async componentDidLoad(){if(!l(this.el)){const i=a();n("ifx-pagination",await i)}this.initPagination()}updateVisiblePages(){const i=2;const e=this.numberOfPages.length;const t=this.internalPage;let s=[];if(e<=5){s=[...this.numberOfPages]}else{s.push(1);if(t>i+1)s.push("...");let a=Math.max(2,t-i);let n=Math.min(e-1,t+i);if(t<=i+1)n=i*2+1;if(t>=e-i)a=e-i*2;for(let i=a;i<=n;i++)s.push(i);if(t<e-i)s.push("...");s.push(e)}this.visiblePages=[...new Set(s)]}calculateNumberOfPages(){const i=Math.ceil(this.total/this.internalItemsPerPage);this.numberOfPages=Array.from({length:i},((i,e)=>e+1));this.internalPage=Math.max(1,Math.min(this.currentPage,i))}filterOptionsArray(){const i=typeof this.itemsPerPage==="string"?JSON.parse(this.itemsPerPage):this.itemsPerPage;this.filteredItemsPerPage=i.map((i=>Object.assign(Object.assign({},i),{label:i.label||i.value})))}componentWillLoad(){this.calculateNumberOfPages();this.filterOptionsArray();this.updateVisiblePages()}componentWillUpdate(){if(this.prevInternalPage!==this.internalPage){this.updateVisiblePages();this.prevInternalPage=this.internalPage}}componentDidUpdate(){this.initPagination()}handleEventEmission(){this.ifxPageChange.emit({currentPage:this.internalPage,totalPages:this.numberOfPages.length,itemsPerPage:this.internalItemsPerPage})}initPagination(){const i=this.el.shadowRoot.querySelector(".pagination");if(!i)return;const e=()=>{const e=i.querySelector(".prev");const t=i.querySelector(".next");if(e){e.disabled=this.internalPage===1;e.classList.toggle(this.CLASS_DISABLED,this.internalPage===1)}if(t){t.disabled=this.internalPage===this.numberOfPages.length;t.classList.toggle(this.CLASS_DISABLED,this.internalPage===this.numberOfPages.length)}};i.querySelectorAll("li").forEach((i=>{i.removeEventListener("click",this.handlePageClick);i.addEventListener("click",this.handlePageClick)}));e()}changePage(i){i=Math.max(1,Math.min(i,this.numberOfPages.length));if(i===this.internalPage)return;this.internalPage=i;this.handleEventEmission();this.initPagination()}render(){return t("div",{key:"cf90a5abda0315aa6d5d31b17808f404afb28959",class:"container"},t("div",{key:"e2f759804708561ecb2eda3caf853c79e1a6ebdc",class:"items__per-page-wrapper"},t("div",{key:"8d91221c9bc7309c24db46d645cba7bc24c7cfe8",class:"items__per-page-label"},"Results per Page"),t("div",{key:"55382e6df9526650bae630486ad66e3f7d6019cc",class:"items__per-page-field"},t("ifx-select",{key:"a504f0e55a7d87eecf69561e8c4897bd50a9a63b",placeholder:"false","show-search":"false",value:undefined,disabled:false,error:false,size:"s",options:this.filteredItemsPerPage,"placeholder-value":"Select"}))),t("div",{key:"75bf6a71d2cd3fdc0a5ab8985a581b6788c31bde",class:"items__total-wrapper"},t("div",{key:"0afa015556e0f55cb2eb766b67c81dc0286602a7",class:"pagination"},t("ifx-icon-button",{key:"f2b314f3ffc1a5fa9cef0a08c3f87b585b77ab23",class:"prev",icon:"arrow-left-16",onClick:()=>this.changePage(this.internalPage-1)}),t("ol",{key:"72655cce8c6f7614c2dbe52b2442d82c0ced724c"},this.visiblePages.map(((i,e)=>typeof i==="number"?t("li",{key:`page-${i}`,class:{[this.CLASS_ACTIVE]:i===this.internalPage},"data-page":i},t("a",{href:"javascript:void(0)"},i)):t("li",{class:"ellipsis",key:`ellipsis-${e}`},t("span",null,"..."))))),t("ifx-icon-button",{key:"b33c31a5d5256f80b518ef28a2c97999cc7ae077",class:"next",icon:"arrow-right-16",onClick:()=>this.changePage(this.internalPage+1)}))))}get el(){return s(this)}};m.style=b;export{h as ifx_chip,d as ifx_chip_item,m as ifx_pagination};
|
2
|
+
//# sourceMappingURL=p-8d02311e.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as a,h as t,g as s}from"./p-b7a462e5.js";import{d as i,t as l}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as a,h as t,g as s}from"./p-b7a462e5.js";import{d as i,t as l}from"./p-4d6cad33.js";import{i as r}from"./p-1ecafb97.js";const d=':host{display:block}.tree-view{font-family:var(--ifx-font-family, sans-serif);font-size:14px;color:var(--ifx-color-text, #1a1a1a);display:flex;flex-wrap:wrap;flex-direction:column;overflow-x:auto;overflow-y:hidden}.tree-view__label{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}';const n=d;const o=class{constructor(t){e(this,t);this.ifxTreeViewExpandAllChange=a(this,"ifxTreeViewExpandAllChange",7);this.ifxTreeViewDisableAllChange=a(this,"ifxTreeViewDisableAllChange",7);this.disableAllItems=false;this.expandAllItems=false;this.handleSlotRef=e=>{if(e){if(this.disableAllItems){e.setAttribute("data-disable-all-items","true")}else{e.removeAttribute("data-disable-all-items")}if(this.expandAllItems){e.setAttribute("data-expand-all-items","true")}else{e.removeAttribute("data-expand-all-items")}}}}handleExpandAllItemsChange(e){this.ifxTreeViewExpandAllChange.emit(e)}handleDisableAllItemsChange(e){this.ifxTreeViewDisableAllChange.emit(e)}async componentDidLoad(){if(!r(this.el)){const e=i();l("ifx-tree-view",await e)}}render(){return t("div",{key:"ec08b68d133220d6e7a7bc7556c8007e6d26c918",class:`tree-view ${this.disableAllItems?" tree-view--disabled":""}`,role:"tree","aria-label":this.ariaLabel},this.label&&this.label.trim()!==""&&t("div",{key:"bbcfec059c56183de271d8455a9c4c198a530100",class:"tree-view__label"},this.label),t("slot",{key:"5b6e4e4ecc8285d1f3710159273a0bf4bda08b11",ref:this.handleSlotRef}))}get el(){return s(this)}static get watchers(){return{expandAllItems:["handleExpandAllItemsChange"],disableAllItems:["handleDisableAllItemsChange"]}}};o.style=n;export{o as ifx_tree_view};
|
2
|
+
//# sourceMappingURL=p-9010b4a1.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as i,h as e,a as s,g as h}from"./p-b7a462e5.js";import{d as n,t as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as i,h as e,a as s,g as h}from"./p-b7a462e5.js";import{d as n,t as r}from"./p-4d6cad33.js";import{i as c}from"./p-1ecafb97.js";const o=".ifx-content-switcher{background-color:#FFFFFF;border:1px solid #BFBBBB;border-radius:9999px;height:36px;width:fit-content;box-sizing:border-box;display:flex;flex-direction:row;align-items:center}.ifx-content-switcher ::slotted(ifx-content-switcher-item){position:relative}.ifx-content-switcher ::slotted(ifx-content-switcher-item:first-child){left:-1px;margin-right:-1px}.ifx-content-switcher ::slotted(ifx-content-switcher-item:last-child){right:-1px;margin-left:-1px}.ifx-content-switcher ::slotted(.ifx-content-switcher-divider){width:1px;height:20px;background-color:#8D8786;margin:0px 1px;visibility:visible}.ifx-content-switcher ::slotted(.ifx-content-switcher-divider.hidden){visibility:hidden}";const d=o;const l=class{constructor(e){t(this,e);this.ifxChange=i(this,"ifxChange",7);this.activeIndex=-1;this.hoverIndex=-1;this.focusIndex=-1;this.dividers=Array();this.eventHandlers=new Map}componentWillLoad(){this.items=Array.from(this.el.children);this.initializeDividers();this.addEventListeners();this.ensureSingleSelectedItem()}async componentDidLoad(){if(!c(this.el)){const t=n();r("ifx-content-switcher",await t)}}disconnectedCallback(){this.removeEventListeners()}initializeDividers(){this.items.forEach(((t,i)=>{if(i<this.items.length-1){const i=document.createElement("div");i.classList.add("ifx-content-switcher-divider");t.after(i);this.dividers.push(i)}}))}addEventListeners(){this.items.forEach(((t,i)=>{const e={click:()=>this.selectItem(i),mouseenter:()=>this.handleHover(i,true),mouseleave:()=>this.handleHover(i,false),focus:()=>this.handleFocus(i,true),blur:()=>this.handleFocus(i,false)};Object.keys(e).forEach((i=>{t.addEventListener(i,e[i])}));this.eventHandlers.set(t,e)}))}removeEventListeners(){this.eventHandlers.forEach(((t,i)=>{Object.keys(t).forEach((e=>{i.removeEventListener(e,t[e])}))}));this.eventHandlers.clear()}ensureSingleSelectedItem(){this.items.forEach(((t,i)=>{const e=t.getAttribute("selected")==="true"||t.selected;if(e){if(this.activeIndex<0){this.selectItem(i)}else{t.removeAttribute("selected");t.selected=false}}}))}handleHover(t,i){this.hoverIndex=i?t:-1;this.updateDividersOfItem(t)}handleFocus(t,i){this.focusIndex=i?t:-1;this.updateDividersOfItem(t)}updateDividersOfItem(t){if(t<this.items.length-1){this.updateDividerVisibility(t)}if(t>0){this.updateDividerVisibility(t-1)}}updateDividerVisibility(t){const i=new Set([this.activeIndex,this.activeIndex-1,this.hoverIndex,this.hoverIndex-1,this.focusIndex,this.focusIndex-1]);this.setDividerVisibility(t,i.has(t))}setDividerVisibility(t,i){if(this.dividers[t]){this.dividers[t].classList.toggle("hidden",i)}}selectItem(t){if(t===this.activeIndex)return;const i=this.activeIndex;if(i>=0){this.items[i].removeAttribute("selected")}this.activeIndex=t;this.items[t].setAttribute("selected","true");this.ifxChange.emit({oldValue:this.getValueOfItem(i),newValue:this.getValueOfItem(t)});this.updateDividersOfItem(i);this.updateDividersOfItem(t)}getValueOfItem(t){if(this.items[t]==null)return t.toLocaleString();return this.items[t].getAttribute("value")||t.toLocaleString()}render(){return e(s,{key:"dc8ed1e40d00b2fb5b8274f3a1be386be2b7e6ff"},e("div",{key:"12f9002e81a381891cc9c3e89b081966edc3daff",class:"ifx-content-switcher",role:"group"},e("slot",{key:"b2b0b7f694d08c9b04b9c0b763d32a29778871bd"})))}get el(){return h(this)}};l.style=d;export{l as ifx_content_switcher};
|
2
|
+
//# sourceMappingURL=p-aa39a0b1.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as a,c as s,h as e,g as i}from"./p-b7a462e5.js";import{d as r,t}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as a,c as s,h as e,g as i}from"./p-b7a462e5.js";import{d as r,t}from"./p-4d6cad33.js";import{i as h}from"./p-1ecafb97.js";const o=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{width:100%;display:flex}.search-bar{box-sizing:border-box;height:40px;background-color:#FFFFFF;display:flex;flex-direction:row;align-items:center;width:100%;font-family:var(--ifx-font-family)}.search-bar.closed{display:flex;width:auto;justify-content:flex-start}.search-bar .search-bar-wrapper{display:flex;align-items:center;gap:16px;width:100%}.search-bar .search-bar-wrapper a{text-decoration:none;font-size:1rem;font-style:normal;font-weight:600;line-height:1.5rem;color:#0A8276;cursor:pointer}.search-bar .search-bar-wrapper ifx-search-field{width:100%}.search-bar .search-bar__icon-wrapper{display:none;flex-direction:row;align-items:center}.search-bar .search-bar__icon-wrapper ifx-icon:hover{cursor:pointer}.search-bar.closed .search-bar__icon-wrapper{display:flex}.search-bar.closed .search-bar-wrapper{display:none}';const c=o;const n=class{constructor(e){a(this,e);this.ifxInput=s(this,"ifxInput",7);this.ifxOpen=s(this,"ifxOpen",7);this.isOpen=true;this.disabled=false;this.autocomplete="on";this.handleCloseButton=()=>{this.internalState=!this.internalState;this.ifxOpen.emit(this.internalState)};this.handleFocus=()=>{this.internalState=true}}async onNavbarMobile(){this.ifxOpen.emit(false);this.internalState=false}handlePropChange(){this.internalState=this.isOpen}setInitialState(){this.internalState=this.isOpen}componentWillLoad(){this.setInitialState();this.ifxOpen.emit(this.internalState)}async componentDidLoad(){if(!h(this.el)){const a=r();t("ifx-search-bar",await a)}}handleInput(a){this.value=a.detail}render(){return e("div",{key:"c129da69eba4feb77402b4e556f754184713ccd5","aria-label":"a search bar","aria-disabled":this.disabled,class:`search-bar ${this.internalState?"open":"closed"}`},this.internalState?e("div",{class:"search-bar-wrapper"},e("ifx-search-field",{autocomplete:this.autocomplete,disabled:this.disabled,value:this.value,maxlength:this.maxlength,onIfxInput:this.handleInput.bind(this)},e("ifx-icon",{icon:"search-16",slot:"search-icon"})),e("a",{tabindex:"-1",href:"javascript:void(0)",onClick:this.handleCloseButton},"Close")):e("div",{class:"search-bar__icon-wrapper",onClick:this.handleCloseButton},e("ifx-icon",{icon:"search-16"})))}get el(){return i(this)}static get watchers(){return{isOpen:["handlePropChange"]}}};n.style=c;export{n as ifx_search_bar};
|
2
|
+
//# sourceMappingURL=p-b2dec2b5.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as t,h as a,a as r,g as s}from"./p-b7a462e5.js";import{d as i,t as o}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as t,h as a,a as r,g as s}from"./p-b7a462e5.js";import{d as i,t as o}from"./p-4d6cad33.js";import{i as l}from"./p-1ecafb97.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:flex;flex-direction:column;width:100%}.wrapper__label{color:#1D1D1D;font:400 1rem/1.5rem "Source Sans 3"}:host(.wrapper--disabled) .wrapper__label{color:#575352}.wrapper__textarea{width:100%}.wrapper__textarea.fullWidth{width:100%}.wrapper__textarea.fullWidth textarea{width:100%;box-sizing:border-box}.wrapper__textarea textarea{border:1px solid #8D8786;border-radius:1px;padding:8px 16px;background-color:#FFFFFF;color:#1D1D1D;font:400 1rem/1.5rem "Source Sans 3";transition:all 100ms ease;transition-property:border-color}.wrapper__textarea textarea:hover{border:1px solid #575352}.wrapper__textarea textarea:focus-within{outline:none;border:1px solid #0A8276}:host(.wrapper--error) .wrapper__textarea textarea{border:1px solid #CD002F}:host(.wrapper--disabled) .wrapper__textarea textarea{border:1px solid #575352;background-color:#EEEDED}.wrapper__caption{color:#1D1D1D;font:400 0.75rem/1rem "Source Sans 3"}:host(.wrapper--error) .wrapper__caption{color:#CD002F}:host(.wrapper--disabled) .wrapper__caption{color:#575352}';const p=d;const h=class{constructor(a){e(this,a);this.ifxInput=t(this,"ifxInput",7);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}this.inputId=`ifx-textarea-${++n}`;this.disabled=false;this.error=false;this.readOnly=false;this.resize="both";this.wrap="soft";this.fullWidth="false"}async reset(){this.resetTextarea()}handleComponentWidth(){const e=this.el.shadowRoot.querySelector(".wrapper__textarea");const t=this.fullWidth.toLowerCase()==="true";if(t){e.classList.add("fullWidth")}else if(e.classList.contains("fullWidth")){e.classList.remove("fullWidth")}}componentDidRender(){this.handleComponentWidth()}formResetCallback(){this.resetTextarea();this.internals.setFormValue("")}handleOnInput(e){this.value=e.target.value;this.internals.setFormValue(this.value);this.ifxInput.emit(this.value)}resetTextarea(){this.value="";this.internals.setValidity({});this.internals.setFormValue("")}componentWillLoad(){this.internals.setFormValue(this.value)}async componentDidLoad(){if(!l(this.el)){const e=i();o("ifx-textarea",await e)}}render(){var e,t;return a(r,{key:"5d8f337aa24751294c6f94e4c199651fd5d59b0c",class:`wrapper--${this.error?"error":""} wrapper--${this.disabled?"disabled":""}`},a("label",{key:"2cb9cca5352dca9e4d5f9143ce87f51a5594953f",class:"wrapper__label",htmlFor:this.inputId},(e=this.label)===null||e===void 0?void 0:e.trim()),a("div",{key:"fa29a96b97e124dfbee0387e63204d065a0382d7",class:"wrapper__textarea"},a("textarea",{key:"9db9f9989adf1f6d6b085d7013fa9da441a3adb8","aria-label":"a textarea","aria-value":this.value,"aria-disabled":this.disabled,id:this.inputId,style:{resize:this.resize},name:this.name?this.name:this.inputId,cols:this.cols,rows:this.rows,maxlength:this.maxlength,wrap:this.wrap,disabled:this.disabled,readonly:this.readOnly,placeholder:this.placeholder,value:this.value,onInput:e=>this.handleOnInput(e)})),((t=this.caption)===null||t===void 0?void 0:t.trim())&&a("div",{key:"56d4e39eb5677244ce10725c0b09a5e4ee9fd34d",class:"wrapper__caption"},this.caption.trim()))}static get formAssociated(){return true}get el(){return s(this)}};let n=0;h.style=p;export{h as ifx_textarea};
|
2
|
+
//# sourceMappingURL=p-b5c64f31.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,c as i,h as t,g as s}from"./p-b7a462e5.js";import{d as a,t as r}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,c as i,h as t,g as s}from"./p-b7a462e5.js";import{d as a,t as r}from"./p-4d6cad33.js";import{i as n}from"./p-1ecafb97.js";const h=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:block}.left-icon,.right-icon,.left-text,.right-text,.percentage-display{font-size:0.875rem;color:#575352;margin-left:8px}.left-icon.disabled,.right-icon.disabled,.left-text.disabled,.right-text.disabled,.percentage-display.disabled{color:#BFBBBB}.left-icon,.left-text{margin-right:8px}.right-icon,.right-text,.percentage-display{margin-left:8px}.ifx-slider{display:flex;align-items:center;padding:2px 16px;border-radius:9999px}.ifx-slider input[type=range]{-webkit-appearance:none;width:100%;height:4px;background:linear-gradient(to right, #0A8276 0%, #0A8276 var(--value-percent, 0%), #EEEDED var(--value-percent, 0%), #EEEDED 100%);outline:none;cursor:pointer;transition:0.2s}.ifx-slider input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#0A8276;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#0A8276;border-radius:50%;cursor:pointer;transition:box-shadow 0.2s}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:hover{background:#08665C}.ifx-slider input[type=range]:not(:disabled)::-webkit-slider-thumb:active{background:#06534B}.ifx-slider input[type=range]:disabled{background:#BFBBBB;cursor:default}.ifx-slider input[type=range]:disabled::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#BFBBBB;border-radius:50%;cursor:default}.ifx-slider .range-slider__wrapper{position:relative;width:100%;height:4px;display:flex;align-items:center;justify-content:center;margin:0px 2px;background:linear-gradient(to right, #EEEDED 0%, #EEEDED var(--min-value-percent, 100%), #0A8276 var(--min-value-percent, 100%), #0A8276 var(--max-value-percent, 100%), #EEEDED var(--max-value-percent, 100%), #EEEDED 100%)}.ifx-slider .range-slider__wrapper:has(input[type=range]:disabled){background:#BFBBBB}.ifx-slider .range-slider__wrapper input[type=range]{position:absolute;pointer-events:none;background:none}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-ms-thumb{-webkit-appearance:none;border:none;pointer-events:auto;cursor:pointer;box-shadow:0px 1px 2px rgba(0, 0, 0, 0.2)}.ifx-slider .range-slider__wrapper input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;border:none;background:none;width:100%}.ifx-slider .range-slider__wrapper input[type=range]::-moz-range-track{-webkit-appearance:none;border:none;background:none;width:100%}';const d=h;const l=class{constructor(t){e(this,t);this.ifxChange=i(this,"ifxChange",7);this.min=0;this.max=100;this.step=1;this.disabled=false;this.showPercentage=false;this.type="single";this.internalValue=0;this.percentage=0;this.internalMinValue=0;this.internalMaxValue=100}valueChanged(e){this.internalValue=e;this.updateValuePercent()}minValueChanged(e){this.internalMinValue=e;this.updateValuePercent()}maxValueChanged(e){this.internalMaxValue=e;this.updateValuePercent()}getRangeSliderWrapper(){const e=this.el.shadowRoot.querySelector(".range-slider__wrapper");return e}handleInputChangeOfRangeSlider(e){const i=e.target;if(parseFloat(this.maxInputRef.value)-parseFloat(this.minInputRef.value)<=0){if(i.id==="max-slider"){this.maxInputRef.value=this.minInputRef.value}else{this.minInputRef.value=this.maxInputRef.value}}if(i.id==="max-slider"){this.internalMaxValue=parseFloat(this.maxInputRef.value)}else{this.internalMinValue=parseFloat(this.minInputRef.value)}this.ifxChange.emit({minVal:this.internalMinValue,maxVal:this.internalMaxValue});this.updateValuePercent();this.updateZIndexIfRangeSlider(i.id)}handleOnMouseLeaveOfRangeSlider(e){const i=e.target;const t=this.getRangeSliderWrapper();if(i.id==="max-slider"){t.insertBefore(this.maxInputRef,this.minInputRef)}else{t.insertBefore(this.minInputRef,this.maxInputRef)}}calculatePercentageValue(){const e=(this.internalValue-this.min)*1;const i=this.max-this.min;this.percentage=+parseFloat(String(e/i*100)).toFixed(2)}handleInputChange(e){const i=e.target;this.internalValue=parseFloat(i.value);this.ifxChange.emit(this.internalValue);this.calculatePercentageValue();this.updateValuePercent()}roundToValidStep(e){const i=e-this.min;const t=i%this.step;if(t>=this.step/2){return this.min+i+(this.step-t)}else{return this.min+i-t}}updateValuePercent(){const e=this.max-this.min;if(this.type==="double"){if(this.minInputRef){const i=(this.roundToValidStep(this.internalMinValue)-this.min)*1;const t=i/e*100;this.minInputRef.parentElement.style.setProperty("--min-value-percent",`${t}%`)}if(this.maxInputRef){const i=(this.roundToValidStep(this.internalMaxValue)-this.min)*1;const t=i/e*100;this.maxInputRef.parentElement.style.setProperty("--max-value-percent",`${t}%`)}}else{if(this.inputRef){const e=(this.roundToValidStep(this.internalValue)-this.min)*1;const i=this.max-this.min;const t=e/i*100;this.inputRef.style.setProperty("--value-percent",`${t}%`)}}}updateZIndexIfRangeSlider(e=""){if(e==="max-slider"){this.minInputRef.style.zIndex="1";this.maxInputRef.style.zIndex="2"}else{this.minInputRef.style.zIndex="2";this.maxInputRef.style.zIndex="1"}}componentWillLoad(){if(this.value===undefined){this.internalValue=(this.max-this.min)/2}else{this.internalValue=Math.max(this.min,Math.min(this.max,this.value))}this.calculatePercentageValue();if(this.minValueHandle!==undefined)this.internalMinValue=this.minValueHandle;else this.internalMinValue=this.min;if(this.maxValueHandle!==undefined)this.internalMaxValue=this.maxValueHandle;else this.internalMaxValue=this.max}async componentDidLoad(){if(!n(this.el)){const e=a();r("ifx-slider",await e)}this.updateValuePercent()}render(){return t("div",{key:"ff3c40899b2e05636fb6f7ea79527b01cb401ad9",class:"ifx-slider"},this.leftText&&t("span",{key:"3baec228b5c07dcbb3647dd97876c90c7797f1ee",class:`left-text`},this.leftText),this.leftIcon&&t("ifx-icon",{key:"9a96cd6332fb7be8d0ce1b92f4ee1fba75da12b3",icon:this.leftIcon,class:`left-icon${this.disabled?" disabled":""}`}),this.type!=="double"?t("input",{type:"range",min:this.min,max:this.max,step:this.step,value:this.internalValue,disabled:this.disabled,ref:e=>this.inputRef=e,onInput:e=>this.handleInputChange(e),"aria-label":"a slider","aria-value":this.value,"aria-disabled":this.disabled}):t("div",{class:"range-slider__wrapper","aria-label":"a range slider","aria-value":this.value,"aria-disabled":this.disabled},t("input",{id:"min-slider",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMinValue,disabled:this.disabled,ref:e=>this.minInputRef=e,onInput:e=>this.handleInputChangeOfRangeSlider(e),onMouseUp:e=>this.handleOnMouseLeaveOfRangeSlider(e)}),t("input",{id:"max-slider",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMaxValue,disabled:this.disabled,ref:e=>this.maxInputRef=e,onInput:e=>this.handleInputChangeOfRangeSlider(e),onMouseUp:e=>this.handleOnMouseLeaveOfRangeSlider(e)})),this.rightIcon&&t("ifx-icon",{key:"d3f68ac4993a1237566c2bb244ab003bb4c13c31",icon:this.rightIcon,class:`right-icon${this.disabled?" disabled":""}`}),this.rightText&&t("span",{key:"c5de67ea034d390f5e80cbc344ee674408294701",class:`right-text${this.disabled?" disabled":""}`},this.rightText),this.showPercentage&&this.type!=="double"&&t("span",{key:"30790091e000ca3d4d0db206aa32a2a53b4f6cbf",class:`percentage-display${this.disabled?" disabled":""}`},this.percentage,"%"))}get el(){return s(this)}static get watchers(){return{value:["valueChanged"],minValueHandle:["minValueChanged"],maxValueHandle:["maxValueChanged"]}}};l.style=d;export{l as ifx_slider};
|
2
|
+
//# sourceMappingURL=p-cfdbbfea.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as e,h as s,g as t}from"./p-b7a462e5.js";import{d as l,t as a}from"./p-acbfa625.js";import{i as o}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1D1D1D}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#CD002F}.upload-dropzone{border:1px dashed #BFBBBB;padding:40px;text-align:center;cursor:pointer;color:#1D1D1D;transition:border-color 0.3s ease;border-radius:1px;background:#FFFFFF}.upload-dropzone ifx-icon{color:#0A8276}.upload-dropzone:hover{border:1px dashed #8D8786}.upload-dropzone.drag-over{border:1px solid #0A8276;background:#F7F7F7}.upload-dropzone.drag-over.error{border:1px solid #0A8276}.upload-dropzone.error{border-color:#CD002F}.disabled .upload-dropzone{pointer-events:none;border-color:#BFBBBB;color:#BFBBBB}.disabled .upload-dropzone ifx-icon{color:#BFBBBB}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0em;color:#1D1D1D;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#CD002F}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#CD002F;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #BFBBBB;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0A8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4CA460}.upload-failed{border-color:#CD002F}.upload-failed .file-status{color:#CD002F;margin-left:0}';const n=r;const h=class{constructor(s){i(this,s);this.ifxFileUploadAdd=e(this,"ifxFileUploadAdd",7);this.ifxFileUploadRemove=e(this,"ifxFileUploadRemove",7);this.ifxFileUploadChange=e(this,"ifxFileUploadChange",7);this.ifxFileUploadError=e(this,"ifxFileUploadError",7);this.ifxFileUploadInvalid=e(this,"ifxFileUploadInvalid",7);this.ifxFileUploadStart=e(this,"ifxFileUploadStart",7);this.ifxFileUploadComplete=e(this,"ifxFileUploadComplete",7);this.ifxFileUploadAllComplete=e(this,"ifxFileUploadAllComplete",7);this.ifxFileUploadAbort=e(this,"ifxFileUploadAbort",7);this.ifxFileUploadDrop=e(this,"ifxFileUploadDrop",7);this.ifxFileUploadClick=e(this,"ifxFileUploadClick",7);this.ifxFileUploadMaxFilesExceeded=e(this,"ifxFileUploadMaxFilesExceeded",7);this.ifxFileUploadValidation=e(this,"ifxFileUploadValidation",7);this.ifxFileUploadRetry=e(this,"ifxFileUploadRetry",7);this.dragAndDrop=false;this.required=false;this.disabled=false;this.maxFileSizeMB=7;this.allowedFileTypes=["jpg","jpeg","png","pdf","mov","mp3","mp4"];this.additionalAllowedFileTypes=[];this.label="Label";this.labelRequiredError="At least one file must be uploaded";this.labelBrowseFiles="Browse files";this.labelDragAndDrop="Drag & Drop or browse files to upload";this.labelUploadedFilesHeading="Uploaded files";this.labelFileTooLarge="Upload failed. Max file size: {{size}}MB.";this.labelUnsupportedFileType="Unsupported file type.";this.labelUploaded="Successfully uploaded";this.labelUploadFailed="Upload failed. Please try again.";this.labelSupportedFormatsTemplate="Supported file formats: {{types}}. Max file size: {{size}}MB.";this.labelFileSingular="file";this.labelFilePlural="files";this.labelMaxFilesInfo="Up to {{count}} {{files}}.";this.labelMaxFilesExceeded="Upload limit exceeded. Only {{count}} {{files}} allowed.";this.ariaLabelBrowseFiles="Browse files";this.ariaLabelDropzone="Upload area. Click to browse or drag and drop files.";this.ariaLabelFileInput="Upload file";this.ariaLabelRemoveFile="Remove file";this.ariaLabelCancelUpload="Cancel upload";this.ariaLabelRetryUpload="Retry upload";this.ariaLabelUploadingStatus="Upload in progress";this.ariaLabelUploadedStatus="Upload completed";this.ariaLabelUploadFailedStatus="Upload failed";this.internalId=`ifx-file-upload-${Math.random().toString(36).substr(2,9)}`;this.isDragOver=false;this.files=[];this.uploadTasks=[];this.rejectedSizeFiles=[];this.rejectedTypeFiles=[];this.requiredError=false;this.statusMessage=null;this.fileInputEl=null;this.extensionToMimeMap={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",txt:"text/plain",csv:"text/csv",json:"application/json",mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm",zip:"application/zip",rar:"application/vnd.rar",tar:"application/x-tar",gz:"application/gzip",xml:"application/xml",html:"text/html",css:"text/css",js:"application/javascript"}}get maxFiles(){return this._maxFiles}set maxFiles(i){if(typeof i==="number"&&i<1){console.warn("Invalid `maxFiles` value. Must be >= 1. Value ignored.");this._maxFiles=undefined}else{this._maxFiles=i}}validateRequired(){var i,e;if(this.required&&this.files.length===0){this.requiredError=true;if(((i=this.statusMessage)===null||i===void 0?void 0:i.text)!==this.labelRequiredError){this.statusMessage={type:"error",text:this.labelRequiredError}}this.ifxFileUploadValidation.emit({valid:false})}else{this.requiredError=false;if(((e=this.statusMessage)===null||e===void 0?void 0:e.text)===this.labelRequiredError){this.statusMessage=null}this.ifxFileUploadValidation.emit({valid:true})}}pluralize(i){return i===1?this.labelFileSingular:this.labelFilePlural}getNormalizedFileTypes(){if(Array.isArray(this.allowedFileTypes)){return this.allowedFileTypes}try{return JSON.parse(this.allowedFileTypes)}catch(i){return this.allowedFileTypes.split(",").map((i=>i.trim()))}}getLabelFromMimeType(i){for(const[e,s]of Object.entries(this.extensionToMimeMap)){if(s===i){return e.toUpperCase()}}return i}handleFileChange(i){const e=i.target;if(!e.files)return;this.processFiles(e.files)}handleDrop(i){var e;if(this.disabled)return;i.preventDefault();i.stopPropagation();this.isDragOver=false;if((e=i.dataTransfer)===null||e===void 0?void 0:e.files){const e=Array.from(i.dataTransfer.files);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];e.forEach((i=>{const e=s.includes(i.type);const a=i.size<=this.maxFileSizeMB*1024*1024;if(e&&a)t.push(i);else l.push(i)}));this.ifxFileUploadDrop.emit({droppedFiles:e,acceptedFiles:t,rejectedFiles:l});this.processFiles(i.dataTransfer.files)}}handleDragOver(i){if(this.disabled)return;i.preventDefault();this.isDragOver=true}handleDragLeave(i){if(this.disabled)return;i.preventDefault();this.isDragOver=false}processFiles(i){const e=Array.from(i);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];const a=[];e.forEach((i=>{const e=s.includes(i.type);const o=i.size<=this.maxFileSizeMB*1024*1024;const r=this.files.some((e=>e.name===i.name&&e.size===i.size));if(r){this.ifxFileUploadInvalid.emit({file:i,reason:"duplicate"});this.ifxFileUploadError.emit({file:i,errorType:"duplicate",message:`File "${i.name}" is already added`,reason:"duplicate"});return}if(e&&o){t.push(i)}else{if(!e){a.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-type"})}if(!o){l.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-size"})}this.ifxFileUploadError.emit({file:i,errorType:!e?"invalid-type":"file-too-large",message:"Invalid file rejected",reason:!e?"unsupported-type":"file-too-large"})}}));this.rejectedSizeFiles=[...this.rejectedSizeFiles,...l];this.rejectedTypeFiles=[...this.rejectedTypeFiles,...a];if(this.maxFiles&&this.files.length+t.length>this.maxFiles){const i=this.maxFiles-this.files.length;const e=t.slice(0,Math.max(i,0));const s=t.slice(i);this.files=[...this.files,...e];e.forEach((i=>this.startUpload(i)));if(e.length>0){this.ifxFileUploadAdd.emit({addedFiles:e,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}s.forEach((i=>{this.ifxFileUploadInvalid.emit({file:i,reason:"too-many-files"});this.ifxFileUploadError.emit({file:i,errorType:"too-many-files",message:`Upload limit exceeded. Max ${this.maxFiles} files allowed.`,reason:"too-many-files"})}));if(s.length>0){this.statusMessage={type:"error",text:this.labelMaxFilesExceeded.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",this.pluralize(this.maxFiles))};this.ifxFileUploadMaxFilesExceeded.emit({maxFiles:this.maxFiles,attempted:this.files.length+t.length})}return}t.forEach((i=>this.startUpload(i)));this.files=[...this.files,...t];if(t.length>0){this.ifxFileUploadAdd.emit({addedFiles:t,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}this.validateRequired()}retryUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){this.uploadTasks.splice(e,1);this.uploadTasks=[...this.uploadTasks]}this.ifxFileUploadRetry.emit({file:i});this.startUpload(i)}startUpload(i){this.ifxFileUploadStart.emit({file:i});const e={file:i,progress:3,intervalId:null,completed:false};this.uploadTasks=[...this.uploadTasks,e];if(this.uploadHandler){this.uploadHandler(i,(i=>{if(i>e.progress){e.progress=Math.min(100,i);this.uploadTasks=[...this.uploadTasks]}})).then((()=>{e.progress=100;e.completed=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}})).catch((()=>{e.error=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadError.emit({file:i,errorType:"upload-failed",message:"Upload handler rejected file",reason:"custom"})}))}else{const s=i.size;const t=1e5;let l=0;e.intervalId=window.setInterval((()=>{l+=t/5;const a=Math.min(100,Math.round(l/s*100));e.progress=a;this.uploadTasks=[...this.uploadTasks];if(a>=100){clearInterval(e.intervalId);e.completed=true;e.intervalId=null;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}}}),200)}this.uploadTasks=[...this.uploadTasks,e]}cancelUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){const i=this.uploadTasks[e];if((i===null||i===void 0?void 0:i.intervalId)!==null){clearInterval(i.intervalId)}this.uploadTasks=this.uploadTasks.filter(((i,s)=>s!==e))}this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadAbort.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.fileInputEl){this.fileInputEl.value=""}this.validateRequired()}removeFile(i){var e;this.uploadTasks=this.uploadTasks.filter((e=>e.file.name!==i.name));this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadRemove.emit({removedFile:i,files:this.files});this.ifxFileUploadChange.emit({files:this.files});this.validateRequired();if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles&&((e=this.statusMessage)===null||e===void 0?void 0:e.text)!==this.labelRequiredError){this.statusMessage=null}}clearRejectedFile(i,e){if(e==="size"){this.rejectedSizeFiles=this.rejectedSizeFiles.filter((e=>e!==i))}else{this.rejectedTypeFiles=this.rejectedTypeFiles.filter((e=>e!==i))}if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles){this.statusMessage=null}this.validateRequired()}splitFileNameParts(i){const e=i.name;const s=e.lastIndexOf(".");if(s===-1)return{base:e,ext:""};return{base:e.substring(0,s),ext:e.substring(s)}}getFileIcon(i){var e;const s=(e=i.name.split(".").pop())===null||e===void 0?void 0:e.toLowerCase();switch(s){case"pdf":return"file-pdf-16";case"jpg":case"jpeg":return"file-jpg-16";case"png":return"file-png-16";case"mov":return"file-mov-16";case"mp3":return"file-mp3-16";case"mp4":return"file-mp4-16";default:return"file-16"}}formatSize(i){if(i>=1024*1024*1024){return`${(i/(1024*1024*1024)).toFixed(1)} GB`}else if(i>=1024*1024){return`${(i/(1024*1024)).toFixed(1)} MB`}else if(i>=1024){return`${(i/1024).toFixed(0)} KB`}else{return`${i} B`}}getAcceptAttribute(){const i=this.getNormalizedFileTypes().map((i=>"."+i.toLowerCase()));const e=this.getAdditionalMimeTypes();return[...i,...e].join(",")}getFormattedProgressText(i){const e=Math.round(i.progress/100*i.file.size);const s=this.formatSize(e);const t=this.formatSize(i.file.size);return`${s} / ${t} uploaded`}getAdditionalMimeTypes(){if(!this.additionalAllowedFileTypes)return[];if(Array.isArray(this.additionalAllowedFileTypes))return this.additionalAllowedFileTypes;return this.additionalAllowedFileTypes.split(",").map((i=>i.trim()))}getSupportedFileText(){const i=this.getNormalizedFileTypes().map((i=>i.toUpperCase()));const e=this.getAdditionalMimeTypes().map((i=>this.getLabelFromMimeType(i)));const s=[...i,...e];const t=s.join(", ");let l=this.labelSupportedFormatsTemplate.replace("{{types}}",t).replace("{{size}}",this.maxFileSizeMB.toString());if(this.labelMaxFilesInfo&&this.maxFiles){const i=this.pluralize(this.maxFiles);const e=this.labelMaxFilesInfo.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",i);l+=` ${e}`}return l}getFormattedFileTooLargeText(){return this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())}renderStatusMessage(){if(!this.statusMessage)return null;return s("div",{class:`file-upload-status file-upload-status__${this.statusMessage.type}`},this.statusMessage.type==="error"&&s("ifx-icon",{icon:"c-warning-16"}),this.statusMessage.text)}isInputDisabled(){return this.disabled||this.maxFiles!==undefined&&this.files.length>=this.maxFiles}async componentDidLoad(){if(!o(this.hostElement)){const i=l();a("ifx-file-upload",await i)}if(this.hostElement.hasAttribute("show-demo-states")){this.showDemoStates=true}if(this.showDemoStates){this.injectDemoState()}}async injectDemoState(){const i=new Array(5e4).fill("a").join("");const e=i+i;const s=new File([i],"Image.jpg",{type:"image/jpeg"});const t=new File([e],"File.pdf",{type:"application/pdf"});const l=new File([i],"Text.docx",{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"});const a=new File([e+e+e],"Video.mp4",{type:"video/mp4"});const o=new File(["demo"],"Script.exe",{type:"application/x-msdownload"});this.files=[t,s,l];this.uploadTasks=[{file:t,progress:100,intervalId:null,completed:true},{file:s,progress:40,intervalId:null,completed:false},{file:l,progress:80,intervalId:null,completed:false,error:true}];this.rejectedSizeFiles=[a.name];this.rejectedTypeFiles=[o.name]}async triggerDemoValidation(){this.validateRequired()}render(){return s("div",{key:"f98ff0d0152f1b8f2d7a96f4b4860a9836398dfe",class:{"file-upload-wrapper":true,disabled:this.disabled}},this.label&&s("label",{key:"2639246e2dc34728aa25c44ba7a9c4786f56552c",class:"file-upload-label",htmlFor:this.internalId},this.label,this.required&&s("span",{key:"2b0a0e62e815f75b5a2e5d7ac886a809ad46d031",class:`required ${this.requiredError?"error":""}`},"*")),this.dragAndDrop?this.renderDragAndDropArea():this.renderUploadArea(),(this.files.length>0||this.rejectedSizeFiles.length>0||this.rejectedTypeFiles.length>0)&&s("div",{key:"d32153fac7ad16ed56ca6d388032883ba31355ea",class:"file-list-wrapper"},s("div",{key:"b3f72dc0e9b46933b192f31a98dd6eb2d3778bef",class:"upload-heading"},this.labelUploadedFilesHeading),s("ul",{key:"23b8539f0d7d38a9c434d95a10eee392d57b2b23",class:"file-list"},this.rejectedSizeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-size-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"size")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())},this.getFormattedFileTooLargeText())))))),this.rejectedTypeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-type-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"type")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelUnsupportedFileType},this.labelUnsupportedFileType)))))),this.files.map((i=>{var e;const t=this.uploadTasks.find((e=>e.file.name===i.name));const l=(e=t===null||t===void 0?void 0:t.progress)!==null&&e!==void 0?e:100;const a=t&&!t.completed;const o=(t===null||t===void 0?void 0:t.error)===true;const r=o?"file-item upload-failed":a?"file-item uploading":"file-item upload-success";const n=`${i.name}-${i.size}`;const{base:h,ext:d}=this.splitFileNameParts(i);return s("li",{class:r,key:n},s("div",{class:"file-icon"},s("ifx-icon",{icon:this.getFileIcon(i)})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},h),s("span",{class:"file-name-ext"},d)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"refresh-16",size:"s","aria-label":this.ariaLabelRetryUpload,onClick:()=>this.retryUpload(i),style:{display:o?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"cross-16",size:"s","aria-label":this.ariaLabelCancelUpload,onClick:()=>this.cancelUpload(i),style:{display:a?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.removeFile(i),style:{display:!a?"inline-flex":"none"}}))),s("div",{class:"file-middle-row"},a&&t&&!t.error&&s("span",{class:"file-uploading","aria-label":this.ariaLabelUploadingStatus},this.getFormattedProgressText(t)),!a&&!o&&s("span",null,s("span",{class:"file-size"},this.formatSize(i.size)),s("span",{class:"file-status","aria-label":this.ariaLabelUploadedStatus},s("ifx-icon",{icon:"check-16"}),this.labelUploaded)),o&&s("span",{class:"file-status","aria-label":this.ariaLabelUploadFailedStatus},this.labelUploadFailed)),a&&t&&!t.error&&s("div",{class:"file-progress-row"},s("ifx-progress-bar",{size:"s",value:l,"show-label":"true"}))))})))))}renderUploadArea(){const i=i=>{this.fileInputEl=i};return s("div",{class:{"upload-button":true}},s("ifx-button",{variant:"secondary",onClick:()=>{var i;return(i=this.fileInputEl)===null||i===void 0?void 0:i.click()},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelBrowseFiles},s("ifx-icon",{icon:"upload-16"}),this.labelBrowseFiles),s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),style:{display:"none"},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}),s("p",{class:"file-upload-info"},this.getSupportedFileText()),this.renderStatusMessage())}renderDragAndDropArea(){const i=i=>{this.fileInputEl=i};const e=()=>{if(this.fileInputEl){this.fileInputEl.click()}};return s("div",{class:{disabled:this.isInputDisabled()}},s("div",{class:{"upload-dropzone":true,"drag-over":this.isDragOver,error:this.requiredError},onClick:e,onDragOver:i=>this.handleDragOver(i),onDragLeave:i=>this.handleDragLeave(i),onDrop:i=>this.handleDrop(i),role:"button",tabIndex:0,"aria-label":this.ariaLabelDropzone},s("ifx-icon",{icon:"upload-16",class:"custom-icon"}),s("p",null,this.labelDragAndDrop),s("p",{class:"file-upload-info"},this.getSupportedFileText()),s("div",{style:{height:"0px",overflow:"hidden"}},s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}))),this.renderStatusMessage())}get hostElement(){return t(this)}};h.style=n;export{h as ifx_file_upload};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as e,h as s,g as t}from"./p-b7a462e5.js";import{d as l,t as a}from"./p-4d6cad33.js";import{i as o}from"./p-1ecafb97.js";const r=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{font-family:var(--ifx-font-family, sans-serif)}.file-upload-wrapper{display:flex;flex-direction:column}.file-upload-wrapper.disabled{pointer-events:none}.file-upload-wrapper.disabled label,.file-upload-wrapper.disabled .file-upload-info{color:#575352}.file-upload-label{font-style:normal;font-weight:400;font-size:1rem;line-height:1.5rem;color:#1D1D1D}.file-upload-label .required{display:inline-block;margin-left:4px}.file-upload-label .required.error{color:#CD002F}.upload-dropzone{border:1px dashed #BFBBBB;padding:40px;text-align:center;cursor:pointer;color:#1D1D1D;transition:border-color 0.3s ease;border-radius:1px;background:#FFFFFF}.upload-dropzone ifx-icon{color:#0A8276}.upload-dropzone:hover{border:1px dashed #8D8786}.upload-dropzone.drag-over{border:1px solid #0A8276;background:#F7F7F7}.upload-dropzone.drag-over.error{border:1px solid #0A8276}.upload-dropzone.error{border-color:#CD002F}.disabled .upload-dropzone{pointer-events:none;border-color:#BFBBBB;color:#BFBBBB}.disabled .upload-dropzone ifx-icon{color:#BFBBBB}.upload-dropzone input{display:none}.file-upload-info{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0em;color:#1D1D1D;margin:0;margin-top:4px}.file-upload-status{font-style:normal;font-weight:400;font-size:0.75rem;line-height:1rem;letter-spacing:0.2px;margin-top:8px}.file-upload-status.file-upload-status__error{display:flex;align-items:center;color:#CD002F}.file-upload-status.file-upload-status__error ifx-icon{position:relative;top:-1px;color:#CD002F;margin-right:8px}.upload-heading{font:600 1.125rem/1.625rem "Source Sans 3";margin-bottom:8px}.file-list-wrapper{margin-top:16px}.file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px}.file-item{border:1px solid #BFBBBB;padding-top:12px;padding-right:16px;padding-bottom:8px;padding-left:16px;display:flex;gap:8px}.file-info{width:100%;min-width:0}.file-top-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:-8px}.file-top-row ifx-icon{flex-shrink:0}.file-name-wrapper{display:flex;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;font-weight:400;font-size:0.875rem}.file-name-base{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}.file-name-ext{flex-shrink:0;margin-left:0}.file-middle-row{display:flex;align-items:center;font-size:0.75rem;line-height:1rem;flex-wrap:wrap;color:#575352}.file-middle-row .file-status{margin-left:12px}.file-middle-row .file-status ifx-icon{margin-right:8px}.file-progress-row{margin-top:4px}.file-progress-row ifx-progress-bar{width:100%}.upload-success{border-color:#0A8276}.upload-success .file-status ifx-icon{position:relative;top:1px;color:#4CA460}.upload-failed{border-color:#CD002F}.upload-failed .file-status{color:#CD002F;margin-left:0}';const n=r;const h=class{constructor(s){i(this,s);this.ifxFileUploadAdd=e(this,"ifxFileUploadAdd",7);this.ifxFileUploadRemove=e(this,"ifxFileUploadRemove",7);this.ifxFileUploadChange=e(this,"ifxFileUploadChange",7);this.ifxFileUploadError=e(this,"ifxFileUploadError",7);this.ifxFileUploadInvalid=e(this,"ifxFileUploadInvalid",7);this.ifxFileUploadStart=e(this,"ifxFileUploadStart",7);this.ifxFileUploadComplete=e(this,"ifxFileUploadComplete",7);this.ifxFileUploadAllComplete=e(this,"ifxFileUploadAllComplete",7);this.ifxFileUploadAbort=e(this,"ifxFileUploadAbort",7);this.ifxFileUploadDrop=e(this,"ifxFileUploadDrop",7);this.ifxFileUploadClick=e(this,"ifxFileUploadClick",7);this.ifxFileUploadMaxFilesExceeded=e(this,"ifxFileUploadMaxFilesExceeded",7);this.ifxFileUploadValidation=e(this,"ifxFileUploadValidation",7);this.ifxFileUploadRetry=e(this,"ifxFileUploadRetry",7);this.dragAndDrop=false;this.required=false;this.disabled=false;this.maxFileSizeMB=7;this.allowedFileTypes=["jpg","jpeg","png","pdf","mov","mp3","mp4"];this.additionalAllowedFileTypes=[];this.label="Label";this.labelRequiredError="At least one file must be uploaded";this.labelBrowseFiles="Browse files";this.labelDragAndDrop="Drag & Drop or browse files to upload";this.labelUploadedFilesHeading="Uploaded files";this.labelFileTooLarge="Upload failed. Max file size: {{size}}MB.";this.labelUnsupportedFileType="Unsupported file type.";this.labelUploaded="Successfully uploaded";this.labelUploadFailed="Upload failed. Please try again.";this.labelSupportedFormatsTemplate="Supported file formats: {{types}}. Max file size: {{size}}MB.";this.labelFileSingular="file";this.labelFilePlural="files";this.labelMaxFilesInfo="Up to {{count}} {{files}}.";this.labelMaxFilesExceeded="Upload limit exceeded. Only {{count}} {{files}} allowed.";this.ariaLabelBrowseFiles="Browse files";this.ariaLabelDropzone="Upload area. Click to browse or drag and drop files.";this.ariaLabelFileInput="Upload file";this.ariaLabelRemoveFile="Remove file";this.ariaLabelCancelUpload="Cancel upload";this.ariaLabelRetryUpload="Retry upload";this.ariaLabelUploadingStatus="Upload in progress";this.ariaLabelUploadedStatus="Upload completed";this.ariaLabelUploadFailedStatus="Upload failed";this.internalId=`ifx-file-upload-${Math.random().toString(36).substr(2,9)}`;this.isDragOver=false;this.files=[];this.uploadTasks=[];this.rejectedSizeFiles=[];this.rejectedTypeFiles=[];this.requiredError=false;this.statusMessage=null;this.fileInputEl=null;this.extensionToMimeMap={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",txt:"text/plain",csv:"text/csv",json:"application/json",mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm",zip:"application/zip",rar:"application/vnd.rar",tar:"application/x-tar",gz:"application/gzip",xml:"application/xml",html:"text/html",css:"text/css",js:"application/javascript"}}get maxFiles(){return this._maxFiles}set maxFiles(i){if(typeof i==="number"&&i<1){console.warn("Invalid `maxFiles` value. Must be >= 1. Value ignored.");this._maxFiles=undefined}else{this._maxFiles=i}}validateRequired(){var i,e;if(this.required&&this.files.length===0){this.requiredError=true;if(((i=this.statusMessage)===null||i===void 0?void 0:i.text)!==this.labelRequiredError){this.statusMessage={type:"error",text:this.labelRequiredError}}this.ifxFileUploadValidation.emit({valid:false})}else{this.requiredError=false;if(((e=this.statusMessage)===null||e===void 0?void 0:e.text)===this.labelRequiredError){this.statusMessage=null}this.ifxFileUploadValidation.emit({valid:true})}}pluralize(i){return i===1?this.labelFileSingular:this.labelFilePlural}getNormalizedFileTypes(){if(Array.isArray(this.allowedFileTypes)){return this.allowedFileTypes}try{return JSON.parse(this.allowedFileTypes)}catch(i){return this.allowedFileTypes.split(",").map((i=>i.trim()))}}getLabelFromMimeType(i){for(const[e,s]of Object.entries(this.extensionToMimeMap)){if(s===i){return e.toUpperCase()}}return i}handleFileChange(i){const e=i.target;if(!e.files)return;this.processFiles(e.files)}handleDrop(i){var e;if(this.disabled)return;i.preventDefault();i.stopPropagation();this.isDragOver=false;if((e=i.dataTransfer)===null||e===void 0?void 0:e.files){const e=Array.from(i.dataTransfer.files);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];e.forEach((i=>{const e=s.includes(i.type);const a=i.size<=this.maxFileSizeMB*1024*1024;if(e&&a)t.push(i);else l.push(i)}));this.ifxFileUploadDrop.emit({droppedFiles:e,acceptedFiles:t,rejectedFiles:l});this.processFiles(i.dataTransfer.files)}}handleDragOver(i){if(this.disabled)return;i.preventDefault();this.isDragOver=true}handleDragLeave(i){if(this.disabled)return;i.preventDefault();this.isDragOver=false}processFiles(i){const e=Array.from(i);const s=[...this.getNormalizedFileTypes().map((i=>this.extensionToMimeMap[i.toLowerCase()])).filter(Boolean),...this.getAdditionalMimeTypes()];const t=[];const l=[];const a=[];e.forEach((i=>{const e=s.includes(i.type);const o=i.size<=this.maxFileSizeMB*1024*1024;const r=this.files.some((e=>e.name===i.name&&e.size===i.size));if(r){this.ifxFileUploadInvalid.emit({file:i,reason:"duplicate"});this.ifxFileUploadError.emit({file:i,errorType:"duplicate",message:`File "${i.name}" is already added`,reason:"duplicate"});return}if(e&&o){t.push(i)}else{if(!e){a.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-type"})}if(!o){l.push(i.name);this.ifxFileUploadInvalid.emit({file:i,reason:"invalid-size"})}this.ifxFileUploadError.emit({file:i,errorType:!e?"invalid-type":"file-too-large",message:"Invalid file rejected",reason:!e?"unsupported-type":"file-too-large"})}}));this.rejectedSizeFiles=[...this.rejectedSizeFiles,...l];this.rejectedTypeFiles=[...this.rejectedTypeFiles,...a];if(this.maxFiles&&this.files.length+t.length>this.maxFiles){const i=this.maxFiles-this.files.length;const e=t.slice(0,Math.max(i,0));const s=t.slice(i);this.files=[...this.files,...e];e.forEach((i=>this.startUpload(i)));if(e.length>0){this.ifxFileUploadAdd.emit({addedFiles:e,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}s.forEach((i=>{this.ifxFileUploadInvalid.emit({file:i,reason:"too-many-files"});this.ifxFileUploadError.emit({file:i,errorType:"too-many-files",message:`Upload limit exceeded. Max ${this.maxFiles} files allowed.`,reason:"too-many-files"})}));if(s.length>0){this.statusMessage={type:"error",text:this.labelMaxFilesExceeded.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",this.pluralize(this.maxFiles))};this.ifxFileUploadMaxFilesExceeded.emit({maxFiles:this.maxFiles,attempted:this.files.length+t.length})}return}t.forEach((i=>this.startUpload(i)));this.files=[...this.files,...t];if(t.length>0){this.ifxFileUploadAdd.emit({addedFiles:t,files:this.files});this.ifxFileUploadChange.emit({files:this.files})}this.validateRequired()}retryUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){this.uploadTasks.splice(e,1);this.uploadTasks=[...this.uploadTasks]}this.ifxFileUploadRetry.emit({file:i});this.startUpload(i)}startUpload(i){this.ifxFileUploadStart.emit({file:i});const e={file:i,progress:3,intervalId:null,completed:false};this.uploadTasks=[...this.uploadTasks,e];if(this.uploadHandler){this.uploadHandler(i,(i=>{if(i>e.progress){e.progress=Math.min(100,i);this.uploadTasks=[...this.uploadTasks]}})).then((()=>{e.progress=100;e.completed=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}})).catch((()=>{e.error=true;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadError.emit({file:i,errorType:"upload-failed",message:"Upload handler rejected file",reason:"custom"})}))}else{const s=i.size;const t=1e5;let l=0;e.intervalId=window.setInterval((()=>{l+=t/5;const a=Math.min(100,Math.round(l/s*100));e.progress=a;this.uploadTasks=[...this.uploadTasks];if(a>=100){clearInterval(e.intervalId);e.completed=true;e.intervalId=null;this.uploadTasks=[...this.uploadTasks];this.ifxFileUploadComplete.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.uploadTasks.every((i=>i.completed))){this.ifxFileUploadAllComplete.emit({files:this.files})}}}),200)}this.uploadTasks=[...this.uploadTasks,e]}cancelUpload(i){const e=this.uploadTasks.findIndex((e=>e.file.name===i.name));if(e!==-1){const i=this.uploadTasks[e];if((i===null||i===void 0?void 0:i.intervalId)!==null){clearInterval(i.intervalId)}this.uploadTasks=this.uploadTasks.filter(((i,s)=>s!==e))}this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadAbort.emit({file:i});this.ifxFileUploadChange.emit({files:this.files});if(this.fileInputEl){this.fileInputEl.value=""}this.validateRequired()}removeFile(i){var e;this.uploadTasks=this.uploadTasks.filter((e=>e.file.name!==i.name));this.files=this.files.filter((e=>e.name!==i.name));this.ifxFileUploadRemove.emit({removedFile:i,files:this.files});this.ifxFileUploadChange.emit({files:this.files});this.validateRequired();if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles&&((e=this.statusMessage)===null||e===void 0?void 0:e.text)!==this.labelRequiredError){this.statusMessage=null}}clearRejectedFile(i,e){if(e==="size"){this.rejectedSizeFiles=this.rejectedSizeFiles.filter((e=>e!==i))}else{this.rejectedTypeFiles=this.rejectedTypeFiles.filter((e=>e!==i))}if(this.fileInputEl){this.fileInputEl.value=""}if(this.maxFiles&&this.files.length<this.maxFiles){this.statusMessage=null}this.validateRequired()}splitFileNameParts(i){const e=i.name;const s=e.lastIndexOf(".");if(s===-1)return{base:e,ext:""};return{base:e.substring(0,s),ext:e.substring(s)}}getFileIcon(i){var e;const s=(e=i.name.split(".").pop())===null||e===void 0?void 0:e.toLowerCase();switch(s){case"pdf":return"file-pdf-16";case"jpg":case"jpeg":return"file-jpg-16";case"png":return"file-png-16";case"mov":return"file-mov-16";case"mp3":return"file-mp3-16";case"mp4":return"file-mp4-16";default:return"file-16"}}formatSize(i){if(i>=1024*1024*1024){return`${(i/(1024*1024*1024)).toFixed(1)} GB`}else if(i>=1024*1024){return`${(i/(1024*1024)).toFixed(1)} MB`}else if(i>=1024){return`${(i/1024).toFixed(0)} KB`}else{return`${i} B`}}getAcceptAttribute(){const i=this.getNormalizedFileTypes().map((i=>"."+i.toLowerCase()));const e=this.getAdditionalMimeTypes();return[...i,...e].join(",")}getFormattedProgressText(i){const e=Math.round(i.progress/100*i.file.size);const s=this.formatSize(e);const t=this.formatSize(i.file.size);return`${s} / ${t} uploaded`}getAdditionalMimeTypes(){if(!this.additionalAllowedFileTypes)return[];if(Array.isArray(this.additionalAllowedFileTypes))return this.additionalAllowedFileTypes;return this.additionalAllowedFileTypes.split(",").map((i=>i.trim()))}getSupportedFileText(){const i=this.getNormalizedFileTypes().map((i=>i.toUpperCase()));const e=this.getAdditionalMimeTypes().map((i=>this.getLabelFromMimeType(i)));const s=[...i,...e];const t=s.join(", ");let l=this.labelSupportedFormatsTemplate.replace("{{types}}",t).replace("{{size}}",this.maxFileSizeMB.toString());if(this.labelMaxFilesInfo&&this.maxFiles){const i=this.pluralize(this.maxFiles);const e=this.labelMaxFilesInfo.replace("{{count}}",this.maxFiles.toString()).replace("{{files}}",i);l+=` ${e}`}return l}getFormattedFileTooLargeText(){return this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())}renderStatusMessage(){if(!this.statusMessage)return null;return s("div",{class:`file-upload-status file-upload-status__${this.statusMessage.type}`},this.statusMessage.type==="error"&&s("ifx-icon",{icon:"c-warning-16"}),this.statusMessage.text)}isInputDisabled(){return this.disabled||this.maxFiles!==undefined&&this.files.length>=this.maxFiles}async componentDidLoad(){if(!o(this.hostElement)){const i=l();a("ifx-file-upload",await i)}if(this.hostElement.hasAttribute("show-demo-states")){this.showDemoStates=true}if(this.showDemoStates){this.injectDemoState()}}async injectDemoState(){const i=new Array(5e4).fill("a").join("");const e=i+i;const s=new File([i],"Image.jpg",{type:"image/jpeg"});const t=new File([e],"File.pdf",{type:"application/pdf"});const l=new File([i],"Text.docx",{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"});const a=new File([e+e+e],"Video.mp4",{type:"video/mp4"});const o=new File(["demo"],"Script.exe",{type:"application/x-msdownload"});this.files=[t,s,l];this.uploadTasks=[{file:t,progress:100,intervalId:null,completed:true},{file:s,progress:40,intervalId:null,completed:false},{file:l,progress:80,intervalId:null,completed:false,error:true}];this.rejectedSizeFiles=[a.name];this.rejectedTypeFiles=[o.name]}async triggerDemoValidation(){this.validateRequired()}render(){return s("div",{key:"f98ff0d0152f1b8f2d7a96f4b4860a9836398dfe",class:{"file-upload-wrapper":true,disabled:this.disabled}},this.label&&s("label",{key:"2639246e2dc34728aa25c44ba7a9c4786f56552c",class:"file-upload-label",htmlFor:this.internalId},this.label,this.required&&s("span",{key:"2b0a0e62e815f75b5a2e5d7ac886a809ad46d031",class:`required ${this.requiredError?"error":""}`},"*")),this.dragAndDrop?this.renderDragAndDropArea():this.renderUploadArea(),(this.files.length>0||this.rejectedSizeFiles.length>0||this.rejectedTypeFiles.length>0)&&s("div",{key:"d32153fac7ad16ed56ca6d388032883ba31355ea",class:"file-list-wrapper"},s("div",{key:"b3f72dc0e9b46933b192f31a98dd6eb2d3778bef",class:"upload-heading"},this.labelUploadedFilesHeading),s("ul",{key:"23b8539f0d7d38a9c434d95a10eee392d57b2b23",class:"file-list"},this.rejectedSizeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-size-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"size")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelFileTooLarge.replace("{{size}}",this.maxFileSizeMB.toString())},this.getFormattedFileTooLargeText())))))),this.rejectedTypeFiles.map((i=>s("li",{class:"file-item upload-failed",key:`rejected-type-${i}`},s("div",{class:"file-icon"},s("ifx-icon",{icon:"file-16"})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},this.splitFileNameParts({name:i}).base),s("span",{class:"file-name-ext"},this.splitFileNameParts({name:i}).ext)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.clearRejectedFile(i,"type")}))),s("div",{class:"file-middle-row"},s("span",{class:"file-status","aria-label":this.labelUnsupportedFileType},this.labelUnsupportedFileType)))))),this.files.map((i=>{var e;const t=this.uploadTasks.find((e=>e.file.name===i.name));const l=(e=t===null||t===void 0?void 0:t.progress)!==null&&e!==void 0?e:100;const a=t&&!t.completed;const o=(t===null||t===void 0?void 0:t.error)===true;const r=o?"file-item upload-failed":a?"file-item uploading":"file-item upload-success";const n=`${i.name}-${i.size}`;const{base:h,ext:d}=this.splitFileNameParts(i);return s("li",{class:r,key:n},s("div",{class:"file-icon"},s("ifx-icon",{icon:this.getFileIcon(i)})),s("div",{class:"file-info"},s("div",{class:"file-top-row"},s("span",{class:"file-name-wrapper"},s("span",{class:"file-name-base"},h),s("span",{class:"file-name-ext"},d)),s("div",{class:"file-actions"},s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"refresh-16",size:"s","aria-label":this.ariaLabelRetryUpload,onClick:()=>this.retryUpload(i),style:{display:o?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"cross-16",size:"s","aria-label":this.ariaLabelCancelUpload,onClick:()=>this.cancelUpload(i),style:{display:a?"inline-flex":"none"}}),s("ifx-icon-button",{shape:"square",variant:"tertiary",icon:"delete-forever-16",size:"s","aria-label":this.ariaLabelRemoveFile,onClick:()=>this.removeFile(i),style:{display:!a?"inline-flex":"none"}}))),s("div",{class:"file-middle-row"},a&&t&&!t.error&&s("span",{class:"file-uploading","aria-label":this.ariaLabelUploadingStatus},this.getFormattedProgressText(t)),!a&&!o&&s("span",null,s("span",{class:"file-size"},this.formatSize(i.size)),s("span",{class:"file-status","aria-label":this.ariaLabelUploadedStatus},s("ifx-icon",{icon:"check-16"}),this.labelUploaded)),o&&s("span",{class:"file-status","aria-label":this.ariaLabelUploadFailedStatus},this.labelUploadFailed)),a&&t&&!t.error&&s("div",{class:"file-progress-row"},s("ifx-progress-bar",{size:"s",value:l,"show-label":"true"}))))})))))}renderUploadArea(){const i=i=>{this.fileInputEl=i};return s("div",{class:{"upload-button":true}},s("ifx-button",{variant:"secondary",onClick:()=>{var i;return(i=this.fileInputEl)===null||i===void 0?void 0:i.click()},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelBrowseFiles},s("ifx-icon",{icon:"upload-16"}),this.labelBrowseFiles),s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),style:{display:"none"},disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}),s("p",{class:"file-upload-info"},this.getSupportedFileText()),this.renderStatusMessage())}renderDragAndDropArea(){const i=i=>{this.fileInputEl=i};const e=()=>{if(this.fileInputEl){this.fileInputEl.click()}};return s("div",{class:{disabled:this.isInputDisabled()}},s("div",{class:{"upload-dropzone":true,"drag-over":this.isDragOver,error:this.requiredError},onClick:e,onDragOver:i=>this.handleDragOver(i),onDragLeave:i=>this.handleDragLeave(i),onDrop:i=>this.handleDrop(i),role:"button",tabIndex:0,"aria-label":this.ariaLabelDropzone},s("ifx-icon",{icon:"upload-16",class:"custom-icon"}),s("p",null,this.labelDragAndDrop),s("p",{class:"file-upload-info"},this.getSupportedFileText()),s("div",{style:{height:"0px",overflow:"hidden"}},s("input",{id:this.internalId,ref:i,type:"file",accept:this.getAcceptAttribute(),multiple:true,onChange:i=>this.handleFileChange(i),disabled:this.isInputDisabled(),"aria-label":this.ariaLabelFileInput}))),this.renderStatusMessage())}get hostElement(){return t(this)}};h.style=n;export{h as ifx_file_upload};
|
2
|
+
//# sourceMappingURL=p-ddfa1876.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as r,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as a}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as r,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as a}from"./p-4d6cad33.js";import{i as n}from"./p-1ecafb97.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex;--_ifx-fallback-display:none !important}._ifx-radiobutton-fallback{display:var(--_ifx-fallback-display);position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;border:0 !important}.radioButton__container{box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;padding:0px;gap:8px;cursor:pointer;font-family:var(--ifx-font-family)}.radioButton__container.m .radioButton__wrapper{width:24px;height:24px}.radioButton__container .radioButton__wrapper{width:20px;height:20px;position:relative;display:block;border-radius:50%;background-color:#FFFFFF;border:1px solid #575352}.radioButton__container .radioButton__wrapper:focus{outline:none}.radioButton__container .radioButton__wrapper:focus::before{content:"";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:50%;left:50%;transform:translate(-50%, -50%);border:2px solid #0A8276;border-radius:50%}.radioButton__container .radioButton__wrapper .radioButton__wrapper-mark{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background-color:#0A8276;border-radius:50%;display:flex;justify-content:center;align-items:center;border-color:transparent}.radioButton__container .radioButton__wrapper:hover{background-color:#EEEDED}.radioButton__container .radioButton__wrapper.disabled{background-color:#BFBBBB;border-color:#BFBBBB}.radioButton__container .radioButton__wrapper.disabled.error:hover,.radioButton__container .radioButton__wrapper.disabled.error:focus-visible{border-color:#CD002F}.radioButton__container .radioButton__wrapper.checked{border-color:#0A8276}.radioButton__container .radioButton__wrapper.checked::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:10px;height:10px;background-color:#0A8276;border-radius:50%}.radioButton__container .radioButton__wrapper.checked.disabled::after{background-color:#BFBBBB}.radioButton__container .radioButton__wrapper.checked:hover{border-color:#08665C}.radioButton__container .radioButton__wrapper.checked:hover .radioButton__wrapper-mark{background-color:#08665C}.radioButton__container .radioButton__wrapper.checked.disabled{background-color:#FFFFFF;border-color:#BFBBBB}.radioButton__container .radioButton__wrapper.checked.disabled.disabled::after{background-color:#BFBBBB}.radioButton__container .radioButton__wrapper.checked.disabled .radioButton__wrapper-mark{background-color:#BFBBBB}.radioButton__container .radioButton__wrapper.checked.error::after{border-color:#CD002F;background-color:#CD002F}.radioButton__container .radioButton__wrapper.error:not(.disabled){border-color:#CD002F}.radioButton__container .radioButton__wrapper.error:not(.disabled):hover,.radioButton__container .radioButton__wrapper.error:not(.disabled):focus-visible{border-color:#CD002F}.radioButton__container .label{display:flex;align-items:center;height:20px;font-style:normal;font-weight:400;font-size:0.875rem;line-height:1.25rem;color:#1D1D1D;flex:none;order:1;flex-grow:0}.radioButton__container .label.label-m{height:24px;font-size:1rem;line-height:1.5rem}.radioButton__container .label.disabled{color:#BFBBBB}.radioButton__container .label:hover{cursor:pointer}';const s=d;const c=class{constructor(o){t(this,o);this.ifxChange=r(this,"ifxChange",7);this.ifxError=r(this,"ifxError",7);this.disabled=false;this.error=false;this.size="s";this.internalChecked=false;this.hasSlot=false}componentWillLoad(){this.fallbackInput=document.createElement("input");this.fallbackInput.type="radio";this.fallbackInput.hidden=true;this.fallbackInput.className="_ifx-radiobutton-fallback";this.fallbackInput.style.cssText=`\n display: none !important;\n position: absolute !important;\n opacity: 0 !important;\n pointer-events: none !important;\n width: 0 !important;\n height: 0 !important;\n `;this.fallbackInput.setAttribute("aria-hidden","true");this.fallbackInput.tabIndex=-1;this.el.appendChild(this.fallbackInput);if("attachInternals"in HTMLElement.prototype){try{this.internals=this.el.attachInternals()}catch(t){console.warn("ElementInternals not supported")}}this.internalChecked=this.checked||false;this.hasSlot=!!this.el.querySelector("[slot]")||this.el.innerHTML.trim()!==""}async componentDidLoad(){if(!n(this.el)){const t=e();a("ifx-radio-button",await t)}}handleCheckedChange(t){this.internalChecked=t}updateFormValue(){var t;if((t=this.internals)===null||t===void 0?void 0:t.setFormValue){this.internals.setFormValue(this.internalChecked?this.value:null)}this.fallbackInput.checked=this.internalChecked;this.fallbackInput.name=this.name;this.fallbackInput.value=this.value;this.fallbackInput.disabled=this.disabled}errorChanged(t,r){if(t!==r){this.ifxError.emit(t)}}handleRadioButtonClick(t){if(this.disabled){t.stopPropagation();return}this.inputElement.click();this.internalChecked=this.inputElement.checked;this.checked=this.internalChecked;this.ifxChange.emit(this.internalChecked);const r=new CustomEvent("change",{bubbles:true,composed:true,detail:{checked:this.internalChecked}});this.el.dispatchEvent(r)}handleKeyDown(t){if([" ","Enter"].includes(t.key)){t.preventDefault();this.handleRadioButtonClick(new PointerEvent("click"))}}handleExternalChange(t){const r=t.target;if(r===this.el||r.tagName.toLowerCase()!=="ifx-radio-button")return;if(r.getAttribute("name")===this.name){this.internalChecked=false}}render(){return o("div",{key:"dff8c4d9020b1f126930910e9d9319574c6002b5",role:"radio","aria-checked":String(this.internalChecked),"aria-disabled":String(this.disabled),class:`radioButton__container ${this.size} ${this.disabled?"disabled":""}`,onClick:t=>this.handleRadioButtonClick(t),tabindex:this.disabled?-1:0},o("div",{key:"4f16ae3a8febd02a1d490fce0ceda6d25c9937d9",class:`radioButton__wrapper \n ${this.internalChecked?"checked":""} \n ${this.disabled?"disabled":""} \n ${this.error?"error":""}`},this.internalChecked&&o("div",{key:"1e5989189f34b56d73facf431e222401fc8efdc1",class:"radioButton__wrapper-mark"})),this.hasSlot&&o("div",{key:"bc6de8675f5682cd867faf26363da025606bf25d",class:`label ${this.size==="m"?"label-m":""} ${this.disabled?"disabled":""}`},o("slot",{key:"3517baf1ff4751af0c0fc3b50a0130b619758dd7"})),o("input",{key:"676bb357209466062e8d6f50d4d7abb8a725b832",type:"radio",hidden:true,ref:t=>this.inputElement=t,name:this.name,value:this.value,checked:this.internalChecked,disabled:this.disabled,onClick:t=>t.stopPropagation()}))}static get formAssociated(){return true}get el(){return i(this)}static get watchers(){return{checked:["handleCheckedChange"],internalChecked:["updateFormValue"],error:["errorChanged"]}}};c.style=s;export{c as ifx_radio_button};
|
2
|
+
//# sourceMappingURL=p-df32c417.entry.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as s}from"./p-acbfa625.js";import{i as a}from"./p-1ecafb97.js";import{c as l}from"./p-e459974a.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=d;const n=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}async componentDidLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",await t)}const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"a7b1021268e1e43b3509782190c52cb21c2bd385","aria-label":"a tooltip showing important information","aria-value":this.header,class:"tooltip__container"},o("slot",{key:"848fddbd2e59502ca63807910557a59b177f6672"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"7956e1e39f6a652a2457422372ae0ff73a5919a2",class:t},o("button",{key:"b24ac3733ab008f85f5d79bc867ad4010b6dd2b3","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"a6474ad816014c79ff21587cc5b44cbe70fbd7d1",icon:"cross16"})),o("div",{key:"8e6665ab97253d389e06fbbec3201b9717600453",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"85c17ff2ba04c39fdea6ab2adcf5f2e7a5178ee6",class:"tooltip-dismissible-header"},this.header),o("div",{key:"da50415bf5939918f3fc1790a6d9edb8ba2d053e",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"8516de02f6927c304e32853a672ebc0fd503cd38",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"6f47fce411dd561eadb00d8cfba12e191baa8004",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"59238e32c5049da194b784529c926087510ef663",class:i},this.text,o("svg",{key:"169f10ff00d21ac337a148cc56384fbe77500f97",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"67675acb21065c84acdb7b4d1b5b04df6d959ecb",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"084c9ac3ab4a3b8e597cb5c8ce53a8829fd2948d",class:e},o("slot",{key:"494813ce9c54de42b7d5413442087e4854f5449d",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"813a456b0893535aaa9c903022a943ce271b951c",class:"tooltip-extended-content"},this.header&&o("div",{key:"69491bc50b4e33ef1bb2bb394c79cd6cd52e55fa",class:"tooltip-extended-header"},this.header),o("div",{key:"c15938c852bad97d893980d395633fef9309b0aa",class:"tooltip-extended-body"},this.text)),o("svg",{key:"7f28962cace43e3a84fe388022fc88199212a4be",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"13ca40717e99168601e7d2df77e1bcb1e6771bd7",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};n.style=p;export{n as ifx_tooltip};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,h as o,g as i}from"./p-b7a462e5.js";import{d as e,t as s}from"./p-4d6cad33.js";import{i as a}from"./p-1ecafb97.js";import{c as l}from"./p-e459974a.js";const d=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{display:inline-flex}.tooltip__container{display:inline-flex;flex-direction:column;position:relative;font-family:var(--ifx-font-family)}.tooltip-extended,.tooltip-compact,.tooltip-dismissible{background-color:#1D1D1D;border:1px solid black;z-index:1080;display:none;transition:opacity 0.3s;position:absolute;font-size:14px;font-style:normal;font-weight:400;line-height:20px;color:#FFFFFF;width:max-content;box-sizing:border-box;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.visible.tooltip-extended,.visible.tooltip-compact,.visible.tooltip-dismissible{display:flex !important;align-items:start}.tooltip-dismissible .close-button{all:unset;cursor:pointer;position:relative;order:2;margin-top:12px;margin-right:12px;line-height:0px}.tooltip-dismissible .tooltip-dismissible-content{display:flex;flex-direction:column;gap:12px;padding:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-dismissible .tooltip-dismissible-header,.tooltip-dismissible .tooltip-dismissible-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-dismissible .tooltip-dismissible-header{font-weight:600}.tooltip-dismissible .tooltip-dismissible-body{font-weight:400}.tooltip-compact{padding:4px 8px;text-align:center;flex-grow:1}.tooltip-extended{align-items:center;padding:12px;gap:10px}.tooltip-extended .extended_icon{display:flex;align-self:flex-start;align-items:center;cursor:pointer}.tooltip-extended .tooltip-extended-content{display:flex;flex-direction:column;gap:12px;flex-grow:1;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}.tooltip-extended .tooltip-extended-header,.tooltip-extended .tooltip-extended-body{font-size:14px;font-style:normal;line-height:20px}.tooltip-extended .tooltip-extended-header{font-weight:600}.tooltip-extended .tooltip-extended-body{font-weight:400}.tooltip__container .tooltip-arrow-svg{position:absolute;width:8px;height:8px}[data-placement=top].tooltip-extended>.tooltip-arrow-svg,[data-placement=top].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:50%;transform:rotate(180deg) translateX(-50%)}[data-placement=top-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-start].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;left:10px;transform:rotate(180deg)}[data-placement=top-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=top-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=top-end].tooltip-compact>.tooltip-arrow-svg{bottom:-7px;right:10px;transform:rotate(180deg)}[data-placement=bottom].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:50%;transform:translateX(-50%)}[data-placement=bottom-start].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-start].tooltip-compact>.tooltip-arrow-svg{top:-7px;left:10px}[data-placement=bottom-end].tooltip-extended>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=bottom-end].tooltip-compact>.tooltip-arrow-svg{top:-7px;right:10px}[data-placement=left].tooltip-extended>.tooltip-arrow-svg,[data-placement=left].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=left].tooltip-compact>.tooltip-arrow-svg{right:-3px;top:50%;transform:rotate(90deg) translateY(-50%) translateX(-50%)}[data-placement=right].tooltip-extended>.tooltip-arrow-svg,[data-placement=right].tooltip-dismissible>.tooltip-arrow-svg,[data-placement=right].tooltip-compact>.tooltip-arrow-svg{left:-3px;top:50%;transform:rotate(270deg) translateY(-50%) translateX(50%)}.tooltip-compact{min-width:28px !important;max-width:145px !important}.tooltip-dismissible{min-width:145px !important;max-width:310px !important}.tooltip-extended{min-width:145px !important;max-width:310px !important}';const p=d;const n=class{constructor(o){t(this,o);this.tooltipVisible=false;this.header="";this.text="";this.position="auto";this.internalPosition="auto";this.variant="compact";this.popperInstance=null;this.onMouseEnter=()=>{var t,o;(t=this.popperInstance)===null||t===void 0?void 0:t.setOptions((t=>Object.assign(Object.assign({},t),{modifiers:[...t.modifiers,{name:"eventListeners",enabled:true}]})));this.initializePopper();this.tooltipVisible=true;this.tooltipEl.style.display="block";(o=this.popperInstance)===null||o===void 0?void 0:o.update()};this.onMouseLeave=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"};this.onClick=()=>{var t;if(this.variant.toLowerCase()==="dismissible"){this.initializePopper();this.tooltipVisible=!this.tooltipVisible;this.tooltipEl.style.display=this.tooltipVisible?"block":"none";(t=this.popperInstance)===null||t===void 0?void 0:t.update()}};this.onDismissClick=()=>{this.tooltipVisible=false;this.tooltipEl.style.display="none"}}componentWillLoad(){if(this.variant.toLowerCase().trim()===""){this.variant="compact"}}async componentDidLoad(){if(!a(this.el)){const t=e();s("ifx-tooltip",await t)}const t=this.el.shadowRoot.querySelector(".tooltip__container").firstChild;if(this.variant.toLowerCase()==="compact"||this.variant.toLowerCase()==="extended"){t.addEventListener("mouseenter",this.onMouseEnter);t.addEventListener("mouseleave",this.onMouseLeave)}else{t.addEventListener("click",this.onClick)}}initializePopper(){if(this.popperInstance)return;this.referenceEl=this.el;if(this.variant.toLowerCase()==="compact"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-compact")}else if(this.variant.toLowerCase()==="dismissible"){this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-dismissible")}else{this.tooltipEl=this.el.shadowRoot.querySelector(".tooltip-extended")}const t=this.position==="auto"?this.determineBestPosition():this.position;this.internalPosition=t;if(this.tooltipEl&&this.referenceEl){this.popperInstance=l(this.referenceEl,this.tooltipEl,{placement:this.internalPosition,modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:".tooltip-arrow-svg"}}]})}this.tooltipEl.setAttribute("data-placement",t)}determineBestPosition(){const t=this.referenceEl.getBoundingClientRect();const o=window.scrollY;const i=window.scrollX;const e=t.top+o+t.height/2;const s=t.left+i+t.width/2;if(this.position==="auto"){if(e>window.innerHeight/2){if(s>window.innerWidth/2){return"top-end"}else{return"top-start"}}else{if(s>window.innerWidth/2){return"bottom-end"}else{return"bottom-start"}}}else{return this.position}}positionChanged(t){var o;this.internalPosition=t;(o=this.popperInstance)===null||o===void 0?void 0:o.destroy();this.popperInstance=null}disconnectedCallback(){var t;(t=this.popperInstance)===null||t===void 0?void 0:t.destroy()}render(){const t={"tooltip-dismissible":true,visible:this.tooltipVisible};const i={"tooltip-compact":true,visible:this.tooltipVisible};const e={"tooltip-extended":true,visible:this.tooltipVisible};return o("div",{key:"a7b1021268e1e43b3509782190c52cb21c2bd385","aria-label":"a tooltip showing important information","aria-value":this.header,class:"tooltip__container"},o("slot",{key:"848fddbd2e59502ca63807910557a59b177f6672"}),this.variant.toLowerCase()==="dismissible"&&o("div",{key:"7956e1e39f6a652a2457422372ae0ff73a5919a2",class:t},o("button",{key:"b24ac3733ab008f85f5d79bc867ad4010b6dd2b3","aria-label":"Close Tooltip",class:"close-button",onClick:this.onDismissClick},o("ifx-icon",{key:"a6474ad816014c79ff21587cc5b44cbe70fbd7d1",icon:"cross16"})),o("div",{key:"8e6665ab97253d389e06fbbec3201b9717600453",class:"tooltip-dismissible-content"},this.header&&o("div",{key:"85c17ff2ba04c39fdea6ab2adcf5f2e7a5178ee6",class:"tooltip-dismissible-header"},this.header),o("div",{key:"da50415bf5939918f3fc1790a6d9edb8ba2d053e",class:"tooltip-dismissible-body"},this.text)),o("svg",{key:"8516de02f6927c304e32853a672ebc0fd503cd38",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"6f47fce411dd561eadb00d8cfba12e191baa8004",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="compact"&&o("div",{key:"59238e32c5049da194b784529c926087510ef663",class:i},this.text,o("svg",{key:"169f10ff00d21ac337a148cc56384fbe77500f97",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"67675acb21065c84acdb7b4d1b5b04df6d959ecb",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))),this.variant.toLowerCase()==="extended"&&o("div",{key:"084c9ac3ab4a3b8e597cb5c8ce53a8829fd2948d",class:e},o("slot",{key:"494813ce9c54de42b7d5413442087e4854f5449d",name:"icon"},this.icon?o("div",{class:"extended_icon"},o("ifx-icon",{icon:this.icon})):o("svg",{class:"extended_icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},o("path",{stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round",d:"M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z"}),o("path",{stroke:"#fff",d:"M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z"}),o("path",{fill:"#fff",d:"M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}))),o("div",{key:"813a456b0893535aaa9c903022a943ce271b951c",class:"tooltip-extended-content"},this.header&&o("div",{key:"69491bc50b4e33ef1bb2bb394c79cd6cd52e55fa",class:"tooltip-extended-header"},this.header),o("div",{key:"c15938c852bad97d893980d395633fef9309b0aa",class:"tooltip-extended-body"},this.text)),o("svg",{key:"7f28962cace43e3a84fe388022fc88199212a4be",class:"tooltip-arrow-svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"13ca40717e99168601e7d2df77e1bcb1e6771bd7",id:"Indicator",d:"M6 0L12 8L0 8L6 0Z",fill:"#1D1D1D"}))))}get el(){return i(this)}static get watchers(){return{position:["positionChanged"]}}};n.style=p;export{n as ifx_tooltip};
|
2
|
+
//# sourceMappingURL=p-df61f325.entry.js.map
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as i,h as o,a as t,g as a}from"./p-b7a462e5.js";import{d as f,t as n}from"./p-4d6cad33.js";import{i as r}from"./p-1ecafb97.js";const e=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}.ifx-notification__wrapper{display:flex;flex-direction:row;align-items:center;padding:8px 16px;background-color:#FFFFFF;font-family:var(--ifx-font-family);color:#1D1D1D;border:1px solid #EEEDED}.ifx-notification__wrapper.ifx-notification__wrapper--success{border-left:4px solid #4CA460}.ifx-notification__wrapper.ifx-notification__wrapper--success .ifx-notification__icon{color:#4CA460}.ifx-notification__wrapper.ifx-notification__wrapper--locked{border-left:4px solid #E16B25}.ifx-notification__wrapper.ifx-notification__wrapper--locked .ifx-notification__icon{color:#E16B25}.ifx-notification__wrapper.ifx-notification__wrapper--error{border-left:4px solid #CD002F}.ifx-notification__wrapper.ifx-notification__wrapper--error .ifx-notification__icon{color:#CD002F}.ifx-notification__wrapper.ifx-notification__wrapper--neutral{border-left:4px solid #0A8276}.ifx-notification__wrapper.ifx-notification__wrapper--neutral .ifx-notification__icon{color:#0A8276}.ifx-notification__wrapper .ifx-notification__icon{margin-right:8px;display:flex;align-self:center}.ifx-notification__wrapper .ifx-notification__body{display:flex;flex-direction:row;flex-grow:1;font-size:0.875rem}.ifx-notification__wrapper .ifx-notification__body .ifx-notification__slot{flex-grow:1;display:inline-flex;align-items:center}.ifx-notification__wrapper .ifx-notification__link{font-size:0.875rem}@media (max-width: 576px){.ifx-notification__wrapper .ifx-notification__icon{align-self:flex-start}.ifx-notification__wrapper .ifx-notification__body{flex-direction:column}.ifx-notification__wrapper .ifx-notification__link{margin-top:8px}}';const c=e;const _=class{constructor(o){i(this,o);this.variant="success";this.linkTarget="_blank"}async componentDidLoad(){if(!r(this.el)){const i=f();n("ifx-notification",await i)}}getClassName(){switch(this.variant){case"success":return"ifx-notification__wrapper--success";case"locked":return"ifx-notification__wrapper--locked";case"error":return"ifx-notification__wrapper--error";case"neutral":return"ifx-notification__wrapper--neutral";default:return"ifx-notification__wrapper--success"}}render(){return o(t,{key:"81f48868a45824d7cc3cf4ab88ae15caa8bb8274"},o("div",{key:"90b9e5e0255e699c03e3232200fb818819c6a9f1",class:"ifx-notification__wrapper "+this.getClassName()},o("div",{key:"a121fbd9b45af103898ab81e9f6224810103457d",class:"ifx-notification__icon"},o("ifx-icon",{key:"a904abb250db4aa1ba1a60f33a830d1c771da8dd",icon:this.icon})),o("div",{key:"6c22def40f54257c69a9fb6fb5b421407e1b5f3d",class:"ifx-notification__body"},o("div",{key:"172b9db08ff23a1cee72aebf09a413170f971262",class:"ifx-notification__slot"},o("slot",{key:"eb8cc961fac50461852b516685304e988c441084"})),this.linkText&&this.linkHref&&o("div",{key:"0afdf5e89080ef748ff66ce0280506a254db3614",class:"ifx-notification__link"},o("ifx-link",{key:"0acd73d2210c11012470e91378a9d116cd78d05a",href:this.linkHref,target:this.linkTarget},this.linkText,o("ifx-icon",{key:"45c502771cfea94708e11690ac42b30f5acc2327",icon:"arrow-right-16"}))))))}get el(){return a(this)}};_.style=c;export{_ as ifx_notification};
|
2
|
+
//# sourceMappingURL=p-e0dd18fe.entry.js.map
|
package/dist/infineon-design-system-stencil/{p-e5c87a08.entry.js.map → p-e0dd18fe.entry.js.map}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["notificationCss","IfxNotificationStyle0","Notification","constructor","hostRef","this","variant","linkTarget","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","getClassName","render","h","Host","key","class","icon","linkText","linkHref","href","target"],"sources":["src/components/notification/notification.scss?tag=ifx-notification&encapsulation=shadow","src/components/notification/notification.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.ifx-notification__wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n\n background-color: tokens.$ifxColorBaseWhite;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n color: tokens.$ifxColorBaseBlack;\n\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering200;\n\n &.ifx-notification__wrapper--success {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorGreen500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorGreen500;\n }\n }\n\n &.ifx-notification__wrapper--locked {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorOrange500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorOrange500;\n }\n }\n\n &.ifx-notification__wrapper--error {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorRed500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorRed500;\n }\n }\n\n &.ifx-notification__wrapper--neutral{\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorOcean500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorOcean500;\n }\n }\n\n & .ifx-notification__icon {\n margin-right: tokens.$ifxSpace100;\n display: flex;\n align-self: center;\n }\n\n & .ifx-notification__body {\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n font-size: tokens.$ifxFontSizeS;\n\n & .ifx-notification__slot {\n flex-grow: 1;\n display: inline-flex;\n align-items: center;\n }\n }\n\n & .ifx-notification__link {\n font-size: tokens.$ifxFontSizeS;\n }\n\n @media (max-width: tokens.$ifxBreakpointXs) {\n & .ifx-notification__icon {\n align-self: flex-start;\n }\n\n & .ifx-notification__body {\n flex-direction: column;\n }\n\n & .ifx-notification__link {\n margin-top: tokens.$ifxSpace100;\n }\n }\n}","import { Component, h, Host, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nexport type NotificationVariant = 'success' | 'locked' | 'error' | 'neutral';\n\n@Component({\n tag: 'ifx-notification',\n styleUrl: 'notification.scss',\n shadow: true\n})\nexport class Notification {\n @Element() el;\n @Prop() icon: string;\n @Prop() variant: NotificationVariant = 'success';\n @Prop() linkText: string; \n @Prop() linkHref: string;\n @Prop() linkTarget: string = '_blank';\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-notification', await framework)\n }\n }\n\n private getClassName(): string {\n switch (this.variant) {\n case 'success':\n return 'ifx-notification__wrapper--success';\n case 'locked':\n return 'ifx-notification__wrapper--locked';\n case 'error':\n return 'ifx-notification__wrapper--error';\n case 'neutral':\n return 'ifx-notification__wrapper--neutral';\n default:\n return 'ifx-notification__wrapper--success';\n }\n }\n\n render() {\n return (\n <Host>\n <div class={\"ifx-notification__wrapper \" + this.getClassName()}>\n <div class=\"ifx-notification__icon\">\n <ifx-icon icon={this.icon}></ifx-icon>\n </div>\n <div class=\"ifx-notification__body\">\n <div class=\"ifx-notification__slot\">\n <slot/>\n </div>\n { this.linkText && this.linkHref && \n <div class=\"ifx-notification__link\">\n <ifx-link href={this.linkHref} target={this.linkTarget}>\n {this.linkText}<ifx-icon icon=\"arrow-right-16\">\n </ifx-icon>\n </ifx-link>\n </div>\n }\n </div>\n </div>\n </Host>\n );\n }\n}"],"mappings":"
|
1
|
+
{"version":3,"names":["notificationCss","IfxNotificationStyle0","Notification","constructor","hostRef","this","variant","linkTarget","componentDidLoad","isNestedInIfxComponent","el","framework","detectFramework","trackComponent","getClassName","render","h","Host","key","class","icon","linkText","linkHref","href","target"],"sources":["src/components/notification/notification.scss?tag=ifx-notification&encapsulation=shadow","src/components/notification/notification.tsx"],"sourcesContent":["@use \"~@infineon/design-system-tokens/dist/tokens\";\n@use \"../../global/font.scss\";\n\n.ifx-notification__wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n\n padding: tokens.$ifxSpace100 tokens.$ifxSpace200;\n\n background-color: tokens.$ifxColorBaseWhite;\n font-family: var(--ifx-font-family); // tokens.$ifxFontFamilyBody;\n\n\n color: tokens.$ifxColorBaseBlack;\n\n border: tokens.$ifxBorderWidth12 solid tokens.$ifxColorEngineering200;\n\n &.ifx-notification__wrapper--success {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorGreen500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorGreen500;\n }\n }\n\n &.ifx-notification__wrapper--locked {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorOrange500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorOrange500;\n }\n }\n\n &.ifx-notification__wrapper--error {\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorRed500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorRed500;\n }\n }\n\n &.ifx-notification__wrapper--neutral{\n border-left: tokens.$ifxBorderWidth50 solid tokens.$ifxColorOcean500;\n\n & .ifx-notification__icon {\n color: tokens.$ifxColorOcean500;\n }\n }\n\n & .ifx-notification__icon {\n margin-right: tokens.$ifxSpace100;\n display: flex;\n align-self: center;\n }\n\n & .ifx-notification__body {\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n font-size: tokens.$ifxFontSizeS;\n\n & .ifx-notification__slot {\n flex-grow: 1;\n display: inline-flex;\n align-items: center;\n }\n }\n\n & .ifx-notification__link {\n font-size: tokens.$ifxFontSizeS;\n }\n\n @media (max-width: tokens.$ifxBreakpointXs) {\n & .ifx-notification__icon {\n align-self: flex-start;\n }\n\n & .ifx-notification__body {\n flex-direction: column;\n }\n\n & .ifx-notification__link {\n margin-top: tokens.$ifxSpace100;\n }\n }\n}","import { Component, h, Host, Prop, Element } from '@stencil/core';\nimport { trackComponent } from '../../global/utils/tracking';\nimport { isNestedInIfxComponent } from '../../global/utils/dom-utils';\nimport { detectFramework } from '../../global/utils/framework-detection';\nexport type NotificationVariant = 'success' | 'locked' | 'error' | 'neutral';\n\n@Component({\n tag: 'ifx-notification',\n styleUrl: 'notification.scss',\n shadow: true\n})\nexport class Notification {\n @Element() el;\n @Prop() icon: string;\n @Prop() variant: NotificationVariant = 'success';\n @Prop() linkText: string; \n @Prop() linkHref: string;\n @Prop() linkTarget: string = '_blank';\n\n async componentDidLoad() { \n if(!isNestedInIfxComponent(this.el)) { \n const framework = detectFramework();\n trackComponent('ifx-notification', await framework)\n }\n }\n\n private getClassName(): string {\n switch (this.variant) {\n case 'success':\n return 'ifx-notification__wrapper--success';\n case 'locked':\n return 'ifx-notification__wrapper--locked';\n case 'error':\n return 'ifx-notification__wrapper--error';\n case 'neutral':\n return 'ifx-notification__wrapper--neutral';\n default:\n return 'ifx-notification__wrapper--success';\n }\n }\n\n render() {\n return (\n <Host>\n <div class={\"ifx-notification__wrapper \" + this.getClassName()}>\n <div class=\"ifx-notification__icon\">\n <ifx-icon icon={this.icon}></ifx-icon>\n </div>\n <div class=\"ifx-notification__body\">\n <div class=\"ifx-notification__slot\">\n <slot/>\n </div>\n { this.linkText && this.linkHref && \n <div class=\"ifx-notification__link\">\n <ifx-link href={this.linkHref} target={this.linkTarget}>\n {this.linkText}<ifx-icon icon=\"arrow-right-16\">\n </ifx-icon>\n </ifx-link>\n </div>\n }\n </div>\n </div>\n </Host>\n );\n }\n}"],"mappings":"wIAAA,MAAMA,EAAkB,ooDACxB,MAAAC,EAAeD,E,MCUFE,EAAY,MALzB,WAAAC,CAAAC,G,UAQUC,KAAAC,QAA+B,UAG/BD,KAAAE,WAAqB,Q,CAE7B,sBAAMC,GACJ,IAAIC,EAAuBJ,KAAKK,IAAK,CACnC,MAAMC,EAAYC,IAClBC,EAAe,yBAA0BF,E,EAIrC,YAAAG,GACN,OAAQT,KAAKC,SACX,IAAK,UACH,MAAO,qCACT,IAAK,SACH,MAAO,oCACT,IAAK,QACH,MAAO,mCACT,IAAK,UACH,MAAO,qCACT,QACE,MAAO,qC,CAIb,MAAAS,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,2CAAKC,MAAO,6BAA+Bd,KAAKS,gBAC9CE,EAAA,OAAAE,IAAA,2CAAKC,MAAM,0BACTH,EAAA,YAAAE,IAAA,2CAAUE,KAAMf,KAAKe,QAEvBJ,EAAA,OAAAE,IAAA,2CAAKC,MAAM,0BACTH,EAAA,OAAAE,IAAA,2CAAKC,MAAM,0BACTH,EAAA,QAAAE,IAAA,8CAEAb,KAAKgB,UAAYhB,KAAKiB,UACxBN,EAAA,OAAAE,IAAA,2CAAKC,MAAM,0BACTH,EAAA,YAAAE,IAAA,2CAAUK,KAAMlB,KAAKiB,SAAUE,OAAQnB,KAAKE,YACzCF,KAAKgB,SAASL,EAAA,YAAAE,IAAA,2CAAUE,KAAK,uB","ignoreList":[]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as e,h as t,a as n,g as o}from"./p-b7a462e5.js";import{d as i,t as d}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,a as n,g as o}from"./p-b7a462e5.js";import{d as i,t as d}from"./p-4d6cad33.js";import{i as a}from"./p-1ecafb97.js";import{c as r}from"./p-5cdc6210.js";const s=':root{--ifx-font-family:"Source Sans 3", "Arial, sans-serif"}:host{vertical-align:bottom;display:inline-flex;width:var(--bw, fit-content)}.btn{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0px 16px;gap:8px;color:#FFFFFF;font-weight:600;border-radius:1px;line-height:1.5rem;font-family:var(--ifx-font-family);font-style:normal;text-decoration:none;user-select:none;font-size:1rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;width:var(--bw, fit-content)}.btn:not(.disabled){cursor:pointer}.btn.disabled{pointer-events:none}.btn-default{color:#FFFFFF;background-color:#0A8276}.btn-default:disabled,.btn-default.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-default{background-color:#FFFFFF;color:#0A8276;border:1px solid #0A8276}.btn-secondary-default:disabled,.btn-secondary-default.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-default{background-color:transparent;color:#0A8276}.btn-tertiary-default:disabled,.btn-tertiary-default.disabled{color:#BFBBBB;pointer-events:none}.btn-danger{color:#FFFFFF;background-color:#CD002F;border-color:#CD002F}.btn-danger:disabled,.btn-danger.disabled{background-color:#BFBBBB;color:#FFFFFF;pointer-events:none}.btn-secondary-danger{background-color:#FFFFFF;color:#CD002F;border:1px solid #CD002F}.btn-secondary-danger:disabled,.btn-secondary-danger.disabled{background-color:#FFFFFF;border:1px solid #BFBBBB;color:#BFBBBB;pointer-events:none}.btn-tertiary-danger{background-color:transparent;color:#CD002F}.btn-tertiary-danger:disabled,.btn-tertiary-danger.disabled{background-color:#FFFFFF;color:#BFBBBB;pointer-events:none}.btn-inverse{color:#0A8276;background-color:#FFFFFF}.btn-inverse:disabled,.btn-inverse.disabled{opacity:1;background-color:#FFFFFF;color:#0A8276;pointer-events:none}.btn-secondary-inverse{color:#FFFFFF;border:1px solid #FFFFFF}.btn-secondary-inverse:disabled,.btn-secondary-inverse.disabled{border:1px solid #FFFFFF;color:#FFFFFF;pointer-events:none}.btn-tertiary-inverse{color:#FFFFFF}.btn-tertiary-inverse:disabled,.btn-tertiary-inverse.disabled{color:#FFFFFF;opacity:1;pointer-events:none}.btn ifx-icon:empty{display:none}.btn.btn-xs{font-size:0.875rem;height:32px;line-height:1rem}.btn.btn-s{font-size:0.875rem;height:36px;line-height:1.25rem}.btn.btn-l{font-size:1.25rem;height:48px;line-height:1.75rem}.btn.btn-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-default:not(:disabled,.disabled):hover{background-color:#08665C}.btn.btn-default:not(:disabled,.disabled):active,.btn.btn-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-default:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#08665C}.btn.btn-secondary-default:not(:disabled,.disabled):active,.btn.btn-secondary-default:not(:disabled,.disabled).active{background-color:#06534B}.btn.btn-secondary:not(:disabled,.disabled):hover{background-color:#9C216E}.btn.btn-secondary:not(:disabled,.disabled):active,.btn.btn-secondary:not(:disabled,.disabled).active{background-color:#9C216E}.btn.btn-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-danger:not(:disabled,.disabled):hover{background-color:#A2001E}.btn.btn-danger:not(:disabled,.disabled):active,.btn.btn-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-secondary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #0A8276}.btn.btn-secondary-danger:not(:disabled,.disabled):hover{color:#FFFFFF;background-color:#A2001E}.btn.btn-secondary-danger:not(:disabled,.disabled):active,.btn.btn-secondary-danger:not(:disabled,.disabled).active{background-color:#900021}.btn.btn-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-inverse:not(:disabled,.disabled):hover{background-color:#EEEDED}.btn.btn-inverse:not(:disabled,.disabled):active,.btn.btn-inverse:not(:disabled,.disabled).active{background-color:#BFBBBB}.btn.btn-secondary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-secondary-inverse:not(:disabled,.disabled):hover{color:#0A8276;background-color:#EEEDED}.btn.btn-secondary-inverse:not(:disabled,.disabled):active,.btn.btn-secondary-inverse:not(:disabled,.disabled).active{color:#0A8276;background-color:#BFBBBB}.btn.btn-tertiary-default:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):hover{color:#08665C}.btn.btn-tertiary-default:not(:disabled,.disabled):active,.btn.btn-tertiary-default:not(:disabled,.disabled).active{color:#06534B}.btn.btn-tertiary-danger:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #FFFFFF, 0 0 0 4px #A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):hover{color:#A2001E}.btn.btn-tertiary-danger:not(:disabled,.disabled):active,.btn.btn-tertiary-danger:not(:disabled,.disabled).active{color:#900021}.btn.btn-tertiary-inverse:not(:disabled,.disabled):focus:not(:active,.active){outline:none;box-shadow:0 0 0 2px #0A8276, 0 0 0 4px #FFFFFF}.btn.btn-tertiary-inverse:not(:disabled,.disabled):hover{color:#EEEDED}.btn.btn-tertiary-inverse:not(:disabled,.disabled):active,.btn.btn-tertiary-inverse:not(:disabled,.disabled).active{color:#BFBBBB}';const b=s;const l=class{constructor(t){e(this,t);this.variant="primary";this.theme="default";this.size="m";this.disabled=false;this.target="_self";this.type="button";this.fullWidth=false;this.handleClick=e=>{if(this.el.shadowRoot){const t=this.el.closest("form");if(t){e.preventDefault();if(this.type==="reset"){this.resetClickHandler()}else{const e=document.createElement("button");if(this.type){e.type=this.type}e.style.display="none";t.appendChild(e);e.click();e.remove()}}}}}setInternalHref(e){this.internalHref=e}async setFocus(){this.focusableElement.focus()}insertNativeButton(){this.nativeButton=document.createElement("button");this.nativeButton.type=this.type;this.nativeButton.style.display="none";this.el.closest("form").appendChild(this.nativeButton)}handleFormAndInternalHref(){if(this.el.closest("form")){if(this.el.href){this.el.internalHref=undefined}this.insertNativeButton()}else{this.internalHref=this.href}}handleButtonWidth(){if(this.fullWidth){this.el.style.setProperty("--bw","100%")}else{this.el.style.setProperty("--bw","fit-content")}}componentWillLoad(){this.handleFormAndInternalHref()}async componentDidLoad(){if(!a(this.el)){const e=i();d("ifx-button",await e)}}componentWillRender(){this.handleButtonWidth()}resetClickHandler(){const e=this.el.closest("form");const t=e.querySelectorAll("ifx-text-field, ifx-textarea");t.forEach((e=>{e.reset()}))}handleKeyDown(e){if(e.key===" "||e.key==="Enter"&&!this.disabled){this.focusableElement.click()}}handleHostClick(e){if(this.disabled===true){e.stopImmediatePropagation()}}handleFocus(e){if(this.disabled){e.preventDefault();this.focusableElement.blur()}}render(){return t(n,{key:"52f47e2aea09c5c3c75507f5b0c2d683f2d82a01"},t("a",{key:"042e9e5e6990e6f5e421b8cdce802ab3802309bc",role:this.href?"link":"button",tabIndex:this.disabled?-1:0,ref:e=>this.focusableElement=e,class:this.getClassNames(),href:!this.disabled?this.internalHref:undefined,target:this.target,onClick:this.handleClick,rel:this.target==="_blank"?"noopener noreferrer":undefined,onFocus:e=>this.handleFocus(e),"aria-disabled":this.disabled?"true":null,"aria-describedby":this.theme==="danger"?"Dangerous action":undefined,"aria-label":this.ariaLabel||undefined},t("slot",{key:"eb5fa24cbf39aeef2060ea71604c2c503cd20fbe"})))}getVariantClass(){return`${this.variant}`==="secondary"?`secondary-${this.theme}`:`${this.variant}`==="tertiary"?`tertiary-${this.theme}`:`${this.theme}`}getSizeClass(){if(`${this.size}`==="xs"){return"xs"}else if(`${this.size}`==="s"){return"s"}else if(`${this.size}`==="l"){return"l"}else return""}getClassNames(){return r("btn",this.size&&`btn-${this.getSizeClass()}`,`btn-${this.getVariantClass()}`,this.disabled?"disabled":"")}get el(){return o(this)}static get watchers(){return{href:["setInternalHref"]}}};l.style=b;export{l as ifx_button};
|
2
|
+
//# sourceMappingURL=p-e64414a5.entry.js.map
|