@haiilo/catalyst 0.1.0 → 0.1.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 (75) hide show
  1. package/dist/catalyst/{app-globals-622e4f87.js → app-globals-f83c9e4a.js} +24 -6
  2. package/dist/catalyst/cat-button.entry.js +2 -2
  3. package/dist/catalyst/cat-icon.entry.js +1 -1
  4. package/dist/catalyst/cat-menu.entry.js +2957 -0
  5. package/dist/catalyst/cat-spinner.entry.js +1 -1
  6. package/dist/catalyst/catalyst.css +7 -0
  7. package/dist/catalyst/catalyst.esm.js +3 -3
  8. package/dist/{esm/index-72a1bbba.js → catalyst/index-45406d3b.js} +2 -2
  9. package/dist/components/cat-menu.d.ts +11 -0
  10. package/dist/types/components/cat-menu/cat-menu.d.ts +23 -0
  11. package/dist/types/components.d.ts +24 -0
  12. package/package.json +9 -6
  13. package/dist/catalyst/index-72a1bbba.js +0 -3031
  14. package/dist/catalyst/p-17a20657.js +0 -1
  15. package/dist/catalyst/p-582935bb.entry.js +0 -1
  16. package/dist/catalyst/p-f3fad7a0.js +0 -1
  17. package/dist/cjs/app-globals-8908fe44.js +0 -132
  18. package/dist/cjs/app-globals-fe9ff8ba.js +0 -706
  19. package/dist/cjs/cat-button.cjs.entry.js +0 -633
  20. package/dist/cjs/cat-button_3.cjs.entry.js +0 -645
  21. package/dist/cjs/cat-icon-registry-850c538c.js +0 -45
  22. package/dist/cjs/cat-icon-registry-da00f7d6.js +0 -1321
  23. package/dist/cjs/cat-icon.cjs.entry.js +0 -31
  24. package/dist/cjs/cat-spinner.cjs.entry.js +0 -25
  25. package/dist/cjs/catalyst.cjs.js +0 -128
  26. package/dist/cjs/css-shim-3bfdba4f.js +0 -6
  27. package/dist/cjs/dom-8ac1ad03.js +0 -75
  28. package/dist/cjs/index-083488c8.js +0 -3065
  29. package/dist/cjs/index.cjs.js +0 -2
  30. package/dist/cjs/loader.cjs.js +0 -38
  31. package/dist/cjs/shadow-css-41d9783d.js +0 -390
  32. package/dist/collection/collection-manifest.json +0 -15
  33. package/dist/collection/components/cat-button/cat-button.css +0 -284
  34. package/dist/collection/components/cat-button/cat-button.js +0 -568
  35. package/dist/collection/components/cat-icon/cat-icon-registry.js +0 -41
  36. package/dist/collection/components/cat-icon/cat-icon.css +0 -49
  37. package/dist/collection/components/cat-icon/cat-icon.js +0 -89
  38. package/dist/collection/components/cat-spinner/cat-spinner.css +0 -63
  39. package/dist/collection/components/cat-spinner/cat-spinner.js +0 -64
  40. package/dist/collection/index.cdn.js +0 -21
  41. package/dist/collection/index.js +0 -1
  42. package/dist/collection/init.js +0 -8
  43. package/dist/collection/utils/breakpoints.js +0 -11
  44. package/dist/collection/utils/media-matcher.js +0 -54
  45. package/dist/collection/utils/platform.js +0 -49
  46. package/dist/collection/utils/utils.js +0 -3
  47. package/dist/components/cat-button.js +0 -680
  48. package/dist/components/cat-icon-registry.js +0 -43
  49. package/dist/components/cat-icon.js +0 -6
  50. package/dist/components/cat-icon2.js +0 -47
  51. package/dist/components/cat-spinner.js +0 -6
  52. package/dist/components/cat-spinner2.js +0 -40
  53. package/dist/components/index.js +0 -705
  54. package/dist/esm/app-globals-000601ea.js +0 -130
  55. package/dist/esm/app-globals-622e4f87.js +0 -704
  56. package/dist/esm/cat-button.entry.js +0 -629
  57. package/dist/esm/cat-button_3.entry.js +0 -639
  58. package/dist/esm/cat-icon-registry-59da2e37.js +0 -43
  59. package/dist/esm/cat-icon-registry-b66e3f57.js +0 -1294
  60. package/dist/esm/cat-icon.entry.js +0 -27
  61. package/dist/esm/cat-spinner.entry.js +0 -21
  62. package/dist/esm/catalyst.js +0 -126
  63. package/dist/esm/css-shim-20dbffa5.js +0 -4
  64. package/dist/esm/dom-c5ed0ba5.js +0 -73
  65. package/dist/esm/index.js +0 -1
  66. package/dist/esm/loader.js +0 -34
  67. package/dist/esm/polyfills/core-js.js +0 -11
  68. package/dist/esm/polyfills/css-shim.js +0 -1
  69. package/dist/esm/polyfills/dom.js +0 -79
  70. package/dist/esm/polyfills/es5-html-element.js +0 -1
  71. package/dist/esm/polyfills/index.js +0 -34
  72. package/dist/esm/polyfills/system.js +0 -6
  73. package/dist/esm/shadow-css-8c625855.js +0 -388
  74. package/dist/index.cjs.js +0 -1
  75. package/dist/index.js +0 -1
