@rededor/cura 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
  2. package/dist/cjs/app-globals-2988084b.js.map +1 -0
  3. package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
  4. package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
  5. package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
  6. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
  7. package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
  8. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
  9. package/dist/cjs/cura-display.cjs.entry.js +74 -0
  10. package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
  11. package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
  12. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
  13. package/dist/cjs/cura-label.cjs.entry.js +69 -0
  14. package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
  15. package/dist/cjs/cura.cjs.js +2 -2
  16. package/dist/cjs/index.cjs.js +7 -0
  17. package/dist/cjs/index.cjs.js.map +1 -1
  18. package/dist/cjs/loader.cjs.js +2 -2
  19. package/dist/collection/api/cura-api.type.js.map +1 -1
  20. package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
  21. package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
  22. package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
  23. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
  24. package/dist/collection/api/theme-presets/static.js +2 -2
  25. package/dist/collection/api/theme-presets/static.js.map +1 -1
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
  28. package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
  29. package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
  30. package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
  31. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
  32. package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
  33. package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
  34. package/dist/collection/components/text/cura-display/cura-display.css +21 -38
  35. package/dist/collection/components/text/cura-display/cura-display.js +80 -49
  36. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  37. package/dist/collection/components/text/cura-display/cura-display.stories.js +78 -33
  38. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  39. package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
  40. package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
  41. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  42. package/dist/collection/components/text/cura-heading/cura-heading.stories.js +92 -36
  43. package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
  44. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
  45. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
  46. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  47. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +78 -46
  48. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  49. package/dist/collection/index.js +3 -1
  50. package/dist/collection/index.js.map +1 -1
  51. package/dist/components/cura-accordion-item.js +1 -1
  52. package/dist/components/cura-accordion-item.js.map +1 -1
  53. package/dist/components/cura-display.js +41 -35
  54. package/dist/components/cura-display.js.map +1 -1
  55. package/dist/components/cura-heading.js +34 -21
  56. package/dist/components/cura-heading.js.map +1 -1
  57. package/dist/components/cura-label.d.ts +11 -0
  58. package/dist/components/cura-label.js +91 -0
  59. package/dist/components/cura-label.js.map +1 -0
  60. package/dist/components/cura-page-template.js +1 -1
  61. package/dist/components/cura-page-template.js.map +1 -1
  62. package/dist/components/cura-paragraph.js +25 -23
  63. package/dist/components/cura-paragraph.js.map +1 -1
  64. package/dist/components/index.js +11 -5
  65. package/dist/components/index.js.map +1 -1
  66. package/dist/cura/cura.esm.js +1 -1
  67. package/dist/cura/cura.esm.js.map +1 -1
  68. package/dist/cura/cura.js +1 -1
  69. package/dist/cura/index.esm.js +1 -1
  70. package/dist/cura/index.esm.js.map +1 -1
  71. package/dist/cura/p-03047b3e.entry.js +2 -0
  72. package/dist/cura/p-03047b3e.entry.js.map +1 -0
  73. package/dist/cura/p-0c79c54e.entry.js +2 -0
  74. package/dist/cura/p-0c79c54e.entry.js.map +1 -0
  75. package/dist/cura/p-120926c5.system.js +2 -0
  76. package/dist/cura/p-120926c5.system.js.map +1 -0
  77. package/dist/cura/p-223924fb.system.entry.js +2 -0
  78. package/dist/cura/p-223924fb.system.entry.js.map +1 -0
  79. package/dist/cura/p-48426f60.system.js +2 -0
  80. package/dist/cura/p-48426f60.system.js.map +1 -0
  81. package/dist/cura/p-49813052.entry.js +2 -0
  82. package/dist/cura/p-49813052.entry.js.map +1 -0
  83. package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
  84. package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
  85. package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
  86. package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
  87. package/dist/cura/p-8b18b5f7.system.js +2 -0
  88. package/dist/cura/p-8b18b5f7.system.js.map +1 -0
  89. package/dist/cura/p-91b0f78e.entry.js +2 -0
  90. package/dist/cura/p-91b0f78e.entry.js.map +1 -0
  91. package/dist/cura/p-a0395f90.entry.js +2 -0
  92. package/dist/cura/p-a0395f90.entry.js.map +1 -0
  93. package/dist/cura/p-a7ef255f.entry.js +2 -0
  94. package/dist/cura/p-a7ef255f.entry.js.map +1 -0
  95. package/dist/cura/p-ca054b07.system.entry.js +2 -0
  96. package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
  97. package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
  98. package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
  99. package/dist/cura/p-f8fffdc1.js +2 -0
  100. package/dist/cura/p-f8fffdc1.js.map +1 -0
  101. package/dist/cura/p-fc77814b.system.entry.js +2 -0
  102. package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
  103. package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
  104. package/dist/esm/app-globals-29001758.js.map +1 -0
  105. package/dist/esm/cura-accordion_8.entry.js +441 -0
  106. package/dist/esm/cura-accordion_8.entry.js.map +1 -0
  107. package/dist/esm/cura-button-outline.entry.js +79 -0
  108. package/dist/esm/cura-button-outline.entry.js.map +1 -0
  109. package/dist/esm/cura-button-transparent.entry.js +79 -0
  110. package/dist/esm/cura-button-transparent.entry.js.map +1 -0
  111. package/dist/esm/cura-display.entry.js +70 -0
  112. package/dist/esm/cura-display.entry.js.map +1 -0
  113. package/dist/esm/cura-icons-view.entry.js +25 -0
  114. package/dist/esm/cura-icons-view.entry.js.map +1 -0
  115. package/dist/esm/cura-label.entry.js +65 -0
  116. package/dist/esm/cura-label.entry.js.map +1 -0
  117. package/dist/esm/cura.js +2 -2
  118. package/dist/esm/index.js +4 -0
  119. package/dist/esm/index.js.map +1 -1
  120. package/dist/esm/loader.js +2 -2
  121. package/dist/esm-es5/app-globals-29001758.js +2 -0
  122. package/dist/esm-es5/app-globals-29001758.js.map +1 -0
  123. package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
  124. package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
  125. package/dist/esm-es5/cura-button-outline.entry.js +2 -0
  126. package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
  127. package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
  128. package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
  129. package/dist/esm-es5/cura-display.entry.js +2 -0
  130. package/dist/esm-es5/cura-display.entry.js.map +1 -0
  131. package/dist/esm-es5/cura-icons-view.entry.js +2 -0
  132. package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
  133. package/dist/esm-es5/cura-label.entry.js +2 -0
  134. package/dist/esm-es5/cura-label.entry.js.map +1 -0
  135. package/dist/esm-es5/cura.js +1 -1
  136. package/dist/esm-es5/cura.js.map +1 -1
  137. package/dist/esm-es5/index.js +1 -1
  138. package/dist/esm-es5/index.js.map +1 -1
  139. package/dist/esm-es5/loader.js +1 -1
  140. package/dist/esm-es5/loader.js.map +1 -1
  141. package/dist/types/api/cura-api.type.d.ts +1 -0
  142. package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
  143. package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
  144. package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
  145. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
  146. package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
  147. package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
  148. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
  149. package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
  150. package/dist/types/components.d.ts +139 -46
  151. package/dist/types/index.d.ts +9 -0
  152. package/package.json +2 -4
  153. package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
  154. package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
  155. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  156. package/dist/cura/p-319699df.entry.js +0 -2
  157. package/dist/cura/p-319699df.entry.js.map +0 -1
  158. package/dist/cura/p-50ea2036.system.js +0 -2
  159. package/dist/cura/p-50ea2036.system.js.map +0 -1
  160. package/dist/cura/p-5250cb43.system.js +0 -2
  161. package/dist/cura/p-5250cb43.system.js.map +0 -1
  162. package/dist/cura/p-5cc3c8bd.system.entry.js +0 -2
  163. package/dist/cura/p-5cc3c8bd.system.entry.js.map +0 -1
  164. package/dist/cura/p-788e035b.system.js +0 -2
  165. package/dist/cura/p-788e035b.system.js.map +0 -1
  166. package/dist/cura/p-d5c64a5f.js +0 -2
  167. package/dist/cura/p-d5c64a5f.js.map +0 -1
  168. package/dist/esm/app-globals-cc003eaf.js.map +0 -1
  169. package/dist/esm/cura-accordion_12.entry.js +0 -659
  170. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  171. package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
  172. package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
  173. package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
  174. package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
