@rededor/cura 1.2.0 → 1.4.0-alpha.0

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 (273) hide show
  1. package/dist/cjs/{app-globals-4d07f363.js → app-globals-f33ceef8.js} +32 -1
  2. package/dist/cjs/app-globals-f33ceef8.js.map +1 -0
  3. package/dist/cjs/cura-accordion_12.cjs.entry.js +39 -38
  4. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.cjs.entry.js +3 -2
  6. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-badge-number.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-button-select.cjs.entry.js +17 -9
  13. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  20. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
  21. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
  22. package/dist/cjs/cura-dropdown-search.cjs.entry.js +21 -11
  23. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  24. package/dist/cjs/cura-icons-view.cjs.entry.js +3 -3
  25. package/dist/cjs/cura-input-date.cjs.entry.js +45 -45
  26. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  27. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/cura-modal.cjs.entry.js +50 -0
  29. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -0
  30. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  31. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  32. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  33. package/dist/cjs/cura-tooltip.cjs.entry.js +232 -0
  34. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -0
  35. package/dist/cjs/cura.cjs.js +2 -2
  36. package/dist/cjs/loader.cjs.js +2 -2
  37. package/dist/collection/api/theme-presets/theme-presets.js +2 -0
  38. package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
  39. package/dist/collection/api/theme-presets/theme-richet.js +32 -0
  40. package/dist/collection/api/theme-presets/theme-richet.js.map +1 -0
  41. package/dist/collection/collection-manifest.json +2 -0
  42. package/dist/collection/components/accordion/cura-accordion/cura-accordion.css +0 -6
  43. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +41 -43
  44. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  45. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +54 -36
  46. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  47. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +61 -60
  48. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +41 -23
  49. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
  50. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
  51. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -2
  52. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +1 -1
  53. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -1
  54. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  55. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  56. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +36 -2
  57. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +39 -11
  58. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  59. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +18 -7
  60. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -1
  61. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  62. package/dist/collection/components/cura-alert/cura-alert.css +25 -11
  63. package/dist/collection/components/cura-alert/cura-alert.js +2 -1
  64. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  65. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  66. package/dist/collection/components/cura-calendar/cura-calendar.css +1 -0
  67. package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
  68. package/dist/collection/components/cura-card/cura-card.js +1 -1
  69. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  70. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  71. package/dist/collection/components/cura-modal/cura-modal.css +211 -0
  72. package/dist/collection/components/cura-modal/cura-modal.js +134 -0
  73. package/dist/collection/components/cura-modal/cura-modal.js.map +1 -0
  74. package/dist/collection/components/cura-modal/cura-modal.stories.js +85 -0
  75. package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -0
  76. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  77. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  78. package/dist/collection/components/cura-tooltip/cura-tooltip.css +159 -0
  79. package/dist/collection/components/cura-tooltip/cura-tooltip.js +397 -0
  80. package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -0
  81. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js +137 -0
  82. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js.map +1 -0
  83. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  84. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  85. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  86. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  87. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +20 -10
  88. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  89. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +15 -0
  90. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +69 -68
  91. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
  92. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +29 -10
  93. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
  94. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
  95. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  96. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  97. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  98. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  99. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  100. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  101. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  102. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  103. package/dist/collection/components/text/cura-heading/cura-heading.css +5 -1
  104. package/dist/collection/components/text/cura-heading/cura-heading.js +7 -6
  105. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  106. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  107. package/dist/components/cura-accordion-item.js +19 -12
  108. package/dist/components/cura-accordion-item.js.map +1 -1
  109. package/dist/components/cura-accordion.js +14 -15
  110. package/dist/components/cura-accordion.js.map +1 -1
  111. package/dist/components/cura-alert.js +3 -2
  112. package/dist/components/cura-alert.js.map +1 -1
  113. package/dist/components/cura-avatar.js +1 -1
  114. package/dist/components/cura-badge-distance.js +1 -1
  115. package/dist/components/cura-badge-number2.js +2 -2
  116. package/dist/components/cura-badge-number2.js.map +1 -1
  117. package/dist/components/cura-button-outline.js +1 -1
  118. package/dist/components/cura-button-select.js +18 -9
  119. package/dist/components/cura-button-select.js.map +1 -1
  120. package/dist/components/cura-button-transparent2.js +1 -1
  121. package/dist/components/cura-button.js +1 -1
  122. package/dist/components/cura-calendar2.js +2 -2
  123. package/dist/components/cura-calendar2.js.map +1 -1
  124. package/dist/components/cura-card.js +1 -1
  125. package/dist/components/cura-checkbox.js +1 -1
  126. package/dist/components/cura-display.js +1 -1
  127. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  128. package/dist/components/cura-dropdown-search-option.js +2 -2
  129. package/dist/components/cura-dropdown-search.js +21 -11
  130. package/dist/components/cura-dropdown-search.js.map +1 -1
  131. package/dist/components/cura-heading2.js +8 -7
  132. package/dist/components/cura-heading2.js.map +1 -1
  133. package/dist/components/cura-icon2.js +1 -1
  134. package/dist/components/cura-icons-view.js +3 -3
  135. package/dist/components/cura-input-date.js +54 -57
  136. package/dist/components/cura-input-date.js.map +1 -1
  137. package/dist/components/cura-label2.js +1 -1
  138. package/dist/components/cura-loader-bar2.js +1 -1
  139. package/dist/components/cura-loader-circle2.js +1 -1
  140. package/dist/components/cura-modal.d.ts +11 -0
  141. package/dist/components/cura-modal.js +84 -0
  142. package/dist/components/cura-modal.js.map +1 -0
  143. package/dist/components/cura-page-template.js +1 -1
  144. package/dist/components/cura-paragraph2.js +1 -1
  145. package/dist/components/cura-radio.js +1 -1
  146. package/dist/components/cura-select-option2.js +1 -1
  147. package/dist/components/cura-select2.js +3 -3
  148. package/dist/components/cura-switch.js +1 -1
  149. package/dist/components/cura-toast.js +1 -1
  150. package/dist/components/cura-tooltip.d.ts +11 -0
  151. package/dist/components/cura-tooltip.js +291 -0
  152. package/dist/components/cura-tooltip.js.map +1 -0
  153. package/dist/components/index.js +35 -0
  154. package/dist/components/index.js.map +1 -1
  155. package/dist/cura/cura.esm.js +1 -1
  156. package/dist/cura/cura.esm.js.map +1 -1
  157. package/dist/cura/{p-116a1cd6.entry.js → p-01e301d4.entry.js} +2 -2
  158. package/dist/cura/p-0308cf6b.entry.js +2 -0
  159. package/dist/cura/p-0308cf6b.entry.js.map +1 -0
  160. package/dist/cura/{p-c6508bd7.entry.js → p-075b02de.entry.js} +2 -2
  161. package/dist/cura/{p-fd083399.entry.js → p-0e28f1c8.entry.js} +2 -2
  162. package/dist/cura/{p-e5023e34.entry.js → p-1f53580a.entry.js} +2 -2
  163. package/dist/cura/p-3536c96b.entry.js +2 -0
  164. package/dist/cura/p-3536c96b.entry.js.map +1 -0
  165. package/dist/cura/p-5bb8302c.entry.js +2 -0
  166. package/dist/cura/p-5bb8302c.entry.js.map +1 -0
  167. package/dist/cura/p-7090d4a7.entry.js +2 -0
  168. package/dist/cura/p-7090d4a7.entry.js.map +1 -0
  169. package/dist/cura/p-71a2dcef.entry.js +2 -0
  170. package/dist/cura/p-71a2dcef.entry.js.map +1 -0
  171. package/dist/cura/{p-2956f120.entry.js → p-7853ab16.entry.js} +2 -2
  172. package/dist/cura/{p-2956f120.entry.js.map → p-7853ab16.entry.js.map} +1 -1
  173. package/dist/cura/{p-41c3d47d.entry.js → p-81c66f2b.entry.js} +2 -2
  174. package/dist/cura/p-82b99090.js +2 -0
  175. package/dist/cura/p-82b99090.js.map +1 -0
  176. package/dist/cura/p-9a7e3f48.entry.js +2 -0
  177. package/dist/cura/p-9a7e3f48.entry.js.map +1 -0
  178. package/dist/cura/{p-dcd2e5bb.entry.js → p-a7ecea4a.entry.js} +2 -2
  179. package/dist/cura/{p-33772510.entry.js → p-b0451cb3.entry.js} +2 -2
  180. package/dist/cura/{p-907b3d12.entry.js → p-bfb5e9e1.entry.js} +2 -2
  181. package/dist/cura/{p-fdce91a7.entry.js → p-d635501a.entry.js} +2 -2
  182. package/dist/cura/{p-44e3325a.entry.js → p-dbd9eab3.entry.js} +2 -2
  183. package/dist/cura/{p-8f3db0fe.entry.js → p-e5b0dd74.entry.js} +2 -2
  184. package/dist/cura/p-ebed83d1.entry.js +2 -0
  185. package/dist/cura/{p-fcbf4311.entry.js → p-ed839f1e.entry.js} +2 -2
  186. package/dist/cura/p-eda28278.entry.js +2 -0
  187. package/dist/cura/p-eda28278.entry.js.map +1 -0
  188. package/dist/cura/{p-b2d5db22.entry.js → p-eea093b2.entry.js} +2 -2
  189. package/dist/cura/p-f375a612.entry.js +2 -0
  190. package/dist/cura/p-f375a612.entry.js.map +1 -0
  191. package/dist/esm/{app-globals-6ca7103d.js → app-globals-e54ee4c3.js} +32 -1
  192. package/dist/esm/app-globals-e54ee4c3.js.map +1 -0
  193. package/dist/esm/cura-accordion_12.entry.js +39 -38
  194. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  195. package/dist/esm/cura-alert.entry.js +3 -2
  196. package/dist/esm/cura-alert.entry.js.map +1 -1
  197. package/dist/esm/cura-avatar.entry.js +1 -1
  198. package/dist/esm/cura-badge-distance.entry.js +1 -1
  199. package/dist/esm/cura-badge-number.entry.js +2 -2
  200. package/dist/esm/cura-badge-number.entry.js.map +1 -1
  201. package/dist/esm/cura-button-outline.entry.js +1 -1
  202. package/dist/esm/cura-button-select.entry.js +17 -9
  203. package/dist/esm/cura-button-select.entry.js.map +1 -1
  204. package/dist/esm/cura-button-transparent.entry.js +1 -1
  205. package/dist/esm/cura-calendar.entry.js +2 -2
  206. package/dist/esm/cura-calendar.entry.js.map +1 -1
  207. package/dist/esm/cura-card.entry.js +1 -1
  208. package/dist/esm/cura-checkbox.entry.js +1 -1
  209. package/dist/esm/cura-display.entry.js +1 -1
  210. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  211. package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
  212. package/dist/esm/cura-dropdown-search.entry.js +21 -11
  213. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  214. package/dist/esm/cura-icons-view.entry.js +3 -3
  215. package/dist/esm/cura-input-date.entry.js +45 -45
  216. package/dist/esm/cura-input-date.entry.js.map +1 -1
  217. package/dist/esm/cura-loader-bar.entry.js +1 -1
  218. package/dist/esm/cura-modal.entry.js +46 -0
  219. package/dist/esm/cura-modal.entry.js.map +1 -0
  220. package/dist/esm/cura-radio.entry.js +1 -1
  221. package/dist/esm/cura-switch.entry.js +1 -1
  222. package/dist/esm/cura-toast.entry.js +1 -1
  223. package/dist/esm/cura-tooltip.entry.js +228 -0
  224. package/dist/esm/cura-tooltip.entry.js.map +1 -0
  225. package/dist/esm/cura.js +2 -2
  226. package/dist/esm/loader.js +2 -2
  227. package/dist/types/api/theme-presets/theme-presets.d.ts +43 -0
  228. package/dist/types/api/theme-presets/theme-richet.d.ts +43 -0
  229. package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +7 -3
  230. package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +38 -16
  231. package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +8 -3
  232. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +2 -0
  233. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +14 -0
  234. package/dist/types/components/cura-modal/cura-modal.d.ts +28 -0
  235. package/dist/types/components/cura-modal/cura-modal.stories.d.ts +70 -0
  236. package/dist/types/components/cura-tooltip/cura-tooltip.d.ts +25 -0
  237. package/dist/types/components/cura-tooltip/cura-tooltip.stories.d.ts +119 -0
  238. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +1 -0
  239. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +19 -19
  240. package/dist/types/components/text/cura-heading/cura-heading.d.ts +1 -0
  241. package/dist/types/components.d.ts +131 -10
  242. package/package.json +2 -2
  243. package/dist/cjs/app-globals-4d07f363.js.map +0 -1
  244. package/dist/cura/p-0b7a7306.js +0 -2
  245. package/dist/cura/p-0b7a7306.js.map +0 -1
  246. package/dist/cura/p-2d267d23.entry.js +0 -2
  247. package/dist/cura/p-2d267d23.entry.js.map +0 -1
  248. package/dist/cura/p-4e14c01c.entry.js +0 -2
  249. package/dist/cura/p-b43b69f3.entry.js +0 -2
  250. package/dist/cura/p-b43b69f3.entry.js.map +0 -1
  251. package/dist/cura/p-be10b681.entry.js +0 -2
  252. package/dist/cura/p-be10b681.entry.js.map +0 -1
  253. package/dist/cura/p-cda24a1e.entry.js +0 -2
  254. package/dist/cura/p-cda24a1e.entry.js.map +0 -1
  255. package/dist/cura/p-e8bc6381.entry.js +0 -2
  256. package/dist/cura/p-e8bc6381.entry.js.map +0 -1
  257. package/dist/cura/p-ed97cf3c.entry.js +0 -2
  258. package/dist/cura/p-ed97cf3c.entry.js.map +0 -1
  259. package/dist/esm/app-globals-6ca7103d.js.map +0 -1
  260. /package/dist/cura/{p-116a1cd6.entry.js.map → p-01e301d4.entry.js.map} +0 -0
  261. /package/dist/cura/{p-c6508bd7.entry.js.map → p-075b02de.entry.js.map} +0 -0
  262. /package/dist/cura/{p-fd083399.entry.js.map → p-0e28f1c8.entry.js.map} +0 -0
  263. /package/dist/cura/{p-e5023e34.entry.js.map → p-1f53580a.entry.js.map} +0 -0
  264. /package/dist/cura/{p-41c3d47d.entry.js.map → p-81c66f2b.entry.js.map} +0 -0
  265. /package/dist/cura/{p-dcd2e5bb.entry.js.map → p-a7ecea4a.entry.js.map} +0 -0
  266. /package/dist/cura/{p-33772510.entry.js.map → p-b0451cb3.entry.js.map} +0 -0
  267. /package/dist/cura/{p-907b3d12.entry.js.map → p-bfb5e9e1.entry.js.map} +0 -0
  268. /package/dist/cura/{p-fdce91a7.entry.js.map → p-d635501a.entry.js.map} +0 -0
  269. /package/dist/cura/{p-44e3325a.entry.js.map → p-dbd9eab3.entry.js.map} +0 -0
  270. /package/dist/cura/{p-8f3db0fe.entry.js.map → p-e5b0dd74.entry.js.map} +0 -0
  271. /package/dist/cura/{p-4e14c01c.entry.js.map → p-ebed83d1.entry.js.map} +0 -0
  272. /package/dist/cura/{p-fcbf4311.entry.js.map → p-ed839f1e.entry.js.map} +0 -0
  273. /package/dist/cura/{p-b2d5db22.entry.js.map → p-eea093b2.entry.js.map} +0 -0
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Global Spacing Definitions.
3
+ * Required CSS Properties:
4
+ * --base-spacing
5
+ */
6
+ /* None: 0px */
7
+ /* Tiny default: 4px */
8
+ /* Mini default: 8px */
9
+ /* XXXS default: 12px */
10
+ /* XXS default: 16px */
11
+ /* XS default: 20px */
12
+ /* S default: 20px */
13
+ /* M default: 32px */
14
+ /* L default: 40px */
15
+ /* XL default: 48px */
16
+ /* XXL default: 64px */
17
+ /* XXXL default: 72px */
18
+ /* Huge default: 96px */
1
19
  :host {
2
20
  display: block;
3
21
  box-sizing: border-box;
@@ -5,8 +23,8 @@
5
23
  :host .conteiner {
6
24
  display: flex;
7
25
  box-sizing: border-box;
8
- padding: 12px;
9
- gap: 12px;
26
+ padding: calc(var(--base-spacing) * 3px);
27
+ gap: calc(var(--base-spacing) * 3px);
10
28
  flex-shrink: 0;
11
29
  border: 1px solid var(--color-base);
12
30
  border-radius: 4px;
@@ -15,16 +33,12 @@
15
33
  :host .conteiner.floating {
16
34
  box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);
17
35
  }
18
- :host .icon-left {
19
- margin-right: 5px;
36
+ :host .content {
37
+ flex: 1;
38
+ flex-direction: column;
39
+ display: flex;
40
+ gap: calc(var(--base-spacing) * 1px);
20
41
  }
21
42
  :host .icon-right {
22
- margin-left: auto;
23
43
  cursor: pointer;
24
- }
25
- :host .text {
26
- margin-top: 3px;
27
- }
28
- :host .actions {
29
- margin-top: 5px;
30
44
  }
@@ -25,6 +25,7 @@ export class CuraAlert {
25
25
  this.styles = Object.assign({}, this.styles);
26
26
  }
27
27
  connectedCallback() {
28
+ this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
28
29
  this.setColors();
29
30
  }
30
31
  getClasses() {
@@ -43,7 +44,7 @@ export class CuraAlert {
43
44
  return this.icon ? this.icon : iconMapping[this.type];
44
45
  }
45
46
  render() {
46
- return (h(Host, { key: 'c5398d59da323dee68eed1cb7c27841df0e12d14' }, h("div", { key: 'd9bb0ab7a2106e710a113513e6eeb1297b9bd205', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '54665c81a59cbca3686abc6f5e388da32e2211ed', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '466f9f4aed5096658de1e19521cefe2915b095af', class: "content" }, h("cura-label", { key: '6b3d9cd0352b5d5254305baa5a71a1b1782f637f', class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label), h("cura-paragraph", { key: '5dbad5e65d88b59a81b7df97154071a607d73900', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'cb75d38c35d34a7bee4e187c640a1269bad192b0' })), h("div", { key: 'a6930bb463601a2ba429b23fad61847e8dee01f3', class: "actions" }, h("slot", { key: '7f4fc8b08a870f578d0b241df00650ebf3db83e0', name: "actions" }))), this.closeable ?
47
+ return (h(Host, { key: 'e8998ea87d6a1342f6907ac96d2ee73c9f2ef2ad' }, h("div", { key: '917a9c712631eb1f3af2caf3d9d1bbdb7390c239', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '406ec8e8ebbdcb7b634c26085785fb5e6943c23c', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: 'de416db715df6bf4335def85044564e51af97b2d', class: "content" }, this.label ? (h("cura-label", { class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label)) : '', h("cura-paragraph", { key: '7c759da9b461769f01facda7b52faac4fad4ff86', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'f71f45289c632acbe25c19db15de07b09ec395fe' })), h("slot", { key: 'd46e508a7da7579fc4aed665c9606d1d7a93ceb4', name: "actions" })), this.closeable ?
47
48
  (h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
48
49
  : '')));
49
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-alert.js","sourceRoot":"","sources":["../../../src/components/cura-alert/cura-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAMrG,MAAM,OAAO,SAAS;;QAiDpB,gBAAW,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC,CAAC;oBAjDuD,MAAM;wBAC3B,KAAK;;yBAEJ,IAAI;;sBAGhC,EAAE;;IAKX,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU,EAAE;YAC1D,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE;YACnD,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,QAAQ,EAAE;YACtD,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,OAAO,EAAE;SACrD,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,qBAAO,IAAI,CAAC,MA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I,EAAC,SAAS,GAAQ,CACxB,CACF;gBACJ,IAAI,CAAC,SAAS,CAAC,CAAC;oBAClB,CAAC,iBAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,GAAc,CAAC;oBACjH,CAAC,CAAC,EAAE,CACA,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n @State()\n styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n this.styles = {...this.styles};\n }\n\n connectedCallback() {\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n <cura-label class=\"title\" size=\"small\" color=\"neutral-darker\" weight=\"bold\">\n {this.label}\n </cura-label>\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <div class=\"actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-alert.js","sourceRoot":"","sources":["../../../src/components/cura-alert/cura-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAMrG,MAAM,OAAO,SAAS;;QAkDpB,gBAAW,GAAG,GAAG,EAAE;YACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC,CAAC;oBAlDuD,MAAM;wBAC3B,KAAK;;yBAEJ,IAAI;;sBAGvB,EAAE;;IAKpB,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU,EAAE;YAC1D,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE;YACnD,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,QAAQ,E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AAK,EAAC,WAAW,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,OAAO,GAAc;gBACzG,4DAAK,KAAK,EAAC,SAAS;oBAChB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACf,kBAAY,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,gBAAgB,EAAC,MAAM,EAAC,MAAM,IACxE,IAAI,CAAC,KAAK,CACA,CACZ,CAAC,CAAC,CAAC,EAAE;oBACN,uEAAgB,KAAK,EAAC,MAAM,EAAC,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS,EAAE,IAAI,EAAC,QAAQ,EAAC,WAAW,EAAC,GAAG,EAAC,UAAU,EAAC,SAAS;wBAC3G,8DAAa,CACE;oBACjB,6DAAM,IAAI,EAAC,SAAS,GAAQ,CACxB;gBACJ,IAAI,CAAC,SAAS,CAAC,CAAC;oBAClB,CAAC,iBAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,GAAc,CAAC;oBACjH,CAAC,CAAC,EAAE,CACA,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n this.styles = {...this.styles};\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-label class=\"title\" size=\"small\" color=\"neutral-darker\" weight=\"bold\">\n {this.label}\n </cura-label>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -39,7 +39,7 @@ export class CuraAvatar {
39
39
  this.imageSrc = this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`;
40
40
  }
41
41
  render() {
42
- return (h(Host, { key: '2760534555a0483e7e30c5f3009ec0cf68d0973b', style: this.hostCSSProperties(), role: "img" }, h("div", { key: '3daf6dd066983dc63525c38b7da498147c0bf387', class: this.getClasses(), style: this.styles }, h("img", { key: 'a5f4de7983722fc3f750404fa985c312590b5e98', src: this.imageSrc || this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`, onError: () => this.onSrcError() }))));
42
+ return (h(Host, { key: '01de93bd7f04abfba6c189c944f71cc75528b187', style: this.hostCSSProperties(), role: "img" }, h("div", { key: '8d34f270a8c70a46678f7ec16d7d210eecc6b43e', class: this.getClasses(), style: this.styles }, h("img", { key: 'c0997bfcdb3468d5017ca5902c76e8ec0e8ea6f9', src: this.imageSrc || this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`, onError: () => this.onSrcError() }))));
43
43
  }
44
44
  static get is() { return "cura-avatar"; }
45
45
  static get encapsulation() { return "shadow"; }
@@ -11,6 +11,7 @@
11
11
  gap: 5px;
12
12
  width: var(--width);
13
13
  min-width: var(--min-width);
14
+ max-width: var(--max-width);
14
15
  border-radius: 4px;
15
16
  overflow: hidden;
16
17
  background: #fff;
@@ -452,7 +452,7 @@ export class CuraCalendar {
452
452
  }
453
453
  render() {
454
454
  const { months } = this.fetchMonthNames();
455
- return (h(Host, { key: 'fcea88a384ceebadccb6059ef59cea945f875a72', style: this.getHostCSSProperties() }, h("div", { key: '82c5271ba6b073439fb58471920f73b68b8f1320', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: '3921fb57f3d526b9f33c59f998ad422806505bc1', class: "header" }, h("div", { key: '1f852f0f29ff927d3940c670f5b25206837cc331', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '697fda3903f24611628fe24a7f669ab87474aeab', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '6b7f0694e978b0807c4e54629cda68f2fde27c8a', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '5a151331c2c9872cf3b50bbaea7c9b92b1476297', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), h("div", { key: '7eeb57ed5dc104c953343697a205a922a1b2b912', class: "dates" }, !this.collapsed
455
+ return (h(Host, { key: '2167c17db3fcc20b3b9de3e8b4c071f78369d37e', style: this.getHostCSSProperties() }, h("div", { key: 'e09c187cd19bc53cd9b4c592001c8de8bc30bdd7', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: 'c89688cd2b5e398364b3b0208eb01ae82aa7d808', class: "header" }, h("div", { key: 'a18b029a7446791c87303e959c3c7ecd3bdead47', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '25532f4297827c6431fb9be4491894952cda1c8f', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '52d65856b6797a8ad185fdeb0bd40abee24cc95e', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '83afcab7b30fc4bdf3e02810dc911000c71a6d68', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), h("div", { key: 'f5b55f62ced251c9a77138492e77aeb6feb3e117', class: "dates" }, !this.collapsed
456
456
  ? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
457
457
  : this.fetchDaysOfWeek().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
458
458
  }
@@ -34,7 +34,7 @@ export class CuraCard {
34
34
  return classes;
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: 'db1a13cfe3bb925300e65641e1d45fade5a03f52', role: this.href ? 'link' : 'div' }, this.href ? (h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, h("slot", null))) : (h("div", { class: this.getClasses(), style: this.styles }, h("slot", null)))));
37
+ return (h(Host, { key: '72140d7ae467677c7acbdb3ff45fa84c9fe60fce', role: this.href ? 'link' : 'div' }, this.href ? (h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, h("slot", null))) : (h("div", { class: this.getClasses(), style: this.styles }, h("slot", null)))));
38
38
  }
39
39
  static get is() { return "cura-card"; }
40
40
  static get encapsulation() { return "shadow"; }
@@ -31,7 +31,7 @@ export class CuraIcon {
31
31
  this.host.style.setProperty(prop, value);
32
32
  }
33
33
  render() {
34
- return (h(Host, { key: '8955586152a043a308ad539516973dba36bd145d' }, h("svg", { key: 'f383174620a5dcaa33d3d969a6cd57e814b96140', version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { key: '1f0550ed5a7826c7f7ef36ed34f45b3da4f4e80d', xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
34
+ return (h(Host, { key: '0ab55b86ccb41c3be1c1a114c35c81d8488e12cc' }, h("svg", { key: 'c787e2ff356af580215cef7c05225ef5ac716d21', version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { key: '71c4f67a6d50cd2112fcef7cbac7b506d662911e', xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
35
35
  }
36
36
  static get is() { return "cura-icon"; }
37
37
  static get encapsulation() { return "shadow"; }
@@ -14,9 +14,9 @@ export class CuraIconsView {
14
14
  this.sizes.unshift(this.sizes.pop());
15
15
  }
16
16
  render() {
17
- return (h(Host, { key: '578795eda26d68314425907d7d4b0716eae31677' }, h("div", { key: '1cabf7e4ad314bbcb93d86c4ad22e5d8d69e2f81', class: "iconDetail" }, h("cura-heading", { key: '154ada215d4a13b674870c7b3ac85cb2b2c96873', size: "small", "margin-block": "0 24px" }, "Icon: ", h("b", { key: '84b323f4f81831142ccb51109a2bcbbe8748c8e9' }, this.selected)), h("div", { key: '71ee5a42938cc43014e4b306460ab03ed03a8d2d', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
18
- h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { key: 'f0ce668720e9897ea8abcd4c105fed555d0537dc', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
19
- h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size))))), h("div", { key: '2c2a0f8f18eff3da6b4379e9549683f4daf2755d', class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !microIcons.includes(icon) ? '' :
17
+ return (h(Host, { key: '8852f24d59f30c812ac2e05be38bba10bccb1fd8' }, h("div", { key: '6b88398ca80b05a62681d7b6834d5d0f59d790fa', class: "iconDetail" }, h("cura-heading", { key: '5b3cab1aa26adc1b1b09dc3f3f5c0bd2ac394f89', size: "small", "margin-block": "0 24px" }, "Icon: ", h("b", { key: 'eb974ce78dd33e56cd2c6118c6c399f029660547' }, this.selected)), h("div", { key: '46d600bbf0903861f5c982b0e73c4757447d0324', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
18
+ h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { key: '973355e41f1a10405c8224461625215aedabe0e3', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
19
+ h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size))))), h("div", { key: 'acd2b60eb99238893fc97aa177e96f43a3c54bd1', class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !microIcons.includes(icon) ? '' :
20
20
  h("cura-paragraph", { color: 'success-dark', size: "xsmall", "margin-block": "0px", "line-height": '100%' }, "MICRO"))))));
21
21
  }
22
22
  static get is() { return "cura-icons-view"; }
@@ -0,0 +1,211 @@
1
+ /**
2
+ * Global Spacing Definitions.
3
+ * Required CSS Properties:
4
+ * --base-spacing
5
+ */
6
+ /* None: 0px */
7
+ /* Tiny default: 4px */
8
+ /* Mini default: 8px */
9
+ /* XXXS default: 12px */
10
+ /* XXS default: 16px */
11
+ /* XS default: 20px */
12
+ /* S default: 20px */
13
+ /* M default: 32px */
14
+ /* L default: 40px */
15
+ /* XL default: 48px */
16
+ /* XXL default: 64px */
17
+ /* XXXL default: 72px */
18
+ /* Huge default: 96px */
19
+ /**
20
+ * Global Shadow Level Definitions.
21
+ * Required CSS Properties with respective opacities:
22
+ * --neutral-black,
23
+ * --neutral-purewhite,
24
+ * --accent-base
25
+ * --primary-base
26
+ */
27
+ /**
28
+ * Shadow Level base definitions.
29
+ * Required CSS Properties: --neutral-purewhite opacity: 0.2
30
+ * Use: @include shadow-level1(){ ... }
31
+ */
32
+ /**
33
+ * Shadow Level base definitions.
34
+ * Required CSS Properties: --neutral-black opacity: 0.16
35
+ * Use: @include shadow-level2(--neutral-black-shadow){ ... }
36
+ */
37
+ /**
38
+ * Shadow Level base definitions.
39
+ * Required CSS Properties: --neutral-black opacity: 0.16
40
+ * Use: @include shadow-level3(--neutral-black-shadow){ ... }
41
+ */
42
+ /**
43
+ * Shadow Level base definitions.
44
+ * Required CSS Properties: --neutral-black opacity: 0.12
45
+ * Use: @include shadow-level4(){ ... }
46
+ */
47
+ /**
48
+ * Shadow Level base definitions.
49
+ * Required CSS Properties: --neutral-black opacity: 0.8
50
+ * Use: @include shadow-level5(){ ... }
51
+ */
52
+ /**
53
+ * Shadow Level base definitions.
54
+ * Required CSS Properties: --accent-base opacity: 0.2
55
+ * Use: @include shadow-level5-accent(){ ... }
56
+ */
57
+ /**
58
+ * Shadow Level base definitions.
59
+ * Required CSS Properties: --primary-base opacity: 0.16
60
+ * Use: @include shadow-level3-primary(){ ... }
61
+ */
62
+ /* Breakpoints variables */
63
+ /**
64
+ * Responsive media for mobile (small) only.
65
+ * Use: @include mobile-only() { ... }
66
+ */
67
+ /**
68
+ * Responsive media for medium only.
69
+ * Use: @include medium-only() { ... }
70
+ */
71
+ /**
72
+ * Responsive media for large only.
73
+ * Use: @include large-only() { ... }
74
+ */
75
+ /**
76
+ * Responsive media for xlarge only.
77
+ * Use: @include xlarge-only() { ... }
78
+ */
79
+ /**
80
+ * Responsive media for medium to large.
81
+ * Use: @include medium-large() { ... }
82
+ */
83
+ /**
84
+ * Responsive media for large and up.
85
+ * Use: @include large-up() { ... }
86
+ */
87
+ :host {
88
+ display: block;
89
+ }
90
+
91
+ .modal {
92
+ position: fixed;
93
+ height: 100%;
94
+ width: 100%;
95
+ top: 0px;
96
+ bottom: 0px;
97
+ z-index: -1;
98
+ margin-top: var(--offset-top);
99
+ }
100
+ .modal.open {
101
+ z-index: 100;
102
+ }
103
+ .modal.open .backdrop,
104
+ .modal.open .wrapper {
105
+ opacity: 1;
106
+ visibility: visible;
107
+ animation: fadeIn 0.3s ease-out;
108
+ }
109
+
110
+ .container {
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ }
115
+
116
+ .backdrop,
117
+ .wrapper {
118
+ opacity: 0;
119
+ visibility: hidden;
120
+ transition: opacity 0.3s ease, visibility 0.3s ease;
121
+ }
122
+
123
+ .backdrop {
124
+ background-color: var(--background-color);
125
+ z-index: 90;
126
+ animation: fadeIn 0.3s ease-out;
127
+ }
128
+
129
+ .wrapper {
130
+ position: fixed;
131
+ background-color: var(--neutral-white);
132
+ border: 2px solid var(--neutral-light);
133
+ border-radius: calc(var(--base-spacing) * 3px);
134
+ width: 700px;
135
+ max-width: 600px;
136
+ min-width: 200px;
137
+ padding: 0px calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px) calc(var(--base-spacing) * 4px);
138
+ z-index: 100;
139
+ box-shadow: 0px 8px 16px 0px var(--neutral-black-shadow-4, rgba(38, 38, 38, 0.12));
140
+ transform: scale(0.95);
141
+ transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;
142
+ }
143
+ .wrapper ::slotted(*) {
144
+ max-height: 80vh;
145
+ overflow: auto;
146
+ padding-right: calc(var(--base-spacing) * 5px);
147
+ }
148
+
149
+ .modal.open .wrapper {
150
+ transform: scale(1);
151
+ opacity: 1;
152
+ visibility: visible;
153
+ }
154
+
155
+ .close {
156
+ justify-self: flex-end;
157
+ padding-top: calc(var(--base-spacing) * 4px);
158
+ background: none;
159
+ border: none;
160
+ cursor: pointer;
161
+ }
162
+ .close.mobile {
163
+ display: none;
164
+ }
165
+ .close.desktop {
166
+ display: flex;
167
+ }
168
+
169
+ @media (max-width: 768px) {
170
+ .wrapper {
171
+ position: fixed;
172
+ bottom: 0px;
173
+ width: 80%;
174
+ padding-top: calc(var(--base-spacing) * 4px);
175
+ padding-bottom: 0px;
176
+ border-radius: calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px) 0px 0px;
177
+ border-bottom: none;
178
+ }
179
+
180
+ .close {
181
+ align-items: center;
182
+ border-top: 1px dashed var(--neutral-light);
183
+ margin-top: calc(var(--base-spacing) * 4px);
184
+ padding: calc(var(--base-spacing) * 4px) 0px;
185
+ justify-content: center;
186
+ width: 100%;
187
+ }
188
+ .close.mobile {
189
+ display: flex;
190
+ gap: calc(var(--base-spacing) * 2px);
191
+ }
192
+ .close.desktop {
193
+ display: none;
194
+ }
195
+ }
196
+ @keyframes fadeIn {
197
+ from {
198
+ opacity: 0;
199
+ }
200
+ to {
201
+ opacity: 1;
202
+ }
203
+ }
204
+ @keyframes fadeOut {
205
+ from {
206
+ opacity: 1;
207
+ }
208
+ to {
209
+ opacity: 0;
210
+ }
211
+ }
@@ -0,0 +1,134 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class CuraModal {
3
+ constructor() {
4
+ this.handleClose = () => {
5
+ this.modalClose.emit();
6
+ this.open = false;
7
+ };
8
+ this.open = false;
9
+ this.background = 'light';
10
+ this.topOffset = 0;
11
+ this.styles = {};
12
+ }
13
+ setColors() {
14
+ const backgroundTheme = {
15
+ dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),
16
+ light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),
17
+ };
18
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': backgroundTheme[this.background] });
19
+ }
20
+ setOffsetTop() {
21
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--offset-top': `${this.topOffset}px` });
22
+ }
23
+ connectedCallback() {
24
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-white': window.CuraAPI.theme.colors.getColor('neutral-white'), '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
25
+ this.setColors();
26
+ this.setOffsetTop();
27
+ }
28
+ render() {
29
+ return (h(Host, { key: '002525d3ad03f3271b11b0dacfd748ccfbfbaf1c', role: "dialog", "aria-modal": "true" }, h("div", { key: 'a684163919124acc33469b38cffeb6826dd2dd8d', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: 'bff07303351e5f7a75870b9c0f2b4a16736110bc', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: '4e8ac2fd00c10abf24060c644bbdcd6a5275bacb', class: "wrapper" }, h("button", { key: '6a0ab79a39181216882559f115107edf1c20a2c7', class: "close desktop", onClick: this.handleClose }, h("cura-icon", { key: '3be3e5ee04fc5caa8786efaac0e03c946d0bdd14', name: "close", color: "error-dark", size: "small" })), h("slot", { key: '90fbd8951a449d41e2409ba10445a61e296c45e5' }), h("button", { key: '3075523254d90f7f7f4ca75f28a5724b2402f7d5', class: "close mobile", onClick: this.handleClose }, h("cura-icon", { key: '9bfd171b87d0f1ff625b17f043ff90fa9dbad6e7', name: "close", color: "error-dark", size: "16" }), h("cura-paragraph", { key: 'c17191a5570c08400cfb1409fa1ebf3f0e03a270', color: "error-dark", size: "small", marginBlock: "0" }, "Fechar"))))));
30
+ }
31
+ static get is() { return "cura-modal"; }
32
+ static get encapsulation() { return "shadow"; }
33
+ static get originalStyleUrls() {
34
+ return {
35
+ "$": ["cura-modal.scss"]
36
+ };
37
+ }
38
+ static get styleUrls() {
39
+ return {
40
+ "$": ["cura-modal.css"]
41
+ };
42
+ }
43
+ static get properties() {
44
+ return {
45
+ "open": {
46
+ "type": "boolean",
47
+ "mutable": true,
48
+ "complexType": {
49
+ "original": "boolean",
50
+ "resolved": "boolean",
51
+ "references": {}
52
+ },
53
+ "required": false,
54
+ "optional": true,
55
+ "docs": {
56
+ "tags": [],
57
+ "text": "Property open to control modal visibility.\nDefault: false"
58
+ },
59
+ "attribute": "open",
60
+ "reflect": true,
61
+ "defaultValue": "false"
62
+ },
63
+ "background": {
64
+ "type": "string",
65
+ "mutable": false,
66
+ "complexType": {
67
+ "original": "'dark' | 'light'",
68
+ "resolved": "\"dark\" | \"light\"",
69
+ "references": {}
70
+ },
71
+ "required": false,
72
+ "optional": true,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": "Property background to control modal backdrop color.\nDefault: light"
76
+ },
77
+ "attribute": "background",
78
+ "reflect": false,
79
+ "defaultValue": "'light'"
80
+ },
81
+ "topOffset": {
82
+ "type": "number",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "number",
86
+ "resolved": "number",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": true,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "Property offsetTop to control modal top position.\nDefault: 0px"
94
+ },
95
+ "attribute": "top-offset",
96
+ "reflect": false,
97
+ "defaultValue": "0"
98
+ }
99
+ };
100
+ }
101
+ static get states() {
102
+ return {
103
+ "styles": {}
104
+ };
105
+ }
106
+ static get events() {
107
+ return [{
108
+ "method": "modalClose",
109
+ "name": "modalClose",
110
+ "bubbles": true,
111
+ "cancelable": true,
112
+ "composed": true,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Event close to handle modal close."
116
+ },
117
+ "complexType": {
118
+ "original": "void",
119
+ "resolved": "void",
120
+ "references": {}
121
+ }
122
+ }];
123
+ }
124
+ static get watchers() {
125
+ return [{
126
+ "propName": "background",
127
+ "methodName": "setColors"
128
+ }, {
129
+ "propName": "topOffset",
130
+ "methodName": "setOffsetTop"
131
+ }];
132
+ }
133
+ }
134
+ //# sourceMappingURL=cura-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-modal.js","sourceRoot":"","sources":["../../../src/components/cura-modal/cura-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAO5F,MAAM,OAAO,SAAS;;QAuDZ,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;oBArDuD,KAAK;0BAKtB,OAAO;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CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,GAAQ;gBACnG,4DAAK,KAAK,EAAC,SAAS;oBAElB,+DAAQ,KAAK,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW;wBACrD,kEAAW,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,GAAa,CAC7D;oBACT,8DAAa;oBAEb,+DAAQ,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW;wBACpD,kEAAW,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,IAAI,GAAa;wBACjE,uEAAgB,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,GAAG,aAE9C,CACV,CACL,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property offsetTop to control modal top position.\n * Default: 0px\n */\n @Prop() topOffset?: number = 0;\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n @Watch('topOffset')\n setOffsetTop() {\n this.styles = {\n ...this.styles,\n '--offset-top': `${this.topOffset}px`,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-white': window.CuraAPI.theme.colors.getColor('neutral-white'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setOffsetTop();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\">\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <button class=\"close desktop\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"small\"></cura-icon>\n </button>\n <slot></slot>\n {/* Mobile button */}\n <button class=\"close mobile\" onClick={this.handleClose}>\n <cura-icon name=\"close\" color=\"error-dark\" size=\"16\"></cura-icon>\n <cura-paragraph color=\"error-dark\" size=\"small\" marginBlock=\"0\">\n Fechar\n </cura-paragraph>\n </button>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,85 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s)
4
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ const renderCuraModal = (args) => `
14
+ <div style="height: 500px">
15
+ <cura-modal open="${args.open}" background="${args.background}" top-offset="${args.topOffset}">${args.content}</cura-modal>
16
+ </div>
17
+ `;
18
+ export default {
19
+ title: 'Componentes/Feedback/Modal',
20
+ tags: ['autodocs'],
21
+ render: (_a) => {
22
+ var args = __rest(_a, []);
23
+ return renderCuraModal(args);
24
+ },
25
+ argTypes: {
26
+ open: {
27
+ control: 'boolean',
28
+ description: 'Define se o modal está aberto ou fechado',
29
+ table: {
30
+ category: 'Properties',
31
+ defaultValue: { summary: false },
32
+ },
33
+ },
34
+ background: {
35
+ control: { type: 'select' },
36
+ options: ['dark', 'light'],
37
+ description: 'Define a cor do background do modal.',
38
+ table: {
39
+ category: 'Properties',
40
+ defaultValue: { summary: 'light' },
41
+ },
42
+ },
43
+ topOffset: {
44
+ control: { type: 'number' },
45
+ description: 'Define o deslocamento superior do modal.',
46
+ table: {
47
+ category: 'Properties',
48
+ defaultValue: { summary: '0px' },
49
+ },
50
+ },
51
+ content: {
52
+ control: { type: 'text' },
53
+ description: 'Conteúdo do modal a ser exibido.',
54
+ table: {
55
+ category: 'Properties',
56
+ },
57
+ },
58
+ close: {
59
+ action: 'close',
60
+ description: 'Evento customizado (via listener) disparado quando o componente é fechado.',
61
+ name: 'modalClose',
62
+ table: {
63
+ category: 'Events',
64
+ },
65
+ },
66
+ },
67
+ };
68
+ export const CuraModal = {
69
+ args: {
70
+ background: 'light',
71
+ open: true,
72
+ content: `<div style="display:flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ align-self: stretch;
76
+ background-color:rgba(187, 107, 217, 0.4);
77
+ text-align: center;
78
+ height: 30px;
79
+ color: #9b51e0;">
80
+ content area
81
+ </div>`,
82
+ topOffset: 0,
83
+ },
84
+ };
85
+ //# sourceMappingURL=cura-modal.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-modal.stories.js","sourceRoot":"","sources":["../../../src/components/cura-modal/cura-modal.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,eAAe,G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AAE;gBACL,QAAQ,EAAE,QAAQ;aACnB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE;QACJ,UAAU,EAAE,OAAO;QACnB,IAAI,EAAE,IAAI;QACV,OAAO,EAAE;;;;;;;;;SASJ;QACL,SAAS,EAAE,CAAC;KACb;CACF,CAAC","sourcesContent":["const renderCuraModal = (args: any) => `\n <div style=\"height: 500px\">\n <cura-modal open=\"${args.open}\" background=\"${args.background}\" top-offset=\"${args.topOffset}\">${args.content}</cura-modal>\n </div>\n`;\n\nexport default {\n title: 'Componentes/Feedback/Modal',\n tags: ['autodocs'],\n render: ({ ...args }) => {\n return renderCuraModal(args);\n },\n argTypes: {\n open: {\n control: 'boolean',\n description: 'Define se o modal está aberto ou fechado',\n table: {\n category: 'Properties',\n defaultValue: { summary: false },\n },\n },\n background: {\n control: { type: 'select' },\n options: ['dark', 'light'],\n description: 'Define a cor do background do modal.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'light' },\n },\n },\n topOffset: {\n control: { type: 'number' },\n description: 'Define o deslocamento superior do modal.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '0px' },\n },\n },\n content: {\n control: { type: 'text' },\n description: 'Conteúdo do modal a ser exibido.',\n table: {\n category: 'Properties',\n },\n },\n close: {\n action: 'close',\n description: 'Evento customizado (via listener) disparado quando o componente é fechado.',\n name: 'modalClose',\n table: {\n category: 'Events',\n },\n },\n },\n};\n\nexport const CuraModal = {\n args: {\n background: 'light',\n open: true,\n content: `<div style=\"display:flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n background-color:rgba(187, 107, 217, 0.4);\n text-align: center;\n height: 30px;\n color: #9b51e0;\">\n content area\n </div>`,\n topOffset: 0,\n },\n};\n"]}