@parthi033/ui-foundation 0.0.3 → 0.0.4
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-DNF3Pvzm.js → index-B8EYjYZ7.js} +49 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/pn-button.cjs.entry.js +6 -4
- package/dist/cjs/ui-foundation.cjs.js +2 -2
- package/dist/collection/components/pn-button/pn-button.css +39 -19
- package/dist/collection/components/pn-button/pn-button.js +29 -6
- package/dist/components/index.js +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/p-DIhfYQQy.js +1 -0
- package/dist/components/pn-button.js +1 -1
- package/dist/esm/{index-Cnv7sokw.js → index-BLqr1F3e.js} +49 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/pn-button.entry.js +6 -4
- package/dist/esm/ui-foundation.js +3 -3
- package/dist/types/components/pn-button/pn-button.d.ts +2 -1
- package/dist/types/components.d.ts +16 -2
- package/dist/ui-foundation/p-0684162b.entry.js +1 -0
- package/dist/ui-foundation/p-BLqr1F3e.js +2 -0
- package/dist/ui-foundation/p-f0c74d2f.entry.js +1 -0
- package/dist/ui-foundation/ui-foundation.esm.js +1 -1
- package/package.json +2 -1
- package/dist/components/p-C_eVDM56.js +0 -1
- package/dist/ui-foundation/p-64f3ec1e.entry.js +0 -1
- package/dist/ui-foundation/p-95000130.entry.js +0 -1
- package/dist/ui-foundation/p-Cnv7sokw.js +0 -2
|
@@ -75,6 +75,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
75
75
|
hostElement.__stencil__getHostRef = () => ref;
|
|
76
76
|
return ref;
|
|
77
77
|
};
|
|
78
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
78
79
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
79
80
|
|
|
80
81
|
// src/client/client-load-module.ts
|
|
@@ -412,6 +413,11 @@ var isHost = (node) => node && node.$tag$ === Host;
|
|
|
412
413
|
// src/runtime/parse-property-value.ts
|
|
413
414
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
414
415
|
if (propValue != null && !isComplexType(propValue)) {
|
|
416
|
+
if (propType & 4 /* Boolean */) {
|
|
417
|
+
{
|
|
418
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
415
421
|
if (propType & 1 /* String */) {
|
|
416
422
|
return String(propValue);
|
|
417
423
|
}
|
|
@@ -428,6 +434,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
428
434
|
if (oldValue === newValue) {
|
|
429
435
|
return;
|
|
430
436
|
}
|
|
437
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
431
438
|
memberName.toLowerCase();
|
|
432
439
|
if (memberName === "class") {
|
|
433
440
|
const classList = elm.classList;
|
|
@@ -437,6 +444,39 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
437
444
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
438
445
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
439
446
|
}
|
|
447
|
+
} else if (memberName === "key") ; else {
|
|
448
|
+
const isComplex = isComplexType(newValue);
|
|
449
|
+
if ((isProp || isComplex && newValue !== null) && true) {
|
|
450
|
+
try {
|
|
451
|
+
if (!elm.tagName.includes("-")) {
|
|
452
|
+
const n = newValue == null ? "" : newValue;
|
|
453
|
+
if (memberName === "list") {
|
|
454
|
+
isProp = false;
|
|
455
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
456
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
457
|
+
elm[memberName] = n;
|
|
458
|
+
} else {
|
|
459
|
+
elm.setAttribute(memberName, n);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
} else if (elm[memberName] !== newValue) {
|
|
463
|
+
elm[memberName] = newValue;
|
|
464
|
+
}
|
|
465
|
+
} catch (e) {
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
if (newValue == null || newValue === false) {
|
|
469
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
470
|
+
{
|
|
471
|
+
elm.removeAttribute(memberName);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
475
|
+
newValue = newValue === true ? "" : newValue;
|
|
476
|
+
{
|
|
477
|
+
elm.setAttribute(memberName, newValue);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
440
480
|
}
|
|
441
481
|
};
|
|
442
482
|
var parseClassListRegex = /\s/;
|
|
@@ -462,7 +502,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
462
502
|
elm,
|
|
463
503
|
memberName,
|
|
464
504
|
oldVnodeAttrs[memberName],
|
|
465
|
-
void 0
|
|
505
|
+
void 0,
|
|
506
|
+
isSvgMode2,
|
|
507
|
+
newVnode.$flags$);
|
|
466
508
|
}
|
|
467
509
|
}
|
|
468
510
|
}
|
|
@@ -471,7 +513,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
471
513
|
elm,
|
|
472
514
|
memberName,
|
|
473
515
|
oldVnodeAttrs[memberName],
|
|
474
|
-
newVnodeAttrs[memberName]
|
|
516
|
+
newVnodeAttrs[memberName],
|
|
517
|
+
isSvgMode2,
|
|
518
|
+
newVnode.$flags$);
|
|
475
519
|
}
|
|
476
520
|
};
|
|
477
521
|
function sortedAttrNames(attrNames) {
|
|
@@ -484,6 +528,7 @@ function sortedAttrNames(attrNames) {
|
|
|
484
528
|
);
|
|
485
529
|
}
|
|
486
530
|
var hostTagName;
|
|
531
|
+
var isSvgMode = false;
|
|
487
532
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
488
533
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
489
534
|
let i2 = 0;
|
|
@@ -499,7 +544,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
499
544
|
newVNode2.$tag$
|
|
500
545
|
);
|
|
501
546
|
{
|
|
502
|
-
updateElement(null, newVNode2);
|
|
547
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
503
548
|
}
|
|
504
549
|
if (newVNode2.$children$) {
|
|
505
550
|
const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
|
|
@@ -648,7 +693,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
648
693
|
const text = newVNode2.$text$;
|
|
649
694
|
if (text == null) {
|
|
650
695
|
{
|
|
651
|
-
updateElement(oldVNode, newVNode2);
|
|
696
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
652
697
|
}
|
|
653
698
|
if (oldChildren !== null && newChildren !== null) {
|
|
654
699
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B8EYjYZ7.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button.cjs",[[512,"pn-button",{"label":[1],"type":[1]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button.cjs",[[512,"pn-button",{"label":[1],"type":[1],"rounded":[4]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B8EYjYZ7.js');
|
|
4
4
|
|
|
5
|
-
const pnButtonCss = () => `.btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0
|
|
5
|
+
const pnButtonCss = () => `.btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0;cursor:pointer}.btn.primary{background-color:#7009d1;color:#ffffff;border:1px solid #7009d1}.btn.primary:hover,.btn.primary:focus,.btn.primary:active{background-color:#5d02b3}.btn.secondary{background-color:#F3E8FD;color:#4A008F;border:1px solid #7009d1}.btn.secondary:hover,.btn.secondary:focus,.btn.secondary:active{background-color:#f7f5f9}.btn.rounded{border-radius:4px}.btn.rounded{border-radius:4px}.btn.disabled{background-color:#e5e7eb;color:#9ca3af;border-color:#d1d5db;cursor:not-allowed;opacity:0.7}`;
|
|
6
6
|
|
|
7
7
|
const PnButton = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
label;
|
|
12
|
-
type;
|
|
12
|
+
type = 'primary';
|
|
13
|
+
rounded = false;
|
|
13
14
|
render() {
|
|
14
|
-
|
|
15
|
+
const isDisabled = this.type === 'disabled';
|
|
16
|
+
return index.h("button", { key: 'cbe817a5769ef625f4bc46b9b6224884c40e4d17', class: `btn ${this.type} ${this.rounded ? 'rounded' : ''}`, disabled: isDisabled }, this.label);
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
PnButton.style = pnButtonCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B8EYjYZ7.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button.cjs",[[512,"pn-button",{"label":[1],"type":[1]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["my-component.cjs",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button.cjs",[[512,"pn-button",{"label":[1],"type":[1],"rounded":[4]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -1,23 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/* ============================
|
|
2
|
+
Global Design Tokens
|
|
3
|
+
============================ */
|
|
4
|
+
/* Colors */
|
|
5
|
+
/* Base Text */
|
|
6
|
+
/* Spacing */
|
|
7
|
+
/* Misc */
|
|
8
|
+
.btn {
|
|
9
|
+
padding: 0.5rem 1rem;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
background: transparent;
|
|
12
|
+
border: 0;
|
|
13
|
+
cursor: pointer;
|
|
8
14
|
}
|
|
9
|
-
.btn.primary{
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
.btn.primary {
|
|
16
|
+
background-color: #7009d1;
|
|
17
|
+
color: #ffffff;
|
|
18
|
+
border: 1px solid #7009d1;
|
|
12
19
|
}
|
|
13
|
-
.btn.primary:hover,
|
|
14
|
-
|
|
15
|
-
.btn.primary:active{
|
|
16
|
-
background-color: #5d02b3;
|
|
17
|
-
color: #FFF;
|
|
20
|
+
.btn.primary:hover, .btn.primary:focus, .btn.primary:active {
|
|
21
|
+
background-color: #5d02b3;
|
|
18
22
|
}
|
|
19
|
-
.btn.secondary{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
.btn.secondary {
|
|
24
|
+
background-color: #F3E8FD;
|
|
25
|
+
color: #4A008F;
|
|
26
|
+
border: 1px solid #7009d1;
|
|
27
|
+
}
|
|
28
|
+
.btn.secondary:hover, .btn.secondary:focus, .btn.secondary:active {
|
|
29
|
+
background-color: #f7f5f9;
|
|
30
|
+
}
|
|
31
|
+
.btn.rounded {
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
}
|
|
34
|
+
.btn.rounded {
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
}
|
|
37
|
+
.btn.disabled {
|
|
38
|
+
background-color: #e5e7eb;
|
|
39
|
+
color: #9ca3af;
|
|
40
|
+
border-color: #d1d5db;
|
|
41
|
+
cursor: not-allowed;
|
|
42
|
+
opacity: 0.7;
|
|
23
43
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class PnButton {
|
|
3
3
|
label;
|
|
4
|
-
type;
|
|
4
|
+
type = 'primary';
|
|
5
|
+
rounded = false;
|
|
5
6
|
render() {
|
|
6
|
-
|
|
7
|
+
const isDisabled = this.type === 'disabled';
|
|
8
|
+
return h("button", { key: 'cbe817a5769ef625f4bc46b9b6224884c40e4d17', class: `btn ${this.type} ${this.rounded ? 'rounded' : ''}`, disabled: isDisabled }, this.label);
|
|
7
9
|
}
|
|
8
10
|
static get is() { return "pn-button"; }
|
|
9
11
|
static get originalStyleUrls() {
|
|
10
12
|
return {
|
|
11
|
-
"$": ["pn-button.
|
|
13
|
+
"$": ["pn-button.scss"]
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
16
|
static get styleUrls() {
|
|
@@ -41,8 +43,28 @@ export class PnButton {
|
|
|
41
43
|
"type": "string",
|
|
42
44
|
"mutable": false,
|
|
43
45
|
"complexType": {
|
|
44
|
-
"original": "
|
|
45
|
-
"resolved": "
|
|
46
|
+
"original": "'primary' | 'secondary' | 'disabled'",
|
|
47
|
+
"resolved": "\"disabled\" | \"primary\" | \"secondary\"",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"getter": false,
|
|
57
|
+
"setter": false,
|
|
58
|
+
"reflect": false,
|
|
59
|
+
"attribute": "type",
|
|
60
|
+
"defaultValue": "'primary'"
|
|
61
|
+
},
|
|
62
|
+
"rounded": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "boolean",
|
|
67
|
+
"resolved": "boolean",
|
|
46
68
|
"references": {}
|
|
47
69
|
},
|
|
48
70
|
"required": false,
|
|
@@ -54,7 +76,8 @@ export class PnButton {
|
|
|
54
76
|
"getter": false,
|
|
55
77
|
"setter": false,
|
|
56
78
|
"reflect": false,
|
|
57
|
-
"attribute": "
|
|
79
|
+
"attribute": "rounded",
|
|
80
|
+
"defaultValue": "false"
|
|
58
81
|
}
|
|
59
82
|
};
|
|
60
83
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-DIhfYQQy.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as o}from"./p-
|
|
1
|
+
import{t,p as e,H as s,h as o}from"./p-DIhfYQQy.js";import{format as n}from"./index.js";const m=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}first;middle;last;getText(){return n(this.first,this.middle,this.last)}render(){return o("div",{key:"70654fc83039b5f659efe99cc990e9b86d20dbe0"},"Hello, World! I'm ",this.getText())}static get style(){return":host{display:block}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function r(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),m))}))}r();const i=m,c=r;export{i as MyComponent,c as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.l.t)?n:{}).map((([n,[l]])=>{if(31&l||32&l){const l=t[n],o=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);o&&Object.defineProperty(t,n,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):l}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>(0,console.error)(t,e),o=new Map,s="undefined"!=typeof window?window:{},i=s.HTMLElement||class{},r={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},c=(()=>{try{return!!s.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),u=!!c&&(()=>!!s.document&&Object.getOwnPropertyDescriptor(s.document.adoptedStyleSheets,"length").writable)(),f=!1,a=[],d=[],h=(t,e)=>n=>{t.push(n),f||(f=!0,e&&4&r.i?b(m):r.raf(m))},p=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},m=()=>{p(a),p(d),(f=a.length>0)&&r.raf(m)},b=t=>Promise.resolve(undefined).then(t),y=h(d,!0),v=t=>{const e=new URL(t,r.u);return e.origin!==s.location.origin?e.href:e.pathname},$=t=>r.u=t;function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var j,g=new WeakMap,O=t=>"sc-"+t.h,S=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!S(l))&&(l=String(l)),s&&i?r[r.length-1].p+=l:r.push(s?M(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=M(t,null);return u.m=e,r.length>0&&(u.v=r),u.$=o,u},M=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,v:null,m:null,$:null}),E={},C=(t,e)=>null==t||S(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t,_=(t,e,n,l,o,s)=>{if(n===l)return;let i=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,o=A(n);let s=A(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else{const r=S(l);if(i||r&&null!==l)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||o)&&!r&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}},x=/\s/,A=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(x):[]),D=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of P(Object.keys(o)))t in s||_(l,t,o[t],void 0,n,e.i);for(const t of P(Object.keys(s)))_(l,t,o[t],s[t],n,e.i)};function P(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var U=!1,L=(t,e,n)=>{const l=e.v[n];let o,i,r=0;if(null!=l.p)o=l.O=s.document.createTextNode(l.p);else{if(!s.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=s.document.createElement(l.j),D(null,l,U),l.v){const e="template"===l.j?o.content:o;for(r=0;r<l.v.length;++r)i=L(t,l,r),i&&e.appendChild(i)}}return o["s-hn"]=j,o},R=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=L(null,n,o),i&&(l[o].O=i,V(r,i,e)))},W=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},H=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),N=(t,e,n=!1)=>{const l=e.O=t.O,o=t.v,s=e.v,i=e.p;null==i?(D(t,e,U),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],b=l[p];const y="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==b)b=l[--p];else if(H(d,m,o))N(d,m,o),d=e[++r],m=l[++c];else if(H(h,b,o))N(h,b,o),h=e[--a],b=l[--p];else if(H(d,b,o))N(d,b,o),V(y,d.O,h.O.nextSibling),d=e[++r],b=l[--p];else if(H(h,m,o))N(h,m,o),V(y,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].$&&e[f].$===m.$){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=L(e&&e[c],n,u):(N(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=L(e&&e[c],n,c),m=l[++c]),s&&V(d.O.parentNode,s,d.O)}r>a?R(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&W(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),R(l,null,e,s,0,s.length-1)):!n&&null!==o&&W(o,0,o.length-1)):t.p!==i&&(l.data=i)},V=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),q=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.S||M(null,null);var s;const i=(s=e)&&s.j===E?e:k(null,null,e);if(j=l.tagName,n&&i.m)for(const t of Object.keys(i.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=l[t]);i.j=null,i.i|=4,t.S=i,i.O=o.O=l.shadowRoot||l,N(o,i,n)},F=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},z=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);F(t,t.M);const n=()=>Y(t,e);if(!e)return y(n);queueMicrotask((()=>{n()}))},Y=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=T(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=B(o,(()=>T(l,"componentWillRender",void 0,n))),B(o,(()=>I(t,l,e)))},B=(t,e)=>G(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),G=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,I=async(t,e,n)=>{var l;const i=t.$hostElement$,f=i["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,i=((t,e)=>{var n,l,i;const f=O(e),a=o.get(f);if(!s.document)return f;if(t=11===t.nodeType?t:s.document,a)if("string"==typeof a){let o,i=g.get(t=t.head||t);if(i||g.set(t,i=new Set),!i.has(f)){o=s.document.createElement("style"),o.textContent=a;const d=null!=(n=r.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=s.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(c){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),u?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(f)}}else{let e=g.get(t);if(e||g.set(t,e=new Set),!e.has(f)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let l;if(a.constructor===n.CSSStyleSheet)l=a;else{l=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)l.insertRule(a.cssRules[t].cssText,t)}u?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(f)}}return f})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);J(t,e,i,n),f&&(f.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(l=i["s-p"])?l:[],n=()=>K(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},J=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,q(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},K=t=>{const e=t.$hostElement$,n=e,l=t.M;T(n,"componentDidRender",void 0,e),64&t.i?T(n,"componentDidUpdate",void 0,e):(t.i|=64,X(e),T(n,"componentDidLoad",void 0,e),t._(e),l||Q()),t.k&&(t.k(),t.k=void 0),512&t.i&&b((()=>z(t,!1))),t.i&=-517},Q=()=>{b((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"ui-foundation"}});return t.dispatchEvent(e),e})(s)))},T=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},X=t=>t.classList.add("hydrated"),Z=(t,e,l,o)=>{const s=n(t);if(!s)return;const i=t,r=s.o.get(e),c=s.i,u=i;l=C(l,o.t[e][0]);const f=Number.isNaN(r)&&Number.isNaN(l);if(l!==r&&!f&&(s.o.set(e,l),2==(18&c))){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(l,r,e))return;z(s,!1)}},tt=(t,e)=>{var l,o;const s=t.prototype;if(e.t){const i=Object.entries(null!=(l=e.t)?l:{});i.map((([t,[l]])=>{if(31&l||32&l){const{get:o,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};o&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return o?o.apply(this):(e=t,n(this).o.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=n(this);if(s){if(i)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.o.get(t)&&(o=s.o.get(t)),i.apply(this,[C(o,l)]),void Z(this,t,o=32&l?this[t]:s.$hostElement$[t],e);Z(this,t,o,e)}}})}}));{const l=new Map;s.attributeChangedCallback=function(t,o,c){r.jmp((()=>{var r;const u=l.get(t),f=n(this);if(this.hasOwnProperty(u),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==c)return;if(null==u){const n=null==f?void 0:f.i;if(f&&n&&!(8&n)&&c!==o){const l=this,s=null==(r=e.A)?void 0:r[t];null==s||s.forEach((e=>{const[[s,i]]=Object.entries(e);null!=l[s]&&(128&n||1&i)&&l[s].call(l,c,o,t)}))}return}const a=i.find((([t])=>t===u));a&&4&a[1][0]&&(c=null!==c&&"false"!==c);const d=Object.getOwnPropertyDescriptor(s,u);c==this[u]||d.get&&!d.set||(this[u]=c)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(o=e.A)?o:{}),...i.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return l.set(n,t),n}))]))}}return t},et=(t,l)=>{const s={i:l[0],h:l[1]};s.t=l[2];const i=t.prototype.connectedCallback,u=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const l={i:0,$hostElement$:t,l:n,o:new Map,D:new Map};l.P=new Promise((t=>l._=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&n.i&&e(t,l)})(this,s)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!n(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&r.i)){const e=n(t);if(!e)return;const l=e.l,s=()=>{};if(1&e.i)(null==e?void 0:e.U)||(null==e?void 0:e.P)&&e.P.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){F(e,e.M=n);break}}l.t&&Object.entries(l.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=O(n);if(!o.has(e)){const l=()=>{};((t,e,n)=>{let l=o.get(t);c&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,o.set(t,l)})(e,t,!!(1&n.i)),l()}}const s=e.M,i=()=>z(e,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(t,e,l)}s()}})(this),i&&i.call(this)},disconnectedCallback(){(async t=>{1&r.i||n(t),g.has(t)&&g.delete(t),t.shadowRoot&&g.has(t.shadowRoot)&&g.delete(t.shadowRoot)})(this),u&&u.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${s.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(this,s)}}),t.is=s.h,tt(t,s)},nt=t=>r.C=t,lt=t=>Object.assign(r,t);function ot(t,e){q({$hostElement$:e},t)}function st(t){return t}export{i as H,nt as a,lt as b,v as g,k as h,et as p,ot as r,$ as s,st as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as
|
|
1
|
+
import{t as r,p as o,H as t,h as e}from"./p-DIhfYQQy.js";const n=o(class extends t{constructor(r){super(),!1!==r&&this.__registerHost()}label;type="primary";rounded=!1;render(){return e("button",{key:"cbe817a5769ef625f4bc46b9b6224884c40e4d17",class:`btn ${this.type} ${this.rounded?"rounded":""}`,disabled:"disabled"===this.type},this.label)}static get style(){return".btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0;cursor:pointer}.btn.primary{background-color:#7009d1;color:#ffffff;border:1px solid #7009d1}.btn.primary:hover,.btn.primary:focus,.btn.primary:active{background-color:#5d02b3}.btn.secondary{background-color:#F3E8FD;color:#4A008F;border:1px solid #7009d1}.btn.secondary:hover,.btn.secondary:focus,.btn.secondary:active{background-color:#f7f5f9}.btn.rounded{border-radius:4px}.btn.rounded{border-radius:4px}.btn.disabled{background-color:#e5e7eb;color:#9ca3af;border-color:#d1d5db;cursor:not-allowed;opacity:0.7}"}},[512,"pn-button",{label:[1],type:[1],rounded:[4]}]);function d(){"undefined"!=typeof customElements&&["pn-button"].forEach((o=>{"pn-button"===o&&(customElements.get(r(o))||customElements.define(r(o),n))}))}d();const b=n,c=d;export{b as PnButton,c as defineCustomElement}
|
|
@@ -73,6 +73,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
73
73
|
hostElement.__stencil__getHostRef = () => ref;
|
|
74
74
|
return ref;
|
|
75
75
|
};
|
|
76
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
76
77
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
77
78
|
|
|
78
79
|
// src/client/client-load-module.ts
|
|
@@ -410,6 +411,11 @@ var isHost = (node) => node && node.$tag$ === Host;
|
|
|
410
411
|
// src/runtime/parse-property-value.ts
|
|
411
412
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
412
413
|
if (propValue != null && !isComplexType(propValue)) {
|
|
414
|
+
if (propType & 4 /* Boolean */) {
|
|
415
|
+
{
|
|
416
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
413
419
|
if (propType & 1 /* String */) {
|
|
414
420
|
return String(propValue);
|
|
415
421
|
}
|
|
@@ -426,6 +432,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
426
432
|
if (oldValue === newValue) {
|
|
427
433
|
return;
|
|
428
434
|
}
|
|
435
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
429
436
|
memberName.toLowerCase();
|
|
430
437
|
if (memberName === "class") {
|
|
431
438
|
const classList = elm.classList;
|
|
@@ -435,6 +442,39 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
435
442
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
436
443
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
437
444
|
}
|
|
445
|
+
} else if (memberName === "key") ; else {
|
|
446
|
+
const isComplex = isComplexType(newValue);
|
|
447
|
+
if ((isProp || isComplex && newValue !== null) && true) {
|
|
448
|
+
try {
|
|
449
|
+
if (!elm.tagName.includes("-")) {
|
|
450
|
+
const n = newValue == null ? "" : newValue;
|
|
451
|
+
if (memberName === "list") {
|
|
452
|
+
isProp = false;
|
|
453
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
454
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
455
|
+
elm[memberName] = n;
|
|
456
|
+
} else {
|
|
457
|
+
elm.setAttribute(memberName, n);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
} else if (elm[memberName] !== newValue) {
|
|
461
|
+
elm[memberName] = newValue;
|
|
462
|
+
}
|
|
463
|
+
} catch (e) {
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (newValue == null || newValue === false) {
|
|
467
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
468
|
+
{
|
|
469
|
+
elm.removeAttribute(memberName);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
473
|
+
newValue = newValue === true ? "" : newValue;
|
|
474
|
+
{
|
|
475
|
+
elm.setAttribute(memberName, newValue);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
438
478
|
}
|
|
439
479
|
};
|
|
440
480
|
var parseClassListRegex = /\s/;
|
|
@@ -460,7 +500,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
460
500
|
elm,
|
|
461
501
|
memberName,
|
|
462
502
|
oldVnodeAttrs[memberName],
|
|
463
|
-
void 0
|
|
503
|
+
void 0,
|
|
504
|
+
isSvgMode2,
|
|
505
|
+
newVnode.$flags$);
|
|
464
506
|
}
|
|
465
507
|
}
|
|
466
508
|
}
|
|
@@ -469,7 +511,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
469
511
|
elm,
|
|
470
512
|
memberName,
|
|
471
513
|
oldVnodeAttrs[memberName],
|
|
472
|
-
newVnodeAttrs[memberName]
|
|
514
|
+
newVnodeAttrs[memberName],
|
|
515
|
+
isSvgMode2,
|
|
516
|
+
newVnode.$flags$);
|
|
473
517
|
}
|
|
474
518
|
};
|
|
475
519
|
function sortedAttrNames(attrNames) {
|
|
@@ -482,6 +526,7 @@ function sortedAttrNames(attrNames) {
|
|
|
482
526
|
);
|
|
483
527
|
}
|
|
484
528
|
var hostTagName;
|
|
529
|
+
var isSvgMode = false;
|
|
485
530
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
486
531
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
487
532
|
let i2 = 0;
|
|
@@ -497,7 +542,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
497
542
|
newVNode2.$tag$
|
|
498
543
|
);
|
|
499
544
|
{
|
|
500
|
-
updateElement(null, newVNode2);
|
|
545
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
501
546
|
}
|
|
502
547
|
if (newVNode2.$children$) {
|
|
503
548
|
const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
|
|
@@ -646,7 +691,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
646
691
|
const text = newVNode2.$text$;
|
|
647
692
|
if (text == null) {
|
|
648
693
|
{
|
|
649
|
-
updateElement(oldVNode, newVNode2);
|
|
694
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
650
695
|
}
|
|
651
696
|
if (oldChildren !== null && newChildren !== null) {
|
|
652
697
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-BLqr1F3e.js';
|
|
2
|
+
export { s as setNonce } from './index-BLqr1F3e.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button",[[512,"pn-button",{"label":[1],"type":[1]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button",[[512,"pn-button",{"label":[1],"type":[1],"rounded":[4]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-BLqr1F3e.js';
|
|
2
2
|
|
|
3
|
-
const pnButtonCss = () => `.btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0
|
|
3
|
+
const pnButtonCss = () => `.btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0;cursor:pointer}.btn.primary{background-color:#7009d1;color:#ffffff;border:1px solid #7009d1}.btn.primary:hover,.btn.primary:focus,.btn.primary:active{background-color:#5d02b3}.btn.secondary{background-color:#F3E8FD;color:#4A008F;border:1px solid #7009d1}.btn.secondary:hover,.btn.secondary:focus,.btn.secondary:active{background-color:#f7f5f9}.btn.rounded{border-radius:4px}.btn.rounded{border-radius:4px}.btn.disabled{background-color:#e5e7eb;color:#9ca3af;border-color:#d1d5db;cursor:not-allowed;opacity:0.7}`;
|
|
4
4
|
|
|
5
5
|
const PnButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
label;
|
|
10
|
-
type;
|
|
10
|
+
type = 'primary';
|
|
11
|
+
rounded = false;
|
|
11
12
|
render() {
|
|
12
|
-
|
|
13
|
+
const isDisabled = this.type === 'disabled';
|
|
14
|
+
return h("button", { key: 'cbe817a5769ef625f4bc46b9b6224884c40e4d17', class: `btn ${this.type} ${this.rounded ? 'rounded' : ''}`, disabled: isDisabled }, this.label);
|
|
13
15
|
}
|
|
14
16
|
};
|
|
15
17
|
PnButton.style = pnButtonCss();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-BLqr1F3e.js';
|
|
2
|
+
export { s as setNonce } from './index-BLqr1F3e.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button",[[512,"pn-button",{"label":[1],"type":[1]}]]]], options);
|
|
20
|
+
return bootstrapLazy([["my-component",[[513,"my-component",{"first":[1],"middle":[1],"last":[1]}]]],["pn-button",[[512,"pn-button",{"label":[1],"type":[1],"rounded":[4]}]]]], options);
|
|
21
21
|
});
|
|
@@ -22,7 +22,14 @@ export namespace Components {
|
|
|
22
22
|
}
|
|
23
23
|
interface PnButton {
|
|
24
24
|
"label": string;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
"rounded": boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @default 'primary'
|
|
31
|
+
*/
|
|
32
|
+
"type": 'primary' | 'secondary' | 'disabled';
|
|
26
33
|
}
|
|
27
34
|
}
|
|
28
35
|
declare global {
|
|
@@ -60,7 +67,14 @@ declare namespace LocalJSX {
|
|
|
60
67
|
}
|
|
61
68
|
interface PnButton {
|
|
62
69
|
"label"?: string;
|
|
63
|
-
|
|
70
|
+
/**
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
"rounded"?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @default 'primary'
|
|
76
|
+
*/
|
|
77
|
+
"type"?: 'primary' | 'secondary' | 'disabled';
|
|
64
78
|
}
|
|
65
79
|
interface IntrinsicElements {
|
|
66
80
|
"my-component": MyComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-BLqr1F3e.js";import{format as s}from"./index.esm.js";const r=class{constructor(e){t(this,e)}first;middle;last;getText(){return s(this.first,this.middle,this.last)}render(){return e("div",{key:"70654fc83039b5f659efe99cc990e9b86d20dbe0"},"Hello, World! I'm ",this.getText())}};r.style=":host{display:block}";export{r as my_component}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>(0,console.error)(t,e),i=new Map,s=new Map,r="undefined"!=typeof window?window:{},c={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),f=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!f&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,h=[],p=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&c.u?b(y):c.raf(y))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},y=()=>{v(h),v(p),(d=h.length>0)&&c.raf(y)},b=t=>u().then(t),$=m(p,!0);function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(a?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var g,S=new WeakMap,O=t=>"sc-"+t.p,k=t=>"object"==(t=typeof t)||"function"===t,M=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!k(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?C(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),E={},x=(t,e)=>null==t||k(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,D=(t,e,n,o,l,i)=>{if(n===o)return;let s=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,l=R(n);let i=R(o);e.remove(...l.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!l.includes(t))))}else if("key"===e);else{const r=k(o);if(s||r&&null!==o)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?s=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!s||4&i||l)&&!r&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}},P=/\s/,R=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(P):[]),L=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of N(Object.keys(l)))t in i||D(o,t,l[t],void 0,n,e.u);for(const t of N(Object.keys(i)))D(o,t,l[t],i[t],n,e.u)};function N(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var U=!1,A=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=r.document.createTextNode(o.m);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.S),L(null,o,U),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=A(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=g,l},T=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===g&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=A(null,n,l),s&&(o[l].O=s,q(r,s,e)))},W=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},H=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),V=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?(L(t,e,U),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,m=o[0],v=o[p];const y="template"===n.S?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(H(d,m,l))V(d,m,l),d=e[++r],m=o[++c];else if(H(h,v,l))V(h,v,l),h=e[--a],v=o[--p];else if(H(d,v,l))V(d,v,l),q(y,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(H(h,m,l))V(h,m,l),q(y,h.O,d.O),h=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=A(e&&e[c],n,u):(V(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=A(e&&e[c],n,c),m=o[++c]),i&&q(d.O.parentNode,i,d.O)}r>a?T(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&W(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),T(o,null,e,i,0,i.length-1)):!n&&null!==l&&W(l,0,l.length-1)):t.m!==s&&(o.data=s)},q=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),z=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.k=()=>{e["s-p"].splice(n-1,1),o()})))}},F=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);z(t,t.M);const n=()=>G(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},G=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.C.length&&t.C.forEach((t=>t(n))),l=Q(o,"componentWillLoad",void 0,n)):l=Q(o,"componentWillUpdate",void 0,n),l=Y(l,(()=>Q(o,"componentWillRender",void 0,n))),Y(l,(()=>B(t,o,e)))},Y=(t,e)=>_(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),_=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,B=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=O(e),u=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,u)if("string"==typeof u){let l,s=S.get(t=t.head||t);if(s||S.set(t,s=new Set),!s.has(i)){l=r.document.createElement("style"),l.textContent=u;const d=null!=(n=c.D)?n:j(r.document);if(null!=d&&l.setAttribute("nonce",d),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(u),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=u+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(i)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(u.constructor===n.CSSStyleSheet)o=u;else{o=new n.CSSStyleSheet;for(let t=0;t<u.cssRules.length;t++)o.insertRule(u.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);I(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>J(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},I=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||C(null,null),i=(t=>t&&t.S===E)(e)?e:M(null,null,e);if(g=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.S=null,i.u|=4,t.P=i,i.O=l.O=o.shadowRoot||o,V(l,i,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},J=t=>{const e=t.$hostElement$,n=t.i,o=t.M;Q(n,"componentDidRender",void 0,e),64&t.u?Q(n,"componentDidUpdate",void 0,e):(t.u|=64,X(e),Q(n,"componentDidLoad",void 0,e),t.R(e),o||K()),t.k&&(t.k(),t.k=void 0),512&t.u&&b((()=>F(t,!1))),t.u&=-517},K=()=>{b((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"ui-foundation"}});return t.dispatchEvent(e),e})(r)))},Q=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},X=t=>t.classList.add("hydrated"),Z=(t,e,o,l)=>{const i=n(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=i.l.get(e),r=i.u,c=i.i;if(o=x(o,l.t[e][0]),!(8&r&&void 0!==s||o===s||Number.isNaN(s)&&Number.isNaN(o)||(i.l.set(e,o),2!=(18&r)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,e))return;F(i,!1)}},tt=(t,e,o)=>{var l,i;const s=t.prototype;if(e.t){const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const o=n(this),l=o?o.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=n(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(i=s.l.get(t)),r.call(this,x(i,l)),void Z(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return Z(this,t,i,e),void(1&o&&!s.i&&s.C.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=i)})));const n=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=x(i,l),Z(this,t,s.i[t],e)};s.i?n():s.C.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){c.jmp((()=>{var c;const u=o.get(t),f=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const n=null==f?void 0:f.u;if(f&&n&&!(8&n)&&i!==l){const o=f.i,s=null==(c=e.L)?void 0:c[t];null==s||s.forEach((e=>{const[[s,r]]=Object.entries(e);null!=o[s]&&(128&n||1&r)&&o[s].call(o,i,l,t)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.L)?i:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},et=(t,e)=>{Q(t,"connectedCallback",void 0,e)},nt=(t,e)=>{Q(t,"disconnectedCallback",void 0,e||t)},ot=(t,e={})=>{var o;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const u=[],a=e.exclude||[],d=r.customElements,h=r.document.head,p=h.querySelector("meta[charset]"),m=r.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(c,e),c.h=new URL(e.resourcesUrl||"./",r.document.baseURI).href,t.map((t=>{t[1].map((e=>{const o={u:e[0],p:e[1],t:e[2],N:e[3]};o.t=e[2];const r=o.p,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.A=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.C=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(t,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):c.jmp((()=>(t=>{if(!(1&c.u)){const e=n(t);if(!e)return;const o=e.o,r=()=>{};if(1&e.u)(null==e?void 0:e.i)?et(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>et(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){z(e,e.M=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.T){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.T;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.p}#${e.W}" was not found`);o.isProxied||(tt(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){l(e,t)}e.u&=-9,r(),et(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=O(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);f&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.u)),o()}}}const r=e.M,c=()=>F(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,o)}r()}})(this))))}disconnectedCallback(){c.jmp((()=>(async t=>{if(!(1&c.u)){const e=n(t);(null==e?void 0:e.i)?nt(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>nt(e.i,t)))}S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this))),c.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.O)instanceof Node&&!e.P.O.isConnected&&delete e.P.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.A}};o.T=t[0],a.includes(r)||d.get(r)||(u.push(r),d.define(r,tt(h,o,1)))}))})),u.length>0&&(m.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=c.D)?o:j(r.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):c.jmp((()=>y=setTimeout(K,30)))},lt=t=>c.D=t;export{ot as b,M as h,u as p,o as r,lt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,h as o}from"./p-BLqr1F3e.js";const d=class{constructor(o){r(this,o)}label;type="primary";rounded=!1;render(){return o("button",{key:"cbe817a5769ef625f4bc46b9b6224884c40e4d17",class:`btn ${this.type} ${this.rounded?"rounded":""}`,disabled:"disabled"===this.type},this.label)}};d.style=".btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0;cursor:pointer}.btn.primary{background-color:#7009d1;color:#ffffff;border:1px solid #7009d1}.btn.primary:hover,.btn.primary:focus,.btn.primary:active{background-color:#5d02b3}.btn.secondary{background-color:#F3E8FD;color:#4A008F;border:1px solid #7009d1}.btn.secondary:hover,.btn.secondary:focus,.btn.secondary:active{background-color:#f7f5f9}.btn.rounded{border-radius:4px}.btn.rounded{border-radius:4px}.btn.disabled{background-color:#e5e7eb;color:#9ca3af;border-color:#d1d5db;cursor:not-allowed;opacity:0.7}";export{d as pn_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as
|
|
1
|
+
import{p as t,b as e}from"./p-BLqr1F3e.js";export{s as setNonce}from"./p-BLqr1F3e.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const e=import.meta.url,o={};return""!==e&&(o.resourcesUrl=new URL(".",e).href),t(o)})().then((async t=>(await o(),e([["p-0684162b",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]],["p-f0c74d2f",[[512,"pn-button",{label:[1],type:[1],rounded:[4]}]]]],t))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parthi033/ui-foundation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@stencil/core": "^4.27.1",
|
|
46
|
+
"@stencil/sass": "^3.2.3",
|
|
46
47
|
"@types/jest": "^29.5.14",
|
|
47
48
|
"@types/node": "^22.13.5",
|
|
48
49
|
"jest": "^29.7.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>(0,console.error)(t,e),l=new Map,s="undefined"!=typeof window?window:{},i=s.HTMLElement||class{},r={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},c=(()=>{try{return!!s.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),u=!!c&&(()=>!!s.document&&Object.getOwnPropertyDescriptor(s.document.adoptedStyleSheets,"length").writable)(),f=!1,a=[],d=[],h=(t,e)=>n=>{t.push(n),f||(f=!0,e&&4&r.i?b(m):r.raf(m))},p=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},m=()=>{p(a),p(d),(f=a.length>0)&&r.raf(m)},b=t=>Promise.resolve(undefined).then(t),v=h(d,!0),$=t=>{const e=new URL(t,r.u);return e.origin!==s.location.origin?e.href:e.pathname},y=t=>r.u=t;function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(u?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}var j,g=new WeakMap,O=t=>"sc-"+t.h,S=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!S(o))&&(o=String(o)),s&&i?r[r.length-1].p+=o:r.push(s?M(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=M(t,null);return u.m=e,r.length>0&&(u.v=r),u.$=l,u},M=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,v:null,m:null,$:null}),E={},C=(t,e)=>null==t||S(t)?t:1&e?String(t):t,_=(t,e,n,o)=>{if(n!==o&&(e.toLowerCase(),"class"===e)){const e=t.classList,l=A(n);let s=A(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}},x=/\s/,A=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(x):[]),D=(t,e)=>{const n=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},l=e.m||{};for(const t of P(Object.keys(o)))t in l||_(n,t,o[t],void 0);for(const t of P(Object.keys(l)))_(n,t,o[t],l[t])};function P(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var U=(t,e,n)=>{const o=e.v[n];let l,i,r=0;if(null!=o.p)l=o.O=s.document.createTextNode(o.p);else{if(!s.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=s.document.createElement(o.j),D(null,o),o.v){const e="template"===o.j?l.content:l;for(r=0;r<o.v.length;++r)i=U(t,o,r),i&&e.appendChild(i)}}return l["s-hn"]=j,l},L=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);l<=s;++l)o[l]&&(i=U(null,n,l),i&&(o[l].O=i,N(r,i,e)))},R=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},W=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),H=(t,e,n=!1)=>{const o=e.O=t.O,l=t.v,s=e.v,i=e.p;null==i?(D(t,e),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,m=o[0],b=o[p];const v="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=o[++c];else if(null==b)b=o[--p];else if(W(d,m,l))H(d,m,l),d=e[++r],m=o[++c];else if(W(h,b,l))H(h,b,l),h=e[--a],b=o[--p];else if(W(d,b,l))H(d,b,l),N(v,d.O,h.O.nextSibling),d=e[++r],b=o[--p];else if(W(h,m,l))H(h,m,l),N(v,h.O,d.O),h=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].$&&e[f].$===m.$){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=U(e&&e[c],n,u):(H(i,m,l),e[u]=void 0,s=i.O),m=o[++c]):(s=U(e&&e[c],n,c),m=o[++c]),s&&N(d.O.parentNode,s,d.O)}r>a?L(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&R(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.p&&(o.textContent=""),L(o,null,e,s,0,s.length-1)):!n&&null!==l&&R(l,0,l.length-1)):t.p!==i&&(o.data=i)},N=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),V=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.S||M(null,null);var s;const i=(s=e)&&s.j===E?e:k(null,null,e);if(j=o.tagName,n&&i.m)for(const t of Object.keys(i.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=o[t]);i.j=null,i.i|=4,t.S=i,i.O=l.O=o.shadowRoot||o,H(l,i,n)},q=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.k=()=>{e["s-p"].splice(n-1,1),o()})))}},F=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);q(t,t.M);const n=()=>z(t,e);if(!e)return v(n);queueMicrotask((()=>{n()}))},z=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=Q(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=Y(l,(()=>Q(o,"componentWillRender",void 0,n))),Y(l,(()=>G(t,o,e)))},Y=(t,e)=>B(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),B=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,G=async(t,e,n)=>{var o;const i=t.$hostElement$,f=i["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.i,i=((t,e)=>{var n,o,i;const f=O(e),a=l.get(f);if(!s.document)return f;if(t=11===t.nodeType?t:s.document,a)if("string"==typeof a){let l,i=g.get(t=t.head||t);if(i||g.set(t,i=new Set),!i.has(f)){l=s.document.createElement("style"),l.textContent=a;const d=null!=(n=r.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=s.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(c){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),u?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(f)}}else{let e=g.get(t);if(e||g.set(t,e=new Set),!e.has(f)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let o;if(a.constructor===n.CSSStyleSheet)o=a;else{o=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)o.insertRule(a.cssRules[t].cssText,t)}u?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(f)}}return f})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);I(t,e,i,n),f&&(f.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(o=i["s-p"])?o:[],n=()=>J(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},I=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,V(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},J=t=>{const e=t.$hostElement$,n=e,o=t.M;Q(n,"componentDidRender",void 0,e),64&t.i?Q(n,"componentDidUpdate",void 0,e):(t.i|=64,T(e),Q(n,"componentDidLoad",void 0,e),t._(e),o||K()),t.k&&(t.k(),t.k=void 0),512&t.i&&b((()=>F(t,!1))),t.i&=-517},K=()=>{b((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"ui-foundation"}});return t.dispatchEvent(e),e})(s)))},Q=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},T=t=>t.classList.add("hydrated"),X=(t,e,o,l)=>{const s=n(t);if(!s)return;const i=t,r=s.l.get(e),c=s.i,u=i;o=C(o,l.t[e][0]);const f=Number.isNaN(r)&&Number.isNaN(o);if(o!==r&&!f&&(s.l.set(e,o),2==(18&c))){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(o,r,e))return;F(s,!1)}},Z=(t,e)=>{var o,l;const s=t.prototype;if(e.t){const i=Object.entries(null!=(o=e.t)?o:{});i.map((([t,[o]])=>{if(31&o||32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return l?l.apply(this):(e=t,n(this).l.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=n(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.apply(this,[C(l,o)]),void X(this,t,l=32&o?this[t]:s.$hostElement$[t],e);X(this,t,l,e)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,c){r.jmp((()=>{var r;const u=o.get(t),f=n(this);if(this.hasOwnProperty(u),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==c)return;if(null==u){const n=null==f?void 0:f.i;if(f&&n&&!(8&n)&&c!==l){const o=this,s=null==(r=e.A)?void 0:r[t];null==s||s.forEach((e=>{const[[s,i]]=Object.entries(e);null!=o[s]&&(128&n||1&i)&&o[s].call(o,c,l,t)}))}return}const a=i.find((([t])=>t===u));a&&4&a[1][0]&&(c=null!==c&&"false"!==c);const d=Object.getOwnPropertyDescriptor(s,u);c==this[u]||d.get&&!d.set||(this[u]=c)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=e.A)?l:{}),...i.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},tt=(t,o)=>{const s={i:o[0],h:o[1]};s.t=o[2];const i=t.prototype.connectedCallback,u=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const o={i:0,$hostElement$:t,o:n,l:new Map,D:new Map};o.P=new Promise((t=>o._=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&n.i&&e(t,o)})(this,s)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!n(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&r.i)){const e=n(t);if(!e)return;const o=e.o,s=()=>{};if(1&e.i)(null==e?void 0:e.U)||(null==e?void 0:e.P)&&e.P.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(e,e.M=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.i)&&(e.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=O(n);if(!l.has(e)){const o=()=>{};((t,e,n)=>{let o=l.get(t);c&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,l.set(t,o)})(e,t,!!(1&n.i)),o()}}const s=e.M,i=()=>F(e,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(t,e,o)}s()}})(this),i&&i.call(this)},disconnectedCallback(){(async t=>{1&r.i||n(t),g.has(t)&&g.delete(t),t.shadowRoot&&g.has(t.shadowRoot)&&g.delete(t.shadowRoot)})(this),u&&u.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${s.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(this,s)}}),t.is=s.h,Z(t,s)},et=t=>r.C=t,nt=t=>Object.assign(r,t);function ot(t,e){V({$hostElement$:e},t)}function lt(t){return t}export{i as H,et as a,nt as b,$ as g,k as h,tt as p,ot as r,y as s,lt as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-Cnv7sokw.js";import{format as e}from"./index.esm.js";const r=class{constructor(t){s(this,t)}first;middle;last;getText(){return e(this.first,this.middle,this.last)}render(){return t("div",{key:"70654fc83039b5f659efe99cc990e9b86d20dbe0"},"Hello, World! I'm ",this.getText())}};r.style=":host{display:block}";export{r as my_component}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as o}from"./p-Cnv7sokw.js";const c=class{constructor(o){r(this,o)}label;type;render(){return o("button",{key:"9095631c43730ec8e871bbce45817e1c45470c5a",class:"btn primary"},this.label)}};c.style=".btn{padding:0.5rem 1rem;font-weight:600;background:transparent;border:0 none;color:rgb(112, 9, 209);cursor:pointer}.btn.primary{background-color:#7009d1;color:#FFF}.btn.primary:hover,.btn.primary:focus,.btn.primary:active{background-color:#5d02b3;color:#FFF}.btn.secondary{border-color:#7009d1;background-color:#dec2f7;color:#7009d1}";export{c as pn_button}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t,e=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],l=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);l&&Object.defineProperty(t,n,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>(0,console.error)(t,e),i=new Map,s=new Map,r="undefined"!=typeof window?window:{},c={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},u=t=>Promise.resolve(t),a=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!a&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,h=[],p=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&c.u?y(b):c.raf(b))},v=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){l(t)}t.length=0},b=()=>{v(h),v(p),(d=h.length>0)&&c.raf(b)},y=t=>u().then(t),$=m(p,!0);function w(){const e=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(f?e.adoptedStyleSheets.push(t):e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])}function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var g,S=new WeakMap,O=t=>"sc-"+t.p,k=t=>"object"==(t=typeof t)||"function"===t,M=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!k(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?C(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=C(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},C=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),E={},x=(t,e)=>null==t||k(t)?t:1&e?t+"":t,D=(t,e,n,o)=>{if(n!==o&&(e.toLowerCase(),"class"===e)){const e=t.classList,l=R(n);let i=R(o);e.remove(...l.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!l.includes(t))))}},P=/\s/,R=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(P):[]),L=(t,e)=>{const n=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.v||{},l=e.v||{};for(const t of N(Object.keys(o)))t in l||D(n,t,o[t],void 0);for(const t of N(Object.keys(l)))D(n,t,o[t],l[t])};function N(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var U=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=r.document.createTextNode(o.m);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.S),L(null,o),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=U(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=g,l},A=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===g&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=U(null,n,l),s&&(o[l].O=s,V(r,s,e)))},T=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},W=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),H=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?(L(t,e),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],h=e[f],p=o.length-1,m=o[0],v=o[p];const b="template"===n.S?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(W(d,m,l))H(d,m,l),d=e[++r],m=o[++c];else if(W(h,v,l))H(h,v,l),h=e[--f],v=o[--p];else if(W(d,v,l))H(d,v,l),V(b,d.O,h.O.nextSibling),d=e[++r],v=o[--p];else if(W(h,m,l))H(h,m,l),V(b,h.O,d.O),h=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.S!==m.S?i=U(e&&e[c],n,u):(H(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=U(e&&e[c],n,c),m=o[++c]),i&&V(d.O.parentNode,i,d.O)}r>f?A(t,null==o[p+1]?null:o[p+1].O,n,o,c,p):c>p&&T(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),A(o,null,e,i,0,i.length-1)):!n&&null!==l&&T(l,0,l.length-1)):t.m!==s&&(o.data=s)},V=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),q=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.k=()=>{e["s-p"].splice(n-1,1),o()})))}},z=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);q(t,t.M);const n=()=>F(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},F=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.C.length&&t.C.forEach((t=>t(n))),l=K(o,"componentWillLoad",void 0,n)):l=K(o,"componentWillUpdate",void 0,n),l=G(l,(()=>K(o,"componentWillRender",void 0,n))),G(l,(()=>_(t,o,e)))},G=(t,e)=>Y(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Y=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,_=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=O(e),u=s.get(i);if(!r.document)return i;if(t=11===t.nodeType?t:r.document,u)if("string"==typeof u){let l,s=S.get(t=t.head||t);if(s||S.set(t,s=new Set),!s.has(i)){l=r.document.createElement("style"),l.textContent=u;const d=null!=(n=c.D)?n:j(r.document);if(null!=d&&l.setAttribute("nonce",d),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(u),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=u+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(i)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(u.constructor===n.CSSStyleSheet)o=u;else{o=new n.CSSStyleSheet;for(let t=0;t<u.cssRules.length;t++)o.insertRule(u.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);B(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>I(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},B=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||C(null,null),i=(t=>t&&t.S===E)(e)?e:M(null,null,e);if(g=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.S=null,i.u|=4,t.P=i,i.O=l.O=o.shadowRoot||o,H(l,i,n)})(t,e,o)}catch(e){l(e,t.$hostElement$)}return null},I=t=>{const e=t.$hostElement$,n=t.i,o=t.M;K(n,"componentDidRender",void 0,e),64&t.u?K(n,"componentDidUpdate",void 0,e):(t.u|=64,Q(e),K(n,"componentDidLoad",void 0,e),t.R(e),o||J()),t.k&&(t.k(),t.k=void 0),512&t.u&&y((()=>z(t,!1))),t.u&=-517},J=()=>{y((()=>(t=>{const e=c.ce("appload",{detail:{namespace:"ui-foundation"}});return t.dispatchEvent(e),e})(r)))},K=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){l(t,o)}},Q=t=>t.classList.add("hydrated"),X=(t,e,o,l)=>{const i=n(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=i.l.get(e),r=i.u,c=i.i;if(o=x(o,l.t[e][0]),!(8&r&&void 0!==s||o===s||Number.isNaN(s)&&Number.isNaN(o)||(i.l.set(e,o),2!=(18&r)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(o,s,e))return;z(i,!1)}},Z=(t,e,o)=>{var l,i;const s=t.prototype;if(e.t){const r=Object.entries(null!=(l=e.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:i,set:r}=Object.getOwnPropertyDescriptor(s,t)||{};i&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),(1&o||!i)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>n(this).l.get(e))(0,t);const o=n(this),l=o?o.i:s;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(i){const s=n(this);if(s){if(r)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(i=s.l.get(t)),r.call(this,x(i,l)),void X(this,t,i=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return X(this,t,i,e),void(1&o&&!s.i&&s.C.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=i)})));const n=()=>{const n=s.i[t];!s.l.get(t)&&n&&s.l.set(t,n),s.i[t]=x(i,l),X(this,t,s.i[t],e)};s.i?n():s.C.push((()=>{n()}))}}}})}})),1&o){const o=new Map;s.attributeChangedCallback=function(t,l,i){c.jmp((()=>{var c;const u=o.get(t),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&i!==l){const o=a.i,s=null==(c=e.L)?void 0:c[t];null==s||s.forEach((e=>{const[[s,r]]=Object.entries(e);null!=o[s]&&(128&n||1&r)&&o[s].call(o,i,l,t)}))}return}const f=r.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(s,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=e.L)?i:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},tt=(t,e)=>{K(t,"connectedCallback",void 0,e)},et=(t,e)=>{K(t,"disconnectedCallback",void 0,e||t)},nt=(t,e={})=>{var o;if(!r.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const u=[],f=e.exclude||[],d=r.customElements,h=r.document.head,p=h.querySelector("meta[charset]"),m=r.document.createElement("style"),v=[];let b,y=!0;if(Object.assign(c,e),c.h=new URL(e.resourcesUrl||"./",r.document.baseURI).href,t.map((t=>{t[1].map((e=>{const o={u:e[0],p:e[1],t:e[2],N:e[3]};o.t=e[2];const r=o.p,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,U:new Map};n.A=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.C=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,o),1&o.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else w.call(t,o)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),y?v.push(this):c.jmp((()=>(t=>{if(!(1&c.u)){const e=n(t);if(!e)return;const o=e.o,r=()=>{};if(1&e.u)(null==e?void 0:e.i)?tt(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>tt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(e,e.M=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.T){const s=((t,e)=>{const n=t.p.replace(/-/g,"_"),o=t.T;if(!o)return;const s=i.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{l(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.p}#${e.W}" was not found`);o.isProxied||(Z(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){l(e,t)}e.u&=-9,r(),tt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=O(n);if(!s.has(e)){const o=()=>{};((t,e,n)=>{let o=s.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,s.set(t,o)})(e,t,!!(1&n.u)),o()}}}const r=e.M,c=()=>z(e,!0);r&&r["s-rc"]?r["s-rc"].push(c):c()})(t,e,o)}r()}})(this))))}disconnectedCallback(){c.jmp((()=>(async t=>{if(!(1&c.u)){const e=n(t);(null==e?void 0:e.i)?et(e.i,t):(null==e?void 0:e.A)&&e.A.then((()=>et(e.i,t)))}S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this))),c.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.O)instanceof Node&&!e.P.O.isConnected&&delete e.P.O}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.A}};o.T=t[0],f.includes(r)||d.get(r)||(u.push(r),d.define(r,Z(h,o,1)))}))})),u.length>0&&(m.textContent+=u.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=c.D)?o:j(r.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,p?p.nextSibling:h.firstChild)}y=!1,v.length?v.map((t=>t.connectedCallback())):c.jmp((()=>b=setTimeout(J,30)))},ot=t=>c.D=t;export{nt as b,M as h,u as p,o as r,ot as s}
|