@rededor/cura 0.2.1 → 0.3.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 (102) hide show
  1. package/dist/assets/icons/iconset-default-list.ts +1 -1
  2. package/dist/assets/icons/iconset-default.svg +1 -1
  3. package/dist/cjs/app-globals-5f5b9fbf.js +398 -0
  4. package/dist/cjs/cura-display_5.cjs.entry.js +261 -0
  5. package/dist/cjs/cura.cjs.js +3 -3
  6. package/dist/cjs/{index-9092c64d.js → index-8686299e.js} +29 -0
  7. package/dist/cjs/loader.cjs.js +3 -3
  8. package/dist/collection/api/cura-api.js +10 -1
  9. package/dist/collection/api/modules/cura-theme-colors-module.js +69 -0
  10. package/dist/collection/api/modules/cura-theme-fonts-module.js +35 -0
  11. package/dist/collection/api/modules/cura-theme-module.js +4 -0
  12. package/dist/collection/api/theme-presets/static.js +103 -0
  13. package/dist/collection/api/theme-presets/theme-default.js +28 -22
  14. package/dist/collection/api/theme-presets/theme-maternity.js +10 -12
  15. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  16. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  17. package/dist/collection/assets-raw/icons/default/facebook.svg +3 -0
  18. package/dist/collection/assets-raw/icons/default/google.svg +3 -0
  19. package/dist/collection/assets-raw/icons/default/instagram.svg +5 -0
  20. package/dist/collection/assets-raw/icons/default/lattes.svg +3 -0
  21. package/dist/collection/assets-raw/icons/default/likeHand.svg +4 -0
  22. package/dist/collection/assets-raw/icons/default/linkedin.svg +5 -0
  23. package/dist/collection/assets-raw/icons/default/twitter.svg +3 -0
  24. package/dist/collection/assets-raw/icons/default/unlikeHand.svg +4 -0
  25. package/dist/collection/assets-raw/icons/default/whatsapp.svg +4 -0
  26. package/dist/collection/assets-raw/icons/default/youtube.svg +4 -0
  27. package/dist/collection/collection-manifest.json +3 -1
  28. package/dist/collection/components/cura-icon/cura-icon.css +1 -43
  29. package/dist/collection/components/cura-icon/cura-icon.js +15 -12
  30. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  31. package/dist/collection/components/text/cura-display/cura-display.css +61 -0
  32. package/dist/collection/components/text/cura-display/cura-display.js +110 -0
  33. package/dist/collection/components/text/cura-heading/cura-heading.css +69 -0
  34. package/dist/collection/components/text/cura-heading/cura-heading.js +136 -0
  35. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +81 -0
  36. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +76 -0
  37. package/dist/components/{dummy-component.d.ts → cura-display.d.ts} +4 -4
  38. package/dist/components/cura-display.js +86 -0
  39. package/dist/components/cura-heading.d.ts +11 -0
  40. package/dist/components/cura-heading.js +95 -0
  41. package/dist/components/cura-icon2.js +12 -13
  42. package/dist/components/cura-icons-view.js +2 -2
  43. package/dist/components/cura-paragraph.d.ts +11 -0
  44. package/dist/components/cura-paragraph.js +69 -0
  45. package/dist/components/index.d.ts +3 -1
  46. package/dist/components/index.js +261 -36
  47. package/dist/cura/cura.esm.js +1 -1
  48. package/dist/cura/cura.js +1 -1
  49. package/dist/cura/p-265c1706.js +1 -0
  50. package/dist/cura/p-3d8bbf37.system.js +1 -0
  51. package/dist/cura/p-a50716bc.js +2 -0
  52. package/dist/cura/p-a8dcaaed.system.js +1 -0
  53. package/dist/cura/p-e447016d.system.js +2 -0
  54. package/dist/cura/p-fc50b109.system.entry.js +1 -0
  55. package/dist/cura/p-fc80cb18.entry.js +1 -0
  56. package/dist/esm/app-globals-d7dd3a4d.js +396 -0
  57. package/dist/esm/cura-display_5.entry.js +253 -0
  58. package/dist/esm/cura.js +3 -3
  59. package/dist/esm/{index-cec9b650.js → index-c3d31886.js} +29 -0
  60. package/dist/esm/loader.js +3 -3
  61. package/dist/esm-es5/app-globals-d7dd3a4d.js +1 -0
  62. package/dist/esm-es5/cura-display_5.entry.js +1 -0
  63. package/dist/esm-es5/cura.js +1 -1
  64. package/dist/esm-es5/index-c3d31886.js +2 -0
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/types/api/cura-api.type.d.ts +9 -0
  67. package/dist/types/api/modules/cura-theme-colors-module.d.ts +48 -0
  68. package/dist/types/api/modules/cura-theme-fonts-module.d.ts +24 -0
  69. package/dist/types/api/modules/cura-theme-module.d.ts +4 -0
  70. package/dist/types/api/theme-presets/static.d.ts +78 -0
  71. package/dist/types/api/theme-presets/theme-default.d.ts +28 -22
  72. package/dist/types/api/theme-presets/theme-maternity.d.ts +23 -19
  73. package/dist/types/api/theme-presets/theme-presets.d.ts +51 -41
  74. package/dist/types/components/cura-icon/cura-icon.d.ts +1 -1
  75. package/dist/types/components/text/cura-display/cura-display.d.ts +28 -0
  76. package/dist/types/components/text/cura-heading/cura-heading.d.ts +33 -0
  77. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +22 -0
  78. package/dist/types/components.d.ts +83 -9
  79. package/package.json +2 -2
  80. package/dist/cjs/app-globals-af978331.js +0 -175
  81. package/dist/cjs/cura-icon_2.cjs.entry.js +0 -81
  82. package/dist/cjs/dummy-component.cjs.entry.js +0 -19
  83. package/dist/collection/components/dummy-component/dummy-component.css +0 -3
  84. package/dist/collection/components/dummy-component/dummy-component.js +0 -18
  85. package/dist/components/dummy-component.js +0 -33
  86. package/dist/cura/p-18f978f3.system.entry.js +0 -1
  87. package/dist/cura/p-3132f4b7.system.js +0 -2
  88. package/dist/cura/p-5f113376.entry.js +0 -1
  89. package/dist/cura/p-70abb532.system.js +0 -1
  90. package/dist/cura/p-a0cd4b75.system.js +0 -1
  91. package/dist/cura/p-abcda1d1.js +0 -2
  92. package/dist/cura/p-ac79f9d1.entry.js +0 -1
  93. package/dist/cura/p-b4c69836.system.entry.js +0 -1
  94. package/dist/cura/p-d2dcd470.js +0 -1
  95. package/dist/esm/app-globals-962e5cc3.js +0 -173
  96. package/dist/esm/cura-icon_2.entry.js +0 -76
  97. package/dist/esm/dummy-component.entry.js +0 -15
  98. package/dist/esm-es5/app-globals-962e5cc3.js +0 -1
  99. package/dist/esm-es5/cura-icon_2.entry.js +0 -1
  100. package/dist/esm-es5/dummy-component.entry.js +0 -1
  101. package/dist/esm-es5/index-cec9b650.js +0 -2
  102. package/dist/types/components/dummy-component/dummy-component.d.ts +0 -3
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const curaIconCss = ":host{--stroke-color:#B7B7B7}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host{width:var(--size);height:var(--size);display:inline-block}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
3
+ const curaIconCss = ":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
4
4
 
