@haiilo/catalyst 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/catalyst/catalyst.css +1 -1403
  2. package/dist/catalyst/catalyst.esm.js +1 -126
  3. package/dist/catalyst/index.esm.js +0 -1
  4. package/dist/catalyst/p-22fac0fb.js +1 -0
  5. package/dist/catalyst/p-2dc28db3.entry.js +11 -0
  6. package/dist/catalyst/{p-f3fad7a0.js → p-e08f13c7.js} +1 -1
  7. package/dist/cjs/{app-globals-8908fe44.js → app-globals-814f34aa.js} +5 -2
  8. package/dist/cjs/cat-alert_7.cjs.entry.js +3115 -0
  9. package/dist/cjs/{cat-icon-registry-da00f7d6.js → cat-icon-registry-909e38e7.js} +65 -1
  10. package/dist/cjs/catalyst.cjs.js +7 -114
  11. package/dist/cjs/loader.cjs.js +5 -20
  12. package/dist/collection/collection-manifest.json +6 -2
  13. package/dist/collection/components/cat-alert/cat-alert.css +57 -0
  14. package/dist/collection/components/cat-alert/cat-alert.js +49 -0
  15. package/dist/collection/components/cat-badge/cat-badge.css +154 -0
  16. package/dist/collection/components/cat-badge/cat-badge.js +141 -0
  17. package/dist/collection/components/cat-button/cat-button.css +43 -8
  18. package/dist/collection/components/cat-button/cat-button.js +28 -6
  19. package/dist/collection/components/cat-icon/cat-icon.css +2 -1
  20. package/dist/collection/components/cat-menu/cat-menu.css +33 -0
  21. package/dist/collection/components/cat-menu/cat-menu.js +185 -0
  22. package/dist/collection/components/cat-skeleton/cat-skeleton.css +177 -0
  23. package/dist/collection/components/cat-skeleton/cat-skeleton.js +130 -0
  24. package/dist/components/cat-alert.d.ts +11 -0
  25. package/dist/components/cat-alert.js +42 -0
  26. package/dist/components/cat-badge.d.ts +11 -0
  27. package/dist/components/cat-badge.js +66 -0
  28. package/dist/components/cat-button.js +14 -42
  29. package/dist/components/cat-icon2.js +4 -5
  30. package/dist/components/cat-menu.d.ts +11 -0
  31. package/dist/components/cat-menu.js +2377 -0
  32. package/dist/components/cat-skeleton.d.ts +11 -0
  33. package/dist/components/cat-skeleton.js +76 -0
  34. package/dist/components/cat-spinner2.js +3 -4
  35. package/dist/components/index.d.ts +1 -1
  36. package/dist/components/index.js +4 -575
  37. package/dist/esm/{app-globals-000601ea.js → app-globals-e1679c2d.js} +5 -2
  38. package/dist/esm/cat-alert_7.entry.js +3105 -0
  39. package/dist/esm/{cat-icon-registry-b66e3f57.js → cat-icon-registry-4d02ee6c.js} +65 -2
  40. package/dist/esm/catalyst.js +6 -113
  41. package/dist/esm/loader.js +4 -19
  42. package/dist/esm/polyfills/css-shim.js +1 -1
  43. package/dist/types/components/cat-alert/cat-alert.d.ts +12 -0
  44. package/dist/types/components/cat-badge/cat-badge.d.ts +28 -0
  45. package/dist/types/components/cat-button/cat-button.d.ts +5 -0
  46. package/dist/types/components/cat-menu/cat-menu.d.ts +32 -0
  47. package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +28 -0
  48. package/dist/types/components.d.ts +153 -0
  49. package/package.json +12 -9
  50. package/dist/catalyst/app-globals-622e4f87.js +0 -704
  51. package/dist/catalyst/cat-button.entry.js +0 -629
  52. package/dist/catalyst/cat-icon-registry-59da2e37.js +0 -43
  53. package/dist/catalyst/cat-icon.entry.js +0 -27
  54. package/dist/catalyst/cat-spinner.entry.js +0 -21
  55. package/dist/catalyst/css-shim-20dbffa5.js +0 -4
  56. package/dist/catalyst/dom-c5ed0ba5.js +0 -73
  57. package/dist/catalyst/index-72a1bbba.js +0 -3031
  58. package/dist/catalyst/p-17a20657.js +0 -1
  59. package/dist/catalyst/p-582935bb.entry.js +0 -1
  60. package/dist/catalyst/shadow-css-8c625855.js +0 -388
  61. package/dist/cjs/app-globals-fe9ff8ba.js +0 -706
  62. package/dist/cjs/cat-button.cjs.entry.js +0 -633
  63. package/dist/cjs/cat-button_3.cjs.entry.js +0 -645
  64. package/dist/cjs/cat-icon-registry-850c538c.js +0 -45
  65. package/dist/cjs/cat-icon.cjs.entry.js +0 -31
  66. package/dist/cjs/cat-spinner.cjs.entry.js +0 -25
  67. package/dist/cjs/css-shim-3bfdba4f.js +0 -6
  68. package/dist/cjs/dom-8ac1ad03.js +0 -75
  69. package/dist/cjs/index-083488c8.js +0 -3065
  70. package/dist/cjs/shadow-css-41d9783d.js +0 -390
  71. package/dist/esm/app-globals-622e4f87.js +0 -704
  72. package/dist/esm/cat-button.entry.js +0 -629
  73. package/dist/esm/cat-button_3.entry.js +0 -639
  74. package/dist/esm/cat-icon-registry-59da2e37.js +0 -43
  75. package/dist/esm/cat-icon.entry.js +0 -27
  76. package/dist/esm/cat-spinner.entry.js +0 -21
  77. package/dist/esm/css-shim-20dbffa5.js +0 -4
  78. package/dist/esm/dom-c5ed0ba5.js +0 -73
  79. package/dist/esm/index-72a1bbba.js +0 -3031
  80. package/dist/esm/shadow-css-8c625855.js +0 -388
