@rededor/cura 1.4.0-alpha.0 → 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 (264) 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 +24 -15
  21. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  22. package/dist/cjs/{cura-icon.definitions-8d714f6a.js → cura-icon.definitions-5223028b.js} +2 -4
  23. package/dist/cjs/cura-icon.definitions-5223028b.js.map +1 -0
  24. package/dist/cjs/cura-icons-view.cjs.entry.js +2 -5
  25. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
  26. package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
  27. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/cura-modal.cjs.entry.js +28 -7
  29. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
  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 +1 -1
  34. package/dist/cjs/cura.cjs.js +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +2 -1
  37. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.css +51 -0
  38. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +149 -0
  39. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -0
  40. package/dist/collection/components/badges/{cura-badge-number/cura-badge-number.stories.js → cura-badge-counter/cura-badge-counter.stories.js} +33 -13
  41. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.stories.js.map +1 -0
  42. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
  43. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.css +73 -0
  44. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +219 -0
  45. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -0
  46. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js +126 -0
  47. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js.map +1 -0
  48. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  49. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  50. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +5 -14
  51. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  52. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  53. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  54. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  55. package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
  56. package/dist/collection/components/cura-card/cura-card.js +1 -1
  57. package/dist/collection/components/cura-icon/cura-icon.definitions.js +1 -2
  58. package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -1
  59. package/dist/collection/components/cura-icon/cura-icon.js +2 -6
  60. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
  61. package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -3
  62. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  63. package/dist/collection/components/cura-icons-view/cura-icons-view.js +2 -5
  64. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
  65. package/dist/collection/components/cura-modal/cura-modal.css +4 -2
  66. package/dist/collection/components/cura-modal/cura-modal.js +91 -10
  67. package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
  68. package/dist/collection/components/cura-modal/cura-modal.stories.js +54 -18
  69. package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -1
  70. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  71. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  72. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  73. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  74. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  75. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  76. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +26 -16
  77. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  78. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  79. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  80. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  81. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  82. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  83. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  84. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  85. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  86. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  87. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  88. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  89. package/dist/collection/utils/utils.js +1 -0
  90. package/dist/collection/utils/utils.js.map +1 -1
  91. package/dist/components/cura-alert.js +1 -1
  92. package/dist/components/cura-avatar.js +1 -1
  93. package/dist/components/cura-badge-counter.d.ts +11 -0
  94. package/dist/components/cura-badge-counter.js +8 -0
  95. package/dist/components/cura-badge-counter.js.map +1 -0
  96. package/dist/components/cura-badge-counter2.js +90 -0
  97. package/dist/components/cura-badge-counter2.js.map +1 -0
  98. package/dist/components/cura-badge-distance.js +1 -1
  99. package/dist/components/{cura-badge-number.d.ts → cura-badge-pill.d.ts} +4 -4
  100. package/dist/components/cura-badge-pill.js +120 -0
  101. package/dist/components/cura-badge-pill.js.map +1 -0
  102. package/dist/components/cura-button-outline.js +1 -1
  103. package/dist/components/cura-button-select.js +6 -15
  104. package/dist/components/cura-button-select.js.map +1 -1
  105. package/dist/components/cura-button-transparent2.js +1 -1
  106. package/dist/components/cura-button.js +1 -1
  107. package/dist/components/cura-calendar2.js +1 -1
  108. package/dist/components/cura-card.js +1 -1
  109. package/dist/components/cura-checkbox.js +1 -1
  110. package/dist/components/cura-display.js +1 -1
  111. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  112. package/dist/components/cura-dropdown-search-option.js +2 -2
  113. package/dist/components/cura-dropdown-search.js +26 -16
  114. package/dist/components/cura-dropdown-search.js.map +1 -1
  115. package/dist/components/cura-heading2.js +1 -1
  116. package/dist/components/cura-icon2.js +3 -8
  117. package/dist/components/cura-icon2.js.map +1 -1
  118. package/dist/components/cura-icons-view.js +7 -16
  119. package/dist/components/cura-icons-view.js.map +1 -1
  120. package/dist/components/cura-input-date.js +1 -1
  121. package/dist/components/cura-label2.js +1 -1
  122. package/dist/components/cura-loader-bar2.js +1 -1
  123. package/dist/components/cura-loader-circle2.js +1 -1
  124. package/dist/components/cura-modal.js +36 -9
  125. package/dist/components/cura-modal.js.map +1 -1
  126. package/dist/components/cura-page-template.js +1 -1
  127. package/dist/components/cura-paragraph2.js +1 -1
  128. package/dist/components/cura-radio.js +1 -1
  129. package/dist/components/cura-select-option2.js +1 -1
  130. package/dist/components/cura-select2.js +3 -3
  131. package/dist/components/cura-switch.js +1 -1
  132. package/dist/components/cura-toast.js +1 -1
  133. package/dist/components/cura-tooltip.js +1 -1
  134. package/dist/components/index.js +4 -2
  135. package/dist/components/index.js.map +1 -1
  136. package/dist/cura/cura.esm.js +1 -1
  137. package/dist/cura/cura.esm.js.map +1 -1
  138. package/dist/cura/{p-01e301d4.entry.js → p-116a1cd6.entry.js} +2 -2
  139. package/dist/cura/{p-5bb8302c.entry.js → p-19f28fa8.entry.js} +2 -2
  140. package/dist/cura/p-19f28fa8.entry.js.map +1 -0
  141. package/dist/cura/{p-eda28278.entry.js → p-2545cfc7.entry.js} +2 -2
  142. package/dist/cura/p-35920ac0.entry.js +2 -0
  143. package/dist/cura/p-35920ac0.entry.js.map +1 -0
  144. package/dist/cura/{p-eea093b2.entry.js → p-36dbec98.entry.js} +2 -2
  145. package/dist/cura/{p-ed839f1e.entry.js → p-3d958d45.entry.js} +2 -2
  146. package/dist/cura/{p-3536c96b.entry.js → p-3e4ca7e7.entry.js} +2 -2
  147. package/dist/cura/{p-e5b0dd74.entry.js → p-3eca0f0c.entry.js} +2 -2
  148. package/dist/cura/{p-1f53580a.entry.js → p-42258230.entry.js} +2 -2
  149. package/dist/cura/p-48f9289b.js +2 -0
  150. package/dist/cura/p-48f9289b.js.map +1 -0
  151. package/dist/cura/{p-dbd9eab3.entry.js → p-4b496c51.entry.js} +2 -2
  152. package/dist/cura/p-52f854e0.entry.js +2 -0
  153. package/dist/cura/p-52f854e0.entry.js.map +1 -0
  154. package/dist/cura/{p-81c66f2b.entry.js → p-576c65b4.entry.js} +2 -2
  155. package/dist/cura/{p-bfb5e9e1.entry.js → p-6e4f4fbf.entry.js} +2 -2
  156. package/dist/cura/{p-0e28f1c8.entry.js → p-818c581f.entry.js} +2 -2
  157. package/dist/cura/{p-b0451cb3.entry.js → p-a91d451f.entry.js} +2 -2
  158. package/dist/cura/p-aa65cb50.entry.js +2 -0
  159. package/dist/cura/p-aa65cb50.entry.js.map +1 -0
  160. package/dist/cura/{p-075b02de.entry.js → p-b1a51e81.entry.js} +2 -2
  161. package/dist/cura/{p-f375a612.entry.js → p-bdb1a0c5.entry.js} +2 -2
  162. package/dist/cura/p-c4da4c44.entry.js +2 -0
  163. package/dist/cura/p-c4da4c44.entry.js.map +1 -0
  164. package/dist/cura/{p-a7ecea4a.entry.js → p-dcd2e5bb.entry.js} +2 -2
  165. package/dist/cura/{p-7853ab16.entry.js → p-e1a41792.entry.js} +2 -2
  166. package/dist/cura/p-ef593f12.entry.js +2 -0
  167. package/dist/cura/p-ef593f12.entry.js.map +1 -0
  168. package/dist/cura/p-f23c4ed8.entry.js +2 -0
  169. package/dist/cura/p-f23c4ed8.entry.js.map +1 -0
  170. package/dist/cura/p-f5d45776.entry.js +2 -0
  171. package/dist/esm/cura-accordion_12.entry.js +12 -16
  172. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  173. package/dist/esm/cura-alert.entry.js +1 -1
  174. package/dist/esm/cura-avatar.entry.js +1 -1
  175. package/dist/esm/cura-badge-counter.entry.js +59 -0
  176. package/dist/esm/cura-badge-counter.entry.js.map +1 -0
  177. package/dist/esm/cura-badge-distance.entry.js +1 -1
  178. package/dist/esm/cura-badge-pill.entry.js +79 -0
  179. package/dist/esm/cura-badge-pill.entry.js.map +1 -0
  180. package/dist/esm/cura-button-outline.entry.js +1 -1
  181. package/dist/esm/cura-button-select.entry.js +2 -11
  182. package/dist/esm/cura-button-select.entry.js.map +1 -1
  183. package/dist/esm/cura-button-transparent.entry.js +1 -1
  184. package/dist/esm/cura-calendar.entry.js +1 -1
  185. package/dist/esm/cura-card.entry.js +1 -1
  186. package/dist/esm/cura-checkbox.entry.js +1 -1
  187. package/dist/esm/cura-display.entry.js +1 -1
  188. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  189. package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
  190. package/dist/esm/cura-dropdown-search.entry.js +24 -15
  191. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  192. package/dist/esm/cura-icon.definitions-a892c0e2.js +17 -0
  193. package/dist/esm/cura-icon.definitions-a892c0e2.js.map +1 -0
  194. package/dist/esm/cura-icons-view.entry.js +2 -5
  195. package/dist/esm/cura-icons-view.entry.js.map +1 -1
  196. package/dist/esm/cura-input-date.entry.js +1 -1
  197. package/dist/esm/cura-loader-bar.entry.js +1 -1
  198. package/dist/esm/cura-modal.entry.js +28 -7
  199. package/dist/esm/cura-modal.entry.js.map +1 -1
  200. package/dist/esm/cura-radio.entry.js +1 -1
  201. package/dist/esm/cura-switch.entry.js +1 -1
  202. package/dist/esm/cura-toast.entry.js +1 -1
  203. package/dist/esm/cura-tooltip.entry.js +1 -1
  204. package/dist/esm/cura.js +1 -1
  205. package/dist/esm/loader.js +1 -1
  206. package/dist/types/components/badges/cura-badge-counter/cura-badge-counter.d.ts +30 -0
  207. 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
  208. package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.d.ts +44 -0
  209. package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.stories.d.ts +119 -0
  210. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +1 -2
  211. package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +0 -1
  212. package/dist/types/components/cura-modal/cura-modal.d.ts +22 -3
  213. package/dist/types/components/cura-modal/cura-modal.stories.d.ts +42 -3
  214. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +8 -0
  215. package/dist/types/components.d.ts +140 -19
  216. package/dist/types/utils/utils.d.ts +1 -0
  217. package/package.json +2 -2
  218. package/dist/cjs/cura-badge-number.cjs.entry.js +0 -29
  219. package/dist/cjs/cura-badge-number.cjs.entry.js.map +0 -1
  220. package/dist/cjs/cura-icon.definitions-8d714f6a.js.map +0 -1
  221. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -28
  222. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +0 -66
  223. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +0 -1
  224. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +0 -1
  225. package/dist/components/cura-badge-number.js +0 -8
  226. package/dist/components/cura-badge-number.js.map +0 -1
  227. package/dist/components/cura-badge-number2.js +0 -49
  228. package/dist/components/cura-badge-number2.js.map +0 -1
  229. package/dist/cura/p-0308cf6b.entry.js +0 -2
  230. package/dist/cura/p-0308cf6b.entry.js.map +0 -1
  231. package/dist/cura/p-5bb8302c.entry.js.map +0 -1
  232. package/dist/cura/p-7090d4a7.entry.js +0 -2
  233. package/dist/cura/p-7090d4a7.entry.js.map +0 -1
  234. package/dist/cura/p-71a2dcef.entry.js +0 -2
  235. package/dist/cura/p-71a2dcef.entry.js.map +0 -1
  236. package/dist/cura/p-9a7e3f48.entry.js +0 -2
  237. package/dist/cura/p-9a7e3f48.entry.js.map +0 -1
  238. package/dist/cura/p-a7221f0c.js +0 -2
  239. package/dist/cura/p-a7221f0c.js.map +0 -1
  240. package/dist/cura/p-d635501a.entry.js +0 -2
  241. package/dist/cura/p-d635501a.entry.js.map +0 -1
  242. package/dist/cura/p-ebed83d1.entry.js +0 -2
  243. package/dist/esm/cura-badge-number.entry.js +0 -25
  244. package/dist/esm/cura-badge-number.entry.js.map +0 -1
  245. package/dist/esm/cura-icon.definitions-aaa4e80f.js +0 -18
  246. package/dist/esm/cura-icon.definitions-aaa4e80f.js.map +0 -1
  247. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +0 -8
  248. /package/dist/cura/{p-01e301d4.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  249. /package/dist/cura/{p-eda28278.entry.js.map → p-2545cfc7.entry.js.map} +0 -0
  250. /package/dist/cura/{p-eea093b2.entry.js.map → p-36dbec98.entry.js.map} +0 -0
  251. /package/dist/cura/{p-ed839f1e.entry.js.map → p-3d958d45.entry.js.map} +0 -0
  252. /package/dist/cura/{p-3536c96b.entry.js.map → p-3e4ca7e7.entry.js.map} +0 -0
  253. /package/dist/cura/{p-e5b0dd74.entry.js.map → p-3eca0f0c.entry.js.map} +0 -0
  254. /package/dist/cura/{p-1f53580a.entry.js.map → p-42258230.entry.js.map} +0 -0
  255. /package/dist/cura/{p-dbd9eab3.entry.js.map → p-4b496c51.entry.js.map} +0 -0
  256. /package/dist/cura/{p-81c66f2b.entry.js.map → p-576c65b4.entry.js.map} +0 -0
  257. /package/dist/cura/{p-bfb5e9e1.entry.js.map → p-6e4f4fbf.entry.js.map} +0 -0
  258. /package/dist/cura/{p-0e28f1c8.entry.js.map → p-818c581f.entry.js.map} +0 -0
  259. /package/dist/cura/{p-b0451cb3.entry.js.map → p-a91d451f.entry.js.map} +0 -0
  260. /package/dist/cura/{p-075b02de.entry.js.map → p-b1a51e81.entry.js.map} +0 -0
  261. /package/dist/cura/{p-f375a612.entry.js.map → p-bdb1a0c5.entry.js.map} +0 -0
  262. /package/dist/cura/{p-a7ecea4a.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  263. /package/dist/cura/{p-7853ab16.entry.js.map → p-e1a41792.entry.js.map} +0 -0
  264. /package/dist/cura/{p-ebed83d1.entry.js.map → p-f5d45776.entry.js.map} +0 -0
@@ -50,7 +50,7 @@ const CuraAlert = class {
50
50
  return this.icon ? this.icon : iconMapping[this.type];
51
51
  }
52
52
  render() {
53
- 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 ?
53
+ 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 ?
54
54
  (h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
55
55
  : '')));
56
56
  }
