@haiilo/catalyst 0.1.1 → 0.2.2

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.
@@ -1,9 +1,9 @@
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-45406d3b.js';
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-a0f41a84.js';
2
2
  import { g as globalScripts } from './app-globals-f83c9e4a.js';
3
3
  import './cat-icon-registry-59da2e37.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.15.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
9
9
  const patchBrowser = () => {
@@ -21,6 +21,10 @@ const patchBrowser = () => {
21
21
  }
22
22
  if (BUILD.profile && !performance.mark) {
23
23
  // not all browsers support performance.mark/measure (Safari 10)
24
+ // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,
25
+ // simply stub the implementations out.
26
+ // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)
27
+ // @ts-ignore
24
28
  performance.mark = performance.measure = () => {
25
29
  /*noop*/
26
30
  };
@@ -58,7 +62,7 @@ const patchBrowser = () => {
58
62
  if (BUILD.dynamicImportShim && !win.customElements) {
59
63
  // module support, but no custom elements support (Old Edge)
60
64
  // @ts-ignore
61
- return import(/* webpackChunkName: "polyfills-dom" */ './dom-c5ed0ba5.js').then(() => opts);
65
+ return import(/* webpackChunkName: "polyfills-dom" */ './dom-7fc649b0.js').then(() => opts);
62
66
  }
63
67
  }
64
68
  return promiseResolve(opts);
@@ -122,5 +126,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
122
126
 
123
127
  patchBrowser().then(options => {
124
128
  globalScripts();
125
- return bootstrapLazy([["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"]]]]],["cat-menu",[[4,"cat-menu",{"placement":[1]}]]],["cat-icon",[[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-spinner",[[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
129
+ return bootstrapLazy([["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"]]]]],["cat-alert",[[1,"cat-alert",{"color":[1]}]]],["cat-badge",[[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}]]],["cat-menu",[[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]]]],["cat-skeleton",[[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}]]],["cat-icon",[[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-spinner",[[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}]]]], options);
126
130
  });
@@ -1,4 +1,4 @@
1
1
  /*
2
- Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Esm v2.15.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
- var __assign=undefined&&undefined.__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);
4
+ var __assign=undefined&&undefined.__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);
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Patch Browser v2.13.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Patch Browser v2.15.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  (function(){
5
5
  var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function g(a){var b=aa.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return !b&&a}function l(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return !(!a||!(a.__CE_isImportDocument||a instanceof Document))}
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'catalyst';
2
- const BUILD = /* catalyst */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: false, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: false, safari10: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* catalyst */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, safari10: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
  const Env = /* catalyst */ {};
4
4
 
5
5
  let scopeId;
@@ -1818,6 +1818,29 @@ const initializeDocumentHydrate = (node, orgLocNodes) => {
1818
1818
  }
1819
1819
  }
1820
1820
  };
1821
+ /**
1822
+ * Parse a new property value for a given property type.
1823
+ *
1824
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
1825
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
1826
+ * 1. `any`, the type given to `propValue` in the function signature
1827
+ * 2. the type stored from `propType`.
1828
+ *
1829
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
1830
+ *
1831
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
1832
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
1833
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
1834
+ * ```tsx
1835
+ * <my-cmp prop-val={0}></my-cmp>
1836
+ * ```
1837
+ *
1838
+ * HTML prop values on the other hand, will always a string
1839
+ *
1840
+ * @param propValue the new value to coerce to some type
1841
+ * @param propType the type of the prop, expressed as a binary number
1842
+ * @returns the parsed/coerced value
1843
+ */
1821
1844
  const parsePropertyValue = (propValue, propType) => {
1822
1845
  // ensure this value is of the correct prop type
1823
1846
  if (propValue != null && !isComplexType(propValue)) {
@@ -1851,7 +1874,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1851
1874
  const flags = hostRef.$flags$;
1852
1875
  const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
1853
1876
  newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1854
- if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
1877
+ // explicitly check for NaN on both sides, as `NaN === NaN` is always false
1878
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1879
+ const didValueChange = newVal !== oldVal && !areBothNaN;
1880
+ if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
1855
1881
  // gadzooks! the property's value has changed!!
1856
1882
  // set our new value!
1857
1883
  hostRef.$instanceValues$.set(propName, newVal);
@@ -2100,7 +2126,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2100
2126
  BUILD.shadowDom &&
2101
2127
  BUILD.shadowDomShim &&
2102
2128
  cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2103
- style = await import('./shadow-css-8c625855.js').then((m) => m.scopeCss(style, scopeId, false));
2129
+ style = await import('./shadow-css-4d56fa31.js').then((m) => m.scopeCss(style, scopeId, false));
2104
2130
  }
2105
2131
  registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2106
2132
  endRegisterStyles();
@@ -3028,4 +3054,4 @@ const Build = {
3028
3054
  isTesting: BUILD.isTesting ? true : false,
3029
3055
  };
3030
3056
 
3031
- export { BUILD as B, CSS as C, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, createEvent as e, Host as f, getElement as g, h, plt as p, registerInstance as r, win as w };
3057
+ export { BUILD as B, CSS as C, H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, consoleDevInfo as c, doc as d, createEvent as e, Host as f, h, plt as p, registerInstance as r, win as w };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Client Platform v2.13.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Client Platform v2.15.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  /**
5
5
  * @license
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface CatAlert extends Components.CatAlert, HTMLElement {}
4
+ export const CatAlert: {
5
+ prototype: CatAlert;
6
+ new (): CatAlert;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface CatBadge extends Components.CatBadge, HTMLElement {}
4
+ export const CatBadge: {
5
+ prototype: CatBadge;
6
+ new (): CatBadge;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface CatSkeleton extends Components.CatSkeleton, HTMLElement {}
4
+ export const CatSkeleton: {
5
+ prototype: CatSkeleton;
6
+ new (): CatSkeleton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -9,7 +9,7 @@ import type { Components, JSX } from "../types/components";
9
9
  * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
10
  * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
11
  * But do note that this configuration depends on how your script is bundled, or lack of
12
- * bunding, and where your assets can be loaded from. Additionally custom bundling
12
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
13
13
  * will have to ensure the static assets are copied to its build directory.
14
14
  */
15
15
  export declare const setAssetPath: (path: string) => void;
@@ -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
  }
