@scouterna/ui-webc 0.2.10 → 2.0.0
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-M8pbc2b8.js → index-D42maJcS.js} +455 -9
- package/dist/cjs/index-D42maJcS.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/scout-bottom-bar-item.cjs.entry.js +3 -2
- package/dist/cjs/scout-bottom-bar-item.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-bottom-bar.cjs.entry.js +3 -2
- package/dist/cjs/scout-bottom-bar.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-button.cjs.entry.js +3 -2
- package/dist/cjs/scout-button.entry.cjs.js.map +1 -1
- package/dist/cjs/scout-card.cjs.entry.js +19 -0
- package/dist/cjs/scout-card.entry.cjs.js.map +1 -0
- package/dist/cjs/scout-checkbox.cjs.entry.js +53 -0
- package/dist/cjs/scout-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/scout-field.cjs.entry.js +47 -0
- package/dist/cjs/scout-field.entry.cjs.js.map +1 -0
- package/dist/cjs/scout-input.cjs.entry.js +72 -0
- package/dist/cjs/scout-input.entry.cjs.js.map +1 -0
- package/dist/cjs/scout-switch.cjs.entry.js +49 -0
- package/dist/cjs/scout-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/ui-webc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/bottom-bar/bottom-bar.js +2 -1
- package/dist/collection/components/bottom-bar/bottom-bar.js.map +1 -1
- package/dist/collection/components/bottom-bar-item/bottom-bar-item.js +2 -1
- package/dist/collection/components/bottom-bar-item/bottom-bar-item.js.map +1 -1
- package/dist/collection/components/button/button.js +2 -1
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/card/card.css +8 -0
- package/dist/collection/components/card/card.js +23 -0
- package/dist/collection/components/card/card.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.css +81 -0
- package/dist/collection/components/checkbox/checkbox.js +176 -0
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/field/field.css +26 -0
- package/dist/collection/components/field/field.js +119 -0
- package/dist/collection/components/field/field.js.map +1 -0
- package/dist/collection/components/input/input.css +15 -0
- package/dist/collection/components/input/input.js +259 -0
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/switch/switch.css +79 -0
- package/dist/collection/components/switch/switch.js +173 -0
- package/dist/collection/components/switch/switch.js.map +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CMd0pUms.js → p-MfRr-Vl1.js} +448 -10
- package/dist/components/p-MfRr-Vl1.js.map +1 -0
- package/dist/components/scout-bottom-bar-item.js +4 -3
- package/dist/components/scout-bottom-bar-item.js.map +1 -1
- package/dist/components/scout-bottom-bar.js +4 -3
- package/dist/components/scout-bottom-bar.js.map +1 -1
- package/dist/components/scout-button.js +4 -3
- package/dist/components/scout-button.js.map +1 -1
- package/dist/components/scout-card.d.ts +11 -0
- package/dist/components/scout-card.js +39 -0
- package/dist/components/scout-card.js.map +1 -0
- package/dist/components/scout-checkbox.d.ts +11 -0
- package/dist/components/scout-checkbox.js +78 -0
- package/dist/components/scout-checkbox.js.map +1 -0
- package/dist/components/scout-field.d.ts +11 -0
- package/dist/components/scout-field.js +72 -0
- package/dist/components/scout-field.js.map +1 -0
- package/dist/components/scout-input.d.ts +11 -0
- package/dist/components/scout-input.js +99 -0
- package/dist/components/scout-input.js.map +1 -0
- package/dist/components/scout-switch.d.ts +11 -0
- package/dist/components/scout-switch.js +75 -0
- package/dist/components/scout-switch.js.map +1 -0
- package/dist/custom-elements.json +732 -14
- package/dist/esm/{index-BKWL7m90.js → index-DByXnE9g.js} +455 -10
- package/dist/esm/index-DByXnE9g.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/scout-bottom-bar-item.entry.js +3 -2
- package/dist/esm/scout-bottom-bar-item.entry.js.map +1 -1
- package/dist/esm/scout-bottom-bar.entry.js +3 -2
- package/dist/esm/scout-bottom-bar.entry.js.map +1 -1
- package/dist/esm/scout-button.entry.js +3 -2
- package/dist/esm/scout-button.entry.js.map +1 -1
- package/dist/esm/scout-card.entry.js +17 -0
- package/dist/esm/scout-card.entry.js.map +1 -0
- package/dist/esm/scout-checkbox.entry.js +51 -0
- package/dist/esm/scout-checkbox.entry.js.map +1 -0
- package/dist/esm/scout-field.entry.js +45 -0
- package/dist/esm/scout-field.entry.js.map +1 -0
- package/dist/esm/scout-input.entry.js +70 -0
- package/dist/esm/scout-input.entry.js.map +1 -0
- package/dist/esm/scout-switch.entry.js +47 -0
- package/dist/esm/scout-switch.entry.js.map +1 -0
- package/dist/esm/ui-webc.js +3 -3
- package/dist/types/components/card/card.d.ts +6 -0
- package/dist/types/components/checkbox/checkbox.d.ts +22 -0
- package/dist/types/components/field/field.d.ts +23 -0
- package/dist/types/components/input/input.d.ts +47 -0
- package/dist/types/components/switch/switch.d.ts +25 -0
- package/dist/types/components.d.ts +286 -0
- package/dist/ui-webc/p-24632b65.entry.js +2 -0
- package/dist/ui-webc/p-24632b65.entry.js.map +1 -0
- package/dist/ui-webc/p-2b434594.entry.js +2 -0
- package/dist/ui-webc/p-2b434594.entry.js.map +1 -0
- package/dist/ui-webc/p-383736c1.entry.js +2 -0
- package/dist/ui-webc/p-383736c1.entry.js.map +1 -0
- package/dist/ui-webc/p-7245a55a.entry.js +2 -0
- package/dist/ui-webc/p-7245a55a.entry.js.map +1 -0
- package/dist/ui-webc/{p-5a234307.entry.js → p-99329c64.entry.js} +2 -2
- package/dist/ui-webc/p-99329c64.entry.js.map +1 -0
- package/dist/ui-webc/p-9b7c270d.entry.js +2 -0
- package/dist/ui-webc/p-9b7c270d.entry.js.map +1 -0
- package/dist/ui-webc/p-DByXnE9g.js +3 -0
- package/dist/ui-webc/p-DByXnE9g.js.map +1 -0
- package/dist/ui-webc/p-c0c3a4af.entry.js +2 -0
- package/dist/ui-webc/p-c0c3a4af.entry.js.map +1 -0
- package/dist/ui-webc/p-e7602729.entry.js +2 -0
- package/dist/ui-webc/p-e7602729.entry.js.map +1 -0
- package/dist/ui-webc/scout-bottom-bar-item.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-bottom-bar.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-button.entry.esm.js.map +1 -1
- package/dist/ui-webc/scout-card.entry.esm.js.map +1 -0
- package/dist/ui-webc/scout-checkbox.entry.esm.js.map +1 -0
- package/dist/ui-webc/scout-field.entry.esm.js.map +1 -0
- package/dist/ui-webc/scout-input.entry.esm.js.map +1 -0
- package/dist/ui-webc/scout-switch.entry.esm.js.map +1 -0
- package/dist/ui-webc/ui-webc.css +13 -1
- package/dist/ui-webc/ui-webc.esm.js +1 -1
- package/package.json +3 -5
- package/dist/cjs/index-M8pbc2b8.js.map +0 -1
- package/dist/components/p-CMd0pUms.js.map +0 -1
- package/dist/esm/index-BKWL7m90.js.map +0 -1
- package/dist/ui-webc/p-2b13b5cd.entry.js +0 -2
- package/dist/ui-webc/p-2b13b5cd.entry.js.map +0 -1
- package/dist/ui-webc/p-5a234307.entry.js.map +0 -1
- package/dist/ui-webc/p-BKWL7m90.js +0 -3
- package/dist/ui-webc/p-BKWL7m90.js.map +0 -1
- package/dist/ui-webc/p-d1aadf34.entry.js +0 -2
- package/dist/ui-webc/p-d1aadf34.entry.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const globalStyles = ":root{--misc-color-annotations:#ff00ff;--color-blue-50:#e6eeff;--color-blue-100:#d0e0ff;--color-blue-200:#9cc3ff;--color-blue-300:#58a6ff;--color-blue-400:#0087e3;--color-blue-500:#006bb5;--color-blue-600:#00508a;--color-blue-700:#003660;--color-blue-800:#002748;--color-blue-900:#00162d;--color-blue-950:#000f21;--color-neutral-50:#ebf1f7;--color-neutral-100:#d7e4f0;--color-neutral-200:#b1cde3;--color-neutral-300:#87b3d4;--color-neutral-400:#749bb7;--color-neutral-500:#608199;--color-neutral-600:#4c667a;--color-neutral-700:#374b5a;--color-neutral-800:#25343f;--color-neutral-900:#131d24;--color-neutral-950:#0a1217;--color-white:#ffffff;--color-challengerpink-50:#fff0f2;--color-challengerpink-100:#ffdde3;--color-challengerpink-200:#ffbac7;--color-challengerpink-300:#ff93ab;--color-challengerpink-400:#ff668e;--color-challengerpink-500:#ff1271;--color-challengerpink-600:#da005e;--color-challengerpink-700:#a60046;--color-challengerpink-800:#72002e;--color-challengerpink-900:#470019;--color-challengerpink-950:#30000f;--color-orange-50:#fffbeb;--color-orange-100:#fef3c7;--color-orange-200:#fde68a;--color-orange-300:#fcd34d;--color-orange-400:#fbbf24;--color-orange-500:#f59e0b;--color-orange-600:#d97706;--color-orange-700:#b45309;--color-orange-800:#92400e;--color-orange-900:#78350f;--color-orange-950:#451a03;--color-gray-50:#f3f3f4;--color-gray-100:#e5e5e6;--color-gray-200:#cbccce;--color-gray-300:#b2b3b6;--color-gray-400:#9c9ea1;--color-gray-500:#85868a;--color-gray-600:#6e7073;--color-gray-700:#585a5c;--color-gray-800:#444547;--color-gray-900:#252627;--color-gray-950:#151616;--color-discovererblue-50:#eaf5ff;--color-discovererblue-100:#cde9ff;--color-discovererblue-200:#92d4ff;--color-discovererblue-300:#1ec0ff;--color-discovererblue-400:#00a8e1;--color-discovererblue-500:#008bbb;--color-discovererblue-600:#006d94;--color-discovererblue-700:#01516f;--color-discovererblue-800:#00394f;--color-discovererblue-900:#00202f;--color-discovererblue-950:#00131d;--color-trackergreen-50:#ccfec6;--color-trackergreen-100:#85fd72;--color-trackergreen-200:#5be23d;--color-trackergreen-300:#4ec333;--color-trackergreen-400:#41a629;--color-trackergreen-500:#348821;--color-trackergreen-600:#286c18;--color-trackergreen-700:#1c5110;--color-trackergreen-800:#113808;--color-trackergreen-900:#072103;--color-trackergreen-950:#031501;--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-200:#b9f8cf;--color-green-300:#7bf1a8;--color-green-400:#05df72;--color-green-500:#00c950;--color-green-600:#00a63e;--color-green-700:#008236;--color-green-800:#016630;--color-green-900:#0d542b;--color-green-950:#032e15;--color-red-50:#fef2f2;--color-red-100:#ffe2e2;--color-red-200:#ffc9c9;--color-red-300:#ffa2a2;--color-red-400:#ff6467;--color-red-500:#fb2c36;--color-red-600:#e7000b;--color-red-700:#c10007;--color-red-800:#9f0712;--color-red-900:#82181a;--color-red-950:#460809;--color-black:#000000;--color-roveryellow-50:#fffd62;--color-roveryellow-100:#f4f203;--color-roveryellow-200:#e2e000;--color-roveryellow-300:#c3c100;--color-roveryellow-400:#a4a300;--color-roveryellow-500:#878500;--color-roveryellow-600:#6a6900;--color-roveryellow-700:#515000;--color-roveryellow-800:#373700;--color-roveryellow-900:#1f1f00;--color-roveryellow-950:#121200;--color-adventurerorange-50:#fff1ee;--color-adventurerorange-100:#fee2dd;--color-adventurerorange-200:#fec0b4;--color-adventurerorange-300:#fda18b;--color-adventurerorange-400:#fd7a4c;--color-adventurerorange-500:#e95f13;--color-adventurerorange-600:#b94a0d;--color-adventurerorange-700:#8e3708;--color-adventurerorange-800:#622303;--color-adventurerorange-900:#3c1301;--color-adventurerorange-950:#280a01;--fontsize-base:16px;--fontfamily-sans:\"Source Sans 3 Variable\", sans-serif;--spacing-base:4px;--color-text-caution-base:var(--color-orange-700);--color-text-caution-bold-base:var(--color-orange-50);--color-text-brand-base:var(--color-blue-700);--color-text-brand-inverse:var(--color-white);--color-text-danger-base:var(--color-red-700);--color-text-danger-bold-base:var(--color-red-50);--color-text-positive-bold-base:var(--color-green-50);--color-text-positive-base:var(--color-green-700);--color-text-base:var(--color-neutral-800);--color-background-danger-base:var(--color-red-100);--color-background-danger-bold-base:var(--color-red-700);--color-background-danger-bold-hovered:var(--color-red-800);--color-background-danger-bold-pressed:var(--color-red-900);--color-background-brand-subtle-hovered:var(--color-blue-50);--color-background-brand-subtle-pressed:var(--color-blue-100);--color-background-brand-subtle-base:var(--color-blue-700);--color-background-brand-hovered:var(--color-blue-800);--color-background-brand-pressed:var(--color-blue-900);--color-background-brand-base:var(--color-blue-700);--color-background-positive-base:var(--color-green-100);--color-background-positive-bold-base:var(--color-green-700);--color-background-positive-bold-hovered:var(--color-green-800);--color-background-positive-bold-pressed:var(--color-green-900);--color-background-caution-base:var(--color-orange-100);--color-background-caution-bold-base:var(--color-orange-700);--color-background-caution-bold-hovered:var(--color-orange-800);--color-background-caution-bold-pressed:var(--color-orange-900);--fontsize-lg:calc(var(--fontsize-base)*1.125);--fontsize-sm:calc(var(--fontsize-base)*0.875);--fontsize-xs:calc(var(--fontsize-base)*0.75);--fontsize-3xl:calc(var(--fontsize-base)*1.875);--fontsize-4xl:calc(var(--fontsize-base)*2.25);--fontsize-2xl:calc(var(--fontsize-base)*1.5);--fontsize-xl:calc(var(--fontsize-base)*1.25);--fontsize-6xl:calc(var(--fontsize-base)*3.75);--fontsize-5xl:calc(var(--fontsize-base)*3);--spacing-1:calc(var(--spacing-base)*1);--spacing-2:calc(var(--spacing-base)*2);--spacing-3:calc(var(--spacing-base)*3);--spacing-4:calc(var(--spacing-base)*4);--spacing-5:calc(var(--spacing-base)*5);--spacing-6:calc(var(--spacing-base)*6);--spacing-7:calc(var(--spacing-base)*7);--spacing-8:calc(var(--spacing-base)*8);--spacing-10:calc(var(--spacing-base)*10);--spacing-11:calc(var(--spacing-base)*11);--spacing-12:calc(var(--spacing-base)*12);--spacing-14:calc(var(--spacing-base)*14);--spacing-16:calc(var(--spacing-base)*16);--spacing-17:calc(var(--spacing-base)*17);--spacing-18:calc(var(--spacing-base)*18);--spacing-20:calc(var(--spacing-base)*20);--spacing-24:calc(var(--spacing-base)*24);--spacing-28:calc(var(--spacing-base)*28);--spacing-32:calc(var(--spacing-base)*32);--spacing-36:calc(var(--spacing-base)*36);--spacing-40:calc(var(--spacing-base)*40);--spacing-48:calc(var(--spacing-base)*48);--spacing-52:calc(var(--spacing-base)*52);--spacing-56:calc(var(--spacing-base)*56);--spacing-60:calc(var(--spacing-base)*60);--spacing-64:calc(var(--spacing-base)*64);--spacing-72:calc(var(--spacing-base)*72);--spacing-80:calc(var(--spacing-base)*80);--spacing-96:calc(var(--spacing-base)*96);--spacing-180:calc(var(--spacing-base)*180);--spacing-195:calc(var(--spacing-base)*195);--spacing-212:calc(var(--spacing-base)*212);--spacing-380:calc(var(--spacing-base)*380);--type-body-base:400 var(--fontsize-base)/1.5 var(--fontfamily-sans);--type-body-sm:400 var(--fontsize-sm)/1.5 var(--fontfamily-sans);--type-body-lg:400 var(--fontsize-lg)/1.5 var(--fontfamily-sans);--type-body-xl:400 var(--fontsize-xl)/1.5 var(--fontfamily-sans);--type-body-2xl:400 var(--fontsize-2xl)/1.5 var(--fontfamily-sans);--type-heading-xl:600 var(--fontsize-6xl)/1.2 var(--fontfamily-sans);--type-heading-lg:600 var(--fontsize-5xl)/1.2 var(--fontfamily-sans);--type-heading-base:600 var(--fontsize-4xl)/1.2 var(--fontfamily-sans);--type-heading-sm:600 var(--fontsize-3xl)/1.2 var(--fontfamily-sans);--type-heading-xs:600 var(--fontsize-2xl)/1.2 var(--fontfamily-sans);--type-label-base:400 var(--fontsize-base)/1.2 var(--fontfamily-sans);--type-label-2xl:400 var(--fontsize-2xl)/1.2 var(--fontfamily-sans);--type-label-lg:400 var(--fontsize-lg)/1.2 var(--fontfamily-sans);--type-label-sm:400 var(--fontsize-sm)/1.2 var(--fontfamily-sans);--type-label-xl:400 var(--fontsize-xl)/1.2 var(--fontfamily-sans)}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;-webkit-text-decoration:underline;text-decoration:underline;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.scout-button{display:inline-flex;align-items:center;justify-content:center;gap:calc(4px*3);gap:var(--spacing-3);height:calc(4px*10);height:var(--spacing-10);padding:0 calc(4px*4);padding:0 var(--spacing-4);font:400 16px/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-base);border-radius:calc(4px*2);border-radius:var(--spacing-2);border:1px solid transparent;cursor:pointer}.scout-button svg{width:calc(4px*5);width:var(--spacing-5);height:calc(4px*5);height:var(--spacing-5);margin:0 calc((4px*1) * -1);margin:0 calc(calc(4px*1) * -1);margin:0 calc(var(--spacing-1) * -1)}.scout-button.primary{background-color:#003660;background-color:var(--color-background-brand-base);color:#ffffff;color:var(--color-text-brand-inverse)}.scout-button.primary:hover{background-color:#002748;background-color:var(--color-background-brand-hovered)}.scout-button.primary:active{background-color:#00162d;background-color:var(--color-background-brand-pressed)}.scout-button.outlined{background-color:transparent;border-color:#003660;border-color:var(--color-background-brand-subtle-base);color:#003660;color:var(--color-text-brand-base)}.scout-button.outlined:hover{background-color:#e6eeff;background-color:var(--color-background-brand-subtle-hovered)}.scout-button.outlined:active{background-color:#d0e0ff;background-color:var(--color-background-brand-subtle-pressed)}.scout-button.text{background-color:transparent;border-color:transparent;color:#003660;color:var(--color-text-brand-base)}.scout-button.text:hover{background-color:#e6eeff;background-color:var(--color-background-brand-subtle-hovered)}.scout-button.text:active{background-color:#d0e0ff;background-color:var(--color-background-brand-subtle-pressed)}.scout-button.caution{background-color:#b45309;background-color:var(--color-background-caution-bold-base);color:#fffbeb;color:var(--color-text-caution-bold-base)}.scout-button.caution:hover{background-color:#92400e;background-color:var(--color-background-caution-bold-hovered)}.scout-button.caution:active{background-color:#78350f;background-color:var(--color-background-caution-bold-pressed)}.scout-button.danger{background-color:#c10007;background-color:var(--color-background-danger-bold-base);color:#fef2f2;color:var(--color-text-danger-bold-base)}.scout-button.danger:hover{background-color:#9f0712;background-color:var(--color-background-danger-bold-hovered)}.scout-button.danger:active{background-color:#82181a;background-color:var(--color-background-danger-bold-pressed)}.scout-type-body-base{font:400 16px/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-base)}.scout-type-body-sm{font:400 calc(16px*0.875)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-sm)}.scout-type-body-lg{font:400 calc(16px*1.125)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-lg)}.scout-type-body-xl{font:400 calc(16px*1.25)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-xl)}.scout-type-body-2xl{font:400 calc(16px*1.5)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-2xl)}.scout-type-heading-xl{font:600 calc(16px*3.75)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-xl)}.scout-type-heading-lg{font:600 calc(16px*3)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-lg)}.scout-type-heading-base{font:600 calc(16px*2.25)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-base)}.scout-type-heading-sm{font:600 calc(16px*1.875)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-sm)}.scout-type-heading-xs{font:600 calc(16px*1.5)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-xs)}.scout-type-label-base{font:400 16px/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-base)}.scout-type-label-2xl{font:400 calc(16px*1.5)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-2xl)}.scout-type-label-lg{font:400 calc(16px*1.125)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-lg)}.scout-type-label-sm{font:400 calc(16px*0.875)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-sm)}.scout-type-label-xl{font:400 calc(16px*1.25)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-xl)}:root{font-family:\"Source Sans 3 Variable\", sans-serif;font-optical-sizing:auto;font-weight:400;font-style:normal}";
|
|
1
|
+
const globalStyles = ":root{--misc-color-annotations:#ff00ff;--color-blue-50:#e6eeff;--color-blue-100:#d0e0ff;--color-blue-200:#9cc3ff;--color-blue-300:#58a6ff;--color-blue-400:#0087e3;--color-blue-500:#006bb5;--color-blue-600:#00508a;--color-blue-700:#003660;--color-blue-800:#002748;--color-blue-900:#00162d;--color-blue-950:#000f21;--color-neutral-50:#ebf1f7;--color-neutral-100:#d7e4f0;--color-neutral-200:#b1cde3;--color-neutral-300:#87b3d4;--color-neutral-400:#749bb7;--color-neutral-500:#608199;--color-neutral-600:#4c667a;--color-neutral-700:#374b5a;--color-neutral-800:#25343f;--color-neutral-900:#131d24;--color-neutral-950:#0a1217;--color-white:#ffffff;--color-challengerpink-50:#fff0f2;--color-challengerpink-100:#ffdde3;--color-challengerpink-200:#ffbac7;--color-challengerpink-300:#ff93ab;--color-challengerpink-400:#ff668e;--color-challengerpink-500:#ff1271;--color-challengerpink-600:#da005e;--color-challengerpink-700:#a60046;--color-challengerpink-800:#72002e;--color-challengerpink-900:#470019;--color-challengerpink-950:#30000f;--color-orange-50:#fffbeb;--color-orange-100:#fef3c7;--color-orange-200:#fde68a;--color-orange-300:#fcd34d;--color-orange-400:#fbbf24;--color-orange-500:#f59e0b;--color-orange-600:#d97706;--color-orange-700:#b45309;--color-orange-800:#92400e;--color-orange-900:#78350f;--color-orange-950:#451a03;--color-gray-50:#f3f3f4;--color-gray-100:#e5e5e6;--color-gray-200:#cbccce;--color-gray-300:#b2b3b6;--color-gray-400:#9c9ea1;--color-gray-500:#85868a;--color-gray-600:#6e7073;--color-gray-700:#585a5c;--color-gray-800:#444547;--color-gray-900:#252627;--color-gray-950:#151616;--color-discovererblue-50:#eaf5ff;--color-discovererblue-100:#cde9ff;--color-discovererblue-200:#92d4ff;--color-discovererblue-300:#1ec0ff;--color-discovererblue-400:#00a8e1;--color-discovererblue-500:#008bbb;--color-discovererblue-600:#006d94;--color-discovererblue-700:#01516f;--color-discovererblue-800:#00394f;--color-discovererblue-900:#00202f;--color-discovererblue-950:#00131d;--color-trackergreen-50:#ccfec6;--color-trackergreen-100:#85fd72;--color-trackergreen-200:#5be23d;--color-trackergreen-300:#4ec333;--color-trackergreen-400:#41a629;--color-trackergreen-500:#348821;--color-trackergreen-600:#286c18;--color-trackergreen-700:#1c5110;--color-trackergreen-800:#113808;--color-trackergreen-900:#072103;--color-trackergreen-950:#031501;--color-green-50:#f0fdf4;--color-green-100:#dcfce7;--color-green-200:#b9f8cf;--color-green-300:#7bf1a8;--color-green-400:#05df72;--color-green-500:#00c950;--color-green-600:#00a63e;--color-green-700:#008236;--color-green-800:#016630;--color-green-900:#0d542b;--color-green-950:#032e15;--color-red-50:#fef2f2;--color-red-100:#ffe2e2;--color-red-200:#ffc9c9;--color-red-300:#ffa2a2;--color-red-400:#ff6467;--color-red-500:#fb2c36;--color-red-600:#e7000b;--color-red-700:#c10007;--color-red-800:#9f0712;--color-red-900:#82181a;--color-red-950:#460809;--color-black:#000000;--color-roveryellow-50:#fffd62;--color-roveryellow-100:#f4f203;--color-roveryellow-200:#e2e000;--color-roveryellow-300:#c3c100;--color-roveryellow-400:#a4a300;--color-roveryellow-500:#878500;--color-roveryellow-600:#6a6900;--color-roveryellow-700:#515000;--color-roveryellow-800:#373700;--color-roveryellow-900:#1f1f00;--color-roveryellow-950:#121200;--color-adventurerorange-50:#fff1ee;--color-adventurerorange-100:#fee2dd;--color-adventurerorange-200:#fec0b4;--color-adventurerorange-300:#fda18b;--color-adventurerorange-400:#fd7a4c;--color-adventurerorange-500:#e95f13;--color-adventurerorange-600:#b94a0d;--color-adventurerorange-700:#8e3708;--color-adventurerorange-800:#622303;--color-adventurerorange-900:#3c1301;--color-adventurerorange-950:#280a01;--fontsize-base:16px;--fontfamily-sans:\"Source Sans 3 Variable\", sans-serif;--spacing-base:4px;--color-text-caution-base:var(--color-orange-700);--color-text-caution-bold-base:var(--color-orange-50);--color-text-brand-base:var(--color-blue-700);--color-text-brand-inverse:var(--color-white);--color-text-danger-base:var(--color-red-700);--color-text-danger-bold-base:var(--color-red-50);--color-text-positive-bold-base:var(--color-green-50);--color-text-positive-base:var(--color-green-700);--color-text-base:var(--color-neutral-800);--color-background-danger-base:var(--color-red-100);--color-background-danger-bold-base:var(--color-red-700);--color-background-danger-bold-hovered:var(--color-red-800);--color-background-danger-bold-pressed:var(--color-red-900);--color-background-brand-subtle-hovered:var(--color-blue-50);--color-background-brand-subtle-pressed:var(--color-blue-100);--color-background-brand-subtle-base:var(--color-blue-700);--color-background-brand-hovered:var(--color-blue-800);--color-background-brand-pressed:var(--color-blue-900);--color-background-brand-base:var(--color-blue-700);--color-background-positive-base:var(--color-green-100);--color-background-positive-bold-base:var(--color-green-700);--color-background-positive-bold-hovered:var(--color-green-800);--color-background-positive-bold-pressed:var(--color-green-900);--color-background-caution-base:var(--color-orange-100);--color-background-caution-bold-base:var(--color-orange-700);--color-background-caution-bold-hovered:var(--color-orange-800);--color-background-caution-bold-pressed:var(--color-orange-900);--fontsize-lg:calc(var(--fontsize-base)*1.125);--fontsize-sm:calc(var(--fontsize-base)*0.875);--fontsize-xs:calc(var(--fontsize-base)*0.75);--fontsize-3xl:calc(var(--fontsize-base)*1.875);--fontsize-4xl:calc(var(--fontsize-base)*2.25);--fontsize-2xl:calc(var(--fontsize-base)*1.5);--fontsize-xl:calc(var(--fontsize-base)*1.25);--fontsize-6xl:calc(var(--fontsize-base)*3.75);--fontsize-5xl:calc(var(--fontsize-base)*3);--spacing-1:calc(var(--spacing-base)*1);--spacing-2:calc(var(--spacing-base)*2);--spacing-3:calc(var(--spacing-base)*3);--spacing-4:calc(var(--spacing-base)*4);--spacing-5:calc(var(--spacing-base)*5);--spacing-6:calc(var(--spacing-base)*6);--spacing-7:calc(var(--spacing-base)*7);--spacing-8:calc(var(--spacing-base)*8);--spacing-10:calc(var(--spacing-base)*10);--spacing-11:calc(var(--spacing-base)*11);--spacing-12:calc(var(--spacing-base)*12);--spacing-14:calc(var(--spacing-base)*14);--spacing-16:calc(var(--spacing-base)*16);--spacing-17:calc(var(--spacing-base)*17);--spacing-18:calc(var(--spacing-base)*18);--spacing-20:calc(var(--spacing-base)*20);--spacing-24:calc(var(--spacing-base)*24);--spacing-28:calc(var(--spacing-base)*28);--spacing-32:calc(var(--spacing-base)*32);--spacing-36:calc(var(--spacing-base)*36);--spacing-40:calc(var(--spacing-base)*40);--spacing-48:calc(var(--spacing-base)*48);--spacing-52:calc(var(--spacing-base)*52);--spacing-56:calc(var(--spacing-base)*56);--spacing-60:calc(var(--spacing-base)*60);--spacing-64:calc(var(--spacing-base)*64);--spacing-72:calc(var(--spacing-base)*72);--spacing-80:calc(var(--spacing-base)*80);--spacing-96:calc(var(--spacing-base)*96);--spacing-180:calc(var(--spacing-base)*180);--spacing-195:calc(var(--spacing-base)*195);--spacing-212:calc(var(--spacing-base)*212);--spacing-380:calc(var(--spacing-base)*380);--type-body-base:400 var(--fontsize-base)/1.5 var(--fontfamily-sans);--type-body-sm:400 var(--fontsize-sm)/1.5 var(--fontfamily-sans);--type-body-lg:400 var(--fontsize-lg)/1.5 var(--fontfamily-sans);--type-body-xl:400 var(--fontsize-xl)/1.5 var(--fontfamily-sans);--type-body-2xl:400 var(--fontsize-2xl)/1.5 var(--fontfamily-sans);--type-heading-xl:600 var(--fontsize-6xl)/1.2 var(--fontfamily-sans);--type-heading-lg:600 var(--fontsize-5xl)/1.2 var(--fontfamily-sans);--type-heading-base:600 var(--fontsize-4xl)/1.2 var(--fontfamily-sans);--type-heading-sm:600 var(--fontsize-3xl)/1.2 var(--fontfamily-sans);--type-heading-xs:600 var(--fontsize-2xl)/1.2 var(--fontfamily-sans);--type-label-base:400 var(--fontsize-base)/1.2 var(--fontfamily-sans);--type-label-2xl:400 var(--fontsize-2xl)/1.2 var(--fontfamily-sans);--type-label-lg:400 var(--fontsize-lg)/1.2 var(--fontfamily-sans);--type-label-sm:400 var(--fontsize-sm)/1.2 var(--fontfamily-sans);--type-label-xl:400 var(--fontsize-xl)/1.2 var(--fontfamily-sans)}/*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */*,::before,::after{box-sizing:border-box}html{font-family:system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji';line-height:1.15;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;}body{margin:0}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,\n SFMono-Regular,\n Consolas,\n 'Liberation Mono',\n Menlo,\n monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{border-color:currentcolor}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}summary{display:list-item}.scout-button{display:inline-flex;align-items:center;justify-content:center;gap:calc(4px*3);gap:var(--spacing-3);height:calc(4px*10);height:var(--spacing-10);padding:0 calc(4px*4);padding:0 var(--spacing-4);font:400 16px/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-base);border-radius:calc(4px*2);border-radius:var(--spacing-2);border:1px solid transparent;cursor:pointer}.scout-button svg{width:calc(4px*5);width:var(--spacing-5);height:calc(4px*5);height:var(--spacing-5);margin:0 calc((4px*1) * -1);margin:0 calc(calc(4px*1) * -1);margin:0 calc(var(--spacing-1) * -1)}.scout-button.primary{background-color:#003660;background-color:var(--color-background-brand-base);color:#ffffff;color:var(--color-text-brand-inverse)}.scout-button.primary:hover{background-color:#002748;background-color:var(--color-background-brand-hovered)}.scout-button.primary:active{background-color:#00162d;background-color:var(--color-background-brand-pressed)}.scout-button.outlined{background-color:transparent;border-color:#003660;border-color:var(--color-background-brand-subtle-base);color:#003660;color:var(--color-text-brand-base)}.scout-button.outlined:hover{background-color:#e6eeff;background-color:var(--color-background-brand-subtle-hovered)}.scout-button.outlined:active{background-color:#d0e0ff;background-color:var(--color-background-brand-subtle-pressed)}.scout-button.text{background-color:transparent;border-color:transparent;color:#003660;color:var(--color-text-brand-base)}.scout-button.text:hover{background-color:#e6eeff;background-color:var(--color-background-brand-subtle-hovered)}.scout-button.text:active{background-color:#d0e0ff;background-color:var(--color-background-brand-subtle-pressed)}.scout-button.caution{background-color:#b45309;background-color:var(--color-background-caution-bold-base);color:#fffbeb;color:var(--color-text-caution-bold-base)}.scout-button.caution:hover{background-color:#92400e;background-color:var(--color-background-caution-bold-hovered)}.scout-button.caution:active{background-color:#78350f;background-color:var(--color-background-caution-bold-pressed)}.scout-button.danger{background-color:#c10007;background-color:var(--color-background-danger-bold-base);color:#fef2f2;color:var(--color-text-danger-bold-base)}.scout-button.danger:hover{background-color:#9f0712;background-color:var(--color-background-danger-bold-hovered)}.scout-button.danger:active{background-color:#82181a;background-color:var(--color-background-danger-bold-pressed)}.scout-type-body-base{font:400 16px/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-base)}.scout-type-body-sm{font:400 calc(16px*0.875)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-sm)}.scout-type-body-lg{font:400 calc(16px*1.125)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-lg)}.scout-type-body-xl{font:400 calc(16px*1.25)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-xl)}.scout-type-body-2xl{font:400 calc(16px*1.5)/1.5 \"Source Sans 3 Variable\", sans-serif;font:var(--type-body-2xl)}.scout-type-heading-xl{font:600 calc(16px*3.75)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-xl)}.scout-type-heading-lg{font:600 calc(16px*3)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-lg)}.scout-type-heading-base{font:600 calc(16px*2.25)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-base)}.scout-type-heading-sm{font:600 calc(16px*1.875)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-sm)}.scout-type-heading-xs{font:600 calc(16px*1.5)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-heading-xs)}.scout-type-label-base{font:400 16px/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-base)}.scout-type-label-2xl{font:400 calc(16px*1.5)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-2xl)}.scout-type-label-lg{font:400 calc(16px*1.125)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-lg)}.scout-type-label-sm{font:400 calc(16px*0.875)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-sm)}.scout-type-label-xl{font:400 calc(16px*1.25)/1.2 \"Source Sans 3 Variable\", sans-serif;font:var(--type-label-xl)}:root{font-family:\"Source Sans 3 Variable\", sans-serif;font-optical-sizing:auto;font-weight:400;font-style:normal}";
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'ui-webc';
|
|
4
|
-
const BUILD = /* ui-webc */ { hydratedSelectorName: "hydrated", lazyLoad: false, propChangeCallback: false, updatable: true};
|
|
4
|
+
const BUILD = /* ui-webc */ { hydratedSelectorName: "hydrated", lazyLoad: false, propChangeCallback: false, slotRelocation: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
Stencil Client Platform v4.38.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -92,6 +92,23 @@ var plt = {
|
|
|
92
92
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
93
93
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
94
94
|
};
|
|
95
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
96
|
+
var _a;
|
|
97
|
+
let supportsListenerOptions2 = false;
|
|
98
|
+
try {
|
|
99
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
100
|
+
"e",
|
|
101
|
+
null,
|
|
102
|
+
Object.defineProperty({}, "passive", {
|
|
103
|
+
get() {
|
|
104
|
+
supportsListenerOptions2 = true;
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
} catch (e) {
|
|
109
|
+
}
|
|
110
|
+
return supportsListenerOptions2;
|
|
111
|
+
})();
|
|
95
112
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
96
113
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
97
114
|
try {
|
|
@@ -144,6 +161,9 @@ var getAssetPath = (path) => {
|
|
|
144
161
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
145
162
|
};
|
|
146
163
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
164
|
+
|
|
165
|
+
// src/utils/helpers.ts
|
|
166
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
147
167
|
var isComplexType = (o) => {
|
|
148
168
|
o = typeof o;
|
|
149
169
|
return o === "object" || o === "function";
|
|
@@ -221,7 +241,10 @@ function createStyleSheetIfNeededAndSupported(styles2) {
|
|
|
221
241
|
var globalStyleSheet;
|
|
222
242
|
function createShadowRoot(cmpMeta) {
|
|
223
243
|
var _a;
|
|
224
|
-
const shadowRoot = this.attachShadow({
|
|
244
|
+
const shadowRoot = this.attachShadow({
|
|
245
|
+
mode: "open",
|
|
246
|
+
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
|
|
247
|
+
}) ;
|
|
225
248
|
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
|
|
226
249
|
if (globalStyleSheet) {
|
|
227
250
|
if (supportsMutableAdoptedStyleSheets) {
|
|
@@ -231,6 +254,112 @@ function createShadowRoot(cmpMeta) {
|
|
|
231
254
|
}
|
|
232
255
|
}
|
|
233
256
|
}
|
|
257
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
258
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
259
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
260
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
261
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
262
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
263
|
+
slotNode.hidden = true;
|
|
264
|
+
} else {
|
|
265
|
+
slotNode.hidden = false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
let i2 = 0;
|
|
271
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
272
|
+
const childNode = childNodes[i2];
|
|
273
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
274
|
+
updateFallbackSlotVisibility(childNode);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
279
|
+
const result = [];
|
|
280
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
281
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
282
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
283
|
+
result.push(slottedNode);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return result;
|
|
287
|
+
};
|
|
288
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
289
|
+
let i2 = 0;
|
|
290
|
+
let slottedNodes = [];
|
|
291
|
+
let childNode;
|
|
292
|
+
for (; i2 < childNodes.length; i2++) {
|
|
293
|
+
childNode = childNodes[i2];
|
|
294
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
295
|
+
slottedNodes.push(childNode);
|
|
296
|
+
}
|
|
297
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
298
|
+
}
|
|
299
|
+
return slottedNodes;
|
|
300
|
+
}
|
|
301
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
302
|
+
const childNodes = [];
|
|
303
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
304
|
+
let node = slot;
|
|
305
|
+
while (node = node.nextSibling) {
|
|
306
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
307
|
+
}
|
|
308
|
+
return childNodes;
|
|
309
|
+
};
|
|
310
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
311
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
312
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
return false;
|
|
319
|
+
}
|
|
320
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
return slotName === "";
|
|
324
|
+
};
|
|
325
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
326
|
+
function patchSlotNode(node) {
|
|
327
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
328
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
329
|
+
const toReturn = [];
|
|
330
|
+
const slotName = this["s-sn"];
|
|
331
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
332
|
+
console.error(`
|
|
333
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
334
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
335
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
336
|
+
`);
|
|
337
|
+
}
|
|
338
|
+
const parent = this["s-cr"].parentElement;
|
|
339
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
340
|
+
slottedNodes.forEach((n) => {
|
|
341
|
+
if (slotName === getSlotName(n)) {
|
|
342
|
+
toReturn.push(n);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
if (elementsOnly) {
|
|
346
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
347
|
+
}
|
|
348
|
+
return toReturn;
|
|
349
|
+
}).bind(node);
|
|
350
|
+
node.assignedElements = assignedFactory(true);
|
|
351
|
+
node.assignedNodes = assignedFactory(false);
|
|
352
|
+
}
|
|
353
|
+
function internalCall(node, method) {
|
|
354
|
+
if ("__" + method in node) {
|
|
355
|
+
const toReturn = node["__" + method];
|
|
356
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
357
|
+
return toReturn.bind(node);
|
|
358
|
+
} else {
|
|
359
|
+
if (typeof node[method] !== "function") return node[method];
|
|
360
|
+
return node[method].bind(node);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
234
363
|
var createTime = (fnName, tagName = "") => {
|
|
235
364
|
{
|
|
236
365
|
return () => {
|
|
@@ -345,6 +474,7 @@ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
|
345
474
|
var h = (nodeName, vnodeData, ...children) => {
|
|
346
475
|
let child = null;
|
|
347
476
|
let key = null;
|
|
477
|
+
let slotName = null;
|
|
348
478
|
let simple = false;
|
|
349
479
|
let lastSimple = false;
|
|
350
480
|
const vNodeChildren = [];
|
|
@@ -371,6 +501,9 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
371
501
|
if (vnodeData.key) {
|
|
372
502
|
key = vnodeData.key;
|
|
373
503
|
}
|
|
504
|
+
if (vnodeData.name) {
|
|
505
|
+
slotName = vnodeData.name;
|
|
506
|
+
}
|
|
374
507
|
{
|
|
375
508
|
const classData = vnodeData.className || vnodeData.class;
|
|
376
509
|
if (classData) {
|
|
@@ -393,6 +526,9 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
393
526
|
{
|
|
394
527
|
vnode.$key$ = key;
|
|
395
528
|
}
|
|
529
|
+
{
|
|
530
|
+
vnode.$name$ = slotName;
|
|
531
|
+
}
|
|
396
532
|
return vnode;
|
|
397
533
|
};
|
|
398
534
|
var newVNode = (tag, text) => {
|
|
@@ -409,6 +545,9 @@ var newVNode = (tag, text) => {
|
|
|
409
545
|
{
|
|
410
546
|
vnode.$key$ = null;
|
|
411
547
|
}
|
|
548
|
+
{
|
|
549
|
+
vnode.$name$ = null;
|
|
550
|
+
}
|
|
412
551
|
return vnode;
|
|
413
552
|
};
|
|
414
553
|
var Host = {};
|
|
@@ -645,15 +784,44 @@ function sortedAttrNames(attrNames) {
|
|
|
645
784
|
attrNames
|
|
646
785
|
);
|
|
647
786
|
}
|
|
787
|
+
|
|
788
|
+
// src/runtime/vdom/vdom-render.ts
|
|
789
|
+
var scopeId;
|
|
790
|
+
var contentRef;
|
|
648
791
|
var hostTagName;
|
|
792
|
+
var useNativeShadowDom = false;
|
|
793
|
+
var checkSlotFallbackVisibility = false;
|
|
794
|
+
var checkSlotRelocate = false;
|
|
649
795
|
var isSvgMode = false;
|
|
650
796
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
797
|
+
var _a;
|
|
651
798
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
652
799
|
let i2 = 0;
|
|
653
800
|
let elm;
|
|
654
801
|
let childNode;
|
|
802
|
+
let oldVNode;
|
|
803
|
+
if (!useNativeShadowDom) {
|
|
804
|
+
checkSlotRelocate = true;
|
|
805
|
+
if (newVNode2.$tag$ === "slot") {
|
|
806
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
807
|
+
// slot element has fallback content
|
|
808
|
+
// still create an element that "mocks" the slot element
|
|
809
|
+
2 /* isSlotFallback */
|
|
810
|
+
) : (
|
|
811
|
+
// slot element does not have fallback content
|
|
812
|
+
// create an html comment we'll use to always reference
|
|
813
|
+
// where actual slot content should sit next to
|
|
814
|
+
1 /* isSlotReference */
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
655
818
|
if (newVNode2.$text$ !== null) {
|
|
656
819
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
820
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
821
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
822
|
+
{
|
|
823
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
824
|
+
}
|
|
657
825
|
} else {
|
|
658
826
|
if (!win.document) {
|
|
659
827
|
throw new Error(
|
|
@@ -661,11 +829,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
661
829
|
);
|
|
662
830
|
}
|
|
663
831
|
elm = newVNode2.$elm$ = win.document.createElement(
|
|
664
|
-
newVNode2.$tag$
|
|
832
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
665
833
|
);
|
|
666
834
|
{
|
|
667
835
|
updateElement(null, newVNode2, isSvgMode);
|
|
668
836
|
}
|
|
837
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
838
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
839
|
+
}
|
|
669
840
|
if (newVNode2.$children$) {
|
|
670
841
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
671
842
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -676,10 +847,46 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
676
847
|
}
|
|
677
848
|
}
|
|
678
849
|
elm["s-hn"] = hostTagName;
|
|
850
|
+
{
|
|
851
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
852
|
+
elm["s-sr"] = true;
|
|
853
|
+
elm["s-cr"] = contentRef;
|
|
854
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
855
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
856
|
+
patchSlotNode(elm);
|
|
857
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
858
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
859
|
+
{
|
|
860
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
{
|
|
864
|
+
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
679
868
|
return elm;
|
|
680
869
|
};
|
|
870
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
871
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
872
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
873
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
874
|
+
const childNode = oldSlotChildNodes[i2];
|
|
875
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
876
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
877
|
+
childNode["s-ol"].remove();
|
|
878
|
+
childNode["s-ol"] = void 0;
|
|
879
|
+
childNode["s-sh"] = void 0;
|
|
880
|
+
checkSlotRelocate = true;
|
|
881
|
+
}
|
|
882
|
+
if (recursive) {
|
|
883
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
887
|
+
};
|
|
681
888
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
682
|
-
let containerElm = parentElm;
|
|
889
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
683
890
|
let childNode;
|
|
684
891
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
685
892
|
containerElm = containerElm.shadowRoot;
|
|
@@ -689,7 +896,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
689
896
|
childNode = createElm(null, parentVNode, startIdx);
|
|
690
897
|
if (childNode) {
|
|
691
898
|
vnodes[startIdx].$elm$ = childNode;
|
|
692
|
-
insertBefore(containerElm, childNode, before);
|
|
899
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
693
900
|
}
|
|
694
901
|
}
|
|
695
902
|
}
|
|
@@ -701,6 +908,14 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
701
908
|
const elm = vnode.$elm$;
|
|
702
909
|
nullifyVNodeRefs(vnode);
|
|
703
910
|
if (elm) {
|
|
911
|
+
{
|
|
912
|
+
checkSlotFallbackVisibility = true;
|
|
913
|
+
if (elm["s-ol"]) {
|
|
914
|
+
elm["s-ol"].remove();
|
|
915
|
+
} else {
|
|
916
|
+
putBackInOriginalLocation(elm, true);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
704
919
|
elm.remove();
|
|
705
920
|
}
|
|
706
921
|
}
|
|
@@ -737,11 +952,17 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
737
952
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
738
953
|
newEndVnode = newCh[--newEndIdx];
|
|
739
954
|
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
955
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
956
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
957
|
+
}
|
|
740
958
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
741
959
|
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
742
960
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
743
961
|
newEndVnode = newCh[--newEndIdx];
|
|
744
962
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
963
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
964
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
965
|
+
}
|
|
745
966
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
746
967
|
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
747
968
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
@@ -772,7 +993,11 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
772
993
|
}
|
|
773
994
|
if (node) {
|
|
774
995
|
{
|
|
775
|
-
insertBefore(
|
|
996
|
+
insertBefore(
|
|
997
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
998
|
+
node,
|
|
999
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1000
|
+
);
|
|
776
1001
|
}
|
|
777
1002
|
}
|
|
778
1003
|
}
|
|
@@ -792,6 +1017,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
792
1017
|
};
|
|
793
1018
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
794
1019
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1020
|
+
if (leftVNode.$tag$ === "slot") {
|
|
1021
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
1022
|
+
}
|
|
795
1023
|
if (!isInitialRender) {
|
|
796
1024
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
797
1025
|
}
|
|
@@ -802,11 +1030,13 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
802
1030
|
}
|
|
803
1031
|
return false;
|
|
804
1032
|
};
|
|
1033
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
805
1034
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
806
1035
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
807
1036
|
const oldChildren = oldVNode.$children$;
|
|
808
1037
|
const newChildren = newVNode2.$children$;
|
|
809
1038
|
const text = newVNode2.$text$;
|
|
1039
|
+
let defaultHolder;
|
|
810
1040
|
if (text === null) {
|
|
811
1041
|
{
|
|
812
1042
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
@@ -824,10 +1054,62 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
824
1054
|
) {
|
|
825
1055
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
826
1056
|
} else ;
|
|
1057
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1058
|
+
defaultHolder.parentNode.textContent = text;
|
|
827
1059
|
} else if (oldVNode.$text$ !== text) {
|
|
828
1060
|
elm.data = text;
|
|
829
1061
|
}
|
|
830
1062
|
};
|
|
1063
|
+
var relocateNodes = [];
|
|
1064
|
+
var markSlotContentForRelocation = (elm) => {
|
|
1065
|
+
let node;
|
|
1066
|
+
let hostContentNodes;
|
|
1067
|
+
let j;
|
|
1068
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1069
|
+
for (const childNode of children) {
|
|
1070
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1071
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1072
|
+
const slotName = childNode["s-sn"];
|
|
1073
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1074
|
+
node = hostContentNodes[j];
|
|
1075
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
|
|
1076
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1077
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1078
|
+
checkSlotFallbackVisibility = true;
|
|
1079
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
1080
|
+
if (relocateNodeData) {
|
|
1081
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
1082
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
1083
|
+
} else {
|
|
1084
|
+
node["s-sh"] = childNode["s-hn"];
|
|
1085
|
+
relocateNodes.push({
|
|
1086
|
+
$slotRefNode$: childNode,
|
|
1087
|
+
$nodeToRelocate$: node
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
if (node["s-sr"]) {
|
|
1091
|
+
relocateNodes.map((relocateNode) => {
|
|
1092
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1093
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1094
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1095
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1101
|
+
relocateNodes.push({
|
|
1102
|
+
$nodeToRelocate$: node
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1109
|
+
markSlotContentForRelocation(childNode);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
831
1113
|
var nullifyVNodeRefs = (vNode) => {
|
|
832
1114
|
{
|
|
833
1115
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -835,12 +1117,38 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
835
1117
|
}
|
|
836
1118
|
};
|
|
837
1119
|
var insertBefore = (parent, newNode, reference) => {
|
|
1120
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
1121
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
1122
|
+
}
|
|
838
1123
|
{
|
|
839
1124
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
840
1125
|
}
|
|
841
1126
|
};
|
|
1127
|
+
function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
1128
|
+
var _a, _b;
|
|
1129
|
+
let scopeId2;
|
|
1130
|
+
if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
|
|
1131
|
+
const scopeName = slotNode["s-sn"];
|
|
1132
|
+
const hostName = slotNode["s-hn"];
|
|
1133
|
+
(_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
|
|
1134
|
+
if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
|
|
1135
|
+
let child = (oldParent.__childNodes || oldParent.childNodes)[0];
|
|
1136
|
+
let found = false;
|
|
1137
|
+
while (child) {
|
|
1138
|
+
if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
|
|
1139
|
+
found = true;
|
|
1140
|
+
break;
|
|
1141
|
+
}
|
|
1142
|
+
child = child.nextSibling;
|
|
1143
|
+
}
|
|
1144
|
+
if (!found) oldParent.classList.remove(scopeId2 + "-s");
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
842
1148
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1149
|
+
var _a, _b, _c, _d;
|
|
843
1150
|
const hostElm = hostRef.$hostElement$;
|
|
1151
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
844
1152
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
845
1153
|
const isHostElement = isHost(renderFnResults);
|
|
846
1154
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
@@ -856,7 +1164,81 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
856
1164
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
857
1165
|
hostRef.$vnode$ = rootVnode;
|
|
858
1166
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1167
|
+
{
|
|
1168
|
+
scopeId = hostElm["s-sc"];
|
|
1169
|
+
}
|
|
1170
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1171
|
+
{
|
|
1172
|
+
contentRef = hostElm["s-cr"];
|
|
1173
|
+
checkSlotFallbackVisibility = false;
|
|
1174
|
+
}
|
|
859
1175
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1176
|
+
{
|
|
1177
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1178
|
+
if (checkSlotRelocate) {
|
|
1179
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1180
|
+
for (const relocateData of relocateNodes) {
|
|
1181
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1182
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1183
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1184
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1185
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
for (const relocateData of relocateNodes) {
|
|
1189
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1190
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1191
|
+
if (slotRefNode) {
|
|
1192
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1193
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1194
|
+
{
|
|
1195
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1196
|
+
while (orgLocationNode) {
|
|
1197
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1198
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1199
|
+
refNode = refNode.nextSibling;
|
|
1200
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1201
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1202
|
+
}
|
|
1203
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
1204
|
+
insertBeforeNode = refNode;
|
|
1205
|
+
break;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1212
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1213
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1214
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1215
|
+
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1216
|
+
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1217
|
+
}
|
|
1218
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1219
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1220
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1225
|
+
} else {
|
|
1226
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1227
|
+
if (isInitialLoad) {
|
|
1228
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1229
|
+
}
|
|
1230
|
+
nodeToRelocate.hidden = true;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
if (checkSlotFallbackVisibility) {
|
|
1236
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1237
|
+
}
|
|
1238
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1239
|
+
relocateNodes.length = 0;
|
|
1240
|
+
}
|
|
1241
|
+
contentRef = void 0;
|
|
860
1242
|
};
|
|
861
1243
|
|
|
862
1244
|
// src/runtime/update-component.ts
|
|
@@ -1194,6 +1576,12 @@ var connectedCallback = (elm) => {
|
|
|
1194
1576
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1195
1577
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1196
1578
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1579
|
+
{
|
|
1580
|
+
if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1581
|
+
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
1582
|
+
setContentReference(elm);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1197
1585
|
{
|
|
1198
1586
|
let ancestorComponent = elm;
|
|
1199
1587
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
@@ -1216,6 +1604,7 @@ var connectedCallback = (elm) => {
|
|
|
1216
1604
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1217
1605
|
}
|
|
1218
1606
|
} else {
|
|
1607
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1219
1608
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1220
1609
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
1221
1610
|
}
|
|
@@ -1223,9 +1612,25 @@ var connectedCallback = (elm) => {
|
|
|
1223
1612
|
endConnected();
|
|
1224
1613
|
}
|
|
1225
1614
|
};
|
|
1615
|
+
var setContentReference = (elm) => {
|
|
1616
|
+
if (!win.document) {
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1619
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1620
|
+
""
|
|
1621
|
+
);
|
|
1622
|
+
contentRefElm["s-cn"] = true;
|
|
1623
|
+
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1624
|
+
};
|
|
1226
1625
|
var disconnectedCallback = async (elm) => {
|
|
1227
1626
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1228
|
-
getHostRef(elm);
|
|
1627
|
+
const hostRef = getHostRef(elm);
|
|
1628
|
+
{
|
|
1629
|
+
if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
|
|
1630
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1631
|
+
hostRef.$rmListeners$ = void 0;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1229
1634
|
}
|
|
1230
1635
|
if (rootAppliedStyles.has(elm)) {
|
|
1231
1636
|
rootAppliedStyles.delete(elm);
|
|
@@ -1242,6 +1647,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1242
1647
|
{
|
|
1243
1648
|
cmpMeta.$members$ = compactMeta[2];
|
|
1244
1649
|
}
|
|
1650
|
+
{
|
|
1651
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1652
|
+
}
|
|
1245
1653
|
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
1246
1654
|
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
1247
1655
|
Object.assign(Cstr.prototype, {
|
|
@@ -1255,6 +1663,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1255
1663
|
if (!hostRef) {
|
|
1256
1664
|
return;
|
|
1257
1665
|
}
|
|
1666
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
1258
1667
|
this.__hasHostListenerAttached = true;
|
|
1259
1668
|
}
|
|
1260
1669
|
connectedCallback(this);
|
|
@@ -1285,6 +1694,30 @@ var proxyCustomElement = (Cstr, compactMeta) => {
|
|
|
1285
1694
|
Cstr.is = cmpMeta.$tagName$;
|
|
1286
1695
|
return proxyComponent(Cstr, cmpMeta);
|
|
1287
1696
|
};
|
|
1697
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1698
|
+
if (listeners && win.document) {
|
|
1699
|
+
listeners.map(([flags, name, method]) => {
|
|
1700
|
+
const target = elm;
|
|
1701
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1702
|
+
const opts = hostListenerOpts(flags);
|
|
1703
|
+
plt.ael(target, name, handler, opts);
|
|
1704
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1709
|
+
try {
|
|
1710
|
+
{
|
|
1711
|
+
hostRef.$hostElement$[methodName](ev);
|
|
1712
|
+
}
|
|
1713
|
+
} catch (e) {
|
|
1714
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1715
|
+
}
|
|
1716
|
+
};
|
|
1717
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
1718
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
1719
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
1720
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
1288
1721
|
|
|
1289
1722
|
// src/runtime/nonce.ts
|
|
1290
1723
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
@@ -1294,13 +1727,18 @@ var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
|
1294
1727
|
|
|
1295
1728
|
// src/runtime/render.ts
|
|
1296
1729
|
function render(vnode, container) {
|
|
1730
|
+
const cmpMeta = {
|
|
1731
|
+
$flags$: 0,
|
|
1732
|
+
$tagName$: container.tagName
|
|
1733
|
+
};
|
|
1297
1734
|
const ref = {
|
|
1735
|
+
$cmpMeta$: cmpMeta,
|
|
1298
1736
|
$hostElement$: container
|
|
1299
1737
|
};
|
|
1300
1738
|
renderVdom(ref, vnode);
|
|
1301
1739
|
}
|
|
1302
1740
|
|
|
1303
1741
|
export { H, setNonce as a, setPlatformOptions as b, createEvent as c, getAssetPath as g, h, proxyCustomElement as p, render as r, setAssetPath as s };
|
|
1304
|
-
//# sourceMappingURL=p-
|
|
1742
|
+
//# sourceMappingURL=p-MfRr-Vl1.js.map
|
|
1305
1743
|
|
|
1306
|
-
//# sourceMappingURL=p-
|
|
1744
|
+
//# sourceMappingURL=p-MfRr-Vl1.js.map
|