@spw-ds/spw-stencil-library 1.2.4 → 1.2.5
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/loader.cjs.js +1 -1
- package/dist/cjs/spw-button.spw-loading.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-button_2.cjs.entry.js +1 -1
- package/dist/cjs/spw-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-custom-select.cjs.entry.js +43 -7
- package/dist/cjs/spw-custom-select.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-custom-select.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-date-picker.cjs.entry.js +48 -28
- package/dist/cjs/spw-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-date-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-field-label_6.cjs.entry.js +1 -1
- package/dist/cjs/spw-field-label_6.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-pagination.cjs.entry.js +26 -16
- package/dist/cjs/spw-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-pagination.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-search-field.cjs.entry.js +12 -2
- package/dist/cjs/spw-search-field.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-search-field.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-select.cjs.entry.js +3 -1
- package/dist/cjs/spw-select.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-select.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-stencil-library.cjs.js +1 -1
- package/dist/cjs/spw-table-cell.cjs.entry.js +23 -2
- package/dist/cjs/spw-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-table-cell.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/spw-table-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-table-footer.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-table-header.cjs.entry.js +33 -3
- package/dist/cjs/spw-table-header.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-table-header.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-table-row.cjs.entry.js +34 -2
- package/dist/cjs/spw-table-row.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-table-row.entry.cjs.js.map +1 -1
- package/dist/cjs/spw-table.cjs.entry.js +26 -3
- package/dist/cjs/spw-table.cjs.entry.js.map +1 -1
- package/dist/cjs/spw-table.entry.cjs.js.map +1 -1
- package/dist/cjs/utils-D_vNTY6w.js.map +1 -1
- package/dist/collection/components/spw-button/spw-button.css +1 -1
- package/dist/collection/components/spw-custom-select/spw-custom-select.css +1 -1
- package/dist/collection/components/spw-custom-select/spw-custom-select.js +42 -6
- package/dist/collection/components/spw-custom-select/spw-custom-select.js.map +1 -1
- package/dist/collection/components/spw-date-picker/spw-date-picker.js +48 -28
- package/dist/collection/components/spw-date-picker/spw-date-picker.js.map +1 -1
- package/dist/collection/components/spw-link/spw-link.css +1 -1
- package/dist/collection/components/spw-pagination/spw-pagination.css +1 -1
- package/dist/collection/components/spw-pagination/spw-pagination.js +54 -13
- package/dist/collection/components/spw-pagination/spw-pagination.js.map +1 -1
- package/dist/collection/components/spw-search-field/spw-search-field.js +50 -2
- package/dist/collection/components/spw-search-field/spw-search-field.js.map +1 -1
- package/dist/collection/components/spw-select/spw-select.js +3 -1
- package/dist/collection/components/spw-select/spw-select.js.map +1 -1
- package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.css +1 -1
- package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js +82 -1
- package/dist/collection/components/spw-table/spw-table-cell/spw-table-cell.js.map +1 -1
- package/dist/collection/components/spw-table/spw-table-footer/spw-table-footer.css +1 -1
- package/dist/collection/components/spw-table/spw-table-header/spw-table-header.css +1 -1
- package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js +92 -2
- package/dist/collection/components/spw-table/spw-table-header/spw-table-header.js.map +1 -1
- package/dist/collection/components/spw-table/spw-table-row/spw-table-row.css +1 -1
- package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js +66 -1
- package/dist/collection/components/spw-table/spw-table-row/spw-table-row.js.map +1 -1
- package/dist/collection/components/spw-table/spw-table.js +27 -2
- package/dist/collection/components/spw-table/spw-table.js.map +1 -1
- package/dist/collection/stories/organisms/spw-footer/spw-footer.stories.js +1 -1
- package/dist/collection/stories/organisms/spw-footer/spw-footer.stories.js.map +1 -1
- package/dist/collection/utils/utils.js +47 -48
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-du-Bai6S.js → p-B2toBmC2.js} +32 -21
- package/dist/components/p-B2toBmC2.js.map +1 -0
- package/dist/components/p-BBi01mKM.js.map +1 -1
- package/dist/components/{p-AjhBdYbk.js → p-DjyPtAVX.js} +3 -3
- package/dist/components/p-DjyPtAVX.js.map +1 -0
- package/dist/components/{p-CNNUoO2J.js → p-qROlK2WR.js} +3 -3
- package/dist/components/p-qROlK2WR.js.map +1 -0
- package/dist/components/spw-breadcrumb-item.js +1 -1
- package/dist/components/spw-button.js +1 -1
- package/dist/components/spw-cookies.js +1 -1
- package/dist/components/spw-custom-select.js +43 -7
- package/dist/components/spw-custom-select.js.map +1 -1
- package/dist/components/spw-date-picker.js +48 -28
- package/dist/components/spw-date-picker.js.map +1 -1
- package/dist/components/spw-file-upload.js +1 -1
- package/dist/components/spw-header-lang.js +1 -1
- package/dist/components/spw-header.js +1 -1
- package/dist/components/spw-iodda.js +1 -1
- package/dist/components/spw-link.js +1 -1
- package/dist/components/spw-message.js +1 -1
- package/dist/components/spw-pagination.js +1 -1
- package/dist/components/spw-search-field.js +15 -4
- package/dist/components/spw-search-field.js.map +1 -1
- package/dist/components/spw-select.js +3 -1
- package/dist/components/spw-select.js.map +1 -1
- package/dist/components/spw-table-cell.js +26 -2
- package/dist/components/spw-table-cell.js.map +1 -1
- package/dist/components/spw-table-footer.js +1 -1
- package/dist/components/spw-table-footer.js.map +1 -1
- package/dist/components/spw-table-header.js +37 -4
- package/dist/components/spw-table-header.js.map +1 -1
- package/dist/components/spw-table-row.js +39 -3
- package/dist/components/spw-table-row.js.map +1 -1
- package/dist/components/spw-table.js +28 -4
- package/dist/components/spw-table.js.map +1 -1
- package/dist/components_json.json +268 -12
- package/dist/components_vscode.json +3088 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/spw-button.spw-loading.entry.js.map +1 -1
- package/dist/esm/spw-button_2.entry.js +1 -1
- package/dist/esm/spw-button_2.entry.js.map +1 -1
- package/dist/esm/spw-custom-select.entry.js +43 -7
- package/dist/esm/spw-custom-select.entry.js.map +1 -1
- package/dist/esm/spw-date-picker.entry.js +48 -28
- package/dist/esm/spw-date-picker.entry.js.map +1 -1
- package/dist/esm/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.js.map +1 -1
- package/dist/esm/spw-field-label_6.entry.js +1 -1
- package/dist/esm/spw-field-label_6.entry.js.map +1 -1
- package/dist/esm/spw-pagination.entry.js +26 -16
- package/dist/esm/spw-pagination.entry.js.map +1 -1
- package/dist/esm/spw-search-field.entry.js +13 -3
- package/dist/esm/spw-search-field.entry.js.map +1 -1
- package/dist/esm/spw-select.entry.js +3 -1
- package/dist/esm/spw-select.entry.js.map +1 -1
- package/dist/esm/spw-stencil-library.js +1 -1
- package/dist/esm/spw-table-cell.entry.js +23 -2
- package/dist/esm/spw-table-cell.entry.js.map +1 -1
- package/dist/esm/spw-table-footer.entry.js +1 -1
- package/dist/esm/spw-table-footer.entry.js.map +1 -1
- package/dist/esm/spw-table-header.entry.js +33 -3
- package/dist/esm/spw-table-header.entry.js.map +1 -1
- package/dist/esm/spw-table-row.entry.js +35 -3
- package/dist/esm/spw-table-row.entry.js.map +1 -1
- package/dist/esm/spw-table.entry.js +26 -3
- package/dist/esm/spw-table.entry.js.map +1 -1
- package/dist/esm/utils-BBi01mKM.js.map +1 -1
- package/dist/spw-stencil-library/p-0f69442e.entry.js +2 -0
- package/dist/spw-stencil-library/p-0f69442e.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-14722019.entry.js +2 -0
- package/dist/spw-stencil-library/p-14722019.entry.js.map +1 -0
- package/dist/spw-stencil-library/{p-b1de48f3.entry.js → p-152525de.entry.js} +2 -2
- package/dist/spw-stencil-library/p-152525de.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-2ad00dfc.entry.js +2 -0
- package/dist/spw-stencil-library/p-2ad00dfc.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-4a273848.entry.js +2 -0
- package/dist/spw-stencil-library/p-4a273848.entry.js.map +1 -0
- package/dist/spw-stencil-library/{p-31793077.entry.js → p-5632f307.entry.js} +2 -2
- package/dist/spw-stencil-library/p-5632f307.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-5e43e2ed.entry.js +2 -0
- package/dist/spw-stencil-library/p-5e43e2ed.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-92583499.entry.js +2 -0
- package/dist/spw-stencil-library/p-92583499.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-9d760073.entry.js +2 -0
- package/dist/spw-stencil-library/p-9d760073.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-9e8a779e.entry.js +2 -0
- package/dist/spw-stencil-library/p-9e8a779e.entry.js.map +1 -0
- package/dist/spw-stencil-library/p-BBi01mKM.js.map +1 -1
- package/dist/spw-stencil-library/p-c4e4cfd4.entry.js +2 -0
- package/dist/spw-stencil-library/p-c4e4cfd4.entry.js.map +1 -0
- package/dist/spw-stencil-library/{p-f7760a47.entry.js → p-fcc5884a.entry.js} +2 -2
- package/dist/spw-stencil-library/p-fcc5884a.entry.js.map +1 -0
- package/dist/spw-stencil-library/spw-button.spw-loading.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-custom-select.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-date-picker.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-field-label.spw-group.spw-icon.spw-link.spw-separator.spw-theme-provider.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-pagination.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-search-field.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-select.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-stencil-library.esm.js +1 -1
- package/dist/spw-stencil-library/spw-table-cell.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-table-footer.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-table-header.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-table-row.entry.esm.js.map +1 -1
- package/dist/spw-stencil-library/spw-table.entry.esm.js.map +1 -1
- package/dist/stats.json +611 -150
- package/dist/types/components/spw-custom-select/spw-custom-select.d.ts +3 -0
- package/dist/types/components/spw-date-picker/spw-date-picker.d.ts +1 -0
- package/dist/types/components/spw-pagination/spw-pagination.d.ts +4 -1
- package/dist/types/components/spw-search-field/spw-search-field.d.ts +5 -0
- package/dist/types/components/spw-select/spw-select.d.ts +1 -0
- package/dist/types/components/spw-table/spw-table-cell/spw-table-cell.d.ts +6 -0
- package/dist/types/components/spw-table/spw-table-header/spw-table-header.d.ts +6 -0
- package/dist/types/components/spw-table/spw-table-row/spw-table-row.d.ts +8 -0
- package/dist/types/components/spw-table/spw-table.d.ts +2 -0
- package/dist/types/components.d.ts +83 -0
- package/dist/types/utils/utils.d.ts +2 -1
- package/hydrate/index.js +265 -72
- package/hydrate/index.mjs +265 -72
- package/package.json +1 -1
- package/dist/components/p-AjhBdYbk.js.map +0 -1
- package/dist/components/p-CNNUoO2J.js.map +0 -1
- package/dist/components/p-du-Bai6S.js.map +0 -1
- package/dist/spw-stencil-library/p-22f972ca.entry.js +0 -2
- package/dist/spw-stencil-library/p-22f972ca.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-2c28684f.entry.js +0 -2
- package/dist/spw-stencil-library/p-2c28684f.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-31793077.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-4c21a696.entry.js +0 -2
- package/dist/spw-stencil-library/p-4c21a696.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-572188ac.entry.js +0 -2
- package/dist/spw-stencil-library/p-572188ac.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-823b60ae.entry.js +0 -2
- package/dist/spw-stencil-library/p-823b60ae.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-b1de48f3.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-d115a739.entry.js +0 -2
- package/dist/spw-stencil-library/p-d115a739.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-d2258e0a.entry.js +0 -2
- package/dist/spw-stencil-library/p-d2258e0a.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-ecec4588.entry.js +0 -2
- package/dist/spw-stencil-library/p-ecec4588.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-f5caed11.entry.js +0 -2
- package/dist/spw-stencil-library/p-f5caed11.entry.js.map +0 -1
- package/dist/spw-stencil-library/p-f7760a47.entry.js.map +0 -1
package/hydrate/index.mjs
CHANGED
|
@@ -3399,7 +3399,7 @@ class SpwBreadcrumbItem {
|
|
|
3399
3399
|
}; }
|
|
3400
3400
|
}
|
|
3401
3401
|
|
|
3402
|
-
const spwButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;--spw-button-font-size-small:14px;--spw-button-font-size-medium:16px;--spw-button-font-size-large:18px;--spw-button-px-small:16px;--spw-button-px-medium:20px;--spw-button-px-large:24px;--spw-button-py-small:8px;--spw-button-py-medium:12px;--spw-button-py-large:16px;box-sizing:border-box;display:inline-block;font-size:100%;line-height:1.3;vertical-align:top}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host([is-full-width]){display:block;width:100%}.spw-button{border:2px solid transparent;border-radius:9999px;cursor:pointer;display:block;font-weight:700;letter-spacing:.18px;line-height:1;outline:3px solid transparent;overflow:hidden;transition:all .1s ease-in;width:100%}.spw-button--fullwidth{width:100%!important}.spw-button--fullwidth-mobile{width:100%}@media (min-width:768px){.spw-button--fullwidth-mobile{width:auto}}.spw-button--is-icon-only{padding-left:0!important;padding-right:0!important}.spw-button:focus-visible{box-shadow:0 0 0 5px #000;outline:3px solid #fff;outline-offset:-1px}.spw-button spw-loading{left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.spw-button--loading{pointer-events:none;position:relative}.spw-button--loading spw-loading{opacity:1}.spw-button__inner,.spw-button__inner-text{align-items:center;display:flex;justify-content:center;position:relative;z-index:2}.spw-button--loading .spw-button__inner-text{opacity:0}.spw-button:is(a){text-decoration:none}.spw-button--primary{background:var(--spw-ds-primary);color:var(--spw-ds-white)}.spw-button--primary:not([disabled]):hover{background:var(--spw-ds-variant)}.spw-button--primary:not([disabled]):active{background:var(--spw-ds-active)}.spw-button--primary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.3);--spw-loading-spinner-color:#fff}.spw-button--secondary{background:var(--spw-color-themes-grey-grey-200);color:var(--spw-color-themes-grey-grey-900)}.spw-button--secondary:not([disabled]):hover{background:var(--spw-color-themes-grey-grey-300)}.spw-button--secondary:not([disabled]):active{background:var(--spw-color-themes-grey-grey-400)}.spw-button--secondary spw-loading{--spw-loading-border-color:rgba(0,0,0,.1);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--tertiary{background:none;border-radius:4px;color:var(--spw-ds-primary);transition:none}.spw-button--tertiary:not([disabled]):active,.spw-button--tertiary:not([disabled]):hover{text-decoration:underline}.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-active)}.spw-button--tertiary spw-loading{--spw-loading-border-color:rgba(0,0,0,.1);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--primary[disabled],.spw-button--secondary[disabled]{background:var(--spw-color-themes-grey-grey-100)}.spw-button--tertiary[disabled]{background:none}.spw-button--primary[disabled],.spw-button--secondary[disabled],.spw-button--tertiary[disabled]{border-color:none;color:var(--spw-color-themes-grey-grey-400);cursor:not-allowed}.spw-button--surface-dark{box-shadow:var(--spw-effect-elevation-8)}.spw-button--surface-dark:not([disabled]):active{box-shadow:var(--spw-effect-elevation-active-0),var(--spw-effect-elevation-active-1),var(--spw-effect-elevation-active-2)}.spw-button--surface-dark[disabled]{box-shadow:none}.spw-button--surface-dark.spw-button--primary{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--primary:not([disabled]):hover{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--primary:not([disabled]):active{background:transparent;border-color:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-500)}.spw-button--surface-dark.spw-button--primary[disabled]{background:var(--spw-colors-support-grey-grey-700);border-color:var(--spw-colors-support-grey-grey-700);color:var(--spw-colors-support-grey-grey-800)}.spw-button--surface-dark.spw-button--primary spw-loading{--spw-loading-border-color:var(--spw-colors-support-grey-grey-300);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--surface-dark.spw-button--secondary{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--secondary:not([disabled]):hover{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--secondary:not([disabled]):active{background:var(--spw-colors-support-grey-grey-400);border-color:var(--spw-colors-support-grey-grey-400);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--secondary[disabled]{background:var(--spw-colors-support-grey-grey-700);border-color:var(--spw-colors-support-grey-grey-700);color:var(--spw-colors-support-grey-grey-800)}.spw-button--surface-dark.spw-button--secondary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-dark.spw-button--tertiary{box-shadow:none;color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--tertiary:not([disabled]):active,.spw-button--surface-dark.spw-button--tertiary:not([disabled]):hover{box-shadow:none}.spw-button--surface-dark.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-primary)}.spw-button--surface-dark.spw-button--tertiary[disabled]{color:var(--spw-colors-support-grey-grey-700)}.spw-button--surface-dark.spw-button--tertiary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-primary,.spw-button--surface-primary:not([disabled]):active,.spw-button--surface-primary[disabled]{box-shadow:none}.spw-button--surface-primary.spw-button--primary{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-primary.spw-button--primary:not([disabled]):hover{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--primary:not([disabled]):active{background:transparent;border-color:#fff;color:#fff;opacity:.9}.spw-button--surface-primary.spw-button--primary[disabled]{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-600);opacity:.5}.spw-button--surface-primary.spw-button--primary spw-loading{--spw-loading-border-color:var(--spw-colors-support-grey-grey-300);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--surface-primary.spw-button--secondary{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--secondary:not([disabled]):hover{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-primary.spw-button--secondary:not([disabled]):active{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-900);opacity:.9}.spw-button--surface-primary.spw-button--secondary[disabled]{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-600);opacity:.5}.spw-button--surface-primary.spw-button--secondary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-primary.spw-button--tertiary{box-shadow:none;color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--tertiary:not([disabled]):active,.spw-button--surface-primary.spw-button--tertiary:not([disabled]):hover{box-shadow:none}.spw-button--surface-primary.spw-button--tertiary:not([disabled]):active{color:#fff;opacity:.9}.spw-button--surface-primary.spw-button--tertiary[disabled]{color:#fff;opacity:.5}.spw-button--surface-primary.spw-button--tertiary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-light.spw-button--primary[disabled]{background:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-600)}.spw-button--surface-light.spw-button--secondary{background:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-light.spw-button--secondary:not([disabled]):hover{background:var(--spw-colors-support-grey-grey-300)}.spw-button--surface-light.spw-button--secondary:not([disabled]):active{background:var(--spw-colors-support-grey-grey-500)}.spw-button--surface-light.spw-button--secondary[disabled]{background:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-600)}.spw-button--surface-light.spw-button--tertiary{color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-light.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-primary)}.spw-button--surface-light.spw-button--tertiary[disabled]{color:var(--spw-colors-support-grey-grey-600)}.spw-button--large{font-size:var(--spw-button-font-size-large);padding:var(--spw-button-py-large) var(--spw-button-px-large)}.spw-button--large .spw-button__inner-text{gap:12px}.spw-button--large.spw-button--is-icon-only{width:54px}.spw-button--medium{font-size:var(--spw-button-font-size-medium);padding:var(--spw-button-py-medium) var(--spw-button-px-medium)}.spw-button--medium .spw-button__inner-text{gap:8px}.spw-button--medium.spw-button--is-icon-only{width:45px}.spw-button--small{font-size:var(--spw-button-font-size-small);padding:var(--spw-button-py-small) var(--spw-button-px-small)}.spw-button--small .spw-button__inner-text{gap:6px}.spw-button--small.spw-button--is-icon-only{width:35px}.spw-button--large.spw-button--tertiary,.spw-button--medium.spw-button--tertiary,.spw-button--small.spw-button--tertiary{padding:4px}.spw-tw-mr-2{margin-right:.5rem}.spw-tw-relative{position:relative}.spw-tw-flex{display:flex}.spw-tw-w-full{width:100%}.spw-tw-items-center{align-items:center}.spw-tw-justify-between{justify-content:space-between}.spw-tw-gap-x-2{column-gap:.5rem}.spw-tw-gap-y-2{row-gap:.5rem}.spw-tw-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}";
|
|
3402
|
+
const spwButtonCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;--spw-button-font-size-small:14px;--spw-button-font-size-medium:16px;--spw-button-font-size-large:18px;--spw-button-px-small:16px;--spw-button-px-medium:20px;--spw-button-px-large:24px;--spw-button-py-small:8px;--spw-button-py-medium:12px;--spw-button-py-large:16px;box-sizing:border-box;display:inline-block;font-size:100%;line-height:1.3;vertical-align:top}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host([is-full-width]){display:block;width:100%}.spw-button{border:2px solid transparent;border-radius:9999px;cursor:pointer;display:block;font-weight:700;letter-spacing:.18px;line-height:1;outline:3px solid transparent;overflow:hidden;transition:all .1s ease-in;width:100%}.spw-button--fullwidth{width:100%!important}.spw-button--fullwidth-mobile{width:100%}@media (min-width:768px){.spw-button--fullwidth-mobile{width:auto}}.spw-button--is-icon-only{padding-left:0!important;padding-right:0!important}.spw-button:focus-visible{box-shadow:0 0 0 5px #000;outline:3px solid #fff;outline-offset:-1px}.spw-button spw-loading{left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.spw-button--loading{pointer-events:none;position:relative}.spw-button--loading spw-loading{opacity:1}.spw-button__inner,.spw-button__inner-text{align-items:center;display:flex;justify-content:center;position:relative;z-index:2}.spw-button--loading .spw-button__inner-text{opacity:0}.spw-button:is(a){text-decoration:none}.spw-button--primary{background:var(--spw-ds-primary);color:var(--spw-ds-white)}.spw-button--primary:not([disabled]):hover{background:var(--spw-ds-variant)}.spw-button--primary:not([disabled]):active{background:var(--spw-ds-active)}.spw-button--primary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.3);--spw-loading-spinner-color:#fff}.spw-button--secondary{background:var(--spw-color-themes-grey-grey-200);color:var(--spw-color-themes-grey-grey-900)}.spw-button--secondary:not([disabled]):hover{background:var(--spw-color-themes-grey-grey-300)}.spw-button--secondary:not([disabled]):active{background:var(--spw-color-themes-grey-grey-400)}.spw-button--secondary spw-loading{--spw-loading-border-color:rgba(0,0,0,.1);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--tertiary{background:none;border-radius:4px;color:var(--spw-ds-primary);transition:none}.spw-button--tertiary:not([disabled]):active,.spw-button--tertiary:not([disabled]):hover{text-decoration:underline}.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-active)}.spw-button--tertiary spw-loading{--spw-loading-border-color:rgba(0,0,0,.1);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--primary[disabled],.spw-button--secondary[disabled]{background:var(--spw-color-themes-grey-grey-100)}.spw-button--tertiary[disabled]{background:none}.spw-button--primary[disabled],.spw-button--secondary[disabled],.spw-button--tertiary[disabled]{border-color:none;color:var(--spw-color-themes-grey-grey-400);cursor:not-allowed}.spw-button--surface-dark{box-shadow:var(--spw-effect-elevation-8)}.spw-button--surface-dark:not([disabled]):active{box-shadow:var(--spw-effect-elevation-active-0),var(--spw-effect-elevation-active-1),var(--spw-effect-elevation-active-2)}.spw-button--surface-dark[disabled]{box-shadow:none}.spw-button--surface-dark.spw-button--primary{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--primary:not([disabled]):hover{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--primary:not([disabled]):active{background:transparent;border-color:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-500)}.spw-button--surface-dark.spw-button--primary[disabled]{background:var(--spw-colors-support-grey-grey-700);border-color:var(--spw-colors-support-grey-grey-700);color:var(--spw-colors-support-grey-grey-800)}.spw-button--surface-dark.spw-button--primary spw-loading{--spw-loading-border-color:var(--spw-colors-support-grey-grey-300);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--surface-dark.spw-button--secondary{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--secondary:not([disabled]):hover{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--secondary:not([disabled]):active{background:var(--spw-colors-support-grey-grey-400);border-color:var(--spw-colors-support-grey-grey-400);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-dark.spw-button--secondary[disabled]{background:var(--spw-colors-support-grey-grey-700);border-color:var(--spw-colors-support-grey-grey-700);color:var(--spw-colors-support-grey-grey-800)}.spw-button--surface-dark.spw-button--secondary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-dark.spw-button--tertiary{box-shadow:none;color:var(--spw-ds-white)}.spw-button--surface-dark.spw-button--tertiary:not([disabled]):active,.spw-button--surface-dark.spw-button--tertiary:not([disabled]):hover{box-shadow:none}.spw-button--surface-dark.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-primary)}.spw-button--surface-dark.spw-button--tertiary[disabled]{color:var(--spw-colors-support-grey-grey-700)}.spw-button--surface-dark.spw-button--tertiary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-primary,.spw-button--surface-primary:not([disabled]):active,.spw-button--surface-primary[disabled]{box-shadow:none}.spw-button--surface-primary.spw-button--primary{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-primary.spw-button--primary:not([disabled]):hover{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--primary:not([disabled]):active{background:transparent;border-color:#fff;color:#fff;opacity:.9}.spw-button--surface-primary.spw-button--primary[disabled]{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-600);opacity:.5}.spw-button--surface-primary.spw-button--primary spw-loading{--spw-loading-border-color:var(--spw-colors-support-grey-grey-300);--spw-loading-spinner-color:var(--spw-ds-primary)}.spw-button--surface-primary.spw-button--secondary{background:transparent;border-color:var(--spw-ds-white);color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--secondary:not([disabled]):hover{background:var(--spw-ds-white);border-color:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-primary.spw-button--secondary:not([disabled]):active{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-900);opacity:.9}.spw-button--surface-primary.spw-button--secondary[disabled]{background:#fff;border-color:#fff;color:var(--spw-colors-support-grey-grey-600);opacity:.5}.spw-button--surface-primary.spw-button--secondary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-primary.spw-button--tertiary{box-shadow:none;color:var(--spw-ds-white)}.spw-button--surface-primary.spw-button--tertiary:not([disabled]):active,.spw-button--surface-primary.spw-button--tertiary:not([disabled]):hover{box-shadow:none}.spw-button--surface-primary.spw-button--tertiary:not([disabled]):active{color:#fff;opacity:.9}.spw-button--surface-primary.spw-button--tertiary[disabled]{color:#fff;opacity:.5}.spw-button--surface-primary.spw-button--tertiary spw-loading{--spw-loading-border-color:hsla(0,0%,100%,.2);--spw-loading-spinner-color:#fff}.spw-button--surface-light.spw-button--primary[disabled]{background:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-600)}.spw-button--surface-light.spw-button--secondary{background:var(--spw-ds-white);color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-light.spw-button--secondary:not([disabled]):hover{background:var(--spw-colors-support-grey-grey-300)}.spw-button--surface-light.spw-button--secondary:not([disabled]):active{background:var(--spw-colors-support-grey-grey-500)}.spw-button--surface-light.spw-button--secondary[disabled]{background:var(--spw-colors-support-grey-grey-500);color:var(--spw-colors-support-grey-grey-600)}.spw-button--surface-light.spw-button--tertiary{color:var(--spw-colors-support-grey-grey-900)}.spw-button--surface-light.spw-button--tertiary:not([disabled]):active{color:var(--spw-ds-primary)}.spw-button--surface-light.spw-button--tertiary[disabled]{color:var(--spw-colors-support-grey-grey-600)}.spw-button--large{font-size:var(--spw-button-font-size-large);padding:var(--spw-button-py-large) var(--spw-button-px-large)}.spw-button--large .spw-button__inner-text{gap:12px}.spw-button--large.spw-button--is-icon-only{width:54px}.spw-button--medium{font-size:var(--spw-button-font-size-medium);padding:var(--spw-button-py-medium) var(--spw-button-px-medium)}.spw-button--medium .spw-button__inner-text{gap:8px}.spw-button--medium.spw-button--is-icon-only{width:45px}.spw-button--small{font-size:var(--spw-button-font-size-small);padding:var(--spw-button-py-small) var(--spw-button-px-small)}.spw-button--small .spw-button__inner-text{gap:6px}.spw-button--small.spw-button--is-icon-only{width:35px}.spw-button--large.spw-button--tertiary,.spw-button--medium.spw-button--tertiary,.spw-button--small.spw-button--tertiary{padding:4px}.spw-tw-mr-2{margin-right:.5rem}.spw-tw-relative{position:relative}.spw-tw-flex{display:flex}.spw-tw-w-full{width:100%}.spw-tw-items-center{align-items:center}.spw-tw-justify-between{justify-content:space-between}.spw-tw-gap-x-2{column-gap:.5rem}.spw-tw-gap-y-2{row-gap:.5rem}.spw-tw-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}";
|
|
3403
3403
|
|
|
3404
3404
|
class SpwButton {
|
|
3405
3405
|
constructor(hostRef) {
|
|
@@ -4108,7 +4108,7 @@ class SpwCookies {
|
|
|
4108
4108
|
}; }
|
|
4109
4109
|
}
|
|
4110
4110
|
|
|
4111
|
-
const spwCustomSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-custom-select{position:relative}.spw-custom-select__container{align-items:center;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:4px;display:flex;height:40px;justify-content:space-between;line-height:40px;padding:0 12px;width:100%}.spw-custom-select__container:hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-custom-select__container:focus-visible,.spw-custom-select__container:focus-within{box-shadow:0 0 0 6px #000;outline:3px solid #fff;outline-offset:0}.spw-custom-select--disabled .spw-custom-select__container{background:var(--spw-color-themes-grey-grey-100);border-color:var(--spw-color-themes-grey-grey-400);color:var(--spw-color-themes-grey-grey-500);cursor:not-allowed}.spw-custom-select--disabled .spw-custom-select__container::-moz-placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container::placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container:focus,.spw-custom-select--disabled .spw-custom-select__container:focus-visible,.spw-custom-select--disabled .spw-custom-select__container:hover{outline:none}.spw-custom-select--is-error .spw-custom-select__container{border-color:var(--spw-colors-states-error-error-300)}.spw-custom-select--large .spw-custom-select__container{height:60px;line-height:60px;padding:0 24px}.spw-custom-select--is-opened .spw-custom-select__container{border-bottom-color:transparent;border-radius:4px 4px 0 0;height:auto;line-height:1;min-height:40px}.spw-custom-select__selected{flex:1;max-width:100%;padding-right:30px}.spw-custom-select__selected-item{align-items:center;background:var(--spw-color-themes-grey-grey-200);border:1px solid var(--spw-color-themes-grey-grey-900);border-radius:999px;color:var(--spw-color-themes-grey-grey-900);display:inline-flex;font-size:14px;gap:6px;height:24px;line-height:24px;margin:4px 6px 2px 0;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spw-custom-select__selected-items{text-wrap:nowrap;flex:1;overflow:hidden;text-overflow:ellipsis}.spw-custom-select--is-opened .spw-custom-select__selected-items{text-wrap:initial;overflow:visible;padding-bottom:4px;padding-top:3px;text-overflow:clip}.spw-custom-select__arrow{color:var(--spw-color-themes-grey-grey-600);font-size:16px;pointer-events:none;position:absolute;right:12px;top:10px}.spw-custom-select__wrapper{position:relative}.spw-custom-select--is-opened .spw-custom-select__search{left:0;margin-top:1px;position:absolute;top:0;width:100%;z-index:11}.spw-custom-select--has-value.spw-custom-select--is-opened .spw-custom-select__search{margin-top:-3px;top:auto;top:100%}.spw-custom-select__search-input{border:none;height:38px;line-height:40px;margin:0;padding:0;text-overflow:ellipsis;width:calc(100% - 30px)}.spw-custom-select__search-input:focus{outline:none}.spw-custom-select--is-opened .spw-custom-select__search-input{border-left:1px solid var(--spw-color-themes-grey-grey-800);padding:0 12px}.spw-custom-select--is-opened.spw-custom-select--has-value .spw-custom-select__search-input{border-right:1px solid var(--spw-color-themes-grey-grey-800);width:100%}.spw-custom-select__options{background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:200px;overflow-y:auto;position:absolute;width:100%;z-index:12}.spw-custom-select__options--down,.spw-custom-select__options--up{top:100%;transform:translateY(0)}.spw-custom-select--has-value.spw-custom-select--is-opened:not(.spw-custom-select--not-searchable) .spw-custom-select__options{margin-top:35px}.spw-custom-select__no-results{color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed;padding:12px}.spw-custom-select__option{border-bottom:1px solid var(--spw-color-themes-grey-grey-900);cursor:pointer;padding:12px}.spw-custom-select__option:hover{background-color:var(--spw-color-themes-grey-grey-200)}.spw-custom-select__option:last-child{border-bottom:none}.spw-custom-select__option--selected{font-weight:700}.spw-custom-select__error{color:var(--spw-color-themes-grey-grey-600);display:block;font-size:12px;margin-top:8px}.spw-custom-select__option--focused{background-color:var(--spw-color-themes-grey-grey-300)}.-spw-tw-mt-1{margin-top:-.25rem}.spw-tw-mb-2{margin-bottom:.5rem}.spw-tw-mr-2{margin-right:.5rem}";
|
|
4111
|
+
const spwCustomSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-custom-select{position:relative}.spw-custom-select__container{align-items:center;background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:4px;display:flex;height:40px;justify-content:space-between;line-height:40px;padding:0 12px;width:100%}.spw-custom-select__container:hover{outline:4px solid var(--spw-color-themes-grey-grey-300)}.spw-custom-select__container:focus-visible,.spw-custom-select__container:focus-within{box-shadow:0 0 0 6px #000;outline:3px solid #fff;outline-offset:0}.spw-custom-select--disabled .spw-custom-select__container{background:var(--spw-color-themes-grey-grey-100);border-color:var(--spw-color-themes-grey-grey-400);color:var(--spw-color-themes-grey-grey-500);cursor:not-allowed}.spw-custom-select--disabled .spw-custom-select__container::-moz-placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container::placeholder{color:var(--spw-color-themes-grey-grey-500)}.spw-custom-select--disabled .spw-custom-select__container:focus,.spw-custom-select--disabled .spw-custom-select__container:focus-visible,.spw-custom-select--disabled .spw-custom-select__container:hover{outline:none}.spw-custom-select--is-error .spw-custom-select__container{border-color:var(--spw-colors-states-error-error-300)}.spw-custom-select--large .spw-custom-select__container{height:60px;line-height:60px;padding:0 24px}.spw-custom-select--is-opened .spw-custom-select__container{border-bottom-color:transparent;border-radius:4px 4px 0 0;height:auto;line-height:1;min-height:40px}.spw-custom-select__selected{flex:1;max-width:100%;padding-right:30px}.spw-custom-select__selected-item{align-items:center;background:var(--spw-color-themes-grey-grey-200);border:1px solid var(--spw-color-themes-grey-grey-900);border-radius:999px;color:var(--spw-color-themes-grey-grey-900);display:inline-flex;font-size:14px;gap:6px;height:24px;line-height:24px;margin:4px 6px 2px 0;padding:0 8px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spw-custom-select__selected-items{text-wrap:nowrap;flex:1;overflow:hidden;text-overflow:ellipsis}.spw-custom-select--is-opened .spw-custom-select__selected-items{text-wrap:initial;overflow:visible;padding-bottom:4px;padding-top:3px;text-overflow:clip}.spw-custom-select__arrow{color:var(--spw-color-themes-grey-grey-600);font-size:16px;pointer-events:none;position:absolute;right:12px;top:10px}.spw-custom-select__wrapper{position:relative}.spw-custom-select--is-opened .spw-custom-select__search{left:0;margin-top:1px;position:absolute;top:0;width:100%;z-index:11}.spw-custom-select--has-value.spw-custom-select--is-opened .spw-custom-select__search{margin-top:-3px;top:auto;top:100%}.spw-custom-select__search-input{border:none;height:38px;line-height:40px;margin:0;padding:0;text-overflow:ellipsis;width:calc(100% - 30px)}.spw-custom-select__search-input:focus{outline:none}.spw-custom-select--is-opened .spw-custom-select__search-input{border-left:1px solid var(--spw-color-themes-grey-grey-800);padding:0 12px}.spw-custom-select--is-opened.spw-custom-select--has-value .spw-custom-select__search-input{border-right:1px solid var(--spw-color-themes-grey-grey-800);width:100%}.spw-custom-select__options{background-color:#fff;border:1px solid var(--spw-color-themes-grey-grey-800);border-radius:0 0 4px 4px;max-height:200px;overflow-y:auto;position:absolute;width:100%;z-index:12}.spw-custom-select__options--down,.spw-custom-select__options--up{top:100%;transform:translateY(0)}.spw-custom-select--has-value.spw-custom-select--is-opened:not(.spw-custom-select--not-searchable) .spw-custom-select__options{margin-top:35px}.spw-custom-select__no-results{color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed;padding:12px}.spw-custom-select__option{border-bottom:1px solid var(--spw-color-themes-grey-grey-900);cursor:pointer;padding:12px}.spw-custom-select__option:hover{background-color:var(--spw-color-themes-grey-grey-200)}.spw-custom-select__option:last-child{border-bottom:none}.spw-custom-select__option--selected{font-weight:700}.spw-custom-select__option--disabled{cursor:not-allowed;opacity:.5;pointer-events:none}.spw-custom-select__option--disabled:hover{background-color:transparent}.spw-custom-select__error{color:var(--spw-color-themes-grey-grey-600);display:block;font-size:12px;margin-top:8px}.spw-custom-select__option--focused{background-color:var(--spw-color-themes-grey-grey-300)}.-spw-tw-mt-1{margin-top:-.25rem}.spw-tw-mb-2{margin-bottom:.5rem}.spw-tw-mr-2{margin-right:.5rem}";
|
|
4112
4112
|
|
|
4113
4113
|
class SpwCustomSelect {
|
|
4114
4114
|
constructor(hostRef) {
|
|
@@ -4157,6 +4157,11 @@ class SpwCustomSelect {
|
|
|
4157
4157
|
this.showSuccessIcon = true;
|
|
4158
4158
|
/** Affiche une icône de warning si vrai */
|
|
4159
4159
|
this.showWarningIcon = true;
|
|
4160
|
+
this.handleOtherSelectOpened = (event) => {
|
|
4161
|
+
if (event.detail.instance !== this.host && this.isOpen) {
|
|
4162
|
+
this.closeDropdown();
|
|
4163
|
+
}
|
|
4164
|
+
};
|
|
4160
4165
|
this.handleClickOutside = (event) => {
|
|
4161
4166
|
var _a, _b;
|
|
4162
4167
|
if (this.isOpen) {
|
|
@@ -4221,10 +4226,12 @@ class SpwCustomSelect {
|
|
|
4221
4226
|
}
|
|
4222
4227
|
componentDidLoad() {
|
|
4223
4228
|
document.addEventListener('click', this.handleClickOutside);
|
|
4229
|
+
document.addEventListener('spw-custom-select-opened', this.handleOtherSelectOpened);
|
|
4224
4230
|
this.internals.setFormValue(this.getFormValue());
|
|
4225
4231
|
}
|
|
4226
4232
|
disconnectedCallback() {
|
|
4227
4233
|
document.removeEventListener('click', this.handleClickOutside);
|
|
4234
|
+
document.removeEventListener('spw-custom-select-opened', this.handleOtherSelectOpened);
|
|
4228
4235
|
}
|
|
4229
4236
|
parseOptions(newValue) {
|
|
4230
4237
|
try {
|
|
@@ -4232,12 +4239,14 @@ class SpwCustomSelect {
|
|
|
4232
4239
|
this.parsedOptions = newValue.map(option => ({
|
|
4233
4240
|
value: option.value,
|
|
4234
4241
|
label: option.label,
|
|
4242
|
+
disabled: option.disabled || false,
|
|
4235
4243
|
}));
|
|
4236
4244
|
}
|
|
4237
4245
|
else if (typeof newValue === 'string') {
|
|
4238
4246
|
this.parsedOptions = JSON.parse(newValue).map(option => ({
|
|
4239
4247
|
value: option.value,
|
|
4240
4248
|
label: option.label,
|
|
4249
|
+
disabled: option.disabled || false,
|
|
4241
4250
|
}));
|
|
4242
4251
|
}
|
|
4243
4252
|
else {
|
|
@@ -4290,12 +4299,24 @@ class SpwCustomSelect {
|
|
|
4290
4299
|
event.stopPropagation();
|
|
4291
4300
|
}
|
|
4292
4301
|
this.determineDropdownDirection();
|
|
4302
|
+
const wasOpen = this.isOpen;
|
|
4293
4303
|
this.isOpen = !this.isOpen;
|
|
4304
|
+
if (this.isOpen && !wasOpen) {
|
|
4305
|
+
this.notifyOtherSelects();
|
|
4306
|
+
}
|
|
4294
4307
|
if (!this.isOpen) {
|
|
4295
4308
|
this.focusedOptionIndex = null;
|
|
4296
4309
|
}
|
|
4297
4310
|
}
|
|
4298
4311
|
}
|
|
4312
|
+
notifyOtherSelects() {
|
|
4313
|
+
const event = new CustomEvent('spw-custom-select-opened', {
|
|
4314
|
+
detail: { instance: this.host },
|
|
4315
|
+
bubbles: true,
|
|
4316
|
+
composed: true
|
|
4317
|
+
});
|
|
4318
|
+
document.dispatchEvent(event);
|
|
4319
|
+
}
|
|
4299
4320
|
determineDropdownDirection() {
|
|
4300
4321
|
const rect = this.selectContainer.getBoundingClientRect();
|
|
4301
4322
|
const viewportHeight = window.innerHeight;
|
|
@@ -4310,6 +4331,7 @@ class SpwCustomSelect {
|
|
|
4310
4331
|
this.determineDropdownDirection();
|
|
4311
4332
|
this.isOpen = true;
|
|
4312
4333
|
this.focusedOptionIndex = 0;
|
|
4334
|
+
this.notifyOtherSelects();
|
|
4313
4335
|
}
|
|
4314
4336
|
closeDropdown() {
|
|
4315
4337
|
this.isOpen = false;
|
|
@@ -4320,6 +4342,10 @@ class SpwCustomSelect {
|
|
|
4320
4342
|
if (event) {
|
|
4321
4343
|
event.stopPropagation();
|
|
4322
4344
|
}
|
|
4345
|
+
const option = this.parsedOptions.find(opt => String(opt.value) === String(optionValue));
|
|
4346
|
+
if (option === null || option === void 0 ? void 0 : option.disabled) {
|
|
4347
|
+
return;
|
|
4348
|
+
}
|
|
4323
4349
|
if (this.multiple) {
|
|
4324
4350
|
const index = this.internalValue.findIndex(val => String(val) === String(optionValue));
|
|
4325
4351
|
if (index > -1) {
|
|
@@ -4346,6 +4372,7 @@ class SpwCustomSelect {
|
|
|
4346
4372
|
}
|
|
4347
4373
|
}
|
|
4348
4374
|
handleKeyDown(event) {
|
|
4375
|
+
var _a, _b;
|
|
4349
4376
|
if (event.target.classList.contains('spw-custom-select__search-input')) {
|
|
4350
4377
|
return;
|
|
4351
4378
|
}
|
|
@@ -4359,7 +4386,11 @@ class SpwCustomSelect {
|
|
|
4359
4386
|
case 'ArrowDown':
|
|
4360
4387
|
event.preventDefault();
|
|
4361
4388
|
if (this.isOpen) {
|
|
4362
|
-
|
|
4389
|
+
let nextIndex = this.focusedOptionIndex === null ? 0 : (this.focusedOptionIndex + 1) % this.parsedOptions.length;
|
|
4390
|
+
while (((_a = this.parsedOptions[nextIndex]) === null || _a === void 0 ? void 0 : _a.disabled) && nextIndex !== this.focusedOptionIndex) {
|
|
4391
|
+
nextIndex = (nextIndex + 1) % this.parsedOptions.length;
|
|
4392
|
+
}
|
|
4393
|
+
this.focusedOptionIndex = nextIndex;
|
|
4363
4394
|
}
|
|
4364
4395
|
else {
|
|
4365
4396
|
this.openDropdownWithKeyboard();
|
|
@@ -4368,8 +4399,11 @@ class SpwCustomSelect {
|
|
|
4368
4399
|
case 'ArrowUp':
|
|
4369
4400
|
event.preventDefault();
|
|
4370
4401
|
if (this.isOpen) {
|
|
4371
|
-
this.focusedOptionIndex
|
|
4372
|
-
|
|
4402
|
+
let prevIndex = this.focusedOptionIndex === null ? this.parsedOptions.length - 1 : (this.focusedOptionIndex - 1 + this.parsedOptions.length) % this.parsedOptions.length;
|
|
4403
|
+
while (((_b = this.parsedOptions[prevIndex]) === null || _b === void 0 ? void 0 : _b.disabled) && prevIndex !== this.focusedOptionIndex) {
|
|
4404
|
+
prevIndex = (prevIndex - 1 + this.parsedOptions.length) % this.parsedOptions.length;
|
|
4405
|
+
}
|
|
4406
|
+
this.focusedOptionIndex = prevIndex;
|
|
4373
4407
|
}
|
|
4374
4408
|
break;
|
|
4375
4409
|
case 'Enter':
|
|
@@ -4448,6 +4482,7 @@ class SpwCustomSelect {
|
|
|
4448
4482
|
this.focusedOptionIndex = 0;
|
|
4449
4483
|
if (!this.isOpen) {
|
|
4450
4484
|
this.isOpen = true;
|
|
4485
|
+
this.notifyOtherSelects();
|
|
4451
4486
|
}
|
|
4452
4487
|
}
|
|
4453
4488
|
isSearchVisible() {
|
|
@@ -4469,17 +4504,18 @@ class SpwCustomSelect {
|
|
|
4469
4504
|
render() {
|
|
4470
4505
|
const filteredOptions = this.getFilteredOptions();
|
|
4471
4506
|
const showPlaceholder = this.showPlaceholder();
|
|
4472
|
-
return (hAsync("div", { key: '
|
|
4507
|
+
return (hAsync("div", { key: 'a2e9fb9f19b299dfde36cc0562ee8d3e82441aae', class: this.elementClass, ref: el => (this.host = el) }, this.label && hAsync("spw-field-label", { key: '624c8188f2a36b66febcfd7c8a2d22e646490d56', label: this.label, name: this.name, required: this.required }), this.assistiveText && (hAsync("spw-field-message", { key: 'd1e74cf86c8b0de5a18a386ef384d747759b99cc', class: "spw-tw-mb-2 -spw-tw-mt-1", variant: "hint", showIcon: false }, this.assistiveText)), hAsync("div", { key: '0f4ae9ca8c745da16f4a6a8af594e81e04889eb9', class: "spw-custom-select__wrapper" }, hAsync("div", { key: 'ed257c48baa566f4480c161435ab2f1affd91ec0', class: "spw-custom-select__container", id: this.name, ref: el => (this.selectContainer = el), onClick: event => this.toggleDropdown(event), onKeyDown: event => this.handleKeyDown(event), tabindex: this.disabled ? -1 : 0 }, hAsync("div", { key: '5006bc09c045d469089dbeab1fb99fdaadf9ae4b', class: "spw-custom-select__selected" }, this.isSearchVisible() && (hAsync("div", { key: '5ea0a83210326adf2f22d700c0c6de204f8efc4a', class: "spw-custom-select__search" }, hAsync("input", { key: 'c4a23018e53464b65323fae714fe669e6cf510cc', class: "spw-custom-select__search-input", placeholder: "Entrez votre recherche", onInput: event => this.handleSearchInput(event), value: this.searchText }))), showPlaceholder && hAsync("span", { key: 'b35cea32fe067f85a90568a67f64e3723f15d2f9' }, this.placeholder), this.multiple && this.internalValue.length > 0 && (hAsync("div", { key: 'ad42651a8e606cc7abb424f167ec4a9b95562290', class: "spw-custom-select__selected-items" }, this.internalValue.map(val => {
|
|
4473
4508
|
var _a;
|
|
4474
4509
|
return (hAsync("span", { class: "spw-custom-select__selected-item" }, (_a = this.parsedOptions.find(option => String(option.value) === String(val))) === null || _a === void 0 ? void 0 :
|
|
4475
4510
|
_a.label, hAsync("spw-icon", { icon: "fa-times", class: "spw-custom-select__deselect-icon", onClick: event => this.selectOption(val, event) })));
|
|
4476
|
-
}))), !this.multiple && hAsync("span", { key: '
|
|
4511
|
+
}))), !this.multiple && hAsync("span", { key: '6050f92aaa17ef4613559e315f8d1fc95db86638' }, this.getSelectedLabels()))), hAsync("div", { key: 'b0031148a8d7da8d003f0935dfe6e319b8334d3f', class: "spw-custom-select__arrow" }, hAsync("spw-icon", { key: 'd2b3141c4308fe565780794888b763d0bf6ad101', icon: this.isOpen ? 'fa-chevron-up' : 'fa-chevron-down' })), this.isOpen && (hAsync("div", { key: 'ea056a2ec8ef32dac0b12ab4f1b7e232dd3fc609', class: `spw-custom-select__options spw-custom-select__options--${this.dropdownDirection}` }, !!filteredOptions.length && (hAsync("ul", { key: 'fee67a6f3e5f5d4c5d07c9b960f8e07b44974b77' }, filteredOptions.map((option, index) => (hAsync("li", { class: {
|
|
4477
4512
|
'spw-custom-select__option': true,
|
|
4478
4513
|
'spw-custom-select__option--selected': this.multiple
|
|
4479
4514
|
? this.internalValue.some(val => String(val) === String(option.value))
|
|
4480
4515
|
: option.value === this.internalValue,
|
|
4481
4516
|
'spw-custom-select__option--focused': index === this.focusedOptionIndex,
|
|
4482
|
-
|
|
4517
|
+
'spw-custom-select__option--disabled': option.disabled,
|
|
4518
|
+
}, onClick: () => this.selectOption(option.value) }, this.multiple && (hAsync("spw-checkbox", { onKeyDown: event => this.handleOptionKeyDown(event, option.value), class: "spw-tw-mr-2", checked: this.internalValue.some(val => String(val) === String(option.value)), disabled: option.disabled })), option.label))))), !filteredOptions.length && hAsync("p", { key: '31ea5a9e76b448f46bf2dc4009a64e575ad3ed85', class: "spw-custom-select__no-results" }, "Pas de r\u00E9sultats pour cette recherche.")))), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
|
|
4483
4519
|
}
|
|
4484
4520
|
static get formAssociated() { return true; }
|
|
4485
4521
|
static get watchers() { return {
|
|
@@ -4661,8 +4697,23 @@ class SpwDatePicker {
|
|
|
4661
4697
|
this.handleMaskedInput(event);
|
|
4662
4698
|
};
|
|
4663
4699
|
this.handleInputFocus = () => {
|
|
4664
|
-
if (
|
|
4665
|
-
|
|
4700
|
+
if (this.disabled)
|
|
4701
|
+
return;
|
|
4702
|
+
if (!this.datepickerInstance) {
|
|
4703
|
+
this.initializeDatepicker();
|
|
4704
|
+
}
|
|
4705
|
+
if (this.datepickerInstance && typeof this.datepickerInstance.show === 'function') {
|
|
4706
|
+
try {
|
|
4707
|
+
this.datepickerInstance.show();
|
|
4708
|
+
}
|
|
4709
|
+
catch (error) {
|
|
4710
|
+
console.warn("Erreur lors de l'ouverture du datepicker, réinitialisation...", error);
|
|
4711
|
+
this.datepickerInstance = null;
|
|
4712
|
+
this.initializeDatepicker();
|
|
4713
|
+
if (this.datepickerInstance && typeof this.datepickerInstance.show === 'function') {
|
|
4714
|
+
this.datepickerInstance.show();
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4666
4717
|
}
|
|
4667
4718
|
};
|
|
4668
4719
|
this.handleKeyDown = (ev) => {
|
|
@@ -4737,21 +4788,36 @@ class SpwDatePicker {
|
|
|
4737
4788
|
this.internalValue = start;
|
|
4738
4789
|
this.lastInputValue = this.internalValue;
|
|
4739
4790
|
}
|
|
4791
|
+
connectedCallback() {
|
|
4792
|
+
if (!this.datepickerInstance && this.inputElement) {
|
|
4793
|
+
requestAnimationFrame(() => {
|
|
4794
|
+
this.initializeDatepicker();
|
|
4795
|
+
});
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4740
4798
|
componentDidLoad() {
|
|
4799
|
+
var _a;
|
|
4741
4800
|
this.initializeDatepicker();
|
|
4742
4801
|
if (this.value) {
|
|
4743
4802
|
const initialDate = new Date(this.value);
|
|
4744
4803
|
if (!isNaN(initialDate.getTime())) {
|
|
4745
|
-
this.datepickerInstance.setDate(initialDate, true);
|
|
4746
|
-
this.inputElement
|
|
4747
|
-
|
|
4804
|
+
(_a = this.datepickerInstance) === null || _a === void 0 ? void 0 : _a.setDate(initialDate, true);
|
|
4805
|
+
if (this.inputElement) {
|
|
4806
|
+
this.inputElement.value = this.formatDate(initialDate);
|
|
4807
|
+
this.internalValue = this.formatDate(initialDate);
|
|
4808
|
+
}
|
|
4748
4809
|
}
|
|
4749
4810
|
}
|
|
4750
4811
|
this.internals.setFormValue(this.value ? this.value : null);
|
|
4751
4812
|
}
|
|
4752
4813
|
disconnectedCallback() {
|
|
4753
4814
|
if (this.datepickerInstance && typeof this.datepickerInstance.remove === 'function') {
|
|
4754
|
-
|
|
4815
|
+
setTimeout(() => {
|
|
4816
|
+
if (!this.el.isConnected && this.datepickerInstance) {
|
|
4817
|
+
this.datepickerInstance.remove();
|
|
4818
|
+
this.datepickerInstance = null;
|
|
4819
|
+
}
|
|
4820
|
+
}, 100);
|
|
4755
4821
|
}
|
|
4756
4822
|
}
|
|
4757
4823
|
watchValue(newValue) {
|
|
@@ -4882,7 +4948,6 @@ class SpwDatePicker {
|
|
|
4882
4948
|
let start = null;
|
|
4883
4949
|
let end = null;
|
|
4884
4950
|
siblings.forEach(pickerEl => {
|
|
4885
|
-
// Accéder à l'attribut HTML pour déterminer si c'est le début ou la fin
|
|
4886
4951
|
if (pickerEl.hasAttribute('is-start')) {
|
|
4887
4952
|
start = pickerEl;
|
|
4888
4953
|
}
|
|
@@ -4902,7 +4967,6 @@ class SpwDatePicker {
|
|
|
4902
4967
|
const startValue = start.value;
|
|
4903
4968
|
const endValue = end.value;
|
|
4904
4969
|
if (!startValue || !endValue) {
|
|
4905
|
-
// Pas de range complet, supprimer le highlighting
|
|
4906
4970
|
const allDates = this.datepickerInstance.calendar.querySelectorAll('.qs-square');
|
|
4907
4971
|
allDates.forEach((dateEl) => {
|
|
4908
4972
|
dateEl.classList.remove('spw-date-range-start', 'spw-date-range-end', 'spw-date-range-middle');
|
|
@@ -4913,34 +4977,27 @@ class SpwDatePicker {
|
|
|
4913
4977
|
const endDate = new Date(endValue);
|
|
4914
4978
|
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime()))
|
|
4915
4979
|
return;
|
|
4916
|
-
// Highlighter les dates dans le range
|
|
4917
4980
|
const allDates = this.datepickerInstance.calendar.querySelectorAll('.qs-square:not(.qs-empty)');
|
|
4918
4981
|
allDates.forEach((dateEl) => {
|
|
4919
4982
|
const dateNum = parseInt(dateEl.textContent || '0', 10);
|
|
4920
4983
|
if (!dateNum)
|
|
4921
4984
|
return;
|
|
4922
|
-
// Récupérer le mois/année actuellement affiché
|
|
4923
4985
|
const currentMonth = this.datepickerInstance.currentMonth;
|
|
4924
4986
|
const currentYear = this.datepickerInstance.currentYear;
|
|
4925
4987
|
const cellDate = new Date(currentYear, currentMonth, dateNum);
|
|
4926
|
-
// Normaliser les dates pour comparer uniquement jour/mois/année (sans heures)
|
|
4927
4988
|
const cellDateOnly = new Date(cellDate.getFullYear(), cellDate.getMonth(), cellDate.getDate());
|
|
4928
4989
|
const startDateOnly = new Date(startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
|
|
4929
4990
|
const endDateOnly = new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
|
|
4930
|
-
// Vérifier si cette date est dans le range
|
|
4931
4991
|
if (cellDateOnly >= startDateOnly && cellDateOnly <= endDateOnly) {
|
|
4932
4992
|
if (cellDateOnly.getTime() === startDateOnly.getTime()) {
|
|
4933
|
-
// Date de début
|
|
4934
4993
|
dateEl.classList.add('spw-date-range-start');
|
|
4935
4994
|
dateEl.classList.remove('spw-date-range-middle', 'spw-date-range-end');
|
|
4936
4995
|
}
|
|
4937
4996
|
else if (cellDateOnly.getTime() === endDateOnly.getTime()) {
|
|
4938
|
-
// Date de fin
|
|
4939
4997
|
dateEl.classList.add('spw-date-range-end');
|
|
4940
4998
|
dateEl.classList.remove('spw-date-range-middle', 'spw-date-range-start');
|
|
4941
4999
|
}
|
|
4942
5000
|
else {
|
|
4943
|
-
// Date au milieu
|
|
4944
5001
|
dateEl.classList.add('spw-date-range-middle');
|
|
4945
5002
|
dateEl.classList.remove('spw-date-range-start', 'spw-date-range-end');
|
|
4946
5003
|
}
|
|
@@ -5070,8 +5127,16 @@ class SpwDatePicker {
|
|
|
5070
5127
|
}
|
|
5071
5128
|
}
|
|
5072
5129
|
initializeDatepicker() {
|
|
5073
|
-
|
|
5074
|
-
|
|
5130
|
+
var _a;
|
|
5131
|
+
if (!this.inputElement) {
|
|
5132
|
+
const shadowInput = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input[type="text"]');
|
|
5133
|
+
if (shadowInput) {
|
|
5134
|
+
this.inputElement = shadowInput;
|
|
5135
|
+
}
|
|
5136
|
+
else {
|
|
5137
|
+
return;
|
|
5138
|
+
}
|
|
5139
|
+
}
|
|
5075
5140
|
const options = {
|
|
5076
5141
|
position: this.position,
|
|
5077
5142
|
startDay: 1,
|
|
@@ -5105,11 +5170,9 @@ class SpwDatePicker {
|
|
|
5105
5170
|
this.internals.setFormValue(isoString);
|
|
5106
5171
|
this.dateChange.emit({ value: isoString, date: selectedDate });
|
|
5107
5172
|
this.updateRangeConstraints();
|
|
5108
|
-
// Mettre à jour le highlighting visuel du range
|
|
5109
5173
|
setTimeout(() => {
|
|
5110
5174
|
var _a, _b;
|
|
5111
5175
|
this.highlightRangeInCalendar();
|
|
5112
|
-
// Mettre aussi à jour le highlighting sur l'autre datepicker s'il est ouvert
|
|
5113
5176
|
const { start, end } = this.getRangeSiblings();
|
|
5114
5177
|
const sibling = this.isStart ? end : start;
|
|
5115
5178
|
if (sibling && sibling.isOpen) {
|
|
@@ -5123,7 +5186,6 @@ class SpwDatePicker {
|
|
|
5123
5186
|
setTimeout(() => {
|
|
5124
5187
|
this.setupCalendarNavigation();
|
|
5125
5188
|
this.highlightRangeInCalendar();
|
|
5126
|
-
// Réappliquer plusieurs fois pour contrer js-datepicker
|
|
5127
5189
|
setTimeout(() => this.highlightRangeInCalendar(), 50);
|
|
5128
5190
|
setTimeout(() => this.highlightRangeInCalendar(), 150);
|
|
5129
5191
|
}, 100);
|
|
@@ -5134,9 +5196,6 @@ class SpwDatePicker {
|
|
|
5134
5196
|
},
|
|
5135
5197
|
};
|
|
5136
5198
|
if (this.range && this.rangeId) {
|
|
5137
|
-
// NOTE: On ne définit PAS options.id car js-datepicker applique alors des contraintes
|
|
5138
|
-
// automatiques qui sont inversées. On gère nous-mêmes les contraintes.
|
|
5139
|
-
// options.id = this.rangeId;
|
|
5140
5199
|
const { start, end } = this.getRangeSiblings();
|
|
5141
5200
|
if (this.isStart) {
|
|
5142
5201
|
if (end && end.value) {
|
|
@@ -5162,7 +5221,6 @@ class SpwDatePicker {
|
|
|
5162
5221
|
options.maxDate = new Date(this.maxDate);
|
|
5163
5222
|
}
|
|
5164
5223
|
if (this.datepickerInstance) {
|
|
5165
|
-
// js-datepicker utilise remove() pour détruire l'instance
|
|
5166
5224
|
if (typeof this.datepickerInstance.remove === 'function') {
|
|
5167
5225
|
this.datepickerInstance.remove();
|
|
5168
5226
|
}
|
|
@@ -5178,9 +5236,7 @@ class SpwDatePicker {
|
|
|
5178
5236
|
this.internalValue = formattedDate;
|
|
5179
5237
|
this.lastInputValue = formattedDate;
|
|
5180
5238
|
}
|
|
5181
|
-
catch (error) {
|
|
5182
|
-
// Si la date n'est pas valide avec les contraintes actuelles, on la laisse vide
|
|
5183
|
-
}
|
|
5239
|
+
catch (error) { }
|
|
5184
5240
|
}
|
|
5185
5241
|
}
|
|
5186
5242
|
}
|
|
@@ -5226,7 +5282,7 @@ class SpwDatePicker {
|
|
|
5226
5282
|
'spw-date-picker__input--open': this.isOpen,
|
|
5227
5283
|
};
|
|
5228
5284
|
const errorMessage = this.error || this.internalError;
|
|
5229
|
-
return (hAsync(Host, { key: '
|
|
5285
|
+
return (hAsync(Host, { key: 'eb66aebb637564da5d4e3c83cfe76d9d61e12e85' }, hAsync("div", { key: '7984062a8d5c11c6876780431ff8bfd93bd935cc', class: "spw-date-picker" }, this.label && hAsync("spw-field-label", { key: '494b6184491b96597c068dccba20a8f7d588b144', label: this.label, required: this.required }), this.assistiveText && (hAsync("spw-field-message", { key: 'cac9fb61d6af9ddfc648a1483812a72fea20ed2b', class: "spw-tw-mb-2 -spw-tw-mt-1", variant: "hint", showIcon: false }, this.assistiveText)), hAsync("div", { key: 'd54d9d938865e6594c7f58f62941a01014503ee5', class: "spw-date-picker__input-container" }, hAsync("input", { key: 'a5495ee8d28f851e40c8139f1f2ced630f19d016', ref: el => (this.inputElement = el), id: this.uniqueId, type: "text", class: inputClass, value: this.internalValue, placeholder: this.placeholder, disabled: this.disabled, required: this.required, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleKeyDown, "aria-describedby": this.assistiveText || errorMessage ? `${this.uniqueId}-help ${this.uniqueId}-error` : undefined, "aria-invalid": this.hasError }), hAsync("spw-icon", { key: '0737358ffe36b3c05d8a767c7cfdf14832144c85', icon: "fa-calendar", class: "spw-date-picker__icon" })), this.error && (hAsync("spw-field-message", { key: 'da0bf405570f245e40822174b0360537be5de8da', variant: "error", showIcon: this.showErrorIcon }, this.error)), this.hint && (hAsync("spw-field-message", { key: '2f72f9c384714c9687abe5807ce1a42c94247357', variant: "hint", showIcon: this.showHintIcon }, this.hint)), this.success && (hAsync("spw-field-message", { key: 'c6d8902f5c56a696eea582d60f0fc82baade5cf3', variant: "success", showIcon: this.showSuccessIcon }, this.success)), this.warning && (hAsync("spw-field-message", { key: '297c8119472b719c145c10301f4bd37bc6812f35', variant: "warning", showIcon: this.showWarningIcon }, this.warning)))));
|
|
5230
5286
|
}
|
|
5231
5287
|
static get formAssociated() { return true; }
|
|
5232
5288
|
get el() { return getElement(this); }
|
|
@@ -9213,7 +9269,7 @@ class SpwIodda {
|
|
|
9213
9269
|
}; }
|
|
9214
9270
|
}
|
|
9215
9271
|
|
|
9216
|
-
const spwLinkCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;--spw-link-color:var(--spw-ds-primary);--spw-link-hover-color:var(--spw-ds-variant);--spw-link-active-color:var(--spw-ds-active);--spw-link-font-weight:700;--spw-link-padding:6px;box-sizing:border-box;display:inline;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-link{border-radius:4px;color:var(--spw-link-color);cursor:pointer;display:inline;font-weight:var(--spw-link-font-weight);text-decoration:none}.spw-link--surface-dark{color:var(--spw-ds-white)}.spw-link__inner{border-bottom:1px solid var(--spw-link-color);display:inline}.spw-link--surface-dark .spw-link__inner{border-bottom:1px solid var(--spw-ds-white)}.spw-link:focus-visible{outline:3px solid #000;outline-offset:2px}.spw-link:hover{color:var(--spw-link-hover-color)}.spw-link:hover .spw-link__inner{border-bottom:2px solid var(--spw-link-hover-color)}.spw-link:active{color:var(--spw-link-active-color)}.spw-link:active .spw-link__inner{border-bottom:2px solid var(--spw-link-active-color)}.spw-link[aria-disabled=true]{color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed;pointer-events:none}.spw-link--surface-dark:hover{color:var(--spw-ds-white)}.spw-link--surface-dark:hover .spw-link__inner{border-bottom:2px solid var(--spw-ds-white)}.spw-link--surface-dark:active{color:var(--spw-ds-white)}.spw-link--surface-dark:active .spw-link__inner{border-bottom:2px solid var(--spw-ds-white)}.spw-link--surface-dark[aria-disabled=true]{color:var(--spw-ds-white);opacity:.5}.spw-link--has-icon-right spw-icon{margin-left:var(--spw-link-padding);margin-right:4px}.spw-link--has-icon-left spw-icon{margin-left:4px;margin-right:var(--spw-link-padding)}";
|
|
9272
|
+
const spwLinkCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;--spw-link-color:var(--spw-ds-primary);--spw-link-hover-color:var(--spw-ds-variant);--spw-link-active-color:var(--spw-ds-active);--spw-link-font-weight:700;--spw-link-padding:6px;box-sizing:border-box;display:inline;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-link{border-radius:4px;color:var(--spw-link-color);cursor:pointer;display:inline;font-weight:var(--spw-link-font-weight);text-decoration:none}.spw-link--surface-dark{color:var(--spw-ds-white)}.spw-link__inner{border-bottom:1px solid var(--spw-link-color);display:inline;overflow-wrap:break-word}.spw-link--surface-dark .spw-link__inner{border-bottom:1px solid var(--spw-ds-white)}.spw-link:focus-visible{outline:3px solid #000;outline-offset:2px}.spw-link:hover{color:var(--spw-link-hover-color)}.spw-link:hover .spw-link__inner{border-bottom:2px solid var(--spw-link-hover-color)}.spw-link:active{color:var(--spw-link-active-color)}.spw-link:active .spw-link__inner{border-bottom:2px solid var(--spw-link-active-color)}.spw-link[aria-disabled=true]{color:var(--spw-color-themes-grey-grey-600);cursor:not-allowed;pointer-events:none}.spw-link--surface-dark:hover{color:var(--spw-ds-white)}.spw-link--surface-dark:hover .spw-link__inner{border-bottom:2px solid var(--spw-ds-white)}.spw-link--surface-dark:active{color:var(--spw-ds-white)}.spw-link--surface-dark:active .spw-link__inner{border-bottom:2px solid var(--spw-ds-white)}.spw-link--surface-dark[aria-disabled=true]{color:var(--spw-ds-white);opacity:.5}.spw-link--has-icon-right spw-icon{margin-left:var(--spw-link-padding);margin-right:4px}.spw-link--has-icon-left spw-icon{margin-left:4px;margin-right:var(--spw-link-padding)}";
|
|
9217
9273
|
|
|
9218
9274
|
class SpwLink {
|
|
9219
9275
|
constructor(hostRef) {
|
|
@@ -12521,7 +12577,7 @@ class SpwMosaicItem {
|
|
|
12521
12577
|
}; }
|
|
12522
12578
|
}
|
|
12523
12579
|
|
|
12524
|
-
const spwPaginationCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-pagination__item button,.spw-pagination__item--dots{border-radius:32px;font-size:14px;font-weight:700;height:32px;line-height:32px;min-width:32px;text-align:center}.spw-pagination__item button:focus-visible,.spw-pagination__item--dots:focus-visible{box-shadow:0 0 0 5px #000;outline:3px solid #fff;outline-offset:-1px}.spw-pagination{align-items:center;display:flex;flex-direction:column}@media (min-width:768px){.spw-pagination{align-items:flex-start}}.spw-pagination ul{align-items:center;display:flex;padding:0}.spw-pagination__item{margin-right:12px}.spw-pagination__item spw-icon{font-size:18px}.spw-pagination__item button{background:none;border:none;color:var(--spw-color-themes-grey-grey-900);cursor:pointer;margin:0;padding:0 6px}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):hover button{background:var(--spw-color-themes-grey-grey-200)}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):active button{background:var(--spw-color-themes-grey-grey-300)}.spw-pagination__item--arrow button{align-items:center;display:flex;gap:8px;padding:0 12px;text-decoration:underline}.spw-pagination__item--arrow button:hover{text-decoration:none}.spw-pagination__item--dots{align-items:center;background:none;color:var(--spw-color-themes-grey-grey-400);cursor:default;display:inline-flex;justify-content:center;position:relative;top:3px}.spw-pagination__item--dots spw-icon{font-size:16px}.spw-pagination__item--desktop{display:none}@media (min-width:768px){.spw-pagination__item--desktop{display:inline-block}}.spw-pagination__item--active button{background:var(--spw-ds-primary);color:#fff}.spw-pagination__input spw-text-field{--spw-input-height:32px;--spw-input-padding:0 4px;--spw-input-text-align:center;--spw-input-font-size:14px;width:
|
|
12580
|
+
const spwPaginationCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:block;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-pagination__item button,.spw-pagination__item--dots{border-radius:32px;font-size:14px;font-weight:700;height:32px;line-height:32px;min-width:32px;text-align:center}.spw-pagination__item button:focus-visible,.spw-pagination__item--dots:focus-visible{box-shadow:0 0 0 5px #000;outline:3px solid #fff;outline-offset:-1px}.spw-pagination{align-items:center;display:flex;flex-direction:column}@media (min-width:768px){.spw-pagination{align-items:flex-start}}.spw-pagination ul{align-items:center;display:flex;padding:0}.spw-pagination__item{margin-right:12px}.spw-pagination__item spw-icon{font-size:18px}.spw-pagination__item button{background:none;border:none;color:var(--spw-color-themes-grey-grey-900);cursor:pointer;margin:0;padding:0 6px}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):hover button{background:var(--spw-color-themes-grey-grey-200)}.spw-pagination__item:not(.spw-pagination__item--active,.spw-pagination__item--dots,.spw-pagination__item--disabled):active button{background:var(--spw-color-themes-grey-grey-300)}.spw-pagination__item--arrow button{align-items:center;display:flex;gap:8px;padding:0 12px;text-decoration:underline}.spw-pagination__item--arrow button:hover{text-decoration:none}.spw-pagination__item--dots{align-items:center;background:none;color:var(--spw-color-themes-grey-grey-400);cursor:default;display:inline-flex;justify-content:center;position:relative;top:3px}.spw-pagination__item--dots spw-icon{font-size:16px}.spw-pagination__item--desktop{display:none}@media (min-width:768px){.spw-pagination__item--desktop{display:inline-block}}.spw-pagination__item--active button{background:var(--spw-ds-primary);color:#fff}.spw-pagination__input spw-text-field{--spw-input-height:32px;--spw-input-padding:0 4px;--spw-input-text-align:center;--spw-input-font-size:14px;width:36px}.spw-pagination__mobile-arrows{margin-top:12px}@media (min-width:768px){.spw-pagination__mobile-arrows{display:none!important}}.spw-pagination__total-pages{font-size:14px;margin:0 12px 0 6px}.spw-tw-mb-10{margin-bottom:2.5rem}.spw-tw-mb-6{margin-bottom:1.5rem}.spw-tw-ml-2{margin-left:.5rem}.spw-tw-mr-4{margin-right:1rem}.spw-tw-mt-12{margin-top:3rem}.-spw-tw-mt-1{margin-top:-.25rem}.spw-tw-mb-2{margin-bottom:.5rem}";
|
|
12525
12581
|
|
|
12526
12582
|
class SpwPagination {
|
|
12527
12583
|
constructor(hostRef) {
|
|
@@ -12550,6 +12606,23 @@ class SpwPagination {
|
|
|
12550
12606
|
calculateTotalPages() {
|
|
12551
12607
|
this.totalPages = Math.ceil(this.totalItems / this.itemsPerPage);
|
|
12552
12608
|
}
|
|
12609
|
+
onItemsPerPageChange() {
|
|
12610
|
+
this.currentPage = 1;
|
|
12611
|
+
this.inputPageValue = '1';
|
|
12612
|
+
this.pageChanged.emit(this.currentPage);
|
|
12613
|
+
}
|
|
12614
|
+
onTotalItemsChange() {
|
|
12615
|
+
const newTotalPages = Math.ceil(this.totalItems / this.itemsPerPage);
|
|
12616
|
+
if (this.currentPage > newTotalPages || this.currentPage === 0) {
|
|
12617
|
+
this.currentPage = 1;
|
|
12618
|
+
this.inputPageValue = '1';
|
|
12619
|
+
this.pageChanged.emit(this.currentPage);
|
|
12620
|
+
}
|
|
12621
|
+
}
|
|
12622
|
+
/** Méthode publique pour définir la page courante */
|
|
12623
|
+
async setPage(page) {
|
|
12624
|
+
this.goToPage(page);
|
|
12625
|
+
}
|
|
12553
12626
|
goToPage(page) {
|
|
12554
12627
|
if (page !== this.currentPage && !this.isDisabled && page >= 1 && page <= this.totalPages) {
|
|
12555
12628
|
this.currentPage = page;
|
|
@@ -12594,13 +12667,6 @@ class SpwPagination {
|
|
|
12594
12667
|
}
|
|
12595
12668
|
}
|
|
12596
12669
|
}
|
|
12597
|
-
calculateWidth() {
|
|
12598
|
-
const length = this.inputPageValue.length;
|
|
12599
|
-
if (length <= 1) {
|
|
12600
|
-
return '3ch';
|
|
12601
|
-
}
|
|
12602
|
-
return `${length + 1}ch`;
|
|
12603
|
-
}
|
|
12604
12670
|
calculatePageRange() {
|
|
12605
12671
|
const pages = [];
|
|
12606
12672
|
const { currentPage, totalPages, isMobile } = this;
|
|
@@ -12672,12 +12738,12 @@ class SpwPagination {
|
|
|
12672
12738
|
const pages = this.calculatePageRange();
|
|
12673
12739
|
const showPrevArrow = this.currentPage > 1;
|
|
12674
12740
|
const showNextArrow = this.currentPage < this.totalPages;
|
|
12675
|
-
const prevArrow = showPrevArrow && (hAsync("li", { key: '
|
|
12676
|
-
const nextArrow = showNextArrow && (hAsync("li", { key: '
|
|
12677
|
-
const prevArrowMobile = this.currentPage > 1 && (hAsync("li", { key: '
|
|
12678
|
-
const nextArrowMobile = this.currentPage < this.totalPages && (hAsync("li", { key: '
|
|
12679
|
-
const mobileArrows = (hAsync("ul", { key: '
|
|
12680
|
-
return (hAsync(Host, { key: '
|
|
12741
|
+
const prevArrow = showPrevArrow && (hAsync("li", { key: 'c96747975f1283f426b16fc5d6b9169641bf937a', class: "spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow" }, hAsync("button", { key: '2cb14838bb36158b08708be2a6c851eab28d8a9e', onClick: () => this.goToPage(this.currentPage - 1) }, hAsync("spw-icon", { key: '4a97d865f50b82f807b699d2c9962cadb2fa3c49', icon: "fa-chevron-left" }), " ", hAsync("span", { key: '85d4eba965c575bf620ac2775fc8b8ab91582c53', class: "spw-pagination__item-arrow-text" }, "Pr\u00E9c\u00E9dent"))));
|
|
12742
|
+
const nextArrow = showNextArrow && (hAsync("li", { key: 'db5e31a07af299158c0730b2c8ffdc647eb9c798', class: "spw-pagination__item spw-pagination__item--desktop spw-pagination__item--arrow" }, hAsync("button", { key: 'a2c031078bce4993152b5441e149c00d4633cefe', onClick: () => this.goToPage(this.currentPage + 1) }, hAsync("span", { key: '28cdbfbcca8698294fae48d72a3d0a8932f0a94f', class: "spw-pagination__item-arrow-text" }, "Suivant"), " ", hAsync("spw-icon", { key: '8af477a9a0eb495234278335eca66b7ca0b06fbe', icon: "fa-chevron-right" }))));
|
|
12743
|
+
const prevArrowMobile = this.currentPage > 1 && (hAsync("li", { key: '7509af0d29a02f64d67717753d71f2aa05349177', class: "spw-pagination__item spw-pagination__item--arrow" }, hAsync("button", { key: 'c3707cdd586dd519eaa00621eed632f73c5b00b6', onClick: () => this.goToPage(this.currentPage - 1) }, hAsync("spw-icon", { key: 'f1fcf011715c381330865d20f1628ef24edb1778', icon: "fa-chevron-left" }), " ", hAsync("span", { key: 'b9753065430534df7f5b499d97bf4bbad12c32d5' }, "Pr\u00E9c\u00E9dent"))));
|
|
12744
|
+
const nextArrowMobile = this.currentPage < this.totalPages && (hAsync("li", { key: '0c3fcbc4f482b151ef5355c2cd24378a7a2c7af3', class: "spw-pagination__item spw-pagination__item--arrow" }, hAsync("button", { key: 'f363b0de0131d011336fccdbf17dc9bc2b5eca15', onClick: () => this.goToPage(this.currentPage + 1), disabled: this.currentPage >= this.totalPages }, hAsync("span", { key: '74df65c99c48fc1aec8084359866227ecdd26dbc' }, "Suivant"), " ", hAsync("spw-icon", { key: '98e057e8cb6318ea06c2543fb4eae8500fcef87c', icon: "fa-chevron-right" }))));
|
|
12745
|
+
const mobileArrows = (hAsync("ul", { key: 'a4bff20ae94b1b94d70a8781cf311997c54c87e7', class: "spw-pagination__mobile-arrows" }, prevArrowMobile, nextArrowMobile));
|
|
12746
|
+
return (hAsync(Host, { key: 'fc202908905cb6da3eea73312068961b60cc776b' }, hAsync("div", { key: '351bc8518011e937ee51c4831ac13797be51a6cb', class: this.getPaginationClass() }, this.variant === 'input' && (hAsync(Fragment, { key: '684feca5a1724c030f21733850370eaf87153c13' }, hAsync("ul", { key: '14de6cc555d4cab07ef9cb8dbdc0d3e83a25f67b' }, prevArrow, hAsync("li", { key: '825297b0b82ef635497f3470ffcc5478646a558d', class: "spw-pagination__input" }, hAsync("spw-text-field", { key: '3010c66645025021ca8b678b1dedcc65810e3742', value: this.inputPageValue, type: "text", onInput: event => this.handleInputChange(event), onKeyDown: event => this.handleKeyDown(event), disabled: this.isDisabled })), hAsync("li", { key: '4273e7a738ef59ff77229580d89effeaeda18091', class: "spw-pagination__total-pages" }, "sur ", this.totalPages, " pages"), nextArrow), mobileArrows)), this.variant === 'numbers' && (hAsync(Fragment, { key: '159503f57df6936053bbffeb4ed28bd01dff38ff' }, hAsync("ul", { key: '87e707dd1060d3c3ccb6367f99e1c6cefabf99b8' }, prevArrow, pages.map(({ page, class: pageClass }) => {
|
|
12681
12747
|
if (page === '...') {
|
|
12682
12748
|
return (hAsync("li", { class: `spw-pagination__item spw-pagination__item--dots ${pageClass}` }, hAsync("spw-icon", { icon: "fa-ellipsis" })));
|
|
12683
12749
|
}
|
|
@@ -12689,8 +12755,8 @@ class SpwPagination {
|
|
|
12689
12755
|
}), nextArrow), mobileArrows)))));
|
|
12690
12756
|
}
|
|
12691
12757
|
static get watchers() { return {
|
|
12692
|
-
"totalItems": ["calculateTotalPages"],
|
|
12693
|
-
"itemsPerPage": ["calculateTotalPages"],
|
|
12758
|
+
"totalItems": ["calculateTotalPages", "onTotalItemsChange"],
|
|
12759
|
+
"itemsPerPage": ["calculateTotalPages", "onItemsPerPageChange"],
|
|
12694
12760
|
"currentPage": ["calculateTotalPages"]
|
|
12695
12761
|
}; }
|
|
12696
12762
|
static get style() { return spwPaginationCss; }
|
|
@@ -12704,7 +12770,8 @@ class SpwPagination {
|
|
|
12704
12770
|
"variant": [1],
|
|
12705
12771
|
"currentPage": [1026, "current-page"],
|
|
12706
12772
|
"inputPageValue": [32],
|
|
12707
|
-
"isMobile": [32]
|
|
12773
|
+
"isMobile": [32],
|
|
12774
|
+
"setPage": [64]
|
|
12708
12775
|
},
|
|
12709
12776
|
"$listeners$": undefined,
|
|
12710
12777
|
"$lazyBundleId$": "-",
|
|
@@ -12836,6 +12903,7 @@ const spwSearchFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/n
|
|
|
12836
12903
|
class SpwSearchField {
|
|
12837
12904
|
constructor(hostRef) {
|
|
12838
12905
|
registerInstance(this, hostRef);
|
|
12906
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
12839
12907
|
/** Placeholder à afficher dans le champ de recherche */
|
|
12840
12908
|
this.placeholder = 'Recherche...';
|
|
12841
12909
|
/** Taille du champ de recherche */
|
|
@@ -12873,6 +12941,13 @@ class SpwSearchField {
|
|
|
12873
12941
|
disconnectedCallback() {
|
|
12874
12942
|
document.removeEventListener('click', this.handleClickOutside);
|
|
12875
12943
|
}
|
|
12944
|
+
/** Réinitialise le champ de recherche */
|
|
12945
|
+
async resetInput() {
|
|
12946
|
+
this.searchText = '';
|
|
12947
|
+
this.isOpen = false;
|
|
12948
|
+
this.focusedItemIndex = null;
|
|
12949
|
+
this.valueChanged.emit(this.searchText);
|
|
12950
|
+
}
|
|
12876
12951
|
parseItems(newValue) {
|
|
12877
12952
|
if (!newValue) {
|
|
12878
12953
|
this.filteredItems = [];
|
|
@@ -12892,6 +12967,7 @@ class SpwSearchField {
|
|
|
12892
12967
|
this.filterItems();
|
|
12893
12968
|
this.determineDropdownDirection();
|
|
12894
12969
|
this.isOpen = true;
|
|
12970
|
+
this.valueChanged.emit(this.searchText);
|
|
12895
12971
|
}
|
|
12896
12972
|
filterItems() {
|
|
12897
12973
|
if (!this.items) {
|
|
@@ -12910,6 +12986,7 @@ class SpwSearchField {
|
|
|
12910
12986
|
selectItem(item) {
|
|
12911
12987
|
this.searchText = item.label;
|
|
12912
12988
|
this.isOpen = false;
|
|
12989
|
+
this.valueChanged.emit(this.searchText);
|
|
12913
12990
|
if (item.url) {
|
|
12914
12991
|
window.location.href = item.url;
|
|
12915
12992
|
}
|
|
@@ -12967,10 +13044,10 @@ class SpwSearchField {
|
|
|
12967
13044
|
};
|
|
12968
13045
|
}
|
|
12969
13046
|
render() {
|
|
12970
|
-
return (hAsync("div", { key: '
|
|
13047
|
+
return (hAsync("div", { key: '177ea345dde83be8b00034dabd261cd4ae921b53', ref: el => (this.hostElement = el), class: this.elementClass }, hAsync("spw-text-field", { key: 'ff33047f1a04a89e239ab0bd3a8af4337c8f235b', placeholder: this.placeholder, name: this.name, label: this.label, size: this.size, "is-search": true, "is-clear": true, required: this.required, disabled: this.disabled, assistiveText: this.assistiveText, value: this.searchText, onInput: event => this.handleSearchInput(event), onKeyDown: event => this.handleKeyDown(event) }), this.isOpen && !!this.items && (hAsync("div", { key: '11c758b336d8590e082eaa7773fa6cd45709074d', class: `spw-search-field__options spw-search-field__options--${this.dropdownDirection}` }, !!this.filteredItems.length && (hAsync("ul", { key: '745a24351b6818bedd402ecd19c5ad06d7eab8d9' }, this.filteredItems.map((item, index) => (hAsync("li", { class: {
|
|
12971
13048
|
'spw-search-field__option': true,
|
|
12972
13049
|
'spw-search-field__option--focused': index === this.focusedItemIndex,
|
|
12973
|
-
}, onClick: () => this.selectItem(item) }, this.highlightMatch(item.label), " ", item.category && hAsync("span", { class: "spw-tw-italic" }, " - ", item.category)))))), !this.filteredItems.length && hAsync("p", { key: '
|
|
13050
|
+
}, onClick: () => this.selectItem(item) }, this.highlightMatch(item.label), " ", item.category && hAsync("span", { class: "spw-tw-italic" }, " - ", item.category)))))), !this.filteredItems.length && hAsync("p", { key: '53f82d90522e707aef8f3a4de87875d44ad1fbea', class: "spw-search-field__no-results" }, "Pas de r\u00E9sultats.")))));
|
|
12974
13051
|
}
|
|
12975
13052
|
static get watchers() { return {
|
|
12976
13053
|
"items": ["parseItems"]
|
|
@@ -12992,7 +13069,8 @@ class SpwSearchField {
|
|
|
12992
13069
|
"searchText": [32],
|
|
12993
13070
|
"isOpen": [32],
|
|
12994
13071
|
"focusedItemIndex": [32],
|
|
12995
|
-
"dropdownDirection": [32]
|
|
13072
|
+
"dropdownDirection": [32],
|
|
13073
|
+
"resetInput": [64]
|
|
12996
13074
|
},
|
|
12997
13075
|
"$listeners$": undefined,
|
|
12998
13076
|
"$lazyBundleId$": "-",
|
|
@@ -13123,8 +13201,10 @@ class SpwSelect {
|
|
|
13123
13201
|
const option = document.createElement('option');
|
|
13124
13202
|
const value = this.itemValue ? item[this.itemValue] : item;
|
|
13125
13203
|
const label = this.itemLabel ? item[this.itemLabel] : item;
|
|
13204
|
+
const disabled = item.disabled || false;
|
|
13126
13205
|
option.value = String(value);
|
|
13127
13206
|
option.textContent = String(label);
|
|
13207
|
+
option.disabled = disabled;
|
|
13128
13208
|
this.selectElement.appendChild(option);
|
|
13129
13209
|
});
|
|
13130
13210
|
}
|
|
@@ -13161,7 +13241,7 @@ class SpwSelect {
|
|
|
13161
13241
|
};
|
|
13162
13242
|
}
|
|
13163
13243
|
render() {
|
|
13164
|
-
return (hAsync(Host, { key: '
|
|
13244
|
+
return (hAsync(Host, { key: 'deb7266660e609a3e44623613a990bf8dcbe7343' }, hAsync("div", { key: 'ff425d15ea0fd790039e72674d7657324b3c62cb', class: this.elementClass }, this.label && hAsync("spw-field-label", { key: '71f35858b08561f526d52498aa04da0b7dd46c57', label: this.label, name: this.name, required: this.required }), this.assistiveText && (hAsync("spw-field-message", { key: '1e0b80d55ae61be1d161fc4dcad2e5abb0d3b351', class: "spw-tw-mb-2 -spw-tw-mt-1", variant: "hint", showIcon: false }, this.assistiveText)), hAsync("div", { key: '3af822dbdc83f589aad041fd6fd0cb7cd43be639', class: "spw-select__container" }, hAsync("select", { key: '727b2f5f46ac0610f91da0eeb13530ec99dc98a3', id: this.name, class: "spw-select__trigger", onChange: event => this.handleSelectChange(event), disabled: this.disabled, ref: el => (this.selectElement = el), tabindex: this.disabled ? -1 : 0 }, hAsync("option", { key: '54fdb7a9268d4e796cc2cf6e70642719668ac3a7', value: "", disabled: true, selected: !this.internalValue }, this.placeholder)), hAsync("spw-icon", { key: '345e115df06ae4373a0d910947997d4f2f7cd2d4', class: "spw-select__arrow", icon: "fa-chevron-down" })), !this.items && hAsync("slot", { key: 'ca10c23f8e7e9b7422d479b5b648f661c6d431a0' })), this.renderErrorMessage(), this.renderHintMessage(), this.renderSuccessMessage(), this.renderWarningMessage()));
|
|
13165
13245
|
}
|
|
13166
13246
|
static get formAssociated() { return true; }
|
|
13167
13247
|
get el() { return getElement(this); }
|
|
@@ -13699,14 +13779,19 @@ class SpwTable {
|
|
|
13699
13779
|
this.updateHeadersSortState(newSort);
|
|
13700
13780
|
}
|
|
13701
13781
|
}
|
|
13782
|
+
onIsStickyChange() {
|
|
13783
|
+
this.applyStickyToChildren();
|
|
13784
|
+
}
|
|
13702
13785
|
componentDidLoad() {
|
|
13703
13786
|
var _a;
|
|
13704
13787
|
this.updateZebra();
|
|
13788
|
+
this.applyStickyToChildren();
|
|
13705
13789
|
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
|
13706
13790
|
if (slot) {
|
|
13707
13791
|
slot.addEventListener('slotchange', () => {
|
|
13708
13792
|
this.setupHeaderCheckboxListener();
|
|
13709
13793
|
this.updateMasterCheckboxState();
|
|
13794
|
+
this.applyStickyToChildren();
|
|
13710
13795
|
});
|
|
13711
13796
|
}
|
|
13712
13797
|
this.setupHeaderCheckboxListener();
|
|
@@ -13899,6 +13984,23 @@ class SpwTable {
|
|
|
13899
13984
|
}
|
|
13900
13985
|
}
|
|
13901
13986
|
}
|
|
13987
|
+
applyStickyToChildren() {
|
|
13988
|
+
requestAnimationFrame(() => {
|
|
13989
|
+
const stickyClass = '--is-sticky';
|
|
13990
|
+
const headers = this.el.querySelectorAll('spw-table-header');
|
|
13991
|
+
const cells = this.el.querySelectorAll('spw-table-cell');
|
|
13992
|
+
const footer = this.el.querySelector('spw-table-footer');
|
|
13993
|
+
if (this.isSticky) {
|
|
13994
|
+
headers.forEach(header => header.classList.add(stickyClass));
|
|
13995
|
+
footer === null || footer === void 0 ? void 0 : footer.classList.add(stickyClass);
|
|
13996
|
+
}
|
|
13997
|
+
else {
|
|
13998
|
+
headers.forEach(header => header.classList.remove(stickyClass));
|
|
13999
|
+
cells.forEach(cell => cell.classList.remove(stickyClass));
|
|
14000
|
+
footer === null || footer === void 0 ? void 0 : footer.classList.remove(stickyClass);
|
|
14001
|
+
}
|
|
14002
|
+
});
|
|
14003
|
+
}
|
|
13902
14004
|
sortRows(columnId, direction) {
|
|
13903
14005
|
var _a;
|
|
13904
14006
|
const body = (_a = this.el.shadowRoot
|
|
@@ -13949,14 +14051,15 @@ class SpwTable {
|
|
|
13949
14051
|
};
|
|
13950
14052
|
}
|
|
13951
14053
|
render() {
|
|
13952
|
-
return (hAsync(Host, { key: '
|
|
14054
|
+
return (hAsync(Host, { key: '7cc259ed7e17128348ebd7a6757d48b2d0114e0a', style: {
|
|
13953
14055
|
'--spw-table-max-height': this.formatSize(this.maxHeight),
|
|
13954
14056
|
'--spw-table-min-width': this.formatSize(this.minWidth),
|
|
13955
|
-
} }, hAsync("div", { key: '
|
|
14057
|
+
} }, hAsync("div", { key: 'b5dac474e57841c60312f92045859a1ff0d741c7', class: "spw-table-container" }, hAsync("table", { key: '67790f5adbd07b77c80be97b03406ca6d8296d13', part: "table", class: this.elementClass, role: "table", "aria-label": this.accAriaLabel }, hAsync("slot", { key: '208be3ca21332261306114673e756ca47bc0582d' })))));
|
|
13956
14058
|
}
|
|
13957
14059
|
get el() { return getElement(this); }
|
|
13958
14060
|
static get watchers() { return {
|
|
13959
|
-
"currentSort": ["onCurrentSortChange"]
|
|
14061
|
+
"currentSort": ["onCurrentSortChange"],
|
|
14062
|
+
"isSticky": ["onIsStickyChange"]
|
|
13960
14063
|
}; }
|
|
13961
14064
|
static get style() { return spwTableCss; }
|
|
13962
14065
|
static get cmpMeta() { return {
|
|
@@ -14022,7 +14125,7 @@ class SpwTableBody {
|
|
|
14022
14125
|
}; }
|
|
14023
14126
|
}
|
|
14024
14127
|
|
|
14025
|
-
const spwTableCellCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-table-cell{border:1px solid var(--spw-color-themes-grey-grey-300);border-top:0;color:var(--spw-color-themes-grey-grey-800);font-size:14px;text-align:left}.spw-table-cell--is-highlighted{background:var(--spw-color-themes-grey-grey-100);font-weight:700}.spw-table-cell--text-align-left{text-align:left}.spw-table-cell--text-align-center{text-align:center}.spw-table-cell--text-align-right{text-align:right}.spw-table-cell--vertical-align-top{vertical-align:top}.spw-table-cell--vertical-align-bottom{vertical-align:bottom}.spw-table-cell--vertical-align-middle{vertical-align:middle}.spw-table-cell--padding-small{padding:8px}.spw-table-cell--padding-medium{padding:16px}.spw-table-cell--disabled{cursor:not-allowed;opacity:.3;pointer-events:none}.spw-table-cell--selected{background-color:var(--spw-color-themes-blue-blue-50)}.spw-table-cell--selected.spw-table-cell--first-in-row{box-shadow:inset 3px 0 0 var(--spw-color-themes-blue-blue-500)}.spw-table-cell ::slotted(spw-checkbox){--spw-ds-checkbox-checked-color:#000}";
|
|
14128
|
+
const spwTableCellCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host(.--selected) .spw-table-cell{background-color:var(--spw-color-themes-blue-blue-50)}:host(.--selected) .spw-table-cell.spw-table-cell--first-in-row{box-shadow:inset 3px 0 0 var(--spw-color-themes-blue-blue-500)}:host(.--disabled) .spw-table-cell,:host(.--disabled) .spw-table-cell--sticky{position:relative}:host(.--disabled) .spw-table-cell--sticky:before,:host(.--disabled) .spw-table-cell:before{background:var(--spw-ds-white);bottom:1px;content:\"\";cursor:not-allowed;left:0;opacity:.7;position:absolute;right:0;top:0;z-index:8}.spw-table-cell{border:1px solid var(--spw-color-themes-grey-grey-300);border-top:0;color:var(--spw-color-themes-grey-grey-800);font-size:14px;text-align:left}.spw-table-cell--is-highlighted{background:var(--spw-color-themes-grey-grey-100);font-weight:700}.spw-table-cell--text-align-left{text-align:left}.spw-table-cell--text-align-center{text-align:center}.spw-table-cell--text-align-right{text-align:right}.spw-table-cell--vertical-align-top{vertical-align:top}.spw-table-cell--vertical-align-bottom{vertical-align:bottom}.spw-table-cell--vertical-align-middle{vertical-align:middle}.spw-table-cell--padding-small{padding:8px}.spw-table-cell--padding-medium{padding:16px}.spw-table-cell--disabled{cursor:not-allowed;opacity:.3;pointer-events:none}.spw-table-cell--selected{background-color:var(--spw-color-themes-blue-blue-50)}.spw-table-cell--selected.spw-table-cell--first-in-row{box-shadow:inset 3px 0 0 var(--spw-color-themes-blue-blue-500)}.spw-table-cell ::slotted(spw-checkbox){--spw-ds-checkbox-checked-color:#000}.spw-table-cell--sticky{background-color:var(--spw-color-themes-grey-grey-50);position:sticky}.spw-table-cell--sticky:after{bottom:-1px;content:\"\";pointer-events:none;position:absolute;top:0;transition:opacity .2s;width:8px}.spw-table-cell--sticky-start:after{box-shadow:inset 8px 0 8px -8px rgba(0,0,0,.15);right:-8px}.spw-table-cell--sticky-end:after{box-shadow:inset -8px 0 8px -8px rgba(0,0,0,.15);left:-8px}.spw-table-cell--sticky.spw-table-cell--selected{background-color:var(--spw-color-themes-blue-blue-50)}.spw-table-cell--sticky.spw-table-cell--is-highlighted{background-color:var(--spw-color-themes-grey-grey-100)}:host(.--selected) .spw-table-cell--sticky{background-color:var(--spw-color-themes-blue-blue-50)}";
|
|
14026
14129
|
|
|
14027
14130
|
class SpwTableCell {
|
|
14028
14131
|
constructor(hostRef) {
|
|
@@ -14039,6 +14142,12 @@ class SpwTableCell {
|
|
|
14039
14142
|
this.padding = 'medium';
|
|
14040
14143
|
/** Permet de changer le state du spw-table-cell */
|
|
14041
14144
|
this.state = 'default';
|
|
14145
|
+
/** Rend la cellule sticky lors du défilement (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14146
|
+
this.sticky = false;
|
|
14147
|
+
/** Position du sticky : 'start' (left: 0) ou 'end' (right: 0) (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14148
|
+
this.stickyPosition = 'start';
|
|
14149
|
+
/** Décalage en pixels pour le sticky (utile pour empiler plusieurs colonnes sticky) (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14150
|
+
this.stickyOffset = 0;
|
|
14042
14151
|
this.isFirst = false;
|
|
14043
14152
|
}
|
|
14044
14153
|
componentDidLoad() {
|
|
@@ -14074,6 +14183,8 @@ class SpwTableCell {
|
|
|
14074
14183
|
[`spw-table-cell--vertical-align-${this.verticalAlign}`]: true,
|
|
14075
14184
|
[`spw-table-cell--${this.state}`]: true,
|
|
14076
14185
|
'spw-table-cell--first-in-row': this.isFirst,
|
|
14186
|
+
'spw-table-cell--sticky': this.sticky,
|
|
14187
|
+
[`spw-table-cell--sticky-${this.stickyPosition}`]: this.sticky,
|
|
14077
14188
|
};
|
|
14078
14189
|
}
|
|
14079
14190
|
render() {
|
|
@@ -14088,7 +14199,20 @@ class SpwTableCell {
|
|
|
14088
14199
|
attrs.rowSpan = this.rowspan;
|
|
14089
14200
|
if (this.headers !== undefined)
|
|
14090
14201
|
attrs.headers = this.headers;
|
|
14091
|
-
|
|
14202
|
+
if (this.sticky) {
|
|
14203
|
+
const stickyStyles = {
|
|
14204
|
+
position: 'sticky',
|
|
14205
|
+
zIndex: '10',
|
|
14206
|
+
};
|
|
14207
|
+
if (this.stickyPosition === 'start') {
|
|
14208
|
+
stickyStyles.left = `${this.stickyOffset}px`;
|
|
14209
|
+
}
|
|
14210
|
+
else {
|
|
14211
|
+
stickyStyles.right = `${this.stickyOffset}px`;
|
|
14212
|
+
}
|
|
14213
|
+
attrs.style = stickyStyles;
|
|
14214
|
+
}
|
|
14215
|
+
return (hAsync("td", Object.assign({ key: '27bf04742118714d6b54e104929909a392d1995c' }, attrs), hAsync("slot", { key: '8c3ba8fd30c331af629cd030c93047f9931829e3' })));
|
|
14092
14216
|
}
|
|
14093
14217
|
get el() { return getElement(this); }
|
|
14094
14218
|
static get style() { return spwTableCellCss; }
|
|
@@ -14105,6 +14229,9 @@ class SpwTableCell {
|
|
|
14105
14229
|
"width": [1],
|
|
14106
14230
|
"padding": [1],
|
|
14107
14231
|
"state": [1],
|
|
14232
|
+
"sticky": [4],
|
|
14233
|
+
"stickyPosition": [1, "sticky-position"],
|
|
14234
|
+
"stickyOffset": [2, "sticky-offset"],
|
|
14108
14235
|
"isFirst": [32]
|
|
14109
14236
|
},
|
|
14110
14237
|
"$listeners$": undefined,
|
|
@@ -14113,7 +14240,7 @@ class SpwTableCell {
|
|
|
14113
14240
|
}; }
|
|
14114
14241
|
}
|
|
14115
14242
|
|
|
14116
|
-
const spwTableFooterCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host
|
|
14243
|
+
const spwTableFooterCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host(.--is-sticky) caption{bottom:0;position:sticky;z-index:20}caption{background:var(--spw-ds-white);border:1px solid var(--spw-color-themes-grey-grey-300)}.spw-table-footer{align-items:center;caption-side:bottom;color:var(--spw-color-themes-grey-grey-900);display:flex;font-size:14px;gap:16px;justify-content:space-between;padding:16px 24px}.spw-table-footer ::slotted([slot=right]){align-items:center;display:inline-flex;gap:8px}";
|
|
14117
14244
|
|
|
14118
14245
|
class SpwTableFooter {
|
|
14119
14246
|
constructor(hostRef) {
|
|
@@ -14153,7 +14280,7 @@ class SpwTableHead {
|
|
|
14153
14280
|
}; }
|
|
14154
14281
|
}
|
|
14155
14282
|
|
|
14156
|
-
const spwTableHeaderCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}.spw-table-header{background:var(--spw-color-themes-grey-grey-200);background-clip:padding-box;border:1px solid var(--spw-color-themes-grey-grey-300);border-bottom:none!important;border-top:none!important;box-shadow:inset 0 1px 0 var(--spw-color-themes-grey-grey-300),inset 0 -1px 0 var(--spw-color-themes-grey-grey-300);color:var(--spw-color-themes-grey-grey-800);font-size:14px;font-weight:700;text-align:left;transition:all .2s linear;white-space:nowrap}
|
|
14283
|
+
const spwTableHeaderCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host(.--is-sticky) .spw-table-header{position:sticky;top:0;z-index:50}.spw-table-header{background:var(--spw-color-themes-grey-grey-200);background-clip:padding-box;border:1px solid var(--spw-color-themes-grey-grey-300);border-bottom:none!important;border-top:none!important;box-shadow:inset 0 1px 0 var(--spw-color-themes-grey-grey-300),inset 0 -1px 0 var(--spw-color-themes-grey-grey-300);color:var(--spw-color-themes-grey-grey-800);font-size:14px;font-weight:700;text-align:left;transition:all .2s linear;white-space:nowrap}.spw-table-header--text-align-left{text-align:left}.spw-table-header--text-align-center{text-align:center}.spw-table-header--text-align-right{text-align:right}.spw-table-header--vertical-align-top{vertical-align:top}.spw-table-header--vertical-align-bottom{vertical-align:bottom}.spw-table-header--vertical-align-middle{vertical-align:middle}.spw-table-header--has-tooltip .spw-table-header__content{align-items:center;display:flex;gap:16px;justify-content:space-between}.spw-table-header--has-tooltip .spw-table-header__content spw-icon{color:var(--spw-color-themes-grey-grey-500)}.spw-table-header--has-tooltip .spw-table-header__content spw-icon:hover{color:var(--spw-color-themes-grey-grey-900)}.spw-table-header--sortable{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.spw-table-header--sortable:hover{background:var(--spw-color-themes-grey-grey-300)}.spw-table-header--sortable .spw-table-header__content{align-items:center;display:flex;gap:16px;justify-content:space-between}.spw-table-header--sortable .spw-table-header__content spw-icon{color:var(--spw-color-themes-grey-grey-500)}.spw-table-header--sortable .spw-table-header__content spw-icon:hover,.spw-table-header--sortable .spw-table-header__content--is-sorted .spw-table-header__sort-icon{color:var(--spw-color-themes-grey-grey-900)}.spw-table-header__sort-icons{display:flex;gap:0}.spw-table-header--padding-small{padding:8px}.spw-table-header--padding-medium{padding:16px}.spw-table-header__icons{align-items:center;color:var(--spw-color-themes-grey-grey-500);display:flex;gap:8px}.spw-table-header ::slotted(spw-checkbox){--spw-ds-checkbox-checked-color:#000}.spw-table-header--sticky{background-color:var(--spw-color-themes-grey-grey-200);position:sticky}.spw-table-header--sticky:after{bottom:-1px;content:\"\";pointer-events:none;position:absolute;top:0;transition:opacity .2s;width:8px}.spw-table-header--sticky-start:after{box-shadow:inset 8px 0 8px -8px rgba(0,0,0,.15);right:-8px}.spw-table-header--sticky-end:after{box-shadow:inset -8px 0 8px -8px rgba(0,0,0,.15);left:-8px}";
|
|
14157
14284
|
|
|
14158
14285
|
class SpwTableHeader {
|
|
14159
14286
|
constructor(hostRef) {
|
|
@@ -14171,6 +14298,12 @@ class SpwTableHeader {
|
|
|
14171
14298
|
this.sortable = false;
|
|
14172
14299
|
/** Définit si la colonne est triée ou non (à appliquer sur spw-table-header) */
|
|
14173
14300
|
this.isSorted = false;
|
|
14301
|
+
/** Rend la cellule sticky lors du défilement horizontal (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14302
|
+
this.sticky = false;
|
|
14303
|
+
/** Position du sticky : 'start' (left: 0) ou 'end' (right: 0) (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14304
|
+
this.stickyPosition = 'start';
|
|
14305
|
+
/** Décalage en pixels pour le sticky (utile pour empiler plusieurs colonnes sticky) (à appliquer sur spw-table-header ou spw-table-cell) */
|
|
14306
|
+
this.stickyOffset = 0;
|
|
14174
14307
|
this.handleClick = (event) => {
|
|
14175
14308
|
if (event.target.closest('[slot="filters"]')) {
|
|
14176
14309
|
event.stopPropagation();
|
|
@@ -14190,13 +14323,37 @@ class SpwTableHeader {
|
|
|
14190
14323
|
[`spw-table-header--padding-${this.padding}`]: true,
|
|
14191
14324
|
[`spw-table-header--text-align-${this.textAlign}`]: true,
|
|
14192
14325
|
[`spw-table-header--vertical-align-${this.verticalAlign}`]: true,
|
|
14326
|
+
'spw-table-header--sticky': this.sticky,
|
|
14327
|
+
[`spw-table-header--sticky-${this.stickyPosition}`]: this.sticky,
|
|
14193
14328
|
};
|
|
14194
14329
|
}
|
|
14195
14330
|
render() {
|
|
14196
|
-
|
|
14331
|
+
const attrs = {
|
|
14332
|
+
'aria-sort': this.isSorted ? this.sortDirection : 'none',
|
|
14333
|
+
'onClick': this.handleClick,
|
|
14334
|
+
'class': this.elementClass,
|
|
14335
|
+
'colSpan': this.colspan,
|
|
14336
|
+
'headers': this.headers,
|
|
14337
|
+
'part': 'cell',
|
|
14338
|
+
'rowSpan': this.rowspan,
|
|
14339
|
+
};
|
|
14340
|
+
if (this.sticky) {
|
|
14341
|
+
const stickyStyles = {
|
|
14342
|
+
position: 'sticky',
|
|
14343
|
+
zIndex: '60',
|
|
14344
|
+
};
|
|
14345
|
+
if (this.stickyPosition === 'start') {
|
|
14346
|
+
stickyStyles.left = `${this.stickyOffset}px`;
|
|
14347
|
+
}
|
|
14348
|
+
else {
|
|
14349
|
+
stickyStyles.right = `${this.stickyOffset}px`;
|
|
14350
|
+
}
|
|
14351
|
+
attrs.style = stickyStyles;
|
|
14352
|
+
}
|
|
14353
|
+
return (hAsync("th", Object.assign({ key: '72a54f9eb43f87e80da3bfe45a6eb848cf11e09f' }, attrs), hAsync("div", { key: '06111c36e9fa869e263dfb1bc64fa023acf42538', class: {
|
|
14197
14354
|
'spw-table-header__content': true,
|
|
14198
14355
|
'spw-table-header__content--is-sorted': this.isSorted,
|
|
14199
|
-
} }, hAsync("slot", { key: '
|
|
14356
|
+
} }, hAsync("slot", { key: '16439694bfaf17d5f1371ffd817f16ba7bc4ecdc' }), hAsync("div", { key: '4b8cf5f4de063c8aa9c2ea8b653d9a35b1ae64b0', class: "spw-table-header__icons" }, hAsync("slot", { key: 'd9816f83f71672ebda6b27b705142666e376ec7a', name: "filters" }), (this.tooltipTitle || this.tooltipText) && (hAsync("spw-tooltip", { key: 'a8c4e3d4a555806faef984533696c393173b7ad7', "tooltip-title": this.tooltipTitle, "tooltip-text": this.tooltipText }, hAsync("spw-icon", { key: '92a361a5400a2cb09c3ccf68a713897076e019b6', variant: "fa-regular", icon: "fa-circle-question" }))), this.sortable && (hAsync("spw-icon", { key: 'db44bf3aa7be154edecf0281f3335edf0896eb01', class: "spw-table-header__sort-icon", icon: this.isSorted ? (this.sortDirection === 'asc' ? 'fa-arrow-up-short-wide' : 'fa-arrow-down-wide-short') : 'fa-arrow-up-arrow-down' }))))));
|
|
14200
14357
|
}
|
|
14201
14358
|
static get style() { return spwTableHeaderCss; }
|
|
14202
14359
|
static get cmpMeta() { return {
|
|
@@ -14215,7 +14372,10 @@ class SpwTableHeader {
|
|
|
14215
14372
|
"sortDirection": [1, "sort-direction"],
|
|
14216
14373
|
"isSorted": [4, "is-sorted"],
|
|
14217
14374
|
"tooltipTitle": [1, "tooltip-title"],
|
|
14218
|
-
"tooltipText": [1, "tooltip-text"]
|
|
14375
|
+
"tooltipText": [1, "tooltip-text"],
|
|
14376
|
+
"sticky": [4],
|
|
14377
|
+
"stickyPosition": [1, "sticky-position"],
|
|
14378
|
+
"stickyOffset": [2, "sticky-offset"]
|
|
14219
14379
|
},
|
|
14220
14380
|
"$listeners$": undefined,
|
|
14221
14381
|
"$lazyBundleId$": "-",
|
|
@@ -14223,7 +14383,7 @@ class SpwTableHeader {
|
|
|
14223
14383
|
}; }
|
|
14224
14384
|
}
|
|
14225
14385
|
|
|
14226
|
-
const spwTableRowCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host([data-row-style=odd]) .spw-table-row{background-color:var(--spw-color-themes-grey-grey-50)}.spw-table-row{position:relative}.spw-table-row--disabled{
|
|
14386
|
+
const spwTableRowCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.3}h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}ul{list-style:none}:host{-webkit-text-size-adjust:100%;box-sizing:border-box;display:contents;font-size:100%;line-height:1.3}:host *,:host :after,:host :before{box-sizing:inherit;font-family:Nunito Sans}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}:root{--spw-ds-container-xl:1200px;--spw-ds-container-lg:1024px;--spw-ds-container-md:768px;--spw-ds-container-sm:640px}.spw-ds-container{margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px;width:100%}@media (min-width:460px){.spw-ds-container{max-width:var(--spw-ds-container-sm)}}@media (min-width:768px){.spw-ds-container{max-width:var(--spw-ds-container-md)}}@media (min-width:1024px){.spw-ds-container{max-width:var(--spw-ds-container-lg)}}@media (min-width:1350px){.spw-ds-container{max-width:var(--spw-ds-container-xl)}}:host([data-row-style=odd]) .spw-table-row{background-color:var(--spw-color-themes-grey-grey-50)}.spw-table-row{position:relative}.spw-table-row--disabled{background:#fff}.spw-table-row--selected{background-color:var(--spw-color-themes-blue-blue-50);box-shadow:inset 3px 0 0 var(--spw-color-themes-blue-blue-500)}";
|
|
14227
14387
|
|
|
14228
14388
|
class SpwTableRow {
|
|
14229
14389
|
constructor(hostRef) {
|
|
@@ -14231,6 +14391,33 @@ class SpwTableRow {
|
|
|
14231
14391
|
/** Permet de changer le state du spw-table-row */
|
|
14232
14392
|
this.state = 'default';
|
|
14233
14393
|
}
|
|
14394
|
+
componentDidLoad() {
|
|
14395
|
+
this.applyPropsToChildren();
|
|
14396
|
+
}
|
|
14397
|
+
slotChanged() {
|
|
14398
|
+
this.applyPropsToChildren();
|
|
14399
|
+
}
|
|
14400
|
+
onStateChange() {
|
|
14401
|
+
this.applyPropsToChildren();
|
|
14402
|
+
}
|
|
14403
|
+
onPaddingChange() {
|
|
14404
|
+
this.applyPropsToChildren();
|
|
14405
|
+
}
|
|
14406
|
+
applyPropsToChildren() {
|
|
14407
|
+
requestAnimationFrame(() => {
|
|
14408
|
+
const cells = this.el.querySelectorAll('spw-table-cell, spw-table-header');
|
|
14409
|
+
const stateClass = `--${this.state}`;
|
|
14410
|
+
cells.forEach(cell => {
|
|
14411
|
+
cell.classList.remove('--default', '--selected', '--disabled');
|
|
14412
|
+
if (this.state !== 'default') {
|
|
14413
|
+
cell.classList.add(stateClass);
|
|
14414
|
+
}
|
|
14415
|
+
if (this.padding && !cell.hasAttribute('padding')) {
|
|
14416
|
+
cell.padding = this.padding;
|
|
14417
|
+
}
|
|
14418
|
+
});
|
|
14419
|
+
});
|
|
14420
|
+
}
|
|
14234
14421
|
get elementClass() {
|
|
14235
14422
|
return {
|
|
14236
14423
|
'spw-table-row': true,
|
|
@@ -14238,16 +14425,22 @@ class SpwTableRow {
|
|
|
14238
14425
|
};
|
|
14239
14426
|
}
|
|
14240
14427
|
render() {
|
|
14241
|
-
return (hAsync(Host, { key: '
|
|
14428
|
+
return (hAsync(Host, { key: 'a92e7619db6ca66332e5680add2f4f074ddb5db5', part: "row" }, hAsync("tr", { key: '198d8027ea3cd377444f476e0c77d35de50c22c2', class: this.elementClass, part: "row" }, hAsync("slot", { key: '667fb895983eff3077f36da1ac0d31756c8dd691' }))));
|
|
14242
14429
|
}
|
|
14430
|
+
get el() { return getElement(this); }
|
|
14431
|
+
static get watchers() { return {
|
|
14432
|
+
"state": ["onStateChange"],
|
|
14433
|
+
"padding": ["onPaddingChange"]
|
|
14434
|
+
}; }
|
|
14243
14435
|
static get style() { return spwTableRowCss; }
|
|
14244
14436
|
static get cmpMeta() { return {
|
|
14245
14437
|
"$flags$": 9,
|
|
14246
14438
|
"$tagName$": "spw-table-row",
|
|
14247
14439
|
"$members$": {
|
|
14248
|
-
"state": [1]
|
|
14440
|
+
"state": [1],
|
|
14441
|
+
"padding": [1]
|
|
14249
14442
|
},
|
|
14250
|
-
"$listeners$":
|
|
14443
|
+
"$listeners$": [[0, "slotchange", "slotChanged"]],
|
|
14251
14444
|
"$lazyBundleId$": "-",
|
|
14252
14445
|
"$attrsToReflect$": []
|
|
14253
14446
|
}; }
|