@@ -1,43 +0,0 @@
1
- class CatIconRegistry {
2
- constructor() {
3
- this.icons = new Map();
4
- // hide constructor
5
- }
6
- static getInstance() {
7
- if (!CatIconRegistry.instance) {
8
- CatIconRegistry.instance = new CatIconRegistry();
9
- }
10
- return CatIconRegistry.instance;
11
- }
12
- getIcon(name, setName) {
13
- return this.icons.get(this.buildName(name, setName));
14
- }
15
- addIcon(name, data, setName) {
16
- this.icons.set(this.buildName(name, setName), data);
17
- window.dispatchEvent(this.buildEvent('cat-icon-added', { name, setName }));
18
- }
19
- addIcons(icons, setName) {
20
- Object.entries(icons).forEach(([name, data]) => this.icons.set(this.buildName(name, setName), data));
21
- window.dispatchEvent(this.buildEvent('cat-icons-added', { names: Object.keys(icons), setName }));
22
- }
23
- removeIcon(name, setName) {
24
- this.icons.delete(this.buildName(name, setName));
25
- window.dispatchEvent(this.buildEvent('cat-icon-removed', { name, setName }));
26
- }
27
- removeIcons(names, setName) {
28
- names.forEach(name => this.icons.delete(this.buildName(name, setName)));
29
- window.dispatchEvent(this.buildEvent('cat-icons-removed', { names, setName }));
30
- }
31
- buildName(name, setName) {
32
- return setName ? `${setName}:name` : name;
33
- }
34
- buildEvent(name, detail) {
35
- return new CustomEvent(name, {
36
- bubbles: true,
37
- composed: true,
38
- detail
39
- });
40
- }
41
- }
42
-
43
- export { CatIconRegistry as C };
@@ -1,6 +0,0 @@
1
- import { C as CatIcon$1, d as defineCustomElement$1 } from './cat-icon2.js';
2
-
3
- const CatIcon = CatIcon$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { CatIcon, defineCustomElement };
@@ -1,47 +0,0 @@
1
- import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/client';
2
- import { C as CatIconRegistry } from './cat-icon-registry.js';
3
-
4
- const catIconCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;width:1em;height:1em}.cat-icon-xs svg{font-size:0.75rem}.cat-icon-s svg{font-size:1rem}.cat-icon-m svg{font-size:1.25rem}.cat-icon-l svg{font-size:1.5rem}.cat-icon-xl svg{font-size:1.75rem}";
5
-
6
- let CatIcon = class extends HTMLElement {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.__attachShadow();
11
- this.iconRegistry = CatIconRegistry.getInstance();
12
- /**
13
- * The name of the icon.
14
- */
15
- this.icon = '';
16
- /**
17
- * The size of the icon.
18
- */
19
- this.size = 'm';
20
- }
21
- render() {
22
- return (h("span", { innerHTML: this.iconRegistry.getIcon(this.icon), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
23
- [`cat-icon-${this.size}`]: this.size !== 'inline'
24
- } }));
25
- }
26
- static get style() { return catIconCss; }
27
- };
28
- CatIcon = /*@__PURE__*/ proxyCustomElement(CatIcon, [1, "cat-icon", {
29
- "icon": [1],
30
- "size": [1],
31
- "a11yLabel": [1, "a11y-label"]
32
- }]);
33
- function defineCustomElement() {
34
- if (typeof customElements === "undefined") {
35
- return;
36
- }
37
- const components = ["cat-icon"];
38
- components.forEach(tagName => { switch (tagName) {
39
- case "cat-icon":
40
- if (!customElements.get(tagName)) {
41
- customElements.define(tagName, CatIcon);
42
- }
43
- break;
44
- } });
45
- }
46
-
47
- export { CatIcon as C, defineCustomElement as d };
@@ -1,6 +0,0 @@
1
- import { C as CatSpinner$1, d as defineCustomElement$1 } from './cat-spinner2.js';
2
-
3
- const CatSpinner = CatSpinner$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { CatSpinner, defineCustomElement };
@@ -1,40 +0,0 @@
1
- import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/client';
2
-
3
- const catSpinnerCss = ":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:cat-spinner 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.cat-spinner-xs svg{font-size:0.75rem}.cat-spinner-s svg{font-size:1rem}.cat-spinner-m svg{font-size:1.25rem}.cat-spinner-l svg{font-size:1.5rem}.cat-spinner-xl svg{font-size:1.75rem}@keyframes cat-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
4
-
5
- let CatSpinner = class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- /**
11
- * The size of the spinner.
12
- */
13
- this.size = 'm';
14
- }
15
- render() {
16
- return (h("span", { "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
17
- [`cat-spinner-${this.size}`]: this.size !== 'inline'
18
- } }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, h("circle", { cx: "24", cy: "24", r: "21.5" }))));
19
- }
20
- static get style() { return catSpinnerCss; }
21
- };
22
- CatSpinner = /*@__PURE__*/ proxyCustomElement(CatSpinner, [1, "cat-spinner", {
23
- "size": [1],
24
- "a11yLabel": [1, "a11y-label"]
25
- }]);
26
- function defineCustomElement() {
27
- if (typeof customElements === "undefined") {
28
- return;
29
- }
30
- const components = ["cat-spinner"];
31
- components.forEach(tagName => { switch (tagName) {
32
- case "cat-spinner":
33
- if (!customElements.get(tagName)) {
34
- customElements.define(tagName, CatSpinner);
35
- }
36
- break;
37
- } });
38
- }
39
-
40
- export { CatSpinner as C, defineCustomElement as d };