@rededor/cura 0.3.4-alpha.1 → 0.3.4

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 (193) hide show
  1. package/dist/cjs/{app-globals-0f70160b.js → app-globals-a41d7f40.js} +40 -17
  2. package/dist/cjs/app-globals-a41d7f40.js.map +1 -0
  3. package/dist/cjs/css-shim-83cf0349.js +8 -0
  4. package/dist/cjs/css-shim-83cf0349.js.map +1 -0
  5. package/dist/cjs/cura-button_6.cjs.entry.js +334 -0
  6. package/dist/cjs/cura-button_6.cjs.entry.js.map +1 -0
  7. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -2
  8. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
  9. package/dist/cjs/cura.cjs.js +19 -4
  10. package/dist/cjs/cura.cjs.js.map +1 -0
  11. package/dist/cjs/{index-76f95c4b.js → index-0e874533.js} +256 -37
  12. package/dist/cjs/index-0e874533.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +2 -0
  14. package/dist/cjs/index.cjs.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +23 -4
  16. package/dist/cjs/loader.cjs.js.map +1 -0
  17. package/dist/cjs/shadow-css-8baae635.js +391 -0
  18. package/dist/cjs/shadow-css-8baae635.js.map +1 -0
  19. package/dist/collection/api/cura-api.js +1 -0
  20. package/dist/collection/api/cura-api.js.map +1 -0
  21. package/dist/collection/api/cura-api.type.js +1 -0
  22. package/dist/collection/api/cura-api.type.js.map +1 -0
  23. package/dist/collection/api/modules/cura-theme-colors-module.js +1 -0
  24. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -0
  25. package/dist/collection/api/modules/cura-theme-fonts-module.js +1 -0
  26. package/dist/collection/api/modules/cura-theme-fonts-module.js.map +1 -0
  27. package/dist/collection/api/modules/cura-theme-module.js +1 -0
  28. package/dist/collection/api/modules/cura-theme-module.js.map +1 -0
  29. package/dist/collection/api/modules/cura-theme-spacing-module.js +1 -0
  30. package/dist/collection/api/modules/cura-theme-spacing-module.js.map +1 -0
  31. package/dist/collection/api/theme-presets/static.js +1 -0
  32. package/dist/collection/api/theme-presets/static.js.map +1 -0
  33. package/dist/collection/api/theme-presets/theme-default.js +6 -5
  34. package/dist/collection/api/theme-presets/theme-default.js.map +1 -0
  35. package/dist/collection/api/theme-presets/theme-maternity.js +8 -0
  36. package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -0
  37. package/dist/collection/api/theme-presets/theme-oncology.js +27 -12
  38. package/dist/collection/api/theme-presets/theme-oncology.js.map +1 -0
  39. package/dist/collection/api/theme-presets/theme-presets.js +1 -0
  40. package/dist/collection/api/theme-presets/theme-presets.js.map +1 -0
  41. package/dist/collection/assets/icons/iconset-default-list.js +1 -0
  42. package/dist/collection/assets/icons/iconset-default-list.js.map +1 -0
  43. package/dist/collection/collection-manifest.json +3 -2
  44. package/dist/collection/components/buttons/cura-button/cura-button.css +161 -0
  45. package/dist/collection/components/buttons/cura-button/cura-button.js +285 -0
  46. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -0
  47. package/dist/collection/components/cura-icon/cura-icon.css +2 -2
  48. package/dist/collection/components/cura-icon/cura-icon.js +8 -5
  49. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -0
  50. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -1
  51. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -0
  52. package/dist/collection/components/cura-page-template/cura-page-template.css +24 -24
  53. package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
  54. package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -0
  55. package/dist/collection/components/text/cura-display/cura-display.css +13 -14
  56. package/dist/collection/components/text/cura-display/cura-display.js +3 -17
  57. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -0
  58. package/dist/collection/components/text/cura-heading/cura-heading.css +15 -15
  59. package/dist/collection/components/text/cura-heading/cura-heading.js +3 -21
  60. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -0
  61. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +16 -17
  62. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +3 -13
  63. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -0
  64. package/dist/collection/index.js +1 -0
  65. package/dist/collection/index.js.map +1 -0
  66. package/dist/collection/rededor-cura-start.js +1 -0
  67. package/dist/collection/rededor-cura-start.js.map +1 -0
  68. package/dist/collection/utils/utils.js +1 -0
  69. package/dist/collection/utils/utils.js.map +1 -0
  70. package/dist/collection/utils/utils.spec.js +16 -0
  71. package/dist/collection/utils/utils.spec.js.map +1 -0
  72. package/dist/components/cura-button.d.ts +11 -0
  73. package/dist/components/cura-button.js +110 -0
  74. package/dist/components/cura-button.js.map +1 -0
  75. package/dist/components/cura-display.js +7 -20
  76. package/dist/components/cura-display.js.map +1 -0
  77. package/dist/components/cura-heading.js +7 -24
  78. package/dist/components/cura-heading.js.map +1 -0
  79. package/dist/components/cura-icon.js +2 -0
  80. package/dist/components/cura-icon.js.map +1 -0
  81. package/dist/components/cura-icon2.js +12 -8
  82. package/dist/components/cura-icon2.js.map +1 -0
  83. package/dist/components/cura-icons-view.js +6 -3
  84. package/dist/components/cura-icons-view.js.map +1 -0
  85. package/dist/components/cura-page-template.js +7 -4
  86. package/dist/components/cura-page-template.js.map +1 -0
  87. package/dist/components/cura-paragraph.js +7 -16
  88. package/dist/components/cura-paragraph.js.map +1 -0
  89. package/dist/components/index.d.ts +21 -9
  90. package/dist/components/index.js +67 -24
  91. package/dist/components/index.js.map +1 -0
  92. package/dist/cura/cura.esm.js +2 -1
  93. package/dist/cura/cura.esm.js.map +1 -0
  94. package/dist/cura/cura.js +3 -1
  95. package/dist/cura/index.esm.js +2 -0
  96. package/dist/cura/index.esm.js.map +1 -0
  97. package/dist/cura/p-118112e5.system.js +14 -0
  98. package/dist/cura/p-118112e5.system.js.map +1 -0
  99. package/dist/cura/p-183305c3.js +2 -0
  100. package/dist/cura/p-183305c3.js.map +1 -0
  101. package/dist/cura/p-36c8b693.system.js +2 -0
  102. package/dist/cura/p-36c8b693.system.js.map +1 -0
  103. package/dist/cura/p-3f6aaefc.system.js +2 -0
  104. package/dist/cura/p-3f6aaefc.system.js.map +1 -0
  105. package/dist/cura/p-4fc49972.system.js +2 -0
  106. package/dist/cura/p-4fc49972.system.js.map +1 -0
  107. package/dist/cura/p-50ea2036.system.js +2 -1
  108. package/dist/cura/p-50ea2036.system.js.map +1 -0
  109. package/dist/cura/{p-54c09404.system.entry.js → p-825028d1.system.entry.js} +2 -1
  110. package/dist/cura/p-825028d1.system.entry.js.map +1 -0
  111. package/dist/cura/p-a84ae34f.system.js +3 -0
  112. package/dist/cura/p-a84ae34f.system.js.map +1 -0
  113. package/dist/cura/p-bac0b4ab.js +2 -0
  114. package/dist/cura/p-bac0b4ab.js.map +1 -0
  115. package/dist/cura/p-beab48cd.js +13 -0
  116. package/dist/cura/p-beab48cd.js.map +1 -0
  117. package/dist/cura/p-cbc91ac5.js +3 -0
  118. package/dist/cura/p-cbc91ac5.js.map +1 -0
  119. package/dist/cura/p-e32ae366.entry.js +2 -0
  120. package/dist/cura/p-e32ae366.entry.js.map +1 -0
  121. package/dist/cura/p-e5fd4452.system.entry.js +2 -0
  122. package/dist/cura/p-e5fd4452.system.entry.js.map +1 -0
  123. package/dist/cura/p-e7785610.entry.js +2 -0
  124. package/dist/cura/p-e7785610.entry.js.map +1 -0
  125. package/dist/esm/{app-globals-cb45bff3.js → app-globals-8ed931e6.js} +40 -17
  126. package/dist/esm/app-globals-8ed931e6.js.map +1 -0
  127. package/dist/esm/css-shim-d13f0738.js +6 -0
  128. package/dist/esm/css-shim-d13f0738.js.map +1 -0
  129. package/dist/esm/cura-button_6.entry.js +325 -0
  130. package/dist/esm/cura-button_6.entry.js.map +1 -0
  131. package/dist/esm/cura-icons-view.entry.js +4 -2
  132. package/dist/esm/cura-icons-view.entry.js.map +1 -0
  133. package/dist/esm/cura.js +16 -4
  134. package/dist/esm/cura.js.map +1 -0
  135. package/dist/esm/{index-7e8c969d.js → index-92c824be.js} +253 -38
  136. package/dist/esm/index-92c824be.js.map +1 -0
  137. package/dist/esm/index.js +2 -0
  138. package/dist/esm/index.js.map +1 -0
  139. package/dist/esm/loader.js +23 -4
  140. package/dist/esm/loader.js.map +1 -0
  141. package/dist/esm/polyfills/css-shim.js +1 -1
  142. package/dist/esm/shadow-css-07b0c8c8.js +389 -0
  143. package/dist/esm/shadow-css-07b0c8c8.js.map +1 -0
  144. package/dist/esm-es5/app-globals-8ed931e6.js +2 -0
  145. package/dist/esm-es5/app-globals-8ed931e6.js.map +1 -0
  146. package/dist/esm-es5/css-shim-d13f0738.js +2 -0
  147. package/dist/esm-es5/css-shim-d13f0738.js.map +1 -0
  148. package/dist/esm-es5/cura-button_6.entry.js +2 -0
  149. package/dist/esm-es5/cura-button_6.entry.js.map +1 -0
  150. package/dist/esm-es5/cura-icons-view.entry.js +2 -1
  151. package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
  152. package/dist/esm-es5/cura.js +2 -1
  153. package/dist/esm-es5/cura.js.map +1 -0
  154. package/dist/esm-es5/index-92c824be.js +3 -0
  155. package/dist/esm-es5/index-92c824be.js.map +1 -0
  156. package/dist/esm-es5/index.js +2 -0
  157. package/dist/esm-es5/index.js.map +1 -0
  158. package/dist/esm-es5/loader.js +2 -1
  159. package/dist/esm-es5/loader.js.map +1 -0
  160. package/dist/esm-es5/shadow-css-07b0c8c8.js +13 -0
  161. package/dist/esm-es5/shadow-css-07b0c8c8.js.map +1 -0
  162. package/dist/{dist/loader → loader}/cdn.js +1 -1
  163. package/dist/{dist/loader → loader}/index.cjs.js +1 -1
  164. package/dist/{dist/loader → loader}/index.d.ts +10 -1
  165. package/dist/loader/index.es2017.js +3 -0
  166. package/dist/{dist/loader → loader}/index.js +2 -2
  167. package/dist/types/api/theme-presets/theme-maternity.d.ts +7 -0
  168. package/dist/types/api/theme-presets/theme-oncology.d.ts +5 -5
  169. package/dist/types/api/theme-presets/theme-presets.d.ts +12 -5
  170. package/dist/types/components/buttons/cura-button/cura-button.d.ts +54 -0
  171. package/dist/types/components.d.ts +101 -0
  172. package/dist/types/stencil-public-runtime.d.ts +77 -15
  173. package/package.json +7 -7
  174. package/dist/cjs/cura-display_4.cjs.entry.js +0 -257
  175. package/dist/cjs/cura-icon.cjs.entry.js +0 -59
  176. package/dist/cura/p-0b79032f.system.js +0 -2
  177. package/dist/cura/p-11002b56.system.js +0 -1
  178. package/dist/cura/p-32769783.system.js +0 -1
  179. package/dist/cura/p-57c5329e.js +0 -2
  180. package/dist/cura/p-5a6643e1.entry.js +0 -1
  181. package/dist/cura/p-a2ad5637.system.entry.js +0 -1
  182. package/dist/cura/p-aca36c98.js +0 -1
  183. package/dist/cura/p-bd91ecb9.system.entry.js +0 -1
  184. package/dist/cura/p-d69916ee.entry.js +0 -1
  185. package/dist/cura/p-f8a5b97d.entry.js +0 -1
  186. package/dist/dist/loader/index.es2017.js +0 -3
  187. package/dist/esm/cura-display_4.entry.js +0 -250
  188. package/dist/esm/cura-icon.entry.js +0 -55
  189. package/dist/esm-es5/app-globals-cb45bff3.js +0 -1
  190. package/dist/esm-es5/cura-display_4.entry.js +0 -1
  191. package/dist/esm-es5/cura-icon.entry.js +0 -1
  192. package/dist/esm-es5/index-7e8c969d.js +0 -2
  193. /package/dist/{dist/loader → loader}/package.json +0 -0
