@oiz/stzh-components 3.3.0-beta4 → 3.3.0-beta5
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/{app-globals-add1c2c1.js → app-globals-95815145.js} +2 -2
- package/dist/cjs/{app-globals-add1c2c1.js.map → app-globals-95815145.js.map} +1 -1
- package/dist/cjs/{arrow-16638ece.js → arrow-6135123b.js} +116 -49
- package/dist/cjs/arrow-6135123b.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js +9 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js +21 -9
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +20 -8
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js +32 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.stories.js +1 -1
- package/dist/collection/components/stzh-header/stzh-header.stories.js +2 -2
- package/dist/collection/components/stzh-popover/stzh-popover.js +20 -8
- package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
- package/dist/collection/components/stzh-row/stzh-row.css +240 -184
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +19 -7
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/arrow.js +115 -48
- package/dist/components/arrow.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-app-nav2.js +10 -2
- package/dist/components/stzh-app-nav2.js.map +1 -1
- package/dist/components/stzh-popover2.js +20 -8
- package/dist/components/stzh-popover2.js.map +1 -1
- package/dist/components/stzh-row.js +1 -1
- package/dist/components/stzh-row.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +19 -7
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/components/stzh-upload.js +1 -1
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-7f5414ca.js → app-globals-10ef946d.js} +2 -2
- package/dist/esm/{app-globals-7f5414ca.js.map → app-globals-10ef946d.js.map} +1 -1
- package/dist/esm/{arrow-fc956b24.js → arrow-8f47d7ea.js} +116 -49
- package/dist/esm/arrow-8f47d7ea.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stzh-app-nav.entry.js +10 -2
- package/dist/esm/stzh-app-nav.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +1 -1
- package/dist/esm/stzh-popover_2.entry.js +21 -9
- package/dist/esm/stzh-popover_2.entry.js.map +1 -1
- package/dist/esm/stzh-row.entry.js +1 -1
- package/dist/esm/stzh-row.entry.js.map +1 -1
- package/dist/esm/stzh-tooltip.entry.js +20 -8
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-6009632f.js → p-45be0b3e.js} +2 -2
- package/dist/stzh-components/p-7423c6c2.js +2 -0
- package/dist/stzh-components/p-7423c6c2.js.map +1 -0
- package/dist/stzh-components/{p-d1aa8602.entry.js → p-8202e541.entry.js} +2 -2
- package/dist/stzh-components/p-8202e541.entry.js.map +1 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js +2 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js.map +1 -0
- package/dist/stzh-components/p-b047262a.entry.js +2 -0
- package/dist/stzh-components/p-b047262a.entry.js.map +1 -0
- package/dist/stzh-components/{p-288fd6f7.entry.js → p-bb4dea97.entry.js} +2 -2
- package/dist/stzh-components/{p-288fd6f7.entry.js.map → p-bb4dea97.entry.js.map} +1 -1
- package/dist/stzh-components/p-dc4f385d.entry.js +2 -0
- package/dist/stzh-components/p-dc4f385d.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/types/components/stzh-app-nav/stzh-app-nav.d.ts +5 -1
- package/dist/types/components/stzh-popover/stzh-popover.d.ts +3 -0
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/index.d.ts +5 -0
- package/package.json +2 -2
- package/dist/cjs/arrow-16638ece.js.map +0 -1
- package/dist/esm/arrow-fc956b24.js.map +0 -1
- package/dist/stzh-components/p-6a1d65ce.entry.js +0 -2
- package/dist/stzh-components/p-6a1d65ce.entry.js.map +0 -1
- package/dist/stzh-components/p-a2da1df4.js +0 -2
- package/dist/stzh-components/p-a2da1df4.js.map +0 -1
- package/dist/stzh-components/p-d1aa8602.entry.js.map +0 -1
- package/dist/stzh-components/p-e9933daa.entry.js +0 -2
- package/dist/stzh-components/p-e9933daa.entry.js.map +0 -1
- package/dist/stzh-components/p-f42f6787.entry.js +0 -2
- package/dist/stzh-components/p-f42f6787.entry.js.map +0 -1
- /package/dist/stzh-components/{p-6009632f.js.map → p-45be0b3e.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const stzhRowCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{width:100%;--row-gap:var(--stzh-row-row-gap, 0px)}:host([span=\"1\"]) ::slotted(stzh-cell){
|
|
3
|
+
const stzhRowCss = ":host{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-color);box-sizing:border-box;display:block;}:host[hidden]{display:none}:host::-moz-selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host::selection{color:var(--stzh-selection-color);background-color:var(--stzh-selection-background-color)}:host *,:host *::before,:host *::after{box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness);-webkit-text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink);text-decoration-skip-ink:var(--stzh-link-text-decoration-skip-ink)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host{width:100%;--row-gap:var(--stzh-row-row-gap, 0px)}:host([span=\"1\"]) ::slotted(stzh-cell:not([span])){--cell-width:8.3333333333%}:host([span=\"2\"]) ::slotted(stzh-cell:not([span])){--cell-width:16.6666666667%}:host([span=\"3\"]) ::slotted(stzh-cell:not([span])){--cell-width:25%}:host([span=\"4\"]) ::slotted(stzh-cell:not([span])){--cell-width:33.3333333333%}:host([span=\"5\"]) ::slotted(stzh-cell:not([span])){--cell-width:41.6666666667%}:host([span=\"6\"]) ::slotted(stzh-cell:not([span])){--cell-width:50%}:host([span=\"7\"]) ::slotted(stzh-cell:not([span])){--cell-width:58.3333333333%}:host([span=\"8\"]) ::slotted(stzh-cell:not([span])){--cell-width:66.6666666667%}:host([span=\"9\"]) ::slotted(stzh-cell:not([span])){--cell-width:75%}:host([span=\"10\"]) ::slotted(stzh-cell:not([span])){--cell-width:83.3333333333%}:host([span=\"11\"]) ::slotted(stzh-cell:not([span])){--cell-width:91.6666666667%}:host([span=\"12\"]) ::slotted(stzh-cell:not([span])){--cell-width:100%}@media screen and (min-width: 600px){:host([span-small=\"1\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:8.3333333333%}}@media screen and (min-width: 600px){:host([span-small=\"2\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:16.6666666667%}}@media screen and (min-width: 600px){:host([span-small=\"3\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:25%}}@media screen and (min-width: 600px){:host([span-small=\"4\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:33.3333333333%}}@media screen and (min-width: 600px){:host([span-small=\"5\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:41.6666666667%}}@media screen and (min-width: 600px){:host([span-small=\"6\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:50%}}@media screen and (min-width: 600px){:host([span-small=\"7\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:58.3333333333%}}@media screen and (min-width: 600px){:host([span-small=\"8\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:66.6666666667%}}@media screen and (min-width: 600px){:host([span-small=\"9\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:75%}}@media screen and (min-width: 600px){:host([span-small=\"10\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:83.3333333333%}}@media screen and (min-width: 600px){:host([span-small=\"11\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:91.6666666667%}}@media screen and (min-width: 600px){:host([span-small=\"12\"]) ::slotted(stzh-cell:not([span-small])){--cell-width:100%}}@media screen and (min-width: 900px){:host([span-medium=\"1\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:8.3333333333%}}@media screen and (min-width: 900px){:host([span-medium=\"2\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:16.6666666667%}}@media screen and (min-width: 900px){:host([span-medium=\"3\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:25%}}@media screen and (min-width: 900px){:host([span-medium=\"4\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:33.3333333333%}}@media screen and (min-width: 900px){:host([span-medium=\"5\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:41.6666666667%}}@media screen and (min-width: 900px){:host([span-medium=\"6\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:50%}}@media screen and (min-width: 900px){:host([span-medium=\"7\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:58.3333333333%}}@media screen and (min-width: 900px){:host([span-medium=\"8\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:66.6666666667%}}@media screen and (min-width: 900px){:host([span-medium=\"9\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:75%}}@media screen and (min-width: 900px){:host([span-medium=\"10\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:83.3333333333%}}@media screen and (min-width: 900px){:host([span-medium=\"11\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:91.6666666667%}}@media screen and (min-width: 900px){:host([span-medium=\"12\"]) ::slotted(stzh-cell:not([span-medium])){--cell-width:100%}}@media screen and (min-width: 1260px){:host([span-large=\"1\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:8.3333333333%}}@media screen and (min-width: 1260px){:host([span-large=\"2\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:16.6666666667%}}@media screen and (min-width: 1260px){:host([span-large=\"3\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:25%}}@media screen and (min-width: 1260px){:host([span-large=\"4\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:33.3333333333%}}@media screen and (min-width: 1260px){:host([span-large=\"5\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:41.6666666667%}}@media screen and (min-width: 1260px){:host([span-large=\"6\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:50%}}@media screen and (min-width: 1260px){:host([span-large=\"7\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:58.3333333333%}}@media screen and (min-width: 1260px){:host([span-large=\"8\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:66.6666666667%}}@media screen and (min-width: 1260px){:host([span-large=\"9\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:75%}}@media screen and (min-width: 1260px){:host([span-large=\"10\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:83.3333333333%}}@media screen and (min-width: 1260px){:host([span-large=\"11\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:91.6666666667%}}@media screen and (min-width: 1260px){:host([span-large=\"12\"]) ::slotted(stzh-cell:not([span-large])){--cell-width:100%}}@media screen and (min-width: 1600px){:host([span-ultra=\"1\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:8.3333333333%}}@media screen and (min-width: 1600px){:host([span-ultra=\"2\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:16.6666666667%}}@media screen and (min-width: 1600px){:host([span-ultra=\"3\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:25%}}@media screen and (min-width: 1600px){:host([span-ultra=\"4\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:33.3333333333%}}@media screen and (min-width: 1600px){:host([span-ultra=\"5\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:41.6666666667%}}@media screen and (min-width: 1600px){:host([span-ultra=\"6\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:50%}}@media screen and (min-width: 1600px){:host([span-ultra=\"7\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:58.3333333333%}}@media screen and (min-width: 1600px){:host([span-ultra=\"8\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:66.6666666667%}}@media screen and (min-width: 1600px){:host([span-ultra=\"9\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:75%}}@media screen and (min-width: 1600px){:host([span-ultra=\"10\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:83.3333333333%}}@media screen and (min-width: 1600px){:host([span-ultra=\"11\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:91.6666666667%}}@media screen and (min-width: 1600px){:host([span-ultra=\"12\"]) ::slotted(stzh-cell:not([span-ultra])){--cell-width:100%}}.stzh-row{display:flex;flex-wrap:wrap;justify-content:flex-start;row-gap:var(--row-gap);margin-left:calc(var(--stzh-grid-gutter) / -2);margin-right:calc(var(--stzh-grid-gutter) / -2);}@media screen and (min-width: 600px){.stzh-row{margin-left:calc(var(--stzh-grid-gutter-small) / -2);margin-right:calc(var(--stzh-grid-gutter-small) / -2)}}@media screen and (min-width: 900px){.stzh-row{margin-left:calc(var(--stzh-grid-gutter-medium) / -2);margin-right:calc(var(--stzh-grid-gutter-medium) / -2)}}@media screen and (min-width: 1260px){.stzh-row{margin-left:calc(var(--stzh-grid-gutter-large) / -2);margin-right:calc(var(--stzh-grid-gutter-large) / -2)}}@media screen and (min-width: 1600px){.stzh-row{margin-left:calc(var(--stzh-grid-gutter-ultra) / -2);margin-right:calc(var(--stzh-grid-gutter-ultra) / -2)}}.stzh-row--justify-end{justify-content:flex-end}.stzh-row--justify-center{justify-content:center}.stzh-row--justify-between{justify-content:space-between}.stzh-row--justify-around{justify-content:space-around}.stzh-row--justify-evenly{justify-content:space-evenly}.stzh-row--items-end{align-items:flex-end}.stzh-row--items-center{align-items:center}.stzh-row--items-baseline{align-items:baseline}.stzh-row--items-stretch{align-items:stretch}.stzh-row--content-end{align-content:flex-end}.stzh-row--content-center{align-content:center}.stzh-row--content-between{align-content:space-between}.stzh-row--content-around{align-content:space-around}.stzh-row--content-evenly{align-content:space-evenly}";
|
|
4
4
|
|
|
5
5
|
const StzhRow$1 = /*@__PURE__*/ proxyCustomElement(class StzhRow extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-row.js","mappings":";;AAAA,MAAM,UAAU,GAAG,
|
|
1
|
+
{"file":"stzh-row.js","mappings":";;AAAA,MAAM,UAAU,GAAG,o8SAAo8S;;MCiB18SA,SAAO;;;;;gBAEsB,EAAE;;;;;mBAWS,OAAO;iBAGX,OAAO;mBAGH,OAAO;;EAE1D,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WACE,KAAK,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,CAAC,qBAAqB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;QACrD,CAAC,mBAAmB,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK;QAC/C,CAAC,qBAAqB,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO;OACtD,IAED,eAAa,CACT,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["StzhRow"],"sources":["src/components/stzh-row/stzh-row.scss?tag=stzh-row&encapsulation=shadow","src/components/stzh-row/stzh-row.tsx"],"sourcesContent":[":host {\n width: 100%;\n\n --row-gap: var(--stzh-row-row-gap, 0px);\n}\n\n@mixin cellProps($breakpoint: null) {\n @for $i from 1 through $gridCells {\n @if $breakpoint {\n :host([span-#{$breakpoint}=\"#{$i}\"])\n ::slotted(stzh-cell:not([span-#{$breakpoint}])) {\n @include mq($from: $breakpoint) {\n --cell-width: #{100% / ($gridCells / $i)};\n }\n }\n } @else {\n :host([span=\"#{$i}\"])\n ::slotted(stzh-cell:not([span])) {\n --cell-width: #{100% / ($gridCells / $i)};\n }\n }\n }\n}\n\n@include cellProps();\n\n@each $breakpoint, $size in $breakpoints {\n @include cellProps($breakpoint);\n}\n\n.stzh-row {\n display: flex;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n row-gap: var(--row-gap);\n margin-left: calc(#{$gridGutter} / -2);\n margin-right: calc(#{$gridGutter} / -2);\n\n @include mq($from: small) {\n margin-left: calc(#{$gridGutterSmall} / -2);\n margin-right: calc(#{$gridGutterSmall} / -2);\n }\n\n @include mq($from: medium) {\n margin-left: calc(#{$gridGutterMedium} / -2);\n margin-right: calc(#{$gridGutterMedium} / -2);\n }\n\n @include mq($from: large) {\n margin-left: calc(#{$gridGutterLarge} / -2);\n margin-right: calc(#{$gridGutterLarge} / -2);\n }\n\n @include mq($from: ultra) {\n margin-left: calc(#{$gridGutterUltra} / -2);\n margin-right: calc(#{$gridGutterUltra} / -2);\n }\n\n /* Justify content variants */\n\n &--justify-end {\n justify-content: flex-end;\n }\n\n &--justify-center {\n justify-content: center;\n }\n\n &--justify-between {\n justify-content: space-between;\n }\n\n &--justify-around {\n justify-content: space-around;\n }\n\n &--justify-evenly {\n justify-content: space-evenly;\n }\n\n /* Align items variants */\n\n &--items-end {\n align-items: flex-end;\n }\n\n &--items-center {\n align-items: center;\n }\n\n &--items-baseline {\n align-items: baseline;\n }\n\n &--items-stretch {\n align-items: stretch;\n }\n\n /* Align content variants */\n\n &--content-end {\n align-content: flex-end;\n }\n\n &--content-center {\n align-content: center;\n }\n\n &--content-between {\n align-content: space-between;\n }\n\n &--content-around {\n align-content: space-around;\n }\n\n &--content-evenly {\n align-content: space-evenly;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\nimport { Layout } from \"../../index\";\n\n/**\n * @slot - Slot for `stzh-cell` elements\n */\n@Component({\n tag: \"stzh-row\",\n styleUrl: \"stzh-row.scss\",\n shadow: true\n})\nexport class StzhRow {\n /** Default span of each cell */\n @Prop({ reflect: true }) span: number = 12;\n /** Default span of each cell above small breakpoint */\n @Prop({ reflect: true }) spanSmall: number;\n /** Default span of each cell above medium breakpoint */\n @Prop({ reflect: true }) spanMedium: number;\n /** Default span of each cell above large breakpoint */\n @Prop({ reflect: true }) spanLarge: number;\n /** Default span of each cell above ultra breakpoint */\n @Prop({ reflect: true }) spanUltra: number;\n\n /** Controlling how cells are positioned along a container's main axis */\n @Prop({ reflect: true }) justify: Layout.Justify = \"start\";\n\n /** Control how cells items are positioned along a container's cross axis */\n @Prop({ reflect: true }) items: Layout.Items = \"start\";\n\n /** Utilities for controlling how rows are positioned in multi-row flex containers. */\n @Prop({ reflect: true }) content: Layout.Justify = \"start\";\n\n render() {\n return (\n <Host>\n <div\n class={{\n \"stzh-row\": true,\n [`stzh-row--justify-${this.justify}`]: !!this.justify,\n [`stzh-row--items-${this.items}`]: !!this.items,\n [`stzh-row--content-${this.content}`]: !!this.content\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -141,6 +141,7 @@ const StzhTooltip = /*@__PURE__*/ proxyCustomElement(class StzhTooltip extends H
|
|
|
141
141
|
trigger.addEventListener("focusout", this.onBlurTrigger);
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
|
+
this.initializedTooltip = false;
|
|
144
145
|
this.open = false;
|
|
145
146
|
this.label = "";
|
|
146
147
|
this.content = "";
|
|
@@ -249,7 +250,6 @@ const StzhTooltip = /*@__PURE__*/ proxyCustomElement(class StzhTooltip extends H
|
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
componentDidRender() {
|
|
252
|
-
this.computePosition();
|
|
253
253
|
const isStzh = isStzhElement(this.triggerFirstElement);
|
|
254
254
|
if (this.hasTrigger("click")) {
|
|
255
255
|
this.triggerFirstElement.setAttribute(isStzh ? "a11y-expanded" : "aria-expanded", this.open ? "true" : "false");
|
|
@@ -277,23 +277,35 @@ const StzhTooltip = /*@__PURE__*/ proxyCustomElement(class StzhTooltip extends H
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
componentDidUpdate() {
|
|
280
|
-
if (this.
|
|
281
|
-
this.
|
|
280
|
+
if (this.open && !this.initializedTooltip) {
|
|
281
|
+
this.initializeAutoUpdate();
|
|
282
|
+
this.initializeFocusTrap();
|
|
283
|
+
this.initializedTooltip = true;
|
|
284
|
+
}
|
|
285
|
+
if (this.initializedTooltip) {
|
|
286
|
+
this.computePosition();
|
|
287
|
+
if (this.trap) {
|
|
288
|
+
this.trap.updateContainerElements(this.contentElement);
|
|
289
|
+
}
|
|
282
290
|
}
|
|
283
291
|
}
|
|
284
|
-
|
|
292
|
+
initializeAutoUpdate() {
|
|
285
293
|
this.autoUpdateCleanup = autoUpdate(this.element, this.contentElement, this.computePosition);
|
|
294
|
+
}
|
|
295
|
+
initializeFocusTrap() {
|
|
286
296
|
if (this.interactive) {
|
|
287
297
|
this.trap = createFocusTrap(this.contentElement, {
|
|
288
298
|
fallbackFocus: this.contentElement,
|
|
289
299
|
clickOutsideDeactivates: true,
|
|
290
300
|
returnFocusOnDeactivate: true,
|
|
291
301
|
});
|
|
292
|
-
if (this.open) {
|
|
293
|
-
this.trap.activate();
|
|
294
|
-
}
|
|
295
302
|
}
|
|
303
|
+
}
|
|
304
|
+
componentDidLoad() {
|
|
296
305
|
this.contentElement.hidden = !this.open;
|
|
306
|
+
if (this.open && this.trap) {
|
|
307
|
+
this.trap.activate();
|
|
308
|
+
}
|
|
297
309
|
}
|
|
298
310
|
connectedCallback() {
|
|
299
311
|
this.init();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-tooltip2.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,0uJAA0uJ;;ACoBjwJ,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;EAC/C,OAAO,EAAE,EAAE,QAA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,EAAE,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAoB,CAAC,EACrD,SAAS,EAAE,KAAK,GACX,EACN,IAAI,CAAC,KAAK,KACT,UAAI,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,uBAAuB,IACtD,IAAI,CAAC,KAAK,CACR,CACN,EACA,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KACvB,cAAQ,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAC,QAAQ,IAC3E,iBAAW,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,oBAAoB,GAAa,EAC/D,YAAM,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAQ,CAC7D,CACV,EACD,+BACE,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,KAC9C,IAAI,CAAC,IAAI,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KACpD,KAAK,EAAC,4BAA4B,KAEjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACjD,CACR,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-tooltip/stzh-tooltip.scss?tag=stzh-tooltip&encapsulation=scoped","src/components/stzh-tooltip/stzh-tooltip.tsx"],"sourcesContent":["/**\n * @prop --width: Width of tooltip\n * @prop --min-width: Minimum width of tooltip\n * @prop --max-width: Maximum width of tooltip\n * @prop --padding: Padding of tooltip\n * @prop --border-radius: Border radius of tooltip\n *\n * @prop --stzh-tooltip-width: **Global**: Width of tooltip (default `auto`)\n * @prop --stzh-tooltip-min-width: **Global**: Minimum width of tooltip (default `initial`)\n * @prop --stzh-tooltip-max-width: **Global**: Maximum width of tooltip (default `334px`)\n * @prop --stzh-tooltip-padding: **Global**: Padding of tooltip (default `var(--stzh-space-small)`)\n * @prop --stzh-tooltip-border-radius: **Global**: Border radius of tooltip (default `3px`)\n * @prop --stzh-tooltip-drop-shadow: **Global**: Border radius of tooltip (default `drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.16))`)\n * @prop --stzh-tooltip-color: **Global**: Color of tooltip text\n * @prop --stzh-tooltip-background-color: **Global**: Background color of tooltip\n * @prop --stzh-tooltip-link-color: **Global**: Color for link within tooltip\n * @prop --stzh-tooltip-hover-link-color: **Global**: Hover color for link within tooltip\n */\n\n:host {\n display: contents;\n\n --color: var(--stzh-tooltip-color, #{$colorWhite});\n --background-color: var(--stzh-tooltip-background-color, #{$colorCoolgrey60});\n --width: #{$tooltipWidth};\n --min-width: #{$tooltipMinWidth};\n --max-width: #{$tooltipMaxWidth};\n --padding: #{$tooltipPadding};\n --border-radius: #{$tooltipBorderRadius};\n --link-color: var(--stzh-tooltip-link-color, #{$colorWhite});\n --hover-link-color: var(--stzh-tooltip-hover-link-color, #{$colorWhite70op});\n\n &[size=\"small\"] {\n --padding: #{$tooltipSmallPadding};\n }\n\n &[type=\"button\"] {\n --color: #{$colorMidnightblue70};\n --background-color: #{$colorCoolgrey10};\n --link-color: #{$colorMidnightblue70};\n --hover-link-color: #{$colorMidnightblue80};\n }\n}\n\n.stzh-tooltip {\n @include tooltip-arrow;\n display: contents;\n\n &__trigger {\n display: contents;\n }\n\n &__content {\n @include tooltip-fontsize;\n @include tooltip-dropshadow;\n position: absolute;\n z-index: $zIndexPopover;\n border-radius: var(--border-radius);\n background-color: var(--background-color);\n color: var(--color);\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n display: flex;\n flex-direction: row-reverse;\n\n --stzh-base-color: var(--color);\n --stzh-link-color: var(--link-color);\n --stzh-link-hover-color: var(--hover-link-color);\n }\n\n &__content-slot {\n padding: var(--padding);\n }\n\n &__close {\n @include tooltip__close;\n }\n\n &__icon {\n @include tooltip__icon;\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhTooltipClosedEvent,\n StzhTooltipCloseEvent,\n StzhTooltipOpenedEvent,\n StzhTooltipOpenEvent,\n} from \"../../index\";\n\nimport { arrow, autoUpdate, computePosition, flip, MiddlewareData, offset, Placement, shift } from \"@floating-ui/dom\";\n\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport { isStzhElement } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, stopAnimations } from \"../../utils/animation-utils\";\n\nimport { StzhTooltipLocalizedText } from \"./stzh-tooltip.localization\";\n\nimport Arrow from \"./assets/arrow.svg\";\n\nconst ANIMATION_SHOW = {\n keyframes: [{ opacity: \"0\" }, { opacity: \"1\" }],\n options: { duration: 100, easing: \"linear\" },\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [{ opacity: \"1\" }, { opacity: \"0\" }],\n options: { duration: 200, easing: \"linear\" },\n};\n\nconst keyCode = {\n ESC: 27,\n};\n\nlet tooltipCounter = 0;\n\n/**\n * @slot Trigger element inside\n * @slot content - Content of tooltip\n */\n@Component({\n tag: \"stzh-tooltip\",\n styleUrl: \"stzh-tooltip.scss\",\n scoped: true,\n})\nexport class StzhTooltip {\n /** Whether tooltip should be open */\n @Prop({ mutable: true }) open: boolean = false;\n\n /** Label of tooltip (used for screenreaders) */\n @Prop() label: string = \"\";\n\n /** Content of tooltip (use instead of content slot) */\n @Prop() content: string = \"\";\n\n /** Default placement of tooltip relative to trigger element */\n @Prop() placement: Placement = \"bottom\";\n\n /** Position strategy */\n @Prop() strategy: \"absolute\" | \"fixed\" = \"absolute\";\n\n /** Visual type */\n @Prop({ reflect: true }) type: \"overlay\" | \"button\" = \"overlay\";\n\n /** Shifting of tooltip content */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Shifting of tooltip content */\n @Prop() skidding: number = 0;\n\n /** Distance from tooltip content to trigger (default: arrow height (8px) + spacing (4px) = 12) */\n @Prop() distance: number = 12;\n\n /** Whether tooltip is interactive */\n @Prop() interactive: boolean = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = \"hover focus\";\n private _trigger: string[];\n\n /** Translation strings */\n @Prop() localization: StzhTooltipLocalizedText;\n\n @Element() element: HTMLStzhTooltipElement;\n\n /** Tooltip open event */\n @Event() stzhOpen: EventEmitter<StzhTooltipOpenEvent>;\n\n /** Tooltip opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhTooltipOpenedEvent>;\n\n /** Tooltip close event */\n @Event() stzhClose: EventEmitter<StzhTooltipCloseEvent>;\n\n /** Tooltip closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhTooltipClosedEvent>;\n\n /** Show tooltip content */\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n /** Hide tooltip content */\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n /** Toggle tooltip content */\n @Method()\n async toggle() {\n if (this.open) {\n return await this.hide();\n } else {\n return await this.show();\n }\n }\n\n @Method()\n async update() {\n return await this.computePosition();\n }\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.contentElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-tooltip\",\n });\n }\n\n await stopAnimations(this.contentElement);\n\n // safari seems to need will-change,\n // otherwise it has problems animating the element with the drop shadow\n this.contentElement.style.willChange = \"transform, opacity, position, top, left, bottom, right\";\n this.contentElement.hidden = false;\n\n await animateTo(this.contentElement, ANIMATION_SHOW.keyframes, ANIMATION_SHOW.options);\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-tooltip\",\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-tooltip\",\n });\n }\n\n await stopAnimations(this.contentElement);\n await animateTo(this.contentElement, ANIMATION_HIDE.keyframes, ANIMATION_HIDE.options);\n\n this.contentElement.hidden = true;\n this.contentElement.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-tooltip\",\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Watch(\"trigger\")\n triggerWatcher(newValue: string) {\n this._trigger = newValue.split(\" \");\n }\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleDocumentClick(event: MouseEvent) {\n if (!this.open) {\n return;\n }\n\n const isClickOutside =\n event.target !== this.contentElement && this.contentElement.contains(event.target as HTMLElement) === false;\n\n const isClickTrigger =\n event.target === this.triggerElement || this.triggerElement.contains(event.target as HTMLElement);\n\n if (isClickOutside && !isClickTrigger && this.hasTrigger(\"click\")) {\n this.hide();\n }\n }\n\n @State() computedPlacement: Placement;\n\n private observer: MutationObserver;\n\n private toggledByMethod: boolean = false;\n private middlewareData: MiddlewareData;\n private triggerElement: HTMLElement;\n private triggerFirstElement: HTMLElement;\n private contentElement: HTMLElement;\n private arrowElement: HTMLElement;\n private autoUpdateCleanup: Function;\n private id: string;\n private trap: FocusTrap;\n private isHovering: boolean = false;\n\n private hasTrigger(trigger: string) {\n return this._trigger.indexOf(trigger) > -1;\n }\n\n private onEscKey = (event: KeyboardEvent) => {\n if (event.keyCode === keyCode.ESC) {\n this.hide();\n }\n };\n\n private computePosition = async () => {\n if (!this.open) {\n return;\n }\n\n const {\n x = 0,\n y = 0,\n strategy = \"absolute\",\n placement,\n middlewareData,\n } = await computePosition(this.triggerFirstElement, this.contentElement, {\n strategy: this.strategy,\n placement: this.placement,\n middleware: [\n offset({\n mainAxis: this.distance,\n crossAxis: this.skidding,\n }),\n flip({\n padding: 5,\n }),\n shift({\n padding: 5,\n }),\n arrow({\n element: this.arrowElement,\n padding: 5,\n }),\n ],\n });\n\n this.middlewareData = middlewareData;\n this.computedPlacement = placement;\n\n Object.assign(this.contentElement.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n });\n\n Object.assign(this.arrowElement.style, {\n left: x != null ? `${middlewareData.arrow.x}px` : \"\",\n top: y != null ? `${middlewareData.arrow.y}px` : \"\",\n });\n };\n\n private onClickTrigger = () => {\n if (this.hasTrigger(\"click\")) {\n this.toggle();\n }\n };\n\n private onMouseEnterTrigger = () => {\n if (this.hasTrigger(\"hover\")) {\n this.isHovering = true;\n this.show();\n }\n };\n\n private onMouseLeaveTrigger = () => {\n if (this.hasTrigger(\"hover\")) {\n this.isHovering = false;\n document.addEventListener(\"mousemove\", this.onMouseMoveDocument);\n }\n };\n\n private onFocusTrigger = () => {\n if (this.hasTrigger(\"focus\")) {\n this.show();\n }\n };\n\n private onBlurTrigger = () => {\n if (this.hasTrigger(\"focus\")) {\n this.hide();\n }\n };\n\n private onMouseMoveDocument = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n if (!this.computedPlacement) {\n return true;\n }\n\n const basePlacement = this.computedPlacement.split(\"-\")[0];\n const offsetData = this.middlewareData.offset;\n const popperRect = this.contentElement.getBoundingClientRect();\n\n if (!offsetData) {\n return true;\n }\n\n const topDistance = basePlacement === \"bottom\" ? offsetData.y : 0;\n const bottomDistance = basePlacement === \"top\" ? offsetData.y : 0;\n const leftDistance = basePlacement === \"right\" ? offsetData.x : 0;\n const rightDistance = basePlacement === \"left\" ? offsetData.x : 0;\n\n const exceedsTop = popperRect.top - clientY > topDistance;\n const exceedsBottom = clientY - popperRect.bottom > bottomDistance;\n const exceedsLeft = popperRect.left - clientX > leftDistance;\n const exceedsRight = clientX - popperRect.right > rightDistance;\n\n if (exceedsTop || exceedsBottom || exceedsLeft || exceedsRight) {\n document.removeEventListener(\"mousemove\", this.onMouseMoveDocument);\n\n if (!this.isHovering) {\n this.hide();\n }\n }\n };\n\n private init = () => {\n let trigger = this.triggerElement?.firstElementChild as HTMLElement;\n\n if (!trigger) {\n const defaultSlot = Array.from(this.element.children).find(child => !child.hasAttribute(\"slot\")) as HTMLElement;\n\n trigger = defaultSlot;\n }\n\n if (trigger) {\n this.triggerFirstElement = trigger;\n trigger.addEventListener(\"click\", this.onClickTrigger);\n trigger.addEventListener(\"mouseenter\", this.onMouseEnterTrigger);\n trigger.addEventListener(\"mouseleave\", this.onMouseLeaveTrigger);\n trigger.addEventListener(\"focusin\", this.onFocusTrigger);\n trigger.addEventListener(\"focusout\", this.onBlurTrigger);\n }\n };\n\n async componentWillLoad() {\n this.id = `stzh-tooltip-${tooltipCounter++}`;\n\n this.triggerWatcher(this.trigger);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"tooltip\");\n }\n }\n\n componentDidRender() {\n this.computePosition();\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n if (this.hasTrigger(\"click\")) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", this.open ? \"true\" : \"false\");\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(\n isStzh ? \"a11y-describedby\" : \"aria-describedby\",\n `${this.id}-trigger-description`\n );\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-label\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-label\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", this.label);\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"analytics-id\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"s-object-id\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", this.label);\n }\n } else {\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${this.id}-content`);\n }\n }\n\n if (this.trap) {\n this.open ? this.trap.activate() : this.trap.deactivate();\n }\n }\n\n componentDidUpdate() {\n if (this.trap) {\n this.trap.updateContainerElements(this.contentElement);\n }\n }\n\n componentDidLoad() {\n this.autoUpdateCleanup = autoUpdate(this.element, this.contentElement, this.computePosition);\n\n if (this.interactive) {\n this.trap = createFocusTrap(this.contentElement, {\n fallbackFocus: this.contentElement,\n clickOutsideDeactivates: true,\n returnFocusOnDeactivate: true,\n });\n\n if (this.open) {\n this.trap.activate();\n }\n }\n\n this.contentElement.hidden = !this.open;\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n\n if (this.triggerFirstElement) {\n this.triggerFirstElement.removeEventListener(\"click\", this.onClickTrigger);\n this.triggerFirstElement.removeEventListener(\"mouseenter\", this.onMouseEnterTrigger);\n this.triggerFirstElement.removeEventListener(\"mouseleave\", this.onMouseLeaveTrigger);\n this.triggerFirstElement.removeEventListener(\"focusin\", this.onFocusTrigger);\n this.triggerFirstElement.removeEventListener(\"focusout\", this.onBlurTrigger);\n }\n }\n\n render() {\n const classes = {\n \"stzh-tooltip\": true,\n [`stzh-tooltip--type-${this.type}`]: true,\n [`stzh-tooltip--open`]: this.open,\n [`stzh-tooltip--placement-${this.computedPlacement}`]: !!this.computedPlacement,\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-tooltip__trigger\" ref={el => (this.triggerElement = el as HTMLDivElement)}>\n <slot></slot>\n </div>\n {this.hasTrigger(\"click\") && (\n <div class=\"stzh-tooltip__vhidden\" id={`${this.id}-trigger-description`}>\n {this.localization.open}\n </div>\n )}\n <div\n class=\"stzh-tooltip__content\"\n id={`${this.id}-content`}\n ref={el => (this.contentElement = el as HTMLDivElement)}\n tabindex=\"-1\"\n aria-labelledby={this.label ? `${this.id}-label` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onKeyDown={this.onEscKey}\n onMouseEnter={this.onMouseEnterTrigger}\n onMouseLeave={this.onMouseLeaveTrigger}\n onFocusin={this.onFocusTrigger}\n onFocusout={this.onBlurTrigger}\n >\n <div\n class=\"stzh-tooltip__arrow\"\n ref={el => (this.arrowElement = el as HTMLDivElement)}\n innerHTML={Arrow}\n ></div>\n {this.label && (\n <h2 id={`${this.id}-label`} class=\"stzh-tooltip__vhidden\">\n {this.label}\n </h2>\n )}\n {this.hasTrigger(\"click\") && (\n <button class=\"stzh-tooltip__close\" onClick={() => this.hide()} type=\"button\">\n <stzh-icon name=\"close\" class=\"stzh-tooltip__icon\"></stzh-icon>\n <span class=\"stzh-tooltip__vhidden\">{this.localization.close}</span>\n </button>\n )}\n <stzh-text\n curve={this.type === \"overlay\" ? \"none\" : \"caption\"}\n {...(this.type === \"button\" ? { font: \"heavy\" } : {})}\n class=\"stzh-tooltip__content-slot\"\n >\n {this.content ? this.content : <slot name=\"content\"></slot>}\n </stzh-text>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-tooltip2.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,0uJAA0uJ;;ACoBjwJ,MAAM,cAAc,GAAG;EACrB,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;EAC/C,OAAO,EAAE,EAAE,QAA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;;;","names":[],"sources":["src/components/stzh-tooltip/stzh-tooltip.scss?tag=stzh-tooltip&encapsulation=scoped","src/components/stzh-tooltip/stzh-tooltip.tsx"],"sourcesContent":["/**\n * @prop --width: Width of tooltip\n * @prop --min-width: Minimum width of tooltip\n * @prop --max-width: Maximum width of tooltip\n * @prop --padding: Padding of tooltip\n * @prop --border-radius: Border radius of tooltip\n *\n * @prop --stzh-tooltip-width: **Global**: Width of tooltip (default `auto`)\n * @prop --stzh-tooltip-min-width: **Global**: Minimum width of tooltip (default `initial`)\n * @prop --stzh-tooltip-max-width: **Global**: Maximum width of tooltip (default `334px`)\n * @prop --stzh-tooltip-padding: **Global**: Padding of tooltip (default `var(--stzh-space-small)`)\n * @prop --stzh-tooltip-border-radius: **Global**: Border radius of tooltip (default `3px`)\n * @prop --stzh-tooltip-drop-shadow: **Global**: Border radius of tooltip (default `drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.16))`)\n * @prop --stzh-tooltip-color: **Global**: Color of tooltip text\n * @prop --stzh-tooltip-background-color: **Global**: Background color of tooltip\n * @prop --stzh-tooltip-link-color: **Global**: Color for link within tooltip\n * @prop --stzh-tooltip-hover-link-color: **Global**: Hover color for link within tooltip\n */\n\n:host {\n display: contents;\n\n --color: var(--stzh-tooltip-color, #{$colorWhite});\n --background-color: var(--stzh-tooltip-background-color, #{$colorCoolgrey60});\n --width: #{$tooltipWidth};\n --min-width: #{$tooltipMinWidth};\n --max-width: #{$tooltipMaxWidth};\n --padding: #{$tooltipPadding};\n --border-radius: #{$tooltipBorderRadius};\n --link-color: var(--stzh-tooltip-link-color, #{$colorWhite});\n --hover-link-color: var(--stzh-tooltip-hover-link-color, #{$colorWhite70op});\n\n &[size=\"small\"] {\n --padding: #{$tooltipSmallPadding};\n }\n\n &[type=\"button\"] {\n --color: #{$colorMidnightblue70};\n --background-color: #{$colorCoolgrey10};\n --link-color: #{$colorMidnightblue70};\n --hover-link-color: #{$colorMidnightblue80};\n }\n}\n\n.stzh-tooltip {\n @include tooltip-arrow;\n display: contents;\n\n &__trigger {\n display: contents;\n }\n\n &__content {\n @include tooltip-fontsize;\n @include tooltip-dropshadow;\n position: absolute;\n z-index: $zIndexPopover;\n border-radius: var(--border-radius);\n background-color: var(--background-color);\n color: var(--color);\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n display: flex;\n flex-direction: row-reverse;\n\n --stzh-base-color: var(--color);\n --stzh-link-color: var(--link-color);\n --stzh-link-hover-color: var(--hover-link-color);\n }\n\n &__content-slot {\n padding: var(--padding);\n }\n\n &__close {\n @include tooltip__close;\n }\n\n &__icon {\n @include tooltip__icon;\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhTooltipClosedEvent,\n StzhTooltipCloseEvent,\n StzhTooltipOpenedEvent,\n StzhTooltipOpenEvent,\n} from \"../../index\";\n\nimport { arrow, autoUpdate, computePosition, flip, MiddlewareData, offset, Placement, shift } from \"@floating-ui/dom\";\n\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport { isStzhElement } from \"../../utils/utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, stopAnimations } from \"../../utils/animation-utils\";\n\nimport { StzhTooltipLocalizedText } from \"./stzh-tooltip.localization\";\n\nimport Arrow from \"./assets/arrow.svg\";\n\nconst ANIMATION_SHOW = {\n keyframes: [{ opacity: \"0\" }, { opacity: \"1\" }],\n options: { duration: 100, easing: \"linear\" },\n};\n\nconst ANIMATION_HIDE = {\n keyframes: [{ opacity: \"1\" }, { opacity: \"0\" }],\n options: { duration: 200, easing: \"linear\" },\n};\n\nconst keyCode = {\n ESC: 27,\n};\n\nlet tooltipCounter = 0;\n\n/**\n * @slot Trigger element inside\n * @slot content - Content of tooltip\n */\n@Component({\n tag: \"stzh-tooltip\",\n styleUrl: \"stzh-tooltip.scss\",\n scoped: true,\n})\nexport class StzhTooltip {\n /** Whether tooltip should be open */\n @Prop({ mutable: true }) open: boolean = false;\n\n /** Label of tooltip (used for screenreaders) */\n @Prop() label: string = \"\";\n\n /** Content of tooltip (use instead of content slot) */\n @Prop() content: string = \"\";\n\n /** Default placement of tooltip relative to trigger element */\n @Prop() placement: Placement = \"bottom\";\n\n /** Position strategy */\n @Prop() strategy: \"absolute\" | \"fixed\" = \"absolute\";\n\n /** Visual type */\n @Prop({ reflect: true }) type: \"overlay\" | \"button\" = \"overlay\";\n\n /** Shifting of tooltip content */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Shifting of tooltip content */\n @Prop() skidding: number = 0;\n\n /** Distance from tooltip content to trigger (default: arrow height (8px) + spacing (4px) = 12) */\n @Prop() distance: number = 12;\n\n /** Whether tooltip is interactive */\n @Prop() interactive: boolean = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = \"hover focus\";\n private _trigger: string[];\n\n /** Translation strings */\n @Prop() localization: StzhTooltipLocalizedText;\n\n @Element() element: HTMLStzhTooltipElement;\n\n /** Tooltip open event */\n @Event() stzhOpen: EventEmitter<StzhTooltipOpenEvent>;\n\n /** Tooltip opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhTooltipOpenedEvent>;\n\n /** Tooltip close event */\n @Event() stzhClose: EventEmitter<StzhTooltipCloseEvent>;\n\n /** Tooltip closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhTooltipClosedEvent>;\n\n /** Show tooltip content */\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n /** Hide tooltip content */\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n return waitForEvent(this.element, \"stzhClosed\");\n }\n\n /** Toggle tooltip content */\n @Method()\n async toggle() {\n if (this.open) {\n return await this.hide();\n } else {\n return await this.show();\n }\n }\n\n @Method()\n async update() {\n return await this.computePosition();\n }\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.contentElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-tooltip\",\n });\n }\n\n await stopAnimations(this.contentElement);\n\n // safari seems to need will-change,\n // otherwise it has problems animating the element with the drop shadow\n this.contentElement.style.willChange = \"transform, opacity, position, top, left, bottom, right\";\n this.contentElement.hidden = false;\n\n await animateTo(this.contentElement, ANIMATION_SHOW.keyframes, ANIMATION_SHOW.options);\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-tooltip\",\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-tooltip\",\n });\n }\n\n await stopAnimations(this.contentElement);\n await animateTo(this.contentElement, ANIMATION_HIDE.keyframes, ANIMATION_HIDE.options);\n\n this.contentElement.hidden = true;\n this.contentElement.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-tooltip\",\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Watch(\"trigger\")\n triggerWatcher(newValue: string) {\n this._trigger = newValue.split(\" \");\n }\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleDocumentClick(event: MouseEvent) {\n if (!this.open) {\n return;\n }\n\n const isClickOutside =\n event.target !== this.contentElement && this.contentElement.contains(event.target as HTMLElement) === false;\n\n const isClickTrigger =\n event.target === this.triggerElement || this.triggerElement.contains(event.target as HTMLElement);\n\n if (isClickOutside && !isClickTrigger && this.hasTrigger(\"click\")) {\n this.hide();\n }\n }\n\n @State() computedPlacement: Placement;\n\n private observer: MutationObserver;\n\n private toggledByMethod: boolean = false;\n private middlewareData: MiddlewareData;\n private triggerElement: HTMLElement;\n private triggerFirstElement: HTMLElement;\n private contentElement: HTMLElement;\n private arrowElement: HTMLElement;\n private autoUpdateCleanup: Function;\n private id: string;\n private trap: FocusTrap;\n private isHovering: boolean = false;\n\n private hasTrigger(trigger: string) {\n return this._trigger.indexOf(trigger) > -1;\n }\n\n private onEscKey = (event: KeyboardEvent) => {\n if (event.keyCode === keyCode.ESC) {\n this.hide();\n }\n };\n\n private computePosition = async () => {\n if (!this.open) {\n return;\n }\n\n const {\n x = 0,\n y = 0,\n strategy = \"absolute\",\n placement,\n middlewareData,\n } = await computePosition(this.triggerFirstElement, this.contentElement, {\n strategy: this.strategy,\n placement: this.placement,\n middleware: [\n offset({\n mainAxis: this.distance,\n crossAxis: this.skidding,\n }),\n flip({\n padding: 5,\n }),\n shift({\n padding: 5,\n }),\n arrow({\n element: this.arrowElement,\n padding: 5,\n }),\n ],\n });\n\n this.middlewareData = middlewareData;\n this.computedPlacement = placement;\n\n Object.assign(this.contentElement.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n });\n\n Object.assign(this.arrowElement.style, {\n left: x != null ? `${middlewareData.arrow.x}px` : \"\",\n top: y != null ? `${middlewareData.arrow.y}px` : \"\",\n });\n };\n\n private onClickTrigger = () => {\n if (this.hasTrigger(\"click\")) {\n this.toggle();\n }\n };\n\n private onMouseEnterTrigger = () => {\n if (this.hasTrigger(\"hover\")) {\n this.isHovering = true;\n this.show();\n }\n };\n\n private onMouseLeaveTrigger = () => {\n if (this.hasTrigger(\"hover\")) {\n this.isHovering = false;\n document.addEventListener(\"mousemove\", this.onMouseMoveDocument);\n }\n };\n\n private onFocusTrigger = () => {\n if (this.hasTrigger(\"focus\")) {\n this.show();\n }\n };\n\n private onBlurTrigger = () => {\n if (this.hasTrigger(\"focus\")) {\n this.hide();\n }\n };\n\n private onMouseMoveDocument = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n if (!this.computedPlacement) {\n return true;\n }\n\n const basePlacement = this.computedPlacement.split(\"-\")[0];\n const offsetData = this.middlewareData.offset;\n const popperRect = this.contentElement.getBoundingClientRect();\n\n if (!offsetData) {\n return true;\n }\n\n const topDistance = basePlacement === \"bottom\" ? offsetData.y : 0;\n const bottomDistance = basePlacement === \"top\" ? offsetData.y : 0;\n const leftDistance = basePlacement === \"right\" ? offsetData.x : 0;\n const rightDistance = basePlacement === \"left\" ? offsetData.x : 0;\n\n const exceedsTop = popperRect.top - clientY > topDistance;\n const exceedsBottom = clientY - popperRect.bottom > bottomDistance;\n const exceedsLeft = popperRect.left - clientX > leftDistance;\n const exceedsRight = clientX - popperRect.right > rightDistance;\n\n if (exceedsTop || exceedsBottom || exceedsLeft || exceedsRight) {\n document.removeEventListener(\"mousemove\", this.onMouseMoveDocument);\n\n if (!this.isHovering) {\n this.hide();\n }\n }\n };\n\n private init = () => {\n let trigger = this.triggerElement?.firstElementChild as HTMLElement;\n\n if (!trigger) {\n const defaultSlot = Array.from(this.element.children).find(child => !child.hasAttribute(\"slot\")) as HTMLElement;\n\n trigger = defaultSlot;\n }\n\n if (trigger) {\n this.triggerFirstElement = trigger;\n trigger.addEventListener(\"click\", this.onClickTrigger);\n trigger.addEventListener(\"mouseenter\", this.onMouseEnterTrigger);\n trigger.addEventListener(\"mouseleave\", this.onMouseLeaveTrigger);\n trigger.addEventListener(\"focusin\", this.onFocusTrigger);\n trigger.addEventListener(\"focusout\", this.onBlurTrigger);\n }\n };\n\n async componentWillLoad() {\n this.id = `stzh-tooltip-${tooltipCounter++}`;\n\n this.triggerWatcher(this.trigger);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"tooltip\");\n }\n }\n\n componentDidRender() {\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n if (this.hasTrigger(\"click\")) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", this.open ? \"true\" : \"false\");\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(\n isStzh ? \"a11y-describedby\" : \"aria-describedby\",\n `${this.id}-trigger-description`\n );\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-label\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-label\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", this.label);\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"analytics-id\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"s-object-id\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", this.label);\n }\n } else {\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${this.id}-content`);\n }\n }\n\n if (this.trap) {\n this.open ? this.trap.activate() : this.trap.deactivate();\n }\n }\n\n private initializedTooltip = false\n\n componentDidUpdate() {\n if (this.open && !this.initializedTooltip) {\n this.initializeAutoUpdate();\n this.initializeFocusTrap();\n this.initializedTooltip = true\n }\n\n if (this.initializedTooltip) {\n this.computePosition();\n if (this.trap) {\n this.trap.updateContainerElements(this.contentElement);\n }\n }\n }\n\n initializeAutoUpdate() {\n this.autoUpdateCleanup = autoUpdate(this.element, this.contentElement, this.computePosition);\n }\n\n initializeFocusTrap() {\n if (this.interactive) {\n this.trap = createFocusTrap(this.contentElement, {\n fallbackFocus: this.contentElement,\n clickOutsideDeactivates: true,\n returnFocusOnDeactivate: true,\n });\n }\n }\n\n componentDidLoad() {\n this.contentElement.hidden = !this.open;\n if (this.open && this.trap) {\n this.trap.activate();\n }\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n\n if (this.triggerFirstElement) {\n this.triggerFirstElement.removeEventListener(\"click\", this.onClickTrigger);\n this.triggerFirstElement.removeEventListener(\"mouseenter\", this.onMouseEnterTrigger);\n this.triggerFirstElement.removeEventListener(\"mouseleave\", this.onMouseLeaveTrigger);\n this.triggerFirstElement.removeEventListener(\"focusin\", this.onFocusTrigger);\n this.triggerFirstElement.removeEventListener(\"focusout\", this.onBlurTrigger);\n }\n }\n\n render() {\n const classes = {\n \"stzh-tooltip\": true,\n [`stzh-tooltip--type-${this.type}`]: true,\n [`stzh-tooltip--open`]: this.open,\n [`stzh-tooltip--placement-${this.computedPlacement}`]: !!this.computedPlacement,\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-tooltip__trigger\" ref={el => (this.triggerElement = el as HTMLDivElement)}>\n <slot></slot>\n </div>\n {this.hasTrigger(\"click\") && (\n <div class=\"stzh-tooltip__vhidden\" id={`${this.id}-trigger-description`}>\n {this.localization.open}\n </div>\n )}\n <div\n class=\"stzh-tooltip__content\"\n id={`${this.id}-content`}\n ref={el => (this.contentElement = el as HTMLDivElement)}\n tabindex=\"-1\"\n aria-labelledby={this.label ? `${this.id}-label` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onKeyDown={this.onEscKey}\n onMouseEnter={this.onMouseEnterTrigger}\n onMouseLeave={this.onMouseLeaveTrigger}\n onFocusin={this.onFocusTrigger}\n onFocusout={this.onBlurTrigger}\n >\n <div\n class=\"stzh-tooltip__arrow\"\n ref={el => (this.arrowElement = el as HTMLDivElement)}\n innerHTML={Arrow}\n ></div>\n {this.label && (\n <h2 id={`${this.id}-label`} class=\"stzh-tooltip__vhidden\">\n {this.label}\n </h2>\n )}\n {this.hasTrigger(\"click\") && (\n <button class=\"stzh-tooltip__close\" onClick={() => this.hide()} type=\"button\">\n <stzh-icon name=\"close\" class=\"stzh-tooltip__icon\"></stzh-icon>\n <span class=\"stzh-tooltip__vhidden\">{this.localization.close}</span>\n </button>\n )}\n <stzh-text\n curve={this.type === \"overlay\" ? \"none\" : \"caption\"}\n {...(this.type === \"button\" ? { font: \"heavy\" } : {})}\n class=\"stzh-tooltip__content-slot\"\n >\n {this.content ? this.content : <slot name=\"content\"></slot>}\n </stzh-text>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -14000,7 +14000,7 @@ const StzhUpload$1 = /*@__PURE__*/ proxyCustomElement(class StzhUpload extends H
|
|
|
14000
14000
|
const description = this.description ? this.description : this.localization.description;
|
|
14001
14001
|
return (h(Host, { "is-invalid": this.invalid || errorUsed }, h("div", { class: classes, ref: el => (this.dropzoneElement = el) }, h("div", { ref: el => (this.hiddenInputContainerElement = el) }), h("div", { id: `${this.uploadId}-label` }, this.label && h("div", { class: "stzh-upload__label" }, this.label)), h("div", { class: "stzh-upload__clickarea", ref: el => (this.clickareaElement = el) }, h("div", { class: "stzh-upload__heading-wrapper" }, h("div", { class: "stzh-upload__heading-inner-wrapper" }, h("div", { class: "stzh-upload__heading" }, this.heading ? this.heading : this.localization.heading), h("div", { class: "stzh-upload__buttons-wrapper" }, h("stzh-button", { class: "stzh-upload__button", variant: "secondary", size: "small", ref: el => (this.linkElement = el), label: this.button ? this.button : tc(this.localization.button, this.maxFiles), a11yDescribedby: `${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`, disabled: this.disabled, a11yControls: `${this.uploadId}-previews` }, h("stzh-icon", { slot: "icon", name: "upload" })), this.isPhotographingAvailable && (h("stzh-button", { class: "stzh-upload__button-scan", variant: "secondary", size: "small", label: this.buttonScan ? this.buttonScan : tc(this.localization.buttonScan, this.maxFiles), onClick: this.onButtonScanClick }, h("stzh-icon", { slot: "icon", name: "camera" })))), h("div", { class: "stzh-upload__hint-wrapper" }, h("span", null, this.localization.buttonIntro)))), h("div", { class: "stzh-upload__instructions", id: `${this.uploadId}-instruction` }, description
|
|
14002
14002
|
.replace("{{fileformats}}", this.acceptedFiles ? this.acceptedFiles : "Alle")
|
|
14003
|
-
.replace("{{filesize}}", `${this.maxFilesize}`))), ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h(StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error })), h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, h("div", { class: "stzh-upload__previews-inner-wrapper" }, h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) })))), h("stzh-dialog", { ref: el => (this.photographingOverlayElement = el), onStzhClose: this.closePhotographingWebsocketConnection }, h("stzh-button", { class: "stzh-upload-photographing__back-button", icon: "arrow-left", size: "small", variant: "tertiary-plain", "no-padding-left": "true", "no-padding-right": "true", onClick: this.closePhotographingOverlay }, this.localization.back), this.isPhotographingAvailable && (h(Fragment, null, h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle1), h("div", { class: "stzh-upload-photographing__text-qrcode" }, h("div", null, h("stzh-text", null, this.localization.photographingText1), !!this.photographingUrlDetails && (h("stzh-link", { class: "stzh-upload-photographing-link", href: this.photographingUrlDetails.url, target: "_blank" }, this.photographingUrlDetails.url))), h("canvas", { class: "stzh-upload-photographing-qrcode", ref: el => (this.photographingQrcodeElement = el) }))), h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle2), h("stzh-text", null, this.localization.photographingText2)))))));
|
|
14003
|
+
.replace("{{filesize}}", `${this.maxFilesize}`))), h("div", { class: "stzh-upload__description-wrapper" }, ((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h(StzhInputDescription, { classPrefix: "stzh-upload", id: `${this.uploadId}-description`, error: this._error }))), h("div", { id: `${this.uploadId}-previews`, class: "stzh-upload__previews-wrapper" }, h("div", { class: "stzh-upload__previews-inner-wrapper" }, h("div", { class: "stzh-upload__errors", ref: el => (this.errorsElement = el) }), h("div", { class: "stzh-upload__previews dropzone-previews", ref: el => (this.previewsElement = el) })))), h("stzh-dialog", { ref: el => (this.photographingOverlayElement = el), onStzhClose: this.closePhotographingWebsocketConnection }, h("stzh-button", { class: "stzh-upload-photographing__back-button", icon: "arrow-left", size: "small", variant: "tertiary-plain", "no-padding-left": "true", "no-padding-right": "true", onClick: this.closePhotographingOverlay }, this.localization.back), this.isPhotographingAvailable && (h(Fragment, null, h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle1), h("div", { class: "stzh-upload-photographing__text-qrcode" }, h("div", null, h("stzh-text", null, this.localization.photographingText1), !!this.photographingUrlDetails && (h("stzh-link", { class: "stzh-upload-photographing-link", href: this.photographingUrlDetails.url, target: "_blank" }, this.photographingUrlDetails.url))), h("canvas", { class: "stzh-upload-photographing-qrcode", ref: el => (this.photographingQrcodeElement = el) }))), h("div", { class: "stzh-upload-photographing__info" }, h("stzh-heading", { level: "3" }, this.localization.photographingTitle2), h("stzh-text", null, this.localization.photographingText2)))))));
|
|
14004
14004
|
}
|
|
14005
14005
|
get element() { return this; }
|
|
14006
14006
|
static get watchers() { return {
|