@@ -50,7 +50,7 @@ const CuraAvatar = class {
50
50
  this.imageSrc = this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`;
51
51
  }
52
52
  render() {
53
- 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() }))));
53
+ 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() }))));
54
54
  }
55
55
  get host() { return getElement(this); }
56
56
  static get watchers() { return {
@@ -0,0 +1,59 @@
1
+ import { r as registerInstance, h, H as Host } from './index-747aad85.js';
2
+
3
+ const curaBadgeCounterCss = ":host{width:fit-content;display:inline-block;height:calc(var(--base-spacing) * 4px);position:relative}:host .container{display:flex;min-width:calc(var(--base-spacing) * 4px);width:fit-content;height:calc(var(--base-spacing) * 4px);justify-content:center;align-items:center;border-radius:calc(calc(var(--base-spacing) * 4px) / 2);background:var(--background-color);box-sizing:border-box;padding:0 calc(var(--base-spacing) * 1px);position:relative}:host .container.outline,:host .container.transparent{background:transparent !important}:host .container.outline::before{content:\"\";width:100%;height:100%;position:absolute;left:0px;top:0px;box-sizing:border-box;border:1px solid var(--background-color);border-radius:calc(calc(var(--base-spacing) * 4px) / 2)}";
4
+ const CuraBadgeCounterStyle0 = curaBadgeCounterCss;
5
+
6
+ const CuraBadgeNumber = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.theme = window.CuraAPI.theme;
10
+ this.labelColor = 'primary-darker';
11
+ this.bgColorName = 'primary-lighter';
12
+ this.number = undefined;
13
+ this.color = 'primary';
14
+ this.disabled = false;
15
+ this.type = 'solid';
16
+ this.styles = {};
17
+ }
18
+ handleColorChange() {
19
+ this.setColors();
20
+ }
21
+ setColors() {
22
+ const color = this.color.toLowerCase();
23
+ /** type outline and transparent */
24
+ if (this.type === 'outline' || this.type === 'transparent') {
25
+ this.bgColorName = this.disabled ? `neutral-medium` : `${color}-dark`;
26
+ this.labelColor = this.bgColorName;
27
+ /** type solid - default */
28
+ }
29
+ else {
30
+ this.bgColorName = color === 'neutral' || this.disabled ? `neutral-pale` : `${color}-lighter`;
31
+ this.labelColor = this.disabled ? 'neutral-medium' : `${color}-dark`;
32
+ }
33
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(`${this.bgColorName}`) });
34
+ }
35
+ connectedCallback() {
36
+ this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
37
+ this.setColors();
38
+ }
39
+ getClasses() {
40
+ const classes = {
41
+ 'container': true,
42
+ };
43
+ classes[this.type.toLowerCase()] = true;
44
+ return classes;
45
+ }
46
+ render() {
47
+ return (h(Host, { key: 'bb6ab35685970eadac6962b3a01f158ebac05515' }, this.number && this.number <= 0 ? '' : (h("div", { class: this.getClasses(), style: this.styles }, h("cura-label", { size: "xsmall", "line-height": "none", color: this.labelColor }, this.number >= 100 ? '99+' : this.number)))));
48
+ }
49
+ static get watchers() { return {
50
+ "disabled": ["handleColorChange"],
51
+ "color": ["handleColorChange"],
52
+ "type": ["handleColorChange"]
53
+ }; }
54
+ };
55
+ CuraBadgeNumber.style = CuraBadgeCounterStyle0;
56
+
57
+ export { CuraBadgeNumber as cura_badge_counter };
58
+
59
+ //# sourceMappingURL=cura-badge-counter.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-badge-counter.entry.js","mappings":";;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W,EAAE,IAAI;SAClB,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;QACxC,OAAO,OAAO,CAAC;KAChB;IAGD,MAAM;QACJ,QACE,EAAC,IAAI,uDACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,IACtC,WAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IAC/C,kBAAY,IAAI,EAAC,QAAQ,iBAAa,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IAChE,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAC9B,CACT,CACL,CACI,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/badges/cura-badge-counter/cura-badge-counter.scss?tag=cura-badge-counter&encapsulation=shadow","src/components/badges/cura-badge-counter/cura-badge-counter.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n width: fit-content;\n display: inline-block;\n height: #{$spacing-xxs};\n position: relative;\n\n .container {\n display: flex;\n min-width: #{$spacing-xxs};\n width: fit-content;\n height: #{$spacing-xxs};\n justify-content: center;\n align-items: center;\n border-radius: calc(#{$spacing-xxs} / 2);\n background: var(--background-color);\n box-sizing: border-box;\n padding: 0 #{$spacing-tiny};\n position: relative;\n\n &.outline,\n &.transparent {\n background: transparent !important;\n }\n\n &.outline {\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 1px solid var(--background-color);\n border-radius: calc(#{$spacing-xxs} / 2);\n }\n }\n }\n\n}\n","import { Component, Host, Prop, h, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-counter',\n styleUrl: 'cura-badge-counter.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n theme = window.CuraAPI.theme;\n\n /** Número a ser representado no badge.\n * Apresentará 99+ para números acima desse valor.\n */\n @Prop({ reflect: true }) number: number | null;\n /**\n * Cor fundamental do design system sem profundidade.\n * Ex.: primary (padrão)\n */\n @Prop() color: string = 'primary';\n /**\n * Define o estado do badge como desabilitado ou habilitado.\n */\n @Prop() disabled: boolean = false;\n /**\n * Define o estilo visual entre solid (default), outline ou transparent.\n */\n @Prop() type: 'solid' | 'outline' | 'transparent' | string = 'solid';\n\n @State() styles = {};\n labelColor = 'primary-darker';\n bgColorName = 'primary-lighter';\n\n @Watch(\"disabled\")\n @Watch(\"color\")\n @Watch(\"type\")\n handleColorChange() {\n this.setColors();\n }\n\n setColors() {\n const color = this.color.toLowerCase();\n /** type outline and transparent */\n if (this.type === 'outline' || this.type === 'transparent') {\n this.bgColorName = this.disabled ? `neutral-medium` : `${color}-dark`;\n this.labelColor = this.bgColorName;\n /** type solid - default */\n } else {\n this.bgColorName = color === 'neutral' || this.disabled ? `neutral-pale` : `${color}-lighter`;\n this.labelColor = this.disabled ? 'neutral-medium' : `${color}-dark`;\n }\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(`${this.bgColorName}`),\n }\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {\n 'container': true,\n };\n classes[this.type.toLowerCase()] = true;\n return classes;\n }\n\n\n render() {\n return (\n <Host>\n { this.number && this.number <= 0 ? '' : (\n <div class={this.getClasses()} style={this.styles}>\n <cura-label size=\"xsmall\" line-height=\"none\" color={this.labelColor}>\n {this.number >= 100 ? '99+' : this.number}\n </cura-label>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -23,7 +23,7 @@ const CuraDistance = class {
23
23
  this.formatDistance();
24
24
  }
25
25
  render() {
26
- return (h(Host, { key: '7027189b17f2ad1759f9d43bc5dbc9cbb1fe47cc' }, h("div", { key: 'bc57ac9c32c0651469d4bd6ee75d0f97408fde34', class: "container", style: this.styles }, h("cura-label", { key: '913db081273caf2e7d46d92b22e1988cf28ddeb3', size: 'xsmall', weight: 'bold', color: 'neutral-black' }, this.displayDistance, this.isThousandRounded ? 'K' : ''), h("cura-label", { key: '4c327bd9d55466bb2d9c614d9aa0420e42da23ce', size: 'xsmall', weight: 'bold', color: 'neutral-dark' }, this.label))));
26
+ return (h(Host, { key: 'cdc206deecbed2e069befda5d21ddcaf03049afc' }, h("div", { key: 'd22d2b5b97964281e8588fbc17a66f3fddcd875e', class: "container", style: this.styles }, h("cura-label", { key: '0d54ab1ad403ba23a57fb78a422ed8c577cd627e', size: 'xsmall', weight: 'bold', color: 'neutral-black' }, this.displayDistance, this.isThousandRounded ? 'K' : ''), h("cura-label", { key: 'd4929a67484bbfd6d6f3edce82414951ea4778c8', size: 'xsmall', weight: 'bold', color: 'neutral-dark' }, this.label))));
27
27
  }
28
28
  setCssProperties() {
29
29
  this.styles = {
@@ -0,0 +1,79 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-747aad85.js';
2
+
3
+ const curaBadgePillCss = ".badge-container{display:flex;align-items:center;justify-content:center;gap:calc(var(--base-spacing) * 1px);padding:calc(var(--base-spacing) * 1px);border-radius:var(--border-radius);font-family:var(--font-family);font-size:var(--font-size);position:relative;box-sizing:border-box;width:fit-content;height:calc(var(--base-spacing) * 5px);min-width:calc(var(--base-spacing) * 5px);background-color:var(--color-background)}.badge-container::before{content:\"\";width:100%;height:100%;position:absolute;left:0px;top:0px;box-sizing:border-box;border:1px solid transparent;border-radius:var(--border-radius);pointer-events:none}.badge-container.icon-only cura-label{display:none !important}.badge-container.disabled{background-color:var(--color-background-disabled)}.badge-container.outline{background-color:transparent}.badge-container.outline::before{border:1px solid var(--color-base)}.badge-container.outline.disabled::before{border:1px solid var(--color-outline-disabled)}.badge-container.transparent{background-color:transparent}.badge-container.transparent::before{border:1px solid transparent}.badge-container.transparent.disabled{background-color:transparent}.badge-container cura-icon{display:flex}";
4
+ const CuraBadgePillStyle0 = curaBadgePillCss;
5
+
6
+ const CuraBadgePill = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.theme = window.CuraAPI.theme;
10
+ this.type = 'solid';
11
+ this.color = 'primary';
12
+ this.iconName = undefined;
13
+ this.iconset = 'default';
14
+ this.disabled = false;
15
+ this.iconOnly = false;
16
+ this.borderRadius = "2px";
17
+ this.styles = {};
18
+ }
19
+ handleColorChange() {
20
+ this.setColors();
21
+ }
22
+ connectedCallback() {
23
+ this.setBaseStyles();
24
+ this.setColors();
25
+ }
26
+ setBaseStyles() {
27
+ this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
28
+ this.styles['--font-family'] = this.theme.fonts.getFamily();
29
+ this.styles['--font-size'] = this.theme.fonts.getSize();
30
+ this.styles = Object.assign({}, this.styles);
31
+ }
32
+ setColors() {
33
+ const colors = [
34
+ { name: '--color-background', theme: `${this.color}-lighter` },
35
+ { name: '--color-base', theme: `${this.color}-dark` },
36
+ { name: '--color-background-disabled', theme: 'neutral-pale' },
37
+ { name: '--color-outline-disabled', theme: 'neutral-medium' },
38
+ ];
39
+ colors.forEach(color => {
40
+ this.styles[color.name] = this.theme.colors.getColor(color.theme);
41
+ });
42
+ }
43
+ hostCSSProperties() {
44
+ return {
45
+ '--border-radius': this.borderRadius || '2px',
46
+ };
47
+ }
48
+ getClasses() {
49
+ const classes = {};
50
+ classes['badge-container'] = true;
51
+ classes[`icon-only`] = this.iconOnly;
52
+ classes['disabled'] = this.disabled;
53
+ classes[`${this.type}`] = true;
54
+ return classes;
55
+ }
56
+ getSymbolColor() {
57
+ return this.disabled
58
+ ? 'neutral-medium'
59
+ : `${this.color}-dark`;
60
+ }
61
+ getIcon() {
62
+ if (!this.iconName)
63
+ return '';
64
+ return h("cura-icon", { name: this.iconName, iconset: this.iconset, size: 'micro', color: this.getSymbolColor() });
65
+ }
66
+ render() {
67
+ const symbolColor = this.getSymbolColor();
68
+ return (h(Host, { key: 'b6870052543347fdc83a75629b30251ddab35e12', style: this.hostCSSProperties() }, h("div", { key: 'ae8b14c1c9c323b8387e7ed4e3a97bade9c712f4', class: this.getClasses(), style: this.styles }, this.getIcon(), h("cura-label", { key: 'd14ab9efd48f33c7b8153cf85699b2fc96ecd7af', size: 'xsmall', "line-height": "117%", color: symbolColor }, h("slot", { key: 'b684ca1b248d04700a2b8a7245c455fb9bdef474' })))));
69
+ }
70
+ get host() { return getElement(this); }
71
+ static get watchers() { return {
72
+ "color": ["handleColorChange"]
73
+ }; }
74
+ };
75
+ CuraBadgePill.style = CuraBadgePillStyle0;
76
+
77
+ export { CuraBadgePill as cura_badge_pill };
78
+
79
+ //# sourceMappingURL=cura-badge-pill.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-badge-pill.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,qrCAAqrC,CAAC;AAC/sC,4BAAe,gBAAgB;;MCMlB,aAAa;;;QAwCxB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;oBAlCwC,OAAO;qBAK+B,SAAS;;uBAUjF,SAAS;wBAKR,KAAK;wBAKL,KAAK;4BAKO,KAAK;sBAEnC,EAAE;;IAKpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,iBAAiB;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAEO,aAAa;QACnB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACxD,IAAI,CAAC,MAAM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,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,GAC5B,CAAC;KACJ;IAED,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,QACE,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACnC,4DAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IAC9C,IAAI,CAAC,OAAO,EAAE,EACf,mEAAY,IAAI,EAAC,QAAQ,iBAAa,MAAM,EAAC,KAAK,EAAE,WAAW,IAC7D,8DAAa,CACF,CACT,CACD,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/badges/cura-badge-pill/cura-badge-pill.scss?tag=cura-badge-pill&encapsulation=shadow","src/components/badges/cura-badge-pill/cura-badge-pill.tsx"],"sourcesContent":["@import \"../../../scss/mixins/spacing.scss\";\n\n.badge-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: #{$spacing-tiny};\n padding: #{$spacing-tiny};\n border-radius: var(--border-radius);\n font-family: var(--font-family);\n font-size: var(--font-size);\n position: relative;\n box-sizing: border-box;\n width: fit-content;\n height: #{$spacing-xs};\n min-width: #{$spacing-xs};\n\n background-color: var(--color-background);\n\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n pointer-events: none;\n }\n\n &.icon-only {\n cura-label {\n display: none !important;\n }\n }\n\n &.disabled {\n background-color: var(--color-background-disabled);\n }\n\n &.outline {\n background-color: transparent;\n\n &::before {\n border: 1px solid var(--color-base);\n }\n\n &.disabled::before {\n border: 1px solid var(--color-outline-disabled);\n }\n }\n\n &.transparent {\n background-color: transparent;\n\n &::before {\n border: 1px solid transparent;\n }\n\n &.disabled {\n background-color: transparent;\n }\n }\n\n cura-icon {\n display: flex;\n }\n}\n","import { Component, Host, Prop, State, h, Watch, Element } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-pill',\n styleUrl: 'cura-badge-pill.scss',\n shadow: true,\n})\nexport class CuraBadgePill {\n @Element() host: HTMLElement;\n\n /**\n * Badge type: solid | outline | transparent\n */\n @Prop({ reflect: true }) type: 'solid' | 'outline' | 'transparent' = 'solid';\n\n /**\n * Color base from color scheme. Default: primary\n */\n @Prop() color: 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' = 'primary';\n\n /**\n * Name of the icon to be used from iconset\n */\n @Prop({ reflect: true }) iconName: string;\n\n /**\n * Custom iconset if needed\n */\n @Prop({ reflect: true }) iconset = 'default';\n\n /**\n * Disabled state. Boolean\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Set badge to icon only. Boolean\n */\n @Prop({ reflect: true }) iconOnly = false;\n\n /**\n * Set border-radius.\n */\n @Prop({ reflect: true }) borderRadius: string = \"2px\";\n\n @State() styles = {};\n\n theme = window.CuraAPI.theme;\n\n @Watch('color')\n handleColorChange() {\n this.setColors();\n }\n\n connectedCallback() {\n this.setBaseStyles();\n this.setColors();\n }\n\n private setBaseStyles() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--font-family'] = this.theme.fonts.getFamily();\n this.styles['--font-size'] = this.theme.fonts.getSize();\n this.styles = { ...this.styles };\n }\n\n private setColors() {\n const colors = [\n { name: '--color-background', theme: `${this.color}-lighter` },\n { name: '--color-base', theme: `${this.color}-dark` },\n { name: '--color-background-disabled', theme: 'neutral-pale' },\n { name: '--color-outline-disabled', theme: 'neutral-medium' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = this.theme.colors.getColor(color.theme);\n });\n }\n\n hostCSSProperties() {\n return {\n '--border-radius': this.borderRadius || '2px',\n };\n }\n\n getClasses() {\n const classes = {};\n classes['badge-container'] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['disabled'] = this.disabled;\n classes[`${this.type}`] = true;\n return classes;\n }\n\n getSymbolColor() {\n return this.disabled\n ? 'neutral-medium'\n : `${this.color}-dark`;\n }\n\n getIcon() {\n if (!this.iconName) return '';\n return <cura-icon\n name={this.iconName}\n iconset={this.iconset}\n size={'micro'}\n color={this.getSymbolColor()}\n />;\n }\n\n render() {\n const symbolColor = this.getSymbolColor();\n return (\n <Host style={this.hostCSSProperties()}>\n <div class={this.getClasses()} style={this.styles}>\n {this.getIcon()}\n <cura-label size='xsmall' line-height=\"117%\" color={symbolColor}>\n <slot></slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -99,7 +99,7 @@ const CuraButtonOutline = class {
99
99
  render() {
100
100
  const symbolColor = this.getSymbolColor();
101
101
  const labelSize = labelSizes[this.size] || labelSizes["default"];
102
- return (h(Host, { key: '5adde27bc83165040d4279e4835646e13b08a412' }, 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 })))));
102
+ return (h(Host, { key: '8c7adeaec50deaf3829295d2231b390992064735' }, 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 })))));
103
103
  }
104
104
  static get formAssociated() { return true; }
105
105
  static get watchers() { return {
@@ -63,15 +63,6 @@ const CuraButtonSelect = class {
63
63
  return this.selected ? 'neutral-white' : 'neutral-black';
64
64
  }
65
65
  }
66
- getColorCounter() {
67
- if (this.background === 'dark' && this.disabled) {
68
- return !this.selected ? 'neutral-black' : 'neutral-dark';
69
- }
70
- if (this.background === 'light' && this.disabled) {
71
- return 'neutral-pale';
72
- }
73
- return `${this.color}-lighter`;
74
- }
75
66
  getColorBagdeNumber() {
76
67
  if (this.background === 'dark' && this.disabled) {
77
68
  return this.selected ? 'neutral-black' : 'neutral-dark';
@@ -89,7 +80,7 @@ const CuraButtonSelect = class {
89
80
  return h("cura-icon", { name: this.iconName, size: iconSize, color: this.getLabelFontColor() });
90
81
  }
91
82
  getCounter() {
92
- return (h("cura-badge-number", { color: this.getColorCounter(), class: "badge-number" }, h("cura-label", { color: this.getColorBagdeNumber(), size: "small" }, this.counter)));
83
+ return (h("cura-badge-counter", { number: this.counter, color: this.color, disabled: this.disabled || null, class: "badge-number" }));
93
84
  }
94
85
  getCheckIconRight() {
95
86
  const iconSize = this.size === 'large' ? 20 : 16;
@@ -111,7 +102,7 @@ const CuraButtonSelect = class {
111
102
  }
112
103
  render() {
113
104
  const labelSize = labelSizes[this.size] || labelSizes['default'];
114
- return (h(Host, { key: '8b766a3e23c2af13a47d113884047d19717702f2' }, h("button", { key: '90b57f260baa61de7c73e09965e190cd13eb62e1', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: 'f318438fa59f43846ce5043e4ee290faf3cf05d4', class: "button-container" }, this.iconName ? this.getIcon() : null, h("cura-label", { key: '2d069740c62b32dd3aa0fd74bdafb951d8deb73b', class: "label", size: labelSize, lineHeight: "0%", color: this.getLabelFontColor(), weight: "regular" }, h("slot", { key: 'e71e072d1dd91bbbafa939181cc22ba7b7c6189e' })), this.counter ? this.getCounter() : null, this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null))));
105
+ return (h(Host, { key: '54bf5dc64b99128f839fdc22ff56dd709971fc8e' }, h("button", { key: '422e4d80d321fb9e4cddd165700220071012bea8', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: '6c40080d1b8746e394539cf717d658e4d834c500', class: "button-container" }, this.iconName ? this.getIcon() : null, h("cura-label", { key: 'f2f9b54cbcd2c7a571d966ba20f344384ecaadc0', class: "label", size: labelSize, lineHeight: "0%", color: this.getLabelFontColor(), weight: "regular" }, h("slot", { key: 'f5c471e0771c6c19685aa591461a73b1aaa83c47' })), this.counter ? this.getCounter() : null, this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null))));
115
106
  }
116
107
  get host() { return getElement(this); }
117
108
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-button-select.entry.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,usGAAusG,CAAC;AACpuG,+BAAe,mBAAmB;;MCOrB,gBAAgB;;;;QAiB3B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;wBAdsB,KAAK;;oBAEM,QAAQ;;;0BAG/B,OAAO;qBACtB,SAAS;;uBAGd,KAAK;sBACN,EAAE;;IAUp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,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,IAE3C,4DAAK,KAAK,EAAC,kBAAkB,IAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,EACtC,mEAAY,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAC,SAAS,IAC1G,8DAAa,CACF,EACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,EACvC,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAC7E,CACC,CACJ,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import '../../../scss/mixins/buttons.scss';\n\n:host {\n @include button-host();\n\n button,\n a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: none;\n\n &::before {\n content: '';\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 2px solid var(--color-border);\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled):hover {\n background-color: var(--color-background-hover);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-border) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n flex-direction: row !important;\n\n .badge-number {\n margin-left: 10px;\n }\n }\n\n @include button-icon();\n\n // selected state\n @include button-selected() {\n background-color: var(--color-select);\n border-color: var(--color-select);\n\n &:not(.disabled):hover {\n background-color: var(--color-border-hover-pressed);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-select-focus) !important;\n }\n\n &.disabled {\n background-color: var(--color-disable-select);\n border-color: var(--color-disable-select);\n }\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--color-border-disable-unselect);\n }\n }\n}\n","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"],"version":3}
1
+ {"file":"cura-button-select.entry.js","mappings":";;;AAAA,MAAM,mBAAmB,GAAG,usGAAusG,CAAC;AACpuG,+BAAe,mBAAmB;;MCOrB,gBAAgB;;;;QAiB3B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;wBAdsB,KAAK;;oBAEM,QAAQ;;;0BAG/B,OAAO;qBACtB,SAAS;;uBAGd,KAAK;sBACN,EAAE;;IAUpB,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,KAAK,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK,SAAS,GAAG,eAAe,EAAE;YACzG,EAAE,IAAI,EAAE,8BAA8B,EAAE,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IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAC7E,CACC,CACJ,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import '../../../scss/mixins/buttons.scss';\n\n:host {\n @include button-host();\n\n button,\n a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: none;\n\n &::before {\n content: '';\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 2px solid var(--color-border);\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled):hover {\n background-color: var(--color-background-hover);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-border) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n flex-direction: row !important;\n\n .badge-number {\n margin-left: 10px;\n }\n }\n\n @include button-icon();\n\n // selected state\n @include button-selected() {\n background-color: var(--color-select);\n border-color: var(--color-select);\n\n &:not(.disabled):hover {\n background-color: var(--color-border-hover-pressed);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-select-focus) !important;\n }\n\n &.disabled {\n background-color: var(--color-disable-select);\n border-color: var(--color-disable-select);\n }\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--color-border-disable-unselect);\n }\n }\n}\n","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"],"version":3}
@@ -88,7 +88,7 @@ const CuraButtonTransparent = class {
88
88
  render() {
89
89
  const symbolColor = this.getSymbolColor();
90
90
  const labelSize = labelSizes[this.size] || labelSizes["default"];
91
- 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 })))));
91
+ 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 })))));
92
92
  }
93
93
  static get formAssociated() { return true; }
94
94
  static get watchers() { return {
@@ -3902,7 +3902,7 @@ const CuraCalendar = class {
3902
3902
  }
3903
3903
  render() {
3904
3904
  const { months } = this.fetchMonthNames();
3905
- 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
3905
+ 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
3906
3906
  ? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
3907
3907
  : 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)));
3908
3908
  }
@@ -39,7 +39,7 @@ const CuraCard = class {
39
39
  return classes;
40
40
  }
41
41
  render() {
42
- 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)))));
42
+ 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)))));
43
43
  }
44
44
  };
45
45
  CuraCard.style = CuraCardStyle0;
@@ -160,7 +160,7 @@ const CuraCheckbox = class {
160
160
  return h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
161
161
  }
162
162
  render() {
163
- return (h(Host, { key: '876fa0a7aa0fc7110cbf0ffeb2d95d529fa78e64' }, h("div", { key: '3e6d730765590ee75d7e045cadc7d03e5fc035e2', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, h("div", { key: '0f7f6f3bc61a80e899d940d76fee266af1914f5a', class: "info" }, h("div", { key: 'a836cb0d7751a1a812364fe93a30403b02ec5c95', class: "label-wrapper" }, h("cura-label", { key: '5d180552ec71e22ddd8822727bd32d4167215f33', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '047413aa21a28bc33984d19ad4dc10a38289c205', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '68c9dd6f228ec3204647795f1cae32a8f8797bc2', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '3a35a1219f135002f1b9ae64c0eb4227529bc904' }))), h("div", { key: 'fe969ee332b3c64a259ec552f411b5d2d4bc81e4', class: 'checkbox', tabIndex: this.ontabindex }, h("input", { key: '2cbcbe56130bddb5853cfcc3a8ef1b421f39bc7b', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
163
+ return (h(Host, { key: '29437631c4078574a1123fcd27f471efd6738a2c' }, h("div", { key: '3821e17c78c011a7ab1fb4ab148258fe85be7d19', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, h("div", { key: '0f868dfa5f35c3cd11d870eca977bb2a9c67a7d7', class: "info" }, h("div", { key: '05cf807789ad779bf90946926176a2a17b1c4704', class: "label-wrapper" }, h("cura-label", { key: '979497d243d7296f2c8bb5347ab01d2e12568c01', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: 'a8e3a3b6a891bb4c2ade3271fe8d11674770c160', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: 'afcd5016c3f232e05684b38e8ec97d6e604b8f12', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: 'af27633296d454363d71d5b27227c40a26a4e119' }))), h("div", { key: 'd357e30a36326de76d1cd91332a32e3befeb03a9', class: 'checkbox', tabIndex: this.ontabindex }, h("input", { key: '0ef63518fced76e52746b79cd598f96065f83a60', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
164
164
  }
165
165
  static get formAssociated() { return true; }
166
166
  get host() { return getElement(this); }
@@ -65,7 +65,7 @@ const CuraDisplay = class {
65
65
  return tags[`${this.level}`] || tags['default'];
66
66
  }
67
67
  render() {
68
- return (h(Host, { key: '9d75215eaa43baaf9ca9aada36dfdbff4596afb2', style: this.hostCSSProperties() }, this.getHeadingTag()));
68
+ return (h(Host, { key: '32758f666bb547d7cd3646694e8cc132a795bc44', style: this.hostCSSProperties() }, this.getHeadingTag()));
69
69
  }
70
70
  get host() { return getElement(this); }
71
71
  static get watchers() { return {
@@ -8,7 +8,7 @@ const CuraDropdownSearchOptionTitle = class {
8
8
  registerInstance(this, hostRef);
9
9
  }
10
10
  render() {
11
- return (h(Host, { key: 'ed1d2aeeba08c3c53f04f434fa46cb178271f405', slot: "dropdown-search-option" }, h("cura-label", { key: '910b1ada8d333ace0171a3180ba6320e813e4fce', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: '20816c3a0c9805a88074f36e060ad850157427e2' }))));
11
+ return (h(Host, { key: 'ff083af27d3250e4722c6f238b80b33f739cb64c', slot: "dropdown-search-option" }, h("cura-label", { key: '62e9b2a758e000eb1ce5e5a76c1e9e555b5a4c8c', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: 'e96fd0daa9b210bdea256d88c17b6cc9c425c5bc' }))));
12
12
  }
13
13
  };
14
14
  CuraDropdownSearchOptionTitle.style = CuraDropdownSearchOptionTitleStyle0;
@@ -42,12 +42,12 @@ const CuraDropdownSearchOption = class {
42
42
  }
43
43
  }
44
44
  render() {
45
- return (h(Host, { key: '0dfb8d67f1aee692af5abdad170f2fc3e6c5ffc6', slot: "dropdown-search-option" }, h("div", { key: '6596c224bbfc0e9b5c3d2a39d064852019af5b74', style: this.styles, class: {
45
+ return (h(Host, { key: '333293644b47d0b7b8e288cf6a81e3e8916a82bd', slot: "dropdown-search-option" }, h("div", { key: '5a7f789204607805d65c3b0a586ffdeb54c10a02', style: this.styles, class: {
46
46
  "option-container": true,
47
47
  hovered: this.selectable ? this.hovered : false,
48
48
  selected: this.selected,
49
49
  disabled: !this.selectable
50
- } }, h("div", { key: 'b73badabbcde37615c58707d8a62832363deb694', class: "content-container" }, h("div", { key: '6ea1e5cfa3aa5f7bb7d0a4a2c9c8aff6e076304c', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: '9e6272b220a723fbc1b52a23f59873cb4eea0986', name: "image" }), h("cura-heading", { key: '4bec4f91fd5ef5759373d846c0876678e67b1b48', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: 'c485bfd68ddf4b5bcfa0c590c11344352939fe87' }))), h("slot", { key: '0ce8978f72401af3580c72919b6079ef222dcc0d', name: "action" })))));
50
+ } }, h("div", { key: '7ba5fd8f0f35fe0b5856fdaeedf09c7cb8d4fd24', class: "content-container" }, h("div", { key: '6618b6f7248e43be1f6915800662d48bf3a08f7c', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: 'c8c6d3a059d221ae3871f2cb048cb6145bec3546', name: "image" }), h("cura-heading", { key: '4678a347d5211c38c9e05dded43ab68840cebca2', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: '97a34c9bb70e3aaf34fb3ead81ef5e6a0cd05782' }))), h("slot", { key: 'fecb411b2de2c169f01cf1a8c1ca2ed14ee049e9', name: "action" })))));
51
51
  }
52
52
  get hostElement() { return getElement(this); }
53
53
  static get watchers() { return {
@@ -15,20 +15,10 @@ const CuraDropdownSearch = class {
15
15
  const isKeyboardOpen = window.innerHeight < window.screen.height * 0.8;
16
16
  const dropdown = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.dropdown-mobile');
17
17
  if (dropdown) {
18
- if (isKeyboardOpen) {
19
- dropdown.style.position = 'absolute';
20
- dropdown.style.bottom = `${window.screen.height - window.innerHeight}px`;
21
- }
22
- else {
23
- dropdown.style.position = 'fixed';
24
- dropdown.style.bottom = '0';
25
- }
18
+ dropdown.style.position = isKeyboardOpen ? 'absolute' : 'fixed';
19
+ dropdown.style.bottom = isKeyboardOpen ? `${window.screen.height - window.innerHeight}px` : '0';
20
+ window.scroll({ top: 0, left: 0, behavior: 'smooth' });
26
21
  }
27
- window.scroll({
28
- top: 0,
29
- left: 0,
30
- behavior: 'smooth',
31
- });
32
22
  });
33
23
  };
34
24
  this.handleSlotChange = () => {
@@ -66,6 +56,7 @@ const CuraDropdownSearch = class {
66
56
  this.showOverlay();
67
57
  }
68
58
  else {
59
+ this.resetDropdownStyles();
69
60
  this.removeOverlay();
70
61
  }
71
62
  }
@@ -90,6 +81,7 @@ const CuraDropdownSearch = class {
90
81
  this.isOnBlurInput = true;
91
82
  this.hoveredIndex = -1;
92
83
  this.options = [];
84
+ this.originalOverflow = '';
93
85
  }
94
86
  connectedCallback() {
95
87
  this.weights = window.CuraAPI.theme.fonts.getWeights();
@@ -141,12 +133,15 @@ const CuraDropdownSearch = class {
141
133
  this.overlayElement.style.zIndex = '9999';
142
134
  this.overlayElement.style.backgroundColor = 'white';
143
135
  document.body.appendChild(this.overlayElement);
136
+ this.originalOverflow = document.body.style.overflow;
137
+ document.body.style.overflow = 'hidden';
144
138
  }
145
139
  }
146
140
  removeOverlay() {
147
141
  if (this.overlayElement && this.overlayElement.parentNode === document.body) {
148
142
  document.body.removeChild(this.overlayElement);
149
143
  this.overlayElement = null;
144
+ document.body.style.overflow = this.originalOverflow;
150
145
  }
151
146
  }
152
147
  addClickListenersToOptions() {
@@ -170,6 +165,7 @@ const CuraDropdownSearch = class {
170
165
  this.updateSelectedOption(this.value);
171
166
  this.isDropdownOpen = false;
172
167
  this.isOnBlurInput = true;
168
+ this.resetDropdownStyles();
173
169
  this.removeOverlay();
174
170
  }
175
171
  }
@@ -209,6 +205,7 @@ const CuraDropdownSearch = class {
209
205
  if (this.isOnBlurInput === true) {
210
206
  setTimeout(() => {
211
207
  this.isDropdownOpen = false;
208
+ this.resetDropdownStyles();
212
209
  this.removeOverlay();
213
210
  }, 200);
214
211
  }
@@ -242,11 +239,23 @@ const CuraDropdownSearch = class {
242
239
  this.host.style.setProperty('--dynamic-input-search-height', `${dropdownInputSearchElement.offsetHeight}px`);
243
240
  }
244
241
  }
242
+ handleGoBack() {
243
+ this.resetDropdownStyles();
244
+ this.isMobile = false;
245
+ }
246
+ resetDropdownStyles() {
247
+ var _a;
248
+ const dropdown = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.dropdown-mobile');
249
+ if (dropdown && dropdown.style.position === 'fixed') {
250
+ dropdown.style.position = 'relative';
251
+ dropdown.style.removeProperty('bottom');
252
+ }
253
+ }
245
254
  render() {
246
255
  const isMobileDropdown = this.isMobile && this.isDropdownOpen;
247
- return (h(Host, { key: 'fb9a745e5ae24c5abbf9c3c6ce8f0df2d5fcf01f', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: 'efc455c59f27bb254a10bbe4c62eec3e627eebb7', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: '4542af0eede7676c2a4ce7e4e88fa8983c0eec15', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: '2100335a869d32e7d4f6820bc64e02e308ab29e1', fontColor: "dark", onClick: () => (this.isMobile = false), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: 'fe1c21c892226c704c36107d250aac5f5b3cf0e0', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
256
+ return (h(Host, { key: '5acd835c67558501ac74915597423754c1d412ea', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: 'cb0ca2ec4f574f95897163726f81b75b18a4505e', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: 'c6eac11c0c3420e35b7432af8748976f32814851', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: 'd1cd468c497877ad7f4f22a5dd1bc5bc662bfa6e', fontColor: "dark", onClick: () => this.handleGoBack(), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: '35f3943ecd4966a1d27ed9e4fba4de08376dd767', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
248
257
  this.handleOnBlur();
249
- }, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: 'b03a633b3e9e45fc4539d4e7a2282ae388bb2e96', name: "helperText" }))), h("div", { key: 'e8e88a4f884e386de33cea7f3bcf175a7e78b168', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: 'f3aa2664cd496ccdd984a58c25f84fd9f616d157', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
258
+ }, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: '13cffd23e80ec86b266c5b109b2e8ecb89f28944', name: "helperText" }))), h("div", { key: 'f0047c0b74057fbf21893f3c92fcaf97db59e544', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: '386584475924a3a621308e50697c49bcbe5f1bae', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
250
259
  }
251
260
  get host() { return getElement(this); }
252
261
  static get watchers() { return {