@rededor/cura 0.5.0 → 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 (221) 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 +3 -3
  16. package/dist/cjs/{index-72217b50.js → index-404d93e9.js} +247 -3
  17. package/dist/cjs/index-404d93e9.js.map +1 -0
  18. package/dist/cjs/index.cjs.js +7 -0
  19. package/dist/cjs/index.cjs.js.map +1 -1
  20. package/dist/cjs/loader.cjs.js +3 -3
  21. package/dist/collection/api/cura-api.type.js.map +1 -1
  22. package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
  23. package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
  24. package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
  25. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
  26. package/dist/collection/api/theme-presets/static.js +2 -2
  27. package/dist/collection/api/theme-presets/static.js.map +1 -1
  28. package/dist/collection/collection-manifest.json +1 -0
  29. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +1 -1
  30. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  31. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
  32. package/dist/collection/components/buttons/cura-button/cura-button.js +4 -3
  33. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  34. package/dist/collection/components/buttons/cura-button/cura-button.stories.js +1 -1
  35. package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
  36. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +4 -3
  37. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  38. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +1 -1
  39. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
  40. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +4 -3
  41. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  42. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +1 -1
  43. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
  44. package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -1
  45. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  46. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +1 -1
  47. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
  48. package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
  49. package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
  50. package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
  51. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
  52. package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
  53. package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
  54. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +1 -1
  55. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
  56. package/dist/collection/components/text/cura-display/cura-display.css +21 -38
  57. package/dist/collection/components/text/cura-display/cura-display.js +80 -49
  58. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  59. package/dist/collection/components/text/cura-display/cura-display.stories.js +79 -34
  60. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  61. package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
  62. package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
  63. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  64. package/dist/collection/components/text/cura-heading/cura-heading.stories.js +93 -37
  65. package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
  66. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
  67. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
  68. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  69. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +79 -47
  70. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  71. package/dist/collection/index.js +3 -1
  72. package/dist/collection/index.js.map +1 -1
  73. package/dist/components/cura-accordion-item.js +1 -1
  74. package/dist/components/cura-accordion-item.js.map +1 -1
  75. package/dist/components/cura-button-outline.js +1 -1
  76. package/dist/components/cura-button-outline.js.map +1 -1
  77. package/dist/components/cura-button-transparent.js +1 -1
  78. package/dist/components/cura-button-transparent.js.map +1 -1
  79. package/dist/components/cura-button.js +1 -1
  80. package/dist/components/cura-button.js.map +1 -1
  81. package/dist/components/cura-display.js +41 -35
  82. package/dist/components/cura-display.js.map +1 -1
  83. package/dist/components/cura-heading.js +34 -21
  84. package/dist/components/cura-heading.js.map +1 -1
  85. package/dist/components/cura-label.d.ts +11 -0
  86. package/dist/components/cura-label.js +91 -0
  87. package/dist/components/cura-label.js.map +1 -0
  88. package/dist/components/cura-page-template.js +1 -1
  89. package/dist/components/cura-page-template.js.map +1 -1
  90. package/dist/components/cura-paragraph.js +25 -23
  91. package/dist/components/cura-paragraph.js.map +1 -1
  92. package/dist/components/index.js +11 -5
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/cura/cura.esm.js +1 -1
  95. package/dist/cura/cura.esm.js.map +1 -1
  96. package/dist/cura/cura.js +1 -1
  97. package/dist/cura/index.esm.js +1 -1
  98. package/dist/cura/index.esm.js.map +1 -1
  99. package/dist/cura/p-03047b3e.entry.js +2 -0
  100. package/dist/cura/p-03047b3e.entry.js.map +1 -0
  101. package/dist/cura/p-0c79c54e.entry.js +2 -0
  102. package/dist/cura/p-0c79c54e.entry.js.map +1 -0
  103. package/dist/cura/p-120926c5.system.js +2 -0
  104. package/dist/cura/p-120926c5.system.js.map +1 -0
  105. package/dist/cura/p-223924fb.system.entry.js +2 -0
  106. package/dist/cura/p-223924fb.system.entry.js.map +1 -0
  107. package/dist/cura/p-46d20db3.js +3 -0
  108. package/dist/cura/p-46d20db3.js.map +1 -0
  109. package/dist/cura/p-48426f60.system.js +2 -0
  110. package/dist/cura/p-48426f60.system.js.map +1 -0
  111. package/dist/cura/p-49813052.entry.js +2 -0
  112. package/dist/cura/p-49813052.entry.js.map +1 -0
  113. package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
  114. package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
  115. package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
  116. package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
  117. package/dist/cura/p-8b18b5f7.system.js +2 -0
  118. package/dist/cura/p-8b18b5f7.system.js.map +1 -0
  119. package/dist/cura/p-91b0f78e.entry.js +2 -0
  120. package/dist/cura/p-91b0f78e.entry.js.map +1 -0
  121. package/dist/cura/p-a0395f90.entry.js +2 -0
  122. package/dist/cura/p-a0395f90.entry.js.map +1 -0
  123. package/dist/cura/p-a7ef255f.entry.js +2 -0
  124. package/dist/cura/p-a7ef255f.entry.js.map +1 -0
  125. package/dist/cura/p-c0c00396.system.js +3 -0
  126. package/dist/cura/p-c0c00396.system.js.map +1 -0
  127. package/dist/cura/p-ca054b07.system.entry.js +2 -0
  128. package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
  129. package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
  130. package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
  131. package/dist/cura/p-f8fffdc1.js +2 -0
  132. package/dist/cura/p-f8fffdc1.js.map +1 -0
  133. package/dist/cura/p-fc77814b.system.entry.js +2 -0
  134. package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
  135. package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
  136. package/dist/esm/app-globals-29001758.js.map +1 -0
  137. package/dist/esm/cura-accordion_8.entry.js +441 -0
  138. package/dist/esm/cura-accordion_8.entry.js.map +1 -0
  139. package/dist/esm/cura-button-outline.entry.js +79 -0
  140. package/dist/esm/cura-button-outline.entry.js.map +1 -0
  141. package/dist/esm/cura-button-transparent.entry.js +79 -0
  142. package/dist/esm/cura-button-transparent.entry.js.map +1 -0
  143. package/dist/esm/cura-display.entry.js +70 -0
  144. package/dist/esm/cura-display.entry.js.map +1 -0
  145. package/dist/esm/cura-icons-view.entry.js +25 -0
  146. package/dist/esm/cura-icons-view.entry.js.map +1 -0
  147. package/dist/esm/cura-label.entry.js +65 -0
  148. package/dist/esm/cura-label.entry.js.map +1 -0
  149. package/dist/esm/cura.js +4 -4
  150. package/dist/esm/{index-9af0cdbd.js → index-d99da69e.js} +247 -3
  151. package/dist/esm/index-d99da69e.js.map +1 -0
  152. package/dist/esm/index.js +4 -0
  153. package/dist/esm/index.js.map +1 -1
  154. package/dist/esm/loader.js +4 -4
  155. package/dist/esm-es5/app-globals-29001758.js +2 -0
  156. package/dist/esm-es5/app-globals-29001758.js.map +1 -0
  157. package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
  158. package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
  159. package/dist/esm-es5/cura-button-outline.entry.js +2 -0
  160. package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
  161. package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
  162. package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
  163. package/dist/esm-es5/cura-display.entry.js +2 -0
  164. package/dist/esm-es5/cura-display.entry.js.map +1 -0
  165. package/dist/esm-es5/cura-icons-view.entry.js +2 -0
  166. package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
  167. package/dist/esm-es5/cura-label.entry.js +2 -0
  168. package/dist/esm-es5/cura-label.entry.js.map +1 -0
  169. package/dist/esm-es5/cura.js +1 -1
  170. package/dist/esm-es5/cura.js.map +1 -1
  171. package/dist/esm-es5/index-d99da69e.js +3 -0
  172. package/dist/esm-es5/index-d99da69e.js.map +1 -0
  173. package/dist/esm-es5/index.js +1 -1
  174. package/dist/esm-es5/index.js.map +1 -1
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/loader.js.map +1 -1
  177. package/dist/types/api/cura-api.type.d.ts +1 -0
  178. package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
  179. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +1 -1
  180. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +1 -1
  181. package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
  182. package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
  183. package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
  184. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
  185. package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
  186. package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
  187. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
  188. package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
  189. package/dist/types/components.d.ts +145 -52
  190. package/dist/types/index.d.ts +9 -0
  191. package/package.json +2 -4
  192. package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
  193. package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
  194. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  195. package/dist/cjs/index-72217b50.js.map +0 -1
  196. package/dist/cura/p-2cbf52f1.js +0 -3
  197. package/dist/cura/p-2cbf52f1.js.map +0 -1
  198. package/dist/cura/p-4cdbc8a1.system.entry.js +0 -2
  199. package/dist/cura/p-4cdbc8a1.system.entry.js.map +0 -1
  200. package/dist/cura/p-50ea2036.system.js +0 -2
  201. package/dist/cura/p-50ea2036.system.js.map +0 -1
  202. package/dist/cura/p-788e035b.system.js +0 -2
  203. package/dist/cura/p-788e035b.system.js.map +0 -1
  204. package/dist/cura/p-8da635b7.system.js +0 -3
  205. package/dist/cura/p-8da635b7.system.js.map +0 -1
  206. package/dist/cura/p-c54ce246.entry.js +0 -2
  207. package/dist/cura/p-c54ce246.entry.js.map +0 -1
  208. package/dist/cura/p-d5c64a5f.js +0 -2
  209. package/dist/cura/p-d5c64a5f.js.map +0 -1
  210. package/dist/cura/p-f4232daa.system.js +0 -2
  211. package/dist/cura/p-f4232daa.system.js.map +0 -1
  212. package/dist/esm/app-globals-cc003eaf.js.map +0 -1
  213. package/dist/esm/cura-accordion_12.entry.js +0 -659
  214. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  215. package/dist/esm/index-9af0cdbd.js.map +0 -1
  216. package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
  217. package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
  218. package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
  219. package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
  220. package/dist/esm-es5/index-9af0cdbd.js +0 -3
  221. package/dist/esm-es5/index-9af0cdbd.js.map +0 -1
