@rededor/cura 1.4.0-alpha.1 → 1.4.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 (257) hide show
  1. package/dist/cjs/cura-accordion_12.cjs.entry.js +12 -16
  2. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  3. package/dist/cjs/cura-alert.cjs.entry.js +1 -1
  4. package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/cura-badge-counter.cjs.entry.js +63 -0
  6. package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -0
  7. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-pill.cjs.entry.js +83 -0
  9. package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -0
  10. package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
  11. package/dist/cjs/cura-button-select.cjs.entry.js +2 -11
  12. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
  14. package/dist/cjs/cura-calendar.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  16. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  17. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
  20. package/dist/cjs/cura-dropdown-search.cjs.entry.js +2 -2
  21. package/dist/cjs/{cura-icon.definitions-8d714f6a.js → cura-icon.definitions-5223028b.js} +2 -4
  22. package/dist/cjs/cura-icon.definitions-5223028b.js.map +1 -0
  23. package/dist/cjs/cura-icons-view.cjs.entry.js +2 -5
  24. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
  25. package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
  26. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/cura-modal.cjs.entry.js +28 -7
  28. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
  29. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  30. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  31. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  32. package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
  33. package/dist/cjs/cura.cjs.js +1 -1
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/collection/collection-manifest.json +2 -1
  36. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.css +51 -0
  37. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +149 -0
  38. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -0
  39. package/dist/collection/components/badges/{cura-badge-number/cura-badge-number.stories.js → cura-badge-counter/cura-badge-counter.stories.js} +33 -13
  40. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.stories.js.map +1 -0
  41. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
  42. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.css +73 -0
  43. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +219 -0
  44. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -0
  45. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js +126 -0
  46. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js.map +1 -0
  47. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  48. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  49. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +5 -14
  50. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  51. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  52. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  53. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  54. package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
  55. package/dist/collection/components/cura-card/cura-card.js +1 -1
  56. package/dist/collection/components/cura-icon/cura-icon.definitions.js +1 -2
  57. package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -1
  58. package/dist/collection/components/cura-icon/cura-icon.js +2 -6
  59. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
  60. package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -3
  61. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  62. package/dist/collection/components/cura-icons-view/cura-icons-view.js +2 -5
  63. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
  64. package/dist/collection/components/cura-modal/cura-modal.css +4 -2
  65. package/dist/collection/components/cura-modal/cura-modal.js +91 -10
  66. package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
  67. package/dist/collection/components/cura-modal/cura-modal.stories.js +54 -18
  68. package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -1
  69. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  70. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  71. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  72. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  73. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  74. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  75. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +2 -2
  76. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  77. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  78. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  79. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  80. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  81. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  82. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  83. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  84. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  85. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  86. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  87. package/dist/collection/utils/utils.js +1 -0
  88. package/dist/collection/utils/utils.js.map +1 -1
  89. package/dist/components/cura-alert.js +1 -1
  90. package/dist/components/cura-avatar.js +1 -1
  91. package/dist/components/cura-badge-counter.d.ts +11 -0
  92. package/dist/components/cura-badge-counter.js +8 -0
  93. package/dist/components/cura-badge-counter.js.map +1 -0
  94. package/dist/components/cura-badge-counter2.js +90 -0
  95. package/dist/components/cura-badge-counter2.js.map +1 -0
  96. package/dist/components/cura-badge-distance.js +1 -1
  97. package/dist/components/{cura-badge-number.d.ts → cura-badge-pill.d.ts} +4 -4
  98. package/dist/components/cura-badge-pill.js +120 -0
  99. package/dist/components/cura-badge-pill.js.map +1 -0
  100. package/dist/components/cura-button-outline.js +1 -1
  101. package/dist/components/cura-button-select.js +6 -15
  102. package/dist/components/cura-button-select.js.map +1 -1
  103. package/dist/components/cura-button-transparent2.js +1 -1
  104. package/dist/components/cura-button.js +1 -1
  105. package/dist/components/cura-calendar2.js +1 -1
  106. package/dist/components/cura-card.js +1 -1
  107. package/dist/components/cura-checkbox.js +1 -1
  108. package/dist/components/cura-display.js +1 -1
  109. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  110. package/dist/components/cura-dropdown-search-option.js +2 -2
  111. package/dist/components/cura-dropdown-search.js +2 -2
  112. package/dist/components/cura-heading2.js +1 -1
  113. package/dist/components/cura-icon2.js +3 -8
  114. package/dist/components/cura-icon2.js.map +1 -1
  115. package/dist/components/cura-icons-view.js +7 -16
  116. package/dist/components/cura-icons-view.js.map +1 -1
  117. package/dist/components/cura-input-date.js +1 -1
  118. package/dist/components/cura-label2.js +1 -1
  119. package/dist/components/cura-loader-bar2.js +1 -1
  120. package/dist/components/cura-loader-circle2.js +1 -1
  121. package/dist/components/cura-modal.js +36 -9
  122. package/dist/components/cura-modal.js.map +1 -1
  123. package/dist/components/cura-page-template.js +1 -1
  124. package/dist/components/cura-paragraph2.js +1 -1
  125. package/dist/components/cura-radio.js +1 -1
  126. package/dist/components/cura-select-option2.js +1 -1
  127. package/dist/components/cura-select2.js +3 -3
  128. package/dist/components/cura-switch.js +1 -1
  129. package/dist/components/cura-toast.js +1 -1
  130. package/dist/components/cura-tooltip.js +1 -1
  131. package/dist/components/index.js +4 -2
  132. package/dist/components/index.js.map +1 -1
  133. package/dist/cura/cura.esm.js +1 -1
  134. package/dist/cura/cura.esm.js.map +1 -1
  135. package/dist/cura/{p-01e301d4.entry.js → p-116a1cd6.entry.js} +2 -2
  136. package/dist/cura/{p-5bb8302c.entry.js → p-19f28fa8.entry.js} +2 -2
  137. package/dist/cura/p-19f28fa8.entry.js.map +1 -0
  138. package/dist/cura/{p-eda28278.entry.js → p-2545cfc7.entry.js} +2 -2
  139. package/dist/cura/{p-deadde8d.entry.js → p-35920ac0.entry.js} +2 -2
  140. package/dist/cura/{p-eea093b2.entry.js → p-36dbec98.entry.js} +2 -2
  141. package/dist/cura/{p-ed839f1e.entry.js → p-3d958d45.entry.js} +2 -2
  142. package/dist/cura/{p-3536c96b.entry.js → p-3e4ca7e7.entry.js} +2 -2
  143. package/dist/cura/{p-e5b0dd74.entry.js → p-3eca0f0c.entry.js} +2 -2
  144. package/dist/cura/{p-1f53580a.entry.js → p-42258230.entry.js} +2 -2
  145. package/dist/cura/p-48f9289b.js +2 -0
  146. package/dist/cura/p-48f9289b.js.map +1 -0
  147. package/dist/cura/{p-dbd9eab3.entry.js → p-4b496c51.entry.js} +2 -2
  148. package/dist/cura/p-52f854e0.entry.js +2 -0
  149. package/dist/cura/p-52f854e0.entry.js.map +1 -0
  150. package/dist/cura/{p-81c66f2b.entry.js → p-576c65b4.entry.js} +2 -2
  151. package/dist/cura/{p-bfb5e9e1.entry.js → p-6e4f4fbf.entry.js} +2 -2
  152. package/dist/cura/{p-0e28f1c8.entry.js → p-818c581f.entry.js} +2 -2
  153. package/dist/cura/{p-b0451cb3.entry.js → p-a91d451f.entry.js} +2 -2
  154. package/dist/cura/p-aa65cb50.entry.js +2 -0
  155. package/dist/cura/p-aa65cb50.entry.js.map +1 -0
  156. package/dist/cura/{p-075b02de.entry.js → p-b1a51e81.entry.js} +2 -2
  157. package/dist/cura/{p-f375a612.entry.js → p-bdb1a0c5.entry.js} +2 -2
  158. package/dist/cura/p-c4da4c44.entry.js +2 -0
  159. package/dist/cura/p-c4da4c44.entry.js.map +1 -0
  160. package/dist/cura/{p-a7ecea4a.entry.js → p-dcd2e5bb.entry.js} +2 -2
  161. package/dist/cura/{p-7853ab16.entry.js → p-e1a41792.entry.js} +2 -2
  162. package/dist/cura/p-ef593f12.entry.js +2 -0
  163. package/dist/cura/p-ef593f12.entry.js.map +1 -0
  164. package/dist/cura/p-f23c4ed8.entry.js +2 -0
  165. package/dist/cura/p-f23c4ed8.entry.js.map +1 -0
  166. package/dist/cura/p-f5d45776.entry.js +2 -0
  167. package/dist/esm/cura-accordion_12.entry.js +12 -16
  168. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  169. package/dist/esm/cura-alert.entry.js +1 -1
  170. package/dist/esm/cura-avatar.entry.js +1 -1
  171. package/dist/esm/cura-badge-counter.entry.js +59 -0
  172. package/dist/esm/cura-badge-counter.entry.js.map +1 -0
  173. package/dist/esm/cura-badge-distance.entry.js +1 -1
  174. package/dist/esm/cura-badge-pill.entry.js +79 -0
  175. package/dist/esm/cura-badge-pill.entry.js.map +1 -0
  176. package/dist/esm/cura-button-outline.entry.js +1 -1
  177. package/dist/esm/cura-button-select.entry.js +2 -11
  178. package/dist/esm/cura-button-select.entry.js.map +1 -1
  179. package/dist/esm/cura-button-transparent.entry.js +1 -1
  180. package/dist/esm/cura-calendar.entry.js +1 -1
  181. package/dist/esm/cura-card.entry.js +1 -1
  182. package/dist/esm/cura-checkbox.entry.js +1 -1
  183. package/dist/esm/cura-display.entry.js +1 -1
  184. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  185. package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
  186. package/dist/esm/cura-dropdown-search.entry.js +2 -2
  187. package/dist/esm/cura-icon.definitions-a892c0e2.js +17 -0
  188. package/dist/esm/cura-icon.definitions-a892c0e2.js.map +1 -0
  189. package/dist/esm/cura-icons-view.entry.js +2 -5
  190. package/dist/esm/cura-icons-view.entry.js.map +1 -1
  191. package/dist/esm/cura-input-date.entry.js +1 -1
  192. package/dist/esm/cura-loader-bar.entry.js +1 -1
  193. package/dist/esm/cura-modal.entry.js +28 -7
  194. package/dist/esm/cura-modal.entry.js.map +1 -1
  195. package/dist/esm/cura-radio.entry.js +1 -1
  196. package/dist/esm/cura-switch.entry.js +1 -1
  197. package/dist/esm/cura-toast.entry.js +1 -1
  198. package/dist/esm/cura-tooltip.entry.js +1 -1
  199. package/dist/esm/cura.js +1 -1
  200. package/dist/esm/loader.js +1 -1
  201. package/dist/types/components/badges/cura-badge-counter/cura-badge-counter.d.ts +30 -0
  202. package/dist/types/components/badges/{cura-badge-number/cura-badge-number.stories.d.ts → cura-badge-counter/cura-badge-counter.stories.d.ts} +26 -1
  203. package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.d.ts +44 -0
  204. package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.stories.d.ts +119 -0
  205. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +1 -2
  206. package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +0 -1
  207. package/dist/types/components/cura-modal/cura-modal.d.ts +22 -3
  208. package/dist/types/components/cura-modal/cura-modal.stories.d.ts +42 -3
  209. package/dist/types/components.d.ts +140 -19
  210. package/dist/types/utils/utils.d.ts +1 -0
  211. package/package.json +2 -2
  212. package/dist/cjs/cura-badge-number.cjs.entry.js +0 -29
  213. package/dist/cjs/cura-badge-number.cjs.entry.js.map +0 -1
  214. package/dist/cjs/cura-icon.definitions-8d714f6a.js.map +0 -1
  215. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -28
  216. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +0 -66
  217. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +0 -1
  218. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +0 -1
  219. package/dist/components/cura-badge-number.js +0 -8
  220. package/dist/components/cura-badge-number.js.map +0 -1
  221. package/dist/components/cura-badge-number2.js +0 -49
  222. package/dist/components/cura-badge-number2.js.map +0 -1
  223. package/dist/cura/p-0308cf6b.entry.js +0 -2
  224. package/dist/cura/p-0308cf6b.entry.js.map +0 -1
  225. package/dist/cura/p-5bb8302c.entry.js.map +0 -1
  226. package/dist/cura/p-71a2dcef.entry.js +0 -2
  227. package/dist/cura/p-71a2dcef.entry.js.map +0 -1
  228. package/dist/cura/p-9a7e3f48.entry.js +0 -2
  229. package/dist/cura/p-9a7e3f48.entry.js.map +0 -1
  230. package/dist/cura/p-a7221f0c.js +0 -2
  231. package/dist/cura/p-a7221f0c.js.map +0 -1
  232. package/dist/cura/p-d635501a.entry.js +0 -2
  233. package/dist/cura/p-d635501a.entry.js.map +0 -1
  234. package/dist/cura/p-ebed83d1.entry.js +0 -2
  235. package/dist/esm/cura-badge-number.entry.js +0 -25
  236. package/dist/esm/cura-badge-number.entry.js.map +0 -1
  237. package/dist/esm/cura-icon.definitions-aaa4e80f.js +0 -18
  238. package/dist/esm/cura-icon.definitions-aaa4e80f.js.map +0 -1
  239. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +0 -8
  240. /package/dist/cura/{p-01e301d4.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  241. /package/dist/cura/{p-eda28278.entry.js.map → p-2545cfc7.entry.js.map} +0 -0
  242. /package/dist/cura/{p-deadde8d.entry.js.map → p-35920ac0.entry.js.map} +0 -0
  243. /package/dist/cura/{p-eea093b2.entry.js.map → p-36dbec98.entry.js.map} +0 -0
  244. /package/dist/cura/{p-ed839f1e.entry.js.map → p-3d958d45.entry.js.map} +0 -0
  245. /package/dist/cura/{p-3536c96b.entry.js.map → p-3e4ca7e7.entry.js.map} +0 -0
  246. /package/dist/cura/{p-e5b0dd74.entry.js.map → p-3eca0f0c.entry.js.map} +0 -0
  247. /package/dist/cura/{p-1f53580a.entry.js.map → p-42258230.entry.js.map} +0 -0
  248. /package/dist/cura/{p-dbd9eab3.entry.js.map → p-4b496c51.entry.js.map} +0 -0
  249. /package/dist/cura/{p-81c66f2b.entry.js.map → p-576c65b4.entry.js.map} +0 -0
  250. /package/dist/cura/{p-bfb5e9e1.entry.js.map → p-6e4f4fbf.entry.js.map} +0 -0
  251. /package/dist/cura/{p-0e28f1c8.entry.js.map → p-818c581f.entry.js.map} +0 -0
  252. /package/dist/cura/{p-b0451cb3.entry.js.map → p-a91d451f.entry.js.map} +0 -0
  253. /package/dist/cura/{p-075b02de.entry.js.map → p-b1a51e81.entry.js.map} +0 -0
  254. /package/dist/cura/{p-f375a612.entry.js.map → p-bdb1a0c5.entry.js.map} +0 -0
  255. /package/dist/cura/{p-a7ecea4a.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  256. /package/dist/cura/{p-7853ab16.entry.js.map → p-e1a41792.entry.js.map} +0 -0
  257. /package/dist/cura/{p-ebed83d1.entry.js.map → p-f5d45776.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"cura-button-select.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CA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,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI;oBACvC,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAC7E,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\nexport class CuraButtonSelect {\n @Element() host: HTMLElement;\n\n @Prop({ reflect: true, mutable: true }) selected = false;\n @Prop({ reflect: true, mutable: true }) iconName: string;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n @Prop({ reflect: true, mutable: true }) counter: string | number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light' = 'light';\n @Prop() color: string = 'primary';\n @Prop({ reflect: true }) iconPosition: 'left' | 'right';\n\n @State() hovered = false;\n @State() styles = {};\n\n @Event({ eventName: 'onclick' }) onclick: EventEmitter<{ selected: boolean }>;\n\n theme = window.CuraAPI.theme;\n\n weights;\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },\n { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },\n { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },\n { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },\n { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },\n { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },\n { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },\n { name: '--color-border-disable-unselect', thema: 'neutral-dark' },\n { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },\n { name: '--color-counter', thema: !this.disabled && 'primary-lighter' },\n ];\n\n colors.forEach(color => (this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema)));\n this.styles = { ...this.styles };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.setColors();\n }\n\n getLabelFontColor() {\n if (this.disabled) return 'neutral-dark';\n\n if (this.background === 'dark') {\n return this.selected ? 'neutral-black' : 'neutral-white';\n }\n if (this.background === 'light') {\n return this.selected ? 'neutral-white' : 'neutral-black';\n }\n }\n\n getColorCounter() {\n if (this.background === 'dark' && this.disabled) {\n return !this.selected ? 'neutral-black' : 'neutral-dark';\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-pale';\n }\n return `${this.color}-lighter`;\n }\n\n getColorBagdeNumber() {\n if (this.background === 'dark' && this.disabled) {\n return this.selected ? 'neutral-black' : 'neutral-dark';\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-medium';\n }\n\n return `${this.color}-darker`;\n }\n\n getIcon() {\n const iconSize = this.size === 'large' ? 20 : 16;\n if (this.iconPosition === 'right') {\n return;\n }\n\n return <cura-icon name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-number color={this.getColorCounter()} class=\"badge-number\">\n <cura-label color={this.getColorBagdeNumber()} size=\"small\">\n {this.counter}\n </cura-label>\n </cura-badge-number>\n );\n }\n\n getCheckIconRight() {\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name=\"check\" size={iconSize} color={this.getLabelFontColor()}></cura-icon>;\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n return (\n <Host>\n <button\n class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={e => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n <div class=\"button-container\">\n {this.iconName ? this.getIcon() : null}\n <cura-label class=\"label\" size={labelSize} lineHeight=\"0%\" color={this.getLabelFontColor()} weight=\"regular\">\n <slot></slot>\n </cura-label>\n {this.counter ? this.getCounter() : null}\n {this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null}\n </div>\n </button>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-button-select.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\nexport class CuraButtonSelect {\n @Element() host: HTMLElement;\n\n @Prop({ reflect: true, mutable: true }) selected = false;\n @Prop({ reflect: true, mutable: true }) iconName: string;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n @Prop({ reflect: true, mutable: true }) counter: number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light' = 'light';\n @Prop() color: string = 'primary';\n @Prop({ reflect: true }) iconPosition: 'left' | 'right';\n\n @State() hovered = false;\n @State() styles = {};\n\n @Event({ eventName: 'onclick' }) onclick: EventEmitter<{ selected: boolean }>;\n\n theme = window.CuraAPI.theme;\n\n weights;\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },\n { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },\n { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },\n { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },\n { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },\n { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },\n { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },\n { name: '--color-border-disable-unselect', thema: 'neutral-dark' },\n { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },\n { name: '--color-counter', thema: !this.disabled && 'primary-lighter' },\n ];\n\n colors.forEach(color => (this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema)));\n this.styles = { ...this.styles };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.setColors();\n }\n\n getLabelFontColor() {\n if (this.disabled) return 'neutral-dark';\n\n if (this.background === 'dark') {\n return this.selected ? 'neutral-black' : 'neutral-white';\n }\n if (this.background === 'light') {\n return this.selected ? 'neutral-white' : 'neutral-black';\n }\n }\n\n getColorBagdeNumber() {\n if (this.background === 'dark' && this.disabled) {\n return this.selected ? 'neutral-black' : 'neutral-dark';\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-medium';\n }\n\n return `${this.color}-darker`;\n }\n\n getIcon() {\n const iconSize = this.size === 'large' ? 20 : 16;\n if (this.iconPosition === 'right') {\n return;\n }\n\n return <cura-icon name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-counter\n number={this.counter}\n color={this.color}\n disabled={this.disabled || null}\n class=\"badge-number\">\n </cura-badge-counter>\n );\n }\n\n getCheckIconRight() {\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name=\"check\" size={iconSize} color={this.getLabelFontColor()}></cura-icon>;\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n return (\n <Host>\n <button\n class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={e => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n <div class=\"button-container\">\n {this.iconName ? this.getIcon() : null}\n <cura-label class=\"label\" size={labelSize} lineHeight=\"0%\" color={this.getLabelFontColor()} weight=\"regular\">\n <slot></slot>\n </cura-label>\n {this.counter ? this.getCounter() : null}\n {this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null}\n </div>\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -76,7 +76,7 @@ export class CuraButtonTransparent {
76
76
  render() {
77
77
  const symbolColor = this.getSymbolColor();
78
78
  const labelSize = labelSizes[this.size] || labelSizes["default"];
79
- return (h(Host, { key: '60ab1e67798d35b9bb391ad491e4a9e6f3bc123f' }, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor })))));
79
+ return (h(Host, { key: '5cdc491f0c3e80910e76c5bef2e26ce468ffda1f' }, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor })))));
80
80
  }