5
5
  const CuraIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -8,7 +8,7 @@ const CuraIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
8
8
  this.__registerHost();
9
9
  this.__attachShadow();
10
10
  this.name = '';
11
- this.color = 'neutral';
11
+ this.color = 'neutral-base';
12
12
  this.iconset = 'default';
13
13
  this.disabled = false;
14
14
  this.sizes = {
@@ -31,34 +31,33 @@ const CuraIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
31
31
  this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);
32
32
  this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke("default"));
33
33
  }
34
+ colorHandler() {
35
+ this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color));
36
+ }
34
37
  connectedCallback() {
35
38
  this.assetsPath = window.CuraAPI.localAssetsPath;
36
39
  this.sizeHandler(this.size);
37
- }
38
- getClasses() {
39
- const classes = {};
40
- classes[`icon-${this.color}`] = true;
41
- if (this.disabled)
42
- classes[`icon-disabled`] = true;
43
- return classes;
40
+ this.colorHandler();
44
41
  }
45
42
  setHostProperty(prop, value) {
46
43
  this.host.style.setProperty(prop, value);
47
44
  }
48
45
  render() {
49
- return (h(Host, null, h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", class: this.getClasses() }, h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
46
+ return (h(Host, null, h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
50
47
  }
51
48
  get host() { return this; }
52
49
  static get watchers() { return {
53
- "size": ["sizeHandler"]
50
+ "size": ["sizeHandler"],
51
+ "color": ["colorHandler"],
52
+ "disabled": ["colorHandler"]
54
53
  }; }
55
54
  static get style() { return curaIconCss; }
56
55
  }, [1, "cura-icon", {
57
56
  "name": [513],
58
- "color": [513],
57
+ "color": [1],
59
58
  "size": [8],
60
59
  "iconset": [513],
61
- "disabled": [516]
60
+ "disabled": [4]
62
61
  }]);
63
62
  function defineCustomElement() {
64
63
  if (typeof customElements === "undefined") {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$2 } from './cura-icon2.js';
3
3
 
4
- const iconsetdefaulticons = ["360", "accessibility", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "delete", "desktop", "deslike", "download", "duplicate", "edit", "exam", "expand", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "hate", "healthPlan", "height", "height2", "home", "horizontalList", "imageUp", "info2", "infoCircle", "key", "language", "language2", "languageEN", "languagePT", "like", "link", "linkExternal", "list", "login", "logout", "love", "mail", "mail2", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "neutral", "news", "notification", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profile2", "pulldownG", "pulldownP", "pullupG", "pullupP", "questionCircle", "questionSquare", "range", "reload", "schedule", "search", "secure", "share", "share2", "sound", "soundOff", "subItem", "target", "team", "unLink", "unSecure", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "wifi", "zoomIn", "zoomOut"];
4
+ const iconsetdefaulticons = ["360", "accessibility", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "delete", "desktop", "deslike", "download", "duplicate", "edit", "exam", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "google", "hate", "healthPlan", "height", "height2", "home", "horizontalList", "imageUp", "info2", "infoCircle", "instagram", "key", "language", "language2", "languageEN", "languagePT", "lattes", "like", "likeHand", "link", "linkExternal", "linkedin", "list", "login", "logout", "love", "mail", "mail2", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "neutral", "news", "notification", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profile2", "pulldownG", "pulldownP", "pullupG", "pullupP", "questionCircle", "questionSquare", "range", "reload", "schedule", "search", "secure", "share", "share2", "sound", "soundOff", "subItem", "target", "team", "twitter", "unLink", "unSecure", "unlikeHand", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "youtube", "zoomIn", "zoomOut"];
5
5
 
6
6
  const curaIconsViewCss = ":host{display:block;padding:24px;font-family:var(--cura-font-family-body)}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}";
7
7
 
@@ -18,7 +18,7 @@ const CuraIconsView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
18
18
  };
19
19
  }
20
20
  render() {
21
- return (h(Host, null, h("div", { class: "iconDetail" }, h("h4", null, this.selected), h("div", { class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "white" }), h("span", null, size)))), h("div", { class: "iconSizes" }, this.colors.map(color => h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: color }), h("span", null, color))), h("div", { class: "size" }, h("cura-icon", { name: this.selected, disabled: true }), h("span", null, "Disabled")))), h("div", { class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: "icon", onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon }), h("span", null, icon))))));
21
+ return (h(Host, null, h("div", { class: "iconDetail" }, h("h4", null, this.selected), h("div", { class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size)))), h("div", { class: "iconSizes" }, this.colors.map(color => h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: color }), h("span", null, color))), h("div", { class: "size" }, h("cura-icon", { name: this.selected, disabled: true }), h("span", null, "Disabled")))), h("div", { class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: "icon", onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon }), h("span", null, icon))))));
22
22
  }
