@maggioli-design-system/magma 2.0.0-beta.5 → 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/README.md +2 -1
- package/dist/cjs/index.cjs.js +64 -22
- package/dist/cjs/{locale.it-D-rxNDkm.js → locale.it-CfUV2hxK.js} +13 -10
- 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 +18 -18
- package/dist/cjs/mds-file.cjs.entry.js +1 -1
- 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/common/file.js +13 -10
- 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-B14Ci2fO.js → p-s2Gu6hY7.js} +1 -1
- package/dist/components/p-zml3K7nx.js +1 -0
- package/dist/documentation.json +5 -5
- package/dist/esm/index.js +64 -22
- package/dist/esm/{locale.it-Dj8sWDfj.js → locale.it-Cvxh7La5.js} +13 -10
- 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 +18 -18
- package/dist/esm/mds-file.entry.js +1 -1
- 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/locale.it-Cvxh7La5.js +6 -0
- 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 +13 -11
- package/dist/esm-es5/mds-file.entry.js +6 -6
- 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 +283 -174
- package/dist/hydrate/index.mjs +283 -174
- 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-7f2e3b74.system.entry.js → p-4f107cb2.system.entry.js} +31 -31
- package/dist/magma-components/p-4oB0woT9.system.js +6 -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-8103d4d4.system.entry.js → p-8b1abf81.system.entry.js} +12 -10
- 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-B6mQg6yQ.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-9d9a947b.entry.js → p-b35c26f8.entry.js} +2 -2
- 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 +411 -411
- 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 +11 -11
- 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-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/components/p-sUKtonkE.js +0 -8
- package/dist/esm-es5/locale.it-Dj8sWDfj.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-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-7d317ff0.entry.js +0 -8
- 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-CSb7Iu19.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
- package/dist/magma-components/p-ihVfCXG4.system.js +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ Use the versions of `@maggioli-design-system/design-tokens` and `@maggioli-desig
|
|
|
21
21
|
| magma | design-tokens | styles |
|
|
22
22
|
| :--- | :--- | :--- |
|
|
23
23
|
| `1.x` (before Magma 2) | `13.x` (latest `13.7.2`) | `15.x` (latest `15.11.1`) |
|
|
24
|
-
| `2.
|
|
24
|
+
| `2.0.0-alpha.0` to `2.0.0-beta.3` (prereleases) | `14.x` | `16.x` |
|
|
25
|
+
| `2.x` and later | `>= 15` | `>= 17` |
|
|
25
26
|
|
|
26
27
|
#### Tones name changes
|
|
27
28
|
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -11,10 +11,23 @@ function promisifyRequest(request) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function createStore(dbName, storeName) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
let dbp;
|
|
15
|
+
const getDB = () => {
|
|
16
|
+
if (dbp)
|
|
17
|
+
return dbp;
|
|
18
|
+
const request = indexedDB.open(dbName);
|
|
19
|
+
request.onupgradeneeded = () => request.result.createObjectStore(storeName);
|
|
20
|
+
dbp = promisifyRequest(request);
|
|
21
|
+
dbp.then((db) => {
|
|
22
|
+
// It seems like Safari sometimes likes to just close the connection.
|
|
23
|
+
// It's supposed to fire this event when that happens. Let's hope it does!
|
|
24
|
+
db.onclose = () => (dbp = undefined);
|
|
25
|
+
}, () => {
|
|
26
|
+
dbp = undefined;
|
|
27
|
+
});
|
|
28
|
+
return dbp;
|
|
29
|
+
};
|
|
30
|
+
return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
|
|
18
31
|
}
|
|
19
32
|
let defaultGetStoreFunc;
|
|
20
33
|
function defaultGetStore() {
|
|
@@ -98,7 +111,7 @@ class IconsSetController {
|
|
|
98
111
|
this._iconsSets = new Map();
|
|
99
112
|
this._svgPathUpdate = 'mdsIconSvgPathUpdate';
|
|
100
113
|
this.cacheExp = 60 * 60 * 1000 * 24;
|
|
101
|
-
this.listeners =
|
|
114
|
+
this.listeners = new Set();
|
|
102
115
|
this.memoryCache = {};
|
|
103
116
|
// Try to retrieve svg from cache
|
|
104
117
|
this.isCacheAvailable = async (url) => {
|
|
@@ -177,29 +190,46 @@ class IconsSetController {
|
|
|
177
190
|
return { set: this._iconsSets.get(iconName.split('/')[0]) };
|
|
178
191
|
}
|
|
179
192
|
/**
|
|
180
|
-
*
|
|
193
|
+
* Sets the directory of the svg files. Query and fragment are dropped: the icon name is
|
|
194
|
+
* appended to the path.
|
|
181
195
|
*
|
|
182
|
-
* input path: https://www.abc.com/svg/path
|
|
183
|
-
* svgPath =
|
|
196
|
+
* input path: https://www.abc.com/svg/path/
|
|
197
|
+
* svgPath = https://www.abc.com/svg/path/
|
|
184
198
|
*
|
|
185
|
-
* input path: localhost:9000/svg/path
|
|
186
|
-
* svgPath = localhost:9000/svg/path
|
|
199
|
+
* input path: localhost:9000/svg/path/
|
|
200
|
+
* svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
|
|
187
201
|
*
|
|
188
|
-
* input path: /svg/path
|
|
189
|
-
* svgPath =
|
|
202
|
+
* input path: /svg/path/ or svg/path/
|
|
203
|
+
* svgPath = unchanged, resolved by `fetch` against the document base URL on each request
|
|
190
204
|
*
|
|
191
|
-
* input path:
|
|
205
|
+
* input path: empty or not a URL
|
|
192
206
|
* throw error
|
|
193
|
-
*
|
|
194
207
|
*/
|
|
195
208
|
setSvgPath(svgPath) {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
209
|
+
const error = Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
|
|
210
|
+
if (typeof svgPath !== 'string' || svgPath.trim() === '') {
|
|
211
|
+
throw error;
|
|
212
|
+
}
|
|
213
|
+
const value = svgPath.trim();
|
|
214
|
+
// a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
|
|
215
|
+
const path = /^[\w.-]+:\d+(\/|$)/.test(value) ? `//${value}` : value;
|
|
216
|
+
let url;
|
|
217
|
+
try {
|
|
218
|
+
// the placeholder base only validates a path, which is kept as it is
|
|
219
|
+
url = new URL(path, 'http://localhost/');
|
|
220
|
+
}
|
|
221
|
+
catch (_a) {
|
|
222
|
+
throw error;
|
|
200
223
|
}
|
|
201
224
|
if (typeof window !== 'undefined') {
|
|
202
|
-
|
|
225
|
+
if (/^[a-z][a-z\d+.-]*:/i.test(path)) {
|
|
226
|
+
url.search = '';
|
|
227
|
+
url.hash = '';
|
|
228
|
+
this._svgPath = url.href;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
this._svgPath = path.replace(/[?#].*$/, '');
|
|
232
|
+
}
|
|
203
233
|
window.dispatchEvent(new Event(this._svgPathUpdate));
|
|
204
234
|
}
|
|
205
235
|
}
|
|
@@ -207,7 +237,10 @@ class IconsSetController {
|
|
|
207
237
|
return this._svgPath;
|
|
208
238
|
}
|
|
209
239
|
registerListener(callback) {
|
|
210
|
-
this.listeners.
|
|
240
|
+
this.listeners.add(callback);
|
|
241
|
+
}
|
|
242
|
+
unregisterListener(callback) {
|
|
243
|
+
this.listeners.delete(callback);
|
|
211
244
|
}
|
|
212
245
|
setUpListener() {
|
|
213
246
|
if (typeof window !== 'undefined') {
|
|
@@ -227,6 +260,10 @@ class IconsSetController {
|
|
|
227
260
|
if (index.Build.isServer && !index.Build.isTesting) {
|
|
228
261
|
return '';
|
|
229
262
|
}
|
|
263
|
+
// an icon without the attribute passes an undefined (or null) name: there is nothing to load
|
|
264
|
+
if (!name) {
|
|
265
|
+
return '';
|
|
266
|
+
}
|
|
230
267
|
try {
|
|
231
268
|
if (!this._svgPath && typeof window === 'undefined') {
|
|
232
269
|
throw Error('Cant find svgPath, ensure you set it');
|
|
@@ -248,9 +285,14 @@ class IconsSetController {
|
|
|
248
285
|
}
|
|
249
286
|
}
|
|
250
287
|
const src = this._svgPath && !name.startsWith('http') ? this._svgPath.concat(name, '.svg') : name;
|
|
288
|
+
// Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
|
|
289
|
+
if (this.memoryCache[src]) {
|
|
290
|
+
return this.memoryCache[src];
|
|
291
|
+
}
|
|
251
292
|
const lsCache = await this.isCacheAvailable(src);
|
|
252
|
-
if (
|
|
253
|
-
|
|
293
|
+
if (lsCache) {
|
|
294
|
+
this.memoryCache[src] = lsCache;
|
|
295
|
+
return lsCache;
|
|
254
296
|
}
|
|
255
297
|
const response = await fetch(src);
|
|
256
298
|
if (!response.ok) {
|
|
@@ -118,21 +118,24 @@ const sanitizeFilename = (filename, error = 'Attribute "filename" is undefined.'
|
|
|
118
118
|
}
|
|
119
119
|
return filename;
|
|
120
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Index of the dot that separates the name from the extension: the last one, so that the dots
|
|
123
|
+
* inside the name are kept (`report.v2.final.docx`). A leading dot is part of the name
|
|
124
|
+
* (`.env` has no extension). Returns -1 when the filename has no extension.
|
|
125
|
+
*/
|
|
126
|
+
const getExtensionSeparator = (filename) => {
|
|
127
|
+
const dot = filename.lastIndexOf('.');
|
|
128
|
+
return dot > 0 ? dot : -1;
|
|
129
|
+
};
|
|
121
130
|
const sanitizeSuffix = (rawFilename) => {
|
|
122
|
-
var _a;
|
|
123
131
|
const filename = sanitizeFilename(rawFilename);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
return filename;
|
|
132
|
+
const dot = getExtensionSeparator(filename);
|
|
133
|
+
return dot === -1 ? filename : filename.slice(dot + 1);
|
|
128
134
|
};
|
|
129
135
|
const getName = (rawFilename) => {
|
|
130
|
-
var _a;
|
|
131
136
|
const filename = sanitizeFilename(rawFilename);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
return filename;
|
|
137
|
+
const dot = getExtensionSeparator(filename);
|
|
138
|
+
return dot === -1 ? filename : filename.slice(0, dot);
|
|
136
139
|
};
|
|
137
140
|
const getSuffix = (rawFilename, suffixOverride) => {
|
|
138
141
|
const suffix = sanitizeSuffix(rawFilename);
|
|
@@ -115,9 +115,25 @@ const MdsAvatar = class {
|
|
|
115
115
|
this.handleImgLoadSuccess = () => {
|
|
116
116
|
this.loaded = true;
|
|
117
117
|
};
|
|
118
|
+
// a removed attribute or a null bound by a framework counts as not set, like '' or 0
|
|
119
|
+
this.hasCount = () => {
|
|
120
|
+
var _a;
|
|
121
|
+
const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
|
|
122
|
+
return count !== 0 && !Number.isNaN(count);
|
|
123
|
+
};
|
|
124
|
+
this.checkTexts = () => {
|
|
125
|
+
var _a;
|
|
126
|
+
const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
|
|
127
|
+
if (initials !== '')
|
|
128
|
+
this.checkText(initials);
|
|
129
|
+
if (this.hasCount())
|
|
130
|
+
this.checkText(String(this.count));
|
|
131
|
+
};
|
|
118
132
|
this.checkInitialsVariant = () => {
|
|
119
|
-
|
|
120
|
-
|
|
133
|
+
var _a;
|
|
134
|
+
const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
|
|
135
|
+
if (initials !== '') {
|
|
136
|
+
let cleanedInitials = initials
|
|
121
137
|
.toLowerCase()
|
|
122
138
|
.replace(/[^a-zA-Z0-9]+/g, '')
|
|
123
139
|
.substring(0, 2);
|
|
@@ -138,21 +154,13 @@ const MdsAvatar = class {
|
|
|
138
154
|
if (this.src !== undefined) {
|
|
139
155
|
this.loaded = false;
|
|
140
156
|
}
|
|
141
|
-
|
|
142
|
-
this.checkText(this.initials);
|
|
143
|
-
}
|
|
144
|
-
if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count)) {
|
|
145
|
-
this.checkText(this.count.toString());
|
|
146
|
-
}
|
|
157
|
+
this.checkTexts();
|
|
147
158
|
}
|
|
148
159
|
componentDidRender() {
|
|
149
160
|
if (this.textChanged) {
|
|
150
161
|
// placed here becase @Watch('initials') is fired
|
|
151
162
|
// BEFORE the element .fit is attached on shDOM
|
|
152
|
-
|
|
153
|
-
this.checkText(this.initials);
|
|
154
|
-
if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count))
|
|
155
|
-
this.checkText(this.count.toString());
|
|
163
|
+
this.checkTexts();
|
|
156
164
|
this.textChanged = false;
|
|
157
165
|
}
|
|
158
166
|
}
|
|
@@ -175,26 +183,13 @@ const MdsAvatar = class {
|
|
|
175
183
|
}
|
|
176
184
|
}
|
|
177
185
|
render() {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials &&
|
|
186
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
187
|
-
!this.fallback &&
|
|
188
|
-
(this.src === undefined || this.src === '') && (index.h("div", { key: '08dd0918a258022793f5331a9de7b2460a2e1404', class: "initials-text" }, index.h("span", { key: '69379497bb9096cea56b366c52ba5372adb5506d', class: "fit" }, this.initials.substring(0, 2)))), this.count && !this.fallback && (this.src === undefined || this.src === '') && (index.h("div", { key: '07c1e94db40562b8a2467605591236433fd6af39', class: "initials-text" }, index.h("span", { key: '36c2b72540c03d140f97d64304d46583419d23df', class: "fit" }, "+", this.count))), this.src &&
|
|
189
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
190
|
-
!this.fallback &&
|
|
191
|
-
(this.icon === undefined || this.icon === '') && (index.h("mds-img", { key: '9d6a6d4a12a5142686aede6e9f9a974f592b674f', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), this.icon &&
|
|
192
|
-
(this.initials === undefined || this.initials === '') &&
|
|
193
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) && (index.h("mds-icon", { key: 'b37eae32b77654190b14d8b046d2f9a51801ae2a', class: "icon", part: "icon", name: this.icon })), (this.fallback ||
|
|
194
|
-
((this.icon === undefined || this.icon === '') &&
|
|
195
|
-
(this.initials === undefined || this.initials === '') &&
|
|
196
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
197
|
-
(this.src === undefined || this.src === ''))) && (index.h("i", { key: '18d842d4aea1f73adef926ff74a896a9d8a52bc6', class: "fallback-icon", innerHTML: miBaselinePerson })))));
|
|
186
|
+
var _a, _b, _c, _d;
|
|
187
|
+
const hasCount = this.hasCount();
|
|
188
|
+
const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
|
|
189
|
+
const hasIcon = icon !== '';
|
|
190
|
+
const hasInitials = ((_b = this.initials) !== null && _b !== void 0 ? _b : '') !== '';
|
|
191
|
+
const hasSrc = ((_c = this.src) !== null && _c !== void 0 ? _c : '') !== '';
|
|
192
|
+
return (index.h(index.Host, { key: '87e19218bbfe6e9c79f5edd7b4dd0350572b4f84', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast }, index.h("div", { key: 'b8775a55b682778312539df8ba0d8107075873e1', class: clsx.clsx('avatar', hasInitials && !this.fallback && !hasSrc && 'avatar--initials', (this.fallback || (!hasIcon && !hasInitials && !hasSrc)) && 'avatar--fallback', hasIcon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, hasInitials && !hasCount && !this.fallback && !hasSrc && (index.h("div", { key: 'acea5faae52d0cfaaa8f03788a22c89c8f0095ad', class: "initials-text" }, index.h("span", { key: 'aedd03f85b197fc6ed24b4a0238804856145aa4c', class: "fit" }, (_d = this.initials) === null || _d === void 0 ? void 0 : _d.substring(0, 2)))), hasCount && !this.fallback && !hasSrc && (index.h("div", { key: 'dd8af02204937c6558ab63b26d5993aa34e4df37', class: "initials-text" }, index.h("span", { key: 'fdf6930557054172bea785b8c6be0decb743887a', class: "fit" }, "+", this.count))), hasSrc && !hasCount && !this.fallback && !hasIcon && (index.h("mds-img", { key: '4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), hasIcon && !hasInitials && !hasCount && (index.h("mds-icon", { key: '5958962b68d5797dd46f1322b0e12717bf70c93e', class: "icon", part: "icon", name: icon })), (this.fallback || (!hasIcon && !hasInitials && !hasCount && !hasSrc)) && (index.h("i", { key: 'e6509636da3e20d93144dde5f3ecce6f1cfc5506', class: "fallback-icon", innerHTML: miBaselinePerson })))));
|
|
198
193
|
}
|
|
199
194
|
get element() { return index.getElement(this); }
|
|
200
195
|
static get watchers() { return {
|
|
@@ -22,8 +22,9 @@ const MdsBadge = class {
|
|
|
22
22
|
*/
|
|
23
23
|
this.typography = 'option';
|
|
24
24
|
this.onSlotChangeHandler = () => {
|
|
25
|
+
var _a;
|
|
25
26
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
26
|
-
if (this.label !==
|
|
27
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
27
28
|
return;
|
|
28
29
|
this.label = slot.readSlottedLabel(this.host);
|
|
29
30
|
};
|
|
@@ -32,7 +33,7 @@ const MdsBadge = class {
|
|
|
32
33
|
this.label = slot.sanitizeLabel(newValue);
|
|
33
34
|
}
|
|
34
35
|
render() {
|
|
35
|
-
return (index.h(index.Host, { key: '
|
|
36
|
+
return (index.h(index.Host, { key: '30205c3754c77ad904a3a01a695ec9daf058bd81', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("mds-text", { key: '3a850df57ca87e8efbf505094f3d1e4e309deb42', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || index.h("slot", { key: '99531173211bd788d288b9d20d36d5eb7b2dc95e', onSlotchange: this.onSlotChangeHandler }))));
|
|
36
37
|
}
|
|
37
38
|
get host() { return index.getElement(this); }
|
|
38
39
|
static get watchers() { return {
|
|
@@ -25,8 +25,9 @@ const MdsBenchmarkBar = class {
|
|
|
25
25
|
*/
|
|
26
26
|
this.size = 'md';
|
|
27
27
|
this.onSlotChangeHandler = () => {
|
|
28
|
+
var _a;
|
|
28
29
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
29
|
-
if (this.label !==
|
|
30
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
30
31
|
return;
|
|
31
32
|
this.label = slot.readSlottedLabel(this.host);
|
|
32
33
|
};
|
|
@@ -36,7 +37,7 @@ const MdsBenchmarkBar = class {
|
|
|
36
37
|
}
|
|
37
38
|
render() {
|
|
38
39
|
var _a;
|
|
39
|
-
return (index.h(index.Host, { key: '
|
|
40
|
+
return (index.h(index.Host, { key: 'e07ff600bed598dc0d97144ef596c2a2010efbbd' }, index.h("div", { key: 'd3493800ec6d4f20e36d38132f10a3b67f565006', class: "infos" }, index.h("mds-text", { key: '07423f38822e314059dcee2cda38abffbea3bb62', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || index.h("slot", { key: 'e4aff25b3be0d2f87aefb2a88dd6050715c74d56', onSlotchange: this.onSlotChangeHandler })), index.h("mds-text", { key: '8b1ec4a01389199b881f46a69ccee96c8867446e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), index.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" })));
|
|
40
41
|
}
|
|
41
42
|
get host() { return index.getElement(this); }
|
|
42
43
|
static get watchers() { return {
|
|
@@ -87,7 +87,7 @@ const MdsBibliography = class {
|
|
|
87
87
|
return `${lastName}${lastName !== '' ? ',' : ''} ${formattedFirstName}`;
|
|
88
88
|
};
|
|
89
89
|
this.formatAuthors = (author) => {
|
|
90
|
-
var _a;
|
|
90
|
+
var _a, _b;
|
|
91
91
|
const authorName = author.replace(/"/g, "'");
|
|
92
92
|
const splitNames = new RegExp(/([A-Za-z ]{2,})/g);
|
|
93
93
|
const fullName = (_a = authorName.match(splitNames)) !== null && _a !== void 0 ? _a : authorName;
|
|
@@ -103,7 +103,7 @@ const MdsBibliography = class {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
const firstName = fullName[0].split(' ')[0].trim();
|
|
106
|
-
const lastName = fullName[0].split(' ')[1] !==
|
|
106
|
+
const lastName = ((_b = fullName[0].split(' ')[1]) !== null && _b !== void 0 ? _b : '').trim();
|
|
107
107
|
return {
|
|
108
108
|
apa: this.fullNameAPA(firstName, lastName),
|
|
109
109
|
firstName,
|
|
@@ -136,7 +136,8 @@ const MdsBibliography = class {
|
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
138
|
render() {
|
|
139
|
-
|
|
139
|
+
var _a, _b, _c;
|
|
140
|
+
return (index.h(index.Host, { key: '4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef' }, index.h("mds-text", { key: '30052872c829ff3b2c142cd54cb64eebcd558f76', typography: this.typography, variant: this.variant }, this.author && index.h("span", { key: '14d5043a19e193f34a4502029d7dc21fe2ae8083' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (index.h("span", { key: '7b903d623a57baf664c7cd425e78d7a17fca8331' }, this.name && ' ', ((_a = this.name) !== null && _a !== void 0 ? _a : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, this.name, ".")))) : (index.h("b", null, index.h("i", null, this.name, "."))), this.location && (index.h("span", { key: '9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (index.h("span", { key: '3ff1124122ef8d52079fa7337ed51f116fa1f266' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: 'ac4e6e1506bbca2633c95593d44df61622b6e040', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (index.h("span", { key: '71558449f856a09fda8b02f2808c93b1dd72c532' }, this.date && index.h("time", { key: 'f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', ((_b = this.name) !== null && _b !== void 0 ? _b : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: 'ecead881a08e1f08ebe0c08f5016414238b0c0aa' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && index.h("span", { key: '7f5caaaecb02bdda257974de0439d0c15e4ebd71' }, " ", this.publisher, "."))), this.format === 'turabian' && (index.h("span", { key: 'e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d' }, this.name && ' ', ((_c = this.name) !== null && _c !== void 0 ? _c : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: '1de156ae83032c28eef77b059c52beed6f7bb8a8' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (index.h("span", { key: 'c82b2387e90227b129d5078561c60492901fb9e3' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: 'fe9da6c7294ee249a0d892cf882a387ba0196159', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
143
|
MdsBibliography.style = mdsBibliographyCss();
|
|
@@ -103,8 +103,9 @@ const MdsButton = class {
|
|
|
103
103
|
throw Error('Object window is not defined');
|
|
104
104
|
};
|
|
105
105
|
this.onSlotChangeHandler = () => {
|
|
106
|
+
var _a;
|
|
106
107
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
107
|
-
if (this.label !==
|
|
108
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
108
109
|
return;
|
|
109
110
|
this.label = slot.readSlottedLabel(this.host);
|
|
110
111
|
};
|
|
@@ -161,8 +162,9 @@ const MdsButton = class {
|
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
componentWillLoad() {
|
|
165
|
+
var _a;
|
|
164
166
|
this.handleVariantChange(this.variant);
|
|
165
|
-
if (this.href !==
|
|
167
|
+
if (((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '') {
|
|
166
168
|
this.host.addEventListener('click', (e) => {
|
|
167
169
|
var _a;
|
|
168
170
|
e.preventDefault();
|
|
@@ -185,6 +187,7 @@ const MdsButton = class {
|
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
componentDidLoad() {
|
|
190
|
+
var _a;
|
|
188
191
|
this.km.addElement(this.host);
|
|
189
192
|
if (!this.await) {
|
|
190
193
|
this.km.attachClickBehavior();
|
|
@@ -202,9 +205,7 @@ const MdsButton = class {
|
|
|
202
205
|
if (this.label === '') {
|
|
203
206
|
this.label = undefined;
|
|
204
207
|
}
|
|
205
|
-
if ((this.label ===
|
|
206
|
-
this.icon !== undefined &&
|
|
207
|
-
this.icon !== '') {
|
|
208
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '' && this.icon != null && this.icon !== '') {
|
|
208
209
|
const iconTitle = aria.unslugName(this.icon);
|
|
209
210
|
if (!this.host.hasAttribute('aria-label')) {
|
|
210
211
|
aria.setAttributeIfEmpty(this.host, 'title', iconTitle);
|
|
@@ -233,7 +234,7 @@ const MdsButton = class {
|
|
|
233
234
|
render() {
|
|
234
235
|
var _a;
|
|
235
236
|
this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
|
|
236
|
-
return (index.h(index.Host, { key: '
|
|
237
|
+
return (index.h(index.Host, { key: '3d7db80d99477ad9e4ff34c97d0cb0e04160a041', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preference.preferenceStore.state.animation, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '133053ee2566972bbbaf1f47faa87c1f9c30b841', class: "await" }, index.h("mds-spinner", { key: 'ce67aa6522a2c646b1efebf51dcc51d3a987b5c9', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (index.h("mds-icon", { key: '81d183d185387f2e6113869e14cb274a57f44f3b', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), index.h("mds-text", { key: '5ac26dd99519f30bcfe71fcbe0fdd4195055bea2', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || index.h("slot", { key: 'a56c6946ed59d9b9fe481955027015d7f46bcab1', onSlotchange: this.onSlotChangeHandler })), index.h("slot", { key: '1f0a279dd9e57ba7510c879e72d1f815adb76b6b', name: "notification" }), this.icon && this.iconPosition === 'right' && (index.h("mds-icon", { key: 'eb2f6eff668e5195d5725360ba30cb99a6e7a054', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
|
|
237
238
|
}
|
|
238
239
|
static get formAssociated() { return true; }
|
|
239
240
|
get host() { return index.getElement(this); }
|
|
@@ -264,14 +265,31 @@ const mdsIconCss = () => `@layer reset,vendor,theme,base,components,utilities;:h
|
|
|
264
265
|
const MdsIcon = class {
|
|
265
266
|
constructor(hostRef) {
|
|
266
267
|
index.registerInstance(this, hostRef);
|
|
268
|
+
// Each update supersedes the ones still loading: only the latest one sets the svg
|
|
269
|
+
this.lastUpdate = 0;
|
|
270
|
+
this.wasDisconnected = false;
|
|
271
|
+
this.onSvgPathUpdate = () => {
|
|
272
|
+
this.updateIcon();
|
|
273
|
+
};
|
|
267
274
|
this.convertBase64ToSvg = () => {
|
|
268
275
|
const svgBase64 = this.name.replace(BASE64_SVG_ICON, '').replace(/=/i, '');
|
|
269
276
|
return atob(svgBase64);
|
|
270
277
|
};
|
|
271
278
|
}
|
|
279
|
+
connectedCallback() {
|
|
280
|
+
index$1.IconsSetService.registerListener(this.onSvgPathUpdate);
|
|
281
|
+
// the svg path may have changed while the icon was out of the page
|
|
282
|
+
if (this.wasDisconnected) {
|
|
283
|
+
this.wasDisconnected = false;
|
|
284
|
+
this.updateIcon();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
disconnectedCallback() {
|
|
288
|
+
index$1.IconsSetService.unregisterListener(this.onSvgPathUpdate);
|
|
289
|
+
this.wasDisconnected = true;
|
|
290
|
+
}
|
|
272
291
|
componentWillLoad() {
|
|
273
292
|
this.updateIcon();
|
|
274
|
-
index$1.IconsSetService.registerListener(() => this.updateIcon());
|
|
275
293
|
}
|
|
276
294
|
/**
|
|
277
295
|
* Set the path to the directory of svg files
|
|
@@ -282,8 +300,13 @@ const MdsIcon = class {
|
|
|
282
300
|
return Promise.resolve();
|
|
283
301
|
}
|
|
284
302
|
async updateIcon() {
|
|
285
|
-
|
|
303
|
+
var _a;
|
|
304
|
+
const update = ++this.lastUpdate;
|
|
305
|
+
// `name` is undefined (or null) at runtime when the attribute is missing or removed
|
|
306
|
+
if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '') {
|
|
307
|
+
this.svgHTML = '';
|
|
286
308
|
return Promise.resolve();
|
|
309
|
+
}
|
|
287
310
|
if (isIconFormatIsBase64(this.name)) {
|
|
288
311
|
this.svgHTML = this.convertBase64ToSvg();
|
|
289
312
|
return Promise.resolve();
|
|
@@ -292,10 +315,13 @@ const MdsIcon = class {
|
|
|
292
315
|
this.svgHTML = this.name;
|
|
293
316
|
return Promise.resolve();
|
|
294
317
|
}
|
|
295
|
-
|
|
318
|
+
const svgHTML = await index$1.IconsSetService.fetchSvg(this.name);
|
|
319
|
+
if (update === this.lastUpdate) {
|
|
320
|
+
this.svgHTML = svgHTML;
|
|
321
|
+
}
|
|
296
322
|
}
|
|
297
323
|
render() {
|
|
298
|
-
return (index.h(index.Host, { key: '
|
|
324
|
+
return (index.h(index.Host, { key: '9544b1ca2b153e95f6710e0bbed762048676fb48' }, this.svgHTML && index.h("i", { key: '745b56492d69be55e449b94633b09391972e3d79', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
|
|
299
325
|
}
|
|
300
326
|
get hostElement() { return index.getElement(this); }
|
|
301
327
|
static get watchers() { return {
|
|
@@ -295,7 +295,8 @@ const MdsDropdown = class {
|
|
|
295
295
|
this.floatingController.updatePosition();
|
|
296
296
|
}
|
|
297
297
|
targetChanged() {
|
|
298
|
-
|
|
298
|
+
var _a;
|
|
299
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '' || this.floatingController == null)
|
|
299
300
|
return;
|
|
300
301
|
const caller = this.floatingController.updateCaller(this.target);
|
|
301
302
|
if (!caller)
|
|
@@ -364,9 +365,9 @@ const MdsDropdown = class {
|
|
|
364
365
|
this.km.detachEscapeBehavior();
|
|
365
366
|
}
|
|
366
367
|
render() {
|
|
367
|
-
return (index.h(index.Host, { key: '
|
|
368
|
+
return (index.h(index.Host, { key: '42bb1259088a7cc15869cd0cbf007ce9f34331cb', style: {
|
|
368
369
|
zIndex: `${this.zIndex}`,
|
|
369
|
-
}, "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '
|
|
370
|
+
}, "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '6a2caa47a6dca50fe6ae209229daddcd7791473d', class: "arrow", innerHTML: arrowSvg }), index.h("slot", { key: '656a32363daa94dc4433cd5fb86d689d80502221' })));
|
|
370
371
|
}
|
|
371
372
|
get host() { return index.getElement(this); }
|
|
372
373
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ var slot = require('./slot-RmXfgH4P.js');
|
|
|
5
5
|
var clsx = require('./clsx-BtxeOLZW.js');
|
|
6
6
|
var preference = require('./preference-eJcbLLAn.js');
|
|
7
7
|
|
|
8
|
-
const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):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-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:
|
|
8
|
+
const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):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-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:0;justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
|
|
9
9
|
|
|
10
10
|
const MdsEntity = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
var index = require('./index--6wz7eWi.js');
|
|
4
4
|
var cancel = require('./cancel-_rS5f5_p.js');
|
|
5
5
|
var clsx = require('./clsx-BtxeOLZW.js');
|
|
6
|
-
var locale_it = require('./locale.it-
|
|
6
|
+
var locale_it = require('./locale.it-CfUV2hxK.js');
|
|
7
7
|
var locale = require('./locale-CB5_Z7PE.js');
|
|
8
8
|
var preference = require('./preference-eJcbLLAn.js');
|
|
9
9
|
require('./file-extensions-D_heujEX.js');
|
|
10
10
|
require('./panorama-Bl9xY7e1.js');
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* filesize
|
|
14
|
-
*
|
|
15
|
-
* @copyright
|
|
16
|
-
* @license BSD-3-Clause
|
|
17
|
-
* @version 10.1.
|
|
18
|
-
*/
|
|
12
|
+
/**
|
|
13
|
+
* filesize
|
|
14
|
+
*
|
|
15
|
+
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
16
|
+
* @license BSD-3-Clause
|
|
17
|
+
* @version 10.1.6
|
|
18
|
+
*/
|
|
19
19
|
const ARRAY = "array";
|
|
20
20
|
const BIT = "bit";
|
|
21
21
|
const BITS = "bits";
|
|
@@ -178,9 +178,10 @@ const STRINGS = {
|
|
|
178
178
|
result[0] = result[0].toString().replace(PERIOD, separator);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
if (pad &&
|
|
182
|
-
const
|
|
183
|
-
|
|
181
|
+
if (pad && round > 0) {
|
|
182
|
+
const i = result[0].toString(),
|
|
183
|
+
x = separator || ((i.match(/(\D)/g) || []).pop() || PERIOD),
|
|
184
|
+
tmp = i.toString().split(x),
|
|
184
185
|
s = tmp[1] || EMPTY,
|
|
185
186
|
l = s.length,
|
|
186
187
|
n = round - l;
|
|
@@ -275,13 +276,12 @@ const MdsFilePreview = class {
|
|
|
275
276
|
card === null || card === void 0 ? void 0 : card.removeEventListener('click', this.onClickDownloadEvent);
|
|
276
277
|
}
|
|
277
278
|
render() {
|
|
278
|
-
var _a, _b, _c;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
: 'preview--status') }, this.icon !== undefined && this.icon !== '' ? (index.h("mds-icon", { class: "icon", name: this.icon })) : (index.h("mds-icon", { class: "icon", name: locale_it.getFormatsVariant(this.filename, this.suffix).icon })), this.message && (index.h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), index.h("mds-text", { key: '32d3359b9c41a845001e17987ce703219ba29843', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), index.h("div", { key: '79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e', class: clsx.clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (index.h("mds-text", { key: '84e7d78e1d0639e637173a1c781a61f21e459b6d', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (index.h("mds-text", { key: '8945ff2c6224b7a4803390eae2fc12474903a3dd', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), locale_it.getSuffix(this.filename, this.suffix) && (index.h("mds-badge", { key: '5581cb1f4d13f6f15f28c0957094dcd5982f0a0f', variant: locale_it.getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_a = this.description) !== null && _a !== void 0 ? _a : this.t.get(this.getDefaultKeyDescription()) }, locale_it.getSuffix(this.filename, this.suffix))), (this.filesize === undefined || this.filesize === '') && (index.h("mds-text", { key: 'd743b838cc6fa9fed0f5cdf7914c7652bfc3e1ac', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_b = this.description) !== null && _b !== void 0 ? _b : this.t.get(this.getDefaultKeyDescription()) }, (_c = this.description) !== null && _c !== void 0 ? _c : this.t.get(this.getDefaultKeyDescription())))))));
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
280
|
+
// a removed attribute or a null bound by a framework counts as not set, like an empty value
|
|
281
|
+
const hasMessage = ((_a = this.message) !== null && _a !== void 0 ? _a : '') !== '';
|
|
282
|
+
return (index.h(index.Host, { key: '4450e7351e840c4b0f7d72c9b1bc441d9087ad7e', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, this.deletable && (index.h("mds-button", { key: '8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84', title: this.t.get('remove'), class: "action-delete", icon: cancel.miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), index.h("div", { key: '45d38745f7466b0da5b8f2724879ef46d6826bfd', class: "card", part: "card", onClick: this.onClickDownloadEvent }, ((_b = this.src) !== null && _b !== void 0 ? _b : '') !== '' &&
|
|
283
|
+
!hasMessage &&
|
|
284
|
+
locale_it.getExtensionInfos(this.filename, this.suffix).preview ? (index.h("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (index.h("div", { class: clsx.clsx('preview', hasMessage ? 'preview--status' : 'preview--icon') }, ((_c = this.icon) !== null && _c !== void 0 ? _c : '') !== '' ? (index.h("mds-icon", { class: "icon", name: this.icon })) : (index.h("mds-icon", { class: "icon", name: locale_it.getFormatsVariant(this.filename, this.suffix).icon })), this.message && (index.h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), index.h("mds-text", { key: 'e87d673948267ccf70636d4c2940fb8885f2fb96', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), index.h("div", { key: '25e05eb7f5bef19a392b87401f2e780bd8e605cd', class: clsx.clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (index.h("mds-text", { key: 'cdd7ebbbc99f90caee0c49d74a4b8f4ce0769a2a', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (index.h("mds-text", { key: '381998bfae5b4d76fed78c70f38ef2aab5d13f9e', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), locale_it.getSuffix(this.filename, this.suffix) && (index.h("mds-badge", { key: '89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c', variant: locale_it.getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_d = this.description) !== null && _d !== void 0 ? _d : this.t.get(this.getDefaultKeyDescription()) }, locale_it.getSuffix(this.filename, this.suffix))), ((_e = this.filesize) !== null && _e !== void 0 ? _e : '') === '' && (index.h("mds-text", { key: 'f29356eb97dbb5bc137d3d278176633ce938111f', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_f = this.description) !== null && _f !== void 0 ? _f : this.t.get(this.getDefaultKeyDescription()) }, (_g = this.description) !== null && _g !== void 0 ? _g : this.t.get(this.getDefaultKeyDescription())))))));
|
|
285
285
|
}
|
|
286
286
|
get host() { return index.getElement(this); }
|
|
287
287
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index--6wz7eWi.js');
|
|
4
4
|
var _commonjsHelpers = require('./_commonjsHelpers-B83fTs8d.js');
|
|
5
|
-
var locale_it = require('./locale.it-
|
|
5
|
+
var locale_it = require('./locale.it-CfUV2hxK.js');
|
|
6
6
|
var locale = require('./locale-CB5_Z7PE.js');
|
|
7
7
|
var preference = require('./preference-eJcbLLAn.js');
|
|
8
8
|
require('./file-extensions-D_heujEX.js');
|