81
81
  static get is() { return "cura-button-transparent"; }
82
82
  static get encapsulation() { return "shadow"; }
@@ -44,7 +44,7 @@ export class CuraAlert {
44
44
  return this.icon ? this.icon : iconMapping[this.type];
45
45
  }
46
46
  render() {
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
+ return (h(Host, { key: 'c7d36a87c8ca4ea44a53d90edf5028e27d4ab631' }, h("div", { key: 'c54f199ba48a8a0e0549c5f046cf7dc128d8108e', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: 'f1607925bceeaf29a8bee7a021b1bf9e9be5b0e6', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '6ccb322b9594a0c963cf8fa873b4a66642d69357', class: "content" }, this.label ? (h("cura-label", { class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label)) : '', h("cura-paragraph", { key: 'e70495f19e2eac2b0c593d156436061aba50c295', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: '043f67d199324f668aced318a81e6ecdbd3ac97a' })), h("slot", { key: '83cc65b83514bdbc77a3676d2fab55ebb20aa5dc', name: "actions" })), this.closeable ?
48
48
  (h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
49
49
  : '')));
50
50
  }
@@ -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: '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() }))));
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() }))));
43
43
  }
44
44
  static get is() { return "cura-avatar"; }
45
45
  static get encapsulation() { return "shadow"; }