@@ -11,92 +11,87 @@
11
11
  * Responsive media for large only.
12
12
  * Use: @include large-only() { ... }
13
13
  */
14
- /**
15
- * Responsive media for large and up.
16
- * Use: @include large-up() { ... }
17
- */
18
14
  /**
19
15
  * Responsive media for xlarge only.
20
16
  * Use: @include xlarge-only() { ... }
21
17
  */
18
+ /**
19
+ * Responsive media for medium to large.
20
+ * Use: @include medium-large() { ... }
21
+ */
22
+ /**
23
+ * Responsive media for large and up.
24
+ * Use: @include large-up() { ... }
25
+ */
22
26
  :host {
23
27
  display: block;
24
- font-size: var(--font-size);
28
+ font-size: var(--font-size-base);
25
29
  }
26
30
  :host p {
27
31
  font-family: var(--font-family);
28
- font-size: var(--font-size);
32
+ font-size: var(--font-size-base);
29
33
  font-weight: var(--font-weight-regular);
30
34
  color: var(--color-body);
31
35
  line-height: var(--line-height);
32
- /* letter-spacing: 0.02em; */
33
- margin-block-start: var(--block-margin);
34
- margin-block-end: var(--block-margin);
36
+ margin-block: var(--margin-block);
37
+ letter-spacing: 0.28px;
35
38
  }
