@swisspost/design-system-components 9.0.0-next.1 → 9.0.0-next.3
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/{index-c15bd800.js → index-e1f32cce.js} +25 -4
- package/dist/cjs/index.cjs.js +21 -17
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-c7d01968.js → package-ef26e62c.js} +1 -1
- package/dist/cjs/{post-accordion-e29956c4.js → post-accordion-3878bf43.js} +2 -2
- package/dist/cjs/post-accordion-item-0278e6e2.js +52 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/post-alert-5f795d9c.js +98 -0
- package/dist/cjs/post-alert.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar-2bcfc016.js +148 -0
- package/dist/cjs/post-avatar.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-5ffcd201.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/{post-collapsible-trigger-32549d33.js → post-collapsible-trigger-6ae59c64.js} +2 -2
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -3
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/{post-icon-221d976f.js → post-icon-1f71aa0f.js} +4 -4
- package/dist/cjs/post-icon.cjs.entry.js +3 -3
- package/dist/cjs/post-language-option-4a3ecaeb.js +67 -0
- package/dist/cjs/post-language-option.cjs.entry.js +14 -0
- package/dist/cjs/{post-logo-e6cb079f.js → post-logo-7070d727.js} +4 -4
- package/dist/cjs/post-logo.cjs.entry.js +3 -3
- package/dist/cjs/{post-popover-cfc1b31b.js → post-popover-de1b8d95.js} +4 -4
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-popovercontainer-c0b86b11.js → post-popovercontainer-6a25713a.js} +5 -5
- package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-b9b8b6f3.js → post-rating-1d2c59b7.js} +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-877676bf.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-300a0618.js → post-tab-panel-80b1f3ee.js} +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-b06f799b.js → post-tabs-c2d42035.js} +4 -4
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-d7ac3cbb.js → post-tag-5e2c7798.js} +3 -3
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-tooltip-8d7e64f6.js → post-tooltip-9a120b2e.js} +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -3
- package/dist/collection/components/post-alert/post-alert.css +2 -2
- package/dist/collection/components/post-alert/post-alert.js +4 -4
- package/dist/collection/components/post-avatar/post-avatar.css +3 -0
- package/dist/collection/components/post-avatar/post-avatar.js +237 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +1 -1
- package/dist/collection/components/post-icon/post-icon.js +2 -2
- package/dist/collection/components/post-language-option/post-language-option.css +3 -0
- package/dist/collection/components/post-language-option/post-language-option.js +191 -0
- package/dist/collection/components/post-logo/post-logo.js +2 -2
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +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 +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +5 -4
- package/dist/components/post-alert2.js +5 -5
- package/dist/components/post-avatar.d.ts +11 -0
- package/dist/components/post-avatar.js +6 -0
- package/dist/components/post-avatar2.js +173 -0
- package/dist/components/post-card-control2.js +2 -2
- package/dist/components/post-icon2.js +2 -2
- package/dist/components/post-language-option.d.ts +11 -0
- package/dist/components/post-language-option.js +6 -0
- package/dist/components/post-language-option2.js +92 -0
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +3 -3
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +2 -2
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-tooltip2.js +1 -1
- package/dist/docs.json +267 -1
- package/dist/esm/{index-0b56fc28.js → index-e1b64755.js} +25 -4
- package/dist/esm/index.js +19 -17
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-0311770e.js +3 -0
- package/dist/esm/{post-accordion-3a7b3f3c.js → post-accordion-01d49d83.js} +2 -2
- package/dist/esm/post-accordion-item-366f385b.js +50 -0
- package/dist/esm/post-accordion-item.entry.js +3 -3
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/post-alert-5a69f40d.js +96 -0
- package/dist/esm/post-alert.entry.js +3 -3
- package/dist/esm/post-avatar-6f24d1ab.js +146 -0
- package/dist/esm/post-avatar.entry.js +5 -0
- package/dist/esm/post-card-control-2a7939c3.js +270 -0
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/{post-collapsible-trigger-8d7e027b.js → post-collapsible-trigger-654bf2b0.js} +2 -2
- package/dist/esm/post-collapsible_2.entry.js +3 -3
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/{post-icon-d59ad345.js → post-icon-885f17e9.js} +4 -4
- package/dist/esm/post-icon.entry.js +3 -3
- package/dist/esm/post-language-option-0c2818aa.js +65 -0
- package/dist/esm/post-language-option.entry.js +6 -0
- package/dist/esm/{post-logo-a1487634.js → post-logo-dd425f2e.js} +4 -4
- package/dist/esm/post-logo.entry.js +3 -3
- package/dist/esm/{post-popover-972c5ea7.js → post-popover-7d44a85c.js} +4 -4
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-popovercontainer-2485b7d9.js → post-popovercontainer-e6d11d81.js} +5 -5
- package/dist/esm/post-popovercontainer.entry.js +3 -3
- package/dist/esm/{post-rating-cca784ae.js → post-rating-3cd3e97b.js} +3 -3
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-776a991a.js +30 -0
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-633a5e6b.js → post-tab-panel-163e6c99.js} +3 -3
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-74ded897.js → post-tabs-8cb1bce9.js} +4 -4
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-f60a71fd.js → post-tag-deefcc86.js} +3 -3
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-tooltip-0457467f.js → post-tooltip-dc7e1a21.js} +3 -3
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-6d9c46f4.js → p-048538ea.js} +1 -1
- package/dist/post-components/p-0a1f5e13.entry.js +1 -0
- package/dist/post-components/p-0a4318ff.js +1 -0
- package/dist/post-components/{p-01a8fe6a.js → p-0ad93d89.js} +2 -2
- package/dist/post-components/p-0d64ef0c.entry.js +1 -0
- package/dist/post-components/p-1198a5f2.entry.js +1 -0
- package/dist/post-components/{p-f10e2bb1.entry.js → p-13d1bef7.entry.js} +1 -1
- package/dist/post-components/{p-41094063.js → p-16d057a6.js} +1 -1
- package/dist/post-components/p-1a091fca.entry.js +1 -0
- package/dist/post-components/p-1f35b0ba.entry.js +1 -0
- package/dist/post-components/p-246a6d28.js +1 -0
- package/dist/post-components/p-3aa5e1e5.js +1 -0
- package/dist/post-components/{p-2d1f85f4.js → p-3d3795f9.js} +1 -1
- package/dist/post-components/p-3eab790d.js +2 -0
- package/dist/post-components/p-3fabf6e4.entry.js +1 -0
- package/dist/post-components/p-4f0617e6.js +1 -0
- package/dist/post-components/p-53bacbbc.js +1 -0
- package/dist/post-components/p-5c8cb76f.entry.js +1 -0
- package/dist/post-components/p-5eee8d31.entry.js +1 -0
- package/dist/post-components/p-60e72b25.js +1 -0
- package/dist/post-components/{p-51eff367.js → p-66ed33a9.js} +1 -1
- package/dist/post-components/p-681b751d.entry.js +1 -0
- package/dist/post-components/p-6b6a1e82.entry.js +1 -0
- package/dist/post-components/p-752e6a98.entry.js +1 -0
- package/dist/post-components/{p-b68c86a7.js → p-8734876e.js} +1 -1
- package/dist/post-components/p-9ac2a947.js +1 -0
- package/dist/post-components/p-9d211a45.js +1 -0
- package/dist/post-components/p-b38eaabf.js +1 -0
- package/dist/post-components/p-cdfcc758.entry.js +1 -0
- package/dist/post-components/p-d50d4ec1.entry.js +1 -0
- package/dist/post-components/p-d785856c.js +1 -0
- package/dist/post-components/p-e18f3639.js +1 -0
- package/dist/post-components/p-f1b7797f.entry.js +1 -0
- package/dist/post-components/p-f6efc76b.entry.js +1 -0
- package/dist/post-components/{p-a528acc4.js → p-f825d681.js} +1 -1
- package/dist/post-components/p-fff1c2ee.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
- package/dist/types/components/post-alert/post-alert.d.ts +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
- package/dist/types/components/post-icon/post-icon.d.ts +1 -1
- package/dist/types/components/post-language-option/post-language-option.d.ts +40 -0
- package/dist/types/components/post-logo/post-logo.d.ts +1 -1
- package/dist/types/components.d.ts +113 -0
- package/dist/types/index.d.ts +2 -0
- package/loaders/index.d.ts +4 -0
- package/loaders/index.js +2 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +5 -4
- package/loaders/post-alert.js +5 -5
- package/loaders/post-avatar.d.ts +11 -0
- package/loaders/post-avatar.js +176 -0
- package/loaders/post-card-control.js +2 -2
- package/loaders/post-icon2.js +2 -2
- package/loaders/post-language-option.d.ts +11 -0
- package/loaders/post-language-option.js +95 -0
- package/loaders/post-logo.js +2 -2
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +3 -3
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +2 -2
- package/loaders/post-tag.js +1 -1
- package/loaders/post-tooltip.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/post-accordion-item-dc4d1801.js +0 -51
- package/dist/cjs/post-alert-106c34ac.js +0 -98
- package/dist/cjs/post-card-control-69769d1a.js +0 -272
- package/dist/cjs/post-tab-header-43310d08.js +0 -32
- package/dist/esm/package-bc6404e2.js +0 -3
- package/dist/esm/post-accordion-item-55d1e771.js +0 -49
- package/dist/esm/post-alert-6c908130.js +0 -96
- package/dist/esm/post-card-control-9fff6efc.js +0 -270
- package/dist/esm/post-tab-header-dd2cb68e.js +0 -30
- package/dist/post-components/p-0e0c11f9.entry.js +0 -1
- package/dist/post-components/p-124fe6c8.js +0 -1
- package/dist/post-components/p-15c6739e.entry.js +0 -1
- package/dist/post-components/p-2180e02d.entry.js +0 -1
- package/dist/post-components/p-22ec06ae.entry.js +0 -1
- package/dist/post-components/p-26bbd8e5.entry.js +0 -1
- package/dist/post-components/p-2b43665d.js +0 -1
- package/dist/post-components/p-464ce10a.entry.js +0 -1
- package/dist/post-components/p-586f7f53.entry.js +0 -1
- package/dist/post-components/p-65031b20.entry.js +0 -1
- package/dist/post-components/p-6f12f3e5.js +0 -1
- package/dist/post-components/p-718eb560.js +0 -1
- package/dist/post-components/p-78407640.entry.js +0 -1
- package/dist/post-components/p-79a40235.entry.js +0 -1
- package/dist/post-components/p-7ab513fc.js +0 -1
- package/dist/post-components/p-9cba7d2f.js +0 -1
- package/dist/post-components/p-9eb27378.entry.js +0 -1
- package/dist/post-components/p-aa8e43c3.js +0 -1
- package/dist/post-components/p-b8db0e0a.entry.js +0 -1
- package/dist/post-components/p-bcd5843c.entry.js +0 -1
- package/dist/post-components/p-c21b810d.js +0 -1
- package/dist/post-components/p-c386219b.js +0 -1
- package/dist/post-components/p-d2f9de94.js +0 -2
- package/dist/post-components/p-e7c67ff0.entry.js +0 -1
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'post-components';
|
|
24
|
-
const BUILD = /* post-components */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute:
|
|
24
|
+
const BUILD = /* post-components */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "data-hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -86,10 +86,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
86
86
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
87
87
|
/* webpackMode: "lazy" */
|
|
88
88
|
'./post-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
89
|
+
case 'post-avatar.cjs':
|
|
90
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
91
|
+
/* webpackMode: "lazy" */
|
|
92
|
+
'./post-avatar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
89
93
|
case 'post-card-control.cjs':
|
|
90
94
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
91
95
|
/* webpackMode: "lazy" */
|
|
92
96
|
'./post-card-control.cjs.entry.js')); }).then(processMod, consoleError);
|
|
97
|
+
case 'post-language-option.cjs':
|
|
98
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
99
|
+
/* webpackMode: "lazy" */
|
|
100
|
+
'./post-language-option.cjs.entry.js')); }).then(processMod, consoleError);
|
|
93
101
|
case 'post-logo.cjs':
|
|
94
102
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
95
103
|
/* webpackMode: "lazy" */
|
|
@@ -152,7 +160,7 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
152
160
|
|
|
153
161
|
// src/client/client-style.ts
|
|
154
162
|
var styles = /* @__PURE__ */ new Map();
|
|
155
|
-
var HYDRATED_CSS = "{visibility:hidden}
|
|
163
|
+
var HYDRATED_CSS = "{visibility:hidden}[data-hydrated]{visibility:inherit}";
|
|
156
164
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
157
165
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
158
166
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
@@ -1051,6 +1059,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1051
1059
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1052
1060
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1053
1061
|
hostTagName = hostElm.tagName;
|
|
1062
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1063
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1064
|
+
cmpMeta.$attrsToReflect$.map(
|
|
1065
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
1066
|
+
);
|
|
1067
|
+
}
|
|
1054
1068
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1055
1069
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1056
1070
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -1297,8 +1311,8 @@ var safeCall = (instance, method, arg) => {
|
|
|
1297
1311
|
return void 0;
|
|
1298
1312
|
};
|
|
1299
1313
|
var addHydratedFlag = (elm) => {
|
|
1300
|
-
var
|
|
1301
|
-
return elm.
|
|
1314
|
+
var _b;
|
|
1315
|
+
return elm.setAttribute((_b = BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") ;
|
|
1302
1316
|
};
|
|
1303
1317
|
|
|
1304
1318
|
// src/runtime/set-value.ts
|
|
@@ -1424,8 +1438,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1424
1438
|
/* @__PURE__ */ new Set([
|
|
1425
1439
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1426
1440
|
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
1441
|
+
var _a2;
|
|
1427
1442
|
const attrName = m[1] || propName;
|
|
1428
1443
|
attrNameToPropName.set(attrName, propName);
|
|
1444
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1445
|
+
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1446
|
+
}
|
|
1429
1447
|
return attrName;
|
|
1430
1448
|
})
|
|
1431
1449
|
])
|
|
@@ -1618,6 +1636,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1618
1636
|
{
|
|
1619
1637
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1620
1638
|
}
|
|
1639
|
+
{
|
|
1640
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1641
|
+
}
|
|
1621
1642
|
{
|
|
1622
1643
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1623
1644
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,23 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postAccordion = require('./post-accordion-
|
|
6
|
-
const postAccordionItem = require('./post-accordion-item-
|
|
7
|
-
const postAlert = require('./post-alert-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
require('./
|
|
21
|
-
require('./
|
|
5
|
+
const postAccordion = require('./post-accordion-3878bf43.js');
|
|
6
|
+
const postAccordionItem = require('./post-accordion-item-0278e6e2.js');
|
|
7
|
+
const postAlert = require('./post-alert-5f795d9c.js');
|
|
8
|
+
const postAvatar = require('./post-avatar-2bcfc016.js');
|
|
9
|
+
const postCardControl = require('./post-card-control-5ffcd201.js');
|
|
10
|
+
const postCollapsibleTrigger = require('./post-collapsible-trigger-6ae59c64.js');
|
|
11
|
+
const postIcon = require('./post-icon-1f71aa0f.js');
|
|
12
|
+
const postLanguageOption = require('./post-language-option-4a3ecaeb.js');
|
|
13
|
+
const postLogo = require('./post-logo-7070d727.js');
|
|
14
|
+
const postPopover = require('./post-popover-de1b8d95.js');
|
|
15
|
+
const postPopovercontainer = require('./post-popovercontainer-6a25713a.js');
|
|
16
|
+
const postRating = require('./post-rating-1d2c59b7.js');
|
|
17
|
+
const postTabs = require('./post-tabs-c2d42035.js');
|
|
18
|
+
const postTabHeader = require('./post-tab-header-877676bf.js');
|
|
19
|
+
const postTabPanel = require('./post-tab-panel-80b1f3ee.js');
|
|
20
|
+
const postTooltip = require('./post-tooltip-9a120b2e.js');
|
|
21
|
+
const postTag = require('./post-tag-5e2c7798.js');
|
|
22
|
+
require('./index-e1f32cce.js');
|
|
23
|
+
require('./package-ef26e62c.js');
|
|
22
24
|
require('./heading-levels-608d432e.js');
|
|
23
25
|
require('./check-one-of-f4f5d0c0.js');
|
|
24
26
|
require('./index-01f30442.js');
|
|
@@ -32,10 +34,12 @@ require('./attribute-observer-10f08c04.js');
|
|
|
32
34
|
exports.PostAccordion = postAccordion.PostAccordion;
|
|
33
35
|
exports.PostAccordionItem = postAccordionItem.PostAccordionItem;
|
|
34
36
|
exports.PostAlert = postAlert.PostAlert;
|
|
37
|
+
exports.PostAvatar = postAvatar.PostAvatar;
|
|
35
38
|
exports.PostCardControl = postCardControl.PostCardControl;
|
|
36
39
|
exports.PostCollapsible = postCollapsibleTrigger.PostCollapsible;
|
|
37
40
|
exports.PostCollapsibleTrigger = postCollapsibleTrigger.PostCollapsibleTrigger;
|
|
38
41
|
exports.PostIcon = postIcon.PostIcon;
|
|
42
|
+
exports.PostLanguageOption = postLanguageOption.PostLanguageOption;
|
|
39
43
|
exports.PostLogo = postLogo.PostLogo;
|
|
40
44
|
exports.PostPopover = postPopover.PostPopover;
|
|
41
45
|
exports.PostPopovercontainer = postPopovercontainer.PostPopovercontainer;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-e1f32cce.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["post-accordion-item.cjs",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert.cjs",[[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"]}]]],["post-card-control.cjs",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-
|
|
11
|
+
return index.bootstrapLazy([["post-accordion-item.cjs",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert.cjs",[[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"]}]]],["post-card-control.cjs",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-popover.cjs",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating.cjs",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag.cjs",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip.cjs",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion.cjs",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-avatar.cjs",[[1,"post-avatar",{"firstname":[1],"lastname":[1],"userid":[1],"email":[1],"slottedImage":[32],"avatarType":[32],"imageUrl":[32],"imageAlt":[32],"initials":[32]},null,{"firstname":["validateFirstname"]}]]],["post-language-option.cjs",[[1,"post-language-option",{"code":[1],"active":[1540],"name":[1],"url":[1],"select":[64]},null,{"code":["validateCode"],"active":["validateActiveProp"],"name":["validateName"],"url":["validateUrl"]}]]],["post-logo.cjs",[[1,"post-logo",{"url":[1]},null,{"url":["validateUrl"]}]]],["post-tab-header.cjs",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel.cjs",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs.cjs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible_2.cjs",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}],[0,"post-collapsible-trigger",{"for":[1],"update":[64]},null,{"for":["setAriaAttributes"]}]]],["post-popovercontainer.cjs",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-icon.cjs",[[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"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const _package = require('./package-
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const _package = require('./package-ef26e62c.js');
|
|
5
5
|
const headingLevels = require('./heading-levels-608d432e.js');
|
|
6
6
|
const checkOneOf = require('./check-one-of-f4f5d0c0.js');
|
|
7
7
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const _package = require('./package-ef26e62c.js');
|
|
5
|
+
const headingLevels = require('./heading-levels-608d432e.js');
|
|
6
|
+
const index$1 = require('./index-01f30442.js');
|
|
7
|
+
|
|
8
|
+
const postAccordionItemCss = "post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item{--post-bg-opacity:1;background-color:rgba(var(--post-bg-rgb), var(--post-bg-opacity)) !important;color:var(--post-contrast-color) !important}post-accordion-item::part(accordion-item),.bg-yellow post-accordion-item::part(accordion-item),.bg-white post-accordion-item::part(accordion-item),.bg-light post-accordion-item::part(accordion-item),.bg-gray post-accordion-item::part(accordion-item),.bg-dark post-accordion-item::part(accordion-item),.bg-black post-accordion-item::part(accordion-item),.bg-primary post-accordion-item::part(accordion-item),.bg-secondary post-accordion-item::part(accordion-item),.bg-success post-accordion-item::part(accordion-item),.bg-warning post-accordion-item::part(accordion-item),.bg-error post-accordion-item::part(accordion-item),.bg-info post-accordion-item::part(accordion-item),.bg-success-background post-accordion-item::part(accordion-item),.bg-warning-background post-accordion-item::part(accordion-item),.bg-error-background post-accordion-item::part(accordion-item),.accordion-item,.bg-yellow .accordion-item,.bg-white .accordion-item,.bg-light .accordion-item,.bg-gray .accordion-item,.bg-dark .accordion-item,.bg-black .accordion-item,.bg-primary .accordion-item,.bg-secondary .accordion-item,.bg-success .accordion-item,.bg-warning .accordion-item,.bg-error .accordion-item,.bg-info .accordion-item,.bg-success-background .accordion-item,.bg-warning-background .accordion-item,.bg-error-background .accordion-item{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222}.accordion-item{border-block:2px solid #666;--post-bg-rgb:244, 243, 241}.bg-yellow .accordion-item{--post-bg-rgb:255, 255, 255}.bg-white .accordion-item{--post-bg-rgb:244, 243, 241}.bg-light .accordion-item{--post-bg-rgb:255, 255, 255}.bg-gray .accordion-item{--post-bg-rgb:255, 255, 255}.bg-dark .accordion-item{--post-bg-rgb:255, 255, 255}.bg-black .accordion-item{--post-bg-rgb:255, 255, 255}.bg-primary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-secondary .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error .accordion-item{--post-bg-rgb:255, 255, 255}.bg-info .accordion-item{--post-bg-rgb:255, 255, 255}.bg-success-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-warning-background .accordion-item{--post-bg-rgb:255, 255, 255}.bg-error-background .accordion-item{--post-bg-rgb:255, 255, 255}.accordion-item+.accordion-item{border-block-start:0}.accordion-header{color:#333;font-size:1rem;font-weight:700;line-height:1.5;margin:0}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:3rem;text-align:start;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;outline:none}.accordion-button:focus-visible{outline:2px solid #1976c8}.accordion-button:hover{color:#000;background-color:#e6e6e6}.accordion-button:disabled{opacity:.4;pointer-events:none}.accordion-button::after{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.5rem 1rem 1rem;font-weight:400}.accordion-button>*,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>*,.accordion-body>:last-child{margin-block-end:0 !important}:host{display:block}.accordion-button{cursor:pointer}.accordion-button>::slotted(.text-truncate){display:block}post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-yellow post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-white post-accordion-item::part(accordion-item){--post-bg-rgb:244, 243, 241}.bg-light post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-gray post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-dark post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-black post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-primary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-secondary post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-info post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-success-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-warning-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}.bg-error-background post-accordion-item::part(accordion-item){--post-bg-rgb:255, 255, 255}:host(:not(:first-of-type)) .accordion-item{border-block-start:0}";
|
|
9
|
+
const PostAccordionItemStyle0 = postAccordionItemCss;
|
|
10
|
+
|
|
11
|
+
const PostAccordionItem = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.id = undefined;
|
|
15
|
+
this.collapsed = false;
|
|
16
|
+
this.headingLevel = undefined;
|
|
17
|
+
}
|
|
18
|
+
validateHeadingLevel(newValue = this.headingLevel) {
|
|
19
|
+
index$1.checkEmptyOrOneOf(newValue, headingLevels.HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
|
|
20
|
+
}
|
|
21
|
+
componentDidLoad() {
|
|
22
|
+
this.validateHeadingLevel();
|
|
23
|
+
}
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
26
|
+
}
|
|
27
|
+
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
28
|
+
onCollapseToggle(event) {
|
|
29
|
+
if (event.target === this.host &&
|
|
30
|
+
event.target.localName === 'post-accordion-item') {
|
|
31
|
+
this.collapsed = !event.detail;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Triggers the collapse programmatically.
|
|
36
|
+
*/
|
|
37
|
+
async toggle(force) {
|
|
38
|
+
return this.collapsible.toggle(force);
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
var _a;
|
|
42
|
+
const HeadingTag = `h${(_a = this.headingLevel) !== null && _a !== void 0 ? _a : 2}`;
|
|
43
|
+
return (index.h(index.Host, { key: '3d2740ab4942832231737f1c26c075f37590bf53', id: this.id, "data-version": _package.version }, index.h("div", { key: 'cba3f09d50db4ad285cc20a051763e7d843ab36d', part: "accordion-item", class: "accordion-item" }, index.h("post-collapsible-trigger", { key: '87e7da5bfaee393fdf8423e8521448b976125daa', for: `${this.id}--collapse` }, index.h(HeadingTag, { key: '89d218bd032caddc6b484edab1f8d3d912c73c17', class: "accordion-header", id: `${this.id}--header` }, index.h("button", { key: '2f4597376234c64fec882ecdac76c2e3f541474c', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}` }, index.h("slot", { key: '573e3a196c71548868698066c1220f56f5c39181', name: "header" })))), index.h("post-collapsible", { key: '6e07f4dfe240e52aad4d8e7b176ca2ec9476d605', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, index.h("div", { key: 'f7f10770fbd1ae6ac867fb1ff255a303fd42c461', class: "accordion-body" }, index.h("slot", { key: 'dc0d49c7484481b57e7665e25761c425db3247b4' }))))));
|
|
44
|
+
}
|
|
45
|
+
get host() { return index.getElement(this); }
|
|
46
|
+
static get watchers() { return {
|
|
47
|
+
"headingLevel": ["validateHeadingLevel"]
|
|
48
|
+
}; }
|
|
49
|
+
};
|
|
50
|
+
PostAccordionItem.style = PostAccordionItemStyle0;
|
|
51
|
+
|
|
52
|
+
exports.PostAccordionItem = PostAccordionItem;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postAccordionItem = require('./post-accordion-item-
|
|
6
|
-
require('./index-
|
|
7
|
-
require('./package-
|
|
5
|
+
const postAccordionItem = require('./post-accordion-item-0278e6e2.js');
|
|
6
|
+
require('./index-e1f32cce.js');
|
|
7
|
+
require('./package-ef26e62c.js');
|
|
8
8
|
require('./heading-levels-608d432e.js');
|
|
9
9
|
require('./index-01f30442.js');
|
|
10
10
|
require('./constants-238701d3.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postAccordion = require('./post-accordion-
|
|
6
|
-
require('./index-
|
|
7
|
-
require('./package-
|
|
5
|
+
const postAccordion = require('./post-accordion-3878bf43.js');
|
|
6
|
+
require('./index-e1f32cce.js');
|
|
7
|
+
require('./package-ef26e62c.js');
|
|
8
8
|
require('./heading-levels-608d432e.js');
|
|
9
9
|
require('./check-one-of-f4f5d0c0.js');
|
|
10
10
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const _package = require('./package-ef26e62c.js');
|
|
5
|
+
const fade = require('./fade-35a3633a.js');
|
|
6
|
+
const index$1 = require('./index-01f30442.js');
|
|
7
|
+
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
8
|
+
|
|
9
|
+
const ALERT_TYPES = ['primary', 'success', 'warning', 'danger', 'info', 'gray'];
|
|
10
|
+
|
|
11
|
+
const postAlertCss = ".alert-primary,.alert-success,.alert-warning,.alert-danger,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-warning,.alert-info,.alert-gray{--post-contrast-color:#000;--post-focus-color:#1976c8;--post-contrast-color-inverted:#fff;--post-gray-10:hsl(0, 0%, 90%);--post-gray-20:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-60:hsl(0, 0%, 40%);--post-gray-80:hsl(0, 0%, 20%);--post-yellow:#fc0;--post-white:#fff;--post-light:#faf9f8;--post-gray:#f4f3f1;--post-dark:hsl(0, 0%, 20%);--post-black:#000;--post-primary:hsl(0, 0%, 20%);--post-secondary:hsl(0, 0%, 40%);--post-success:#2c871d;--post-warning:#f49e00;--post-error:#a51728;--post-info:#cce4ee;--post-success-background:#c0debb;--post-warning-background:#fce2b2;--post-error-background:#ffdade;--post-contrast-color-rgb:0, 0, 0;--post-contrast-color-inverted-rgb:255, 255, 255;--post-gray-10-rgb:230, 230, 230;--post-gray-20-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-60-rgb:102, 102, 102;--post-gray-80-rgb:51, 51, 51;--post-black-alpha-10-rgba:rgba(0, 0, 0, 0.1);--post-black-alpha-20-rgba:rgba(0, 0, 0, 0.2);--post-black-alpha-40-rgba:rgba(0, 0, 0, 0.4);--post-black-alpha-60-rgba:rgba(0, 0, 0, 0.6);--post-black-alpha-80-rgba:rgba(0, 0, 0, 0.8);--post-white-alpha-10-rgba:rgba(255, 255, 255, 0.1);--post-white-alpha-20-rgba:rgba(255, 255, 255, 0.2);--post-white-alpha-40-rgba:rgba(255, 255, 255, 0.4);--post-white-alpha-60-rgba:rgba(255, 255, 255, 0.6);--post-white-alpha-80-rgba:rgba(255, 255, 255, 0.8);--post-yellow-rgb:255, 204, 0;--post-white-rgb:255, 255, 255;--post-light-rgb:250, 249, 248;--post-gray-rgb:244, 243, 241;--post-dark-rgb:51, 51, 51;--post-black-rgb:0, 0, 0;--post-primary-rgb:51, 51, 51;--post-secondary-rgb:102, 102, 102;--post-success-rgb:44, 135, 29;--post-warning-rgb:244, 158, 0;--post-error-rgb:165, 23, 40;--post-info-rgb:204, 228, 238;--post-success-background-rgb:192, 222, 187;--post-warning-background-rgb:252, 226, 178;--post-error-background-rgb:255, 218, 222}.alert-primary,.alert-success,.alert-danger,.alert-notification,.alert-error{--post-contrast-color:#fff;--post-focus-color:#fff;--post-contrast-color-inverted:#000;--post-dark:#faf9f8;--post-light:hsl(0, 0%, 20%);--post-gray-80:hsl(0, 0%, 90%);--post-gray-60:hsl(0, 0%, 80%);--post-gray-40:hsl(0, 0%, 60%);--post-gray-20:hsl(0, 0%, 40%);--post-gray-10:hsl(0, 0%, 20%);--post-contrast-color-rgb:255, 255, 255;--post-contrast-color-inverted-rgb:0, 0, 0;--post-dark-rgb:250, 249, 248;--post-light-rgb:51, 51, 51;--post-gray-80-rgb:230, 230, 230;--post-gray-60-rgb:204, 204, 204;--post-gray-40-rgb:153, 153, 153;--post-gray-20-rgb:102, 102, 102;--post-gray-10-rgb:51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:400}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=\" pi-\"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=\" pi-\"].no-icon{background-image:none}.alert::before{content:\"\";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=\" pi-\"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=\" pi-\"]>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;border:2px solid CanvasText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto}.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media (min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media (max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action.no-icon>.alert-content{padding-inline-start:0}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media (min-width: 1440px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem);padding-inline-start:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );background-position-x:calc((100% - 1439px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1439px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(\n (100% - 1439px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1439px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb:51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-primary:has(>post-icon)::before{content:none}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb:44, 135, 29}.alert-success:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-success:has(>post-icon)::before{content:none}.alert-success>post-icon{background-color:#2c871d}.alert-warning{--post-bg-rgb:244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-warning:has(>post-icon)::before{content:none}.alert-warning>post-icon{background-color:#f49e00}.alert-danger{--post-bg-rgb:165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-danger:has(>post-icon)::before{content:none}.alert-danger>post-icon{background-color:#a51728}.alert-info{--post-bg-rgb:204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-info:has(>post-icon)::before{content:none}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb:244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-gray:has(>post-icon)::before{content:none}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb:51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-notification:has(>post-icon)::before{content:none}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb:165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=\" pi-\"])::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}";
|
|
12
|
+
const PostAlertStyle0 = postAlertCss;
|
|
13
|
+
|
|
14
|
+
const PostAlert = class {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
index.registerInstance(this, hostRef);
|
|
17
|
+
this.postDismissed = index.createEvent(this, "postDismissed", 7);
|
|
18
|
+
this.alertId = crypto.randomUUID();
|
|
19
|
+
this.classes = undefined;
|
|
20
|
+
this.hasActions = undefined;
|
|
21
|
+
this.hasHeading = undefined;
|
|
22
|
+
this.onDismissButtonClick = () => this.dismiss();
|
|
23
|
+
this.dismissible = false;
|
|
24
|
+
this.dismissLabel = undefined;
|
|
25
|
+
this.fixed = false;
|
|
26
|
+
this.icon = undefined;
|
|
27
|
+
this.type = 'primary';
|
|
28
|
+
}
|
|
29
|
+
validateDismissible(isDismissible = this.dismissible) {
|
|
30
|
+
index$1.checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
|
|
31
|
+
setTimeout(() => this.validateDismissLabel());
|
|
32
|
+
}
|
|
33
|
+
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
34
|
+
if (this.dismissible) {
|
|
35
|
+
checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
validateFixed(isFixed = this.fixed) {
|
|
39
|
+
index$1.checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
|
|
40
|
+
}
|
|
41
|
+
validateIcon(icon = this.icon) {
|
|
42
|
+
index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
|
|
43
|
+
}
|
|
44
|
+
validateType(type = this.type) {
|
|
45
|
+
index$1.checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
componentDidLoad() {
|
|
48
|
+
this.validateDismissible();
|
|
49
|
+
this.validateFixed();
|
|
50
|
+
this.validateIcon();
|
|
51
|
+
this.validateType();
|
|
52
|
+
}
|
|
53
|
+
componentWillRender() {
|
|
54
|
+
var _a;
|
|
55
|
+
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
56
|
+
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
57
|
+
this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
|
|
58
|
+
if (this.dismissible)
|
|
59
|
+
this.classes += ' alert-dismissible';
|
|
60
|
+
if (this.hasActions)
|
|
61
|
+
this.classes += ' alert-action';
|
|
62
|
+
if (this.fixed)
|
|
63
|
+
this.classes += ' alert-fixed-bottom';
|
|
64
|
+
if (this.icon === 'none')
|
|
65
|
+
this.classes += ' no-icon';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Triggers alert dismissal programmatically (same as clicking on the close button (×)).
|
|
69
|
+
*/
|
|
70
|
+
async dismiss() {
|
|
71
|
+
const dismissal = fade.fadeOut(this.host);
|
|
72
|
+
await dismissal.finished;
|
|
73
|
+
this.host.remove();
|
|
74
|
+
this.postDismissed.emit();
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
const defaultAlertContent = [
|
|
78
|
+
this.hasHeading && (index.h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, index.h("slot", { key: 'a3404eee0322cc2b50125bf4ca08969e33d15763', name: "heading" }))),
|
|
79
|
+
index.h("slot", { key: `${this.alertId}-message` }),
|
|
80
|
+
];
|
|
81
|
+
const actionAlertContent = [
|
|
82
|
+
index.h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
|
|
83
|
+
index.h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, index.h("slot", { key: '50941abd468008cd58a1e05577243d1046a0e20e', name: "actions" })),
|
|
84
|
+
];
|
|
85
|
+
return (index.h(index.Host, { key: '99c1e3b4cc943d8be2d5abe7b2b27dce03548d15', "data-version": _package.version }, index.h("div", { key: 'a290771bcc1234684502f524fe6e7e44501fc004', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (index.h("button", { key: '57c9cdbec53430b0fc6e121b5928bb14b86c37e0', class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { key: '82d59b6deb736b4053b2b0876c87456c160928ee', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (index.h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
|
|
86
|
+
}
|
|
87
|
+
get host() { return index.getElement(this); }
|
|
88
|
+
static get watchers() { return {
|
|
89
|
+
"dismissible": ["validateDismissible"],
|
|
90
|
+
"dismissLabel": ["validateDismissLabel"],
|
|
91
|
+
"fixed": ["validateFixed"],
|
|
92
|
+
"icon": ["validateIcon"],
|
|
93
|
+
"type": ["validateType"]
|
|
94
|
+
}; }
|
|
95
|
+
};
|
|
96
|
+
PostAlert.style = PostAlertStyle0;
|
|
97
|
+
|
|
98
|
+
exports.PostAlert = PostAlert;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postAlert = require('./post-alert-
|
|
6
|
-
require('./index-
|
|
7
|
-
require('./package-
|
|
5
|
+
const postAlert = require('./post-alert-5f795d9c.js');
|
|
6
|
+
require('./index-e1f32cce.js');
|
|
7
|
+
require('./package-ef26e62c.js');
|
|
8
8
|
require('./fade-35a3633a.js');
|
|
9
9
|
require('./index-01f30442.js');
|
|
10
10
|
require('./constants-238701d3.js');
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const _package = require('./package-ef26e62c.js');
|
|
5
|
+
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
6
|
+
|
|
7
|
+
const postAvatarCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:\"\";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.initials span:not(caption){position:absolute !important}";
|
|
8
|
+
const PostAvatarStyle0 = postAvatarCss;
|
|
9
|
+
|
|
10
|
+
// https://docs.gravatar.com/api/avatars/images/
|
|
11
|
+
const GRAVATAR_DEFAULT = '404';
|
|
12
|
+
const GRAVATAR_RATING = 'g';
|
|
13
|
+
const GRAVATAR_SIZE = 80;
|
|
14
|
+
const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
15
|
+
var AvatarType;
|
|
16
|
+
(function (AvatarType) {
|
|
17
|
+
AvatarType["Slotted"] = "slotted";
|
|
18
|
+
AvatarType["Image"] = "image";
|
|
19
|
+
AvatarType["Initials"] = "initials";
|
|
20
|
+
AvatarType[AvatarType["Null"] = null] = "Null";
|
|
21
|
+
})(AvatarType || (AvatarType = {}));
|
|
22
|
+
const PostAvatar = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
index.registerInstance(this, hostRef);
|
|
25
|
+
this.firstname = undefined;
|
|
26
|
+
this.lastname = undefined;
|
|
27
|
+
this.userid = undefined;
|
|
28
|
+
this.email = undefined;
|
|
29
|
+
this.slottedImage = undefined;
|
|
30
|
+
this.avatarType = null;
|
|
31
|
+
this.imageUrl = '';
|
|
32
|
+
this.imageAlt = '';
|
|
33
|
+
this.initials = '';
|
|
34
|
+
}
|
|
35
|
+
validateFirstname() {
|
|
36
|
+
checkNonEmpty.checkNonEmpty(this.firstname, 'The `firstname` property of the `post-avatar` is required!');
|
|
37
|
+
}
|
|
38
|
+
async getAvatar() {
|
|
39
|
+
if (this.slottedImage !== null) {
|
|
40
|
+
this.avatarType = AvatarType.Slotted;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
let imageLoaded = false;
|
|
44
|
+
if (!imageLoaded && this.userid)
|
|
45
|
+
imageLoaded = await this.getImageByProp(this.userid, this.fetchImageByUserId.bind(this));
|
|
46
|
+
if (!imageLoaded && this.email)
|
|
47
|
+
imageLoaded = await this.getImageByProp(this.email, this.fetchImageByEmail.bind(this));
|
|
48
|
+
if (!imageLoaded)
|
|
49
|
+
this.getAvatarByInitials();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async getImageByProp(prop, fetchImage) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (!prop)
|
|
55
|
+
return false;
|
|
56
|
+
const imageResponse = (_a = (await this.getStorageItem(prop))) !== null && _a !== void 0 ? _a : { ok: false, url: '' };
|
|
57
|
+
if (!imageResponse.ok) {
|
|
58
|
+
try {
|
|
59
|
+
const r = await fetchImage();
|
|
60
|
+
imageResponse.ok = r.ok;
|
|
61
|
+
imageResponse.url = r.url;
|
|
62
|
+
this.imageUrl = imageResponse.url;
|
|
63
|
+
this.imageAlt = `${this.firstname} ${this.lastname} avatar`;
|
|
64
|
+
this.avatarType = AvatarType.Image;
|
|
65
|
+
this.setStorageItem(this.userid, JSON.stringify(imageResponse));
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
this.removeStorageItem(prop);
|
|
69
|
+
console.info(`Loading avatar by type "${AvatarType.Image}" failed.`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return imageResponse.ok;
|
|
73
|
+
}
|
|
74
|
+
async fetchImageByUserId() {
|
|
75
|
+
return await fetch(PostAvatar.INTERNAL_USERID_IMAGE_SRC.replace('{userid}', encodeURIComponent(this.userid)));
|
|
76
|
+
}
|
|
77
|
+
async fetchImageByEmail() {
|
|
78
|
+
const email = await this.cryptify(this.email);
|
|
79
|
+
const imageUrl = GRAVATAR_BASE_URL.replace('{email}', email);
|
|
80
|
+
return await fetch(imageUrl);
|
|
81
|
+
}
|
|
82
|
+
getAvatarByInitials() {
|
|
83
|
+
this.initials = this.getInitials();
|
|
84
|
+
this.avatarType = AvatarType.Initials;
|
|
85
|
+
}
|
|
86
|
+
getNames() {
|
|
87
|
+
return [this.firstname, this.lastname].filter(n => n);
|
|
88
|
+
}
|
|
89
|
+
getInitials() {
|
|
90
|
+
return this.getNames()
|
|
91
|
+
.map(n => n.charAt(0))
|
|
92
|
+
.join('')
|
|
93
|
+
.trim();
|
|
94
|
+
}
|
|
95
|
+
async getStorageItem(keyToken) {
|
|
96
|
+
var _a;
|
|
97
|
+
const key = await this.cryptify(keyToken);
|
|
98
|
+
const value = (_a = window === null || window === void 0 ? void 0 : window.sessionStorage) === null || _a === void 0 ? void 0 : _a.getItem(key);
|
|
99
|
+
return value ? JSON.parse(value) : null;
|
|
100
|
+
}
|
|
101
|
+
async setStorageItem(keyToken, value) {
|
|
102
|
+
var _a;
|
|
103
|
+
const key = await this.cryptify(keyToken);
|
|
104
|
+
(_a = window === null || window === void 0 ? void 0 : window.sessionStorage) === null || _a === void 0 ? void 0 : _a.setItem(key, value);
|
|
105
|
+
}
|
|
106
|
+
async removeStorageItem(keyToken) {
|
|
107
|
+
var _a;
|
|
108
|
+
const key = await this.cryptify(keyToken);
|
|
109
|
+
(_a = window === null || window === void 0 ? void 0 : window.sessionStorage) === null || _a === void 0 ? void 0 : _a.removeItem(key);
|
|
110
|
+
}
|
|
111
|
+
async cryptify(key) {
|
|
112
|
+
return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
|
|
113
|
+
return Array.from(new Uint8Array(buffer))
|
|
114
|
+
.map(bytes => bytes.toString(16).padStart(2, '0'))
|
|
115
|
+
.join('');
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
onSlotDefaultChange() {
|
|
119
|
+
this.slottedImage = this.host.querySelector('img');
|
|
120
|
+
this.getAvatar();
|
|
121
|
+
}
|
|
122
|
+
componentWillRender() {
|
|
123
|
+
this.slottedImage = this.host.querySelector('img');
|
|
124
|
+
this.getAvatar();
|
|
125
|
+
}
|
|
126
|
+
componentDidLoad() {
|
|
127
|
+
this.validateFirstname();
|
|
128
|
+
}
|
|
129
|
+
render() {
|
|
130
|
+
const initials = this.getNames().reduce((acc, n, i) => {
|
|
131
|
+
if (i > 0)
|
|
132
|
+
acc.push(index.h("span", null, " "));
|
|
133
|
+
acc.push(n.charAt(0));
|
|
134
|
+
acc.push(index.h("span", null, n.slice(1)));
|
|
135
|
+
// eslint-disable-next-line @stencil-community/render-returns-host
|
|
136
|
+
return acc;
|
|
137
|
+
}, []);
|
|
138
|
+
return (index.h(index.Host, { "data-version": _package.version }, index.h("slot", { onSlotchange: this.onSlotDefaultChange.bind(this) }, this.avatarType === 'image' && index.h("img", { src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && index.h("div", { class: "initials" }, initials))));
|
|
139
|
+
}
|
|
140
|
+
get host() { return index.getElement(this); }
|
|
141
|
+
static get watchers() { return {
|
|
142
|
+
"firstname": ["validateFirstname"]
|
|
143
|
+
}; }
|
|
144
|
+
};
|
|
145
|
+
PostAvatar.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
146
|
+
PostAvatar.style = PostAvatarStyle0;
|
|
147
|
+
|
|
148
|
+
exports.PostAvatar = PostAvatar;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const postAvatar = require('./post-avatar-2bcfc016.js');
|
|
6
|
+
require('./index-e1f32cce.js');
|
|
7
|
+
require('./package-ef26e62c.js');
|
|
8
|
+
require('./check-non-empty-eeaa8f77.js');
|
|
9
|
+
require('./constants-238701d3.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.post_avatar = postAvatar.PostAvatar;
|