@@ -1,11 +1,16 @@
1
1
  import { Placement } from '@floating-ui/dom';
2
2
  import { EventEmitter } from '../../stencil-public-runtime';
3
3
  export declare class CatMenu {
4
- private static OFFSET;
5
- private trigger;
6
- private content;
4
+ private static readonly OFFSET;
5
+ private readonly id;
6
+ private triggerSlot?;
7
+ private trigger?;
8
+ private content?;
7
9
  private trap?;
8
- host: HTMLElement;
10
+ private keyListener?;
11
+ /**
12
+ * The placement of the menu.
13
+ */
9
14
  placement: Placement;
10
15
  /**
11
16
  * Emitted when the menu is opened.
@@ -15,9 +20,13 @@ export declare class CatMenu {
15
20
  * Emitted when the menu is closed.
16
21
  */
17
22
  catClose: EventEmitter<FocusEvent>;
23
+ clickHandler(event: CustomEvent<MouseEvent>): void;
18
24
  componentDidLoad(): void;
25
+ disconnectedCallback(): void;
19
26
  render(): any;
27
+ private get contentId();
20
28
  private show;
21
29
  private hide;
22
30
  private update;
31
+ private firstTabbable;
23
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
+ }
@@ -8,6 +8,34 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Breakpoint } from "./utils/breakpoints";
9
9
  import { Placement } from "@floating-ui/dom";