@@ -10,85 +10,117 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
+ import { getColorsWithDepths } from "../../../utils/utils";
14
+ const colors = getColorsWithDepths();
15
+ const renderCuraParagraph = (label, args) => {
16
+ const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>
17
+ cura-paragraph { ${args.cssMarginBlock ? `
18
+ --margin-block: ${args.cssMarginBlock} !important;` : ``}${args.cssLineHeight ? `
19
+ --line-height: ${args.cssLineHeight} !important;` : ``}
20
+ }
21
+ </style>
22
+
23
+ ` : '';
24
+ const block = `<cura-paragraph${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `
25
+ size="${args.size}"` : ``}${args.color ? `
26
+ color="${args.color}"` : ''}${args.spotColor ? `
27
+ spot-color="${args.spotColor}"` : ''}${args.marginBlock ? `
28
+ margin-block="${args.marginBlock}"` : ''}${args.lineHeight ? `
29
+ line-height="${args.lineHeight}"` : ''}>
30
+ ${label}
31
+ </cura-paragraph>
32
+ `;
33
+ return `${styles}${block}${block}${block}`;
34
+ };
13
35
  export default {
14
36
  title: 'Componentes/Text/Paragraph',
15
37
  tags: ['autodocs'],
16
38
  render: (_a) => {
17
39
  var { label } = _a, args = __rest(_a, ["label"]);
18
- // You can either use a function to create DOM elements or use a plain html string!
19
- // return `<div>${label}</div>`;
20
- return `<cura-paragraph
21
- spot-color="${args.spotColor}"
22
- size="${args.size}"
23
- inverted="${args.inverted}"
24
- color="${args.color}">
25
- ${label}
26
- </cura-paragraph>
27
- <cura-paragraph
28
- spot-color="${args.spotColor}"
29
- size="${args.size}"
30
- inverted="${args.inverted}"
31
- color="${args.color}">
32
- ${label}
33
- </cura-paragraph>
34
- <cura-paragraph
35
- spot-color="${args.spotColor}"
36
- size="${args.size}"
37
- inverted="${args.inverted}"
38
- color="${args.color}">
39
- ${label}
40
- </cura-paragraph>`;
40
+ return renderCuraParagraph(label, args);
41
41
  },
42
42
  argTypes: {
43
43
  label: {
44
44
  control: 'text',
45
- description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',
45
+ description: 'Define o texto do componente diretamente. São válidas todas as tags HTML pertinentes ao `<p>`.',
46
46
  name: 'Content'
47
47
  },
48
- inverted: {
49
- control: 'boolean',
50
- description: 'Inverte cores do texto para aplicação em fundo escuro.',
48
+ size: {
49
+ control: { type: 'select' },
50
+ options: ['xsmall', 'small', 'medium', 'large'],
51
+ description: 'Define o tamanho do bloco de texto considerando `caption` (depreciado, use xsmall), `xsmall`, `small`, `regular` (depreciado, use medium), `medium` e `large` como valores válidos.',
51
52
  table: {
52
53
  category: 'Properties',
53
- defaultValue: { summary: 'false' }
54
+ defaultValue: { summary: 'medium' }
54
55
  }
55
56
  },
56
- size: {
57
+ color: {
57
58
  control: { type: 'select' },
58
- options: ['caption', 'small', 'regular', 'large'],
59
- description: 'Tamanhos disponíveis.',
59
+ options: ['', ...colors],
60
+ description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',
60
61
  table: {
61
62
  category: 'Properties',
62
- defaultValue: { summary: 'regular' }
63
+ defaultValue: { summary: 'Cor de texto padrão do tema' }
63
64
  }
64
65
  },
65
66
  spotColor: {
66
67
  control: { type: 'select' },
67
- options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
68
- description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
68
+ options: ['', ...colors],
69
+ description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',
70
+ name: 'spot-color',
69
71
  table: {
70
72
  category: 'Properties',
71
- defaultValue: { summary: 'primary' }
73
+ defaultValue: { summary: 'accent-dark' }
72
74
  }
73
75
  },
74
- color: {
75
- control: { type: 'select' },
76
- options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
77
- description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
76
+ marginBlock: {
77
+ control: 'text',
78
+ description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',
79
+ name: 'margin-block',
78
80
  table: {
79
81
  category: 'Properties',
80
- defaultValue: { summary: 'Theme font color.' }
82
+ defaultValue: { summary: '1.25em' }
81
83
  }
82
- }
84
+ },
85
+ lineHeight: {
86
+ control: 'text',
87
+ description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',
88
+ name: 'line-height',
89
+ table: {
90
+ category: 'Properties',
91
+ defaultValue: { summary: '140%' }
92
+ }
93
+ },
94
+ cssMarginBlock: {
95
+ control: 'text',
96
+ description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
97
+ name: '--margin-block',
98
+ table: {
99
+ category: 'CSS Properties',
100
+ defaultValue: { summary: '1.25em' }
101
+ }
102
+ },
103
+ cssLineHeight: {
104
+ control: 'text',
105
+ description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
106
+ name: '--line-height',
107
+ table: {
108
+ category: 'CSS Properties',
109
+ defaultValue: { summary: '140%' }
110
+ }
111
+ },
83
112
  },
84
113
  };
85
114
  export const Paragraph = {
86
115
  args: {
87
- label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href="https://www.rededorsaoluiz.com.br" target="_blank">luctus tincidunt nibh</a>, eu tincidunt justo. <abbr title="Não faço idéia de que porra é essa">Curabitur</abbr> at ullamcorper mauris, feugiat fermentum nulla. Quisque sed nibh in odio blandit mollis at quis dolor. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',
88
- size: 'regular',
89
- spotColor: 'primary',
90
- inverted: false,
91
- color: ''
116
+ label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href="https://www.rededorsaoluiz.com.br" target="_blank">luctus tincidunt nibh</a>, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. <u>Quisque sed nibh in odio blandit mollis at quis dolor</u>. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',
117
+ size: 'medium',
118
+ color: '',
119
+ spotColor: '',
120
+ marginBlock: '',
121
+ lineHeight: '',
122
+ cssMarginBlock: '',
123
+ cssLineHeight: ''
92
124
  },
93
125
  };
94
126
  //# sourceMappingURL=cura-paragraph.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-paragraph.stories.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvB,mFAAmF;IACnF,gCAAgC;IAChC,OA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AAK,EAAE;MACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;MAC7F,WAAW,EAAE,kEAAkE;MAC/E,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAC;OAC9C;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;EACvB,IAAI,EAAE;IACJ,KAAK,EAAE,qoBAAqoB;IAC5oB,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,EAAE;GACV;CACF,CAAC","sourcesContent":["\nexport default {\n title: 'Componentes/Text/Paragraph',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-paragraph\n spot-color=\"${args.spotColor}\"\n size=\"${args.size}\"\n inverted=\"${args.inverted}\"\n color=\"${args.color}\">\n ${label}\n</cura-paragraph>\n<cura-paragraph\n spot-color=\"${args.spotColor}\"\n size=\"${args.size}\"\n inverted=\"${args.inverted}\"\n color=\"${args.color}\">\n ${label}\n</cura-paragraph>\n<cura-paragraph\n spot-color=\"${args.spotColor}\"\n size=\"${args.size}\"\n inverted=\"${args.inverted}\"\n color=\"${args.color}\">\n ${label}\n</cura-paragraph>`;\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Content'\n },\n inverted: {\n control: 'boolean',\n description: 'Inverte cores do texto para aplicação em fundo escuro.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'false'}\n }\n },\n size: {\n control: { type: 'select' },\n options: ['caption', 'small', 'regular', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'regular'}\n }\n },\n spotColor: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'Theme font color.'}\n }\n }\n },\n};\n\nexport const Paragraph = {\n args: {\n label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href=\"https://www.rededorsaoluiz.com.br\" target=\"_blank\">luctus tincidunt nibh</a>, eu tincidunt justo. <abbr title=\"Não faço idéia de que porra é essa\">Curabitur</abbr> at ullamcorper mauris, feugiat fermentum nulla. Quisque sed nibh in odio blandit mollis at quis dolor. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',\n size: 'regular',\n spotColor: 'primary',\n inverted: false,\n color: ''\n },\n};\n"]}
