@six-group/ui-library 0.0.0-insider.f8f39e7 → 0.0.0-insider.fa2c15f
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/{form-control-72186fcc.js → form-control-8d64e974.js} +2 -2
- package/dist/cjs/{form-control-72186fcc.js.map → form-control-8d64e974.js.map} +1 -1
- package/dist/cjs/{index-5dd19c4b.js → index-d7748d51.js} +13 -469
- package/dist/cjs/index-d7748d51.js.map +1 -0
- package/dist/cjs/index.cjs.js +54 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/six-alert.cjs.entry.js +39 -7
- package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +1 -1
- package/dist/cjs/six-button.cjs.entry.js +1 -1
- package/dist/cjs/six-card.cjs.entry.js +1 -1
- package/dist/cjs/six-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/six-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/six-details.cjs.entry.js +2 -2
- package/dist/cjs/six-details.cjs.entry.js.map +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +1 -1
- package/dist/cjs/six-dropdown_2.cjs.entry.js +6 -4
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/six-error-page.cjs.entry.js +1 -1
- package/dist/cjs/six-error.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +2 -2
- package/dist/cjs/six-header.cjs.entry.js +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +1 -1
- package/dist/cjs/six-input.cjs.entry.js +2 -2
- package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +1 -1
- package/dist/cjs/six-range.cjs.entry.js +2 -2
- package/dist/cjs/six-root.cjs.entry.js +2 -21
- package/dist/cjs/six-root.cjs.entry.js.map +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +1 -1
- package/dist/cjs/six-select.cjs.entry.js +2 -2
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js +1 -1
- package/dist/cjs/six-stage-indicator.cjs.entry.js +22 -0
- package/dist/cjs/six-stage-indicator.cjs.entry.js.map +1 -0
- package/dist/cjs/six-switch.cjs.entry.js +2 -2
- package/dist/cjs/six-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +2 -2
- package/dist/cjs/six-tile.cjs.entry.js +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ui-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/six-alert/six-alert.css +4 -0
- package/dist/collection/components/six-alert/six-alert.js +56 -11
- package/dist/collection/components/six-alert/six-alert.js.map +1 -1
- package/dist/collection/components/six-details/six-details.css +0 -4
- package/dist/collection/components/six-dropdown/six-dropdown.js +5 -3
- package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
- package/dist/collection/components/six-root/six-root.js +1 -69
- package/dist/collection/components/six-root/six-root.js.map +1 -1
- package/dist/collection/components/six-root/test/six-root.spec.js +0 -7
- package/dist/collection/components/six-root/test/six-root.spec.js.map +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/alert.js +54 -0
- package/dist/collection/utils/alert.js.map +1 -0
- package/dist/components/index.js +55 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/six-alert.js +38 -6
- package/dist/components/six-alert.js.map +1 -1
- package/dist/components/six-details2.js +1 -1
- package/dist/components/six-details2.js.map +1 -1
- package/dist/components/six-dropdown2.js +5 -3
- package/dist/components/six-dropdown2.js.map +1 -1
- package/dist/components/six-root.js +4 -33
- package/dist/components/six-root.js.map +1 -1
- package/dist/components.json +45 -114
- package/dist/esm/{form-control-77fcccd0.js → form-control-d403a9cf.js} +2 -2
- package/dist/esm/{form-control-77fcccd0.js.map → form-control-d403a9cf.js.map} +1 -1
- package/dist/esm/{index-6c10d50b.js → index-79d4ef67.js} +13 -469
- package/dist/esm/index-79d4ef67.js.map +1 -0
- package/dist/esm/index.js +56 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/six-alert.entry.js +39 -7
- package/dist/esm/six-alert.entry.js.map +1 -1
- package/dist/esm/six-avatar.entry.js +1 -1
- package/dist/esm/six-badge.entry.js +1 -1
- package/dist/esm/six-button.entry.js +1 -1
- package/dist/esm/six-card.entry.js +1 -1
- package/dist/esm/six-checkbox_2.entry.js +2 -2
- package/dist/esm/six-datepicker.entry.js +1 -1
- package/dist/esm/six-details.entry.js +2 -2
- package/dist/esm/six-details.entry.js.map +1 -1
- package/dist/esm/six-dialog.entry.js +1 -1
- package/dist/esm/six-drawer.entry.js +1 -1
- package/dist/esm/six-dropdown_2.entry.js +6 -4
- package/dist/esm/six-dropdown_2.entry.js.map +1 -1
- package/dist/esm/six-error-page.entry.js +1 -1
- package/dist/esm/six-error.entry.js +1 -1
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js +1 -1
- package/dist/esm/six-file-upload.entry.js +1 -1
- package/dist/esm/six-footer.entry.js +1 -1
- package/dist/esm/six-group-label.entry.js +2 -2
- package/dist/esm/six-header.entry.js +1 -1
- package/dist/esm/six-icon-button.entry.js +1 -1
- package/dist/esm/six-icon.entry.js +1 -1
- package/dist/esm/six-input.entry.js +2 -2
- package/dist/esm/six-item-picker.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js +1 -1
- package/dist/esm/six-layout-grid.entry.js +1 -1
- package/dist/esm/six-main-container.entry.js +1 -1
- package/dist/esm/six-menu-divider.entry.js +1 -1
- package/dist/esm/six-menu-label.entry.js +1 -1
- package/dist/esm/six-picto.entry.js +1 -1
- package/dist/esm/six-progress-bar.entry.js +1 -1
- package/dist/esm/six-progress-ring.entry.js +1 -1
- package/dist/esm/six-radio.entry.js +1 -1
- package/dist/esm/six-range.entry.js +2 -2
- package/dist/esm/six-root.entry.js +2 -21
- package/dist/esm/six-root.entry.js.map +1 -1
- package/dist/esm/six-search-field.entry.js +1 -1
- package/dist/esm/six-select.entry.js +2 -2
- package/dist/esm/six-sidebar-item-group.entry.js +1 -1
- package/dist/esm/six-sidebar-item.entry.js +1 -1
- package/dist/esm/six-sidebar.entry.js +1 -1
- package/dist/esm/six-spinner.entry.js +1 -1
- package/dist/esm/six-stage-indicator.entry.js +18 -0
- package/dist/esm/six-stage-indicator.entry.js.map +1 -0
- package/dist/esm/six-switch.entry.js +2 -2
- package/dist/esm/six-tab-group.entry.js +1 -1
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab.entry.js +1 -1
- package/dist/esm/six-tag.entry.js +1 -1
- package/dist/esm/six-textarea.entry.js +2 -2
- package/dist/esm/six-tile.entry.js +1 -1
- package/dist/esm/six-timepicker.entry.js +1 -1
- package/dist/esm/six-tooltip.entry.js +1 -1
- package/dist/esm/ui-library.js +3 -3
- package/dist/types/components/six-alert/six-alert.d.ts +13 -6
- package/dist/types/components/six-root/six-root.d.ts +0 -13
- package/dist/types/components.d.ts +8 -55
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/alert.d.ts +10 -0
- package/dist/ui-library/index.esm.js +1 -1
- package/dist/ui-library/index.esm.js.map +1 -1
- package/dist/ui-library/{p-8c38a7bd.entry.js → p-0440335d.entry.js} +2 -2
- package/dist/ui-library/{p-d702b6ec.entry.js → p-04cc397c.entry.js} +2 -2
- package/dist/ui-library/{p-5a5f6869.entry.js → p-0edd3091.entry.js} +2 -2
- package/dist/ui-library/{p-4772a9d3.entry.js → p-150b7664.entry.js} +2 -2
- package/dist/ui-library/{p-01ae4500.entry.js → p-1f5840b5.entry.js} +2 -2
- package/dist/ui-library/{p-bff679fa.entry.js → p-28cc013e.entry.js} +2 -2
- package/dist/ui-library/{p-65778e3d.entry.js → p-3424bbc0.entry.js} +2 -2
- package/dist/ui-library/{p-2d86ba99.entry.js → p-348c68a8.entry.js} +2 -2
- package/dist/ui-library/{p-31a4a74c.entry.js → p-3723ca06.entry.js} +2 -2
- package/dist/ui-library/{p-2008636b.entry.js → p-37aeac5e.entry.js} +2 -2
- package/dist/ui-library/{p-fe87f64b.entry.js → p-3d7fb086.entry.js} +2 -2
- package/dist/ui-library/{p-979eabb5.entry.js → p-457f7373.entry.js} +2 -2
- package/dist/ui-library/{p-b8ea574b.entry.js → p-4a667f31.entry.js} +2 -2
- package/dist/ui-library/{p-021f6da9.entry.js → p-50dae789.entry.js} +2 -2
- package/dist/ui-library/{p-621c2742.entry.js → p-546e33d9.entry.js} +2 -2
- package/dist/ui-library/{p-1be990f9.entry.js → p-5db3a705.entry.js} +2 -2
- package/dist/ui-library/{p-67496e8c.js → p-61e66671.js} +2 -2
- package/dist/ui-library/{p-db9d2fde.entry.js → p-6296779b.entry.js} +2 -2
- package/dist/ui-library/{p-e0dd0307.entry.js → p-64b4755d.entry.js} +2 -2
- package/dist/ui-library/p-6c1b046e.entry.js +2 -0
- package/dist/ui-library/p-6c1b046e.entry.js.map +1 -0
- package/dist/ui-library/{p-4b154936.entry.js → p-7115316e.entry.js} +2 -2
- package/dist/ui-library/{p-2132da0a.entry.js → p-870b988d.entry.js} +2 -2
- package/dist/ui-library/{p-831517cd.entry.js → p-884c5cf9.entry.js} +2 -2
- package/dist/ui-library/{p-2cd674e0.entry.js → p-8888a367.entry.js} +2 -2
- package/dist/ui-library/{p-87e197ee.entry.js → p-935c78a7.entry.js} +2 -2
- package/dist/ui-library/{p-4a3ba956.entry.js → p-961bd001.entry.js} +2 -2
- package/dist/ui-library/{p-98ce9502.entry.js → p-9b08068d.entry.js} +2 -2
- package/dist/ui-library/{p-a036cc6f.entry.js → p-9c79341d.entry.js} +2 -2
- package/dist/ui-library/{p-adf5a4da.entry.js → p-a9c159f2.entry.js} +2 -2
- package/dist/ui-library/{p-88767c27.entry.js → p-ac57ba5c.entry.js} +2 -2
- package/dist/ui-library/p-af15381b.js +3 -0
- package/dist/ui-library/p-af15381b.js.map +1 -0
- package/dist/ui-library/{p-ace4ec84.entry.js → p-b1a5f3cd.entry.js} +2 -2
- package/dist/ui-library/{p-78529c8c.entry.js → p-b385a241.entry.js} +2 -2
- package/dist/ui-library/p-b74c5d6b.entry.js +2 -0
- package/dist/ui-library/p-b74c5d6b.entry.js.map +1 -0
- package/dist/ui-library/p-bf2fb53f.entry.js +2 -0
- package/dist/ui-library/p-bf2fb53f.entry.js.map +1 -0
- package/dist/ui-library/{p-fce214eb.entry.js → p-c2c7370b.entry.js} +2 -2
- package/dist/ui-library/{p-1b135e1c.entry.js → p-caea1eb6.entry.js} +2 -2
- package/dist/ui-library/{p-d221d86a.entry.js → p-d3f5b9a8.entry.js} +2 -2
- package/dist/ui-library/{p-4752a63c.entry.js → p-d42b18eb.entry.js} +2 -2
- package/dist/ui-library/{p-a29f6a0e.entry.js → p-d769cc36.entry.js} +2 -2
- package/dist/ui-library/{p-e340a0ad.entry.js → p-d95e292e.entry.js} +2 -2
- package/dist/ui-library/p-da7f3dbd.entry.js +2 -0
- package/dist/ui-library/p-da7f3dbd.entry.js.map +1 -0
- package/dist/ui-library/{p-a3fd8c74.entry.js → p-dfb89b6a.entry.js} +2 -2
- package/dist/ui-library/{p-1aa28025.entry.js → p-e6032375.entry.js} +2 -2
- package/dist/ui-library/{p-943ce0f2.entry.js → p-e60d2324.entry.js} +2 -2
- package/dist/ui-library/{p-0274c52c.entry.js → p-e8298c6e.entry.js} +2 -2
- package/dist/ui-library/{p-1431a2a8.entry.js → p-ed279165.entry.js} +2 -2
- package/dist/ui-library/{p-66cd3b0c.entry.js → p-ed61b75c.entry.js} +2 -2
- package/dist/ui-library/{p-391f10f1.entry.js → p-ee872c04.entry.js} +2 -2
- package/dist/ui-library/{p-3dd28dc0.entry.js → p-f1ab3384.entry.js} +2 -2
- package/dist/ui-library/p-f4ef481c.entry.js +2 -0
- package/dist/ui-library/p-f4ef481c.entry.js.map +1 -0
- package/dist/ui-library/{p-0cb135aa.entry.js → p-f8cbb8da.entry.js} +2 -2
- package/dist/ui-library/ui-library.css +1 -1
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-5dd19c4b.js.map +0 -1
- package/dist/cjs/set-attributes_2.cjs.entry.js +0 -73
- package/dist/cjs/set-attributes_2.cjs.entry.js.map +0 -1
- package/dist/collection/wrappers/set-attributes/set-attributes.js +0 -74
- package/dist/collection/wrappers/set-attributes/set-attributes.js.map +0 -1
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js +0 -16
- package/dist/collection/wrappers/set-attributes/test/set-attributes.spec.js.map +0 -1
- package/dist/components/set-attributes.d.ts +0 -11
- package/dist/components/set-attributes.js +0 -8
- package/dist/components/set-attributes.js.map +0 -1
- package/dist/components/set-attributes2.js +0 -73
- package/dist/components/set-attributes2.js.map +0 -1
- package/dist/esm/index-6c10d50b.js.map +0 -1
- package/dist/esm/set-attributes_2.entry.js +0 -68
- package/dist/esm/set-attributes_2.entry.js.map +0 -1
- package/dist/types/wrappers/set-attributes/set-attributes.d.ts +0 -9
- package/dist/ui-library/p-3783aed0.entry.js +0 -2
- package/dist/ui-library/p-3783aed0.entry.js.map +0 -1
- package/dist/ui-library/p-3f0f59b6.entry.js +0 -2
- package/dist/ui-library/p-3f0f59b6.entry.js.map +0 -1
- package/dist/ui-library/p-46ee280d.entry.js +0 -2
- package/dist/ui-library/p-46ee280d.entry.js.map +0 -1
- package/dist/ui-library/p-a919b557.entry.js +0 -2
- package/dist/ui-library/p-a919b557.entry.js.map +0 -1
- package/dist/ui-library/p-b5f844f7.entry.js +0 -2
- package/dist/ui-library/p-b5f844f7.entry.js.map +0 -1
- package/dist/ui-library/p-ca63a6fa.js +0 -3
- package/dist/ui-library/p-ca63a6fa.js.map +0 -1
- /package/dist/ui-library/{p-8c38a7bd.entry.js.map → p-0440335d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d702b6ec.entry.js.map → p-04cc397c.entry.js.map} +0 -0
- /package/dist/ui-library/{p-5a5f6869.entry.js.map → p-0edd3091.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4772a9d3.entry.js.map → p-150b7664.entry.js.map} +0 -0
- /package/dist/ui-library/{p-01ae4500.entry.js.map → p-1f5840b5.entry.js.map} +0 -0
- /package/dist/ui-library/{p-bff679fa.entry.js.map → p-28cc013e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-65778e3d.entry.js.map → p-3424bbc0.entry.js.map} +0 -0
- /package/dist/ui-library/{p-2d86ba99.entry.js.map → p-348c68a8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-31a4a74c.entry.js.map → p-3723ca06.entry.js.map} +0 -0
- /package/dist/ui-library/{p-2008636b.entry.js.map → p-37aeac5e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-fe87f64b.entry.js.map → p-3d7fb086.entry.js.map} +0 -0
- /package/dist/ui-library/{p-979eabb5.entry.js.map → p-457f7373.entry.js.map} +0 -0
- /package/dist/ui-library/{p-b8ea574b.entry.js.map → p-4a667f31.entry.js.map} +0 -0
- /package/dist/ui-library/{p-021f6da9.entry.js.map → p-50dae789.entry.js.map} +0 -0
- /package/dist/ui-library/{p-621c2742.entry.js.map → p-546e33d9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1be990f9.entry.js.map → p-5db3a705.entry.js.map} +0 -0
- /package/dist/ui-library/{p-67496e8c.js.map → p-61e66671.js.map} +0 -0
- /package/dist/ui-library/{p-db9d2fde.entry.js.map → p-6296779b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e0dd0307.entry.js.map → p-64b4755d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4b154936.entry.js.map → p-7115316e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-2132da0a.entry.js.map → p-870b988d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-831517cd.entry.js.map → p-884c5cf9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-2cd674e0.entry.js.map → p-8888a367.entry.js.map} +0 -0
- /package/dist/ui-library/{p-87e197ee.entry.js.map → p-935c78a7.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4a3ba956.entry.js.map → p-961bd001.entry.js.map} +0 -0
- /package/dist/ui-library/{p-98ce9502.entry.js.map → p-9b08068d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a036cc6f.entry.js.map → p-9c79341d.entry.js.map} +0 -0
- /package/dist/ui-library/{p-adf5a4da.entry.js.map → p-a9c159f2.entry.js.map} +0 -0
- /package/dist/ui-library/{p-88767c27.entry.js.map → p-ac57ba5c.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ace4ec84.entry.js.map → p-b1a5f3cd.entry.js.map} +0 -0
- /package/dist/ui-library/{p-78529c8c.entry.js.map → p-b385a241.entry.js.map} +0 -0
- /package/dist/ui-library/{p-fce214eb.entry.js.map → p-c2c7370b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1b135e1c.entry.js.map → p-caea1eb6.entry.js.map} +0 -0
- /package/dist/ui-library/{p-d221d86a.entry.js.map → p-d3f5b9a8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4752a63c.entry.js.map → p-d42b18eb.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a29f6a0e.entry.js.map → p-d769cc36.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e340a0ad.entry.js.map → p-d95e292e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-a3fd8c74.entry.js.map → p-dfb89b6a.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1aa28025.entry.js.map → p-e6032375.entry.js.map} +0 -0
- /package/dist/ui-library/{p-943ce0f2.entry.js.map → p-e60d2324.entry.js.map} +0 -0
- /package/dist/ui-library/{p-0274c52c.entry.js.map → p-e8298c6e.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1431a2a8.entry.js.map → p-ed279165.entry.js.map} +0 -0
- /package/dist/ui-library/{p-66cd3b0c.entry.js.map → p-ed61b75c.entry.js.map} +0 -0
- /package/dist/ui-library/{p-391f10f1.entry.js.map → p-ee872c04.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3dd28dc0.entry.js.map → p-f1ab3384.entry.js.map} +0 -0
- /package/dist/ui-library/{p-0cb135aa.entry.js.map → p-f8cbb8da.entry.js.map} +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
1
|
export { g as getErrorMessage, a as getLanguage, l as languages } from './error-messages-1eaaad23.js';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Displays an alert on the toast stack with a specified message and optional configuration.
|
|
5
|
+
*
|
|
6
|
+
* @param message - The message to be displayed in the alert.
|
|
7
|
+
* @param alertType - The type of the alert. Valid values are 'primary', 'info', 'success', 'warning', 'danger'. Default is 'info'.
|
|
8
|
+
* @param duration - The duration in milliseconds for which the alert is displayed. If not provided, a default duration is set based on the alert type.
|
|
9
|
+
* @param iconName - The name of the icon to be displayed in the alert. If not provided, a default icon is set based on the alert type.
|
|
10
|
+
*/
|
|
11
|
+
function showAlert(message, alertType, duration, iconName) {
|
|
12
|
+
const type = alertType !== null && alertType !== void 0 ? alertType : 'info';
|
|
13
|
+
const icon = iconName !== null && iconName !== void 0 ? iconName : getIcon(type);
|
|
14
|
+
const alert = Object.assign(document.createElement('six-alert'), {
|
|
15
|
+
type,
|
|
16
|
+
duration: duration !== null && duration !== void 0 ? duration : getDuration(type),
|
|
17
|
+
innerHTML: `<six-icon slot="icon">${icon}</six-icon>${escapeHtml(message)}`,
|
|
18
|
+
closable: true,
|
|
19
|
+
});
|
|
20
|
+
document.body.append(alert);
|
|
21
|
+
alert.toast();
|
|
22
|
+
}
|
|
23
|
+
function escapeHtml(html) {
|
|
24
|
+
const div = document.createElement('div');
|
|
25
|
+
div.textContent = html;
|
|
26
|
+
return div.innerHTML;
|
|
27
|
+
}
|
|
28
|
+
function getIcon(messageType) {
|
|
29
|
+
switch (messageType) {
|
|
30
|
+
case 'primary':
|
|
31
|
+
return 'info';
|
|
32
|
+
case 'info':
|
|
33
|
+
return 'info';
|
|
34
|
+
case 'success':
|
|
35
|
+
return 'check_circle';
|
|
36
|
+
case 'warning':
|
|
37
|
+
return 'warning';
|
|
38
|
+
case 'danger':
|
|
39
|
+
return 'report';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function getDuration(messageType) {
|
|
43
|
+
switch (messageType) {
|
|
44
|
+
case 'primary':
|
|
45
|
+
return 10000;
|
|
46
|
+
case 'info':
|
|
47
|
+
return 10000;
|
|
48
|
+
case 'success':
|
|
49
|
+
return 10000;
|
|
50
|
+
case 'warning':
|
|
51
|
+
return 20000;
|
|
52
|
+
case 'danger':
|
|
53
|
+
return 20000;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { showAlert };
|
|
58
|
+
|
|
3
59
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
1
|
+
{"file":"index.js","mappings":";;AAEA;;;;;;;;SAQgB,SAAS,CAAC,OAAe,EAAE,SAAqB,EAAE,QAAiB,EAAE,QAAiB;IACpG,MAAM,IAAI,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,MAAM,CAAC;IACjC,MAAM,IAAI,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;QAC/D,IAAI;QACJ,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,WAAW,CAAC,IAAI,CAAC;QACvC,SAAS,EAAE,yBAAyB,IAAI,cAAc,UAAU,CAAC,OAAO,CAAC,EAAE;QAC3E,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC;IACvB,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAED,SAAS,OAAO,CAAC,WAAsB;IACrC,QAAQ,WAAW;QACjB,KAAK,SAAS;YACZ,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC;QACxB,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;KACnB;AACH,CAAC;AAED,SAAS,WAAW,CAAC,WAAsB;IACzC,QAAQ,WAAW;QACjB,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC;KAChB;AACH;;;;","names":[],"sources":["src/utils/alert.ts"],"sourcesContent":["import { AlertType } from '../components/six-alert/six-alert';\n\n/**\n * Displays an alert on the toast stack with a specified message and optional configuration.\n *\n * @param message - The message to be displayed in the alert.\n * @param alertType - The type of the alert. Valid values are 'primary', 'info', 'success', 'warning', 'danger'. Default is 'info'.\n * @param duration - The duration in milliseconds for which the alert is displayed. If not provided, a default duration is set based on the alert type.\n * @param iconName - The name of the icon to be displayed in the alert. If not provided, a default icon is set based on the alert type.\n */\nexport function showAlert(message: string, alertType?: AlertType, duration?: number, iconName?: string): void {\n const type = alertType ?? 'info';\n const icon = iconName ?? getIcon(type);\n const alert = Object.assign(document.createElement('six-alert'), {\n type,\n duration: duration ?? getDuration(type),\n innerHTML: `<six-icon slot=\"icon\">${icon}</six-icon>${escapeHtml(message)}`,\n closable: true,\n });\n document.body.append(alert);\n alert.toast();\n}\n\nfunction escapeHtml(html: string): string {\n const div = document.createElement('div');\n div.textContent = html;\n return div.innerHTML;\n}\n\nfunction getIcon(messageType: AlertType): string {\n switch (messageType) {\n case 'primary':\n return 'info';\n case 'info':\n return 'info';\n case 'success':\n return 'check_circle';\n case 'warning':\n return 'warning';\n case 'danger':\n return 'report';\n }\n}\n\nfunction getDuration(messageType: AlertType): number {\n switch (messageType) {\n case 'primary':\n return 10000;\n case 'info':\n return 10000;\n case 'success':\n return 10000;\n case 'warning':\n return 20000;\n case 'danger':\n return 20000;\n }\n}\n"],"version":3}
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-79d4ef67.js';
|
|
2
|
+
export { s as setNonce } from './index-79d4ef67.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy(JSON.parse("[[\"six-select\",[[1,\"six-select\",{\"multiple\":[4],\"selectAllButton\":[4,\"select-all-button\"],\"selectAllText\":[1,\"select-all-text\"],\"maxTagsVisible\":[2,\"max-tags-visible\"],\"disabled\":[4],\"name\":[1],\"placeholder\":[1],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"filterDebounce\":[2,\"filter-debounce\"],\"size\":[1],\"hoist\":[4],\"value\":[1025],\"pill\":[4],\"helpText\":[1,\"help-text\"],\"required\":[4],\"clearable\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"line\":[4],\"filter\":[4],\"asyncFilter\":[4,\"async-filter\"],\"autocomplete\":[4],\"inputDebounce\":[2,\"input-debounce\"],\"options\":[16],\"virtualScroll\":[4,\"virtual-scroll\"],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorTextSlot\":[32],\"isOpen\":[32],\"displayedValues\":[32],\"selectionContainerItems\":[32],\"setFocus\":[64]},null,{\"disabled\":[\"handleDisabledChange\"],\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"multiple\":[\"handleMultipleChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-header\",[[1,\"six-header\",{\"shiftContent\":[4,\"shift-content\"],\"hideHamburgerMenu\":[4,\"hide-hamburger-menu\"],\"openHamburgerMenu\":[4,\"open-hamburger-menu\"],\"openSearch\":[4,\"open-search\"],\"clickableLogo\":[4,\"clickable-logo\"],\"selectedApp\":[32],\"selectedSection\":[32],\"setSearchOpenState\":[64],\"getIsSearchOpen\":[64]},null,{\"openSearch\":[\"handleOpenSearchChange\"]}]]],[\"six-datepicker\",[[1,\"six-datepicker\",{\"type\":[1],\"locale\":[1],\"open\":[1540],\"inline\":[516],\"readonly\":[4],\"disabled\":[4],\"allowedDates\":[16],\"min\":[16],\"max\":[16],\"closeOnSelect\":[4,\"close-on-select\"],\"placement\":[1],\"size\":[1],\"required\":[4],\"defaultDate\":[1,\"default-date\"],\"placeholder\":[1],\"value\":[1040],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"containingElement\":[16],\"dateFormat\":[1,\"date-format\"],\"debounce\":[2],\"name\":[513],\"clearable\":[4],\"iconPosition\":[1,\"icon-position\"],\"hoist\":[4],\"pointerDate\":[32],\"selectionMode\":[32],\"isDropDownContentUp\":[32],\"setFocus\":[64],\"select\":[64]},[[9,\"resize\",\"resizeHandler\"],[9,\"scroll\",\"scrollHandler\"]],{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"six-root\",[[1,\"six-root\",{\"breakpoint\":[2],\"padded\":[4],\"stage\":[1],\"version\":[1],\"collapse\":[32]},null,{\"collapse\":[\"handleCollapsed\"]}]]],[\"six-search-field\",[[1,\"six-search-field\",{\"placeholder\":[1],\"debounce\":[514],\"disabled\":[516],\"value\":[513],\"clearable\":[4]},null,{\"value\":[\"handleValueChange\"]}]]],[\"six-tag\",[[1,\"six-tag\",{\"type\":[513],\"size\":[513],\"pill\":[516],\"clearable\":[516]}]]],[\"six-tile\",[[1,\"six-tile\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"closeable\":[4],\"elevated\":[4],\"disableTooltip\":[4,\"disable-tooltip\"],\"disabled\":[516],\"size\":[513],\"visible\":[32],\"hasIconSlot\":[32],\"hasLabelSlot\":[32],\"hide\":[64],\"show\":[64]}]]],[\"six-alert\",[[1,\"six-alert\",{\"open\":[1540],\"closable\":[516],\"type\":[513],\"duration\":[2],\"isVisible\":[32],\"show\":[64],\"hide\":[64],\"toast\":[64]},null,{\"open\":[\"handleOpenChange\"],\"duration\":[\"handleDurationChange\"]}]]],[\"six-dialog\",[[1,\"six-dialog\",{\"open\":[1540],\"label\":[1],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-drawer\",[[1,\"six-drawer\",{\"open\":[1540],\"label\":[1],\"placement\":[1],\"contained\":[4],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-sidebar-item-group\",[[1,\"six-sidebar-item-group\",{\"name\":[1],\"icon\":[1],\"value\":[513],\"open\":[516],\"summaryIcon\":[1,\"summary-icon\"],\"href\":[513],\"hasItems\":[32],\"summaryIconHasContent\":[32]}]]],[\"six-tab\",[[1,\"six-tab\",{\"panel\":[513],\"active\":[516],\"closable\":[4],\"disabled\":[516],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-tab-group\",[[1,\"six-tab-group\",{\"placement\":[1],\"noScrollControls\":[4,\"no-scroll-controls\"],\"hasScrollControls\":[32],\"show\":[64]},null,{\"noScrollControls\":[\"handleNoScrollControlsChange\"]}]]],[\"six-avatar\",[[1,\"six-avatar\",{\"image\":[1],\"alt\":[1],\"initials\":[1],\"shape\":[1],\"hasError\":[32]}]]],[\"six-error-page\",[[1,\"six-error-page\",{\"errorCode\":[2,\"error-code\"],\"language\":[1],\"customTitle\":[1,\"custom-title\"],\"customDescription\":[16],\"customIcon\":[1,\"custom-icon\"]}]]],[\"six-file-list-item\",[[1,\"six-file-list-item\",{\"identifier\":[513],\"name\":[513],\"date\":[513],\"size\":[514],\"nodownload\":[516],\"nodelete\":[516]}]]],[\"six-file-upload\",[[2,\"six-file-upload\",{\"compact\":[4],\"label\":[1],\"disabled\":[4],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"isOver\":[32]},[[1,\"dragenter\",\"dragenterHandler\"],[1,\"dragover\",\"dragoverHandler\"],[1,\"dragleave\",\"dragleaveHandler\"],[1,\"drop\",\"dropHandler\"]]]]],[\"six-group-label\",[[1,\"six-group-label\",{\"size\":[513],\"label\":[1],\"helpText\":[1,\"help-text\"],\"disabled\":[516],\"required\":[4],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32]},null,{\"helpText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-range\",[[1,\"six-range\",{\"name\":[1],\"value\":[1026],\"required\":[4],\"helpText\":[1,\"help-text\"],\"disabled\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"min\":[2],\"max\":[2],\"step\":[2],\"tooltip\":[1],\"tooltipFormatter\":[16],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasErrorTextSlot\":[32],\"hasLabelSlot\":[32],\"hasTooltip\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"label\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"helpText\":[\"handleLabelChange\"],\"value\":[\"handleValueChange\"],\"min\":[\"handleValueChange\"],\"max\":[\"handleValueChange\"]}]]],[\"six-switch\",[[1,\"six-switch\",{\"name\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"checked\":[1540],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"hasFocus\":[32],\"hasErrorTextSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-textarea\",[[1,\"six-textarea\",{\"size\":[513],\"name\":[513],\"value\":[1537],\"helpText\":[1,\"help-text\"],\"placeholder\":[1],\"rows\":[2],\"resize\":[1],\"disabled\":[516],\"readonly\":[516],\"minlength\":[514],\"maxlength\":[514],\"required\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"autocapitalize\":[1],\"autocorrect\":[1],\"autocomplete\":[1],\"autofocus\":[4],\"spellcheck\":[4],\"inputmode\":[1],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorTextSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"select\":[64],\"setSelectionRange\":[64],\"setRangeText\":[64]},null,{\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"rows\":[\"handleRowsChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-badge\",[[1,\"six-badge\",{\"type\":[1],\"pill\":[4],\"pulse\":[4]}]]],[\"six-card\",[[1,\"six-card\"]]],[\"six-file-list\",[[1,\"six-file-list\"]]],[\"six-footer\",[[1,\"six-footer\"]]],[\"six-language-switcher\",[[1,\"six-language-switcher\",{\"selected\":[1537],\"languages\":[16]},null,{\"languages\":[\"handleChangesLanguages\"]}]]],[\"six-layout-grid\",[[1,\"six-layout-grid\",{\"columns\":[1026]},null,{\"columns\":[\"handleColumnsChange\"]}]]],[\"six-main-container\",[[1,\"six-main-container\",{\"padded\":[4]}]]],[\"six-menu-divider\",[[1,\"six-menu-divider\"]]],[\"six-menu-label\",[[1,\"six-menu-label\"]]],[\"six-progress-bar\",[[1,\"six-progress-bar\",{\"percentage\":[2],\"indeterminate\":[4]}]]],[\"six-progress-ring\",[[1,\"six-progress-ring\",{\"size\":[2],\"strokeWidth\":[2,\"stroke-width\"],\"percentage\":[2]},null,{\"percentage\":[\"handlePercentageChange\"]}]]],[\"six-radio\",[[1,\"six-radio\",{\"name\":[1],\"value\":[513],\"disabled\":[4],\"checked\":[1540],\"invalid\":[516],\"hasFocus\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"name\":[\"handleNameChange\"]}]]],[\"six-sidebar\",[[1,\"six-sidebar\",{\"position\":[1],\"open\":[1540],\"width\":[1],\"toggled\":[4],\"isVisible\":[32],\"toggle\":[64],\"show\":[64],\"hide\":[64],\"selectItemByIndex\":[64],\"selectItemByName\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-sidebar-item\",[[1,\"six-sidebar-item\",{\"value\":[513],\"selected\":[516],\"disabled\":[516],\"href\":[513]}]]],[\"six-tab-panel\",[[1,\"six-tab-panel\",{\"name\":[1],\"active\":[516]}]]],[\"six-error\",[[1,\"six-error\"]]],[\"six-icon\",[[1,\"six-icon\",{\"size\":[513],\"filled\":[4]}]]],[\"six-timepicker\",[[1,\"six-timepicker\",{\"format\":[1],\"separator\":[1],\"value\":[1025],\"open\":[1540],\"inline\":[516],\"readonly\":[4],\"disabled\":[4],\"placement\":[1],\"size\":[1],\"required\":[4],\"placeholder\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"label\":[1],\"invalid\":[516],\"name\":[513],\"clearable\":[4],\"iconPosition\":[1,\"icon-position\"],\"hoist\":[4],\"timeout\":[2],\"interval\":[2],\"defaultTime\":[1,\"default-time\"],\"debounce\":[2],\"isPopupContentUp\":[32],\"isDropDownContentUp\":[32],\"popupValue\":[32],\"setFocus\":[64]},[[9,\"resize\",\"resizeHandler\"],[9,\"scroll\",\"scrollHandler\"]],{\"value\":[\"valueChanged\"]}]]],[\"six-button\",[[1,\"six-button\",{\"type\":[513],\"size\":[513],\"caret\":[4],\"disabled\":[516],\"loading\":[516],\"pill\":[516],\"circle\":[516],\"submit\":[516],\"reset\":[516],\"name\":[1],\"value\":[1],\"href\":[1],\"target\":[1],\"download\":[1],\"hasFocus\":[32],\"hasLabel\":[32],\"hasPrefix\":[32],\"hasSuffix\":[32],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-details\",[[1,\"six-details\",{\"open\":[1540],\"summary\":[1],\"summaryIcon\":[1,\"summary-icon\"],\"summaryIconSize\":[513,\"summary-icon-size\"],\"disabled\":[4],\"inline\":[4],\"selectableEmpty\":[4,\"selectable-empty\"],\"hasContent\":[4,\"has-content\"],\"animateSummaryIcon\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-picto\",[[1,\"six-picto\",{\"size\":[1]}]]],[\"set-attributes_2\",[[1,\"six-stage-indicator\",{\"stage\":[1]}],[4,\"set-attributes\",{\"value\":[16]},null,{\"value\":[\"attrsUpdated\"]}]]],[\"six-item-picker\",[[1,\"six-item-picker\",{\"value\":[1544],\"type\":[1],\"min\":[1544],\"max\":[1544],\"roundtrip\":[516],\"step\":[514],\"items\":[16],\"padded\":[4],\"paddingLength\":[2,\"padding-length\"],\"paddingChar\":[1,\"padding-char\"],\"paddingDirection\":[1,\"padding-direction\"],\"timeout\":[2],\"interval\":[2],\"debounce\":[2],\"_items\":[32],\"_itemIndexes\":[32]},null,{\"value\":[\"handleValueChange\"],\"debounce\":[\"debounceChanged\"],\"items\":[\"handleSetChange\"]}]]],[\"six-spinner\",[[1,\"six-spinner\",{\"six\":[4]}]]],[\"six-tooltip\",[[1,\"six-tooltip\",{\"content\":[1],\"placement\":[1],\"disabled\":[4],\"distance\":[2],\"open\":[1540],\"skidding\":[2],\"trigger\":[1],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-input\",[[1,\"six-input\",{\"type\":[513],\"size\":[513],\"name\":[513],\"value\":[1537],\"pill\":[516],\"helpText\":[1,\"help-text\"],\"placeholder\":[1],\"disabled\":[516],\"readonly\":[516],\"minlength\":[514],\"maxlength\":[514],\"min\":[514],\"max\":[514],\"step\":[514],\"pattern\":[513],\"dropdownSearch\":[4,\"dropdown-search\"],\"required\":[4],\"autocapitalize\":[1],\"autocorrect\":[1],\"autocomplete\":[1],\"autofocus\":[4],\"spellcheck\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"inputmode\":[1],\"line\":[4],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorSlot\":[32],\"isPasswordVisible\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"select\":[64],\"setSelectionRange\":[64],\"setRangeText\":[64]},null,{\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-checkbox_2\",[[1,\"six-menu-item\",{\"checkType\":[1,\"check-type\"],\"checked\":[516],\"value\":[513],\"disabled\":[516],\"hasFocus\":[32],\"active\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"getTextLabel\":[64]}],[1,\"six-checkbox\",{\"name\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"checked\":[1540],\"indeterminate\":[1540],\"hasFocus\":[32],\"hasLabelSlot\":[32],\"hasErrorSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"indeterminate\":[\"handleCheckedChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-dropdown_2\",[[1,\"six-dropdown\",{\"open\":[1540],\"placement\":[1],\"closeOnSelect\":[4,\"close-on-select\"],\"distance\":[2],\"skidding\":[2],\"hoist\":[4],\"containingElement\":[16],\"filter\":[4],\"asyncFilter\":[4,\"async-filter\"],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"autofocusFilter\":[4,\"autofocus-filter\"],\"filterDebounce\":[1026,\"filter-debounce\"],\"disableHideOnEnterAndSpace\":[4,\"disable-hide-on-enter-and-space\"],\"options\":[1040],\"virtualScroll\":[4,\"virtual-scroll\"],\"matchTriggerWidth\":[4,\"match-trigger-width\"],\"renderedOptions\":[32],\"show\":[64],\"hide\":[64],\"reposition\":[64]},null,{\"open\":[\"handleOpenChange\"],\"distance\":[\"handlePopoverOptionsChange\"],\"hoist\":[\"handlePopoverOptionsChange\"],\"placement\":[\"handlePopoverOptionsChange\"],\"skidding\":[\"handlePopoverOptionsChange\"],\"options\":[\"handleOptionsChange\"],\"virtualScroll\":[\"handleOptionsChange\"]}],[1,\"six-menu\",{\"removeBoxShadow\":[4,\"remove-box-shadow\"],\"items\":[16],\"itemsShown\":[2,\"items-shown\"],\"virtualScroll\":[4,\"virtual-scroll\"],\"itemSize\":[2,\"item-size\"],\"scrollingDebounce\":[2,\"scrolling-debounce\"],\"disableKeyboardHandling\":[4,\"disable-keyboard-handling\"],\"scrollingIndex\":[32],\"sixMenuItemHeight\":[32],\"typeToSelect\":[64]}]]],[\"six-icon-button\",[[1,\"six-icon-button\",{\"name\":[513],\"size\":[513],\"label\":[513],\"disabled\":[516],\"html\":[513]}]]]]"), options);
|
|
6
|
+
return bootstrapLazy(JSON.parse("[[\"six-select\",[[1,\"six-select\",{\"multiple\":[4],\"selectAllButton\":[4,\"select-all-button\"],\"selectAllText\":[1,\"select-all-text\"],\"maxTagsVisible\":[2,\"max-tags-visible\"],\"disabled\":[4],\"name\":[1],\"placeholder\":[1],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"filterDebounce\":[2,\"filter-debounce\"],\"size\":[1],\"hoist\":[4],\"value\":[1025],\"pill\":[4],\"helpText\":[1,\"help-text\"],\"required\":[4],\"clearable\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"line\":[4],\"filter\":[4],\"asyncFilter\":[4,\"async-filter\"],\"autocomplete\":[4],\"inputDebounce\":[2,\"input-debounce\"],\"options\":[16],\"virtualScroll\":[4,\"virtual-scroll\"],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorTextSlot\":[32],\"isOpen\":[32],\"displayedValues\":[32],\"selectionContainerItems\":[32],\"setFocus\":[64]},null,{\"disabled\":[\"handleDisabledChange\"],\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"multiple\":[\"handleMultipleChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-header\",[[1,\"six-header\",{\"shiftContent\":[4,\"shift-content\"],\"hideHamburgerMenu\":[4,\"hide-hamburger-menu\"],\"openHamburgerMenu\":[4,\"open-hamburger-menu\"],\"openSearch\":[4,\"open-search\"],\"clickableLogo\":[4,\"clickable-logo\"],\"selectedApp\":[32],\"selectedSection\":[32],\"setSearchOpenState\":[64],\"getIsSearchOpen\":[64]},null,{\"openSearch\":[\"handleOpenSearchChange\"]}]]],[\"six-datepicker\",[[1,\"six-datepicker\",{\"type\":[1],\"locale\":[1],\"open\":[1540],\"inline\":[516],\"readonly\":[4],\"disabled\":[4],\"allowedDates\":[16],\"min\":[16],\"max\":[16],\"closeOnSelect\":[4,\"close-on-select\"],\"placement\":[1],\"size\":[1],\"required\":[4],\"defaultDate\":[1,\"default-date\"],\"placeholder\":[1],\"value\":[1040],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"containingElement\":[16],\"dateFormat\":[1,\"date-format\"],\"debounce\":[2],\"name\":[513],\"clearable\":[4],\"iconPosition\":[1,\"icon-position\"],\"hoist\":[4],\"pointerDate\":[32],\"selectionMode\":[32],\"isDropDownContentUp\":[32],\"setFocus\":[64],\"select\":[64]},[[9,\"resize\",\"resizeHandler\"],[9,\"scroll\",\"scrollHandler\"]],{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}]]],[\"six-search-field\",[[1,\"six-search-field\",{\"placeholder\":[1],\"debounce\":[514],\"disabled\":[516],\"value\":[513],\"clearable\":[4]},null,{\"value\":[\"handleValueChange\"]}]]],[\"six-tag\",[[1,\"six-tag\",{\"type\":[513],\"size\":[513],\"pill\":[516],\"clearable\":[516]}]]],[\"six-tile\",[[1,\"six-tile\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"closeable\":[4],\"elevated\":[4],\"disableTooltip\":[4,\"disable-tooltip\"],\"disabled\":[516],\"size\":[513],\"visible\":[32],\"hasIconSlot\":[32],\"hasLabelSlot\":[32],\"hide\":[64],\"show\":[64]}]]],[\"six-alert\",[[1,\"six-alert\",{\"open\":[1540],\"closable\":[516],\"type\":[513],\"duration\":[2],\"isVisible\":[32],\"show\":[64],\"hide\":[64],\"toast\":[64]},null,{\"open\":[\"handleOpenChange\"],\"duration\":[\"handleDurationChange\"]}]]],[\"six-dialog\",[[1,\"six-dialog\",{\"open\":[1540],\"label\":[1],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-drawer\",[[1,\"six-drawer\",{\"open\":[1540],\"label\":[1],\"placement\":[1],\"contained\":[4],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-root\",[[1,\"six-root\",{\"padded\":[4],\"stage\":[1],\"version\":[1]}]]],[\"six-sidebar-item-group\",[[1,\"six-sidebar-item-group\",{\"name\":[1],\"icon\":[1],\"value\":[513],\"open\":[516],\"summaryIcon\":[1,\"summary-icon\"],\"href\":[513],\"hasItems\":[32],\"summaryIconHasContent\":[32]}]]],[\"six-tab\",[[1,\"six-tab\",{\"panel\":[513],\"active\":[516],\"closable\":[4],\"disabled\":[516],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-tab-group\",[[1,\"six-tab-group\",{\"placement\":[1],\"noScrollControls\":[4,\"no-scroll-controls\"],\"hasScrollControls\":[32],\"show\":[64]},null,{\"noScrollControls\":[\"handleNoScrollControlsChange\"]}]]],[\"six-avatar\",[[1,\"six-avatar\",{\"image\":[1],\"alt\":[1],\"initials\":[1],\"shape\":[1],\"hasError\":[32]}]]],[\"six-error-page\",[[1,\"six-error-page\",{\"errorCode\":[2,\"error-code\"],\"language\":[1],\"customTitle\":[1,\"custom-title\"],\"customDescription\":[16],\"customIcon\":[1,\"custom-icon\"]}]]],[\"six-file-list-item\",[[1,\"six-file-list-item\",{\"identifier\":[513],\"name\":[513],\"date\":[513],\"size\":[514],\"nodownload\":[516],\"nodelete\":[516]}]]],[\"six-file-upload\",[[2,\"six-file-upload\",{\"compact\":[4],\"label\":[1],\"disabled\":[4],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"isOver\":[32]},[[1,\"dragenter\",\"dragenterHandler\"],[1,\"dragover\",\"dragoverHandler\"],[1,\"dragleave\",\"dragleaveHandler\"],[1,\"drop\",\"dropHandler\"]]]]],[\"six-group-label\",[[1,\"six-group-label\",{\"size\":[513],\"label\":[1],\"helpText\":[1,\"help-text\"],\"disabled\":[516],\"required\":[4],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32]},null,{\"helpText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-range\",[[1,\"six-range\",{\"name\":[1],\"value\":[1026],\"required\":[4],\"helpText\":[1,\"help-text\"],\"disabled\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"min\":[2],\"max\":[2],\"step\":[2],\"tooltip\":[1],\"tooltipFormatter\":[16],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasErrorTextSlot\":[32],\"hasLabelSlot\":[32],\"hasTooltip\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"label\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"helpText\":[\"handleLabelChange\"],\"value\":[\"handleValueChange\"],\"min\":[\"handleValueChange\"],\"max\":[\"handleValueChange\"]}]]],[\"six-switch\",[[1,\"six-switch\",{\"name\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"checked\":[1540],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"hasFocus\":[32],\"hasErrorTextSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-textarea\",[[1,\"six-textarea\",{\"size\":[513],\"name\":[513],\"value\":[1537],\"helpText\":[1,\"help-text\"],\"placeholder\":[1],\"rows\":[2],\"resize\":[1],\"disabled\":[516],\"readonly\":[516],\"minlength\":[514],\"maxlength\":[514],\"required\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"autocapitalize\":[1],\"autocorrect\":[1],\"autocomplete\":[1],\"autofocus\":[4],\"spellcheck\":[4],\"inputmode\":[1],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorTextSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"select\":[64],\"setSelectionRange\":[64],\"setRangeText\":[64]},null,{\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"rows\":[\"handleRowsChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-badge\",[[1,\"six-badge\",{\"type\":[1],\"pill\":[4],\"pulse\":[4]}]]],[\"six-card\",[[1,\"six-card\"]]],[\"six-file-list\",[[1,\"six-file-list\"]]],[\"six-footer\",[[1,\"six-footer\"]]],[\"six-language-switcher\",[[1,\"six-language-switcher\",{\"selected\":[1537],\"languages\":[16]},null,{\"languages\":[\"handleChangesLanguages\"]}]]],[\"six-layout-grid\",[[1,\"six-layout-grid\",{\"columns\":[1026]},null,{\"columns\":[\"handleColumnsChange\"]}]]],[\"six-main-container\",[[1,\"six-main-container\",{\"padded\":[4]}]]],[\"six-menu-divider\",[[1,\"six-menu-divider\"]]],[\"six-menu-label\",[[1,\"six-menu-label\"]]],[\"six-progress-bar\",[[1,\"six-progress-bar\",{\"percentage\":[2],\"indeterminate\":[4]}]]],[\"six-progress-ring\",[[1,\"six-progress-ring\",{\"size\":[2],\"strokeWidth\":[2,\"stroke-width\"],\"percentage\":[2]},null,{\"percentage\":[\"handlePercentageChange\"]}]]],[\"six-radio\",[[1,\"six-radio\",{\"name\":[1],\"value\":[513],\"disabled\":[4],\"checked\":[1540],\"invalid\":[516],\"hasFocus\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"name\":[\"handleNameChange\"]}]]],[\"six-sidebar\",[[1,\"six-sidebar\",{\"position\":[1],\"open\":[1540],\"width\":[1],\"toggled\":[4],\"isVisible\":[32],\"toggle\":[64],\"show\":[64],\"hide\":[64],\"selectItemByIndex\":[64],\"selectItemByName\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-sidebar-item\",[[1,\"six-sidebar-item\",{\"value\":[513],\"selected\":[516],\"disabled\":[516],\"href\":[513]}]]],[\"six-tab-panel\",[[1,\"six-tab-panel\",{\"name\":[1],\"active\":[516]}]]],[\"six-error\",[[1,\"six-error\"]]],[\"six-icon\",[[1,\"six-icon\",{\"size\":[513],\"filled\":[4]}]]],[\"six-timepicker\",[[1,\"six-timepicker\",{\"format\":[1],\"separator\":[1],\"value\":[1025],\"open\":[1540],\"inline\":[516],\"readonly\":[4],\"disabled\":[4],\"placement\":[1],\"size\":[1],\"required\":[4],\"placeholder\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"label\":[1],\"invalid\":[516],\"name\":[513],\"clearable\":[4],\"iconPosition\":[1,\"icon-position\"],\"hoist\":[4],\"timeout\":[2],\"interval\":[2],\"defaultTime\":[1,\"default-time\"],\"debounce\":[2],\"isPopupContentUp\":[32],\"isDropDownContentUp\":[32],\"popupValue\":[32],\"setFocus\":[64]},[[9,\"resize\",\"resizeHandler\"],[9,\"scroll\",\"scrollHandler\"]],{\"value\":[\"valueChanged\"]}]]],[\"six-button\",[[1,\"six-button\",{\"type\":[513],\"size\":[513],\"caret\":[4],\"disabled\":[516],\"loading\":[516],\"pill\":[516],\"circle\":[516],\"submit\":[516],\"reset\":[516],\"name\":[1],\"value\":[1],\"href\":[1],\"target\":[1],\"download\":[1],\"hasFocus\":[32],\"hasLabel\":[32],\"hasPrefix\":[32],\"hasSuffix\":[32],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-details\",[[1,\"six-details\",{\"open\":[1540],\"summary\":[1],\"summaryIcon\":[1,\"summary-icon\"],\"summaryIconSize\":[513,\"summary-icon-size\"],\"disabled\":[4],\"inline\":[4],\"selectableEmpty\":[4,\"selectable-empty\"],\"hasContent\":[4,\"has-content\"],\"animateSummaryIcon\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-stage-indicator\",[[1,\"six-stage-indicator\",{\"stage\":[1]}]]],[\"six-picto\",[[1,\"six-picto\",{\"size\":[1]}]]],[\"six-item-picker\",[[1,\"six-item-picker\",{\"value\":[1544],\"type\":[1],\"min\":[1544],\"max\":[1544],\"roundtrip\":[516],\"step\":[514],\"items\":[16],\"padded\":[4],\"paddingLength\":[2,\"padding-length\"],\"paddingChar\":[1,\"padding-char\"],\"paddingDirection\":[1,\"padding-direction\"],\"timeout\":[2],\"interval\":[2],\"debounce\":[2],\"_items\":[32],\"_itemIndexes\":[32]},null,{\"value\":[\"handleValueChange\"],\"debounce\":[\"debounceChanged\"],\"items\":[\"handleSetChange\"]}]]],[\"six-spinner\",[[1,\"six-spinner\",{\"six\":[4]}]]],[\"six-tooltip\",[[1,\"six-tooltip\",{\"content\":[1],\"placement\":[1],\"disabled\":[4],\"distance\":[2],\"open\":[1540],\"skidding\":[2],\"trigger\":[1],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-input\",[[1,\"six-input\",{\"type\":[513],\"size\":[513],\"name\":[513],\"value\":[1537],\"pill\":[516],\"helpText\":[1,\"help-text\"],\"placeholder\":[1],\"disabled\":[516],\"readonly\":[516],\"minlength\":[514],\"maxlength\":[514],\"min\":[514],\"max\":[514],\"step\":[514],\"pattern\":[513],\"dropdownSearch\":[4,\"dropdown-search\"],\"required\":[4],\"autocapitalize\":[1],\"autocorrect\":[1],\"autocomplete\":[1],\"autofocus\":[4],\"spellcheck\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"clearable\":[4],\"togglePassword\":[4,\"toggle-password\"],\"inputmode\":[1],\"line\":[4],\"hasFocus\":[32],\"hasHelpTextSlot\":[32],\"hasLabelSlot\":[32],\"hasErrorSlot\":[32],\"isPasswordVisible\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"select\":[64],\"setSelectionRange\":[64],\"setRangeText\":[64]},null,{\"helpText\":[\"handleLabelChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"],\"value\":[\"handleValueChange\"]}]]],[\"six-checkbox_2\",[[1,\"six-menu-item\",{\"checkType\":[1,\"check-type\"],\"checked\":[516],\"value\":[513],\"disabled\":[516],\"hasFocus\":[32],\"active\":[32],\"setFocus\":[64],\"removeFocus\":[64],\"getTextLabel\":[64]}],[1,\"six-checkbox\",{\"name\":[1],\"value\":[1],\"disabled\":[4],\"required\":[4],\"label\":[1],\"errorText\":[1,\"error-text\"],\"errorTextCount\":[2,\"error-text-count\"],\"invalid\":[516],\"checked\":[1540],\"indeterminate\":[1540],\"hasFocus\":[32],\"hasLabelSlot\":[32],\"hasErrorSlot\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"indeterminate\":[\"handleCheckedChange\"],\"errorText\":[\"handleLabelChange\"],\"label\":[\"handleLabelChange\"]}]]],[\"six-dropdown_2\",[[1,\"six-dropdown\",{\"open\":[1540],\"placement\":[1],\"closeOnSelect\":[4,\"close-on-select\"],\"distance\":[2],\"skidding\":[2],\"hoist\":[4],\"containingElement\":[16],\"filter\":[4],\"asyncFilter\":[4,\"async-filter\"],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"autofocusFilter\":[4,\"autofocus-filter\"],\"filterDebounce\":[1026,\"filter-debounce\"],\"disableHideOnEnterAndSpace\":[4,\"disable-hide-on-enter-and-space\"],\"options\":[1040],\"virtualScroll\":[4,\"virtual-scroll\"],\"matchTriggerWidth\":[4,\"match-trigger-width\"],\"renderedOptions\":[32],\"show\":[64],\"hide\":[64],\"reposition\":[64]},null,{\"open\":[\"handleOpenChange\"],\"distance\":[\"handlePopoverOptionsChange\"],\"hoist\":[\"handlePopoverOptionsChange\"],\"placement\":[\"handlePopoverOptionsChange\"],\"skidding\":[\"handlePopoverOptionsChange\"],\"options\":[\"handleOptionsChange\"],\"virtualScroll\":[\"handleOptionsChange\"]}],[1,\"six-menu\",{\"removeBoxShadow\":[4,\"remove-box-shadow\"],\"items\":[16],\"itemsShown\":[2,\"items-shown\"],\"virtualScroll\":[4,\"virtual-scroll\"],\"itemSize\":[2,\"item-size\"],\"scrollingDebounce\":[2,\"scrolling-debounce\"],\"disableKeyboardHandling\":[4,\"disable-keyboard-handling\"],\"scrollingIndex\":[32],\"sixMenuItemHeight\":[32],\"typeToSelect\":[64]}]]],[\"six-icon-button\",[[1,\"six-icon-button\",{\"name\":[513],\"size\":[513],\"label\":[513],\"disabled\":[516],\"html\":[513]}]]]]"), options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
|
+
import { g as getSlot } from './slot-56531341.js';
|
|
2
3
|
|
|
3
|
-
const sixAlertCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:contents;margin:0}.alert{position:relative;display:flex;align-items:stretch;background-color:var(--six-color-white);border:solid 1px var(--six-color-web-rock-200);border-top-width:3px;border-radius:var(--six-border-radius-medium);box-shadow:var(--box-shadow);font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:1.6;color:var(--six-color-web-rock-700);opacity:0;transform:scale(0.9);transition:var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;margin:inherit}.alert:not(.alert--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.alert--open{opacity:1;transform:none}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large)}.alert__icon ::slotted(*){margin-left:var(--six-spacing-large)}.alert--primary{border-top-color:var(--six-color-web-rock-900)}.alert--primary .alert__icon{color:var(--six-color-web-rock-900)}.alert--success{border-top-color:var(--six-color-success-600)}.alert--success .alert__icon{color:var(--six-color-success-600)}.alert--info{border-top-color:var(--six-color-action-500)}.alert--info .alert__icon{color:var(--six-color-action-500)}.alert--warning{border-top-color:var(--six-color-warning-800)}.alert--warning .alert__icon{color:var(--six-color-warning-800)}.alert--danger{border-top-color:var(--six-color-danger-900)}.alert--danger .alert__icon{color:var(--six-color-danger-900)}.alert__message{flex:1 1 auto;padding:var(--six-spacing-large);overflow:hidden}.alert__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large);padding-right:var(--six-spacing-medium)}";
|
|
4
|
+
const sixAlertCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:contents;margin:0}.alert{position:relative;display:flex;align-items:stretch;background-color:var(--six-color-white);border:solid 1px var(--six-color-web-rock-200);border-top-width:3px;border-radius:var(--six-border-radius-medium);box-shadow:var(--box-shadow);font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:1.6;color:var(--six-color-web-rock-700);opacity:0;transform:scale(0.9);transition:var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;margin:inherit}.alert:not(.alert--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.alert--shadow{box-shadow:var(--six-shadow-medium)}.alert--open{opacity:1;transform:none}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large)}.alert__icon ::slotted(*){margin-left:var(--six-spacing-large)}.alert--primary{border-top-color:var(--six-color-web-rock-900)}.alert--primary .alert__icon{color:var(--six-color-web-rock-900)}.alert--success{border-top-color:var(--six-color-success-600)}.alert--success .alert__icon{color:var(--six-color-success-600)}.alert--info{border-top-color:var(--six-color-action-500)}.alert--info .alert__icon{color:var(--six-color-action-500)}.alert--warning{border-top-color:var(--six-color-warning-800)}.alert--warning .alert__icon{color:var(--six-color-warning-800)}.alert--danger{border-top-color:var(--six-color-danger-900)}.alert--danger .alert__icon{color:var(--six-color-danger-900)}.alert__message{flex:1 1 auto;padding:var(--six-spacing-large);overflow:hidden}.alert__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-large);padding-right:var(--six-spacing-medium)}";
|
|
4
5
|
|
|
5
6
|
const toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });
|
|
6
7
|
const SixAlert = class {
|
|
@@ -13,8 +14,11 @@ const SixAlert = class {
|
|
|
13
14
|
this.handleCloseClick = () => {
|
|
14
15
|
this.hide();
|
|
15
16
|
};
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
17
|
+
this.handleMouseEnter = () => {
|
|
18
|
+
this.pauseAutoHide();
|
|
19
|
+
};
|
|
20
|
+
this.handleMouseLeave = () => {
|
|
21
|
+
this.resetAutoHide();
|
|
18
22
|
};
|
|
19
23
|
this.handleTransitionEnd = (event) => {
|
|
20
24
|
const target = event.target;
|
|
@@ -78,13 +82,33 @@ const SixAlert = class {
|
|
|
78
82
|
* Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
|
|
79
83
|
* dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
|
|
80
84
|
* calling this method again. The returned promise will resolve after the alert is hidden.
|
|
85
|
+
* @param adjustPosition If true, the top and right position of the toast stack is shifted according to the
|
|
86
|
+
* six-root header's height and the presence of a vertical scrollbar.
|
|
81
87
|
*/
|
|
82
|
-
async toast() {
|
|
88
|
+
async toast(adjustPosition = true) {
|
|
83
89
|
return new Promise((resolve) => {
|
|
90
|
+
var _a;
|
|
84
91
|
if (!toastStack.parentElement) {
|
|
85
92
|
document.body.append(toastStack);
|
|
86
93
|
}
|
|
87
94
|
toastStack.append(this.host);
|
|
95
|
+
if (adjustPosition) {
|
|
96
|
+
const sixRoot = document.querySelector('six-root');
|
|
97
|
+
const headerSlot = getSlot(sixRoot, 'header');
|
|
98
|
+
const mainSlot = (_a = sixRoot === null || sixRoot === void 0 ? void 0 : sixRoot.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('host main');
|
|
99
|
+
if (mainSlot != null && mainSlot instanceof HTMLElement) {
|
|
100
|
+
const scrollbarWidth = mainSlot.offsetWidth - mainSlot.clientWidth;
|
|
101
|
+
toastStack.style.right = `${scrollbarWidth}px`;
|
|
102
|
+
}
|
|
103
|
+
if (headerSlot != null) {
|
|
104
|
+
const rect = headerSlot === null || headerSlot === void 0 ? void 0 : headerSlot.getBoundingClientRect();
|
|
105
|
+
toastStack.style.top = `${rect.top + rect.height}px`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
toastStack.style.top = '0';
|
|
110
|
+
toastStack.style.right = '0';
|
|
111
|
+
}
|
|
88
112
|
requestAnimationFrame(() => this.show());
|
|
89
113
|
this.host.addEventListener('six-alert-after-hide', () => {
|
|
90
114
|
this.host.remove();
|
|
@@ -96,13 +120,20 @@ const SixAlert = class {
|
|
|
96
120
|
}, { once: true });
|
|
97
121
|
});
|
|
98
122
|
}
|
|
99
|
-
|
|
123
|
+
pauseAutoHide() {
|
|
100
124
|
clearTimeout(this.autoHideTimeout);
|
|
125
|
+
}
|
|
126
|
+
resetAutoHide() {
|
|
101
127
|
if (this.open && this.duration < Infinity) {
|
|
102
128
|
this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);
|
|
103
129
|
}
|
|
104
130
|
}
|
|
131
|
+
restartAutoHide() {
|
|
132
|
+
this.pauseAutoHide();
|
|
133
|
+
this.resetAutoHide();
|
|
134
|
+
}
|
|
105
135
|
render() {
|
|
136
|
+
const asToast = this.host.closest('.six-toast-stack') != null;
|
|
106
137
|
return (h("div", { part: "base", class: {
|
|
107
138
|
alert: true,
|
|
108
139
|
'alert--open': this.open,
|
|
@@ -113,7 +144,8 @@ const SixAlert = class {
|
|
|
113
144
|
'alert--info': this.type === 'info',
|
|
114
145
|
'alert--warning': this.type === 'warning',
|
|
115
146
|
'alert--danger': this.type === 'danger',
|
|
116
|
-
|
|
147
|
+
'alert--shadow': asToast,
|
|
148
|
+
}, role: "alert", "aria-live": "assertive", "aria-atomic": "true", "aria-hidden": this.open ? 'false' : 'true', onTransitionEnd: this.handleTransitionEnd, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("span", { part: "icon", class: "alert__icon" }, h("slot", { name: "icon" })), h("span", { part: "message", class: "alert__message" }, h("slot", null)), this.closable && (h("span", { class: "alert__close" }, h("six-icon-button", { name: "clear", exportparts: "base:close-button", onClick: this.handleCloseClick })))));
|
|
117
149
|
}
|
|
118
150
|
get host() { return getElement(this); }
|
|
119
151
|
static get watchers() { return {
|
|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AAQ,KACZ,YAAM,KAAK,EAAC,cAAc,IACxB,uBACE,IAAI,EAAC,OAAO,EACZ,WAAW,EAAC,mBAAmB,EAC/B,OAAO,EAAE,IAAI,CAAC,gBAAgB,GACb,CACd,CACR,CACG,EACN;KACH;;;;;;;;;;;","names":[],"sources":["src/components/six-alert/six-alert.scss?tag=six-alert&encapsulation=shadow","src/components/six-alert/six-alert.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --box-shadow: The alert's box shadow.\n */\n:host {\n display: contents;\n\n // For better DX, we'll reset the margin here so the base part can inherit it\n margin: 0;\n}\n\n.alert {\n position: relative;\n display: flex;\n align-items: stretch;\n background-color: var(--six-color-white);\n border: solid 1px var(--six-color-web-rock-200);\n border-top-width: 3px;\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--box-shadow);\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: 1.6;\n color: var(--six-color-web-rock-700);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;\n margin: inherit;\n\n &:not(.alert--visible) {\n @include hidden;\n }\n}\n\n.alert--open {\n opacity: 1;\n transform: none;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n\n ::slotted(*) {\n margin-left: var(--six-spacing-large);\n }\n}\n\n.alert--primary {\n border-top-color: var(--six-color-web-rock-900);\n\n .alert__icon {\n color: var(--six-color-web-rock-900);\n }\n}\n\n.alert--success {\n border-top-color: var(--six-color-success-600);\n\n .alert__icon {\n color: var(--six-color-success-600);\n }\n}\n\n.alert--info {\n border-top-color: var(--six-color-action-500);\n\n .alert__icon {\n color: var(--six-color-action-500);\n }\n}\n\n.alert--warning {\n border-top-color: var(--six-color-warning-800);\n\n .alert__icon {\n color: var(--six-color-warning-800);\n }\n}\n\n.alert--danger {\n border-top-color: var(--six-color-danger-900);\n\n .alert__icon {\n color: var(--six-color-danger-900);\n }\n}\n\n.alert__message {\n flex: 1 1 auto;\n padding: var(--six-spacing-large);\n overflow: hidden;\n}\n\n.alert__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n padding-right: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The alert's content.\n * @slot icon - An icon to show in the alert.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the alert icon.\n * @part message - The alert message.\n * @part close-button - The close button.\n */\n\n@Component({\n tag: 'six-alert',\n styleUrl: 'six-alert.scss',\n shadow: true,\n})\nexport class SixAlert {\n private autoHideTimeout?: number;\n\n @Element() host!: HTMLSixAlertElement;\n\n @State() isVisible = false;\n\n /** Indicates whether or not the alert is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Set to true to make the alert closable. */\n @Prop({ reflect: true }) closable = false;\n\n /** The type of alert. */\n @Prop({ reflect: true }) type: 'primary' | 'success' | 'info' | 'warning' | 'danger' = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with the\n * alert before it closes (e.g. moves the mouse over it), the timer will restart.\n */\n @Prop() duration = Infinity;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n @Watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Emitted when the alert opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-alert-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert opens and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the alert closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-alert-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert closes and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n /** Shows the alert. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n /** Hides the alert */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n clearTimeout(this.autoHideTimeout);\n this.isVisible = false;\n this.open = false;\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n */\n @Method()\n async toast() {\n return new Promise<void>((resolve) => {\n if (!toastStack.parentElement) {\n document.body.append(toastStack);\n }\n\n toastStack.append(this.host);\n requestAnimationFrame(() => this.show());\n\n this.host.addEventListener(\n 'six-alert-after-hide',\n () => {\n this.host.remove();\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('six-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleMouseMove = () => {\n this.restartAutoHide();\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('alert')) {\n this.isVisible = this.open;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n };\n\n private restartAutoHide() {\n clearTimeout(this.autoHideTimeout);\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n class={{\n alert: true,\n 'alert--open': this.open,\n 'alert--visible': this.isVisible,\n 'alert--closable': this.closable,\n 'alert--primary': this.type === 'primary',\n 'alert--success': this.type === 'success',\n 'alert--info': this.type === 'info',\n 'alert--warning': this.type === 'warning',\n 'alert--danger': this.type === 'danger',\n }}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n onMouseMove={this.handleMouseMove}\n onTransitionEnd={this.handleTransitionEnd}\n >\n <span part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\" />\n </span>\n\n <span part=\"message\" class=\"alert__message\">\n <slot />\n </span>\n\n {this.closable && (\n <span class=\"alert__close\">\n <six-icon-button\n name=\"clear\"\n exportparts=\"base:close-button\"\n onClick={this.handleCloseClick}\n ></six-icon-button>\n </span>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-alert.entry.js","mappings":";;;AAAA,MAAM,WAAW,GAAG,64DAA64D;;ACIj6D,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;MAsBrF,QAAQ;;;;;;;QA8JX,qBAAgB,GAAG;YACzB,IAAI,CAAC,IAAI,EAAE,CAAC;SACb,CAAC;QAEM,qBAAgB,GAAG;YACzB,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB,CAAC;QAEM,qBAAgB,G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,EAAE,IAAI;gBACX,aAAa,EAAE,IAAI,CAAC,IAAI;gBACxB,gBAAgB,EAAE,IAAI,CAAC,SAAS;gBAChC,iBAAiB,EAAE,IAAI,CAAC,QAAQ;gBAChC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,MAAM;gBACnC,gBAAgB,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS;gBACzC,eAAe,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACvC,eAAe,EAAE,OAAO;aACzB,EACD,IAAI,EAAC,OAAO,eACF,WAAW,iBACT,MAAM,iBACL,IAAI,CAAC,IAAI,GAAG,OAAO,GAAG,MAAM,EACzC,eAAe,EAAE,IAAI,CAAC,mBAAmB,EACzC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,YAAY,EAAE,IAAI,CAAC,gBAAgB,IAEnC,YAAM,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,aAAa,IACnC,YAAM,IAAI,EAAC,MAAM,GAAG,CACf,EAEP,YAAM,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,gBAAgB,IACzC,eAAQ,CACH,EAEN,IAAI,CAAC,QAAQ,KACZ,YAAM,KAAK,EAAC,cAAc,IACxB,uBACE,IAAI,EAAC,OAAO,EACZ,WAAW,EAAC,mBAAmB,EAC/B,OAAO,EAAE,IAAI,CAAC,gBAAgB,GACb,CACd,CACR,CACG,EACN;KACH;;;;;;;;;;;","names":[],"sources":["src/components/six-alert/six-alert.scss?tag=six-alert&encapsulation=shadow","src/components/six-alert/six-alert.tsx"],"sourcesContent":["@import 'src/global/component';\n@import 'src/global/mixins/hidden';\n\n/**\n * @prop --box-shadow: The alert's box shadow.\n */\n:host {\n display: contents;\n\n // For better DX, we'll reset the margin here so the base part can inherit it\n margin: 0;\n}\n\n.alert {\n position: relative;\n display: flex;\n align-items: stretch;\n background-color: var(--six-color-white);\n border: solid 1px var(--six-color-web-rock-200);\n border-top-width: 3px;\n border-radius: var(--six-border-radius-medium);\n box-shadow: var(--box-shadow);\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n line-height: 1.6;\n color: var(--six-color-web-rock-700);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--six-transition-medium) opacity ease, var(--six-transition-medium) transform ease;\n margin: inherit;\n\n &:not(.alert--visible) {\n @include hidden;\n }\n}\n\n.alert--shadow {\n box-shadow: var(--six-shadow-medium);\n}\n\n.alert--open {\n opacity: 1;\n transform: none;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n\n ::slotted(*) {\n margin-left: var(--six-spacing-large);\n }\n}\n\n.alert--primary {\n border-top-color: var(--six-color-web-rock-900);\n\n .alert__icon {\n color: var(--six-color-web-rock-900);\n }\n}\n\n.alert--success {\n border-top-color: var(--six-color-success-600);\n\n .alert__icon {\n color: var(--six-color-success-600);\n }\n}\n\n.alert--info {\n border-top-color: var(--six-color-action-500);\n\n .alert__icon {\n color: var(--six-color-action-500);\n }\n}\n\n.alert--warning {\n border-top-color: var(--six-color-warning-800);\n\n .alert__icon {\n color: var(--six-color-warning-800);\n }\n}\n\n.alert--danger {\n border-top-color: var(--six-color-danger-900);\n\n .alert__icon {\n color: var(--six-color-danger-900);\n }\n}\n\n.alert__message {\n flex: 1 1 auto;\n padding: var(--six-spacing-large);\n overflow: hidden;\n}\n\n.alert__close {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: var(--six-font-size-large);\n padding-right: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\nimport { getSlot } from '../../utils/slot';\n\nconst toastStack = Object.assign(document.createElement('div'), { className: 'six-toast-stack' });\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The alert's content.\n * @slot icon - An icon to show in the alert.\n *\n * @part base - The component's base wrapper.\n * @part icon - The container that wraps the alert icon.\n * @part message - The alert message.\n * @part close-button - The close button.\n */\n\n@Component({\n tag: 'six-alert',\n styleUrl: 'six-alert.scss',\n shadow: true,\n})\nexport class SixAlert {\n private autoHideTimeout?: number;\n\n @Element() host!: HTMLSixAlertElement;\n\n @State() isVisible = false;\n\n /** Indicates whether or not the alert is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Set to true to make the alert closable. */\n @Prop({ reflect: true }) closable = false;\n\n /** The type of alert. */\n @Prop({ reflect: true }) type: AlertType = 'primary';\n\n /**\n * The length of time, in milliseconds, the alert will show before closing itself.\n * If the user hovers over the toast alert, the timer will pause.\n * On leaving the element with the mouse, the timer resets.\n */\n @Prop() duration = Infinity;\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n @Watch('duration')\n handleDurationChange() {\n this.restartAutoHide();\n }\n\n /** Emitted when the alert opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-alert-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert opens and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the alert closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-alert-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the alert closes and all transitions are complete. */\n @Event({ eventName: 'six-alert-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n /** Shows the alert. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n\n if (this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n /** Hides the alert */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n clearTimeout(this.autoHideTimeout);\n this.isVisible = false;\n this.open = false;\n }\n\n /**\n * Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\n * dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\n * calling this method again. The returned promise will resolve after the alert is hidden.\n * @param adjustPosition If true, the top and right position of the toast stack is shifted according to the\n * six-root header's height and the presence of a vertical scrollbar.\n */\n @Method()\n async toast(adjustPosition = true) {\n return new Promise<void>((resolve) => {\n if (!toastStack.parentElement) {\n document.body.append(toastStack);\n }\n toastStack.append(this.host);\n\n if (adjustPosition) {\n const sixRoot = document.querySelector('six-root');\n const headerSlot = getSlot(sixRoot, 'header');\n const mainSlot = sixRoot?.shadowRoot?.querySelector('host main');\n if (mainSlot != null && mainSlot instanceof HTMLElement) {\n const scrollbarWidth = mainSlot.offsetWidth - mainSlot.clientWidth;\n toastStack.style.right = `${scrollbarWidth}px`;\n }\n if (headerSlot != null) {\n const rect = headerSlot?.getBoundingClientRect();\n toastStack.style.top = `${rect.top + rect.height}px`;\n }\n } else {\n toastStack.style.top = '0';\n toastStack.style.right = '0';\n }\n\n requestAnimationFrame(() => this.show());\n\n this.host.addEventListener(\n 'six-alert-after-hide',\n () => {\n this.host.remove();\n resolve();\n\n // Remove the toast stack from the DOM when there are no more alerts\n if (toastStack.querySelector('six-alert') === null) {\n toastStack.remove();\n }\n },\n { once: true }\n );\n });\n }\n\n private pauseAutoHide() {\n clearTimeout(this.autoHideTimeout);\n }\n\n private resetAutoHide() {\n if (this.open && this.duration < Infinity) {\n this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n private restartAutoHide() {\n this.pauseAutoHide();\n this.resetAutoHide();\n }\n\n private handleCloseClick = () => {\n this.hide();\n };\n\n private handleMouseEnter = () => {\n this.pauseAutoHide();\n };\n\n private handleMouseLeave = () => {\n this.resetAutoHide();\n };\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'opacity' && target.classList.contains('alert')) {\n this.isVisible = this.open;\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n }\n };\n\n render() {\n const asToast = this.host.closest('.six-toast-stack') != null;\n\n return (\n <div\n part=\"base\"\n class={{\n alert: true,\n 'alert--open': this.open,\n 'alert--visible': this.isVisible,\n 'alert--closable': this.closable,\n 'alert--primary': this.type === 'primary',\n 'alert--success': this.type === 'success',\n 'alert--info': this.type === 'info',\n 'alert--warning': this.type === 'warning',\n 'alert--danger': this.type === 'danger',\n 'alert--shadow': asToast,\n }}\n role=\"alert\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n aria-hidden={this.open ? 'false' : 'true'}\n onTransitionEnd={this.handleTransitionEnd}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n >\n <span part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\" />\n </span>\n\n <span part=\"message\" class=\"alert__message\">\n <slot />\n </span>\n\n {this.closable && (\n <span class=\"alert__close\">\n <six-icon-button\n name=\"clear\"\n exportparts=\"base:close-button\"\n onClick={this.handleCloseClick}\n ></six-icon-button>\n </span>\n )}\n </div>\n );\n }\n}\n\nexport type AlertType = 'primary' | 'success' | 'info' | 'warning' | 'danger';\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-79d4ef67.js';
|
|
2
2
|
|
|
3
3
|
const sixAvatarCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;--size:2rem}.avatar{display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--size);height:var(--size);background-color:var(--six-avatar-background-color);font-family:var(--six-font-sans);font-size:calc(var(--size) * 0.5);font-weight:var(--six-font-weight-normal);color:var(--six-avatar-color);overflow:hidden;user-select:none;vertical-align:middle;cursor:pointer;outline:none}.avatar:hover{box-shadow:var(--six-shadow-medium)}.avatar--circle{border-radius:var(--six-border-radius-circle)}.avatar--rounded{border-radius:var(--six-border-radius-medium)}.avatar--square{border-radius:0}.avatar__icon{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%}.avatar__initials{line-height:1;text-transform:uppercase}.avatar__image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-79d4ef67.js';
|
|
2
2
|
|
|
3
3
|
const sixBadgeCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--six-font-family);font-size:var(--six-font-size-x-small);font-weight:var(--six-font-weight-semibold);letter-spacing:var(--six-letter-spacing-normal);line-height:1;border-radius:var(--six-border-radius-small);white-space:nowrap;padding:3px 6px;user-select:none;cursor:inherit}.badge--info{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.badge--success{background-color:var(--six-color-success-500);color:var(--six-color-web-rock-900)}.badge--warning{background-color:var(--six-color-warning-700);color:var(--six-color-web-rock-900)}.badge--danger{background-color:var(--six-color-danger-800);color:var(--six-color-white)}.badge--action{background-color:var(--six-color-action-500);color:var(--six-color-white)}.badge--primary{background-color:var(--six-color-clay-50);color:var(--six-color-black)}.badge--pill{border-radius:var(--six-border-radius-pill)}.badge--pulse{animation:pulse 1.5s infinite}.badge--pulse.badge--info{--pulse-color:var(--six-color-web-rock-900)}.badge--pulse.badge--success{--pulse-color:var(--six-color-success-500)}.badge--pulse.badge--warning{--pulse-color:var(--six-color-warning-700)}.badge--pulse.badge--danger{--pulse-color:var(--six-color-danger-800)}.badge--pulse.badge--action{--pulse-color:var(--six-color-action-500)}.badge--pulse.badge--primary{--pulse-color:var(--six-color-clay-50)}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--pulse-color)}70%{box-shadow:0 0 0 0.5rem transparent}100%{box-shadow:0 0 0 0 transparent}}";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { h as hasSlot } from './slot-56531341.js';
|
|
3
3
|
import { s as submitForm } from './form-4b145b7a.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-79d4ef67.js';
|
|
2
2
|
|
|
3
3
|
const sixCardCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;box-shadow:var(--six-shadow-medium);border:1px solid var(--six-color-web-rock-100);padding:var(--six-spacing-medium)}";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { F as FormControl } from './form-control-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
|
+
import { F as FormControl } from './form-control-d403a9cf.js';
|
|
3
3
|
import { h as hasSlot, a as getTextContent } from './slot-56531341.js';
|
|
4
4
|
import { E as EventListeners } from './event-listeners-706d4309.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { E as EventListeners } from './event-listeners-706d4309.js';
|
|
3
3
|
import { D as DEFAULT_DEBOUNCE_FAST, d as debounceEvent, a as debounce } from './execution-control-2ebaf4ef.js';
|
|
4
4
|
import { h as hasSlot } from './slot-56531341.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { f as focusVisible } from './focus-visible-d9dbfeef.js';
|
|
3
3
|
|
|
4
|
-
const sixDetailsCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;--horizontal-padding:var(--six-spacing-medium);font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium) var(--horizontal-padding);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.
|
|
4
|
+
const sixDetailsCss = ":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--hide-duration:var(--six-transition-medium);--hide-timing-function:ease;--show-duration:var(--six-transition-medium);--show-timing-function:ease;--horizontal-padding:var(--six-spacing-medium);font-family:var(--six-font-family);display:block}.details{border:solid var(--six-border-width) var(--six-input-border-color);border-radius:var(--six-border-radius-medium);color:var(--six-details-color);overflow-anchor:none;font-size:var(--six-input-font-size-medium)}.details:hover:not(.details--disabled):not(.details--open){border-color:var(--six-input-border-color-hover)}.details.inline{border:none;color:var(--six-sidebar-color)}.details.inline:hover{background-color:var(--six-sidebar-hover-background-color)}.details.inline.details--open{background-color:var(--six-color-web-rock-50)}.details.inline.details--open:hover{border:none;box-shadow:none}.details.inline.details--open>.details__header{color:var(--six-sidebar-color);font-weight:var(--six-font-weight-bold);background-color:var(--six-sidebar-header-background-color)}.details--disabled{background-color:var(--six-input-background-color-disabled);border-color:var(--six-input-border-color-disabled);color:var(--six-input-color-disabled)}.details__header{display:flex;align-items:center;border-radius:inherit;padding:var(--six-spacing-medium) var(--horizontal-padding);user-select:none;cursor:pointer}.details__header:focus{outline:none}.details--disabled .details__header{cursor:not-allowed;border-width:1px}.details--disabled .details__header:focus{outline:none;box-shadow:none}.details__summary{flex:1 1 auto;display:flex;align-items:center}.details__summary-icon{flex:0 0 auto;display:flex;align-items:center;font-size:1.2em;transition:var(--six-transition-medium) transform ease}.details--open .details__summary-icon--animate{transform:rotate(-180deg)}.details__body{height:0;overflow:hidden;transition-property:height;transition-duration:var(--hide-duration);transition-timing-function:var(--hide-timing-function)}.details--open .details__body{transition-duration:var(--show-duration);transition-timing-function:var(--show-timing-function)}.details__content{padding:var(--six-spacing-medium)}";
|
|
5
5
|
|
|
6
6
|
let id = 0;
|
|
7
7
|
const SixDetails = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"six-details.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,oxEAAoxE;;ACI1yE,IAAI,EAAE,GAAG,CAAC,CAAC;MAuBE,UAAU;;;;;;;QAQb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;QAChC,cAAS,GAAG,KAAK,CAAC;QA8HlB,4BAAuB,GAAG,CAAC,KAAsB;YACvD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;gBAAE,OAAO;YAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;;YAG3C,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBACjF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;gBAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,GAAG,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;aAC/B;SACF,CAAC;QAEM,uBAAkB,GAAG;;YAC3B,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,eAAe,CAAC,EAAE;gBAC/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAA,IA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AAC,KAAK,EAAC,kBAAkB,IAC1C,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,EAEN,YACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;gBACL,uBAAuB,EAAE,IAAI;gBAC7B,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;aAC1D,IAED,YAAM,IAAI,EAAC,cAAc,EAAC,YAAY,EAAE,OAAO,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAC5E,WAAW,IAAI,gBAAU,IAAI,EAAE,IAAI,CAAC,eAAe,IAAG,WAAW,CAAY,CACzE,CACF,CACA,EAET,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,eAAe,EAAE,IAAI,CAAC,uBAAuB,IACrG,WACE,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,UAAU,EACjC,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,QAAQ,qBACI,GAAG,IAAI,CAAC,WAAW,SAAS,IAE7C,eAAQ,CACJ,CACF,CACF,EACN;KACH;;;;;;;;;;","names":[],"sources":["src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details--open:hover {\n color: var(--six-input-color-focus);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"six-details.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,4tEAA4tE;;ACIlvE,IAAI,EAAE,GAAG,CAAC,CAAC;MAuBE,UAAU;;;;;;;QAQb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;QAChC,cAAS,GAAG,KAAK,CAAC;QA8HlB,4BAAuB,GAAG,CAAC,KAAsB;YACvD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI;gBAAE,OAAO;YAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;;YAG3C,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBACjF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAC;gBAC5D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,GAAG,CAAC;gBAClD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;gBAChE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;aAC/B;SACF,CAAC;QAEM,uBAAkB,GAAG;;YAC3B,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,eAAe,CAAC,EAAE;gBAC/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,I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AS,EAAE,IAAI,CAAC,oBAAoB,IAEpC,WAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,kBAAkB,IAC1C,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,EAEN,YACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;gBACL,uBAAuB,EAAE,IAAI;gBAC7B,gCAAgC,EAAE,IAAI,CAAC,kBAAkB;aAC1D,IAED,YAAM,IAAI,EAAC,cAAc,EAAC,YAAY,EAAE,OAAO,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAC5E,WAAW,IAAI,gBAAU,IAAI,EAAE,IAAI,CAAC,eAAe,IAAG,WAAW,CAAY,CACzE,CACF,CACA,EAET,WAAK,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,eAAe,EAAE,IAAI,CAAC,uBAAuB,IACrG,WACE,IAAI,EAAC,SAAS,EACd,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,UAAU,EACjC,KAAK,EAAC,kBAAkB,EACxB,IAAI,EAAC,QAAQ,qBACI,GAAG,IAAI,CAAC,WAAW,SAAS,IAE7C,eAAQ,CACJ,CACF,CACF,EACN;KACH;;;;;;;;;;","names":[],"sources":["src/components/six-details/six-details.scss?tag=six-details&encapsulation=shadow","src/components/six-details/six-details.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --hide-duration: The length of the hide transition.\n * @prop --hide-timing-function: The timing function (easing) to use for the hide transition.\n * @prop --show-duration: The length of the show transition.\n * @prop --show-timing-function: The timing function (easing) to use for the show transition.\n * @prop --horizontal-padding: The horizontal padding\n */\n:host {\n --hide-duration: var(--six-transition-medium);\n --hide-timing-function: ease;\n --show-duration: var(--six-transition-medium);\n --show-timing-function: ease;\n --horizontal-padding: var(--six-spacing-medium);\n\n font-family: var(--six-font-family);\n display: block;\n}\n\n.details {\n border: solid var(--six-border-width) var(--six-input-border-color);\n border-radius: var(--six-border-radius-medium);\n color: var(--six-details-color);\n overflow-anchor: none;\n font-size: var(--six-input-font-size-medium);\n\n &:hover:not(.details--disabled):not(.details--open) {\n border-color: var(--six-input-border-color-hover);\n }\n\n &.inline {\n border: none;\n color: var(--six-sidebar-color);\n\n &:hover {\n background-color: var(--six-sidebar-hover-background-color);\n }\n\n &.details--open {\n background-color: var(--six-color-web-rock-50);\n\n &:hover {\n border: none;\n box-shadow: none;\n }\n\n & > .details__header {\n color: var(--six-sidebar-color);\n font-weight: var(--six-font-weight-bold);\n background-color: var(--six-sidebar-header-background-color);\n }\n }\n }\n}\n\n.details--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n color: var(--six-input-color-disabled);\n}\n\n.details__header {\n display: flex;\n align-items: center;\n border-radius: inherit;\n padding: var(--six-spacing-medium) var(--horizontal-padding);\n user-select: none;\n cursor: pointer;\n\n &:focus {\n outline: none;\n }\n}\n\n.focus-visible .details__header:focus {\n}\n\n.details--disabled .details__header {\n cursor: not-allowed;\n border-width: 1px;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n}\n\n.details__summary {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n}\n\n.details__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.2em;\n transition: var(--six-transition-medium) transform ease;\n}\n\n.details--open .details__summary-icon--animate {\n transform: rotate(-180deg);\n}\n\n.details__body {\n height: 0;\n overflow: hidden;\n transition-property: height;\n transition-duration: var(--hide-duration);\n transition-timing-function: var(--hide-timing-function);\n}\n\n.details--open .details__body {\n transition-duration: var(--show-duration);\n transition-timing-function: var(--show-timing-function);\n}\n\n.details__content {\n padding: var(--six-spacing-medium);\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { focusVisible } from '../../utils/focus-visible';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The details' content.\n * @slot summary - The details' summary. Alternatively, you can use the summary prop.\n *\n * @part base - The component's base wrapper.\n * @part header - The summary header.\n * @part summary - The details summary.\n * @part summary-icon - The expand/collapse summary icon.\n * @part content - The details content.\n */\n\n@Component({\n tag: 'six-details',\n styleUrl: 'six-details.scss',\n shadow: true,\n})\nexport class SixDetails {\n @Element() readonly host!: HTMLSixDetailsElement;\n\n @State() animateSummaryIcon = true;\n\n private body?: HTMLElement;\n private details?: HTMLElement;\n private header?: HTMLElement;\n private componentId = `details-${++id}`;\n private isVisible = false;\n\n /** Indicates whether the details is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The summary to show in the details header. If you need to display HTML, use the `summary` slot instead. */\n @Prop() summary = '';\n\n /** The summary icon to show in the details header. If you need to display HTML, use the `summary-icon` slot instead. */\n @Prop() summaryIcon?: string;\n\n /** The icon's size. */\n @Prop({ reflect: true }) summaryIconSize:\n | 'inherit'\n | 'xSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'xLarge'\n | 'xxLarge'\n | 'xxxLarge' = 'inherit';\n\n /** Set to true to prevent the user from toggling the details. */\n @Prop() disabled = false;\n\n /** Set to true when you want to use six-details inline e.g. in a sidebar */\n @Prop() inline = false;\n\n /** Set to true when you want details without content to be selectable. This is important if you e.g. have a toggled sidebar where some menus have no children */\n @Prop() selectableEmpty = false;\n\n /** Set to false when you want to hide the summary icon and disable the open/close mechanism. Usually not needed, but used internally by 'six-sidebar-item-group' */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() hasContent = true;\n\n @Watch('open')\n handleOpenChange() {\n if (this.body != null) {\n this.open ? this.show() : this.hide();\n }\n }\n\n /** Emitted when the details opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-details-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details opens and all transitions are complete. */\n @Event({ eventName: 'six-details-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the details closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-details-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the details closes and all transitions are complete. */\n @Event({ eventName: 'six-details-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.details == null || this.body == null) return;\n\n focusVisible.observe(this.details);\n this.body.hidden = !this.open;\n\n // Show on init if open\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.details != null) {\n focusVisible.unobserve(this.details);\n }\n }\n\n /** Shows the detail body */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.body == null) return;\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.body.hidden = false;\n\n if (this.body.scrollHeight === 0) {\n // When the scroll height can't be measured, use auto. This prevents a borked open state when the details is open\n // initially, but not immediately visible (i.e. in a tab panel).\n this.body.style.height = 'auto';\n this.body.style.overflow = 'visible';\n } else {\n this.body.style.height = `${this.body.scrollHeight}px`;\n this.body.style.overflow = 'hidden';\n }\n this.isVisible = true;\n this.open = true;\n }\n\n /** Hides the detail body */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.body == null) return;\n const body = this.body;\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n // We can't transition out of `height: auto`, so let's set it to the current height first\n body.style.height = `${body.scrollHeight}px`;\n body.style.overflow = 'hidden';\n\n requestAnimationFrame(() => {\n // tslint:disable-next-line: no-unused-expression\n body.clientWidth; // force a reflow\n body.style.height = '0';\n });\n\n this.isVisible = false;\n this.open = false;\n }\n\n private handleBodyTransitionEnd = (event: TransitionEvent) => {\n if (this.body == null) return;\n const target = event.target as HTMLElement;\n\n // Ensure we only emit one event when the target element is no longer visible\n if (event.propertyName === 'height' && target.classList.contains('details__body')) {\n this.body.style.overflow = this.open ? 'visible' : 'hidden';\n this.body.style.height = this.open ? 'auto' : '0';\n this.open ? this.sixAfterShow.emit() : this.sixAfterHide.emit();\n this.body.hidden = !this.open;\n }\n };\n\n private handleSummaryClick = () => {\n if (!this.disabled && (this.hasContent || this.selectableEmpty)) {\n this.open ? this.hide() : this.show();\n this.header?.focus();\n }\n };\n\n private handleSummaryKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.open ? this.hide() : this.show();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n };\n\n render() {\n const summaryIcon = this.hasContent && (this.summaryIcon || 'expand_more');\n\n return (\n <div\n ref={(el) => (this.details = el)}\n part=\"base\"\n class={{\n details: true,\n 'details--open': this.open,\n 'details--disabled': this.disabled,\n inline: this.inline,\n }}\n >\n <header\n ref={(el) => (this.header = el)}\n part=\"header\"\n id={`${this.componentId}-header`}\n class=\"details__header\"\n role=\"button\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls={`${this.componentId}-content`}\n aria-disabled={this.disabled ? 'true' : 'false'}\n tabIndex={this.disabled ? -1 : 0}\n onClick={this.handleSummaryClick}\n onKeyDown={this.handleSummaryKeyDown}\n >\n <div part=\"summary\" class=\"details__summary\">\n <slot name=\"summary\">{this.summary}</slot>\n </div>\n\n <span\n part=\"summary-icon\"\n class={{\n 'details__summary-icon': true,\n 'details__summary-icon--animate': this.animateSummaryIcon,\n }}\n >\n <slot name=\"summary-icon\" onSlotchange={() => (this.animateSummaryIcon = false)}>\n {summaryIcon && <six-icon size={this.summaryIconSize}>{summaryIcon}</six-icon>}\n </slot>\n </span>\n </header>\n\n <div ref={(el) => (this.body = el)} class=\"details__body\" onTransitionEnd={this.handleBodyTransitionEnd}>\n <div\n part=\"content\"\n id={`${this.componentId}-content`}\n class=\"details__content\"\n role=\"region\"\n aria-labelledby={`${this.componentId}-header`}\n >\n <slot />\n </div>\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll-3e16851e.js';
|
|
3
3
|
import { h as hasSlot } from './slot-56531341.js';
|
|
4
4
|
import { i as isPreventScrollSupported, M as Modal } from './modal-96526245.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { u as unlockBodyScrolling, l as lockBodyScrolling } from './scroll-3e16851e.js';
|
|
3
3
|
import { h as hasSlot } from './slot-56531341.js';
|
|
4
4
|
import { i as isPreventScrollSupported, M as Modal } from './modal-96526245.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-79d4ef67.js';
|
|
2
2
|
import { P as Popover } from './popover-25996e62.js';
|
|
3
3
|
import { E as EventListeners } from './event-listeners-706d4309.js';
|
|
4
4
|
import { a as debounce, D as DEFAULT_DEBOUNCE_FAST } from './execution-control-2ebaf4ef.js';
|
|
@@ -45,7 +45,7 @@ const SixDropdown = class {
|
|
|
45
45
|
this.resizeObserver = new ResizeObserver(debounce(() => this.updatePanelPosition(), 100));
|
|
46
46
|
this.eventListeners = new EventListeners();
|
|
47
47
|
this.getMenuItems = () => {
|
|
48
|
-
var _a, _b, _c;
|
|
48
|
+
var _a, _b, _c, _d;
|
|
49
49
|
if (this.options.length > 0) {
|
|
50
50
|
return {
|
|
51
51
|
sixMenuItems: this.renderedOptions.map((option) => (h("six-menu-item", { value: option.value }, option.label))),
|
|
@@ -59,8 +59,10 @@ const SixDropdown = class {
|
|
|
59
59
|
const selectionContainer = (_a = this.panelSlot) === null || _a === void 0 ? void 0 : _a.assignedElements({ flatten: true }).filter(isSelectionContainer).at(0);
|
|
60
60
|
const sixMenuElement = (_b = this.panelSlot) === null || _b === void 0 ? void 0 : _b.assignedElements({ flatten: true }).filter(isSixMenu).at(0);
|
|
61
61
|
const selectionContainerItems = (selectionContainer === null || selectionContainer === void 0 ? void 0 : selectionContainer.querySelectorAll('six-menu-item')) || [];
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
let sixMenuItems = ((_c = sixMenuElement === null || sixMenuElement === void 0 ? void 0 : sixMenuElement.querySelector('slot')) === null || _c === void 0 ? void 0 : _c.assignedElements().filter((el) => isSixMenuItem(el))) || [];
|
|
63
|
+
if (sixMenuItems.length === 0) {
|
|
64
|
+
sixMenuItems = Array.from(((_d = sixMenuElement === null || sixMenuElement === void 0 ? void 0 : sixMenuElement.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelectorAll('six-menu-item')) || []);
|
|
65
|
+
}
|
|
64
66
|
if (selectionContainerItems.length > 0 || sixMenuItems.length > 0) {
|
|
65
67
|
return { sixMenuItems, selectionContainerItems: [...selectionContainerItems] };
|
|
66
68
|
}
|