@@ -452,7 +452,7 @@ export class CuraCalendar {
452
452
  }
453
453
  render() {
454
454
  const { months } = this.fetchMonthNames();
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
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
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: '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)))));
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)))));
38
38
  }
39
39
  static get is() { return "cura-card"; }
40
40
  static get encapsulation() { return "shadow"; }
@@ -1,4 +1,3 @@
1
- export const microIcons = ['arrowDown', 'arrowLeft', 'arrowRight', 'arrowUp', 'check', 'checkDouble', 'close', 'closeCircle', 'collapse', 'down', 'expand', 'linkExternal', 'link', 'left', 'minus', 'minusCircle', 'minusSquare', 'order', 'subItem', 'right', 'plus', 'plusCircle', 'plusSquare', 'up', 'filter', 'swap'];
2
1
  export const iconSizes = {
3
2
  "128": { size: 128, stroke: 5.25 },
4
3
  "72": { size: 72, stroke: 3.5 },
@@ -9,7 +8,7 @@ export const iconSizes = {
9
8
  "24": { size: 24, stroke: 2 },
10
9
  "20": { size: 20, stroke: 1.75 },
11
10
  "16": { size: 16, stroke: 1.5 },
12
- "micro": { size: 12, stroke: 1.5 },
11
+ "micro": { size: 12, stroke: 1.25 },
13
12
  "default": { size: 24, stroke: 2 }
14
13
  };
15
14
  //# sourceMappingURL=cura-icon.definitions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-icon.definitions.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.definitions.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,WAAW,EAAC,WAAW,EAAC,YAAY,EAAC,SAAS,EAAC,OAAO,EAAC,aAAa,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,MAAM,EAAC,QAAQ,EAAC,cAAc,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,MAAM,EAAC,YAAY,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,CAAC,CAAC;AAEnS,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC;IAChC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;IAC3B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;IACjC,SAAS,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;CACjC,CAAC","sourcesContent":["export const microIcons = ['arrowDown','arrowLeft','arrowRight','arrowUp','check','checkDouble','close','closeCircle','collapse','down','expand','linkExternal','link','left','minus','minusCircle','minusSquare','order','subItem','right','plus','plusCircle','plusSquare','up','filter','swap'];\n\nexport const iconSizes = {\n \"128\": {size: 128, stroke: 5.25},\n \"72\": {size: 72, stroke: 3.5},\n \"64\": {size: 64, stroke: 3.25},\n \"48\": {size: 48, stroke: 2.75},\n \"40\": {size: 40, stroke: 2.5},\n \"32\": {size: 32, stroke: 2.25},\n \"24\": {size: 24, stroke: 2},\n \"20\": {size: 20, stroke: 1.75},\n \"16\": {size: 16, stroke: 1.5},\n \"micro\": {size: 12, stroke: 1.5 },\n \"default\": {size: 24, stroke: 2}\n};\n"]}
1
+ {"version":3,"file":"cura-icon.definitions.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.definitions.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC;IAChC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;IAC3B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;IAClC,SAAS,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;CACjC,CAAC","sourcesContent":["export const iconSizes = {\n \"128\": {size: 128, stroke: 5.25},\n \"72\": {size: 72, stroke: 3.5},\n \"64\": {size: 64, stroke: 3.25},\n \"48\": {size: 48, stroke: 2.75},\n \"40\": {size: 40, stroke: 2.5},\n \"32\": {size: 32, stroke: 2.25},\n \"24\": {size: 24, stroke: 2},\n \"20\": {size: 20, stroke: 1.75},\n \"16\": {size: 16, stroke: 1.5},\n \"micro\": {size: 12, stroke: 1.25 },\n \"default\": {size: 24, stroke: 2}\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { microIcons, iconSizes } from "./cura-icon.definitions";
2
+ import { iconSizes } from "./cura-icon.definitions";
3
3
  export class CuraIcon {
4
4
  constructor() {
5
5
  this.name = '';
@@ -9,10 +9,6 @@ export class CuraIcon {
9
9
  this.disabled = false;
10
10
  }
11
11
  sizeHandler(size) {
12
- if (size === 'micro' && !microIcons.includes(this.name)) {
13
- size = 16;
14
- console.warn(`Icon ${this.name} doesn't support micro size. Minimum size of 16 was applied instead.`);
15
- }
16
12
  const scaledStroke = (iconSize) => {
17
13
  return `${iconSizes[iconSize].stroke * (iconSizes.default.size / iconSizes[iconSize].size)}px`;
18
14
  };
@@ -31,7 +27,7 @@ export class CuraIcon {
31
27
  this.host.style.setProperty(prop, value);
32
28
  }
33
29
  render() {
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}` }))));
30
+ return (h(Host, { key: '0a9f6e85bc7be23072c17fd8f99ca88601e2a830' }, h("svg", { key: '00e4c6f5ce357b7a974d3dd0a27948fc1e8138ce', version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { key: '504a842d6b030539cb615cf60b090fbc9f771761', xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
35
31
  }
36
32
  static get is() { return "cura-icon"; }
37
33
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-icon.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAOhE,MAAM,OAAO,QAAQ;;oBAEW,EAAE;qBAChB,cAAc;;uBAEG,SAAS;wBACvB,KAAK;;IAKxB,WAAW,CAAC,IAAqB;QAC/B,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAG,CAAC;YACzD,IAAI,GAA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W,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DACE,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,mBAAmB,EAAC,eAAe,EACnC,KAAK,EAAC,4BAA4B;gBAClC,4DACE,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,kBAAkB,IAAI,CAAC,OAAO,QAAQ,IAAI,CAAC,IAAI,EAAE,GAC1E,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Element, Watch } from '@stencil/core';\nimport { microIcons, iconSizes } from './cura-icon.definitions';\n\n@Component({\n tag: 'cura-icon',\n styleUrl: 'cura-icon.scss',\n shadow: true\n})\nexport class CuraIcon {\n\n @Prop({reflect: true}) name = '';\n @Prop() color = 'neutral-base';\n @Prop() size: string | number;\n @Prop({reflect: true}) iconset = 'default';\n @Prop() disabled = false;\n\n @Element() host: HTMLElement;\n\n @Watch('size')\n sizeHandler(size: string | number) {\n if (size === 'micro' && !microIcons.includes(this.name) ) {\n size = 16;\n console.warn(`Icon ${this.name} doesn't support micro size. Minimum size of 16 was applied instead.`);\n }\n const scaledStroke = (iconSize: string | number) => {\n return `${iconSizes[iconSize].stroke * (iconSizes.default.size / iconSizes[iconSize].size)}px`;\n }\n this.setHostProperty('--size', iconSizes[`${size}`] ? `${iconSizes[size].size}px` : `${iconSizes.default.size}px`);\n this.setHostProperty('--stroke', iconSizes[`${size}`] ? scaledStroke(size) : scaledStroke(\"default\"));\n }\n\n @Watch('color')\n @Watch('disabled')\n colorHandler() {\n this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color || 'neutral'));\n }\n\n assetsPath: string;\n\n connectedCallback() {\n this.assetsPath = window.CuraAPI.localAssetsPath;\n this.sizeHandler(this.size);\n this.colorHandler();\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <svg\n version=\"1.1\"\n viewBox=\"0 0 24 24\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <use\n xlinkHref={`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`}>\n </use>\n </svg>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-icon.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAOpD,MAAM,OAAO,QAAQ;;oBAEW,EAAE;qBAChB,cAAc;;uBAEG,SAAS;wBACvB,KAAK;;IAKxB,WAAW,CAAC,IAAqB;QAC/B,MAAM,YAAY,GAAG,CAAC,QAAyB,EAAE,EAAE;YACjD,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACjG,CAAC,CAAA;QACD,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC;QACnH,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACxG,CAAC;IAID,YAAY;QACV,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC;IACnI,CAAC;IAID,iBAAiB;QACf,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;QACjD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,eAAe,CAAC,IAAY,EAAE,KAAa;QACzC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DACE,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,mBAAmB,EAAC,eAAe,EACnC,KAAK,EAAC,4BAA4B;gBAClC,4DACE,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,kBAAkB,IAAI,CAAC,OAAO,QAAQ,IAAI,CAAC,IAAI,EAAE,GAC1E,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Element, Watch } from '@stencil/core';\nimport { iconSizes } from './cura-icon.definitions';\n\n@Component({\n tag: 'cura-icon',\n styleUrl: 'cura-icon.scss',\n shadow: true\n})\nexport class CuraIcon {\n\n @Prop({reflect: true}) name = '';\n @Prop() color = 'neutral-base';\n @Prop() size: string | number;\n @Prop({reflect: true}) iconset = 'default';\n @Prop() disabled = false;\n\n @Element() host: HTMLElement;\n\n @Watch('size')\n sizeHandler(size: string | number) {\n const scaledStroke = (iconSize: string | number) => {\n return `${iconSizes[iconSize].stroke * (iconSizes.default.size / iconSizes[iconSize].size)}px`;\n }\n this.setHostProperty('--size', iconSizes[`${size}`] ? `${iconSizes[size].size}px` : `${iconSizes.default.size}px`);\n this.setHostProperty('--stroke', iconSizes[`${size}`] ? scaledStroke(size) : scaledStroke(\"default\"));\n }\n\n @Watch('color')\n @Watch('disabled')\n colorHandler() {\n this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color || 'neutral'));\n }\n\n assetsPath: string;\n\n connectedCallback() {\n this.assetsPath = window.CuraAPI.localAssetsPath;\n this.sizeHandler(this.size);\n this.colorHandler();\n }\n\n setHostProperty(prop: string, value: string) {\n this.host.style.setProperty(prop, value);\n }\n\n render() {\n return (\n <Host>\n <svg\n version=\"1.1\"\n viewBox=\"0 0 24 24\"\n preserveAspectRatio=\"xMidYMid meet\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <use\n xlinkHref={`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`}>\n </use>\n </svg>\n </Host>\n );\n }\n\n}\n"]}
@@ -19,8 +19,6 @@ export default {
19
19
  tags: ['autodocs'],
20
20
  render: (_a) => {
21
21
  var { label } = _a, args = __rest(_a, ["label"]);
22
- // You can either use a function to create DOM elements or use a plain html string!
23
- // return `<div>${label}</div>`;
24
22
  return `<cura-icon
25
23
  name="${args.name}"
26
24
  color="${args.color}"
@@ -40,7 +38,7 @@ export default {
40
38
  size: {
41
39
  control: { type: 'select' },
42
40
  options: Object.keys(iconSizes).filter(key => key !== 'default'),
43
- description: 'Define o tamanho. Alguns ícones suportam o tamanho <b>micro</b>. Consulte a documentação do iconset para mais detalhes.',
41
+ description: 'Define o tamanho.',
44
42
  table: {
45
43
  category: 'Properties',
46
44
  defaultValue: { summary: '24' }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-icon.stories.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;YAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;QACvB,mFAAmF;QACnF,gCAAgC;QAChC,OAAO;UACD,IAAI,CAAC,IAAI;WACR,IAAI,CAAC,KAAK;UACX,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;aACd,CAAC;IACZ,CAAC;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,qBAAqB;YAClC,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;aAClC;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC;YAChE,WAAW,EAAE,yHAAyH;YACtI,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC;aAC/B;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;YACxB,WAAW,EAAE,oFAAoF;YACjG,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;aACpC;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE;YAC1B,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;aACvB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAClB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC","sourcesContent":["import iconNames from '../../assets/icons/iconset-default-list';\nimport { getColorsWithDepths } from \"../../utils/utils\";\nimport { iconSizes } from './cura-icon.definitions';\n\nconst colors = getColorsWithDepths();\n\nexport default {\n title: 'Componentes/Icons/Icon',\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-icon\n name=\"${args.name}\"\n color=\"${args.color}\"\n size=\"${args.size}\"\n disabled=\"${args.disabled}\">\n</cura-icon>`;\n },\n argTypes: {\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n }\n },\n size: {\n control: { type: 'select' },\n options: Object.keys(iconSizes).filter(key => key !== 'default'),\n description: 'Define o tamanho. Alguns ícones suportam o tamanho <b>micro</b>. Consulte a documentação do iconset para mais detalhes.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '24'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor do ícone. Aceita qualquer valor do esquema de cores do design system.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'neutral'}\n }\n },\n name: {\n control: {type: 'select' },\n options: iconNames,\n description: 'Define o ícone pelo seu nome no iconset.',\n table: {\n category: 'Properties'\n }\n }\n },\n};\n\nexport const Icon = {\n args: {\n name: iconNames[0],\n size: '24',\n color: '',\n disabled: false,\n },\n};\n"]}
1
+ {"version":3,"file":"cura-icon.stories.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;YAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;QACvB,OAAO;UACD,IAAI,CAAC,IAAI;WACR,IAAI,CAAC,KAAK;UACX,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;aACd,CAAC;IACZ,CAAC;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,qBAAqB;YAClC,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;aAClC;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC;YAChE,WAAW,EAAE,mBAAmB;YAChC,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC;aAC/B;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;YACxB,WAAW,EAAE,oFAAoF;YACjG,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;aACpC;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE;YAC1B,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,0CAA0C;YACvD,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;aACvB;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;QAClB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC","sourcesContent":["import iconNames from '../../assets/icons/iconset-default-list';\nimport { getColorsWithDepths } from \"../../utils/utils\";\nimport { iconSizes } from './cura-icon.definitions';\n\nconst colors = getColorsWithDepths();\n\nexport default {\n title: 'Componentes/Icons/Icon',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return `<cura-icon\n name=\"${args.name}\"\n color=\"${args.color}\"\n size=\"${args.size}\"\n disabled=\"${args.disabled}\">\n</cura-icon>`;\n },\n argTypes: {\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n }\n },\n size: {\n control: { type: 'select' },\n options: Object.keys(iconSizes).filter(key => key !== 'default'),\n description: 'Define o tamanho.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '24'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor do ícone. Aceita qualquer valor do esquema de cores do design system.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'neutral'}\n }\n },\n name: {\n control: {type: 'select' },\n options: iconNames,\n description: 'Define o ícone pelo seu nome no iconset.',\n table: {\n category: 'Properties'\n }\n }\n },\n};\n\nexport const Icon = {\n args: {\n name: iconNames[0],\n size: '24',\n color: '',\n disabled: false,\n },\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import iconsetdefaulticons from "../../assets/icons/iconset-default-list";
3
- import { microIcons, iconSizes } from "../cura-icon/cura-icon.definitions";
3
+ import { iconSizes } from "../cura-icon/cura-icon.definitions";
4
4
  export class CuraIconsView {
5
5
  constructor() {
6
6
  this.sizes = Object.keys(iconSizes).filter(key => key !== 'default');
@@ -14,10 +14,7 @@ export class CuraIconsView {
14
14
  this.sizes.unshift(this.sizes.pop());
15
15
  }
16
16
  render() {
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
- h("cura-paragraph", { color: 'success-dark', size: "xsmall", "margin-block": "0px", "line-height": '100%' }, "MICRO"))))));
17
+ return (h(Host, { key: '4c5839d8673f7b6cc5ef212f3dab12fbd7fa4a65' }, h("div", { key: '80ac970319cd6041b133a5808ff5c47a8e7b8aa6', class: "iconDetail" }, h("cura-heading", { key: 'd1a2fbd4455304a9f581e62207492cd172abcd93', size: "small", "margin-block": "0 24px" }, "Icon: ", h("b", { key: '67e7e479b00f6305af972c7de12e926c0d2067ca' }, this.selected)), h("div", { key: '8eb81c26431259818f299dd7ebcf708d1f664dc1', class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { key: '2ff3b3a5868a68e2f6fa967fa2e3e9c2e5883451', class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size))))), h("div", { key: 'c3581991a1b8971447625ed67f4ba0d616efb855', 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))))));
21
18
  }
22
19
  static get is() { return "cura-icons-view"; }
23
20
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-icons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,CAAC;oBACjC,sBACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,kBACA,KAAK,iBACN,MAAM,YAAuB,CAEzC,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { microIcons, iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n { !microIcons.includes(icon) ? '' :\n <cura-paragraph\n color='success-dark'\n size=\"xsmall\"\n margin-block=\"0px\"\n line-height='100%'>MICRO</cura-paragraph>\n }\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-icons-view.js","sourceRoot":"","sources":["../../../src/components/cura-icons-view/cura-icons-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,mBAAmB,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAO/D,MAAM,OAAO,aAAa;;QAExB,UAAK,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;QAChE,WAAM,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAO9F,gBAAW,GAAG,CAAC,IAAI,EAAE,EAAE;YACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC,CAAA;wBARmB,mBAAmB,CAAC,CAAC,CAAC;;IAE1C,iBAAiB;QACf,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACvC,CAAC;IAMD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,YAAY;gBACrB,qEAAc,IAAI,EAAC,OAAO,kBAAc,QAAQ;;oBAAO,4DAAK,IAAI,CAAC,QAAQ,CAAM,CAAe;gBAC9F,4DAAK,KAAK,EAAC,WAAW,IAClB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAE,IAAI,CAAC,EAAE,CACvB,WAAK,KAAK,EAAC,MAAM;oBACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAc;oBACxD,gBAAQ,IAAI,CAAS,CACjB,CACP,CACG;gBACN,4DAAK,KAAK,EAAC,kBAAkB,IACzB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAE,IAAI,CAAC,EAAE,CACvB,WAAK,KAAK,EAAC,MAAM;oBACf,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,eAAe,GAAa;oBAC9E,gBAAQ,IAAI,CAAS,CACjB,CACP,CACG,CACF;YACN,4DAAK,KAAK,EAAC,OAAO,IACd,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAC/B,WAAK,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;gBAChG,iBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,GAAc;gBAC9E,kBACE,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EACnD,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,IAAG,IAAI,CAAc,CACjF,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"]}
@@ -92,8 +92,10 @@
92
92
  position: fixed;
93
93
  height: 100%;
94
94
  width: 100%;
95
- top: 0px;
96
- bottom: 0px;
95
+ top: var(--top-offset);
96
+ bottom: var(--bottom-offset);
97
+ left: var(--left-offset);
98
+ right: var(--right-offset);
97
99
  z-index: -1;
98
100
  margin-top: var(--offset-top);
99
101
  }
@@ -7,7 +7,10 @@ export class CuraModal {
7
7
  };
8
8
  this.open = false;
9
9
  this.background = 'light';
10
- this.topOffset = 0;
10
+ this.top = 0;
11
+ this.bottom = 0;
12
+ this.left = 0;
13
+ this.right = 0;
11
14
  this.styles = {};
12
15
  }
13
16
  setColors() {
@@ -17,16 +20,31 @@ export class CuraModal {
17
20
  };
18
21
  this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': backgroundTheme[this.background] });
19
22
  }
20
- setOffsetTop() {
21
- this.styles = Object.assign(Object.assign({}, this.styles), { '--offset-top': `${this.topOffset}px` });
23
+ setOffset(name, value) {
24
+ this.styles = Object.assign(Object.assign({}, this.styles), { [`--${name}-offset`]: `${value}px` });
25
+ }
26
+ setTop() {
27
+ this.setOffset('top', this.top);
28
+ }
29
+ setBottom() {
30
+ this.setOffset('bottom', this.bottom);
31
+ }
32
+ setLeft() {
33
+ this.setOffset('left', this.left);
34
+ }
35
+ setRight() {
36
+ this.setOffset('right', this.right);
22
37
  }
23
38
  connectedCallback() {
24
39
  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
40
  this.setColors();
26
- this.setOffsetTop();
41
+ this.setTop();
42
+ this.setBottom();
43
+ this.setLeft();
44
+ this.setRight();
27
45
  }
28
46
  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"))))));
47
+ return (h(Host, { key: '5061e0536f1f06ae425a810fc15eb85d36caa271', role: "dialog", "aria-modal": "true" }, h("div", { key: '2afc242ddb391923dccfb6adc218179d32ee85e3', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '5cf4d0d0817e23774984991467b8a34297f47336', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.handleClose }), h("div", { key: 'ba6a2679ce03c87c88e42c4f28616ab9afc09116', class: "wrapper" }, h("button", { key: 'cc3126fa311ef7eb75dbdb56468d7b53af13740c', class: "close desktop", onClick: this.handleClose }, h("cura-icon", { key: 'b116480ab348f69fafbbc5e8bef7ee5a43640b00', name: "close", color: "error-dark", size: "small" })), h("slot", { key: '7fd83b4991dee4e7cab92bf6e357efa4ce3c1d71' }), h("button", { key: '1351ba9d296c1362197496f336a20007cd6f45f0', class: "close mobile", onClick: this.handleClose }, h("cura-icon", { key: '3d72c9f8981c380ab8ff19e4507497703011aece', name: "close", color: "error-dark", size: "16" }), h("cura-paragraph", { key: '77e1144a9edb1c20e34f9f7e02ea97264d525143', color: "error-dark", size: "small", marginBlock: "0" }, "Fechar"))))));
30
48
  }
31
49
  static get is() { return "cura-modal"; }
32
50
  static get encapsulation() { return "shadow"; }
@@ -78,7 +96,61 @@ export class CuraModal {
78
96
  "reflect": false,
79
97
  "defaultValue": "'light'"
80
98
  },
81
- "topOffset": {
99
+ "top": {
100
+ "type": "number",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "number",
104
+ "resolved": "number",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": true,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "Property top to control modal top position.\nDefault: 0px"
112
+ },
113
+ "attribute": "top",
114
+ "reflect": false,
115
+ "defaultValue": "0"
116
+ },
117
+ "bottom": {
118
+ "type": "number",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "number",
122
+ "resolved": "number",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": true,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Property bottom to control modal bottom position.\nDefault: 0px"
130
+ },
131
+ "attribute": "bottom",
132
+ "reflect": false,
133
+ "defaultValue": "0"
134
+ },
135
+ "left": {
136
+ "type": "number",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "number",
140
+ "resolved": "number",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": true,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": "Property left to control modal left position.\nDefault: 0px"
148
+ },
149
+ "attribute": "left",
150
+ "reflect": false,
151
+ "defaultValue": "0"
152
+ },
153
+ "right": {
82
154
  "type": "number",
83
155
  "mutable": false,
84
156
  "complexType": {
@@ -90,9 +162,9 @@ export class CuraModal {
90
162
  "optional": true,
91
163
  "docs": {
92
164
  "tags": [],
93
- "text": "Property offsetTop to control modal top position.\nDefault: 0px"
165
+ "text": "Property right to control modal right position.\nDefault: 0px"
94
166
  },
95
- "attribute": "top-offset",
167
+ "attribute": "right",
96
168
  "reflect": false,
97
169
  "defaultValue": "0"
98
170
  }
@@ -126,8 +198,17 @@ export class CuraModal {
126
198
  "propName": "background",
127
199
  "methodName": "setColors"
128
200
  }, {
129
- "propName": "topOffset",
130
- "methodName": "setOffsetTop"
201
+ "propName": "top",
202
+ "methodName": "setTop"
203
+ }, {
204
+ "propName": "bottom",
205
+ "methodName": "setBottom"
206
+ }, {
207
+ "propName": "left",
208
+ "methodName": "setLeft"
209
+ }, {
210
+ "propName": "right",
211
+ "methodName": "setRight"
131
212
  }];
132
213
  }