36
39
  :host p.large {
37
- font-size: 1.21em;
40
+ font-size: 1.214em;
38
41
  line-height: calc(var(--line-height) + 10%);
39
- /* line-height: 150%; */
40
- /* letter-spacing: normal; */
42
+ letter-spacing: 0px;
41
43
  }
42
44
  :host p.small {
43
45
  font-size: 0.85em;
44
46
  line-height: calc(var(--line-height) - 5%);
45
- /* line-height: 135%; */
46
- /* letter-spacing: 0.04em; */
47
+ letter-spacing: 0.48px;
47
48
  }
48
- :host p.caption {
49
- font-size: 0.71em;
49
+ :host p.caption, :host p.xsmall {
50
+ font-size: 0.714em;
50
51
  line-height: calc(var(--line-height) - 5%);
51
- /* line-height: 135%; */
52
- /* letter-spacing: 0.06em; */
52
+ letter-spacing: 0.6px;
53
53
  }
54
- @media (min-width: 768px) and (max-width: 1365px) {
54
+ @media (min-width: 769px) and (max-width: 1920px) {
55
55
  :host p {
56
- font-size: 1.14em;
56
+ font-size: 1.143em;
57
57
  line-height: calc(var(--line-height) + 5%);
58
- /* line-height: 145%; */
58
+ letter-spacing: 0.32px;
59
59
  }
60
60
  :host p.large {
61
- font-size: 1.35em;
61
+ font-size: 1.357em;
62
62
  line-height: calc(var(--line-height) + 10%);
63
- /* line-height: 150%; */
63
+ letter-spacing: 0px;
64
64
  }
65
65
  :host p.small {
66
66
  font-size: 1em;
67
67
  line-height: calc(var(--line-height) - 5%);
68
- /* line-height: 135%; */
68
+ letter-spacing: 0.56px;
69
69
  }
70
- :host p.caption {
70
+ :host p.caption, :host p.xsmall {
71
71
  font-size: 0.85em;
72
72
  line-height: calc(var(--line-height) - 5%);
73
- /* line-height: 135%; */
74
- /* letter-spacing: 0.06em; */
73
+ letter-spacing: 0.72px;
75
74
  }
76
75
  }
77
- @media (min-width: 1366px) {
76
+ @media (min-width: 1921px) {
78
77
  :host p {
79
- font-size: 1.42em;
78
+ font-size: 1.429em;
80
79
  line-height: calc(var(--line-height) + 10%);
81
- /* line-height: 150%; */
82
- /* letter-spacing: normal; */
80
+ letter-spacing: 0px;
83
81
  }
84
82
  :host p.large {
85
- font-size: 1.71em;
83
+ font-size: 1.714em;
86
84
  line-height: calc(var(--line-height) + 20%);
87
- /* line-height: 160%; */
88
85
  }
89
86
  :host p.small {
90
87
  font-size: 1.21em;
91
88
  line-height: calc(var(--line-height) + 5%);
92
- /* line-height: 145%; */
93
- /* letter-spacing: normal; */
89
+ letter-spacing: 0px;
94
90
  }
95
- :host p.caption {
91
+ :host p.caption, :host p.xsmall {
96
92
  font-size: 1em;
97
93
  line-height: calc(var(--line-height) + 5%);
98
- /* line-height: 145%; */
99
- /* letter-spacing: 0.02em; */
94
+ letter-spacing: 0.28px;
100
95
  }
101
96
  }
102
97
  :host ::slotted(b), :host ::slotted(strong) {
@@ -107,6 +102,10 @@
107
102
  color: var(--color-link);
108
103
  text-underline-offset: 10%;
109
104
  }
105
+ :host ::slotted(u) {
106
+ font-weight: var(--font-weight-medium);
107
+ text-underline-offset: 10%;
108
+ }
110
109
  :host ::slotted(abbr) {
111
110
  color: var(--color-link);
112
111
  text-decoration: underline dashed 1px var(--color-link);
@@ -1,17 +1,18 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  export class CuraParagraph {
3
3
  constructor() {
4
- this.size = 'regular';
5
- this.inverted = false;
6
- this.spotColor = 'primary';
4
+ this.theme = window.CuraAPI.theme;
5
+ this.size = 'medium';
6
+ this.spotColor = 'accent-dark';
7
7
  this.color = undefined;
8
+ this.marginBlock = '1.25em';
9
+ this.lineHeight = '140%';
8
10
  this.styles = {};
9
11
  }
10
12
  handleChangeColor() {
11
13
  this.setColors();
12
14
  }
13
15
  connectedCallback() {
14
- this.weights = window.CuraAPI.theme.fonts.getWeights();
15
16
  this.setFontProperties();
16
17
  this.setColors();
17
18
  }
@@ -21,31 +22,30 @@ export class CuraParagraph {
21
22
  return sizeclass;
22
23
  }
23
24
  setFontProperties() {
25
+ this.weights = this.theme.fonts.getWeights();
26
+ this.fontSizeBase = this.theme.fonts.getSize();
24
27
  this.styles = {
25
- '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),
26
- '--font-size': window.CuraAPI.theme.fonts.getSize(),
28
+ '--font-family': this.theme.fonts.getFamily('body'),
27
29
  '--font-weight-regular': this.weights.regular,
28
30
  '--font-weight-medium': this.weights.medium,
29
31
  '--font-weight-bold': this.weights.bold
30
32
  };
31
- this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
32
- this.setHostProperty('--block-margin', '1.25em');
33
- this.setHostProperty('--line-height', '140%');
34
33
  }
35
34
  setColors() {
36
- const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :
37
- this.inverted
38
- ? window.CuraAPI.theme.colors.getColor('neutral-white')
39
- : window.CuraAPI.theme.fonts.getColor();
40
- this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'), '--color-link': this.inverted
41
- ? window.CuraAPI.theme.colors.getColor(`${this.spotColor}-lighter`)
42
- : window.CuraAPI.theme.colors.getColor(`${this.spotColor}-dark`) });
35
+ const fontColor = this.color
36
+ ? this.theme.colors.getColor(this.color)
37
+ : this.theme.fonts.getColor();
38
+ 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}`) });
43
39
  }
44
- setHostProperty(prop, value) {
45
- this.host.style.setProperty(prop, value);
40
+ hostCSSProperties() {
41
+ return {
42
+ '--margin-block': this.marginBlock,
43
+ '--font-size-base': this.fontSizeBase,
44
+ '--line-height': this.lineHeight
45
+ };
46
46
  }
47
47
  render() {
48
- return (h(Host, null, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
48
+ return (h(Host, { style: this.hostCSSProperties() }, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
49
49
  }
50
50
  static get is() { return "cura-paragraph"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -65,39 +65,39 @@ export class CuraParagraph {
65
65
  "type": "string",
66
66
  "mutable": false,
67
67
  "complexType": {
68
- "original": "'regular' | 'large' | 'small' | 'caption'",
69
- "resolved": "\"caption\" | \"large\" | \"regular\" | \"small\"",
68
+ "original": "'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall'",
69
+ "resolved": "\"caption\" | \"large\" | \"medium\" | \"regular\" | \"small\" | \"xsmall\"",
70
70
  "references": {}
71
71
  },
72
72
  "required": false,
73
73
  "optional": false,
74
74
  "docs": {
75
75
  "tags": [],
76
- "text": "Set size of body text.\nValues: regular (default) | large | small | caption."
76
+ "text": "Set size of body text.\nValues: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall."
77
77
  },
78
78
  "attribute": "size",
79
79
  "reflect": true,
80
- "defaultValue": "'regular'"
80
+ "defaultValue": "'medium'"
81
81
  },
82
- "inverted": {
83
- "type": "boolean",
82
+ "spotColor": {
83
+ "type": "string",
84
84
  "mutable": false,
85
85
  "complexType": {
86
- "original": "boolean",
87
- "resolved": "boolean",
86
+ "original": "string",
87
+ "resolved": "string",
88
88
  "references": {}
89
89
  },
90
90
  "required": false,
91
91
  "optional": false,
92
92
  "docs": {
93
93
  "tags": [],
94
- "text": "Apply light color to text in dark background.\nValues: boolean."
94
+ "text": "Apply design system color to interactive elements like <a> and <abbr> inside the text.\nValues: Color from design system scheme. Default to 'accent-dark'."
95
95
  },
96
- "attribute": "inverted",
96
+ "attribute": "spot-color",
97
97
  "reflect": true,
98
- "defaultValue": "false"
98
+ "defaultValue": "'accent-dark'"
99
99
  },
100
- "spotColor": {
100
+ "color": {
101
101
  "type": "string",
102
102
  "mutable": false,
103
103
  "complexType": {
@@ -109,28 +109,46 @@ export class CuraParagraph {
109
109
  "optional": false,
110
110
  "docs": {
111
111
  "tags": [],
112
- "text": "Apply base system color to elements like <a> and <abbr>.\nValues: String primary(default) | secondary | accent | neutral | success | error | warning | info."
112
+ "text": "Text color.\nValues: Color from design system scheme. Default to the font color from the theme."
113
113
  },
114
- "attribute": "spot-color",
114
+ "attribute": "color",
115
+ "reflect": false
116
+ },
117
+ "marginBlock": {
118
+ "type": "string",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "string",
122
+ "resolved": "string",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "CSS margin-block property values.\nDefault to 1.25em"
130
+ },
131
+ "attribute": "margin-block",
115
132
  "reflect": true,
116
- "defaultValue": "'primary'"
133
+ "defaultValue": "'1.25em'"
117
134
  },
118
- "color": {
119
- "type": "any",
135
+ "lineHeight": {
136
+ "type": "string",
120
137
  "mutable": false,
121
138
  "complexType": {
122
- "original": "any",
123
- "resolved": "any",
139
+ "original": "string",
140
+ "resolved": "string",
124
141
  "references": {}
125
142
  },
126
143
  "required": false,
127
144
  "optional": false,
128
145
  "docs": {
129
146
  "tags": [],
130
- "text": "Color base from color scheme. Default: theme font color."
147
+ "text": "CSS line-height property values.\nDefault to 140%"
131
148
  },
132
- "attribute": "color",
133
- "reflect": false
149
+ "attribute": "line-height",
150
+ "reflect": true,
151
+ "defaultValue": "'140%'"
134
152
  }
135
153
  };
136
154
  }
@@ -144,6 +162,9 @@ export class CuraParagraph {
144
162
  return [{
145
163
  "propName": "color",
146
164
  "methodName": "handleChangeColor"
165
+ }, {
166
+ "propName": "spotColor",
167
+ "methodName": "handleChangeColor"
147
168
  }];
148
169
  }
149
170
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;;gBAMiD,SAAS;oBAKhD,KAAK;qBAKJ,SAAS;;kBAmB1B,EAAE;;EAbpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAaD,iBAAiB;IACf,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;EACnB,CAAC;EAED,YAAY;IACV,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,SAAS,CAAC;EACnB,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;MAC7D,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;MACnD,uBAAuB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;MAC7C,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,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EAAE,KAAK,CAAC,CAAC;EAC3C,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,SAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;QAC/C,eAAa,CACX,CACC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-paragraph',\n styleUrl: 'cura-paragraph.scss',\n shadow: true,\n})\nexport class CuraParagraph {\n\n /**\n * Set size of body text.\n * Values: regular (default) | large | small | caption.\n */\n @Prop({reflect: true}) size: 'regular' | 'large' | 'small' | 'caption' = '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 * Color base from color scheme. Default: theme font color.\n */\n @Prop() color;\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * Host element <cura-paragraph>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n @State() styles = {};\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.setFontProperties();\n this.setColors();\n }\n\n setsizeClass() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-regular': this.weights.regular,\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n }\n this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());\n this.setHostProperty('--block-margin', '1.25em');\n this.setHostProperty('--line-height', '140%');\n }\n\n setColors() {\n const fontColor = this.color ? window.CuraAPI.theme.colors.getColor(this.color) :\n this.inverted\n ? window.CuraAPI.theme.colors.getColor('neutral-white')\n : window.CuraAPI.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker'),\n '--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\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <p style={this.styles} class={this.setsizeClass()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-paragraph.js","sourceRoot":"","sources":["../../../../src/components/text/cura-paragraph/cura-paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;;IAgDxB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;gBA1CkE,QAAQ;qBAMpE,aAAa;;uBAiBX,QAAQ;sBAMT,MAAM;kBAYxB,EAAE;;EA1BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAED,YAAY;IACV,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,OAAO,SAAS,CAAC;EACnB,CAAC;EAED,iBAAiB;I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,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE;QAC/C,eAAa,CACX,CACC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-paragraph',\n styleUrl: 'cura-paragraph.scss',\n shadow: true,\n})\nexport class CuraParagraph {\n\n /**\n * Set size of body text.\n * Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.\n */\n @Prop({reflect: true}) size: 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall' = 'medium';\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 = '140%';\n\n /**\n * Host element <cura-paragraph>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setsizeClass() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-regular': this.weights.regular,\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\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 hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.setsizeClass()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"]}
@@ -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
- title: 'Components/Text/Paragraph',
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,2BAA2B;EAClC,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IAC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EAAE,SAAS,EAAC;OACpC;KACF;IACD,KAAK,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: 'Components/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,aA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AE,EAAE,OAAO,EAAE,MAAM,EAAC;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() {