@swisspost/design-system-components 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/check-non-empty-ae713942.js +13 -0
- package/dist/cjs/check-non-empty-ae713942.js.map +1 -0
- package/dist/cjs/{check-one-of-4c2e8b2e.js → check-one-of-27ad3154.js} +1 -1
- package/dist/cjs/check-one-of-27ad3154.js.map +1 -0
- package/dist/cjs/constants-238701d3.js +7 -0
- package/dist/cjs/constants-238701d3.js.map +1 -0
- package/dist/cjs/fade-35a3633a.js +12 -0
- package/dist/cjs/fade-35a3633a.js.map +1 -0
- package/dist/cjs/index-b38a23e0.js +41 -0
- package/dist/cjs/index-b38a23e0.js.map +1 -0
- package/dist/cjs/{index-12cc37c9.js → index-b619e205.js} +245 -41
- package/dist/cjs/index-b619e205.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -12
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/package-bd70f73c.js +7 -0
- package/dist/cjs/package-bd70f73c.js.map +1 -0
- package/dist/cjs/post-accordion.cjs.entry.js +89 -0
- package/dist/cjs/post-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/post-alert.cjs.entry.js +10 -10
- package/dist/cjs/post-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/post-collapsible.cjs.entry.js +49 -80
- package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
- package/dist/cjs/post-components.cjs.js +3 -6
- package/dist/cjs/post-components.cjs.js.map +1 -1
- package/dist/cjs/post-icon.cjs.entry.js +7 -7
- package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +5 -4
- package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/animations/collapse.js +13 -0
- package/dist/collection/animations/collapse.js.map +1 -0
- package/dist/collection/animations/fade.js +4 -4
- package/dist/collection/animations/fade.js.map +1 -1
- package/dist/collection/collection-manifest.json +10 -9
- package/dist/collection/components/post-accordion/post-accordion.css +1 -0
- package/dist/collection/components/post-accordion/post-accordion.js +178 -0
- package/dist/collection/components/post-accordion/post-accordion.js.map +1 -0
- package/dist/collection/components/post-alert/post-alert.css +1 -1
- package/dist/collection/components/post-alert/post-alert.js +9 -7
- package/dist/collection/components/post-alert/post-alert.js.map +1 -1
- package/dist/collection/components/post-collapsible/heading-levels.js +2 -0
- package/dist/collection/components/post-collapsible/heading-levels.js.map +1 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -29
- package/dist/collection/components/post-collapsible/post-collapsible.js +65 -63
- package/dist/collection/components/post-collapsible/post-collapsible.js.map +1 -1
- package/dist/collection/components/post-icon/post-icon.js +5 -4
- package/dist/collection/components/post-icon/post-icon.js.map +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +5 -4
- package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
- package/dist/collection/components/post-tabs/post-tabs.js +11 -7
- package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +22 -15
- package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -1
- package/dist/collection/utils/index.js +1 -3
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/is-motion-reduced.js +4 -0
- package/dist/collection/utils/is-motion-reduced.js.map +1 -0
- package/dist/collection/utils/property-checkers/check-non-empty.js +1 -1
- package/dist/collection/utils/property-checkers/empty-or.js +1 -1
- package/dist/collection/utils/property-checkers/index.js +4 -4
- package/dist/components/check-non-empty.js +2 -2
- package/dist/components/check-non-empty.js.map +1 -1
- package/dist/components/check-one-of.js.map +1 -1
- package/dist/components/constants.js +5 -0
- package/dist/components/constants.js.map +1 -0
- package/dist/components/fade.js +4 -4
- package/dist/components/fade.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +36 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion.d.ts +11 -0
- package/dist/components/post-accordion.js +108 -0
- package/dist/components/post-accordion.js.map +1 -0
- package/dist/components/post-alert.js +9 -3
- package/dist/components/post-alert.js.map +1 -1
- package/dist/components/post-collapsible.js +51 -84
- package/dist/components/post-collapsible.js.map +1 -1
- package/dist/components/post-icon2.js +11 -21
- package/dist/components/post-icon2.js.map +1 -1
- package/dist/components/post-tab-header.js +3 -1
- package/dist/components/post-tab-header.js.map +1 -1
- package/dist/components/post-tab-panel.js.map +1 -1
- package/dist/components/post-tabs.js.map +1 -1
- package/dist/components/post-tooltip.js +2 -0
- package/dist/components/post-tooltip.js.map +1 -1
- package/dist/docs.d.ts +334 -235
- package/dist/docs.json +458 -14
- package/dist/esm/check-non-empty-09c39561.js +11 -0
- package/dist/esm/check-non-empty-09c39561.js.map +1 -0
- package/dist/esm/{check-one-of-ded5e15e.js → check-one-of-74750af9.js} +1 -1
- package/dist/esm/check-one-of-74750af9.js.map +1 -0
- package/dist/esm/constants-8d548297.js +5 -0
- package/dist/esm/constants-8d548297.js.map +1 -0
- package/dist/esm/fade-7fd71785.js +9 -0
- package/dist/esm/fade-7fd71785.js.map +1 -0
- package/dist/esm/index-35921354.js +36 -0
- package/dist/esm/index-35921354.js.map +1 -0
- package/dist/esm/{index-5611074b.js → index-4eff5fc5.js} +245 -41
- package/dist/esm/index-4eff5fc5.js.map +1 -0
- package/dist/esm/loader.js +4 -13
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/package-f3f12016.js +5 -0
- package/dist/esm/package-f3f12016.js.map +1 -0
- package/dist/esm/post-accordion.entry.js +85 -0
- package/dist/esm/post-accordion.entry.js.map +1 -0
- package/dist/esm/post-alert.entry.js +8 -8
- package/dist/esm/post-alert.entry.js.map +1 -1
- package/dist/esm/post-collapsible.entry.js +49 -80
- package/dist/esm/post-collapsible.entry.js.map +1 -1
- package/dist/esm/post-components.js +4 -7
- package/dist/esm/post-components.js.map +1 -1
- package/dist/esm/post-icon.entry.js +6 -6
- package/dist/esm/post-icon.entry.js.map +1 -1
- package/dist/esm/post-tab-header.entry.js +5 -4
- package/dist/esm/post-tab-header.entry.js.map +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/post-tab-panel.entry.js.map +1 -1
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tabs.entry.js.map +1 -1
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/esm/post-tooltip.entry.js.map +1 -1
- package/dist/post-components/p-08d942a0.entry.js +2 -0
- package/dist/post-components/p-08d942a0.entry.js.map +1 -0
- package/dist/post-components/{p-7240ae7b.entry.js → p-10c47e0a.entry.js} +2 -2
- package/dist/post-components/p-10c47e0a.entry.js.map +1 -0
- package/dist/post-components/{p-bcc705f1.js → p-1339f8cd.js} +1 -1
- package/dist/post-components/p-1339f8cd.js.map +1 -0
- package/dist/post-components/{p-e5306504.js → p-2737eaf5.js} +1 -1
- package/dist/post-components/p-2737eaf5.js.map +1 -0
- package/dist/post-components/{p-123bb6fb.entry.js → p-2755ba2e.entry.js} +2 -2
- package/dist/post-components/p-2755ba2e.entry.js.map +1 -0
- package/dist/post-components/p-440193f4.js +2 -0
- package/dist/post-components/p-440193f4.js.map +1 -0
- package/dist/post-components/p-4aae941f.js +2 -0
- package/dist/post-components/p-6a0a1ce4.entry.js +2 -0
- package/dist/post-components/p-6a0a1ce4.entry.js.map +1 -0
- package/dist/post-components/p-7d91397a.entry.js +2 -0
- package/dist/post-components/p-7d91397a.entry.js.map +1 -0
- package/dist/post-components/p-871ade93.entry.js +2 -0
- package/dist/post-components/p-871ade93.entry.js.map +1 -0
- package/dist/post-components/p-a18e1d1c.entry.js +2 -0
- package/dist/post-components/p-a18e1d1c.entry.js.map +1 -0
- package/dist/post-components/p-a7649277.js +3 -0
- package/dist/post-components/p-a7649277.js.map +1 -0
- package/dist/post-components/{p-8c386036.entry.js → p-b4b7e30c.entry.js} +2 -2
- package/dist/post-components/p-b4b7e30c.entry.js.map +1 -0
- package/dist/post-components/p-b531475e.js +2 -0
- package/dist/post-components/p-b531475e.js.map +1 -0
- package/dist/post-components/p-dfe29f7f.js +2 -0
- package/dist/post-components/p-dfe29f7f.js.map +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/post-components/post-components.esm.js.map +1 -1
- package/dist/types/animations/collapse.d.ts +2 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +28 -0
- package/dist/types/components/post-alert/post-alert.d.ts +1 -1
- package/dist/types/components/post-collapsible/heading-levels.d.ts +2 -0
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +16 -12
- package/dist/types/components.d.ts +79 -3
- package/dist/types/stencil-public-runtime.d.ts +38 -5
- package/dist/types/utils/index.d.ts +1 -3
- package/dist/types/utils/is-motion-reduced.d.ts +1 -0
- package/loader/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cjs/check-non-empty-35b4d0b5.js +0 -14
- package/dist/cjs/check-non-empty-35b4d0b5.js.map +0 -1
- package/dist/cjs/check-one-of-4c2e8b2e.js.map +0 -1
- package/dist/cjs/check-type-508a21a5.js +0 -18
- package/dist/cjs/check-type-508a21a5.js.map +0 -1
- package/dist/cjs/fade-8c6d4fa7.js +0 -12
- package/dist/cjs/fade-8c6d4fa7.js.map +0 -1
- package/dist/cjs/index-12cc37c9.js.map +0 -1
- package/dist/cjs/index-f8f6f146.js +0 -28
- package/dist/cjs/index-f8f6f146.js.map +0 -1
- package/dist/cjs/package-112e1698.js +0 -7
- package/dist/cjs/package-112e1698.js.map +0 -1
- package/dist/collection/utils/get-element-height.js +0 -12
- package/dist/collection/utils/get-element-height.js.map +0 -1
- package/dist/collection/utils/on-transition-end.js +0 -15
- package/dist/collection/utils/on-transition-end.js.map +0 -1
- package/dist/collection/utils/should-reduce-motion.js +0 -4
- package/dist/collection/utils/should-reduce-motion.js.map +0 -1
- package/dist/components/check-type.js +0 -16
- package/dist/components/check-type.js.map +0 -1
- package/dist/esm/check-non-empty-554bdf88.js +0 -11
- package/dist/esm/check-non-empty-554bdf88.js.map +0 -1
- package/dist/esm/check-one-of-ded5e15e.js.map +0 -1
- package/dist/esm/check-type-18ebb4e7.js +0 -16
- package/dist/esm/check-type-18ebb4e7.js.map +0 -1
- package/dist/esm/fade-671f1489.js +0 -9
- package/dist/esm/fade-671f1489.js.map +0 -1
- package/dist/esm/index-5611074b.js.map +0 -1
- package/dist/esm/index-7f723686.js +0 -24
- package/dist/esm/index-7f723686.js.map +0 -1
- package/dist/esm/package-331628f1.js +0 -5
- package/dist/esm/package-331628f1.js.map +0 -1
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/post-components/p-0d37fe44.entry.js +0 -2
- package/dist/post-components/p-0d37fe44.entry.js.map +0 -1
- package/dist/post-components/p-123bb6fb.entry.js.map +0 -1
- package/dist/post-components/p-15fc087f.js +0 -2
- package/dist/post-components/p-15fc087f.js.map +0 -1
- package/dist/post-components/p-65a9d1c2.entry.js +0 -2
- package/dist/post-components/p-65a9d1c2.entry.js.map +0 -1
- package/dist/post-components/p-7240ae7b.entry.js.map +0 -1
- package/dist/post-components/p-75a7b352.js +0 -2
- package/dist/post-components/p-75a7b352.js.map +0 -1
- package/dist/post-components/p-8c386036.entry.js.map +0 -1
- package/dist/post-components/p-97a064da.entry.js +0 -2
- package/dist/post-components/p-97a064da.entry.js.map +0 -1
- package/dist/post-components/p-bcc705f1.js.map +0 -1
- package/dist/post-components/p-c8efe0ae.js +0 -2
- package/dist/post-components/p-c8efe0ae.js.map +0 -1
- package/dist/post-components/p-ccae1c68.entry.js +0 -2
- package/dist/post-components/p-ccae1c68.entry.js.map +0 -1
- package/dist/post-components/p-d94db268.js +0 -3
- package/dist/post-components/p-d94db268.js.map +0 -1
- package/dist/post-components/p-e5306504.js.map +0 -1
- package/dist/post-components/p-eb3ff4dc.js +0 -2
- package/dist/types/utils/get-element-height.d.ts +0 -3
- package/dist/types/utils/on-transition-end.d.ts +0 -1
- package/dist/types/utils/should-reduce-motion.d.ts +0 -1
- /package/dist/post-components/{p-eb3ff4dc.js.map → p-4aae941f.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["checkNonEmpty","value","error","EMPTY_VALUES","some","v","Error"],"sources":["src/utils/property-checkers/check-non-empty.ts"],"sourcesContent":["import { EMPTY_VALUES } from './constants';\n\nexport function checkNonEmpty(value: unknown, error: string) {\n if (EMPTY_VALUES.some(v => v === value)) {\n throw new Error(error);\n }\n}\n"],"mappings":"6CAEgBA,EAAcC,EAAgBC,GAC5C,GAAIC,EAAaC,MAAKC,GAAKA,IAAMJ,IAAQ,CACvC,MAAM,IAAIK,MAAMJ,E,CAEpB,Q"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{E as r}from"./p-440193f4.js";import{c as o}from"./p-1339f8cd.js";function t(o){return(...t)=>{const n=t[0];if(!r.some((r=>r===n)))o(...t)}}function n(r,o,t){if(typeof r!=="string"||!o.test(r))throw new Error(t)}function s(r,o,t){const n=o==="array";const s=Array.isArray(r);if(n||s){if(s!==n)throw new Error(t)}else{if(typeof r!==o)throw new Error(t)}}const f=t(o);const c=t(n);const i=t(s);export{c as a,f as b,s as c,i as d};
|
|
2
|
+
//# sourceMappingURL=p-dfe29f7f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["emptyOr","check","args","value","EMPTY_VALUES","some","v","checkPattern","pattern","errorMessage","test","Error","checkType","type","error","typeIsArray","valueIsArray","Array","isArray","checkEmptyOrOneOf","checkOneOf","checkEmptyOrPattern","checkEmptyOrType"],"sources":["src/utils/property-checkers/empty-or.ts","src/utils/property-checkers/check-pattern.ts","src/utils/property-checkers/check-type.ts","src/utils/property-checkers/index.ts"],"sourcesContent":["import { EMPTY_VALUES } from './constants';\n\nexport function emptyOr<T extends unknown[]>(check: (...args: T) => void) {\n return (...args: T) => {\n const value = args[0];\n if (!EMPTY_VALUES.some(v => v === value)) check(...args);\n };\n}\n","export function checkPattern(value: unknown, pattern: RegExp, errorMessage: string) {\n if (typeof value !== 'string' || !pattern.test(value)) throw new Error(errorMessage);\n}\n","export type PropertyType =\n | 'boolean'\n | 'number'\n | 'string'\n | 'array'\n | 'object'\n | 'function';\n\nexport function checkType(value: unknown, type: PropertyType, error: string) {\n const typeIsArray = type === 'array';\n const valueIsArray = Array.isArray(value);\n\n if (typeIsArray || valueIsArray) {\n if (valueIsArray !== typeIsArray) throw new Error(error);\n } else {\n if (typeof value !== type) throw new Error(error);\n }\n}\n","import { emptyOr } from './empty-or';\nimport { checkOneOf } from './check-one-of';\nimport { checkPattern } from './check-pattern';\nimport { checkType } from './check-type';\n\nexport const checkEmptyOrOneOf = emptyOr(checkOneOf);\nexport const checkEmptyOrPattern = emptyOr(checkPattern);\nexport const checkEmptyOrType = emptyOr(checkType);\n\nexport * from './check-non-empty';\nexport * from './check-one-of';\nexport * from './check-pattern';\nexport * from './check-type';\n"],"mappings":"iFAEgBA,EAA6BC,GAC3C,MAAO,IAAIC,KACT,MAAMC,EAAQD,EAAK,GACnB,IAAKE,EAAaC,MAAKC,GAAKA,IAAMH,IAAQF,KAASC,EAAK,CAE5D,C,SCPgBK,EAAaJ,EAAgBK,EAAiBC,GAC5D,UAAWN,IAAU,WAAaK,EAAQE,KAAKP,GAAQ,MAAM,IAAIQ,MAAMF,EACzE,C,SCMgBG,EAAUT,EAAgBU,EAAoBC,GAC5D,MAAMC,EAAcF,IAAS,QAC7B,MAAMG,EAAeC,MAAMC,QAAQf,GAEnC,GAAIY,GAAeC,EAAc,CAC/B,GAAIA,IAAiBD,EAAa,MAAM,IAAIJ,MAAMG,E,KAC7C,CACL,UAAWX,IAAUU,EAAM,MAAM,IAAIF,MAAMG,E,CAE/C,C,MCZaK,EAAoBnB,EAAQoB,G,MAC5BC,EAAsBrB,EAAQO,G,MAC9Be,EAAmBtB,EAAQY,U"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as a,b as e}from"./p-a7649277.js";export{s as setNonce}from"./p-a7649277.js";const l=()=>{const e=import.meta.url;const l={};if(e!==""){l.resourcesUrl=new URL(".",e).href}return a(l)};l().then((a=>e([["p-10c47e0a",[[1,"post-alert",{dismissible:[4],dismissLabel:[1,"dismiss-label"],fixed:[4],icon:[1],type:[1],alertId:[32],classes:[32],hasActions:[32],hasHeading:[32],onDismissButtonClick:[32],dismiss:[64]},null,{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}]]],["p-6a0a1ce4",[[1,"post-accordion",{multiple:[4],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"collapseChange","collapseChangeHandler"]]]]],["p-08d942a0",[[1,"post-collapsible",{collapsed:[4],headingLevel:[2,"heading-level"],id:[32],isOpen:[32],hasHeader:[32],headingTag:[32],toggle:[64]},null,{collapsed:["validateCollapsed"],headingLevel:["validateHeadingLevel"]}]]],["p-871ade93",[[1,"post-tab-header",{panel:[1],tabId:[32]},null,{panel:["validateFor"]}]]],["p-7d91397a",[[1,"post-tab-panel",{name:[1],panelId:[32]}]]],["p-2755ba2e",[[1,"post-tabs",{activePanel:[1,"active-panel"],show:[64]}]]],["p-b4b7e30c",[[1,"post-tooltip",{backgroundColor:[1,"background-color"],placement:[1],tooltipClasses:[32],show:[64],hide:[64],toggle:[64]},null,{backgroundColor:["validateBackgroundColor"]}]]],["p-a18e1d1c",[[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[1],rotate:[2],scale:[2],svgStyles:[32],svgOutput:[32]},null,{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}]]]],a)));
|
|
2
2
|
//# sourceMappingURL=post-components.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","dismissible","dismissLabel","fixed","icon","type","alertId","classes","hasActions","hasHeading","onDismissButtonClick","dismiss","
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","dismissible","dismissLabel","fixed","icon","type","alertId","classes","hasActions","hasHeading","onDismissButtonClick","dismiss","multiple","toggle","expandAll","collapseAll","collapsed","headingLevel","id","isOpen","hasHeader","headingTag","panel","tabId","name","panelId","activePanel","show","backgroundColor","placement","tooltipClasses","hide","animation","base","flipH","flipV","rotate","scale","svgStyles","svgOutput"],"sources":["../../node_modules/.pnpm/@stencil+core@4.6.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.6.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,GAEXC,EAAc,gCAA8B,CAAAC,YAAS,IAAAC,aAAA,oBAAAC,MAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,QAAA,KAAAC,QAAA,KAAAC,WAAA,KAAAC,WAAA,KAAAC,qBAAA,KAAAC,QAAA,YAAAV,YAAA,wBAAAC,aAAA,yBAAAC,MAAA,kBAAAC,KAAA,iBAAAC,KAAA,yDAAAO,SAAA,IAAAC,OAAA,KAAAC,UAAA,KAAAC,YAAA,8FAAAC,UAAA,IAAAC,aAAA,oBAAAC,GAAA,KAAAC,OAAA,KAAAC,UAAA,KAAAC,WAAA,KAAAR,OAAA,YAAAG,UAAA,sBAAAC,aAAA,kEAAAK,MAAA,IAAAC,MAAA,YAAAD,MAAA,wDAAAE,KAAA,IAAAC,QAAA,wCAAAC,YAAA,mBAAAC,KAAA,2CAAAC,gBAAA,uBAAAC,UAAA,IAAAC,eAAA,KAAAH,KAAA,KAAAI,KAAA,KAAAlB,OAAA,YAAAe,gBAAA,+DAAAI,UAAA,IAAAC,KAAA,IAAAC,MAAA,aAAAC,MAAA,aAAAX,KAAA,IAAAY,OAAA,IAAAC,MAAA,IAAAC,UAAA,KAAAC,UAAA,YAAAP,UAAA,sBAAAC,KAAA,iBAAAC,MAAA,kBAAAC,MAAA,kBAAAX,KAAA,iBAAAY,OAAA,mBAAAC,MAAA,uBAAAtC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare class PostAccordion {
|
|
2
|
+
private collapsibles;
|
|
3
|
+
private expandedCollapsibles;
|
|
4
|
+
host: HTMLPostAccordionElement;
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, multiple `post-collapsible` can be open at the same time.
|
|
7
|
+
*/
|
|
8
|
+
readonly multiple: boolean;
|
|
9
|
+
componentWillLoad(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Toggles the `post-collapsible` children with the given id.
|
|
12
|
+
*/
|
|
13
|
+
toggle(id: string): Promise<void>;
|
|
14
|
+
collapseChangeHandler(event: CustomEvent): void;
|
|
15
|
+
/**
|
|
16
|
+
* Expands all `post-collapsible` children.
|
|
17
|
+
*
|
|
18
|
+
* If `close-others` is `true` and all items are closed, it will open the first one.
|
|
19
|
+
* Otherwise, it will keep the opened one.
|
|
20
|
+
*/
|
|
21
|
+
expandAll(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Collapses all `post-collapsible` children.
|
|
24
|
+
*/
|
|
25
|
+
collapseAll(): Promise<void>;
|
|
26
|
+
private registerCollapsibles;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|
|
@@ -33,7 +33,7 @@ export declare class PostAlert {
|
|
|
33
33
|
* The type of the alert.
|
|
34
34
|
*/
|
|
35
35
|
readonly type: AlertType;
|
|
36
|
-
validateType(type?: "
|
|
36
|
+
validateType(type?: "primary" | "success" | "danger" | "warning" | "info" | "gray"): void;
|
|
37
37
|
/**
|
|
38
38
|
* An event emitted when the alert element is dismissed, after the transition.
|
|
39
39
|
* It has no payload and only relevant for dismissible alerts.
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { HeadingLevel } from './heading-levels';
|
|
1
3
|
export declare class PostCollapsible {
|
|
2
|
-
private collapsibleElement;
|
|
3
4
|
private isLoaded;
|
|
5
|
+
private collapsible;
|
|
4
6
|
host: HTMLPostCollapsibleElement;
|
|
5
|
-
|
|
6
|
-
collapseHeight: string | null;
|
|
7
|
-
collapsibleId: string;
|
|
8
|
-
hasHeader: boolean;
|
|
9
|
-
headingTag: string | undefined;
|
|
7
|
+
id: string;
|
|
10
8
|
isOpen: boolean;
|
|
11
|
-
|
|
9
|
+
hasHeader: boolean;
|
|
10
|
+
headingTag: string;
|
|
12
11
|
/**
|
|
13
12
|
* If `true`, the element is initially collapsed otherwise it is displayed.
|
|
14
13
|
*/
|
|
@@ -17,15 +16,20 @@ export declare class PostCollapsible {
|
|
|
17
16
|
/**
|
|
18
17
|
* Defines the hierarchical level of the collapsible header within the headings structure.
|
|
19
18
|
*/
|
|
20
|
-
readonly headingLevel?:
|
|
21
|
-
validateHeadingLevel(newValue?:
|
|
22
|
-
|
|
19
|
+
readonly headingLevel?: HeadingLevel;
|
|
20
|
+
validateHeadingLevel(newValue?: 6 | 1 | 2 | 3 | 4 | 5): void;
|
|
21
|
+
/**
|
|
22
|
+
* An event emitted when the collapse element is shown or hidden, before the transition. It has no payload.
|
|
23
|
+
*/
|
|
24
|
+
collapseChange: EventEmitter<void>;
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
componentWillRender(): void;
|
|
23
27
|
componentDidLoad(): void;
|
|
24
28
|
/**
|
|
25
29
|
* Triggers the collapse programmatically.
|
|
30
|
+
*
|
|
31
|
+
* If there is a collapsing transition running already, it will be reversed.
|
|
26
32
|
*/
|
|
27
33
|
toggle(open?: boolean): Promise<boolean>;
|
|
28
|
-
private startTransition;
|
|
29
|
-
private getCollapseClasses;
|
|
30
34
|
render(): any;
|
|
31
35
|
}
|
|
@@ -6,12 +6,32 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { AlertType } from "./components/post-alert/alert-types";
|
|
9
|
+
import { HeadingLevel } from "./components/post-collapsible/heading-levels";
|
|
9
10
|
import { BackgroundColor } from "./components/post-tooltip/types";
|
|
10
11
|
import { Placement } from "@floating-ui/dom";
|
|
11
12
|
export { AlertType } from "./components/post-alert/alert-types";
|
|
13
|
+
export { HeadingLevel } from "./components/post-collapsible/heading-levels";
|
|
12
14
|
export { BackgroundColor } from "./components/post-tooltip/types";
|
|
13
15
|
export { Placement } from "@floating-ui/dom";
|
|
14
16
|
export namespace Components {
|
|
17
|
+
interface PostAccordion {
|
|
18
|
+
/**
|
|
19
|
+
* Collapses all `post-collapsible` children.
|
|
20
|
+
*/
|
|
21
|
+
"collapseAll": () => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Expands all `post-collapsible` children. If `close-others` is `true` and all items are closed, it will open the first one. Otherwise, it will keep the opened one.
|
|
24
|
+
*/
|
|
25
|
+
"expandAll": () => Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* If `true`, multiple `post-collapsible` can be open at the same time.
|
|
28
|
+
*/
|
|
29
|
+
"multiple": boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Toggles the `post-collapsible` children with the given id.
|
|
32
|
+
*/
|
|
33
|
+
"toggle": (id: string) => Promise<void>;
|
|
34
|
+
}
|
|
15
35
|
interface PostAlert {
|
|
16
36
|
/**
|
|
17
37
|
* Triggers alert dismissal programmatically (same as clicking on the close button (×)).
|
|
@@ -46,9 +66,9 @@ export namespace Components {
|
|
|
46
66
|
/**
|
|
47
67
|
* Defines the hierarchical level of the collapsible header within the headings structure.
|
|
48
68
|
*/
|
|
49
|
-
"headingLevel"?:
|
|
69
|
+
"headingLevel"?: HeadingLevel;
|
|
50
70
|
/**
|
|
51
|
-
* Triggers the collapse programmatically.
|
|
71
|
+
* Triggers the collapse programmatically. If there is a collapsing transition running already, it will be reversed.
|
|
52
72
|
*/
|
|
53
73
|
"toggle": (open?: boolean) => Promise<boolean>;
|
|
54
74
|
}
|
|
@@ -137,18 +157,50 @@ export interface PostAlertCustomEvent<T> extends CustomEvent<T> {
|
|
|
137
157
|
detail: T;
|
|
138
158
|
target: HTMLPostAlertElement;
|
|
139
159
|
}
|
|
160
|
+
export interface PostCollapsibleCustomEvent<T> extends CustomEvent<T> {
|
|
161
|
+
detail: T;
|
|
162
|
+
target: HTMLPostCollapsibleElement;
|
|
163
|
+
}
|
|
140
164
|
export interface PostTabsCustomEvent<T> extends CustomEvent<T> {
|
|
141
165
|
detail: T;
|
|
142
166
|
target: HTMLPostTabsElement;
|
|
143
167
|
}
|
|
144
168
|
declare global {
|
|
169
|
+
interface HTMLPostAccordionElement extends Components.PostAccordion, HTMLStencilElement {
|
|
170
|
+
}
|
|
171
|
+
var HTMLPostAccordionElement: {
|
|
172
|
+
prototype: HTMLPostAccordionElement;
|
|
173
|
+
new (): HTMLPostAccordionElement;
|
|
174
|
+
};
|
|
175
|
+
interface HTMLPostAlertElementEventMap {
|
|
176
|
+
"dismissed": void;
|
|
177
|
+
}
|
|
145
178
|
interface HTMLPostAlertElement extends Components.PostAlert, HTMLStencilElement {
|
|
179
|
+
addEventListener<K extends keyof HTMLPostAlertElementEventMap>(type: K, listener: (this: HTMLPostAlertElement, ev: PostAlertCustomEvent<HTMLPostAlertElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
180
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
181
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
182
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
183
|
+
removeEventListener<K extends keyof HTMLPostAlertElementEventMap>(type: K, listener: (this: HTMLPostAlertElement, ev: PostAlertCustomEvent<HTMLPostAlertElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
184
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
185
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
186
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
146
187
|
}
|
|
147
188
|
var HTMLPostAlertElement: {
|
|
148
189
|
prototype: HTMLPostAlertElement;
|
|
149
190
|
new (): HTMLPostAlertElement;
|
|
150
191
|
};
|
|
192
|
+
interface HTMLPostCollapsibleElementEventMap {
|
|
193
|
+
"collapseChange": void;
|
|
194
|
+
}
|
|
151
195
|
interface HTMLPostCollapsibleElement extends Components.PostCollapsible, HTMLStencilElement {
|
|
196
|
+
addEventListener<K extends keyof HTMLPostCollapsibleElementEventMap>(type: K, listener: (this: HTMLPostCollapsibleElement, ev: PostCollapsibleCustomEvent<HTMLPostCollapsibleElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
197
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
198
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
199
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
200
|
+
removeEventListener<K extends keyof HTMLPostCollapsibleElementEventMap>(type: K, listener: (this: HTMLPostCollapsibleElement, ev: PostCollapsibleCustomEvent<HTMLPostCollapsibleElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
201
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
202
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
203
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
152
204
|
}
|
|
153
205
|
var HTMLPostCollapsibleElement: {
|
|
154
206
|
prototype: HTMLPostCollapsibleElement;
|
|
@@ -175,7 +227,18 @@ declare global {
|
|
|
175
227
|
prototype: HTMLPostTabPanelElement;
|
|
176
228
|
new (): HTMLPostTabPanelElement;
|
|
177
229
|
};
|
|
230
|
+
interface HTMLPostTabsElementEventMap {
|
|
231
|
+
"tabChange": HTMLPostTabPanelElement['name'];
|
|
232
|
+
}
|
|
178
233
|
interface HTMLPostTabsElement extends Components.PostTabs, HTMLStencilElement {
|
|
234
|
+
addEventListener<K extends keyof HTMLPostTabsElementEventMap>(type: K, listener: (this: HTMLPostTabsElement, ev: PostTabsCustomEvent<HTMLPostTabsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
235
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
236
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
237
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
238
|
+
removeEventListener<K extends keyof HTMLPostTabsElementEventMap>(type: K, listener: (this: HTMLPostTabsElement, ev: PostTabsCustomEvent<HTMLPostTabsElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
239
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
240
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
241
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
179
242
|
}
|
|
180
243
|
var HTMLPostTabsElement: {
|
|
181
244
|
prototype: HTMLPostTabsElement;
|
|
@@ -188,6 +251,7 @@ declare global {
|
|
|
188
251
|
new (): HTMLPostTooltipElement;
|
|
189
252
|
};
|
|
190
253
|
interface HTMLElementTagNameMap {
|
|
254
|
+
"post-accordion": HTMLPostAccordionElement;
|
|
191
255
|
"post-alert": HTMLPostAlertElement;
|
|
192
256
|
"post-collapsible": HTMLPostCollapsibleElement;
|
|
193
257
|
"post-icon": HTMLPostIconElement;
|
|
@@ -198,6 +262,12 @@ declare global {
|
|
|
198
262
|
}
|
|
199
263
|
}
|
|
200
264
|
declare namespace LocalJSX {
|
|
265
|
+
interface PostAccordion {
|
|
266
|
+
/**
|
|
267
|
+
* If `true`, multiple `post-collapsible` can be open at the same time.
|
|
268
|
+
*/
|
|
269
|
+
"multiple"?: boolean;
|
|
270
|
+
}
|
|
201
271
|
interface PostAlert {
|
|
202
272
|
/**
|
|
203
273
|
* The label to use for the close button of a dismissible alert.
|
|
@@ -232,7 +302,11 @@ declare namespace LocalJSX {
|
|
|
232
302
|
/**
|
|
233
303
|
* Defines the hierarchical level of the collapsible header within the headings structure.
|
|
234
304
|
*/
|
|
235
|
-
"headingLevel"?:
|
|
305
|
+
"headingLevel"?: HeadingLevel;
|
|
306
|
+
/**
|
|
307
|
+
* An event emitted when the collapse element is shown or hidden, before the transition. It has no payload.
|
|
308
|
+
*/
|
|
309
|
+
"onCollapseChange"?: (event: PostCollapsibleCustomEvent<void>) => void;
|
|
236
310
|
}
|
|
237
311
|
/**
|
|
238
312
|
* @class PostIcon - representing a stencil component
|
|
@@ -300,6 +374,7 @@ declare namespace LocalJSX {
|
|
|
300
374
|
"placement"?: Placement;
|
|
301
375
|
}
|
|
302
376
|
interface IntrinsicElements {
|
|
377
|
+
"post-accordion": PostAccordion;
|
|
303
378
|
"post-alert": PostAlert;
|
|
304
379
|
"post-collapsible": PostCollapsible;
|
|
305
380
|
"post-icon": PostIcon;
|
|
@@ -313,6 +388,7 @@ export { LocalJSX as JSX };
|
|
|
313
388
|
declare module "@stencil/core" {
|
|
314
389
|
export namespace JSX {
|
|
315
390
|
interface IntrinsicElements {
|
|
391
|
+
"post-accordion": LocalJSX.PostAccordion & JSXBase.HTMLAttributes<HTMLPostAccordionElement>;
|
|
316
392
|
"post-alert": LocalJSX.PostAlert & JSXBase.HTMLAttributes<HTMLPostAlertElement>;
|
|
317
393
|
"post-collapsible": LocalJSX.PostCollapsible & JSXBase.HTMLAttributes<HTMLPostCollapsibleElement>;
|
|
318
394
|
/**
|
|
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
|
|
|
3
3
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
4
|
}
|
|
5
5
|
export interface ComponentOptions {
|
|
6
|
+
/**
|
|
7
|
+
* When set to `true` this component will be form-associated. See
|
|
8
|
+
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
9
|
+
* build form-associated Stencil components that integrate into forms like
|
|
10
|
+
* native browser elements such as `<input>` and `<textarea>`.
|
|
11
|
+
*
|
|
12
|
+
* The {@link AttachInternals} decorator allows for access to the
|
|
13
|
+
* `ElementInternals` object to modify the associated form.
|
|
14
|
+
*/
|
|
15
|
+
formAssociated?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
8
18
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -62,7 +72,7 @@ export interface PropOptions {
|
|
|
62
72
|
/**
|
|
63
73
|
* The name of the associated DOM attribute.
|
|
64
74
|
* Stencil uses different heuristics to determine the default name of the attribute,
|
|
65
|
-
* but using this property, you can override the default
|
|
75
|
+
* but using this property, you can override the default behavior.
|
|
66
76
|
*/
|
|
67
77
|
attribute?: string | null;
|
|
68
78
|
/**
|
|
@@ -107,6 +117,9 @@ export interface EventOptions {
|
|
|
107
117
|
*/
|
|
108
118
|
composed?: boolean;
|
|
109
119
|
}
|
|
120
|
+
export interface AttachInternalsDecorator {
|
|
121
|
+
(): PropertyDecorator;
|
|
122
|
+
}
|
|
110
123
|
export interface ListenDecorator {
|
|
111
124
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
112
125
|
}
|
|
@@ -128,7 +141,7 @@ export interface ListenOptions {
|
|
|
128
141
|
* By default, Stencil uses several heuristics to determine if
|
|
129
142
|
* it must attach a `passive` event listener or not.
|
|
130
143
|
*
|
|
131
|
-
* Using the `passive` option can be used to change the default
|
|
144
|
+
* Using the `passive` option can be used to change the default behavior.
|
|
132
145
|
* Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information.
|
|
133
146
|
*/
|
|
134
147
|
passive?: boolean;
|
|
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
|
|
|
175
188
|
* https://stenciljs.com/docs/events
|
|
176
189
|
*/
|
|
177
190
|
export declare const Event: EventDecorator;
|
|
191
|
+
/**
|
|
192
|
+
* If the `formAssociated` option is set in options passed to the
|
|
193
|
+
* `@Component()` decorator then this decorator may be used to get access to the
|
|
194
|
+
* `ElementInternals` instance associated with the component.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AttachInternals: AttachInternalsDecorator;
|
|
178
197
|
/**
|
|
179
198
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
180
199
|
* dispatched from `@Events()`.
|
|
@@ -432,7 +451,7 @@ export interface QueueApi {
|
|
|
432
451
|
/**
|
|
433
452
|
* Host
|
|
434
453
|
*/
|
|
435
|
-
interface HostAttributes {
|
|
454
|
+
export interface HostAttributes {
|
|
436
455
|
class?: string | {
|
|
437
456
|
[className: string]: boolean;
|
|
438
457
|
};
|
|
@@ -471,7 +490,7 @@ export interface FunctionalUtilities {
|
|
|
471
490
|
/**
|
|
472
491
|
* Utility for reading the children of a functional component at runtime.
|
|
473
492
|
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
-
* not
|
|
493
|
+
* not recommended to read the children directly, and is preferable to use
|
|
475
494
|
* this utility to, for instance, perform a side effect for each child.
|
|
476
495
|
*/
|
|
477
496
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
@@ -872,6 +891,8 @@ export declare namespace JSXBase {
|
|
|
872
891
|
}
|
|
873
892
|
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
874
893
|
alt?: string;
|
|
894
|
+
crossOrigin?: string;
|
|
895
|
+
crossorigin?: string;
|
|
875
896
|
decoding?: 'async' | 'auto' | 'sync';
|
|
876
897
|
importance?: 'low' | 'auto' | 'high';
|
|
877
898
|
height?: number | string;
|
|
@@ -930,6 +951,8 @@ export declare namespace JSXBase {
|
|
|
930
951
|
minlength?: number | string;
|
|
931
952
|
multiple?: boolean;
|
|
932
953
|
name?: string;
|
|
954
|
+
onSelect?: (event: Event) => void;
|
|
955
|
+
onselect?: (event: Event) => void;
|
|
933
956
|
pattern?: string;
|
|
934
957
|
placeholder?: string;
|
|
935
958
|
readOnly?: boolean;
|
|
@@ -1111,11 +1134,13 @@ export declare namespace JSXBase {
|
|
|
1111
1134
|
autocomplete?: string;
|
|
1112
1135
|
}
|
|
1113
1136
|
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1137
|
+
height?: number;
|
|
1114
1138
|
media?: string;
|
|
1115
1139
|
sizes?: string;
|
|
1116
1140
|
src?: string;
|
|
1117
1141
|
srcSet?: string;
|
|
1118
1142
|
type?: string;
|
|
1143
|
+
width?: number;
|
|
1119
1144
|
}
|
|
1120
1145
|
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1121
1146
|
media?: string;
|
|
@@ -1143,6 +1168,8 @@ export declare namespace JSXBase {
|
|
|
1143
1168
|
minLength?: number;
|
|
1144
1169
|
minlength?: number | string;
|
|
1145
1170
|
name?: string;
|
|
1171
|
+
onSelect?: (event: Event) => void;
|
|
1172
|
+
onselect?: (event: Event) => void;
|
|
1146
1173
|
placeholder?: string;
|
|
1147
1174
|
readOnly?: boolean;
|
|
1148
1175
|
readonly?: boolean | string;
|
|
@@ -1289,7 +1316,7 @@ export declare namespace JSXBase {
|
|
|
1289
1316
|
clipPathUnits?: number | string;
|
|
1290
1317
|
'clip-rule'?: number | string;
|
|
1291
1318
|
'color-interpolation'?: number | string;
|
|
1292
|
-
'color-interpolation-filters'?: 'auto' | '
|
|
1319
|
+
'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB';
|
|
1293
1320
|
'color-profile'?: number | string;
|
|
1294
1321
|
'color-rendering'?: number | string;
|
|
1295
1322
|
contentScriptType?: number | string;
|
|
@@ -1619,8 +1646,14 @@ export declare namespace JSXBase {
|
|
|
1619
1646
|
onAnimationEndCapture?: (event: AnimationEvent) => void;
|
|
1620
1647
|
onAnimationIteration?: (event: AnimationEvent) => void;
|
|
1621
1648
|
onAnimationIterationCapture?: (event: AnimationEvent) => void;
|
|
1649
|
+
onTransitionCancel?: (event: TransitionEvent) => void;
|
|
1650
|
+
onTransitionCancelCapture?: (event: TransitionEvent) => void;
|
|
1622
1651
|
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
1623
1652
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
1653
|
+
onTransitionRun?: (event: TransitionEvent) => void;
|
|
1654
|
+
onTransitionRunCapture?: (event: TransitionEvent) => void;
|
|
1655
|
+
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1656
|
+
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1624
1657
|
}
|
|
1625
1658
|
}
|
|
1626
1659
|
export interface JSXAttributes<T = Element> {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isMotionReduced(): boolean;
|
package/loader/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface CustomElementsDefineOptions {
|
|
|
8
8
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
9
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions):
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
12
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
13
|
|
|
14
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "loader/index.cjs.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/dom": "1.5.1",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.2.2",
|
|
29
|
-
"@stencil/core": "
|
|
30
|
-
"@swisspost/design-system-styles": "6.4.
|
|
29
|
+
"@stencil/core": "4.6.0",
|
|
30
|
+
"@swisspost/design-system-styles": "6.4.3",
|
|
31
31
|
"ally.js": "1.4.1",
|
|
32
32
|
"long-press-event": "2.4.6"
|
|
33
33
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@percy/cypress": "3.1.2",
|
|
37
37
|
"@stencil-community/eslint-plugin": "0.5.0",
|
|
38
38
|
"@stencil/react-output-target": "0.5.3",
|
|
39
|
-
"@stencil/sass": "3.0.
|
|
39
|
+
"@stencil/sass": "3.0.7",
|
|
40
40
|
"@types/jest": "27.5.2",
|
|
41
41
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
42
42
|
"@typescript-eslint/parser": "5.62.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "4.9.5"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
|
-
"dev": "stencil build --serve --watch --docs-readme",
|
|
56
|
+
"dev": "stencil build --serve --port 9200 --watch --docs-readme",
|
|
57
57
|
"start": "stencil build --watch --docs-readme",
|
|
58
58
|
"build": "stencil build --docs-readme",
|
|
59
59
|
"clean": "rimraf www dist loader",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const EMPTY_VALUES = [undefined, null, ''];
|
|
4
|
-
|
|
5
|
-
function checkNonEmpty(value, error) {
|
|
6
|
-
if (EMPTY_VALUES.some(v => v === value)) {
|
|
7
|
-
throw new Error(error);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
exports.EMPTY_VALUES = EMPTY_VALUES;
|
|
12
|
-
exports.checkNonEmpty = checkNonEmpty;
|
|
13
|
-
|
|
14
|
-
//# sourceMappingURL=check-non-empty-35b4d0b5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"check-non-empty-35b4d0b5.js","mappings":";;MAAa,YAAY,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;;SCEhC,aAAa,CAAC,KAAc,EAAE,KAAa;EACzD,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE;IACvC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;GACxB;AACH;;;;;","names":[],"sources":["./src/utils/property-checkers/constants.ts","./src/utils/property-checkers/check-non-empty.ts"],"sourcesContent":["export const EMPTY_VALUES = [undefined, null, ''];\n","import { EMPTY_VALUES } from './constants';\n\nexport function checkNonEmpty(value: unknown, error: string) {\n if (EMPTY_VALUES.some(v => v === value)) {\n throw new Error(error);\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"check-one-of-4c2e8b2e.js","mappings":";;SAAgB,UAAU,CAAI,KAAQ,EAAE,cAA4B,EAAE,KAAa;EACjF,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC;IAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AAC9D;;;;","names":[],"sources":["./src/utils/property-checkers/check-one-of.ts"],"sourcesContent":["export function checkOneOf<T>(value: T, possibleValues: readonly T[], error: string) {\n if (!possibleValues.includes(value)) throw new Error(error);\n}\n"],"version":3}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function checkType(value, type, error) {
|
|
4
|
-
const typeIsArray = type === 'array';
|
|
5
|
-
const valueIsArray = Array.isArray(value);
|
|
6
|
-
if (typeIsArray || valueIsArray) {
|
|
7
|
-
if (valueIsArray !== typeIsArray)
|
|
8
|
-
throw new Error(error);
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
if (typeof value !== type)
|
|
12
|
-
throw new Error(error);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
exports.checkType = checkType;
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=check-type-508a21a5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"check-type-508a21a5.js","mappings":";;SAQgB,SAAS,CAAC,KAAc,EAAE,IAAkB,EAAE,KAAa;EACzE,MAAM,WAAW,GAAG,IAAI,KAAK,OAAO,CAAC;EACrC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;EAE1C,IAAI,WAAW,IAAI,YAAY,EAAE;IAC/B,IAAI,YAAY,KAAK,WAAW;MAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;GAC1D;OAAM;IACL,IAAI,OAAO,KAAK,KAAK,IAAI;MAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;GACnD;AACH;;;;","names":[],"sources":["./src/utils/property-checkers/check-type.ts"],"sourcesContent":["export type PropertyType =\n | 'boolean'\n | 'number'\n | 'string'\n | 'array'\n | 'object'\n | 'function';\n\nexport function checkType(value: unknown, type: PropertyType, error: string) {\n const typeIsArray = type === 'array';\n const valueIsArray = Array.isArray(value);\n\n if (typeIsArray || valueIsArray) {\n if (valueIsArray !== typeIsArray) throw new Error(error);\n } else {\n if (typeof value !== type) throw new Error(error);\n }\n}\n"],"version":3}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fadeDuration = 200;
|
|
4
|
-
const fadedOutKeyFrame = { opacity: '0' };
|
|
5
|
-
const fadedInKeyFrame = { opacity: '1' };
|
|
6
|
-
const fadeIn = (el) => el.animate([fadedOutKeyFrame, fadedInKeyFrame], { duration: fadeDuration });
|
|
7
|
-
const fadeOut = (el) => el.animate([fadedInKeyFrame, fadedOutKeyFrame], { duration: fadeDuration });
|
|
8
|
-
|
|
9
|
-
exports.fadeIn = fadeIn;
|
|
10
|
-
exports.fadeOut = fadeOut;
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=fade-8c6d4fa7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"fade-8c6d4fa7.js","mappings":";;AAAA,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,gBAAgB,GAAG,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;AACxC,MAAM,eAAe,GAAG,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;MAE1B,MAAM,GAAG,CAAC,EAAW,KAAgB,EAAE,CAAC,OAAO,CAC1D,CAAE,gBAAgB,EAAE,eAAe,CAAE,EACrC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAC1B;MAEW,OAAO,GAAG,CAAC,EAAW,KAAgB,EAAE,CAAC,OAAO,CAC3D,CAAE,eAAe,EAAE,gBAAgB,CAAE,EACrC,EAAE,QAAQ,EAAE,YAAY,EAAE;;;;;","names":[],"sources":["./src/animations/fade.ts"],"sourcesContent":["const fadeDuration = 200;\nconst fadedOutKeyFrame = {opacity: '0'};\nconst fadedInKeyFrame = {opacity: '1'};\n\nexport const fadeIn = (el: Element): Animation => el.animate(\n [ fadedOutKeyFrame, fadedInKeyFrame ],\n { duration: fadeDuration }\n);\n\nexport const fadeOut = (el: Element): Animation => el.animate(\n [ fadedInKeyFrame, fadedOutKeyFrame ],\n { duration: fadeDuration }\n);\n"],"version":3}
|