10
10
  export namespace Components {
11
+ interface CatAlert {
12
+ /**
13
+ * The color palette of the alert.
14
+ */
15
+ "color": 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
16
+ }
17
+ interface CatBadge {
18
+ /**
19
+ * The color palette of the badge.
20
+ */
21
+ "color": 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
22
+ /**
23
+ * Draw attention to the badge with a subtle animation.
24
+ */
25
+ "pulse": boolean;
26
+ /**
27
+ * Use round badge edges.
28
+ */
29
+ "round": boolean;
30
+ /**
31
+ * The size of the badge.
32
+ */
33
+ "size": 'xs' | 's' | 'm' | 'l' | 'xl';
34
+ /**
35
+ * The rendering style of the badge.
36
+ */
37
+ "variant": 'filled' | 'outlined';
38
+ }
11
39
  interface CatButton {
12
40
  /**
13
41
  * Adds accessible label for the button that is only shown for screen readers. Typically, this label text replaces the visible text on the button for users who use assistive technology.
@@ -98,8 +126,29 @@ export namespace Components {
98
126
  "size": 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline';
99
127
  }
100
128
  interface CatMenu {
129
+ /**
130
+ * The placement of the menu.
131
+ */
101
132
  "placement": Placement;
102
133
  }
134
+ interface CatSkeleton {
135
+ /**
136
+ * The animation style of the skeleton.
137
+ */
138
+ "effect": 'plain' | 'sheen' | 'pulse';
139
+ /**
140
+ * The number of text lines to be rendered for "head" and "body" variants. Defaults to 1 for "head" and 3 for "body". Will be ignored for other variants.
141
+ */
142
+ "lines"?: number;
143
+ /**
144
+ * The size of the skeleton. If the variant is set to "head", the size values "xs" to "xl" translate to the head levels `h1` to `h5`.
145
+ */
146
+ "size": 'xs' | 's' | 'm' | 'l' | 'xl';
147
+ /**
148
+ * The rendering style of the skeleton.
149
+ */
150
+ "variant": 'rectangle' | 'square' | 'circle' | 'head' | 'body';
151
+ }
103
152
  interface CatSpinner {
104
153
  /**
105
154
  * Adds accessible label for the spinner that is only shown for screen readers. The `aria-hidden` attribute will be set if no label is present.
@@ -112,6 +161,18 @@ export namespace Components {
112
161
  }
113
162
  }
114
163
  declare global {
164
+ interface HTMLCatAlertElement extends Components.CatAlert, HTMLStencilElement {
165
+ }
166
+ var HTMLCatAlertElement: {
167
+ prototype: HTMLCatAlertElement;
168
+ new (): HTMLCatAlertElement;
169
+ };
170
+ interface HTMLCatBadgeElement extends Components.CatBadge, HTMLStencilElement {
171
+ }
172
+ var HTMLCatBadgeElement: {
173
+ prototype: HTMLCatBadgeElement;
174
+ new (): HTMLCatBadgeElement;
175
+ };
115
176
  interface HTMLCatButtonElement extends Components.CatButton, HTMLStencilElement {
116
177
  }
117
178
  var HTMLCatButtonElement: {
@@ -130,6 +191,12 @@ declare global {
130
191
  prototype: HTMLCatMenuElement;
131
192
  new (): HTMLCatMenuElement;
132
193
  };
194
+ interface HTMLCatSkeletonElement extends Components.CatSkeleton, HTMLStencilElement {
195
+ }
196
+ var HTMLCatSkeletonElement: {
197
+ prototype: HTMLCatSkeletonElement;
198
+ new (): HTMLCatSkeletonElement;
199
+ };
133
200
  interface HTMLCatSpinnerElement extends Components.CatSpinner, HTMLStencilElement {
134
201
  }
135
202
  var HTMLCatSpinnerElement: {
@@ -137,13 +204,44 @@ declare global {
137
204
  new (): HTMLCatSpinnerElement;
138
205
  };
139
206
  interface HTMLElementTagNameMap {
207
+ "cat-alert": HTMLCatAlertElement;
208
+ "cat-badge": HTMLCatBadgeElement;
140
209
  "cat-button": HTMLCatButtonElement;
141
210
  "cat-icon": HTMLCatIconElement;
142
211
  "cat-menu": HTMLCatMenuElement;
212
+ "cat-skeleton": HTMLCatSkeletonElement;
143
213
  "cat-spinner": HTMLCatSpinnerElement;
144
214
  }
145
215
  }
146
216
  declare namespace LocalJSX {
217
+ interface CatAlert {
218
+ /**
219
+ * The color palette of the alert.
220
+ */
221
+ "color"?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
222
+ }
223
+ interface CatBadge {
224
+ /**
225
+ * The color palette of the badge.
226
+ */
227
+ "color"?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
228
+ /**
229
+ * Draw attention to the badge with a subtle animation.
230
+ */
231
+ "pulse"?: boolean;
232
+ /**
233
+ * Use round badge edges.
234
+ */
235
+ "round"?: boolean;
236
+ /**
237
+ * The size of the badge.
238
+ */
239
+ "size"?: 'xs' | 's' | 'm' | 'l' | 'xl';
240
+ /**
241
+ * The rendering style of the badge.
242
+ */
243
+ "variant"?: 'filled' | 'outlined';
244
+ }
147
245
  interface CatButton {
148
246
  /**
149
247
  * Adds accessible label for the button that is only shown for screen readers. Typically, this label text replaces the visible text on the button for users who use assistive technology.
@@ -189,6 +287,10 @@ declare namespace LocalJSX {
189
287
  * Emitted when the button loses focus.
190
288
  */
191
289
  "onCatBlur"?: (event: CustomEvent<FocusEvent>) => void;
290
+ /**
291
+ * Emitted when the button is clicked.
292
+ */
293
+ "onCatClick"?: (event: CustomEvent<MouseEvent>) => void;
192
294
  /**
193
295
  * Emitted when the button received focus.
194
296
  */
@@ -245,8 +347,29 @@ declare namespace LocalJSX {
245
347
  * Emitted when the menu is opened.
246
348
  */
247
349
  "onCatOpen"?: (event: CustomEvent<FocusEvent>) => void;
350
+ /**
351
+ * The placement of the menu.
352
+ */
248
353
  "placement"?: Placement;
249
354
  }
355
+ interface CatSkeleton {
356
+ /**
357
+ * The animation style of the skeleton.
358
+ */
359
+ "effect"?: 'plain' | 'sheen' | 'pulse';
360
+ /**
361
+ * The number of text lines to be rendered for "head" and "body" variants. Defaults to 1 for "head" and 3 for "body". Will be ignored for other variants.
362
+ */
363
+ "lines"?: number;
364
+ /**
365
+ * The size of the skeleton. If the variant is set to "head", the size values "xs" to "xl" translate to the head levels `h1` to `h5`.
366
+ */
367
+ "size"?: 'xs' | 's' | 'm' | 'l' | 'xl';
368
+ /**
369
+ * The rendering style of the skeleton.
370
+ */
371
+ "variant"?: 'rectangle' | 'square' | 'circle' | 'head' | 'body';
372
+ }
250
373
  interface CatSpinner {
251
374
  /**
252
375
  * Adds accessible label for the spinner that is only shown for screen readers. The `aria-hidden` attribute will be set if no label is present.
@@ -258,9 +381,12 @@ declare namespace LocalJSX {
258
381
  "size"?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline';
259
382
  }
260
383
  interface IntrinsicElements {
384
+ "cat-alert": CatAlert;
385
+ "cat-badge": CatBadge;
261
386
  "cat-button": CatButton;
262
387
  "cat-icon": CatIcon;
263
388
  "cat-menu": CatMenu;
389
+ "cat-skeleton": CatSkeleton;
264
390
  "cat-spinner": CatSpinner;
265
391
  }
266
392
  }
@@ -268,9 +394,12 @@ export { LocalJSX as JSX };
268
394
  declare module "@stencil/core" {
269
395
  export namespace JSX {
270
396
  interface IntrinsicElements {
397
+ "cat-alert": LocalJSX.CatAlert & JSXBase.HTMLAttributes<HTMLCatAlertElement>;
398
+ "cat-badge": LocalJSX.CatBadge & JSXBase.HTMLAttributes<HTMLCatBadgeElement>;
271
399
  "cat-button": LocalJSX.CatButton & JSXBase.HTMLAttributes<HTMLCatButtonElement>;
272
400
  "cat-icon": LocalJSX.CatIcon & JSXBase.HTMLAttributes<HTMLCatIconElement>;
273
401
  "cat-menu": LocalJSX.CatMenu & JSXBase.HTMLAttributes<HTMLCatMenuElement>;
402
+ "cat-skeleton": LocalJSX.CatSkeleton & JSXBase.HTMLAttributes<HTMLCatSkeletonElement>;
274
403
  "cat-spinner": LocalJSX.CatSpinner & JSXBase.HTMLAttributes<HTMLCatSpinnerElement>;
275
404
  }
276
405
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "0.1.1",
3
+ "version": "0.2.2",
4
4
  "description": "Catalyst Design System",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,23 +43,23 @@
43
43
  "reset": "rm -rf ./dist ./loader ./node_modules ./www"
44
44
  },
45
45
  "dependencies": {
46
- "@floating-ui/dom": "^0.4.1",
47
- "@stencil/core": "2.13.0",
48
- "focus-trap": "^6.8.0-beta.2",
46
+ "@floating-ui/dom": "0.4.1",
47
+ "@stencil/core": "2.15.0",
48
+ "focus-trap": "6.8.0-beta.2",
49
49
  "loglevel": "1.8.0",
50
50
  "sanitize.css": "13.0.0",
51
- "tabbable": "^5.3.0-beta.1"
51
+ "tabbable": "5.3.0-beta.1"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@haiilo/catalyst-icons": ">=0.1.2",
55
- "@haiilo/catalyst-tokens": ">=0.1.3"
55
+ "@haiilo/catalyst-tokens": ">=0.1.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@babel/core": "^7.16.5",
59
59
  "@haiilo/catalyst-icons": "^0.1.2",
60
- "@haiilo/catalyst-tokens": "^0.1.3",
60
+ "@haiilo/catalyst-tokens": "^0.1.4",
61
61
  "@stencil/angular-output-target": "^0.4.0",
62
- "@stencil/react-output-target": "^0.2.1",
62
+ "@stencil/react-output-target": "^0.3.1",
63
63
  "@stencil/sass": "^1.5.2",
64
64
  "@stencil/vue-output-target": "^0.6.0",
65
65
  "@types/jest": "^27.4.0",
@@ -71,7 +71,7 @@
71
71
  "jest": "^27.5.1",
72
72
  "jest-cli": "^27.5.1",
73
73
  "prettier": "^2.5.1",
74
- "puppeteer": "^10.0.0",
74
+ "puppeteer": "^13.5.2",
75
75
  "standard-version": "^9.3.2",
76
76
  "stylelint": "^14.4.0",
77
77
  "stylelint-config-prettier-scss": "^0.0.1",