1
+ {"version":3,"file":"cura-paragraph.stories.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,IAAS,EAAE,EAAE;EACvD,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;qBACxC,IAA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;OACjC;KACF;IACD,cAAc,EAAE;MACd,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,0IAA0I;MACvJ,IAAI,EAAE,gBAAgB;MACtB,KAAK,EAAE;QACL,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAC;OACnC;KACF;IACD,aAAa,EAAE;MACb,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,yIAAyI;MACtJ,IAAI,EAAE,eAAe;MACrB,KAAK,EAAE;QACL,QAAQ,EAAE,gBAAgB;QAC1B,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAC;OACjC;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;EACvB,IAAI,EAAE;IACJ,KAAK,EAAE,olBAAolB;IAC3lB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE,EAAE;GAClB;CACF,CAAC","sourcesContent":["import { getColorsWithDepths } from \"../../../utils/utils\";\n\nconst colors = getColorsWithDepths();\n\nconst renderCuraParagraph = (label: string, args: any) => {\n const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>\n cura-paragraph { ${args.cssMarginBlock ? `\n --margin-block: ${args.cssMarginBlock} !important;` : ``}${ args.cssLineHeight ? `\n --line-height: ${args.cssLineHeight} !important;` : ``}\n }\n</style>\n\n` : '';\n const block = `<cura-paragraph${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `\n size=\"${args.size}\"` : ``}${args.color ? `\n color=\"${args.color}\"` : ''}${args.spotColor ? `\n spot-color=\"${args.spotColor}\"` : ''}${args.marginBlock ? `\n margin-block=\"${args.marginBlock}\"` : ''}${args.lineHeight ? `\n line-height=\"${args.lineHeight}\"` : ''}>\n ${label}\n</cura-paragraph>\n`;\n return `${styles}${block}${block}${block}`;\n}\n\nexport default {\n title: 'Componentes/Text/Paragraph',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return renderCuraParagraph(label, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Define o texto do componente diretamente. São válidas todas as tags HTML pertinentes ao `<p>`.',\n name: 'Content'\n },\n size: {\n control: { type: 'select' },\n options: ['xsmall', 'small', 'medium', 'large'],\n description: 'Define o tamanho do bloco de texto considerando `caption` (depreciado, use xsmall), `xsmall`, `small`, `regular` (depreciado, use medium), `medium` e `large` como valores válidos.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'Cor de texto padrão do tema'}\n }\n },\n spotColor: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',\n name: 'spot-color',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent-dark'}\n }\n },\n marginBlock: {\n control: 'text',\n description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',\n name: 'margin-block',\n table: {\n category: 'Properties',\n defaultValue: { summary: '1.25em'}\n }\n },\n lineHeight: {\n control: 'text',\n description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',\n name: 'line-height',\n table: {\n category: 'Properties',\n defaultValue: { summary: '140%'}\n }\n },\n cssMarginBlock: {\n control: 'text',\n description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--margin-block',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '1.25em'}\n }\n },\n cssLineHeight: {\n control: 'text',\n description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--line-height',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '140%'}\n }\n },\n },\n};\n\nexport const Paragraph = {\n args: {\n label: 'Proin quis <b>turpis</b> et <strong>turpis</strong> efficitur dictum. Suspendisse <i>egestas</i> posuere libero. Sed non dapibus urna. Sed <a href=\"https://www.rededorsaoluiz.com.br\" target=\"_blank\">luctus tincidunt nibh</a>, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. <u>Quisque sed nibh in odio blandit mollis at quis dolor</u>. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.',\n size: 'medium',\n color: '',\n spotColor: '',\n marginBlock: '',\n lineHeight: '',\n cssMarginBlock: '',\n cssLineHeight: ''\n },\n};\n"]}
@@ -1,2 +1,4 @@
1
- export {};
1
+ export function CuraInit(options, w = window) {
2
+ w.CuraInit = options;
3
+ }
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["export { Components, JSX } from './components';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,QAAQ,CAAC,OAAmB,EAAE,CAAC,GAAG,MAAM;EACtD,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC;AACvB,CAAC","sourcesContent":["export { Components, JSX } from './components';\nimport CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n\ndeclare global {\n export interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport function CuraInit(options: CuraConfig, w = window) {\n w.CuraInit = options;\n}\n"]}
@@ -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 curaAccordionItemCss = ":host{display:block}:host .accordion-item{width:100%}:host .accordion-item .label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .accordion-item .label::before{content:\"\";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item .label .label-container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:calc(var(--base-spacing) * 2px);min-height:40px;word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular);color:var(--color-base);padding:0px}:host .accordion-item .label .label-container cura-icon{margin-right:4px}:host .accordion-item .label .label-container:hover{color:var(--color-light)}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item .label .label-container:active{color:var(--color-dark)}:host .accordion-item .label .label-container:active cura-icon{--color:var(--icon-color-dark) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;-webkit-transition:max-height 0.25s ease;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--base-spacing) * 2px) 0px;border-top:solid 1px var(--neutral-base)}:host .accordion-item.active .label .label-container{color:var(--color-active-base)}:host .accordion-item.active .label .label-container:hover{color:var(--color-active-light)}:host .accordion-item.active .label .label-container:hover cura-icon{--color:var(--icon-color-active-light) !important}:host .accordion-item.active .label .label-container:active{color:var(--color-active-dark)}:host .accordion-item.active .label .label-container:active cura-icon{--color:var(--icon-color-active-dark) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;-webkit-transition:max-height 0.5s ease 0.14s;transition:max-height 0.5s ease 0.14s}:host .accordion-item.inverted .label .label-container{color:var(--neutral-lighter)}:host .accordion-item.inverted .label .label-container:hover{color:var(--color-lighter)}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-lighter) !important}:host .accordion-item.inverted .label .label-container:active{color:var(--color-light)}:host .accordion-item.inverted .label .label-container:active cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item.active.inverted .label .label-container{color:var(--neutral-purewhite)}:host .accordion-item.active.inverted .label .label-container:hover{color:var(--color-active-lighter)}:host .accordion-item.active.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-active-lighter) !important}:host .accordion-item.active.inverted .label .label-container:active{color:var(--color-active-light)}:host .accordion-item.active.inverted .label .label-container:active cura-icon{--color:var(--icon-color-active-light) !important}@media (min-width: 768px) and (max-width: 1365px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}@media (min-width: 1366px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}";
4
+ const curaAccordionItemCss = ":host{display:block}:host .accordion-item{width:100%}:host .accordion-item .label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .accordion-item .label::before{content:\"\";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item .label .label-container{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;gap:calc(var(--base-spacing) * 2px);min-height:40px;word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular);color:var(--color-base);padding:0px}:host .accordion-item .label .label-container cura-icon{margin-right:4px}:host .accordion-item .label .label-container:hover{color:var(--color-light)}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item .label .label-container:active{color:var(--color-dark)}:host .accordion-item .label .label-container:active cura-icon{--color:var(--icon-color-dark) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;-webkit-transition:max-height 0.25s ease;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--base-spacing) * 2px) 0px;border-top:solid 1px var(--neutral-base)}:host .accordion-item.active .label .label-container{color:var(--color-active-base)}:host .accordion-item.active .label .label-container:hover{color:var(--color-active-light)}:host .accordion-item.active .label .label-container:hover cura-icon{--color:var(--icon-color-active-light) !important}:host .accordion-item.active .label .label-container:active{color:var(--color-active-dark)}:host .accordion-item.active .label .label-container:active cura-icon{--color:var(--icon-color-active-dark) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;-webkit-transition:max-height 0.5s ease 0.14s;transition:max-height 0.5s ease 0.14s}:host .accordion-item.inverted .label .label-container{color:var(--neutral-lighter)}:host .accordion-item.inverted .label .label-container:hover{color:var(--color-lighter)}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-lighter) !important}:host .accordion-item.inverted .label .label-container:active{color:var(--color-light)}:host .accordion-item.inverted .label .label-container:active cura-icon{--color:var(--icon-color-light) !important}:host .accordion-item.active.inverted .label .label-container{color:var(--neutral-purewhite)}:host .accordion-item.active.inverted .label .label-container:hover{color:var(--color-active-lighter)}:host .accordion-item.active.inverted .label .label-container:hover cura-icon{--color:var(--icon-color-active-lighter) !important}:host .accordion-item.active.inverted .label .label-container:active{color:var(--color-active-light)}:host .accordion-item.active.inverted .label .label-container:active cura-icon{--color:var(--icon-color-active-light) !important}@media (min-width: 769px) and (max-width: 992px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}@media (min-width: 993px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}";
5
5
 