@@ -7,11 +7,11 @@ export const ThemeOncology = Object.assign(Object.assign({}, ThemeDefault), {
7
7
  /* Colors */
8
8
  color: {
9
9
  primary: {
10
- '100': '#99CFFF',
11
- '300': '#47A9FF',
12
- '500': '#0083F5',
13
- '700': '#006DCC',
14
- '900': '#0058A4',
10
+ '100': '#AABEE1',
11
+ '300': '#557EC4',
12
+ '500': '#003DA6',
13
+ '700': '#00296F',
14
+ '900': '#000C21'
15
15
  },
16
16
  secondary: {
17
17
  '100': '#CDD7E3',
@@ -20,19 +20,34 @@ export const ThemeOncology = Object.assign(Object.assign({}, ThemeDefault), {
20
20
  '700': '#365E8F',
21
21
  '900': '#043673',
22
22
  },
23
- aux1: {
24
- '100': '#AABEE1',
25
- '300': '#557EC4',
26
- '500': '#003DA6',
27
- '700': '#00296F',
28
- '900': '#000C21',
23
+ accent: {
24
+ '100': '#99CFFF',
25
+ '300': '#47A9FF',
26
+ '500': '#0083F5',
27
+ '700': '#006DCC',
28
+ '900': '#0058A4',
29
29
  },
30
- aux2: {
30
+ aux: {
31
31
  '100': '#DAF2EF',
32
32
  '300': '#84D4CA',
33
33
  '500': '#47BFB0',
34
34
  '700': '#2F7F75',
35
35
  '900': '#0E2623',
36
36
  },
37
+ }, font: {
38
+ size: '14px',
39
+ color: '#4A4A4A',
40
+ body: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
41
+ heading: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
42
+ display: "'Hanken Grotesk', Arial, Helvetica, sans-serif",
43
+ weights: {
44
+ thin: 100,
45
+ light: 300,
46
+ regular: 400,
47
+ medium: 500,
48
+ bold: 700,
49
+ black: 900
50
+ },
37
51
  }
38
52
  });
53
+ //# sourceMappingURL=theme-oncology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-oncology.js","sourceRoot":"","sources":["../../../src/api/theme-presets/theme-oncology.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,CAAC,MAAM,aAAa,mCAErB,YAAY;EAEf,YAAY;EACZ,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,GAAG,EAAE;MACH,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF,EACD,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,gDAAgD;IACtD,OAAO,EAAE,gDAAgD;IACzD,OAAO,EAAE,gDAAgD;IACzD,OAAO,EAAE;MACP,IAAI,EAAE,GAAG;MACT,KAAK,EAAE,GAAG;MACV,OAAO,EAAE,GAAG;MACZ,MAAM,EAAE,GAAG;MACX,IAAI,EAAE,GAAG;MACT,KAAK,EAAE,GAAG;KACX;GACF,GACF,CAAC","sourcesContent":["/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n"]}
@@ -6,3 +6,4 @@ export const ThemePresets = {
6
6
  'maternidade': ThemeMaternity,
7
7
  'oncologia': ThemeOncology,
8
8
  };
9
+ //# sourceMappingURL=theme-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-presets.js","sourceRoot":"","sources":["../../../src/api/theme-presets/theme-presets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,YAAY,GAAG;EAC1B,SAAS,EAAE,YAAY;EACvB,aAAa,EAAE,cAAc;EAC7B,WAAW,EAAE,aAAa;CAC3B,CAAC","sourcesContent":["import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n"]}
@@ -1 +1,2 @@
1
1
  export default ["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"];
2
+ //# sourceMappingURL=iconset-default-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconset-default-list.js","sourceRoot":"","sources":["../../../src/assets/icons/iconset-default-list.ts"],"names":[],"mappings":"AAAA,eAAe,CAAC,KAAK,EAAC,eAAe,EAAC,aAAa,EAAC,eAAe,EAAC,WAAW,EAAC,iBAAiB,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,EAAC,kBAAkB,EAAC,SAAS,EAAC,eAAe,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,EAAC,YAAY,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAC,YAAY,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,QAAQ,EAAC,UAAU,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,MAAM,EAAC,YAAY,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,EAAC,gBAAgB,EAAC,SAAS,EAAC,OAAO,EAAC,YAAY,EAAC,WAAW,EAAC,KAAK,EAAC,UAAU,EAAC,WAAW,EAAC,YAAY,EAAC,YAAY,EAAC,QAAQ,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,cAAc,EAAC,UAAU,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,SAAS,EAAC,gBAAgB,EAAC,WAAW,EAAC,eAAe,EAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,aAAa,EAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAC,YAAY,EAAC,YAAY,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,EAAC,WAAW,EAAC,WAAW,EAAC,SAAS,EAAC,SAAS,EAAC,gBAAgB,EAAC,gBAAgB,EAAC,OAAO,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,UAAU,EAAC,SAAS,EAAC,QAAQ,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAC,YAAY,EAAC,QAAQ,EAAC,cAAc,EAAC,WAAW,EAAC,UAAU,EAAC,QAAQ,EAAC,UAAU,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,CAAC,CAAC","sourcesContent":["export default [\"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\"];"]}
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "entries": [
3
+ "./components/buttons/cura-button/cura-button.js",
3
4
  "./components/cura-icon/cura-icon.js",
4
5
  "./components/cura-icons-view/cura-icons-view.js",
5
6
  "./components/cura-page-template/cura-page-template.js",
@@ -9,8 +10,8 @@
9
10
  ],
10
11
  "compiler": {
11
12
  "name": "@stencil/core",
12
- "version": "2.18.1",
13
- "typescriptVersion": "4.7.4"
13
+ "version": "3.3.0",
14
+ "typescriptVersion": "5.0.4"
14
15
  },
15
16
  "collections": [],
16
17
  "bundles": [],
@@ -0,0 +1,161 @@
1
+ :host {
2
+ display: inline-block;
3
+ vertical-align: middle;
4
+ }
5
+ :host button, :host a {
6
+ --shadown-color: 38, 38, 38;
7
+ --shadow-opacity: 0.16;
8
+ outline: none;
9
+ box-shadow: none;
10
+ box-sizing: border-box;
11
+ padding: calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);
12
+ min-height: calc(var(--base-spacing) * 13px);
13
+ display: flex;
14
+ width: 100%;
15
+ align-items: center;
16
+ border-radius: 4px;
17
+ transition: background-color 0.1s linear, box-shadow 0.1s linear, border-color 0.1s linear;
18
+ font-size: var(--font-size);
19
+ cursor: pointer;
20
+ }
21
+ :host button:hover, :host a:hover {
22
+ box-shadow: 0 4px 8px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
23
+ }
24
+ :host button:active, :host a:active {
25
+ box-shadow: none;
26
+ }
27
+ :host button .label, :host a .label {
28
+ flex: 1;
29
+ color: var(--neutral-black);
30
+ font-family: var(--font-family);
31
+ font-weight: var(--font-weight-medium);
32
+ font-size: 1.43em;
33
+ line-height: 1.1em;
34
+ }
35
+ :host button.icon-left cura-icon, :host a.icon-left cura-icon {
36
+ margin-right: calc(var(--base-spacing) * 3px);
37
+ }
38
+ :host button.icon-right, :host a.icon-right {
39
+ flex-direction: row-reverse;
40
+ }
41
+ :host button.icon-right cura-icon, :host a.icon-right cura-icon {
42
+ margin-left: calc(var(--base-spacing) * 3px);
43
+ }
44
+ :host button.medium, :host a.medium {
45
+ padding: calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);
46
+ min-height: calc(var(--base-spacing) * 11px);
47
+ }
48
+ :host button.medium:hover, :host a.medium:hover {
49
+ box-shadow: 0 3px 6px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
50
+ }
51
+ :host button.medium:active, :host a.medium:active {
52
+ box-shadow: none;
53
+ }
54
+ :host button.medium .label, :host a.medium .label {
55
+ font-size: 1.14em;
56
+ letter-spacing: 2%;
57
+ }
58
+ :host button.small, :host a.small {
59
+ padding: calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);
60
+ min-height: calc(var(--base-spacing) * 8px);
61
+ }
62
+ :host button.small:hover, :host a.small:hover {
63
+ box-shadow: 0 2px 5px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
64
+ }
65
+ :host button.small:active, :host a.small:active {
66
+ box-shadow: none;
67
+ }
68
+ :host button.small.icon-left cura-icon, :host a.small.icon-left cura-icon {
69
+ margin-right: calc(var(--base-spacing) * 2.5px);
70
+ }
71
+ :host button.small.icon-right cura-icon, :host a.small.icon-right cura-icon {
72
+ margin-left: calc(var(--base-spacing) * 2.5px);
73
+ }
74
+ :host button.small .label, :host a.small .label {
75
+ font-size: 1em;
76
+ letter-spacing: 2%;
77
+ }
78
+ :host button.disabled, :host a.disabled {
79
+ cursor: not-allowed;
80
+ }
81
+ :host button.disabled:hover, :host a.disabled:hover {
82
+ box-shadow: none;
83
+ }
84
+ :host button.button-solid, :host a.button-solid {
85
+ background-color: var(--color-base);
86
+ border-width: 1px;
87
+ border-color: var(--color-dark);
88
+ border-style: solid;
89
+ }
90
+ :host button.button-solid:hover, :host a.button-solid:hover {
91
+ background-color: var(--color-light);
92
+ border-color: var(--color-base);
93
+ }
94
+ :host button.button-solid:active, :host a.button-solid:active {
95
+ background-color: var(--color-dark);
96
+ }
97
+ :host button.button-solid .label, :host a.button-solid .label {
98
+ color: var(--neutral-black);
99
+ }
100
+ :host button.button-solid .label.inverted, :host a.button-solid .label.inverted {
101
+ color: var(--neutral-white);
102
+ }
103
+ :host button.button-solid.disabled, :host a.button-solid.disabled {
104
+ background-color: var(--neutral-light);
105
+ border-color: var(--neutral-base);
106
+ }
107
+ :host button.button-solid.disabled .label, :host button.button-solid.disabled .label.inverted, :host a.button-solid.disabled .label, :host a.button-solid.disabled .label.inverted {
108
+ color: var(--neutral-dark);
109
+ }
110
+ :host button.button-outline, :host a.button-outline {
111
+ background-color: transparent;
112
+ border-width: 2px;
113
+ border-color: var(--color-base);
114
+ border-style: solid;
115
+ }
116
+ :host button.button-outline:hover, :host a.button-outline:hover {
117
+ border-color: var(--color-light);
118
+ }
119
+ :host button.button-outline:not(.disabled):hover .label, :host a.button-outline:not(.disabled):hover .label {
120
+ color: var(--color-light);
121
+ }
122
+ :host button.button-outline:not(.disabled):hover cura-icon, :host a.button-outline:not(.disabled):hover cura-icon {
123
+ --color: var(--color-light) !important;
124
+ }
125
+ :host button.button-outline .label, :host a.button-outline .label {
126
+ color: var(--color-base);
127
+ }
128
+ :host button.button-outline .label.inverted, :host a.button-outline .label.inverted {
129
+ color: var(--neutral-white);
130
+ }
131
+ :host button.button-outline:not(.disabled):not(.inverted):active, :host a.button-outline:not(.disabled):not(.inverted):active {
132
+ border-color: var(--color-dark);
133
+ }
134
+ :host button.button-outline:not(.disabled):not(.inverted):active .label, :host a.button-outline:not(.disabled):not(.inverted):active .label {
135
+ color: var(--color-dark);
136
+ }
137
+ :host button.button-outline:not(.disabled):not(.inverted):active cura-icon, :host a.button-outline:not(.disabled):not(.inverted):active cura-icon {
138
+ --color: var(--color-dark) !important;
139
+ }
140
+ :host button.button-outline.inverted, :host a.button-outline.inverted {
141
+ border-color: var(--neutral-white);
142
+ }
143
+ :host button.button-outline.inverted:hover, :host a.button-outline.inverted:hover {
144
+ border-color: var(--color-light);
145
+ box-shadow: none;
146
+ }
147
+ :host button.button-outline.inverted:not(.disabled):active, :host a.button-outline.inverted:not(.disabled):active {
148
+ border-color: var(--neutral-white);
149
+ }
150
+ :host button.button-outline.inverted:not(.disabled):active .label, :host a.button-outline.inverted:not(.disabled):active .label {
151
+ color: var(--neutral-white);
152
+ }
153
+ :host button.button-outline.inverted:not(.disabled):active cura-icon, :host a.button-outline.inverted:not(.disabled):active cura-icon {
154
+ --color: var(--neutral-white) !important;
155
+ }
156
+ :host button.button-outline.disabled, :host a.button-outline.disabled {
157
+ border-color: var(--neutral-base);
158
+ }
159
+ :host button.button-outline.disabled .label, :host button.button-outline.disabled .label.inverted, :host a.button-outline.disabled .label, :host a.button-outline.disabled .label.inverted {
160
+ color: var(--neutral-dark);
161
+ }
@@ -0,0 +1,285 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class CuraButton {
3
+ constructor() {
4
+ this.type = 'solid';
5
+ this.size = 'large';
6
+ this.disabled = false;
7
+ this.isLoading = false;
8
+ this.iconName = undefined;
9
+ this.iconset = 'default';
10
+ this.iconPosition = 'left';
11
+ this.href = undefined;
12
+ this.target = "_self";
13
+ this.color = 'accent';
14
+ this.fontColor = 'dark';
15
+ this.styles = {};
16
+ }
17
+ handleChangeColor() {
18
+ this.setColors();
19
+ }
20
+ connectedCallback() {
21
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
22
+ this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
23
+ this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
24
+ this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);
25
+ this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
26
+ this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
27
+ this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);
28
+ this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
29
+ this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
30
+ this.styles['--font-weight-medium'] = this.weights.medium;
31
+ this.setColors();
32
+ }
33
+ getClasses() {
34
+ const classes = {};
35
+ classes[`button-${this.type.toLowerCase()}`] = true;
36
+ classes[`${this.size.toLowerCase()}`] = true;
37
+ classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
38
+ classes['inverted'] = this.fontColor === 'light';
39
+ classes['disabled'] = this.disabled;
40
+ return classes;
41
+ }
42
+ setColors() {
43
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`), '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`), '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`) });
44
+ }
45
+ getIcon() {
46
+ if (!this.iconName)
47
+ return '';
48
+ const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
49
+ const color = this.disabled
50
+ ? 'neutral-dark'
51
+ : this.fontColor === 'light'
52
+ ? 'neutral-white'
53
+ : this.type === 'solid'
54
+ ? 'neutral-black'
55
+ : `${this.color}-base`;
56
+ return h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
57
+ }
58
+ render() {
59
+ return (h(Host, null, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null)))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null))))));
60
+ }
61
+ static get is() { return "cura-button"; }
62
+ static get encapsulation() { return "shadow"; }
63
+ static get originalStyleUrls() {
64
+ return {
65
+ "$": ["cura-button.scss"]
66
+ };
67
+ }
68
+ static get styleUrls() {
69
+ return {
70
+ "$": ["cura-button.css"]
71
+ };
72
+ }
73
+ static get properties() {
74
+ return {
75
+ "type": {
76
+ "type": "string",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "'solid' | 'outline' | 'transparent' | 'icon'",
80
+ "resolved": "\"icon\" | \"outline\" | \"solid\" | \"transparent\"",
81
+ "references": {}
82
+ },
83
+ "required": false,
84
+ "optional": false,
85
+ "docs": {
86
+ "tags": [],
87
+ "text": "Button type: solid (default) | outline | transparent | icon."
88
+ },
89
+ "attribute": "type",
90
+ "reflect": true,
91
+ "defaultValue": "'solid'"
92
+ },
93
+ "size": {
94
+ "type": "string",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "'small' | 'medium' | 'large'",
98
+ "resolved": "\"large\" | \"medium\" | \"small\"",
99
+ "references": {}
100
+ },
101
+ "required": false,
102
+ "optional": false,
103
+ "docs": {
104
+ "tags": [],
105
+ "text": "Button size: small | medium | large (default)"
106
+ },
107
+ "attribute": "size",
108
+ "reflect": true,
109
+ "defaultValue": "'large'"
110
+ },
111
+ "disabled": {
112
+ "type": "boolean",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "boolean",
116
+ "resolved": "boolean",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": false,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": "Disabled state. Boolean."
124
+ },
125
+ "attribute": "disabled",
126
+ "reflect": true,
127
+ "defaultValue": "false"
128
+ },
129
+ "isLoading": {
130
+ "type": "boolean",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "boolean",
134
+ "resolved": "boolean",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [],
141
+ "text": "Loading state. Boolean."
142
+ },
143
+ "attribute": "is-loading",
144
+ "reflect": true,
145
+ "defaultValue": "false"
146
+ },
147
+ "iconName": {
148
+ "type": "string",
149
+ "mutable": false,
150
+ "complexType": {
151
+ "original": "string",
152
+ "resolved": "string",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": "Name of the icon to be used from iconset."
160
+ },
161
+ "attribute": "icon-name",
162
+ "reflect": true
163
+ },
164
+ "iconset": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string",
169
+ "resolved": "string",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Custom iconset if needed."
177
+ },
178
+ "attribute": "iconset",
179
+ "reflect": true,
180
+ "defaultValue": "'default'"
181
+ },
182
+ "iconPosition": {
183
+ "type": "string",
184
+ "mutable": false,
185
+ "complexType": {
186
+ "original": "'left' | 'right'",
187
+ "resolved": "\"left\" | \"right\"",
188
+ "references": {}
189
+ },
190
+ "required": false,
191
+ "optional": false,
192
+ "docs": {
193
+ "tags": [],
194
+ "text": "Icon position: left (default) | right."
195
+ },
196
+ "attribute": "icon-position",
197
+ "reflect": true,
198
+ "defaultValue": "'left'"
199
+ },
200
+ "href": {
201
+ "type": "string",
202
+ "mutable": false,
203
+ "complexType": {
204
+ "original": "string",
205
+ "resolved": "string",
206
+ "references": {}
207
+ },
208
+ "required": false,
209
+ "optional": false,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": "Property href switch button to link."
213
+ },
214
+ "attribute": "href",
215
+ "reflect": true
216
+ },
217
+ "target": {
218
+ "type": "string",
219
+ "mutable": false,
220
+ "complexType": {
221
+ "original": "string",
222
+ "resolved": "string",
223
+ "references": {}
224
+ },
225
+ "required": false,
226
+ "optional": false,
227
+ "docs": {
228
+ "tags": [],
229
+ "text": "Set target if link."
230
+ },
231
+ "attribute": "target",
232
+ "reflect": false,
233
+ "defaultValue": "\"_self\""
234
+ },
235
+ "color": {
236
+ "type": "string",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "string",
240
+ "resolved": "string",
241
+ "references": {}
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": "Color base from color scheme. Default: accent."
248
+ },
249
+ "attribute": "color",
250
+ "reflect": false,
251
+ "defaultValue": "'accent'"
252
+ },
253
+ "fontColor": {
254
+ "type": "string",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "'dark' | 'light'",
258
+ "resolved": "\"dark\" | \"light\"",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": false,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": "Set the font color to dark or light."
266
+ },
267
+ "attribute": "font-color",
268
+ "reflect": false,
269
+ "defaultValue": "'dark'"
270
+ }
271
+ };
272
+ }
273
+ static get states() {
274
+ return {
275
+ "styles": {}
276
+ };
277
+ }
278
+ static get watchers() {
279
+ return [{
280
+ "propName": "color",
281
+ "methodName": "handleChangeColor"
282
+ }];
283
+ }
284
+ }
285
+ //# sourceMappingURL=cura-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-button.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,UAAU;;gBAKuD,OAAO;gBAIvB,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM;;kBAS7C,OAAO;iBAKR,QAAQ;qBAQc,MAAM;kBAG1B,EAAE;;EATpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAWD,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAC1E,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvF,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACrF,IAAI,CAAC,MA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AU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM;MACtG,IAAI,CAAC,OAAO,EAAE;MAChB,YAAM,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC;QAAE,eAAa,CAAO,CACpF,CACL,CAAC,CAAC,CAAC,CACF,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;MACjF,IAAI,CAAC,OAAO,EAAE;MAChB,YAAM,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC;QAAE,eAAa,CAAO,CAC/E,CACV,CACM,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button type: solid (default) | outline | transparent | icon.\n */\n @Prop({reflect: true}) type: 'solid' | 'outline' | 'transparent' | 'icon' = 'solid';\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({reflect: true}) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({reflect: true}) isLoading = false;\n \n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({reflect: true}) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({reflect: true}) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({reflect: true}) iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop() target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop() fontColor: 'dark' | 'light' = 'dark';\n\n\n @State() styles = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.setColors();\n }\n \n getClasses() {\n const classes = {};\n classes[`button-${this.type.toLowerCase()}`] = true;\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.disabled \n ? 'neutral-dark' \n : this.fontColor === 'light' \n ? 'neutral-white' \n : this.type === 'solid'\n ? 'neutral-black'\n : `${this.color}-base`;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href} target={this.target} class={this.getClasses()} style={this.styles}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </a>\n ) : (\n <button class={this.getClasses()} style={this.styles} disabled={this.disabled || null}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
@@ -1,8 +1,8 @@
1
- .cura-icon {
1
+ :host {
2
2
  width: var(--size);
3
3
  height: var(--size);
4
4
  }
5
- .cura-icon svg {
5
+ :host svg {
6
6
  display: inline-block;
7
7
  stroke: var(--color);
8
8
  width: var(--size);
@@ -1,10 +1,6 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  export class CuraIcon {
3
3
  constructor() {
4
- this.name = '';
5
- this.color = 'neutral-base';
6
- this.iconset = 'default';
7
- this.disabled = false;
8
4
  this.sizes = {
9
5
  "128": { size: 128, stroke: 5.25 },
10
6
  "72": { size: 72, stroke: 3.5 },
@@ -17,6 +13,11 @@ export class CuraIcon {
17
13
  "16": { size: 16, stroke: 1.5 },
18
14
  "default": { size: 24, stroke: 2 }
19
15
  };
16
+ this.name = '';
17
+ this.color = 'neutral-base';
18
+ this.size = undefined;
19
+ this.iconset = 'default';
20
+ this.disabled = false;
20
21
  }
21
22
  sizeHandler(size) {
22
23
  const scaledStroke = (iconSize) => {
@@ -37,9 +38,10 @@ export class CuraIcon {
37
38
  this.host.style.setProperty(prop, value);
38
39
  }
39
40
  render() {
40
- return (h(Host, { class: 'cura-icon' }, 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}` }))));
41
+ 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}` }))));
41
42
  }
42
43
  static get is() { return "cura-icon"; }
44
+ static get encapsulation() { return "shadow"; }
43
45
  static get originalStyleUrls() {
44
46
  return {
45
47
  "$": ["cura-icon.scss"]
@@ -157,3 +159,4 @@ export class CuraIcon {
157
159
  }];
158
160
  }
159
161
  }
162
+ //# sourceMappingURL=cura-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-icon.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,QAAQ;;IAUnB,UAAK,GAAG;MACN,KAAK,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC;MAChC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;MAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;MAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;MAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;MAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;MAC9B,IAAI,EAAE,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AAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;EACtH,CAAC;EAID,iBAAiB;IACf,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;IACjD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;EACtB,CAAC;EAED,eAAe,CAAC,IAAY,EAAE,KAAa;IACzC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;EAC3C,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,WACE,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,mBAAmB,EAAC,eAAe,EACnC,KAAK,EAAC,4BAA4B;QAClC,WACE,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,kBAAkB,IAAI,CAAC,OAAO,QAAQ,IAAI,CAAC,IAAI,EAAE,GAC1E,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Element, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-icon',\n styleUrl: 'cura-icon.scss',\n shadow: true\n})\nexport class CuraIcon {\n\n @Prop({reflect: true}) name = '';\n @Prop() color = 'neutral-base';\n @Prop() size: string | number;\n @Prop({reflect: true}) iconset = 'default';\n @Prop() disabled = false;\n\n @Element() host: HTMLElement;\n\n sizes = {\n \"128\": {size: 128, stroke: 5.25},\n \"72\": {size: 72, stroke: 3.5},\n \"64\": {size: 64, stroke: 3.25},\n \"48\": {size: 48, stroke: 2.75},\n \"40\": {size: 40, stroke: 2.5},\n \"32\": {size: 32, stroke: 2.25},\n \"24\": {size: 24, stroke: 2},\n \"20\": {size: 20, stroke: 1.75},\n \"16\": {size: 16, stroke: 1.5},\n \"default\": {size: 24, stroke: 2}\n };\n\n @Watch('size')\n sizeHandler(size: string | number) {\n const scaledStroke = (iconSize: string | number) => {\n return `${this.sizes[iconSize].stroke * (this.sizes.default.size / this.sizes[iconSize].size)}px`;\n }\n this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);\n this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke(\"default\"));\n }\n\n @Watch('color')\n @Watch('disabled')\n colorHandler() {\n this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color));\n }\n\n assetsPath: string;\n\n connectedCallback() {\n this.assetsPath = window.CuraAPI.localAssetsPath;\n this.sizeHandler(this.size);\n this.colorHandler();\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <svg\n version=\"1.1\"\n viewBox=\"0 0 24 24\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <use\n xlinkHref={`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`}>\n </use>\n </svg>\n </Host>\n );\n }\n\n}\n"]}