23
23
  static get style() { return curaIconsViewCss; }
24
24
  }, [1, "cura-icons-view", {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface CuraParagraph extends Components.CuraParagraph, HTMLElement {}
4
+ export const CuraParagraph: {
5
+ prototype: CuraParagraph;
6
+ new (): CuraParagraph;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,69 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+
3
+ const curaParagraphCss = ":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media screen and (min-width: 768px) and (max-width: 1366px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media screen and (min-width: 1367px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
4
+
5
+ const CuraParagraph$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ /**
11
+ * Set size of body text.
12
+ * Values: regular (default) | large | small | caption.
13
+ */
14
+ this.size = 'regular';
15
+ }
16
+ connectedCallback() {
17
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
18
+ this.setFontProperties();
19
+ this.setColors();
20
+ }
21
+ setsizeClass() {
22
+ const sizeclass = {};
23
+ sizeclass[this.size.toLowerCase()] = true;
24
+ return sizeclass;
25
+ }
26
+ setFontProperties() {
27
+ this.styles = {
28
+ '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),
29
+ '--font-size': window.CuraAPI.theme.fonts.getSize(),
30
+ '--font-weight-regular': this.weights.regular,
31
+ '--font-weight-medium': this.weights.medium,
32
+ '--font-weight-bold': this.weights.bold
33
+ };
34
+ this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
35
+ }
36
+ setColors() {
37
+ const fontColor = window.CuraAPI.theme.fonts.getColor();
38
+ this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor(`neutral-darker`);
39
+ this.styles['--color-link'] = window.CuraAPI.theme.colors.getColor('primary-700');
40
+ }
41
+ setHostProperty(prop, value) {
42
+ this.host.style.setProperty(prop, value);
43
+ }
44
+ render() {
45
+ return (h(Host, null, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
46
+ }
47
+ get host() { return this; }
48
+ static get style() { return curaParagraphCss; }
49
+ }, [1, "cura-paragraph", {
50
+ "size": [513]
51
+ }]);
52
+ function defineCustomElement$1() {
53
+ if (typeof customElements === "undefined") {
54
+ return;
55
+ }
56
+ const components = ["cura-paragraph"];
57
+ components.forEach(tagName => { switch (tagName) {
58
+ case "cura-paragraph":
59
+ if (!customElements.get(tagName)) {
60
+ customElements.define(tagName, CuraParagraph$1);
61
+ }
62
+ break;
63
+ } });
64
+ }
65
+
66
+ const CuraParagraph = CuraParagraph$1;
67
+ const defineCustomElement = defineCustomElement$1;
68
+
69
+ export { CuraParagraph, defineCustomElement };
@@ -1,7 +1,9 @@
1
1
  /* cura custom elements */
2
+ export { CuraDisplay as CuraDisplay } from '../types/components/text/cura-display/cura-display';
3
+ export { CuraHeading as CuraHeading } from '../types/components/text/cura-heading/cura-heading';
2
4
  export { CuraIcon as CuraIcon } from '../types/components/cura-icon/cura-icon';
3
5
  export { CuraIconsView as CuraIconsView } from '../types/components/cura-icons-view/cura-icons-view';
4
- export { DummyComponent as DummyComponent } from '../types/components/dummy-component/dummy-component';
6
+ export { CuraParagraph as CuraParagraph } from '../types/components/text/cura-paragraph/cura-paragraph';
5
7
 
6
8
  /**
7
9
  * Used to manually set the base path where assets can be found.
@@ -1,7 +1,9 @@
1
1
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { CuraDisplay, defineCustomElement as defineCustomElementCuraDisplay } from './cura-display.js';
3
+ export { CuraHeading, defineCustomElement as defineCustomElementCuraHeading } from './cura-heading.js';
2
4
  export { CuraIcon, defineCustomElement as defineCustomElementCuraIcon } from './cura-icon.js';
3
5
  export { CuraIconsView, defineCustomElement as defineCustomElementCuraIconsView } from './cura-icons-view.js';
4
- export { DummyComponent, defineCustomElement as defineCustomElementDummyComponent } from './dummy-component.js';
6
+ export { CuraParagraph, defineCustomElement as defineCustomElementCuraParagraph } from './cura-paragraph.js';
5
7
 
6
8
  /**
7
9
  * Cura Default Theme
@@ -10,40 +12,46 @@ const ThemeDefault = {
10
12
  /* Colors */
11
13
  color: {
12
14
  primary: {
13
- depth100: '#CCD9E7',
14
- depth300: '#5580AE',
15
- base: '#004186',
16
- depth700: '#002B59',
17
- depth900: '#00133B'
15
+ '100': '#71C5E8',
16
+ '300': '#449CD5',
17
+ '500': '#005EB8',
18
+ '700': '#004890',
19
+ '900': '#002855'
18
20
  },
19
21
  secondary: {
20
- depth100: '#EEE8CE',
21
- depth300: '#C6B45C',
22
- base: '#AA8E0B',
23
- depth700: '#715F07',
24
- depth900: '#221C02'
22
+ '100': '#F5ECE3',
23
+ '300': '#DDC0A2',
24
+ '500': '#CCA074',
25
+ '700': '#886B4D',
26
+ '900': '#292017'
25
27
  },
26
28
  accent: {
27
- depth100: '#F9E8D5',
28
- depth300: '#E4A04F',
29
- base: '#DF8D2C',
30
- depth700: '#955E1D',
31
- depth900: '#2D1C09'
29
+ '100': '#F9E8D5',
30
+ '300': '#E4A04F',
31
+ '500': '#DF8D2C',
32
+ '700': '#955E1D',
33
+ '900': '#2D1C09'
32
34
  }
33
35
  },
34
36
  /* Spacing */
35
37
  spacing: {
36
- base: '8px',
38
+ base: 4,
37
39
  },
38
40
  /* Fonts */
39
41
  font: {
40
- family: {
41
- title: 'serif',
42
- body: '"Roboto", Helvetica, Arial, sans-serif'
42
+ size: '14px',
43
+ color: '#4A4A4A',
44
+ body: "'Roboto', Arial, Helvetica, sans-serif",
45
+ heading: "'Roboto', Arial, Helvetica, sans-serif",
46
+ display: "'Roboto', Arial, Helvetica, sans-serif",
47
+ weights: {
48
+ thin: 100,
49
+ light: 300,
50
+ regular: 400,
51
+ medium: 500,
52
+ bold: 700,
53
+ black: 900
43
54
  },
44
- size: {
45
- base: '16px',
46
- }
47
55
  }
48
56
  };
49
57
 
@@ -55,20 +63,18 @@ const ThemeMaternity = Object.assign(Object.assign({}, ThemeDefault), {
55
63
  /* Colors */
56
64
  color: {
57
65
  primary: {
58
- base: '#CD4D9A',
59
- depth100: '#FCEFF6',
60
- depth300: '#FFBFE5',
61
- depth500: '#FF7FCB',
62
- depth700: '#99126C',
63
- depth900: '#00133B'
66
+ '100': '#FCEFF6',
67
+ '300': '#FFBFE5',
68
+ '500': '#CD4D9A',
69
+ '700': '#99126C',
70
+ '900': '#00133B'
64
71
  },
65
72
  secondary: {
66
- base: '#189AB4',
67
- depth100: '#EDF3FF',
68
- depth300: '#BDD2FF',
69
- depth500: '#496BB6',
70
- depth700: '#001C58',
71
- depth900: '#430E31'
73
+ '100': '#EDF3FF',
74
+ '300': '#BDD2FF',
75
+ '500': '#189AB4',
76
+ '700': '#001C58',
77
+ '900': '#430E31'
72
78
  }
73
79
  } });
74
80
 
@@ -77,9 +83,219 @@ const ThemePresets = {
77
83
  'maternidade': ThemeMaternity
78
84
  };
79
85
 
86
+ /**
87
+ * Static
88
+ */
89
+ const Static = {
90
+ /* Colors */
91
+ color: {
92
+ success: {
93
+ lighter: '#DFF6E9',
94
+ light: '#94E1B5',
95
+ base: '#5FD290',
96
+ dark: '#3F8C60',
97
+ darker: '#132A1D',
98
+ depth100: '#DFF6E9',
99
+ depth300: '#94E1B5',
100
+ depth500: '#5FD290',
101
+ depth700: '#3F8C60',
102
+ depth900: '#132A1D',
103
+ },
104
+ info: {
105
+ lighter: '#CFE2FF',
106
+ light: '#95BFFF',
107
+ base: '#6EA8FF',
108
+ dark: '#517BBB',
109
+ darker: '#253855',
110
+ depth100: '#CFE2FF',
111
+ depth300: '#95BFFF',
112
+ depth500: '#6EA8FF',
113
+ depth700: '#517BBB',
114
+ depth900: '#253855',
115
+ },
116
+ error: {
117
+ lighter: '#FBDDDD',
118
+ light: '#F28F8F',
119
+ base: '#EB5757',
120
+ dark: '#9D3A3A',
121
+ darker: '#2F1111',
122
+ depth100: '#FBDDDD',
123
+ depth300: '#F28F8F',
124
+ depth500: '#EB5757',
125
+ depth700: '#9D3A3A',
126
+ depth900: '#2F1111',
127
+ },
128
+ warning: {
129
+ lighter: '#FCFAC4',
130
+ light: '#F8F489',
131
+ base: '#F5EF4E',
132
+ dark: '#A39F34',
133
+ darker: '#313010',
134
+ depth100: '#FCFAC4',
135
+ depth300: '#F8F489',
136
+ depth500: '#F5EF4E',
137
+ depth700: '#A39F34',
138
+ depth900: '#313010',
139
+ },
140
+ /* neutral: {
141
+ 'pure-white': '#FFFFFF',
142
+ white: '#F6F6F6',
143
+ pale: '#E9E9E9',
144
+ lighter: '#E2E2E2',
145
+ light: '#D4D4D4',
146
+ base: '#B7B7B7',
147
+ medium: '#929292',
148
+ dark: '#6E6E6E',
149
+ darker: '#4A4A4A',
150
+ black: '#262626',
151
+ depth0: '#FFFFFF',
152
+ depth100: '#F6F6F6',
153
+ depth200: '#E9E9E9',
154
+ depth300: '#E2E2E2',
155
+ depth400: '#D4D4D4',
156
+ depth500: '#B7B7B7',
157
+ depth600: '#929292',
158
+ depth700: '#6E6E6E',
159
+ depth800: '#4A4A4A',
160
+ depth900: '#262626',
161
+ }, */
162
+ neutral: {
163
+ '0': '#FFFFFF',
164
+ '100': '#F6F6F6',
165
+ '200': '#E9E9E9',
166
+ '300': '#E2E2E2',
167
+ '400': '#D4D4D4',
168
+ '500': '#B7B7B7',
169
+ '600': '#929292',
170
+ '700': '#6E6E6E',
171
+ '800': '#4A4A4A',
172
+ '900': '#262626',
173
+ },
174
+ },
175
+ /* Icons */
176
+ icons: {
177
+ 'sizes': ['128', '72', '64', '48', '40', '32', '24', '20', '16'],
178
+ 'strokes': ['5.25', '3.5', '3.25', '2.75', '2.5', '2.25', '2', '1.75', '1.5'],
179
+ 'default-size': '24',
180
+ },
181
+ /* Breakpoints */
182
+ breakpoints: {
183
+ small: '576px',
184
+ medium: '768px',
185
+ large: '992px',
186
+ xlarge: '1200px',
187
+ },
188
+ };
189
+
190
+ class CuraThemeColorsModule {
191
+ constructor() {
192
+ this.NeutralDepthAlias = {
193
+ 'purewhite': '0',
194
+ 'white': '100',
195
+ 'pale': '200',
196
+ 'lighter': '300',
197
+ 'light': '400',
198
+ 'base': '500',
199
+ 'medium': '600',
200
+ 'dark': '700',
201
+ 'darker': '800',
202
+ 'black': '900',
203
+ };
204
+ this.ColorDepthAlias = {
205
+ 'lighter': '100',
206
+ 'light': '300',
207
+ 'base': '500',
208
+ 'dark': '700',
209
+ 'darker': '900'
210
+ };
211
+ }
212
+ /**
213
+ * Get theme color.
214
+ * @param colorWithDepth string Ex.: primary-light
215
+ * @returns css color property. Color definition or related css var from the theme.
216
+ */
217
+ getColor(colorWithDepth = "primary-base") {
218
+ const { color, depth } = this.splitColorDepth(colorWithDepth);
219
+ const staticColor = this.getStatic(color, depth);
220
+ if (staticColor)
221
+ return staticColor;
222
+ return this.getDynamic(color, depth);
223
+ }
224
+ /**
225
+ * Internal: Look for static color by name and depth.
226
+ * @param color Color name.
227
+ * @param depth Depth number or alias.
228
+ * @returns Static color definition.
229
+ */
230
+ getStatic(color, depth) {
231
+ var _a, _b;
232
+ return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[depth]) || ((_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[this.NeutralDepthAlias[depth]]) || null;
233
+ }
234
+ /**
235
+ * Internal: Look for theme dynamic colors.
236
+ * @param color Color name.
237
+ * @param depth Depth number or alias.
238
+ * @returns Related CSS variable defined by the theme.
239
+ */
240
+ getDynamic(color, depth) {
241
+ const themeVar = this.ColorDepthAlias[depth]
242
+ ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
243
+ : `--cura-color-${color}-${depth}`;
244
+ return getComputedStyle(document.body).getPropertyValue(themeVar)
245
+ ? `var(${themeVar})`
246
+ : `var(--cura-color-primary-500)`;
247
+ }
248
+ /**
249
+ * Internal: Split color strings
250
+ * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.
251
+ * @returns Object { color: string, depth: string }.
252
+ */
253
+ splitColorDepth(colorWithDepth) {
254
+ const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
255
+ return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
256
+ }
257
+ }
258
+
259
+ class CuraThemeFontsModule {
260
+ constructor() {
261
+ /**
262
+ * Get the CSS variable related to the font size base defined by the theme.
263
+ * @returns Related CSS variable as a string.
264
+ */
265
+ this.getSize = () => `var(--cura-font-size)`;
266
+ /**
267
+ * Get CSS variable related to the font color defined by the theme.
268
+ * @returns Related CSS variable as a string.
269
+ */
270
+ this.getColor = () => `var(--cura-font-color)`;
271
+ }
272
+ /**
273
+ * Get the CSS variable related to the font family defined by the theme.
274
+ * @param type 'body' | 'heading' | 'display'
275
+ * @returns Related css variable as a string.
276
+ */
277
+ getFamily(type = "body") {
278
+ const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
279
+ return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
280
+ ? `var(${curaFontFamilyCSSVar})`
281
+ : 'var(--cura-font-body)';
282
+ }
283
+ /**
284
+ * Get the CSS variables related to font weights defined by the theme.
285
+ * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
286
+ */
287
+ getWeights() {
288
+ const weights = {};
289
+ Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
290
+ return weights;
291
+ }
292
+ }
293
+
80
294
  class CuraThemeModule {
81
295
  constructor() {
82
296
  this.prefix = '--cura';
297
+ this.colors = new CuraThemeColorsModule();
298
+ this.fonts = new CuraThemeFontsModule();
83
299
  /* Private */
84
300
  /** Set css var based on object structure */
85
301
  this.setCssVar = (prop, path) => {
@@ -152,7 +368,16 @@ class CuraAPI {
152
368
  const themeModule = new CuraThemeModule();
153
369
  this.theme = {
154
370
  load: function (themeTag) { themeModule.load(themeTag); },
155
- setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); }
371
+ setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
372
+ colors: {
373
+ getColor: function (colorWithDepth) { return themeModule.colors.getColor(colorWithDepth); },
374
+ },
375
+ fonts: {
376
+ getFamily: function (type) { return themeModule.fonts.getFamily(type); },
377
+ getWeights: function () { return themeModule.fonts.getWeights(); },
378
+ getSize: function () { return themeModule.fonts.getSize(); },
379
+ getColor: function () { return themeModule.fonts.getColor(); }
380
+ }
156
381
  };
157
382
  if (config && config.customTheme) {
158
383
  this.theme.setCustom(config.customTheme);
@@ -1 +1 @@
1
- import{p as o,b as c}from"./p-abcda1d1.js";import{g as e}from"./p-d2dcd470.js";(()=>{const c=import.meta.url,e={};return""!==c&&(e.resourcesUrl=new URL(".",c).href),o(e)})().then((o=>(e(),c([["p-ac79f9d1",[[1,"dummy-component"]]],["p-5f113376",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-icon",{name:[513],color:[513],size:[8],iconset:[513],disabled:[516]}]]]],o))));
1
+ import{p as e,b as a}from"./p-a50716bc.js";import{g as c}from"./p-265c1706.js";(()=>{const a=import.meta.url,c={};return""!==a&&(c.resourcesUrl=new URL(".",a).href),e(c)})().then((e=>(c(),a([["p-fc80cb18",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-display",{level:[514],size:[513]}],[1,"cura-heading",{level:[514],size:[513],weight:[513]}],[1,"cura-paragraph",{size:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]]],e))));
package/dist/cura/cura.js CHANGED
@@ -115,7 +115,7 @@ DOMTokenList
115
115
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
116
116
  var start = function() {
117
117
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
118
- var url = new URL('./p-70abb532.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-a8dcaaed.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
@@ -0,0 +1 @@
1
+ const t={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#F9E8D5",300:"#E4A04F",500:"#DF8D2C",700:"#955E1D",900:"#2D1C09"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}},e=Object.assign(Object.assign({},t),{color:{primary:{100:"#FCEFF6",300:"#FFBFE5",500:"#CD4D9A",700:"#99126C",900:"#00133B"},secondary:{100:"#EDF3FF",300:"#BDD2FF",500:"#189AB4",700:"#001C58",900:"#430E31"}}}),r={default:t,maternidade:e},o={color:{success:{lighter:"#DFF6E9",light:"#94E1B5",base:"#5FD290",dark:"#3F8C60",darker:"#132A1D",depth100:"#DFF6E9",depth300:"#94E1B5",depth500:"#5FD290",depth700:"#3F8C60",depth900:"#132A1D"},info:{lighter:"#CFE2FF",light:"#95BFFF",base:"#6EA8FF",dark:"#517BBB",darker:"#253855",depth100:"#CFE2FF",depth300:"#95BFFF",depth500:"#6EA8FF",depth700:"#517BBB",depth900:"#253855"},error:{lighter:"#FBDDDD",light:"#F28F8F",base:"#EB5757",dark:"#9D3A3A",darker:"#2F1111",depth100:"#FBDDDD",depth300:"#F28F8F",depth500:"#EB5757",depth700:"#9D3A3A",depth900:"#2F1111"},warning:{lighter:"#FCFAC4",light:"#F8F489",base:"#F5EF4E",dark:"#A39F34",darker:"#313010",depth100:"#FCFAC4",depth300:"#F8F489",depth500:"#F5EF4E",depth700:"#A39F34",depth900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},icons:{sizes:["128","72","64","48","40","32","24","20","16"],strokes:["5.25","3.5","3.25","2.75","2.5","2.25","2","1.75","1.5"],"default-size":"24"},breakpoints:{small:"576px",medium:"768px",large:"992px",xlarge:"1200px"}};class s{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"},this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base"){const{color:e,depth:r}=this.splitColorDepth(t);return this.getStatic(e,r)||this.getDynamic(e,r)}getStatic(t,e){var r,s;return(null===(r=o.color[t])||void 0===r?void 0:r[e])||(null===(s=o.color[t])||void 0===s?void 0:s[this.NeutralDepthAlias[e]])||null}getDynamic(t,e){const r=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.body).getPropertyValue(r)?`var(${r})`:"var(--cura-color-primary-500)"}splitColorDepth(t){const[e,r]=t.toLowerCase().split(/-(.*)/);return{color:null!=e?e:"primary",depth:null!=r?r:"base"}}}class i{constructor(){this.getSize=()=>"var(--cura-font-size)",this.getColor=()=>"var(--cura-font-color)"}getFamily(t="body"){const e="--cura-font-"+t.toLowerCase();return getComputedStyle(document.body).getPropertyValue(e)?`var(${e})`:"var(--cura-font-body)"}getWeights(){const e={};return Object.keys(t.font.weights).forEach((t=>e[t]=`var(--cura-font-weights-${t})`)),e}}class a{constructor(){this.prefix="--cura",this.colors=new s,this.fonts=new i,this.setCssVar=(t,e)=>{const r=this.groupPath(e,t[0]);this.body.style.setProperty(r,t[1])},this.groupPath=(t,e)=>`${t}-${e}`,this.isObject=t=>t&&"object"==typeof t&&!Array.isArray(t),this.mergeObject=(t,e)=>{const r=Object.entries(t);for(let t of r)this.isObject(t[1])?this.mergeObject(t[1],e[t[0]]):e[t[0]]=t[1]},this.buildCssVars=(t,e)=>{const r=Object.entries(e);for(let e of r)this.isObject(e[1])?this.buildCssVars(this.groupPath(t,e[0]),e[1]):this.setCssVar(e,t)},this.body=window.document.documentElement.querySelector("body")}load(t="default"){this.buildCssVars(this.prefix,r[t]?r[t]:r.default)}setCustom(t){const e=t.name;if(e in r)console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e),this.load("default");else{const o=Object.assign({},JSON.parse(JSON.stringify(t.fromPreset&&t.fromPreset in r?r[t.fromPreset]:r.default)));this.mergeObject(t.definitions,o),r[e]=o,this.load(e)}}}class n{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";const e=new a;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}}},t&&t.customTheme?this.theme.setCustom(t.customTheme):this.theme.load(t&&t.theme?t.theme:"default")}}const h=function(){const t=window.CuraInit;window.CuraAPI=t?new n(t):new n;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}})),t&&"function"==typeof t.onReady&&t.onReady(e)};export{h as g}
@@ -0,0 +1 @@
1
+ System.register([],(function(t){"use strict";return{execute:function(){var e={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#F9E8D5",300:"#E4A04F",500:"#DF8D2C",700:"#955E1D",900:"#2D1C09"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};var r=Object.assign(Object.assign({},e),{color:{primary:{100:"#FCEFF6",300:"#FFBFE5",500:"#CD4D9A",700:"#99126C",900:"#00133B"},secondary:{100:"#EDF3FF",300:"#BDD2FF",500:"#189AB4",700:"#001C58",900:"#430E31"}}});var o={default:e,maternidade:r};var i={color:{success:{lighter:"#DFF6E9",light:"#94E1B5",base:"#5FD290",dark:"#3F8C60",darker:"#132A1D",depth100:"#DFF6E9",depth300:"#94E1B5",depth500:"#5FD290",depth700:"#3F8C60",depth900:"#132A1D"},info:{lighter:"#CFE2FF",light:"#95BFFF",base:"#6EA8FF",dark:"#517BBB",darker:"#253855",depth100:"#CFE2FF",depth300:"#95BFFF",depth500:"#6EA8FF",depth700:"#517BBB",depth900:"#253855"},error:{lighter:"#FBDDDD",light:"#F28F8F",base:"#EB5757",dark:"#9D3A3A",darker:"#2F1111",depth100:"#FBDDDD",depth300:"#F28F8F",depth500:"#EB5757",depth700:"#9D3A3A",depth900:"#2F1111"},warning:{lighter:"#FCFAC4",light:"#F8F489",base:"#F5EF4E",dark:"#A39F34",darker:"#313010",depth100:"#FCFAC4",depth300:"#F8F489",depth500:"#F5EF4E",depth700:"#A39F34",depth900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},icons:{sizes:["128","72","64","48","40","32","24","20","16"],strokes:["5.25","3.5","3.25","2.75","2.5","2.25","2","1.75","1.5"],"default-size":"24"},breakpoints:{small:"576px",medium:"768px",large:"992px",xlarge:"1200px"}};var a=function(){function t(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}t.prototype.getColor=function(t){if(t===void 0){t="primary-base"}var e=this.splitColorDepth(t),r=e.color,o=e.depth;var i=this.getStatic(r,o);if(i)return i;return this.getDynamic(r,o)};t.prototype.getStatic=function(t,e){var r,o;return((r=i.color[t])===null||r===void 0?void 0:r[e])||((o=i.color[t])===null||o===void 0?void 0:o[this.NeutralDepthAlias[e]])||null};t.prototype.getDynamic=function(t,e){var r=this.ColorDepthAlias[e]?"--cura-color-".concat(t,"-").concat(this.ColorDepthAlias[e]):"--cura-color-".concat(t,"-").concat(e);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};t.prototype.splitColorDepth=function(t){var e=t.toLowerCase().split(/-(.*)/),r=e[0],o=e[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return t}();var n=function(){function t(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}t.prototype.getFamily=function(t){if(t===void 0){t="body"}var e="--cura-font-".concat(t.toLowerCase());return getComputedStyle(document.body).getPropertyValue(e)?"var(".concat(e,")"):"var(--cura-font-body)"};t.prototype.getWeights=function(){var t={};Object.keys(e.font.weights).forEach((function(e){return t[e]="var(--cura-font-weights-".concat(e,")")}));return t};return t}();var s=function(){function t(){var t=this;this.prefix="--cura";this.colors=new a;this.fonts=new n;this.setCssVar=function(e,r){var o=t.groupPath(r,e[0]);t.body.style.setProperty(o,e[1])};this.groupPath=function(t,e){return"".concat(t,"-").concat(e)};this.isObject=function(t){return t&&typeof t==="object"&&!Array.isArray(t)};this.mergeObject=function(e,r){var o=Object.entries(e);for(var i=0,a=o;i<a.length;i++){var n=a[i];if(t.isObject(n[1])){t.mergeObject(n[1],r[n[0]])}else{r[n[0]]=n[1]}}};this.buildCssVars=function(e,r){var o=Object.entries(r);for(var i=0,a=o;i<a.length;i++){var n=a[i];if(t.isObject(n[1])){t.buildCssVars(t.groupPath(e,n[0]),n[1])}else{t.setCssVar(n,e)}}};this.body=window.document.documentElement.querySelector("body")}t.prototype.load=function(t){if(t===void 0){t="default"}var e=o[t]?o[t]:o.default;this.buildCssVars(this.prefix,e)};t.prototype.setCustom=function(t){var e=t.name;if(e in o){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e);this.load("default")}else{var r=t.fromPreset&&t.fromPreset in o?o[t.fromPreset]:o.default;var i=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(t.definitions,i);o[e]=i;this.load(e)}};return t}();var c=function(){function t(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";var e=new s;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}}};if(t&&t.customTheme){this.theme.setCustom(t.customTheme)}else{var r=t&&t.theme?t.theme:"default";this.theme.load(r)}}return t}();function l(){var t=window.CuraInit;window.CuraAPI=t?new c(t):new c;var e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}var u=t("g",l)}}}));
@@ -0,0 +1,2 @@
1
+ let t,e,n=!1,l=!1;const s="http://www.w3.org/1999/xlink",o={},r=t=>"object"==(t=typeof t)||"function"===t,c=(t,e,...n)=>{let l=null,s=!1,o=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!r(l))&&(l+=""),s&&o?c[c.length-1].t+=l:c.push(s?i(null,l):l),o=s)};if(u(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const a=i(t,null);return a.l=e,c.length>0&&(a.o=c),a},i=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),u={},a=t=>H(t).$,f=new WeakMap,h=t=>"sc-"+t.p,y=(t,e,n,l,o,c)=>{if(n!==l){let i=U(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,s=p(n),o=p(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if(i||"o"!==e[0]||"n"!==e[1]){const a=r(l);if((i||a&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}let f=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(e=u,f=!0),null==l||!1===l?!1===l&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(s,e):t.removeAttribute(e)):(!i||4&c||o)&&!a&&(l=!0===l?"":l,f?t.setAttributeNS(s,e,l):t.setAttribute(e,l))}else e="-"===e[2]?e.slice(3):U(z,u)?u.slice(2):u[2]+e.slice(3),n&&D.rel(t,e,n,!1),l&&D.ael(t,e,l,!1)}},$=/\s/,p=t=>t?t.split($):[],w=(t,e,n,l)=>{const s=11===e.h.nodeType&&e.h.host?e.h.host:e.h,r=t&&t.l||o,c=e.l||o;for(l in r)l in c||y(s,l,r[l],void 0,n,e.i);for(l in c)y(s,l,r[l],c[l],n,e.i)},d=(e,l,s)=>{const o=l.o[s];let r,c,i=0;if(null!==o.t)r=o.h=B.createTextNode(o.t);else{if(n||(n="svg"===o.u),r=o.h=B.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.u),n&&"foreignObject"===o.u&&(n=!1),w(null,o,n),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),o.o)for(i=0;i<o.o.length;++i)c=d(e,o,i),c&&r.appendChild(c);"svg"===o.u?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},m=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=d(null,l,o),c&&(s[o].h=c,i.insertBefore(c,n)))},b=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.h.remove()},g=(t,e)=>t.u===e.u,v=(t,e)=>{const l=e.h=t.h,s=t.o,o=e.o,r=e.u,c=e.t;null===c?(n="svg"===r||"foreignObject"!==r&&n,"slot"===r||w(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],u=e[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=e[++o]:null==u?u=e[--c]:null==f?f=l[++r]:null==h?h=l[--a]:g(i,f)?(v(i,f),i=e[++o],f=l[++r]):g(u,h)?(v(u,h),u=e[--c],h=l[--a]):g(i,h)?(v(i,h),t.insertBefore(i.h,u.h.nextSibling),i=e[++o],h=l[--a]):g(u,f)?(v(u,f),t.insertBefore(u.h,i.h),u=e[--c],f=l[++r]):(s=d(e&&e[r],n,r),f=l[++r],s&&i.h.parentNode.insertBefore(s,i.h));o>c?m(t,null==l[a+1]?null:l[a+1].h,n,l,r,a):r>a&&b(e,o,c)})(l,s,e,o):null!==o?(null!==t.t&&(l.textContent=""),m(l,null,e,o,0,o.length-1)):null!==s&&b(s,0,s.length-1),n&&"svg"===r&&(n=!1)):t.t!==c&&(l.data=c)},S=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},j=(t,e)=>{if(t.i|=16,!(4&t.i))return S(t,t.g),tt((()=>k(t,e)));t.i|=512},k=(t,e)=>{const n=t.v;return P(void 0,(()=>O(t,n,e)))},O=async(t,e,n)=>{const l=t.$,s=l["s-rc"];n&&(t=>{const e=t.S,n=t.$,l=e.i,s=((t,e)=>{let n=h(e);const l=_.get(n);if(t=11===t.nodeType?t:B,l)if("string"==typeof l){let e,s=f.get(t=t.head||t);s||f.set(t,s=new Set),s.has(n)||(e=B.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);M(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>C(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},M=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.$,o=n.S,r=n.j||i(null,null),a=(t=>t&&t.u===u)(l)?l:c(null,null,l);e=s.tagName,o.k&&(a.l=a.l||{},o.k.map((([t,e])=>a.l[e]=s[t]))),a.u=null,a.i|=4,n.j=a,a.h=r.h=s.shadowRoot||s,t=s["s-sc"],v(r,a)})(n,l)}catch(t){W(t,n.$)}return null},C=t=>{const e=t.$,n=t.g;64&t.i||(t.i|=64,E(e),t.O(e),n||x()),t.m&&(t.m(),t.m=void 0),512&t.i&&Z((()=>j(t,!1))),t.i&=-517},x=()=>{E(B.documentElement),Z((()=>(t=>{const e=D.ce("appload",{detail:{namespace:"cura"}});return t.dispatchEvent(e),e})(z)))},P=(t,e)=>t&&t.then?t.then(e):e(),E=t=>t.classList.add("hydrated"),N=(t,e,n)=>{if(e.M){t.watchers&&(e.C=t.watchers);const l=Object.entries(e.M),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>H(this).P.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=H(t),o=s.$,c=s.P.get(e),i=s.i,u=s.v;if(n=((t,e)=>null==t||r(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.M[e][0]),(!(8&i)||void 0===c)&&n!==c&&(!Number.isNaN(c)||!Number.isNaN(n))&&(s.P.set(e,n),u)){if(l.C&&128&i){const t=l.C[e];t&&t.map((t=>{try{u[t](n,c,e)}catch(t){W(t,o)}}))}2==(18&i)&&j(s,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(t,e,l){D.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(s.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,l])=>{const s=l[1]||t;return n.set(s,t),512&l[0]&&e.k.push([t,s]),s}))}}return t},T=t=>{((t,e)=>{if(t&&t[e])try{t[e](void 0)}catch(t){W(t)}})(t,"connectedCallback")},A=(t,e={})=>{const n=[],l=e.exclude||[],s=z.customElements,o=B.head,r=o.querySelector("meta[charset]"),c=B.createElement("style"),i=[];let u,a=!0;Object.assign(D,e),D.N=new URL(e.resourcesUrl||"./",B.baseURI).href,t.map((t=>{t[1].map((e=>{const o={i:e[0],p:e[1],M:e[2],T:e[3]};o.M=e[2],o.k=[],o.C={};const r=o.p,c=class extends HTMLElement{constructor(t){super(t),R(t=this,o),1&o.i&&t.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):D.jmp((()=>(t=>{if(0==(1&D.i)){const e=H(t),n=e.S,l=()=>{};if(1&e.i)T(e.v);else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){S(e,e.g=n);break}}n.M&&Object.entries(n.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.i)){{if(e.i|=32,(s=V(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(n.C=s.watchers,N(s,n,2),s.isProxied=!0);const t=()=>{};e.i|=8;try{new s(e)}catch(t){W(t)}e.i&=-9,e.i|=128,t(),T(e.v)}if(s.style){let t=s.style;const e=h(n);if(!_.has(e)){const l=()=>{};((t,e,n)=>{let l=_.get(t);I&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,_.set(t,l)})(e,t,!!(1&n.i)),l()}}}const o=e.g,r=()=>j(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){D.jmp((()=>{}))}componentOnReady(){return H(this).A}};o.F=t[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,N(c,o,1)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,r?r.nextSibling:o.firstChild),a=!1,i.length?i.map((t=>t.connectedCallback())):D.jmp((()=>u=setTimeout(x,30)))},F=new WeakMap,H=t=>F.get(t),L=(t,e)=>F.set(e.v=t,e),R=(t,e)=>{const n={i:0,$:t,S:e,P:new Map};return n.A=new Promise((t=>n.O=t)),t["s-p"]=[],t["s-rc"]=[],F.set(t,n)},U=(t,e)=>e in t,W=(t,e)=>(0,console.error)(t,e),q=new Map,V=t=>{const e=t.p.replace(/-/g,"_"),n=t.F,l=q.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(q.set(n,t),t[e])),W)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},_=new Map,z="undefined"!=typeof window?window:{},B=z.document||{head:{}},D={i:0,N:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},G=t=>Promise.resolve(t),I=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),J=[],K=[],Q=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&D.i?Z(Y):D.raf(Y))},X=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){W(t)}t.length=0},Y=()=>{X(J),X(K),(l=J.length>0)&&D.raf(Y)},Z=t=>G().then(t),tt=Q(K,!0);export{u as H,A as b,a as g,c as h,G as p,L as r}
@@ -0,0 +1 @@
1
+ System.register(["./p-e447016d.system.js","./p-3d8bbf37.system.js"],(function(e,r){"use strict";var s,t,n;return{setters:[function(e){s=e.p;t=e.b},function(e){n=e.g}],execute:function(){var e=function(){var e=r.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return s(t)};e().then((function(e){n();return t([["p-fc50b109.system",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-display",{level:[514],size:[513]}],[1,"cura-heading",{level:[514],size:[513],weight:[513]}],[1,"cura-paragraph",{size:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]]],e)}))}}}));