133
214
  }
@@ -1 +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;yBAKlB,CAAC;sBAMZ,EAAE;;IAGpB,SAAS;QACP,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC;YAChE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC;SACnE,CAAC;QAEF,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GACvD,CAAC;IACJ,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,GACtC,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EACxE,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAA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ag: '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"]}
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;;QA4FZ,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;oBA1FuD,KAAK;0BAKtB,OAAO;mBAKxB,CAAC;sBAKE,CAAC;oBAKH,CAAC;qBAKA,CAAC;sBAMR,EAAE;;IAGpB,SAAS;QACP,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC;YAChE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC;SACnE,CAAC;QAEF,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,GACvD,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,IAAY,EAAE,KAAa;QACnC,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,GAAG,KAAK,IAAI,GACnC,CAAC;IACJ,CAAC;IAGD,MAAM;QACJ,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAGD,SAAS;QACP,IAAI,CAAC,SAAS,CAAC,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;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 top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: 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 setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\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.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\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"]}
@@ -12,7 +12,16 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  const renderCuraModal = (args) => `
14
14
  <div style="height: 500px">
15
- <cura-modal open="${args.open}" background="${args.background}" top-offset="${args.topOffset}">${args.content}</cura-modal>
15
+ <cura-modal
16
+ open="${args.open}"
17
+ background="${args.background}"
18
+ top="${args.top}"
19
+ bottom="${args.bottom}"
20
+ left="${args.left}"
21
+ right="${args.right}"
22
+ >
23
+ ${args.content}
24
+ </cura-modal>
16
25
  </div>
17
26
  `;