6
6
  const CuraAccordionItem$1 = /*@__PURE__*/ proxyCustomElement(class CuraAccordionItem extends HTMLElement {
7
7
  constructor() {
@@ -1 +1 @@
1
- {"file":"cura-accordion-item.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,6zGAA6zG;;MCO70GA,mBAAiB;;;;;iBAKW,EAAE;oBAMP,EAAE;oBACF,MAAM;qBACL,IAAI;qBAMJ,EAAE;2BACI,EAAE;qBAKL,MAAM;kBAEc,KAAK;kBAE7C,EAAE;;EAEpB,YAAY;IACV,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;I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;;;;;;;;;;;;;;","names":["CuraAccordionItem"],"sources":["./src/components/accordion/cura-accordion-item/cura-accordion-item.scss?tag=cura-accordion-item&encapsulation=shadow","./src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n\n .accordion-item {\n width: 100%;\n\n .label {\n display: flex;\n flex-direction: column;\n &::before {\n content: \"\";\n display: block;\n border-top: solid 1px var(--neutral-base);\n width: 100%;\n }\n .label-container {\n display: flex;\n flex-grow: 1;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--base-spacing) * 2px);\n min-height: 40px;\n word-break: break-word;\n cursor: pointer;\n font-size: 1.14em;\n font-weight: var(--font-weight-regular);\n color: var(--color-base);\n padding: 0px;\n\n cura-icon {\n margin-right: 4px;\n }\n\n &:hover {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n &:active {\n color: var(--color-dark);\n cura-icon {\n --color: var(--icon-color-dark) !important;\n }\n }\n }\n }\n\n .content {\n font-size: 1em;\n overflow: hidden;\n max-height: 0;\n transition: max-height .25s ease;\n .content-wrapper {\n padding: calc(var(--base-spacing) * 2px) 0px;\n border-top: solid 1px var(--neutral-base);\n }\n }\n\n &.active {\n .label .label-container {\n color: var(--color-active-base);\n &:hover {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n &:active {\n color: var(--color-active-dark);\n cura-icon {\n --color: var(--icon-color-active-dark) !important;\n }\n }\n }\n\n .content {\n max-height: 200vh;\n overflow-y: auto;\n transition: max-height .5s ease .14s;\n }\n }\n\n &.inverted {\n .label .label-container {\n color: var(--neutral-lighter);\n &:hover {\n color: var(--color-lighter);\n cura-icon {\n --color: var(--icon-color-lighter) !important;\n }\n }\n &:active {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n }\n }\n\n &.active.inverted {\n .label .label-container {\n color: var(--neutral-purewhite);\n &:hover {\n color: var(--color-active-lighter);\n cura-icon {\n --color: var(--icon-color-active-lighter) !important;\n }\n }\n &:active {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n }\n }\n }\n\n @include medium-only() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n\n @include large-up() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n}\n","import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n @Prop({ reflect: true, mutable: true }) opened: boolean = false;\n\n @State() styles = {};\n\n getIconColor() {\n const inverted = this.colorMode === 'light';\n const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;\n const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;\n return this.opened ? iconActiveColor : iconColor;\n }\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <span>{this.label}</span>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={this.getIconColor()}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-accordion-item.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,2zGAA2zG;;MCO30GA,mBAAiB;;;;;iBAKW,EAAE;oBAMP,EAAE;oBACF,MAAM;qBACL,IAAI;qBAMJ,EAAE;2BACI,EAAE;qBAKL,MAAM;kBAEc,KAAK;kBAE7C,EAAE;;EAEpB,YAAY;IACV,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;IAC5C,MAAM,SAAS,GAAG,QAAQ,GAAG,iBAAiB,GAAG,GAAG,IAAI,CAAC,SAAS,OAAO,CAAC;IAC1E,MAAM,eAAe,GAAG,QAAQ,GAAG,mBAAmB,GAAG,GAAG,IAAI,CAAC,eAAe,OAAO,CAAC;IACxF,OAAO,IAAI,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;GAClD;EAED,UAAU;IACR,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;IAChC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;IACjD,OAAO,OAAO,CAAC;GAChB;EAED,kBAAkB,CAAC,CAAQ;IACzB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;GAC5B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,gBAAgB,IACzB,WAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IAC/C,WAAK,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IACzD,WAAK,KAAK,EAAC,iBAAiB,IAC1B,gBAAO,IAAI,CAAC,KAAK,CAAQ,EACzB,iBAAW,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,GAAc,CACxH,CACF,EACN,WAAK,KAAK,EAAC,SAAS,IAClB,WAAK,KAAK,EAAC,iBAAiB,IAC1B,eAAa,CACT,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraAccordionItem"],"sources":["./src/components/accordion/cura-accordion-item/cura-accordion-item.scss?tag=cura-accordion-item&encapsulation=shadow","./src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n\n .accordion-item {\n width: 100%;\n\n .label {\n display: flex;\n flex-direction: column;\n &::before {\n content: \"\";\n display: block;\n border-top: solid 1px var(--neutral-base);\n width: 100%;\n }\n .label-container {\n display: flex;\n flex-grow: 1;\n justify-content: space-between;\n align-items: center;\n gap: calc(var(--base-spacing) * 2px);\n min-height: 40px;\n word-break: break-word;\n cursor: pointer;\n font-size: 1.14em;\n font-weight: var(--font-weight-regular);\n color: var(--color-base);\n padding: 0px;\n\n cura-icon {\n margin-right: 4px;\n }\n\n &:hover {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n &:active {\n color: var(--color-dark);\n cura-icon {\n --color: var(--icon-color-dark) !important;\n }\n }\n }\n }\n\n .content {\n font-size: 1em;\n overflow: hidden;\n max-height: 0;\n transition: max-height .25s ease;\n .content-wrapper {\n padding: calc(var(--base-spacing) * 2px) 0px;\n border-top: solid 1px var(--neutral-base);\n }\n }\n\n &.active {\n .label .label-container {\n color: var(--color-active-base);\n &:hover {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n &:active {\n color: var(--color-active-dark);\n cura-icon {\n --color: var(--icon-color-active-dark) !important;\n }\n }\n }\n\n .content {\n max-height: 200vh;\n overflow-y: auto;\n transition: max-height .5s ease .14s;\n }\n }\n\n &.inverted {\n .label .label-container {\n color: var(--neutral-lighter);\n &:hover {\n color: var(--color-lighter);\n cura-icon {\n --color: var(--icon-color-lighter) !important;\n }\n }\n &:active {\n color: var(--color-light);\n cura-icon {\n --color: var(--icon-color-light) !important;\n }\n }\n }\n }\n\n &.active.inverted {\n .label .label-container {\n color: var(--neutral-purewhite);\n &:hover {\n color: var(--color-active-lighter);\n cura-icon {\n --color: var(--icon-color-active-lighter) !important;\n }\n }\n &:active {\n color: var(--color-active-light);\n cura-icon {\n --color: var(--icon-color-active-light) !important;\n }\n }\n }\n }\n }\n\n @include medium-only() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n\n @include large-up() {\n .accordion-item {\n .label .label-container {\n font-size: 1.29em;\n }\n\n .content {\n font-size: 1.14em;\n }\n }\n }\n}\n","import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n @Prop({ reflect: true, mutable: true }) opened: boolean = false;\n\n @State() styles = {};\n\n getIconColor() {\n const inverted = this.colorMode === 'light';\n const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;\n const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;\n return this.opened ? iconActiveColor : iconColor;\n }\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <span>{this.label}</span>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={this.getIconColor()}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -1,71 +1,77 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const curaDisplayCss = ":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%;-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media (min-width: 768px) and (max-width: 1365px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media (min-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}: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}";
3
+ const curaDisplayCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){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
4
 
5
5
  const CuraDisplay$1 = /*@__PURE__*/ proxyCustomElement(class CuraDisplay extends HTMLElement {
6
6
  constructor() {
7
7
  super();
8
8
  this.__registerHost();
9
9
  this.__attachShadow();
10
+ this.theme = window.CuraAPI.theme;
10
11
  this.level = 1;
11
- this.size = 'regular';
12
- this.inverted = false;
13
- this.spotColor = 'primary';
12
+ this.spotColor = 'accent-dark';
13
+ this.color = undefined;
14
+ this.marginBlock = '1.25em';
15
+ this.lineHeight = '120%';
16
+ this.styles = {};
17
+ }
18
+ handleChangeColor() {
19
+ this.setColors();
14
20
  }
15
21
  connectedCallback() {
16
- this.weights = window.CuraAPI.theme.fonts.getWeights();
17
22
  this.setFontProperties();
18
23
  this.setColors();
19
24
  }
20
- getClasses() {
21
- const classes = {};
22
- classes[this.size.toLowerCase()] = true;
23
- return classes;
24
- }
25
25
  setFontProperties() {
26
+ this.weights = this.theme.fonts.getWeights();
27
+ this.fontSizeBase = this.theme.fonts.getSize();
26
28
  this.styles = {
27
29
  '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),
28
30
  '--font-size': window.CuraAPI.theme.fonts.getSize(),
29
- '--font-weight-bold': this.weights.bold,
30
- '--font-weight-black': this.weights.black
31
+ '--font-weight-bold': this.weights.bold
31
32
  };
32
- this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
33
- this.setHostProperty('--block-margin', '0.5em');
34
33
  }
35
- setColors() {
36
- const fontColor = this.inverted
37
- ? window.CuraAPI.theme.colors.getColor('neutral-white')
38
- : window.CuraAPI.theme.fonts.getColor();
39
- this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
40
- this.styles['--color-link'] = this.inverted
41
- ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
42
- : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);
34
+ hostCSSProperties() {
35
+ return {
36
+ '--margin-block': this.marginBlock,
37
+ '--font-size-base': this.fontSizeBase,
38
+ '--line-height': this.lineHeight
39
+ };
43
40
  }
44
- setHostProperty(prop, value) {
45
- this.host.style.setProperty(prop, value);
41
+ setColors() {
42
+ const fontColor = this.color
43
+ ? this.theme.colors.getColor(this.color)
44
+ : this.theme.fonts.getColor();
45
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
46
46
  }
47
47
  getHeadingTag() {
48
48
  const tags = {
49
- '1': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null)),
50
- '2': h("h2", { style: this.styles, class: this.getClasses() }, h("slot", null)),
51
- '3': h("h3", { style: this.styles, class: this.getClasses() }, h("slot", null)),
52
- '4': h("h4", { style: this.styles, class: this.getClasses() }, h("slot", null)),
53
- '5': h("h5", { style: this.styles, class: this.getClasses() }, h("slot", null)),
54
- '6': h("h6", { style: this.styles, class: this.getClasses() }, h("slot", null)),
55
- 'default': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null))
49
+ '1': h("h1", { style: this.styles }, h("slot", null)),
50
+ '2': h("h2", { style: this.styles }, h("slot", null)),
51
+ '3': h("h3", { style: this.styles }, h("slot", null)),
52
+ '4': h("h4", { style: this.styles }, h("slot", null)),
53
+ '5': h("h5", { style: this.styles }, h("slot", null)),
54
+ '6': h("h6", { style: this.styles }, h("slot", null)),
55
+ 'default': h("h1", { style: this.styles }, h("slot", null))
56
56
  };
57
57
  return tags[`${this.level}`] || tags['default'];
58
58
  }
59
59
  render() {
60
- return (h(Host, null, this.getHeadingTag()));
60
+ return (h(Host, { style: this.hostCSSProperties() }, this.getHeadingTag()));
61
61
  }
62
62
  get host() { return this; }
63
+ static get watchers() { return {
64
+ "color": ["handleChangeColor"],
65
+ "spotColor": ["handleChangeColor"]
66
+ }; }
63
67
  static get style() { return curaDisplayCss; }
64
68
  }, [1, "cura-display", {
65
69
  "level": [514],
66
- "size": [513],
67
- "inverted": [516],
68
- "spotColor": [513, "spot-color"]
70
+ "spotColor": [513, "spot-color"],
71
+ "color": [1],
72
+ "marginBlock": [513, "margin-block"],
73
+ "lineHeight": [513, "line-height"],
74
+ "styles": [32]
69
75
  }]);
70
76
  function defineCustomElement$1() {
71
77
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"cura-display.js","mappings":";;AAAA,MAAM,cAAc,GAAG,oxDAAoxD;;MCO9xDA,aAAW;;;;;iBAMS,CAAC;gBAKF,SAAS;oBAKL,KAAK;qBAKJ,SAAS;;EAa3C,iBAAiB;IAChB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,UAAU;IACR,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAI,IAAI,CAAC;IACzC,OAAO,OAAO,CAAC;GAChB;EAED,iBAAiB;IACf,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;MAChE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;MACnD,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;MACvC,qBAAqB,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;KAC1C,CAAA;IACD,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1E,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;GACjD;EAED,SAAS;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ;QAC3B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;QACrD,MA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AAG,EAAE,UAAI,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAE,eAAa,CAAK;MACzE,SAAS,EAAE,UAAI,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAE,eAAa,CAAK;KAChF,CAAC;IACF,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;GACjD;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACD,IAAI,CAAC,aAAa,EAAE,CACjB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraDisplay"],"sources":["./src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","./src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size);\n text-transform: uppercase;\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 4.285em;\n font-weight: var(--font-weight-black);\n color: var(--color-body);\n line-height: 120%;\n letter-spacing: -4%;\n margin-block-start: var(--block-margin);\n margin-block-end: var(--block-margin);\n\n &.large {\n font-size:6.21em;\n }\n\n &.small {\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n }\n\n }\n\n @include medium-only() {\n h1, h2, h3, h4, h5, h6 { \n font-size: 4.92em;\n\n &.large {\n font-size: 7.07em;\n }\n\n &.small {\n font-size: 3.428em;\n }\n\n }\n }\n\n @include large-up() {\n h1, h2, h3, h4, h5, h6 { \n font-size: 6.14em;\n line-height: 125%;\n\n &.large {\n font-size: 8.857em;\n letter-spacing: -6%;\n }\n\n &.small {\n font-size: 4.285em;\n letter-spacing: -2%;\n }\n }\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-decoration: none;\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n","import { Component, Host, h, Element, Prop } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics.\n * Values: 1(default)-6.\n */\n @Prop({reflect: true}) level = 1;\n /**\n * Heading style size.\n * Values: small | regular(default) | large.\n */\n @Prop({reflect: true}) size = 'regular';\n /**\n * Apply light color to text in dark background.\n * Values: boolean.\n */\n @Prop({reflect: true}) inverted = false;\n /**\n * Apply base system color to elements like <a> and <abbr>.\n * Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.\n */\n @Prop({reflect: true}) spotColor = 'primary';\n \n /**\n * Host element <cura-heading>\n */\n @Element() host: HTMLElement;\n \n /**\n * Internal Props\n */\n weights: any;\n styles: any;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.setFontProperties();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes[this.size.toLowerCase()] = true;\n return classes;\n }\n\n setFontProperties() {\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold,\n '--font-weight-black': this.weights.black\n }\n this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());\n this.setHostProperty('--block-margin', '0.5em');\n }\n\n setColors() {\n const fontColor = this.inverted \n ? window.CuraAPI.theme.colors.getColor('neutral-white') \n : window.CuraAPI.theme.fonts.getColor();\n this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');\n this.styles['--color-link'] = this.inverted \n ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)\n : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n getHeadingTag() {\n const tags = {\n '1': <h1 style={this.styles} class={this.getClasses()}><slot></slot></h1>,\n '2': <h2 style={this.styles} class={this.getClasses()}><slot></slot></h2>,\n '3': <h3 style={this.styles} class={this.getClasses()}><slot></slot></h3>,\n '4': <h4 style={this.styles} class={this.getClasses()}><slot></slot></h4>,\n '5': <h5 style={this.styles} class={this.getClasses()}><slot></slot></h5>,\n '6': <h6 style={this.styles} class={this.getClasses()}><slot></slot></h6>,\n 'default': <h1 style={this.styles} class={this.getClasses()}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-display.js","mappings":";;AAAA,MAAM,cAAc,GAAG,k/BAAk/B;;MCO5/BA,aAAW;;;;;IA+CtB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;iBAzCyB,CAAC;qBAMpB,aAAa;;uBAiBX,QAAQ;sBAMT,MAAM;kBAaxB,EAAE;;EA3BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;MAChE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,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AAK;KACtD,CAAC;IACF,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;GACjD;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACjC,IAAI,CAAC,aAAa,EAAE,CACjB,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraDisplay"],"sources":["./src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","./src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0px;\n }\n\n @include medium-large() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 3.429em;\n }\n }\n\n @include xlarge-only() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 4.286em;\n line-height: calc(var(--line-height) + 5%);\n }\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1(default) to 6.\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 1;\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '120%';\n\n /**\n * Host element <cura-display>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n theme = window.CuraAPI.theme;\n @State() styles = {};\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n getHeadingTag() {\n const tags = {\n '1': <h1 style={this.styles}><slot></slot></h1>,\n '2': <h2 style={this.styles}><slot></slot></h2>,\n '3': <h3 style={this.styles}><slot></slot></h3>,\n '4': <h4 style={this.styles}><slot></slot></h4>,\n '5': <h5 style={this.styles}><slot></slot></h5>,\n '6': <h6 style={this.styles}><slot></slot></h6>,\n 'default': <h1 style={this.styles}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -1,20 +1,26 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
 
3
- const curaHeadingCss = ":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%;-webkit-margin-before:var(--block-margin);margin-block-start:var(--block-margin);-webkit-margin-after:var(--block-margin);margin-block-end:var(--block-margin)}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media (min-width: 768px) and (max-width: 1365px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media (min-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}: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}";
3
+ const curaHeadingCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.714em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.071em;letter-spacing:-0.58px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:calc(var(--line-height) + 20%)}:host h1.small.bold-weight,:host h1.small ::slotted(b),:host h1.small ::slotted(strong),:host h2.small.bold-weight,:host h2.small ::slotted(b),:host h2.small ::slotted(strong),:host h3.small.bold-weight,:host h3.small ::slotted(b),:host h3.small ::slotted(strong),:host h4.small.bold-weight,:host h4.small ::slotted(b),:host h4.small ::slotted(strong),:host h5.small.bold-weight,:host h5.small ::slotted(b),:host h5.small ::slotted(strong),:host h6.small.bold-weight,:host h6.small ::slotted(b),:host h6.small ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:0.714em;font-weight:var(--font-weight-medium);letter-spacing:0.6px}:host h1.xsmall.bold-weight,:host h1.xsmall ::slotted(b),:host h1.xsmall ::slotted(strong),:host h2.xsmall.bold-weight,:host h2.xsmall ::slotted(b),:host h2.xsmall ::slotted(strong),:host h3.xsmall.bold-weight,:host h3.xsmall ::slotted(b),:host h3.xsmall ::slotted(strong),:host h4.xsmall.bold-weight,:host h4.xsmall ::slotted(b),:host h4.xsmall ::slotted(strong),:host h5.xsmall.bold-weight,:host h5.xsmall ::slotted(b),:host h5.xsmall ::slotted(strong),:host h6.xsmall.bold-weight,:host h6.xsmall ::slotted(b),:host h6.xsmall ::slotted(strong){font-weight:var(--font-weight-bold)}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em;letter-spacing:-0.66px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:0.857em;line-height:calc(var(--line-height) + 3%);letter-spacing:0.72px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:calc(var(--line-height) + 5%);letter-spacing:-0.82px}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.929em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.714em;line-height:calc(var(--line-height) + 30%);letter-spacing:0%}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:1em;line-height:calc(var(--line-height) + 12.857%);letter-spacing:0.28px}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-medium)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){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}:host ::slotted(i),:host ::slotted(em){font-weight:var(--font-weight-medium)}";
4
4
 
