@maggioli-design-system/magma 2.0.0 → 2.0.1
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/index.cjs.js +64 -22
- package/dist/cjs/mds-avatar.cjs.entry.js +27 -32
- package/dist/cjs/mds-badge.cjs.entry.js +3 -2
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +3 -2
- package/dist/cjs/mds-bibliography.cjs.entry.js +4 -3
- package/dist/cjs/mds-button_3.cjs.entry.js +36 -10
- package/dist/cjs/mds-dropdown.cjs.entry.js +4 -3
- package/dist/cjs/mds-entity.cjs.entry.js +1 -1
- package/dist/cjs/mds-file-preview.cjs.entry.js +17 -17
- package/dist/cjs/mds-header.cjs.entry.js +17 -8
- package/dist/cjs/mds-img.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-date-range.cjs.entry.js +7 -5
- package/dist/cjs/mds-input-select.cjs.entry.js +10 -8
- package/dist/cjs/mds-input-upload.cjs.entry.js +10 -6
- package/dist/cjs/mds-input.cjs.entry.js +4 -4
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +8 -5
- package/dist/cjs/mds-keyboard.cjs.entry.js +6 -3
- package/dist/cjs/mds-mention.cjs.entry.js +3 -2
- package/dist/cjs/mds-notification.cjs.entry.js +11 -8
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -2
- package/dist/cjs/mds-pref-theme-item.cjs.entry.js +3 -2
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-stepper-bar.cjs.entry.js +5 -3
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +3 -2
- package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
- package/dist/cjs/mds-text.cjs.entry.js +2 -1
- package/dist/cjs/mds-toast.cjs.entry.js +9 -3
- package/dist/cjs/mds-tooltip.cjs.entry.js +4 -4
- package/dist/collection/components/mds-avatar/mds-avatar.js +27 -32
- package/dist/collection/components/mds-badge/mds-badge.js +3 -2
- package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +3 -2
- package/dist/collection/components/mds-bibliography/mds-bibliography.js +4 -3
- package/dist/collection/components/mds-button/mds-button.js +7 -6
- package/dist/collection/components/mds-dropdown/mds-dropdown.js +4 -3
- package/dist/collection/components/mds-file-preview/mds-file-preview.js +6 -7
- package/dist/collection/components/mds-header/mds-header.js +17 -8
- package/dist/collection/components/mds-icon/mds-icon.js +29 -4
- package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
- package/dist/collection/components/mds-img/mds-img.js +3 -3
- package/dist/collection/components/mds-input/mds-input.js +4 -4
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +7 -5
- package/dist/collection/components/mds-input-select/mds-input-select.js +10 -8
- package/dist/collection/components/mds-input-upload/mds-input-upload.js +10 -6
- package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -3
- package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +8 -5
- package/dist/collection/components/mds-mention/mds-mention.js +3 -2
- package/dist/collection/components/mds-notification/mds-notification.js +11 -8
- package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +3 -2
- package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +3 -2
- package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +5 -3
- package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +3 -2
- package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +2 -2
- package/dist/collection/components/mds-text/mds-text.js +2 -1
- package/dist/collection/components/mds-toast/mds-toast.js +9 -3
- package/dist/collection/components/mds-tooltip/mds-tooltip.js +4 -4
- package/dist/collection/dictionary/icon.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mds-accordion-item.js +1 -1
- package/dist/components/mds-accordion-timer-item.js +1 -1
- package/dist/components/mds-avatar-stack-item.js +1 -1
- package/dist/components/mds-avatar-stack.js +1 -1
- package/dist/components/mds-avatar.js +1 -1
- package/dist/components/mds-badge.js +1 -1
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-benchmark-bar.js +1 -1
- package/dist/components/mds-bibliography.js +1 -1
- package/dist/components/mds-breadcrumb-item.js +1 -1
- package/dist/components/mds-breadcrumb.js +1 -1
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-button.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-chip.js +1 -1
- package/dist/components/mds-dropdown.js +1 -1
- package/dist/components/mds-entity.js +1 -1
- package/dist/components/mds-file-preview.js +1 -1
- package/dist/components/mds-file.js +3 -3
- package/dist/components/mds-filter-item.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header-bar.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-help.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-icon.js +1 -1
- package/dist/components/mds-img.js +1 -1
- package/dist/components/mds-input-date-range-preselection.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-field.js +1 -1
- package/dist/components/mds-input-otp.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-input-select.js +1 -1
- package/dist/components/mds-input-switch.js +1 -1
- package/dist/components/mds-input-tip-item.js +1 -1
- package/dist/components/mds-input-upload.js +1 -1
- package/dist/components/mds-input.js +1 -1
- package/dist/components/mds-keyboard-key.js +1 -1
- package/dist/components/mds-keyboard.js +1 -1
- package/dist/components/mds-kpi-item.js +1 -1
- package/dist/components/mds-label.js +1 -1
- package/dist/components/mds-list-item.js +1 -1
- package/dist/components/mds-mention.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-note.js +1 -1
- package/dist/components/mds-notification.js +1 -1
- package/dist/components/mds-paginator-item.js +1 -1
- package/dist/components/mds-paginator.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-pref-animation.js +1 -1
- package/dist/components/mds-pref-consumption.js +1 -1
- package/dist/components/mds-pref-contrast.js +1 -1
- package/dist/components/mds-pref-language-item.js +1 -1
- package/dist/components/mds-pref-language.js +1 -1
- package/dist/components/mds-pref-mode.js +1 -1
- package/dist/components/mds-pref-theme-item.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/components/mds-pref.js +1 -1
- package/dist/components/mds-price-table-features-cell.js +1 -1
- package/dist/components/mds-price-table-features.js +1 -1
- package/dist/components/mds-price-table-list-item.js +1 -1
- package/dist/components/mds-progress.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-push-notification.js +1 -1
- package/dist/components/mds-quote.js +1 -1
- package/dist/components/mds-radial-menu-item.js +1 -1
- package/dist/components/mds-radial-menu.js +1 -1
- package/dist/components/mds-radial-progress.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-stepper-bar-item.js +1 -1
- package/dist/components/mds-stepper-bar.js +1 -1
- package/dist/components/mds-tab-bar-item.js +1 -1
- package/dist/components/mds-tab-item.js +1 -1
- package/dist/components/mds-table-header-cell.js +1 -1
- package/dist/components/mds-table-header.js +1 -1
- package/dist/components/mds-table-row.js +1 -1
- package/dist/components/mds-table.js +1 -1
- package/dist/components/mds-text.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/mds-tooltip.js +1 -1
- package/dist/components/mds-tree-item.js +1 -1
- package/dist/components/mds-url-view.js +1 -1
- package/dist/components/mds-usage.js +1 -1
- package/dist/components/{p-D3-GP4KF.js → p-6K9sFzLr.js} +1 -1
- package/dist/components/p-BBhbQT2f.js +1 -0
- package/dist/components/{p-B2A_hlV2.js → p-BFpRu7yD.js} +1 -1
- package/dist/components/p-BL63WAAq.js +8 -0
- package/dist/components/{p-Deh5Aia-.js → p-BShLEry5.js} +1 -1
- package/dist/components/{p-BJNK4p33.js → p-BYxxgEE_.js} +1 -1
- package/dist/components/p-BZFyAX-6.js +1 -0
- package/dist/components/p-BtMdmkID.js +1 -0
- package/dist/components/{p-Caksrfcd.js → p-ByaUOMp0.js} +1 -1
- package/dist/components/p-C1xZO_fq.js +1 -0
- package/dist/components/{p-cBZsPiMJ.js → p-C6Q4zFh6.js} +1 -1
- package/dist/components/{p-DLE5TNTp.js → p-CUQ7WIXh.js} +1 -1
- package/dist/components/p-Cd_8zD_I.js +1 -0
- package/dist/components/{p-DtxB7DYE.js → p-CnAeawmf.js} +1 -1
- package/dist/components/{p-Bt4xX5ww.js → p-DCrjf0F0.js} +1 -1
- package/dist/components/p-DlHJvYE7.js +1 -0
- package/dist/components/{p-BH3bWzRT.js → p-DlaJNPdd.js} +1 -1
- package/dist/components/{p-sqRs6oj4.js → p-DnrQaRnh.js} +1 -1
- package/dist/components/{p-CBLAz3_J.js → p-OPg_Naue.js} +1 -1
- package/dist/components/{p-C03KYHGv.js → p-RS4yyl41.js} +1 -1
- package/dist/components/{p--8aaJX-p.js → p-gv3eu44S.js} +1 -1
- package/dist/components/p-kff6xSdW.js +1 -0
- package/dist/components/p-pys1EQ60.js +1 -0
- package/dist/components/p-qketFgr0.js +1 -0
- package/dist/components/p-zml3K7nx.js +1 -0
- package/dist/documentation.json +4 -4
- package/dist/esm/index.js +64 -22
- package/dist/esm/mds-avatar.entry.js +27 -32
- package/dist/esm/mds-badge.entry.js +3 -2
- package/dist/esm/mds-benchmark-bar.entry.js +3 -2
- package/dist/esm/mds-bibliography.entry.js +4 -3
- package/dist/esm/mds-button_3.entry.js +36 -10
- package/dist/esm/mds-dropdown.entry.js +4 -3
- package/dist/esm/mds-entity.entry.js +1 -1
- package/dist/esm/mds-file-preview.entry.js +17 -17
- package/dist/esm/mds-header.entry.js +17 -8
- package/dist/esm/mds-img.entry.js +3 -3
- package/dist/esm/mds-input-date-range.entry.js +7 -5
- package/dist/esm/mds-input-select.entry.js +10 -8
- package/dist/esm/mds-input-upload.entry.js +10 -6
- package/dist/esm/mds-input.entry.js +4 -4
- package/dist/esm/mds-keyboard-key.entry.js +8 -5
- package/dist/esm/mds-keyboard.entry.js +6 -3
- package/dist/esm/mds-mention.entry.js +3 -2
- package/dist/esm/mds-notification.entry.js +11 -8
- package/dist/esm/mds-pref-language-item.entry.js +3 -2
- package/dist/esm/mds-pref-theme-item.entry.js +3 -2
- package/dist/esm/mds-push-notification-item.entry.js +1 -1
- package/dist/esm/mds-stepper-bar.entry.js +5 -3
- package/dist/esm/mds-tab-bar-item.entry.js +3 -2
- package/dist/esm/mds-table-header-cell.entry.js +2 -2
- package/dist/esm/mds-text.entry.js +2 -1
- package/dist/esm/mds-toast.entry.js +9 -3
- package/dist/esm/mds-tooltip.entry.js +4 -4
- package/dist/esm-es5/index.js +37 -26
- package/dist/esm-es5/mds-avatar.entry.js +4 -2
- package/dist/esm-es5/mds-badge.entry.js +2 -3
- package/dist/esm-es5/mds-benchmark-bar.entry.js +2 -3
- package/dist/esm-es5/mds-bibliography.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +14 -9
- package/dist/esm-es5/mds-dropdown.entry.js +2 -2
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +7 -5
- package/dist/esm-es5/mds-header.entry.js +8 -6
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +5 -3
- package/dist/esm-es5/mds-input-select.entry.js +8 -6
- package/dist/esm-es5/mds-input-upload.entry.js +3 -1
- package/dist/esm-es5/mds-input.entry.js +3 -3
- package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
- package/dist/esm-es5/mds-keyboard.entry.js +4 -2
- package/dist/esm-es5/mds-mention.entry.js +1 -1
- package/dist/esm-es5/mds-notification.entry.js +4 -2
- package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
- package/dist/esm-es5/mds-pref-theme-item.entry.js +2 -2
- package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
- package/dist/esm-es5/mds-stepper-bar.entry.js +4 -4
- package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
- package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
- package/dist/esm-es5/mds-text.entry.js +1 -1
- package/dist/esm-es5/mds-toast.entry.js +4 -2
- package/dist/esm-es5/mds-tooltip.entry.js +2 -2
- package/dist/hydrate/index.js +270 -164
- package/dist/hydrate/index.mjs +270 -164
- package/dist/magma-components/index.esm.js +1 -1
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/p-005172ba.entry.js +1 -0
- package/dist/magma-components/{p-9ca7932d.system.entry.js → p-05fa40aa.system.entry.js} +5 -3
- package/dist/magma-components/p-0827a5bd.entry.js +1 -0
- package/dist/magma-components/{p-1a8c5086.system.entry.js → p-15c77a98.system.entry.js} +2 -2
- package/dist/magma-components/p-18473d2f.entry.js +1 -0
- package/dist/magma-components/{p-f0a168f4.system.entry.js → p-18667ae7.system.entry.js} +3 -3
- package/dist/magma-components/p-19adde9d.entry.js +1 -0
- package/dist/magma-components/p-2217a7be.entry.js +1 -0
- package/dist/magma-components/{p-5a7ead55.system.entry.js → p-2386f0d6.system.entry.js} +2 -2
- package/dist/magma-components/p-2b56fc14.entry.js +1 -0
- package/dist/magma-components/p-3f747a63.system.entry.js +1 -0
- package/dist/magma-components/p-3ff30842.system.entry.js +16 -0
- package/dist/magma-components/{p-be692266.system.entry.js → p-49b120cb.system.entry.js} +2 -2
- package/dist/magma-components/{p-6cd7cfe3.entry.js → p-4af76eb3.entry.js} +1 -1
- package/dist/magma-components/p-4ba6cb3f.entry.js +1 -0
- package/dist/magma-components/p-4cadbd49.entry.js +1 -0
- package/dist/magma-components/p-518b55f3.entry.js +1 -0
- package/dist/magma-components/{p-960dc9b5.system.entry.js → p-5eec629c.system.entry.js} +4 -2
- package/dist/magma-components/{p-a8ec3080.system.entry.js → p-646034cb.system.entry.js} +1 -1
- package/dist/magma-components/{p-ce4e1a41.system.entry.js → p-677ab154.system.entry.js} +3 -1
- package/dist/magma-components/p-759133b3.entry.js +1 -0
- package/dist/magma-components/{p-cd5866c8.entry.js → p-7912f877.entry.js} +1 -1
- package/dist/magma-components/{p-3d8e63a2.system.entry.js → p-7d304fd4.system.entry.js} +3 -1
- package/dist/magma-components/{p-07fde74d.system.entry.js → p-7f6d708c.system.entry.js} +6 -4
- package/dist/magma-components/{p-6edc4f16.system.entry.js → p-88564e9b.system.entry.js} +1 -1
- package/dist/magma-components/{p-8c4fb7ec.system.entry.js → p-8b1abf81.system.entry.js} +10 -8
- package/dist/magma-components/p-8bbee38d.entry.js +1 -0
- package/dist/magma-components/{p-481008e9.system.entry.js → p-8bf680d6.system.entry.js} +5 -3
- package/dist/magma-components/{p-ce0ecc75.system.entry.js → p-8cb3a071.system.entry.js} +2 -2
- package/dist/magma-components/p-8f229eaf.entry.js +1 -0
- package/dist/magma-components/{p-3f7d3060.system.entry.js → p-94fa3396.system.entry.js} +14 -9
- package/dist/magma-components/{p-0ad3b4da.system.entry.js → p-9bbd4193.system.entry.js} +6 -6
- package/dist/magma-components/p-9caffe14.entry.js +1 -0
- package/dist/magma-components/p-9de1ac7f.entry.js +1 -0
- package/dist/magma-components/p-CnXBPjmc.system.js +1 -1
- package/dist/magma-components/{p-CBam2PI8.system.js → p-DVd2EM-q.system.js} +29 -18
- package/dist/magma-components/{p-f1462410.system.entry.js → p-a15da479.system.entry.js} +3 -4
- package/dist/magma-components/{p-e05d2df8.system.entry.js → p-ab997243.system.entry.js} +2 -2
- package/dist/magma-components/{p-efe8d359.entry.js → p-aea6081f.entry.js} +1 -1
- package/dist/magma-components/{p-1c0a7e24.system.entry.js → p-b0539d61.system.entry.js} +7 -5
- package/dist/magma-components/p-cc033985.system.entry.js +14 -0
- package/dist/magma-components/{p-a3fc2ea4.system.entry.js → p-cd84a264.system.entry.js} +7 -5
- package/dist/magma-components/p-d0457835.entry.js +1 -0
- package/dist/magma-components/p-d64311e2.entry.js +1 -0
- package/dist/magma-components/{p-54b995c2.system.entry.js → p-da4dc390.system.entry.js} +1 -1
- package/dist/magma-components/p-dda7a33b.entry.js +1 -0
- package/dist/magma-components/p-e375c8b1.entry.js +1 -0
- package/dist/magma-components/p-e3fce8ca.entry.js +1 -0
- package/dist/magma-components/{p-9626eaff.system.entry.js → p-e9a16f22.system.entry.js} +3 -3
- package/dist/magma-components/p-ea0091b6.entry.js +1 -0
- package/dist/magma-components/{p-a3279a73.system.entry.js → p-ec00defc.system.entry.js} +6 -4
- package/dist/magma-components/p-edfb0d7a.entry.js +1 -0
- package/dist/magma-components/{p-0715a2cb.system.entry.js → p-f9d9cf7c.system.entry.js} +2 -3
- package/dist/magma-components/p-fa163e86.entry.js +1 -0
- package/dist/magma-components/p-fe19080a.entry.js +8 -0
- package/dist/magma-components/p-ff49fb35.entry.js +1 -0
- package/dist/stats.json +383 -383
- package/dist/types/components/mds-avatar/mds-avatar.d.ts +2 -0
- package/dist/types/components/mds-header/mds-header.d.ts +1 -0
- package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
- package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +1 -0
- package/dist/types/components/mds-toast/mds-toast.d.ts +1 -0
- package/package.json +10 -10
- package/dist/components/p-B9DJLgwr.js +0 -1
- package/dist/components/p-BouRLCYL.js +0 -1
- package/dist/components/p-CVgKDZPF.js +0 -1
- package/dist/components/p-CatD1iUY.js +0 -1
- package/dist/components/p-CbufYCNj.js +0 -1
- package/dist/components/p-Cehcn85x.js +0 -1
- package/dist/components/p-ClKNADBg.js +0 -8
- package/dist/components/p-D8I1RblC.js +0 -1
- package/dist/components/p-DaI5QqNu.js +0 -1
- package/dist/components/p-Dj_oN194.js +0 -1
- package/dist/components/p-DmELzfvf.js +0 -1
- package/dist/magma-components/p-03be5c0c.entry.js +0 -1
- package/dist/magma-components/p-0af8d821.entry.js +0 -1
- package/dist/magma-components/p-1780b8ba.entry.js +0 -1
- package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
- package/dist/magma-components/p-241dbf61.entry.js +0 -1
- package/dist/magma-components/p-27ea99ee.entry.js +0 -8
- package/dist/magma-components/p-4297da23.system.entry.js +0 -1
- package/dist/magma-components/p-454c4774.entry.js +0 -1
- package/dist/magma-components/p-59de81ac.entry.js +0 -1
- package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
- package/dist/magma-components/p-66ce2dee.entry.js +0 -1
- package/dist/magma-components/p-69d1b815.entry.js +0 -1
- package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
- package/dist/magma-components/p-78fef00a.entry.js +0 -1
- package/dist/magma-components/p-7fc29447.entry.js +0 -1
- package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
- package/dist/magma-components/p-9b2ee3fe.entry.js +0 -1
- package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
- package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
- package/dist/magma-components/p-ac544ab1.entry.js +0 -1
- package/dist/magma-components/p-b23a6c83.entry.js +0 -1
- package/dist/magma-components/p-b9fecfd5.entry.js +0 -1
- package/dist/magma-components/p-c1fb2eb7.entry.js +0 -1
- package/dist/magma-components/p-c70d7159.entry.js +0 -1
- package/dist/magma-components/p-ddbdce09.entry.js +0 -1
- package/dist/magma-components/p-e3e893c4.entry.js +0 -1
- package/dist/magma-components/p-e4868ade.entry.js +0 -1
|
@@ -25,11 +25,13 @@ const MdsStepperBar = class {
|
|
|
25
25
|
this.currentItem = index - 1;
|
|
26
26
|
const values = new Array();
|
|
27
27
|
this.items.forEach((item, key) => {
|
|
28
|
+
var _a;
|
|
28
29
|
item.done = false;
|
|
29
30
|
if (key < this.currentItem) {
|
|
30
31
|
item.done = true;
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
const value = (_a = item.value) !== null && _a !== void 0 ? _a : '';
|
|
33
|
+
if (value !== '') {
|
|
34
|
+
values.push(value);
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
item.current = false;
|
|
@@ -107,7 +109,7 @@ const MdsStepperBar = class {
|
|
|
107
109
|
});
|
|
108
110
|
}
|
|
109
111
|
render() {
|
|
110
|
-
return (h(Host, { key: '
|
|
112
|
+
return (h(Host, { key: '35f536c577499c237e0a5b1865c2dcfaa5735d72' }, h("div", { key: '5c204cc4ca343076982d3357e7645cc8770a22be', class: "items", part: "items" }, h("slot", { key: '69c3b461ada662e58051b875411781a862ff565d' })), h("div", { key: '7fb5381e1126a5227b50ecc202154e44928aab5e', class: "contents", part: "contents" }, h("slot", { key: '535d40033b20590f72e9fef336bda3ed7b06cead', name: "content" }))));
|
|
111
113
|
}
|
|
112
114
|
get element() { return getElement(this); }
|
|
113
115
|
static get watchers() { return {
|
|
@@ -23,8 +23,9 @@ const MdsTabBarItem = class {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
this.onSlotChangeHandler = () => {
|
|
26
|
+
var _a;
|
|
26
27
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
27
|
-
if (this.label !==
|
|
28
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
28
29
|
return;
|
|
29
30
|
this.label = readSlottedLabel(this.element);
|
|
30
31
|
};
|
|
@@ -39,7 +40,7 @@ const MdsTabBarItem = class {
|
|
|
39
40
|
this.label = sanitizeLabel(newValue);
|
|
40
41
|
}
|
|
41
42
|
render() {
|
|
42
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '6e2c08fad0e04d0725ab7ef827c654cf9edecb51', onClick: this.select, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("mds-icon", { key: 'cc8cc878d899d20532b1582ae7eb2aa459a82078', name: this.icon }), h("mds-text", { key: 'ea6030247b5999f34cd64a6a3ea8b15de66ba5ab', typography: this.typography }, this.label || h("slot", { key: 'b922dbfe1b35997ac2c9e9d384e22505838a6994', onSlotchange: this.onSlotChangeHandler }))));
|
|
43
44
|
}
|
|
44
45
|
get element() { return getElement(this); }
|
|
45
46
|
static get watchers() { return {
|
|
@@ -40,7 +40,7 @@ const MdsTableHeaderCell = class {
|
|
|
40
40
|
this.tableRowsDefaultSorted = Array.from(this.tableBody.children);
|
|
41
41
|
};
|
|
42
42
|
this.getValue = (element) => {
|
|
43
|
-
if (element.value
|
|
43
|
+
if (element.value != null &&
|
|
44
44
|
element.value !== '' &&
|
|
45
45
|
element.value !== 0 &&
|
|
46
46
|
!Number.isNaN(element.value)) {
|
|
@@ -123,7 +123,7 @@ const MdsTableHeaderCell = class {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
return (h(Host, { key: 'e7c077673fa918dfd50f25d7b341881f72eaefe2', role: "columnheader", "aria-sort": this.direction, "pref-animation": preferenceStore.state.animation }, this.sortable ? (h("mds-button", { class: "action", icon: clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && miBaselineKeyboardArrowUp, this.direction === 'descending' && miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (h("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
|
|
127
127
|
}
|
|
128
128
|
get element() { return getElement(this); }
|
|
129
129
|
static get watchers() { return {
|
|
@@ -311,7 +311,8 @@ const MdsText = class {
|
|
|
311
311
|
this.animateText(newValue);
|
|
312
312
|
}
|
|
313
313
|
render() {
|
|
314
|
-
|
|
314
|
+
var _a;
|
|
315
|
+
return (h(Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preferenceStore.state.animation }, h(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, ((_a = this.text) !== null && _a !== void 0 ? _a : '') === '' ? h("slot", null) : this.text)));
|
|
315
316
|
}
|
|
316
317
|
get host() { return getElement(this); }
|
|
317
318
|
static get watchers() { return {
|
|
@@ -27,10 +27,16 @@ const MdsToast = class {
|
|
|
27
27
|
* Sets position of toast
|
|
28
28
|
*/
|
|
29
29
|
this.position = 'bottom-center';
|
|
30
|
+
// a removed attribute leaves null, which counts as no duration, like 0
|
|
31
|
+
this.hasDuration = () => {
|
|
32
|
+
var _a;
|
|
33
|
+
const duration = (_a = this.duration) !== null && _a !== void 0 ? _a : 0;
|
|
34
|
+
return duration !== 0 && !Number.isNaN(duration);
|
|
35
|
+
};
|
|
30
36
|
this.reloadTimeListeners = (visible) => {
|
|
31
37
|
if (typeof window === 'undefined')
|
|
32
38
|
return;
|
|
33
|
-
if (this.
|
|
39
|
+
if (!this.hasDuration()) {
|
|
34
40
|
return;
|
|
35
41
|
}
|
|
36
42
|
if (!visible) {
|
|
@@ -67,7 +73,7 @@ const MdsToast = class {
|
|
|
67
73
|
componentWillLoad() {
|
|
68
74
|
this.hasText = this.hostElement.innerHTML !== '';
|
|
69
75
|
this.hasActions = hasChildWithSlot(this.hostElement, 'action');
|
|
70
|
-
if (this.
|
|
76
|
+
if (!this.hasDuration()) {
|
|
71
77
|
return;
|
|
72
78
|
}
|
|
73
79
|
if (this.visible) {
|
|
@@ -84,7 +90,7 @@ const MdsToast = class {
|
|
|
84
90
|
this.reloadTimeListeners(!!this.visible);
|
|
85
91
|
}
|
|
86
92
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: 'd043662b287519f10abe2a4568d2f3458b89857e', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: '5f8945ad6b39700172920d34c405d616c685de61', class: clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, h("slot", { key: 'ad778db94450394931cfb554357e91cbf192fe66', name: "icon" }), this.hasText && (h("mds-text", { key: '43ac2cbcd4101ade9b03ec137ec36d512b9fd87e', typography: "caption" }, h("slot", { key: '4ede3cb3db5c6f096fe66ed87f05a1e2deab2b24' }))), h("div", { key: 'd811c95881d28ccba3be66605efb8197235bc1ef', class: clsx('actions', !this.hasActions && 'actions--hidden') }, h("slot", { key: '08e8d1cb3e62bf1eb104a3de3d473ca57a6991e9', name: "action", onSlotchange: this.onActionSlotChange })))));
|
|
88
94
|
}
|
|
89
95
|
get hostElement() { return getElement(this); }
|
|
90
96
|
static get watchers() { return {
|
|
@@ -96,10 +96,10 @@ const MdsTooltip = class {
|
|
|
96
96
|
this.floatingController.dismiss();
|
|
97
97
|
}
|
|
98
98
|
targetChanged() {
|
|
99
|
-
var _a;
|
|
100
|
-
if (this.target === '')
|
|
99
|
+
var _a, _b;
|
|
100
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '')
|
|
101
101
|
return;
|
|
102
|
-
const caller = (
|
|
102
|
+
const caller = (_b = this.floatingController) === null || _b === void 0 ? void 0 : _b.updateCaller(this.target);
|
|
103
103
|
if (!caller)
|
|
104
104
|
return;
|
|
105
105
|
this.caller = caller;
|
|
@@ -121,7 +121,7 @@ const MdsTooltip = class {
|
|
|
121
121
|
this.floatingController.dismiss();
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
return (h(Host, { key: '
|
|
124
|
+
return (h(Host, { key: '2031b33e6cc0837318acce18e2298a4bacfc5b0b', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: 'ba0236540eb28111cba583fc346e4d3717ed0385', class: "arrow", innerHTML: arrowSvg }), h("mds-text", { key: '8aa8abf3be3b4ab25dc1bf4bf85d9fbdb6470639', class: "text", typography: this.typography, part: "text" }, h("slot", { key: '79d6f5b7055890731d8e861985a9de7c5df9c725' }))));
|
|
125
125
|
}
|
|
126
126
|
get host() { return getElement(this); }
|
|
127
127
|
static get watchers() { return {
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function u(t){try{f(r.next(t))}catch(t){o(t)}}function s(t){try{f(r["throw"](t))}catch(t){o(t)}}function f(t){t.done?n(t.value):i(t.value).then(u,s)}f((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return u.next=s(0),u["throw"]=s(1),u["return"]=s(2),typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(e){return f([t,e])}}function f(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{B as Build}from"./index-DIiEV39g.js";function promisifyRequest(t){return new Promise((function(e,n){
|
|
2
2
|
// @ts-ignore - file size hacks
|
|
3
|
-
|
|
3
|
+
t.oncomplete=t.onsuccess=function(){return e(t.result)};
|
|
4
4
|
// @ts-ignore - file size hacks
|
|
5
|
-
|
|
5
|
+
t.onabort=t.onerror=function(){return n(t.error)}}))}function createStore(t,e){var n;var r=function(){if(n)return n;var r=indexedDB.open(t);r.onupgradeneeded=function(){return r.result.createObjectStore(e)};n=promisifyRequest(r);n.then((function(t){
|
|
6
|
+
// It seems like Safari sometimes likes to just close the connection.
|
|
7
|
+
// It's supposed to fire this event when that happens. Let's hope it does!
|
|
8
|
+
t.onclose=function(){return n=undefined}}),(function(){n=undefined}));return n};return function(t,n){return r().then((function(r){return n(r.transaction(e,t).objectStore(e))}))}}var defaultGetStoreFunc;function defaultGetStore(){if(!defaultGetStoreFunc){defaultGetStoreFunc=createStore("keyval-store","keyval")}return defaultGetStoreFunc}
|
|
6
9
|
/**
|
|
7
10
|
* Get a value by its key.
|
|
8
11
|
*
|
|
9
12
|
* @param key
|
|
10
13
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
11
|
-
*/function get(e
|
|
14
|
+
*/function get(t,e){if(e===void 0){e=defaultGetStore()}return e("readonly",(function(e){return promisifyRequest(e.get(t))}))}
|
|
12
15
|
/**
|
|
13
16
|
* Set a value with a key.
|
|
14
17
|
*
|
|
15
18
|
* @param key
|
|
16
19
|
* @param value
|
|
17
20
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
18
|
-
*/function set(e,
|
|
21
|
+
*/function set(t,e,n){if(n===void 0){n=defaultGetStore()}return n("readwrite",(function(n){n.put(e,t);return promisifyRequest(n.transaction)}))}
|
|
19
22
|
/**
|
|
20
23
|
* Delete a particular key from the store.
|
|
21
24
|
*
|
|
22
25
|
* @param key
|
|
23
26
|
* @param customStore Method to get a custom store. Use with caution (see the docs).
|
|
24
|
-
*/function del(e
|
|
27
|
+
*/function del(t,e){if(e===void 0){e=defaultGetStore()}return e("readwrite",(function(e){e.delete(t);return promisifyRequest(e.transaction)}))}var MdsIconSet=/** @class */function(){
|
|
25
28
|
/**
|
|
26
29
|
* Create a new icon set. Icon sets have a name (ie, a namespace). For
|
|
27
30
|
* example, an icon with a name of "rh-logo" represents a "logo" icon from the
|
|
@@ -33,47 +36,55 @@ e.onabort=e.onerror=function(){return n(e.error)}}))}function createStore(e,t){v
|
|
|
33
36
|
* @param resolveIconName an optional function to combine the path and an icon name into a final path. The function will be passed the namespaced icon name (for example, "rh-api" where rh is the namespace and api is the individual icon's name)
|
|
34
37
|
* @returns an object with the status of the icon set installation, such as `{ result: true, text: 'icon set installed' }` or `{ result: false, text: 'icon set is already installed' }`
|
|
35
38
|
*/
|
|
36
|
-
function
|
|
39
|
+
function t(t,e,n){this.name=t;this.path=e;this._resolveIconName=n}
|
|
37
40
|
/**
|
|
38
41
|
* Run the icon set's name resolver to turn an icon name into an icon path, id, etc.
|
|
39
|
-
*/
|
|
42
|
+
*/t.prototype.resolveIconName=function(t){
|
|
40
43
|
// console.log(`resolveIconName - iconName: ${iconName} | name: ${this.name} | path: ${this.path}`)
|
|
41
|
-
return this._resolveIconName(
|
|
44
|
+
return this._resolveIconName(t,this.name,this.path)};Object.defineProperty(t.prototype,"resolver",{get:function(){return this._resolveIconName},enumerable:false,configurable:true});return t}();
|
|
42
45
|
// Shared, cross-realm key for the configured SVG base path. Stencil emits several bundled
|
|
43
46
|
// copies of this singleton (lazy chunks, the esm/esm-es5 variants, dist/components, and the
|
|
44
47
|
// public `services` entry); `Symbol.for` returns the same symbol in every copy, so storing
|
|
45
48
|
// the path under it on `globalThis` gives them all one source of truth.
|
|
46
|
-
var SVG_PATH_GLOBAL=Symbol.for("@maggioli-design-system/magma:mdsIconSvgPath");var IconsSetController=/** @class */function(){function
|
|
49
|
+
var SVG_PATH_GLOBAL=Symbol.for("@maggioli-design-system/magma:mdsIconSvgPath");var IconsSetController=/** @class */function(){function t(){var t=this;this._svgPathKey="mdsIconSvgPath";this._iconsSets=new Map;this._svgPathUpdate="mdsIconSvgPathUpdate";this.cacheExp=60*60*1e3*24;this.listeners=new Set;this.memoryCache={};
|
|
47
50
|
// Try to retrieve svg from cache
|
|
48
|
-
this.isCacheAvailable=function(
|
|
51
|
+
this.isCacheAvailable=function(e){return __awaiter(t,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(i){switch(i.label){case 0:
|
|
49
52
|
// idb-keyval requires indexedDB, missing in the hydrate/SSR runtime
|
|
50
|
-
if(typeof indexedDB==="undefined"){return[2/*return*/,false]}i.label=1;case 1:i.trys.push([1,3,,4]);return[4/*yield*/,get("loader_".concat(
|
|
53
|
+
if(typeof indexedDB==="undefined"){return[2/*return*/,false]}i.label=1;case 1:i.trys.push([1,3,,4]);return[4/*yield*/,get("loader_".concat(e))];case 2:t=i.sent();if(!t){return[2/*return*/,false]}n=JSON.parse(t);if(Date.now()<n.expiry){return[2/*return*/,n.data]}del("loader_".concat(e));return[2/*return*/,false];case 3:r=i.sent();console.error("isCacheAvailable error",r);return[2/*return*/,false];case 4:return[2/*return*/]}}))}))};
|
|
51
54
|
// Set svg to cache
|
|
52
|
-
this.setCache=function(
|
|
55
|
+
this.setCache=function(e,n){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:if(typeof indexedDB==="undefined"){return[2/*return*/]}r.label=1;case 1:r.trys.push([1,3,,4]);return[4/*yield*/,set("loader_".concat(e),JSON.stringify({data:n,expiry:Date.now()+this.cacheExp}))];case 2:r.sent();return[3/*break*/,4];case 3:t=r.sent();console.error("setCache error",t);return[3/*break*/,4];case 4:return[2/*return*/]}}))}))};this.setUpListener()}Object.defineProperty(t.prototype,"_svgPath",{
|
|
53
56
|
// Backed by `globalThis` (see SVG_PATH_GLOBAL) rather than an instance field, so that every
|
|
54
57
|
// bundled copy of this singleton reads/writes the same path and stays in sync regardless of
|
|
55
58
|
// how the consumer imports the service. No sessionStorage involved.
|
|
56
|
-
get:function(){var
|
|
59
|
+
get:function(){var t;if(typeof globalThis==="undefined")return"";return(t=globalThis[SVG_PATH_GLOBAL])!==null&&t!==void 0?t:""},set:function(t){if(typeof globalThis==="undefined")return;globalThis[SVG_PATH_GLOBAL]=t},enumerable:false,configurable:true});t.prototype.addIconSet=function(t,e,n){var r=n;var i=this._iconsSets.get(t);if(!r&&i&&typeof i.resolver==="function"){r=i.resolver}else if(r&&typeof r!=="function"){console.error("MdsIconSvg: the third input of addIconSet should be a function that parses and returns the icons's filename.");return false}else if(!r){console.error("MdsIconSvg: the set ".concat(t," needs a resolve function for the icon names."));return false}this._iconsSets.set(t,new MdsIconSet(t,e,r));return true};t.prototype.getIconSet=function(t){if(!t)return{set:null};return{set:this._iconsSets.get(t.split("/")[0])}};
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
61
|
+
* Sets the directory of the svg files. Query and fragment are dropped: the icon name is
|
|
62
|
+
* appended to the path.
|
|
59
63
|
*
|
|
60
|
-
* input path: https://www.abc.com/svg/path
|
|
61
|
-
* svgPath =
|
|
64
|
+
* input path: https://www.abc.com/svg/path/
|
|
65
|
+
* svgPath = https://www.abc.com/svg/path/
|
|
62
66
|
*
|
|
63
|
-
* input path: localhost:9000/svg/path
|
|
64
|
-
* svgPath = localhost:9000/svg/path
|
|
67
|
+
* input path: localhost:9000/svg/path/
|
|
68
|
+
* svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
|
|
65
69
|
*
|
|
66
|
-
* input path: /svg/path
|
|
67
|
-
* svgPath =
|
|
70
|
+
* input path: /svg/path/ or svg/path/
|
|
71
|
+
* svgPath = unchanged, resolved by `fetch` against the document base URL on each request
|
|
68
72
|
*
|
|
69
|
-
* input path:
|
|
73
|
+
* input path: empty or not a URL
|
|
70
74
|
* throw error
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
*/t.prototype.setSvgPath=function(t){var e=Error("Svg path not recognize ".concat(t,", ensure is a absolute path starting with '/' or a url"));if(typeof t!=="string"||t.trim()===""){throw e}var n=t.trim();
|
|
76
|
+
// a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
|
|
77
|
+
var r=/^[\w.-]+:\d+(\/|$)/.test(n)?"//".concat(n):n;var i;try{
|
|
78
|
+
// the placeholder base only validates a path, which is kept as it is
|
|
79
|
+
i=new URL(r,"http://localhost/")}catch(t){throw e}if(typeof window!=="undefined"){if(/^[a-z][a-z\d+.-]*:/i.test(r)){i.search="";i.hash="";this._svgPath=i.href}else{this._svgPath=r.replace(/[?#].*$/,"")}window.dispatchEvent(new Event(this._svgPathUpdate))}};t.prototype.getSvgPath=function(){return this._svgPath};t.prototype.registerListener=function(t){this.listeners.add(t)};t.prototype.unregisterListener=function(t){this.listeners.delete(t)};t.prototype.setUpListener=function(){var t=this;if(typeof window!=="undefined"){window.addEventListener(this._svgPathUpdate,(function(){for(var e=0,n=t.listeners;e<n.length;e++){var r=n[e];r()}}))}};t.prototype.fetchSvg=function(t){return __awaiter(this,void 0,void 0,(function(){var e,n,r,i,o,u,s,f;return __generator(this,(function(a){switch(a.label){case 0:
|
|
73
80
|
// No fetch during SSR: relative icon paths have no origin to resolve
|
|
74
81
|
// against, and the client re-fetches after hydration anyway. The empty
|
|
75
82
|
// icon causes no layout shift because mds-icon's :host reserves the box
|
|
76
83
|
// (aspect-ratio + width). Spec tests also run with isServer=true but mock
|
|
77
84
|
// fetch, so they are excluded via isTesting.
|
|
78
|
-
if(Build.isServer&&!Build.isTesting){return[2/*return*/,""]}
|
|
79
|
-
|
|
85
|
+
if(Build.isServer&&!Build.isTesting){return[2/*return*/,""]}
|
|
86
|
+
// an icon without the attribute passes an undefined (or null) name: there is nothing to load
|
|
87
|
+
if(!t){return[2/*return*/,""]}a.label=1;case 1:a.trys.push([1,5,,6]);if(!this._svgPath&&typeof window==="undefined"){throw Error("Cant find svgPath, ensure you set it")}if(!this._svgPath){n="";try{n=(e=window.sessionStorage.getItem(IconsSetService._svgPathKey))!==null&&e!==void 0?e:""}catch(t){
|
|
88
|
+
/* sessionStorage unavailable — ignore */}if(n){this.setSvgPath(n)}}r=this._svgPath&&!t.startsWith("http")?this._svgPath.concat(t,".svg"):t;
|
|
89
|
+
// Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
|
|
90
|
+
if(this.memoryCache[r]){return[2/*return*/,this.memoryCache[r]]}return[4/*yield*/,this.isCacheAvailable(r)];case 2:i=a.sent();if(i){this.memoryCache[r]=i;return[2/*return*/,i]}return[4/*yield*/,fetch(r)];case 3:o=a.sent();if(!o.ok){throw Error("Request for '".concat(r,"' returned ").concat(o.status," (").concat(o.statusText,")"))}return[4/*yield*/,o.text()];case 4:u=a.sent();s=u.toLowerCase().trim();if(!(s.startsWith("<svg")||s.startsWith("<?xml"))){throw Error("Resource '".concat(r,"' returned an invalid SVG file"))}this.setCache(r,u);this.memoryCache[r]=u;return[2/*return*/,u];case 5:f=a.sent();console.error("fetchSvg error",f);return[2/*return*/,""];case 6:return[2/*return*/]}}))}))};return t}();var IconsSetService=new IconsSetController;export{IconsSetService};
|
|
@@ -2,7 +2,9 @@ import{r as registerInstance,h,e as Host,g as getElement}from"./index-DIiEV39g.j
|
|
|
2
2
|
/**
|
|
3
3
|
* fitty v2.4.2 - Snugly resizes text to fit its parent container
|
|
4
4
|
* Copyright (c) 2023 Rik Schennink <rik@pqina.nl> (https://pqina.nl/)
|
|
5
|
-
*/var fitty_min=fitty_min$1.exports;var hasRequiredFitty_min;function requireFitty_min(){if(hasRequiredFitty_min)return fitty_min$1.exports;hasRequiredFitty_min=1;(function(a,r){!function(r,t){a.exports=t()}(fitty_min,(function(){return function(a){if(a){var r=function(a){return[].slice.call(a)},t=0,e=1,n=2,i=3,o=[],s=null,l="requestAnimationFrame"in a?function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{sync:false};a.cancelAnimationFrame(s);var t=function(){return d(o.filter((function(a){return a.dirty&&a.active})))};if(r.sync)return t();s=a.requestAnimationFrame(t)}:function(){},c=function(a){return function(r){o.forEach((function(r){return r.dirty=a})),l(r)}},d=function(a){a.filter((function(a){return!a.styleComputed})).forEach((function(a){a.styleComputed=b(a)})),a.filter(g).forEach(h);var r=a.filter(m);r.forEach(u),r.forEach((function(a){h(a),v(a)})),r.forEach(f)},v=function(a){return a.dirty=t},u=function(a){a.availableWidth=a.element.parentNode.clientWidth,a.currentWidth=a.element.scrollWidth,a.previousFontSize=a.currentFontSize,a.currentFontSize=Math.min(Math.max(a.minSize,a.availableWidth/a.currentWidth*a.previousFontSize),a.maxSize),a.whiteSpace=a.multiLine&&a.currentFontSize===a.minSize?"normal":"nowrap"},m=function(a){return a.dirty!==n||a.dirty===n&&a.element.parentNode.clientWidth!==a.availableWidth},b=function(r){var t=a.getComputedStyle(r.element,null);return r.currentFontSize=parseFloat(t.getPropertyValue("font-size")),r.display=t.getPropertyValue("display"),r.whiteSpace=t.getPropertyValue("white-space"),true},g=function(a){var r=false;return!a.preStyleTestCompleted&&(/inline-/.test(a.display)||(r=true,a.display="inline-block"),"nowrap"!==a.whiteSpace&&(r=true,a.whiteSpace="nowrap"),a.preStyleTestCompleted=true,r)},h=function(a){a.element.style.whiteSpace=a.whiteSpace,a.element.style.display=a.display,a.element.style.fontSize=a.currentFontSize+"px"},f=function(a){a.element.dispatchEvent(new CustomEvent("fit",{detail:{oldValue:a.previousFontSize,newValue:a.currentFontSize,scaleFactor:a.currentFontSize/a.previousFontSize}}))},p=function(a,r){return function(t){a.dirty=r,a.active&&l(t)}},w=function(a){return function(){o=o.filter((function(r){return r.element!==a.element})),a.observeMutations&&a.observer.disconnect(),a.element.style.whiteSpace=a.originalStyle.whiteSpace,a.element.style.display=a.originalStyle.display,a.element.style.fontSize=a.originalStyle.fontSize}},k=function(a){return function(){a.active||(a.active=true,l())}},y=function(a){return function(){return a.active=false}},x=function(a){a.observeMutations&&(a.observer=new MutationObserver(p(a,e)),a.observer.observe(a.element,a.observeMutations))},z={minSize:16,maxSize:512,multiLine:true,observeMutations:"MutationObserver"in a&&{subtree:true,childList:true,characterData:true}},q=null,_=function(){a.clearTimeout(q),q=a.setTimeout(c(n),S.observeWindowDelay)},M=["resize","orientationchange"];return Object.defineProperty(S,"observeWindow",{set:function(r){var t="".concat(r?"add":"remove","EventListener");M.forEach((function(r){a[t](r,_)}))}}),S.observeWindow=true,S.observeWindowDelay=100,S.fitAll=c(i),S}function j(a,r){var t=Object.assign({},z,r),e=a.map((function(a){var r=Object.assign({},t,{element:a,active:true});return function(a){a.originalStyle={whiteSpace:a.element.style.whiteSpace,display:a.element.style.display,fontSize:a.element.style.fontSize},x(a),a.newbie=true,a.dirty=true,o.push(a)}(r),{element:a,fit:p(r,i),unfreeze:k(r),freeze:y(r),unsubscribe:w(r)}}));return l(),e}function S(a){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof a?j(r(document.querySelectorAll(a)),t):j([a],t)[0]}}("undefined"==typeof window?null:window)}))})(fitty_min$1);return fitty_min$1.exports}var fitty_minExports=requireFitty_min();var fitty=getDefaultExportFromCjs(fitty_minExports);var avatarVariant=["bg-brand-maggioli-05","bg-label-amaranth-05","bg-label-aqua-05","bg-label-blue-05","bg-label-green-05","bg-label-lime-05","bg-label-orange-05","bg-label-orchid-05","bg-label-purple-05","bg-label-red-05","bg-label-sky-05","bg-label-violet-05","bg-label-yellow-05","bg-status-error-05","bg-status-info-05","bg-status-success-05","bg-status-warning-05"];var miBaselinePerson='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>';var mdsAvatarCss=function(){return'@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-img):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-avatar-background-color-pending:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-avatar-background-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-avatar-color:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-avatar-radius:var(--radius-full,1000px);--mds-avatar-initials-padding:20%;--mds-avatar-transition-duration:var(--duration-200,.2s);--private-avatar-transition-duration:var(--mds-avatar-transition-duration);aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px));container:mds-avatar/inline-size;display:inline-flex;overflow:hidden;width:calc(var(--spacing,.0025rem)*1200)}.avatar{aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px));color:#0000;display:inline-flex;overflow:hidden;-webkit-transition-duration:var(--private-avatar-transition-duration);transition-duration:var(--private-avatar-transition-duration);transition-property:color,background-color,box-shadow,fill;width:100%}.avatar--pending{background-color:var(--mds-avatar-background-color-pending,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.avatar--loaded{animation:none}.avatar--fallback,.avatar--icon,.avatar--initials{background-color:var(--mds-avatar-background-color,rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)))));-webkit-box-shadow:none;box-shadow:none}.avatar--fallback,.avatar--initials{display:flex;place-items:stretch stretch}.avatar--fallback,.avatar--icon{padding:20%}.avatar--initials{padding:30% var(--mds-avatar-initials-padding,20%) 25%}.image{aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px))}.fallback-icon{aspect-ratio:1;display:flex;fill:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));width:100%}.fallback-icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.initials-text{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);--tw-font-weight:var(--font-weight-bold,700);align-items:center;color:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));display:flex;font-weight:var(--font-weight-bold,700);height:100%;justify-content:center;text-transform:uppercase;-webkit-user-select:none;user-select:none;width:100%}.fit{display:inline-block;white-space:nowrap!important}.icon{fill:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));height:100%;-webkit-transition-duration:var(--private-avatar-transition-duration);transition-duration:var(--private-avatar-transition-duration);transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-expo,cubic-bezier(1,0,0,1));transition-timing-function:var(--ease-in-out-expo,cubic-bezier(1,0,0,1));width:100%}@container (max-width:24px){.avatar--initials{padding:0 var(--mds-avatar-initials-padding,20%)}.initials-text{--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900)}}:host,:host([variant=primary]){--mds-avatar-background-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-avatar-color:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:is(:host,:host([variant=primary])):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-avatar-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))))}:host([variant=red]){--mds-avatar-background-color:rgb(var(--label-red-05,230 66 66));--mds-avatar-color:rgb(var(--label-red-10,252 233 233))}:host([variant=red]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-red-09,250 215 215));--mds-avatar-color:rgb(var(--label-red-05,230 66 66))}:host([variant=amaranth]){--mds-avatar-background-color:rgb(var(--label-amaranth-05,242 37 72));--mds-avatar-color:rgb(var(--label-amaranth-10,254 232 236))}:host([variant=amaranth]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-amaranth-09,253 214 221));--mds-avatar-color:rgb(var(--label-amaranth-05,242 37 72))}:host([variant=orchid]){--mds-avatar-background-color:rgb(var(--label-orchid-05,233 44 137));--mds-avatar-color:rgb(var(--label-orchid-10,253 231 242))}:host([variant=orchid]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-orchid-09,251 213 232));--mds-avatar-color:rgb(var(--label-orchid-05,233 44 137))}:host([variant=violet]){--mds-avatar-background-color:rgb(var(--label-violet-05,145 100 246));--mds-avatar-color:rgb(var(--label-violet-10,240 234 254))}:host([variant=violet]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-violet-09,229 218 253));--mds-avatar-color:rgb(var(--label-violet-05,145 100 246))}:host([variant=purple]){--mds-avatar-background-color:rgb(var(--label-purple-05,168 86 247));--mds-avatar-color:rgb(var(--label-purple-10,244 233 254))}:host([variant=purple]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-purple-09,235 216 253));--mds-avatar-color:rgb(var(--label-purple-05,168 86 247))}:host([variant=blue]){--mds-avatar-background-color:rgb(var(--label-blue-05,90 117 249));--mds-avatar-color:rgb(var(--label-blue-10,233 236 254))}:host([variant=blue]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-blue-09,216 222 254));--mds-avatar-color:rgb(var(--label-blue-05,90 117 249))}:host([variant=sky]){--mds-avatar-background-color:rgb(var(--label-sky-05,12 136 193));--mds-avatar-color:rgb(var(--label-sky-10,217 241 253))}:host([variant=sky]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-sky-09,185 231 251));--mds-avatar-color:rgb(var(--label-sky-05,12 136 193))}:host([variant=aqua]){--mds-avatar-background-color:rgb(var(--label-aqua-05,5 141 165));--mds-avatar-color:rgb(var(--label-aqua-10,199 245 253))}:host([variant=aqua]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-aqua-09,151 237 252));--mds-avatar-color:rgb(var(--label-aqua-05,5 141 165))}:host([variant=green]){--mds-avatar-background-color:rgb(var(--label-green-05,26 148 71));--mds-avatar-color:rgb(var(--label-green-10,206 247 221))}:host([variant=green]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-green-09,165 240 193));--mds-avatar-color:rgb(var(--label-green-05,26 148 71))}:host([variant=lime]){--mds-avatar-background-color:rgb(var(--label-lime-05,93 143 15));--mds-avatar-color:rgb(var(--label-lime-10,219 247 178))}:host([variant=lime]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-lime-09,189 239 111));--mds-avatar-color:rgb(var(--label-lime-05,93 143 15))}:host([variant=yellow]){--mds-avatar-background-color:rgb(var(--label-yellow-05,161 124 6));--mds-avatar-color:rgb(var(--label-yellow-10,253 236 186))}:host([variant=yellow]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-yellow-09,251 221 131));--mds-avatar-color:rgb(var(--label-yellow-05,161 124 6))}:host([variant=orange]){--mds-avatar-background-color:rgb(var(--label-orange-05,213 90 5));--mds-avatar-color:rgb(var(--label-orange-10,254 233 219))}:host([variant=orange]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-orange-09,253 217 191));--mds-avatar-color:rgb(var(--label-orange-05,213 90 5))}:host([variant=error]){--mds-avatar-background-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-avatar-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-avatar-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=warning]){--mds-avatar-background-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-avatar-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-avatar-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=info]){--mds-avatar-background-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-avatar-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-avatar-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-avatar-background-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-avatar-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-avatar-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-avatar-transition-duration:0s}:host([pref-contrast=more]) :is(.avatar--fallback,.avatar--icon,.avatar--initials){-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)) inset;box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)) inset}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-avatar-transition-duration:0s}}@media (prefers-contrast:more){:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) :is(.avatar--fallback,.avatar--icon,.avatar--initials){-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)),var(--shadow-lg,0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a);box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)),var(--shadow-lg,0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a)}}'};var MdsAvatar=/** @class */function(){function a(a){var r=this;registerInstance(this,a);this.fallback=false;this.loaded=true;this.fittyInitialized=false;this.textChanged=false;this.variants=["amaranth","aqua","blue","error","green","info","lime","orange","orchid","primary","sky","success","violet","warning","yellow"];this.addFontResize=function(){var a;if(r.fittyInitialized){return}var t=(a=r.element.shadowRoot)===null||a===void 0?void 0:a.querySelector(".fit");r.fittyElements=fitty(t,{minSize:10});r.observer=new ResizeObserver((function(a){a.forEach((function(){r.fittyElements.fit()}))}));r.observer.observe(r.element);r.fittyInitialized=true};this.removeFontResize=function(){if(!r.fittyInitialized){return}r.fittyInitialized=false;r.observer.unobserve(r.element)};this.checkText=function(a){if(a!==""&&a!==undefined){if(r.fittyInitialized)return;if(!r.fittyInitialized)r.addFontResize();return}if(r.fittyInitialized)r.removeFontResize()};this.handleImgLoadError=function(){r.loaded=true;r.fallback=true};this.handleImgLoadSuccess=function(){r.loaded=true};this.checkInitialsVariant=function(){if(r.initials!==undefined&&r.initials!==""){var a=r.initials.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"").substring(0,2);if(a.length===1){a=a+a}r.variant=r.variants[(a.substring(0,1).charCodeAt(0)+a.substring(1,2).charCodeAt(0))%avatarVariant.length]}}}a.prototype.componentWillLoad=function(){this.checkInitialsVariant()};a.prototype.componentDidLoad=function(){if(this.src!==undefined){this.loaded=false}if(this.initials!==undefined&&this.initials!==""){this.checkText(this.initials)}if(this.count!==undefined&&this.count!==0&&!Number.isNaN(this.count)){this.checkText(this.count.toString())}};a.prototype.componentDidRender=function(){if(this.textChanged){
|
|
5
|
+
*/var fitty_min=fitty_min$1.exports;var hasRequiredFitty_min;function requireFitty_min(){if(hasRequiredFitty_min)return fitty_min$1.exports;hasRequiredFitty_min=1;(function(a,r){!function(r,t){a.exports=t()}(fitty_min,(function(){return function(a){if(a){var r=function(a){return[].slice.call(a)},t=0,e=1,n=2,o=3,i=[],s=null,l="requestAnimationFrame"in a?function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{sync:false};a.cancelAnimationFrame(s);var t=function(){return v(i.filter((function(a){return a.dirty&&a.active})))};if(r.sync)return t();s=a.requestAnimationFrame(t)}:function(){},c=function(a){return function(r){i.forEach((function(r){return r.dirty=a})),l(r)}},v=function(a){a.filter((function(a){return!a.styleComputed})).forEach((function(a){a.styleComputed=b(a)})),a.filter(g).forEach(f);var r=a.filter(m);r.forEach(u),r.forEach((function(a){f(a),d(a)})),r.forEach(h)},d=function(a){return a.dirty=t},u=function(a){a.availableWidth=a.element.parentNode.clientWidth,a.currentWidth=a.element.scrollWidth,a.previousFontSize=a.currentFontSize,a.currentFontSize=Math.min(Math.max(a.minSize,a.availableWidth/a.currentWidth*a.previousFontSize),a.maxSize),a.whiteSpace=a.multiLine&&a.currentFontSize===a.minSize?"normal":"nowrap"},m=function(a){return a.dirty!==n||a.dirty===n&&a.element.parentNode.clientWidth!==a.availableWidth},b=function(r){var t=a.getComputedStyle(r.element,null);return r.currentFontSize=parseFloat(t.getPropertyValue("font-size")),r.display=t.getPropertyValue("display"),r.whiteSpace=t.getPropertyValue("white-space"),true},g=function(a){var r=false;return!a.preStyleTestCompleted&&(/inline-/.test(a.display)||(r=true,a.display="inline-block"),"nowrap"!==a.whiteSpace&&(r=true,a.whiteSpace="nowrap"),a.preStyleTestCompleted=true,r)},f=function(a){a.element.style.whiteSpace=a.whiteSpace,a.element.style.display=a.display,a.element.style.fontSize=a.currentFontSize+"px"},h=function(a){a.element.dispatchEvent(new CustomEvent("fit",{detail:{oldValue:a.previousFontSize,newValue:a.currentFontSize,scaleFactor:a.currentFontSize/a.previousFontSize}}))},p=function(a,r){return function(t){a.dirty=r,a.active&&l(t)}},w=function(a){return function(){i=i.filter((function(r){return r.element!==a.element})),a.observeMutations&&a.observer.disconnect(),a.element.style.whiteSpace=a.originalStyle.whiteSpace,a.element.style.display=a.originalStyle.display,a.element.style.fontSize=a.originalStyle.fontSize}},k=function(a){return function(){a.active||(a.active=true,l())}},y=function(a){return function(){return a.active=false}},x=function(a){a.observeMutations&&(a.observer=new MutationObserver(p(a,e)),a.observer.observe(a.element,a.observeMutations))},z={minSize:16,maxSize:512,multiLine:true,observeMutations:"MutationObserver"in a&&{subtree:true,childList:true,characterData:true}},q=null,_=function(){a.clearTimeout(q),q=a.setTimeout(c(n),S.observeWindowDelay)},M=["resize","orientationchange"];return Object.defineProperty(S,"observeWindow",{set:function(r){var t="".concat(r?"add":"remove","EventListener");M.forEach((function(r){a[t](r,_)}))}}),S.observeWindow=true,S.observeWindowDelay=100,S.fitAll=c(o),S}function j(a,r){var t=Object.assign({},z,r),e=a.map((function(a){var r=Object.assign({},t,{element:a,active:true});return function(a){a.originalStyle={whiteSpace:a.element.style.whiteSpace,display:a.element.style.display,fontSize:a.element.style.fontSize},x(a),a.newbie=true,a.dirty=true,i.push(a)}(r),{element:a,fit:p(r,o),unfreeze:k(r),freeze:y(r),unsubscribe:w(r)}}));return l(),e}function S(a){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof a?j(r(document.querySelectorAll(a)),t):j([a],t)[0]}}("undefined"==typeof window?null:window)}))})(fitty_min$1);return fitty_min$1.exports}var fitty_minExports=requireFitty_min();var fitty=getDefaultExportFromCjs(fitty_minExports);var avatarVariant=["bg-brand-maggioli-05","bg-label-amaranth-05","bg-label-aqua-05","bg-label-blue-05","bg-label-green-05","bg-label-lime-05","bg-label-orange-05","bg-label-orchid-05","bg-label-purple-05","bg-label-red-05","bg-label-sky-05","bg-label-violet-05","bg-label-yellow-05","bg-status-error-05","bg-status-info-05","bg-status-success-05","bg-status-warning-05"];var miBaselinePerson='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>';var mdsAvatarCss=function(){return'@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-img):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-avatar-background-color-pending:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-avatar-background-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-avatar-color:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--mds-avatar-radius:var(--radius-full,1000px);--mds-avatar-initials-padding:20%;--mds-avatar-transition-duration:var(--duration-200,.2s);--private-avatar-transition-duration:var(--mds-avatar-transition-duration);aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px));container:mds-avatar/inline-size;display:inline-flex;overflow:hidden;width:calc(var(--spacing,.0025rem)*1200)}.avatar{aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px));color:#0000;display:inline-flex;overflow:hidden;-webkit-transition-duration:var(--private-avatar-transition-duration);transition-duration:var(--private-avatar-transition-duration);transition-property:color,background-color,box-shadow,fill;width:100%}.avatar--pending{background-color:var(--mds-avatar-background-color-pending,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.avatar--loaded{animation:none}.avatar--fallback,.avatar--icon,.avatar--initials{background-color:var(--mds-avatar-background-color,rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)))));-webkit-box-shadow:none;box-shadow:none}.avatar--fallback,.avatar--initials{display:flex;place-items:stretch stretch}.avatar--fallback,.avatar--icon{padding:20%}.avatar--initials{padding:30% var(--mds-avatar-initials-padding,20%) 25%}.image{aspect-ratio:1;border-radius:var(--mds-avatar-radius,var(--radius-full,1000px))}.fallback-icon{aspect-ratio:1;display:flex;fill:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));width:100%}.fallback-icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.initials-text{font-family:var(--font-title,Roboto,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);--tw-font-weight:var(--font-weight-bold,700);align-items:center;color:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));display:flex;font-weight:var(--font-weight-bold,700);height:100%;justify-content:center;text-transform:uppercase;-webkit-user-select:none;user-select:none;width:100%}.fit{display:inline-block;white-space:nowrap!important}.icon{fill:var(--mds-avatar-color,rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240)))));height:100%;-webkit-transition-duration:var(--private-avatar-transition-duration);transition-duration:var(--private-avatar-transition-duration);transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-expo,cubic-bezier(1,0,0,1));transition-timing-function:var(--ease-in-out-expo,cubic-bezier(1,0,0,1));width:100%}@container (max-width:24px){.avatar--initials{padding:0 var(--mds-avatar-initials-padding,20%)}.initials-text{--tw-font-weight:var(--font-weight-black,900);font-weight:var(--font-weight-black,900)}}:host,:host([variant=primary]){--mds-avatar-background-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-avatar-color:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:is(:host,:host([variant=primary])):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-avatar-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))))}:host([variant=red]){--mds-avatar-background-color:rgb(var(--label-red-05,230 66 66));--mds-avatar-color:rgb(var(--label-red-10,252 233 233))}:host([variant=red]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-red-09,250 215 215));--mds-avatar-color:rgb(var(--label-red-05,230 66 66))}:host([variant=amaranth]){--mds-avatar-background-color:rgb(var(--label-amaranth-05,242 37 72));--mds-avatar-color:rgb(var(--label-amaranth-10,254 232 236))}:host([variant=amaranth]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-amaranth-09,253 214 221));--mds-avatar-color:rgb(var(--label-amaranth-05,242 37 72))}:host([variant=orchid]){--mds-avatar-background-color:rgb(var(--label-orchid-05,233 44 137));--mds-avatar-color:rgb(var(--label-orchid-10,253 231 242))}:host([variant=orchid]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-orchid-09,251 213 232));--mds-avatar-color:rgb(var(--label-orchid-05,233 44 137))}:host([variant=violet]){--mds-avatar-background-color:rgb(var(--label-violet-05,145 100 246));--mds-avatar-color:rgb(var(--label-violet-10,240 234 254))}:host([variant=violet]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-violet-09,229 218 253));--mds-avatar-color:rgb(var(--label-violet-05,145 100 246))}:host([variant=purple]){--mds-avatar-background-color:rgb(var(--label-purple-05,168 86 247));--mds-avatar-color:rgb(var(--label-purple-10,244 233 254))}:host([variant=purple]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-purple-09,235 216 253));--mds-avatar-color:rgb(var(--label-purple-05,168 86 247))}:host([variant=blue]){--mds-avatar-background-color:rgb(var(--label-blue-05,90 117 249));--mds-avatar-color:rgb(var(--label-blue-10,233 236 254))}:host([variant=blue]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-blue-09,216 222 254));--mds-avatar-color:rgb(var(--label-blue-05,90 117 249))}:host([variant=sky]){--mds-avatar-background-color:rgb(var(--label-sky-05,12 136 193));--mds-avatar-color:rgb(var(--label-sky-10,217 241 253))}:host([variant=sky]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-sky-09,185 231 251));--mds-avatar-color:rgb(var(--label-sky-05,12 136 193))}:host([variant=aqua]){--mds-avatar-background-color:rgb(var(--label-aqua-05,5 141 165));--mds-avatar-color:rgb(var(--label-aqua-10,199 245 253))}:host([variant=aqua]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-aqua-09,151 237 252));--mds-avatar-color:rgb(var(--label-aqua-05,5 141 165))}:host([variant=green]){--mds-avatar-background-color:rgb(var(--label-green-05,26 148 71));--mds-avatar-color:rgb(var(--label-green-10,206 247 221))}:host([variant=green]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-green-09,165 240 193));--mds-avatar-color:rgb(var(--label-green-05,26 148 71))}:host([variant=lime]){--mds-avatar-background-color:rgb(var(--label-lime-05,93 143 15));--mds-avatar-color:rgb(var(--label-lime-10,219 247 178))}:host([variant=lime]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-lime-09,189 239 111));--mds-avatar-color:rgb(var(--label-lime-05,93 143 15))}:host([variant=yellow]){--mds-avatar-background-color:rgb(var(--label-yellow-05,161 124 6));--mds-avatar-color:rgb(var(--label-yellow-10,253 236 186))}:host([variant=yellow]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-yellow-09,251 221 131));--mds-avatar-color:rgb(var(--label-yellow-05,161 124 6))}:host([variant=orange]){--mds-avatar-background-color:rgb(var(--label-orange-05,213 90 5));--mds-avatar-color:rgb(var(--label-orange-10,254 233 219))}:host([variant=orange]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--label-orange-09,253 217 191));--mds-avatar-color:rgb(var(--label-orange-05,213 90 5))}:host([variant=error]){--mds-avatar-background-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-avatar-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-avatar-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=warning]){--mds-avatar-background-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-avatar-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-avatar-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=info]){--mds-avatar-background-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-avatar-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-avatar-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-avatar-background-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-avatar-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=weak]){--mds-avatar-background-color:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-avatar-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-avatar-transition-duration:0s}:host([pref-contrast=more]) :is(.avatar--fallback,.avatar--icon,.avatar--initials){-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)) inset;box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)) inset}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-avatar-transition-duration:0s}}@media (prefers-contrast:more){:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) :is(.avatar--fallback,.avatar--icon,.avatar--initials){-webkit-box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)),var(--shadow-lg,0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a);box-shadow:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3)),var(--shadow-lg,0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a)}}'};var MdsAvatar=/** @class */function(){function a(a){var r=this;registerInstance(this,a);this.fallback=false;this.loaded=true;this.fittyInitialized=false;this.textChanged=false;this.variants=["amaranth","aqua","blue","error","green","info","lime","orange","orchid","primary","sky","success","violet","warning","yellow"];this.addFontResize=function(){var a;if(r.fittyInitialized){return}var t=(a=r.element.shadowRoot)===null||a===void 0?void 0:a.querySelector(".fit");r.fittyElements=fitty(t,{minSize:10});r.observer=new ResizeObserver((function(a){a.forEach((function(){r.fittyElements.fit()}))}));r.observer.observe(r.element);r.fittyInitialized=true};this.removeFontResize=function(){if(!r.fittyInitialized){return}r.fittyInitialized=false;r.observer.unobserve(r.element)};this.checkText=function(a){if(a!==""&&a!==undefined){if(r.fittyInitialized)return;if(!r.fittyInitialized)r.addFontResize();return}if(r.fittyInitialized)r.removeFontResize()};this.handleImgLoadError=function(){r.loaded=true;r.fallback=true};this.handleImgLoadSuccess=function(){r.loaded=true};
|
|
6
|
+
// a removed attribute or a null bound by a framework counts as not set, like '' or 0
|
|
7
|
+
this.hasCount=function(){var a;var t=(a=r.count)!==null&&a!==void 0?a:0;return t!==0&&!Number.isNaN(t)};this.checkTexts=function(){var a;var t=(a=r.initials)!==null&&a!==void 0?a:"";if(t!=="")r.checkText(t);if(r.hasCount())r.checkText(String(r.count))};this.checkInitialsVariant=function(){var a;var t=(a=r.initials)!==null&&a!==void 0?a:"";if(t!==""){var e=t.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"").substring(0,2);if(e.length===1){e=e+e}r.variant=r.variants[(e.substring(0,1).charCodeAt(0)+e.substring(1,2).charCodeAt(0))%avatarVariant.length]}}}a.prototype.componentWillLoad=function(){this.checkInitialsVariant()};a.prototype.componentDidLoad=function(){if(this.src!==undefined){this.loaded=false}this.checkTexts()};a.prototype.componentDidRender=function(){if(this.textChanged){
|
|
6
8
|
// placed here becase @Watch('initials') is fired
|
|
7
9
|
// BEFORE the element .fit is attached on shDOM
|
|
8
|
-
|
|
10
|
+
this.checkTexts();this.textChanged=false}};a.prototype.initialsHandler=function(){this.textChanged=true;this.checkInitialsVariant()};a.prototype.countHandler=function(){this.textChanged=true;this.checkInitialsVariant()};a.prototype.srcHandler=function(a){if(a===undefined){this.loaded=true}};a.prototype.iconHandler=function(a){if(a!==undefined){this.loaded=true}};a.prototype.render=function(){var a,r,t,e;var n=this.hasCount();var o=(a=this.icon)!==null&&a!==void 0?a:"";var i=o!=="";var s=((r=this.initials)!==null&&r!==void 0?r:"")!=="";var l=((t=this.src)!==null&&t!==void 0?t:"")!=="";return h(Host,{key:"87e19218bbfe6e9c79f5edd7b4dd0350572b4f84","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast},h("div",{key:"b8775a55b682778312539df8ba0d8107075873e1",class:clsx("avatar",s&&!this.fallback&&!l&&"avatar--initials",(this.fallback||!i&&!s&&!l)&&"avatar--fallback",i&&"avatar--icon",this.loaded?"avatar--loaded":"avatar--pending"),part:"wrapper"},s&&!n&&!this.fallback&&!l&&h("div",{key:"acea5faae52d0cfaaa8f03788a22c89c8f0095ad",class:"initials-text"},h("span",{key:"aedd03f85b197fc6ed24b4a0238804856145aa4c",class:"fit"},(e=this.initials)===null||e===void 0?void 0:e.substring(0,2))),n&&!this.fallback&&!l&&h("div",{key:"dd8af02204937c6558ab63b26d5993aa34e4df37",class:"initials-text"},h("span",{key:"fdf6930557054172bea785b8c6be0decb743887a",class:"fit"},"+",this.count)),l&&!n&&!this.fallback&&!i&&h("mds-img",{key:"4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed",class:"image",loading:"lazy",onMdsImgLoadError:this.handleImgLoadError,onMdsImgLoadSuccess:this.handleImgLoadSuccess,part:"media",src:this.src}),i&&!s&&!n&&h("mds-icon",{key:"5958962b68d5797dd46f1322b0e12717bf70c93e",class:"icon",part:"icon",name:o}),(this.fallback||!i&&!s&&!n&&!l)&&h("i",{key:"e6509636da3e20d93144dde5f3ecce6f1cfc5506",class:"fallback-icon",innerHTML:miBaselinePerson})))};Object.defineProperty(a.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{initials:[{initialsHandler:0}],count:[{countHandler:0}],src:[{srcHandler:0}],icon:[{iconHandler:0}]}},enumerable:false,configurable:true});return a}();MdsAvatar.style=mdsAvatarCss();export{MdsAvatar as mds_avatar};
|
|
@@ -7,6 +7,5 @@ import{r as registerInstance,h,e as Host,g as getElement}from"./index-DIiEV39g.j
|
|
|
7
7
|
*/this.tone="weak";
|
|
8
8
|
/**
|
|
9
9
|
* Specifies the typography of the element
|
|
10
|
-
*/this.typography="option";this.onSlotChangeHandler=function(){
|
|
11
|
-
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
12
|
-
if(r.label!==undefined&&r.label!=="")return;r.label=readSlottedLabel(r.host)}}a.prototype.labelChanged=function(a){this.label=sanitizeLabel(a)};a.prototype.render=function(){return h(Host,{key:"86aa308e28dc28decde0195a23c8551084c36ed1","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("mds-text",{key:"32566dfede9c11a1de5ba48051cc5e2dffe4f35e",tag:"span",typography:this.typography,variant:"info",text:this.label},this.label||h("slot",{key:"e7055d4c61bfc4ea0876cc849a829ae0ce77c5d2",onSlotchange:this.onSlotChangeHandler})))};Object.defineProperty(a.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{label:[{labelChanged:0}]}},enumerable:false,configurable:true});return a}();MdsBadge.style=mdsBadgeCss();export{MdsBadge as mds_badge};
|
|
10
|
+
*/this.typography="option";this.onSlotChangeHandler=function(){var a;
|
|
11
|
+
/* this should be removed in the future once slotted text is no longer used, use the label property instead */if(((a=r.label)!==null&&a!==void 0?a:"")!=="")return;r.label=readSlottedLabel(r.host)}}a.prototype.labelChanged=function(a){this.label=sanitizeLabel(a)};a.prototype.render=function(){return h(Host,{key:"30205c3754c77ad904a3a01a695ec9daf058bd81","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("mds-text",{key:"3a850df57ca87e8efbf505094f3d1e4e309deb42",tag:"span",typography:this.typography,variant:"info",text:this.label},this.label||h("slot",{key:"99531173211bd788d288b9d20d36d5eb7b2dc95e",onSlotchange:this.onSlotChangeHandler})))};Object.defineProperty(a.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{label:[{labelChanged:0}]}},enumerable:false,configurable:true});return a}();MdsBadge.style=mdsBadgeCss();export{MdsBadge as mds_badge};
|
|
@@ -10,6 +10,5 @@ import{r as registerInstance,h,e as Host,g as getElement}from"./index-DIiEV39g.j
|
|
|
10
10
|
*/this.variant="dark";
|
|
11
11
|
/**
|
|
12
12
|
* Sets the size of the component
|
|
13
|
-
*/this.size="md";this.onSlotChangeHandler=function(){
|
|
14
|
-
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
15
|
-
if(a.label!==undefined&&a.label!=="")return;a.label=readSlottedLabel(a.host)}}e.prototype.labelChanged=function(e){this.label=sanitizeLabel(e)};e.prototype.render=function(){var e;return h(Host,{key:"1c2d9a434915c3bd3487e3accddc100cb457178b"},h("div",{key:"809bfc18d2042c97685adb031b65f3444a1ba3c4",class:"infos"},h("mds-text",{key:"f328a5c085a268ac48839e9553fe48a0d57873f8",typography:this.typography,class:"label",id:"label",truncate:"word"},this.label||h("slot",{key:"d61cde55186ab7d8aa186fb740b35fb9e5e964f4",onSlotchange:this.onSlotChangeHandler})),h("mds-text",{key:"2f0145a1c718cb646fb28e05e6f828c196c8902e",typography:this.typography,class:"value",truncate:"word"},(e=this.alias)!==null&&e!==void 0?e:this.value)),h("mds-progress",{key:"ad484ee140a19ccde21e5a50df8532c03508350a","aria-labelledby":"label","aria-valuetext":this.alias,class:"progress",variant:this.variant,progress:this.value/100,size:this.size,part:"progress-bar"}))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{label:[{labelChanged:0}]}},enumerable:false,configurable:true});return e}();MdsBenchmarkBar.style=mdsBenchmarkBarCss();export{MdsBenchmarkBar as mds_benchmark_bar};
|
|
13
|
+
*/this.size="md";this.onSlotChangeHandler=function(){var e;
|
|
14
|
+
/* this should be removed in the future once slotted text is no longer used, use the label property instead */if(((e=a.label)!==null&&e!==void 0?e:"")!=="")return;a.label=readSlottedLabel(a.host)}}e.prototype.labelChanged=function(e){this.label=sanitizeLabel(e)};e.prototype.render=function(){var e;return h(Host,{key:"e07ff600bed598dc0d97144ef596c2a2010efbbd"},h("div",{key:"d3493800ec6d4f20e36d38132f10a3b67f565006",class:"infos"},h("mds-text",{key:"07423f38822e314059dcee2cda38abffbea3bb62",typography:this.typography,class:"label",id:"label",truncate:"word"},this.label||h("slot",{key:"e4aff25b3be0d2f87aefb2a88dd6050715c74d56",onSlotchange:this.onSlotChangeHandler})),h("mds-text",{key:"8b1ec4a01389199b881f46a69ccee96c8867446e",typography:this.typography,class:"value",truncate:"word"},(e=this.alias)!==null&&e!==void 0?e:this.value)),h("mds-progress",{key:"bc44dc2a31dd43599393df1129671da224f45f43","aria-labelledby":"label","aria-valuetext":this.alias,class:"progress",variant:this.variant,progress:this.value/100,size:this.size,part:"progress-bar"}))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{label:[{labelChanged:0}]}},enumerable:false,configurable:true});return e}();MdsBenchmarkBar.style=mdsBenchmarkBarCss();export{MdsBenchmarkBar as mds_benchmark_bar};
|
|
@@ -11,4 +11,4 @@ import{r as registerInstance,h,e as Host}from"./index-DIiEV39g.js";var mdsBiblio
|
|
|
11
11
|
// 2001, August
|
|
12
12
|
var i=a.getDate(t);if(i.toString()==="Invalid Date")return"";return"".concat(i.getFullYear(),", ").concat(a.monthName(i.getMonth())," ").concat(i.getDate())};this.dateFormatMLA=function(t){
|
|
13
13
|
// 21 July 1986
|
|
14
|
-
var i=a.getDate(t);if(i.toString()==="Invalid Date")return"";return"".concat(i.getDate()," ").concat(a.monthName(i.getMonth())," ").concat(i.getFullYear())};this.fullNameAPA=function(t,a){var i;var e="";if(t.includes(" ")){var r=new RegExp(/(\w+)/,"g");(i=t.match(r))===null||i===void 0?void 0:i.forEach((function(t){e="".concat(e," ").concat(t.substring(0,1),".")}))}else{e=" ".concat(t.substring(0,1),".")}return"".concat(a).concat(a!==""?",":"").concat(e)};this.fullNameMLA=function(t,a){var i;var e="";if(t.includes(" ")){var r=new RegExp(/(\w+)/,"g");(i=t.match(r))===null||i===void 0?void 0:i.forEach((function(t,a){e=a===0?t:"".concat(e," ").concat(t.substring(0,1),".")}))}else{e=t}return"".concat(a).concat(a!==""?",":""," ").concat(e)};this.formatAuthors=function(t){var i;var
|
|
14
|
+
var i=a.getDate(t);if(i.toString()==="Invalid Date")return"";return"".concat(i.getDate()," ").concat(a.monthName(i.getMonth())," ").concat(i.getFullYear())};this.fullNameAPA=function(t,a){var i;var e="";if(t.includes(" ")){var r=new RegExp(/(\w+)/,"g");(i=t.match(r))===null||i===void 0?void 0:i.forEach((function(t){e="".concat(e," ").concat(t.substring(0,1),".")}))}else{e=" ".concat(t.substring(0,1),".")}return"".concat(a).concat(a!==""?",":"").concat(e)};this.fullNameMLA=function(t,a){var i;var e="";if(t.includes(" ")){var r=new RegExp(/(\w+)/,"g");(i=t.match(r))===null||i===void 0?void 0:i.forEach((function(t,a){e=a===0?t:"".concat(e," ").concat(t.substring(0,1),".")}))}else{e=t}return"".concat(a).concat(a!==""?",":""," ").concat(e)};this.formatAuthors=function(t){var i,e;var r=t.replace(/"/g,"'");var n=new RegExp(/([A-Za-z ]{2,})/g);var o=(i=r.match(n))!==null&&i!==void 0?i:r;if(o.length>1){var s=o[0].trim();var d=o[1]!==""?o[1].trim():"";return{apa:a.fullNameAPA(s,d),firstName:s,lastName:d,mla:a.fullNameMLA(s,d),turabian:a.fullNameMLA(s,d)}}var l=o[0].split(" ")[0].trim();var h=((e=o[0].split(" ")[1])!==null&&e!==void 0?e:"").trim();return{apa:a.fullNameAPA(l,h),firstName:l,lastName:h,mla:a.fullNameMLA(l,h),turabian:a.fullNameMLA(l,h)}};this.normalizeAuthors=function(t){var i=[];if(t.includes(",")){var e=t.split(",");e.forEach((function(t){i.push(a.formatAuthors(t))}));return i}i.push(a.formatAuthors(t));return i};this.showAuthors=function(t){var i="";t.forEach((function(t,e){i=e===0?t[a.format]:"".concat(i,", ").concat(a.separator[a.format]," ").concat(t[a.format])}));return i}}t.prototype.render=function(){var t,a,i;return h(Host,{key:"4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef"},h("mds-text",{key:"30052872c829ff3b2c142cd54cb64eebcd558f76",typography:this.typography,variant:this.variant},this.author&&h("span",{key:"14d5043a19e193f34a4502029d7dc21fe2ae8083"},this.showAuthors(this.normalizeAuthors(this.author))),this.format==="mla"&&h("span",{key:"7b903d623a57baf664c7cd425e78d7a17fca8331"},this.name&&" ",((t=this.name)!==null&&t!==void 0?t:"")!==""&&this.url!==null?h("a",{class:"link",href:this.url,target:"_blank",rel:this.rel},h("b",null,h("i",null,this.name,"."))):h("b",null,h("i",null,this.name,".")),this.location&&h("span",{key:"9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6"}," ",this.location,this.publisher!==undefined?":":"."),this.publisher&&h("span",{key:"3ff1124122ef8d52079fa7337ed51f116fa1f266"}," ",this.publisher,this.date!==undefined?",":"."),this.date&&h("time",{key:"ac4e6e1506bbca2633c95593d44df61622b6e040",dateTime:this.date}," ",this.dateFormatMLA(this.date),".")),this.format==="apa"&&h("span",{key:"71558449f856a09fda8b02f2808c93b1dd72c532"},this.date&&h("time",{key:"f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4",dateTime:this.date}," (",this.dateFormatAPA(this.date),")."),this.name&&" ",((a=this.name)!==null&&a!==void 0?a:"")!==""&&this.url!==null?h("a",{class:"link",href:this.url,target:"_blank",rel:this.rel},h("b",null,h("i",null," ",this.name,"."))):h("b",null,h("i",null," ",this.name,".")),this.location&&h("span",{key:"ecead881a08e1f08ebe0c08f5016414238b0c0aa"}," ",this.location,this.publisher!==undefined?":":"."),this.publisher&&h("span",{key:"7f5caaaecb02bdda257974de0439d0c15e4ebd71"}," ",this.publisher,".")),this.format==="turabian"&&h("span",{key:"e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d"},this.name&&" ",((i=this.name)!==null&&i!==void 0?i:"")!==""&&this.url!==null?h("a",{class:"link",href:this.url,target:"_blank",rel:this.rel},h("b",null,h("i",null," ",this.name,"."))):h("b",null,h("i",null," ",this.name,".")),this.location&&h("span",{key:"1de156ae83032c28eef77b059c52beed6f7bb8a8"}," ",this.location,this.publisher!==undefined?":":","),this.publisher&&h("span",{key:"c82b2387e90227b129d5078561c60492901fb9e3"}," ",this.publisher,this.date!==undefined?",":"."),this.date&&h("time",{key:"fe9da6c7294ee249a0d892cf882a387ba0196159",dateTime:this.date}," ",this.dateFormatMLA(this.date),"."))))};return t}();MdsBibliography.style=mdsBibliographyCss();export{MdsBibliography as mds_bibliography};
|