18
27
  export default {
@@ -25,7 +34,7 @@ export default {
25
34
  argTypes: {
26
35
  open: {
27
36
  control: 'boolean',
28
- description: 'Define se o modal está aberto ou fechado',
37
+ description: 'Define se o modal está aberto ou fechado.',
29
38
  table: {
30
39
  category: 'Properties',
31
40
  defaultValue: { summary: false },
@@ -40,19 +49,43 @@ export default {
40
49
  defaultValue: { summary: 'light' },
41
50
  },
42
51
  },
43
- topOffset: {
52
+ content: {
53
+ control: { type: 'text' },
54
+ description: 'Conteúdo do modal a ser exibido.',
55
+ table: {
56
+ category: 'Properties',
57
+ },
58
+ },
59
+ top: {
44
60
  control: { type: 'number' },
45
61
  description: 'Define o deslocamento superior do modal.',
46
62
  table: {
47
- category: 'Properties',
63
+ category: 'Offset',
48
64
  defaultValue: { summary: '0px' },
49
65
  },
50
66
  },
51
- content: {
52
- control: { type: 'text' },
53
- description: 'Conteúdo do modal a ser exibido.',
67
+ bottom: {
68
+ control: { type: 'number' },
69
+ description: 'Define o deslocamento inferior do modal.',
54
70
  table: {
55
- category: 'Properties',
71
+ category: 'Offset',
72
+ defaultValue: { summary: '0px' },
73
+ },
74
+ },
75
+ left: {
76
+ control: { type: 'number' },
77
+ description: 'Define o deslocamento esquerdo do modal.',
78
+ table: {
79
+ category: 'Offset',
80
+ defaultValue: { summary: '0px' },
81
+ },
82
+ },
83
+ right: {
84
+ control: { type: 'number' },
85
+ description: 'Define o deslocamento direito do modal.',
86
+ table: {
87
+ category: 'Offset',
88
+ defaultValue: { summary: '0px' },
56
89
  },
57
90
  },
58
91
  close: {
@@ -70,16 +103,19 @@ export const CuraModal = {
70
103
  background: 'light',
71
104
  open: true,
72
105
  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,
106
+ justify-content: center;
107
+ align-items: center;
108
+ align-self: stretch;
109
+ background-color:rgba(187, 107, 217, 0.4);
110
+ text-align: center;
111
+ height: 30px;
112
+ color: #9b51e0;">
113
+ content area
114
+ </div>`,
115
+ top: 0,
116
+ bottom: 0,
117
+ left: 0,
118
+ right: 0,
83
119
  },
84
120
  };
85
121
  //# sourceMappingURL=cura-modal.stories.js.map