@@ -246,6 +246,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
246
246
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
247
247
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
248
248
  }
249
+ else if (memberName === 'style') {
250
+ // update style attribute, css properties and values
251
+ {
252
+ for (const prop in oldValue) {
253
+ if (!newValue || newValue[prop] == null) {
254
+ if (prop.includes('-')) {
255
+ elm.style.removeProperty(prop);
256
+ }
257
+ else {
258
+ elm.style[prop] = '';
259
+ }
260
+ }
261
+ }
262
+ }
263
+ for (const prop in newValue) {
264
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
265
+ if (prop.includes('-')) {
266
+ elm.style.setProperty(prop, newValue[prop]);
267
+ }
268
+ else {
269
+ elm.style[prop] = newValue[prop];
270
+ }
271
+ }
272
+ }
273
+ }
249
274
  else if (memberName === 'ref') {
250
275
  // minifier will clean this up
251
276
  if (newValue) {
@@ -708,6 +733,7 @@ const postUpdateComponent = (hostRef) => {
708
733
  const tagName = hostRef.$cmpMeta$.$tagName$;
709
734
  const elm = hostRef.$hostElement$;
710
735
  const endPostUpdate = createTime('postUpdate', tagName);
736
+ const instance = hostRef.$lazyInstance$ ;
711
737
  const ancestorComponent = hostRef.$ancestorComponent$;
712
738
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
713
739
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -715,6 +741,9 @@ const postUpdateComponent = (hostRef) => {
715
741
  // DOM WRITE!
716
742
  addHydratedFlag(elm);
717
743
  }
744
+ {
745
+ safeCall(instance, 'componentDidLoad');
746
+ }
718
747
  endPostUpdate();
719
748
  {
720
749
  hostRef.$onReadyResolve$(elm);
@@ -769,6 +798,29 @@ const then = (promise, thenFn) => {
769
798
  };
770
799
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
771
800
  ;
801
+ /**
802
+ * Parse a new property value for a given property type.
803
+ *
804
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
805
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
806
+ * 1. `any`, the type given to `propValue` in the function signature
807
+ * 2. the type stored from `propType`.
808
+ *
809
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
810
+ *
811
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
812
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
813
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
814
+ * ```tsx
815
+ * <my-cmp prop-val={0}></my-cmp>
816
+ * ```
817
+ *
818
+ * HTML prop values on the other hand, will always a string
819
+ *
820
+ * @param propValue the new value to coerce to some type
821
+ * @param propType the type of the prop, expressed as a binary number
822
+ * @returns the parsed/coerced value
823
+ */
772
824
  const parsePropertyValue = (propValue, propType) => {
773
825
  // ensure this value is of the correct prop type
774
826
  if (propValue != null && !isComplexType(propValue)) {
@@ -777,6 +829,10 @@ const parsePropertyValue = (propValue, propType) => {
777
829
  // but we'll cheat here and say that the string "false" is the boolean false
778
830
  return propValue === 'false' ? false : propValue === '' || !!propValue;
779
831
  }
832
+ if (propType & 2 /* Number */) {
833
+ // force it to be a number
834
+ return parseFloat(propValue);
835
+ }
780
836
  if (propType & 1 /* String */) {
781
837
  // could have been passed as a number or boolean
782
838
  // but we still want it as a string
@@ -798,7 +854,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
798
854
  const flags = hostRef.$flags$;
799
855
  const instance = hostRef.$lazyInstance$ ;
800
856
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
801
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
857
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
858
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
859
+ const didValueChange = newVal !== oldVal && !areBothNaN;
860
+ if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
802
861
  // gadzooks! the property's value has changed!!
803
862
  // set our new value!
804
863
  hostRef.$instanceValues$.set(propName, newVal);
@@ -1059,12 +1118,16 @@ const connectedCallback = (elm) => {
1059
1118
  const disconnectedCallback = (elm) => {
1060
1119
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1061
1120
  const hostRef = getHostRef(elm);
1121
+ const instance = hostRef.$lazyInstance$ ;
1062
1122
  {
1063
1123
  if (hostRef.$rmListeners$) {
1064
1124
  hostRef.$rmListeners$.map((rmListener) => rmListener());
1065
1125
  hostRef.$rmListeners$ = undefined;
1066
1126
  }
1067
1127
  }
1128
+ {
1129
+ safeCall(instance, 'disconnectedCallback');
1130
+ }
1068
1131
  }
1069
1132
  };
1070
1133
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -1291,4 +1354,4 @@ class CatIconRegistry {
1291
1354
  }
1292
1355
  }
1293
1356
 
1294
- export { CatIconRegistry as C, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r };
1357
+ export { CatIconRegistry as C, Host as H, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r };
@@ -1,126 +1,19 @@
1
- import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-72a1bbba.js';
2
- import { g as globalScripts } from './app-globals-622e4f87.js';
3
- import './cat-icon-registry-59da2e37.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './cat-icon-registry-4d02ee6c.js';
2
+ import { g as globalScripts } from './app-globals-e1679c2d.js';
4
3
 
5
4
  /*
6
- Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Browser v2.15.0 | MIT Licensed | https://stenciljs.com
7
6
  */
8
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
9
7
  const patchBrowser = () => {
10
- // NOTE!! This fn cannot use async/await!
11
- if (BUILD.isDev && !BUILD.isTesting) {
12
- consoleDevInfo('Running in development mode.');
13
- }
14
- if (BUILD.cssVarShim) {
15
- // shim css vars
16
- plt.$cssShim$ = win.__cssshim;
17
- }
18
- if (BUILD.cloneNodeFix) {
19
- // opted-in to polyfill cloneNode() for slot polyfilled components
20
- patchCloneNodeFix(H.prototype);
21
- }
22
- if (BUILD.profile && !performance.mark) {
23
- // not all browsers support performance.mark/measure (Safari 10)
24
- performance.mark = performance.measure = () => {
25
- /*noop*/
26
- };
27
- performance.getEntriesByName = () => [];
28
- }
29
- // @ts-ignore
30
- const scriptElm = BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim
31
- ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
32
- s.getAttribute('data-stencil-namespace') === NAMESPACE)
33
- : null;
34
8
  const importMeta = import.meta.url;
35
- const opts = BUILD.scriptDataOpts ? scriptElm['data-opts'] || {} : {};
36
- if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
37
- // Safari < v11 support: This IF is true if it's Safari below v11.
38
- // This fn cannot use async/await since Safari didn't support it until v11,
39
- // however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
40
- // so both the ESM file and nomodule file would get downloaded. Only Safari
41
- // has 'onbeforeload' in the script, and "history.scrollRestoration" was added
42
- // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
43
- // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
44
- return {
45
- then() {
46
- /* promise noop */
47
- },
48
- };
49
- }
50
- if (!BUILD.safari10 && importMeta !== '') {
9
+ const opts = {};
10
+ if (importMeta !== '') {
51
11
  opts.resourcesUrl = new URL('.', importMeta).href;
52
12
  }
53
- else if (BUILD.dynamicImportShim || BUILD.safari10) {
54
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
55
- if (BUILD.dynamicImportShim) {
56
- patchDynamicImport(opts.resourcesUrl, scriptElm);
57
- }
58
- if (BUILD.dynamicImportShim && !win.customElements) {
59
- // module support, but no custom elements support (Old Edge)
60
- // @ts-ignore
61
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-c5ed0ba5.js').then(() => opts);
62
- }
63
- }
64
13
  return promiseResolve(opts);
65
14
  };
66
- const patchDynamicImport = (base, orgScriptElm) => {
67
- const importFunctionName = getDynamicImportFunction(NAMESPACE);
68
- try {
69
- // test if this browser supports dynamic imports
70
- // There is a caching issue in V8, that breaks using import() in Function
71
- // By generating a random string, we can workaround it
72
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
73
- win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
74
- }
75
- catch (e) {
76
- // this shim is specifically for browsers that do support "esm" imports
77
- // however, they do NOT support "dynamic" imports
78
- // basically this code is for old Edge, v18 and below
79
- const moduleMap = new Map();
80
- win[importFunctionName] = (src) => {
81
- const url = new URL(src, base).href;
82
- let mod = moduleMap.get(url);
83
- if (!mod) {
84
- const script = doc.createElement('script');
85
- script.type = 'module';
86
- script.crossOrigin = orgScriptElm.crossOrigin;
87
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
88
- type: 'application/javascript',
89
- }));
90
- mod = new Promise((resolve) => {
91
- script.onload = () => {
92
- resolve(win[importFunctionName].m);
93
- script.remove();
94
- };
95
- });
96
- moduleMap.set(url, mod);
97
- doc.head.appendChild(script);
98
- }
99
- return mod;
100
- };
101
- }
102
- };
103
- const patchCloneNodeFix = (HTMLElementPrototype) => {
104
- const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
105
- HTMLElementPrototype.cloneNode = function (deep) {
106
- if (this.nodeName === 'TEMPLATE') {
107
- return nativeCloneNodeFn.call(this, deep);
108
- }
109
- const clonedNode = nativeCloneNodeFn.call(this, false);
110
- const srcChildNodes = this.childNodes;
111
- if (deep) {
112
- for (let i = 0; i < srcChildNodes.length; i++) {
113
- // Node.ATTRIBUTE_NODE === 2, and checking because IE11
114
- if (srcChildNodes[i].nodeType !== 2) {
115
- clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
116
- }
117
- }
118
- }
119
- return clonedNode;
120
- };
121
- };
122
15
 
123
16
  patchBrowser().then(options => {
124
17
  globalScripts();
125
- return bootstrapLazy([["cat-icon",[[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-spinner",[[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-button",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]]]]], options);
18
+ return bootstrapLazy([["cat-alert_7",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
126
19
  });
@@ -1,25 +1,10 @@
1
- import { B as BUILD, C as CSS, p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-72a1bbba.js';
2
- import { g as globalScripts } from './app-globals-622e4f87.js';
3
- import './cat-icon-registry-59da2e37.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './cat-icon-registry-4d02ee6c.js';
2
+ import { g as globalScripts } from './app-globals-e1679c2d.js';
4
3
 
5
4
  /*
6
- Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Patch Esm v2.15.0 | MIT Licensed | https://stenciljs.com
7
6
  */
8
7
  const patchEsm = () => {
9
- // NOTE!! This fn cannot use async/await!
10
- // @ts-ignore
11
- if (BUILD.cssVarShim && !(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) {
12
- // @ts-ignore
13
- return import(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-20dbffa5.js').then(() => {
14
- if ((plt.$cssShim$ = win.__cssshim)) {
15
- return plt.$cssShim$.i();
16
- }
17
- else {
18
- // for better minification
19
- return 0;
20
- }
21
- });
22
- }
23
8
  return promiseResolve();
24
9
  };
25
10
 
@@ -27,7 +12,7 @@ const defineCustomElements = (win, options) => {
27
12
  if (typeof window === 'undefined') return Promise.resolve();
28
13
  return patchEsm().then(() => {
29
14
  globalScripts();
30
- return bootstrapLazy([["cat-icon",[[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-spinner",[[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-button",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]]]]], options);
15
+ return bootstrapLazy([["cat-alert_7",[[1,"cat-button",{"variant":[1],"color":[1],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"ellipsed":[4],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconSuffix":[4,"icon-suffix"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
31
16
  });
32
17
  };
33
18
 
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
1
+ var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Alerts are used to display important messages inline.
3
+ *
4
+ * @part alert - The content of the alert.
5
+ */
6
+ export declare class CatAlert {
7
+ /**
8
+ * The color palette of the alert.
9
+ */
10
+ color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
11
+ render(): any;
12
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Badges are used to draw attention and display statuses or counts.
3
+ *
4
+ * @part badge - The content of the badge.
5
+ */
6
+ export declare class CatBadge {
7
+ /**
8
+ * The rendering style of the badge.
9
+ */
10
+ variant: 'filled' | 'outlined';
11
+ /**
12
+ * The color palette of the badge.
13
+ */
14
+ color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
15
+ /**
16
+ * The size of the badge.
17
+ */
18
+ size: 'xs' | 's' | 'm' | 'l' | 'xl';
19
+ /**
20
+ * Use round badge edges.
21
+ */
22
+ round: boolean;
23
+ /**
24
+ * Draw attention to the badge with a subtle animation.
25
+ */
26
+ pulse: boolean;
27
+ render(): any;
28
+ }
@@ -94,6 +94,10 @@ export declare class CatButton {
94
94
  */
95
95
  a11yLabel?: string;
96
96
  onIconOnlyChanged(value: boolean | Breakpoint): void;
97
+ /**
98
+ * Emitted when the button is clicked.
99
+ */
100
+ catClick: EventEmitter<MouseEvent>;
97
101
  /**
98
102
  * Emitted when the button received focus.
99
103
  */
@@ -119,6 +123,7 @@ export declare class CatButton {
119
123
  private get hasPrefixIcon();
120
124
  private get hasSuffixIcon();
121
125
  private get content();
126
+ private onClick;
122
127
  private onFocus;
123
128
  private onBlur;
124
129
  }
@@ -0,0 +1,32 @@
1
+ import { Placement } from '@floating-ui/dom';
2
+ import { EventEmitter } from '../../stencil-public-runtime';
3
+ export declare class CatMenu {
4
+ private static readonly OFFSET;
5
+ private readonly id;
6
+ private triggerSlot?;
7
+ private trigger?;
8
+ private content?;
9
+ private trap?;
10
+ private keyListener?;
11
+ /**
12
+ * The placement of the menu.
13
+ */
14
+ placement: Placement;
15
+ /**
16
+ * Emitted when the menu is opened.
17
+ */
18
+ catOpen: EventEmitter<FocusEvent>;
19
+ /**
20
+ * Emitted when the menu is closed.
21
+ */
22
+ catClose: EventEmitter<FocusEvent>;
23
+ clickHandler(event: CustomEvent<MouseEvent>): void;
24
+ componentDidLoad(): void;
25
+ disconnectedCallback(): void;
26
+ render(): any;
27
+ private get contentId();
28
+ private show;
29
+ private hide;
30
+ private update;
31
+ private firstTabbable;
32
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Skeletons are used to show where content will eventually be drawn.
3
+ */
4
+ export declare class CatSkeleton {
5
+ /**
6
+ * The animation style of the skeleton.
7
+ */
8
+ effect: 'plain' | 'sheen' | 'pulse';
9
+ /**
10
+ * The rendering style of the skeleton.
11
+ */
12
+ variant: 'rectangle' | 'square' | 'circle' | 'head' | 'body';
13
+ /**
14
+ * The size of the skeleton. If the variant is set to "head", the size values
15
+ * "xs" to "xl" translate to the head levels `h1` to `h5`.
16
+ */
17
+ size: 'xs' | 's' | 'm' | 'l' | 'xl';
18
+ /**
19
+ * The number of text lines to be rendered for "head" and "body" variants.
20
+ * Defaults to 1 for "head" and 3 for "body". Will be ignored for other
21
+ * variants.
22
+ */
23
+ lines?: number;
24
+ render(): any;
25
+ private get count();
26
+ private get style();
27
+ private random;
28
+ }