5
5
  const CuraHeading$1 = /*@__PURE__*/ proxyCustomElement(class CuraHeading extends HTMLElement {
6
6
  constructor() {
7
7
  super();
8
8
  this.__registerHost();
9
9
  this.__attachShadow();
10
+ this.theme = window.CuraAPI.theme;
10
11
  this.level = 1;
11
- this.size = 'regular';
12
+ this.size = 'medium';
12
13
  this.weight = 'regular';
13
- this.inverted = false;
14
- this.spotColor = 'primary';
14
+ this.spotColor = 'accent-dark';
15
+ this.color = undefined;
16
+ this.marginBlock = '1.25em';
17
+ this.lineHeight = '130%';
18
+ this.styles = {};
19
+ }
20
+ handleChangeColor() {
21
+ this.setColors();
15
22
  }
16
23
  connectedCallback() {
17
- this.weights = window.CuraAPI.theme.fonts.getWeights();
18
24
  this.setFontProperties();
19
25
  this.setColors();
20
26
  }
@@ -25,28 +31,28 @@ const CuraHeading$1 = /*@__PURE__*/ proxyCustomElement(class CuraHeading extends
25
31
  return classes;
26
32
  }
27
33
  setFontProperties() {
34
+ this.weights = this.theme.fonts.getWeights();
35
+ this.fontSizeBase = this.theme.fonts.getSize();
28
36
  this.styles = {
29
37
  '--font-family': window.CuraAPI.theme.fonts.getFamily('heading'),
30
- '--font-size': window.CuraAPI.theme.fonts.getSize(),
31
38
  '--font-weight-regular': this.weights.regular,
32
39
  '--font-weight-medium': this.weights.medium,
33
40
  '--font-weight-bold': this.weights.bold,
34
41
  '--font-weight-black': this.weights.black
35
42
  };
36
- this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
37
- this.setHostProperty('--block-margin', '0.5em');
38
43
  }
39
- setColors() {
40
- const fontColor = this.inverted
41
- ? window.CuraAPI.theme.colors.getColor('neutral-white')
42
- : window.CuraAPI.theme.fonts.getColor();
43
- this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
44
- this.styles['--color-link'] = this.inverted
45
- ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
46
- : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`);
44
+ hostCSSProperties() {
45
+ return {
46
+ '--margin-block': this.marginBlock,
47
+ '--font-size-base': this.fontSizeBase,
48
+ '--line-height': this.lineHeight
49
+ };
47
50
  }
48
- setHostProperty(prop, value) {
49
- this.host.style.setProperty(prop, value);
51
+ setColors() {
52
+ const fontColor = this.color
53
+ ? this.theme.colors.getColor(this.color)
54
+ : this.theme.fonts.getColor();
55
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
50
56
  }
51
57
  getHeadingTag() {
52
58
  const tags = {
@@ -61,16 +67,23 @@ const CuraHeading$1 = /*@__PURE__*/ proxyCustomElement(class CuraHeading extends
61
67
  return tags[`${this.level}`] || tags['default'];
62
68
  }
63
69
  render() {
64
- return (h(Host, null, this.getHeadingTag()));
70
+ return (h(Host, { style: this.hostCSSProperties() }, this.getHeadingTag()));
65
71
  }
66
72
  get host() { return this; }
73
+ static get watchers() { return {
74
+ "color": ["handleChangeColor"],
75
+ "spotColor": ["handleChangeColor"]
76
+ }; }
67
77
  static get style() { return curaHeadingCss; }
68
78
  }, [1, "cura-heading", {
69
79
  "level": [514],
70
80
  "size": [513],
71
81
  "weight": [513],
72
- "inverted": [516],
73
- "spotColor": [513, "spot-color"]
82
+ "spotColor": [513, "spot-color"],
83
+ "color": [1],
84
+ "marginBlock": [513, "margin-block"],
85
+ "lineHeight": [513, "line-height"],
86
+ "styles": [32]
74
87
  }]);
75
88
  function defineCustomElement$1() {
76
89
  if (typeof customElements === "undefined") {