@rededor/cura 1.2.0 → 1.3.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/{app-globals-4d07f363.js → app-globals-f33ceef8.js} +32 -1
  2. package/dist/cjs/app-globals-f33ceef8.js.map +1 -0
  3. package/dist/cjs/cura-accordion_12.cjs.entry.js +39 -38
  4. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.cjs.entry.js +3 -2
  6. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-badge-number.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-button-select.cjs.entry.js +17 -9
  13. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  20. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
  21. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
  22. package/dist/cjs/cura-dropdown-search.cjs.entry.js +21 -11
  23. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  24. package/dist/cjs/cura-icons-view.cjs.entry.js +3 -3
  25. package/dist/cjs/cura-input-date.cjs.entry.js +45 -45
  26. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  27. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  30. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  31. package/dist/cjs/cura-tooltip.cjs.entry.js +232 -0
  32. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -0
  33. package/dist/cjs/cura.cjs.js +2 -2
  34. package/dist/cjs/loader.cjs.js +2 -2
  35. package/dist/collection/api/theme-presets/theme-presets.js +2 -0
  36. package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
  37. package/dist/collection/api/theme-presets/theme-richet.js +32 -0
  38. package/dist/collection/api/theme-presets/theme-richet.js.map +1 -0
  39. package/dist/collection/collection-manifest.json +1 -0
  40. package/dist/collection/components/accordion/cura-accordion/cura-accordion.css +0 -6
  41. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +41 -43
  42. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  43. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +54 -36
  44. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  45. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +61 -60
  46. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +41 -23
  47. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
  48. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
  49. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -2
  50. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +1 -1
  51. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -1
  52. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  53. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  54. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +36 -2
  55. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +39 -11
  56. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  57. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +18 -7
  58. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -1
  59. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  60. package/dist/collection/components/cura-alert/cura-alert.css +25 -11
  61. package/dist/collection/components/cura-alert/cura-alert.js +2 -1
  62. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  63. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  64. package/dist/collection/components/cura-calendar/cura-calendar.css +1 -0
  65. package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
  66. package/dist/collection/components/cura-card/cura-card.js +1 -1
  67. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  68. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  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.css +159 -0
  72. package/dist/collection/components/cura-tooltip/cura-tooltip.js +397 -0
  73. package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -0
  74. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js +137 -0
  75. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js.map +1 -0
  76. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  77. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  78. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  79. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  80. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +20 -10
  81. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  82. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +15 -0
  83. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +69 -68
  84. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
  85. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +29 -10
  86. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
  87. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
  88. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  89. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  90. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  91. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  92. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  93. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  94. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  95. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  96. package/dist/collection/components/text/cura-heading/cura-heading.css +5 -1
  97. package/dist/collection/components/text/cura-heading/cura-heading.js +7 -6
  98. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  99. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  100. package/dist/components/cura-accordion-item.js +19 -12
  101. package/dist/components/cura-accordion-item.js.map +1 -1
  102. package/dist/components/cura-accordion.js +14 -15
  103. package/dist/components/cura-accordion.js.map +1 -1
  104. package/dist/components/cura-alert.js +3 -2
  105. package/dist/components/cura-alert.js.map +1 -1
  106. package/dist/components/cura-avatar.js +1 -1
  107. package/dist/components/cura-badge-distance.js +1 -1
  108. package/dist/components/cura-badge-number2.js +2 -2
  109. package/dist/components/cura-badge-number2.js.map +1 -1
  110. package/dist/components/cura-button-outline.js +1 -1
  111. package/dist/components/cura-button-select.js +18 -9
  112. package/dist/components/cura-button-select.js.map +1 -1
  113. package/dist/components/cura-button-transparent2.js +1 -1
  114. package/dist/components/cura-button.js +1 -1
  115. package/dist/components/cura-calendar2.js +2 -2
  116. package/dist/components/cura-calendar2.js.map +1 -1
  117. package/dist/components/cura-card.js +1 -1
  118. package/dist/components/cura-checkbox.js +1 -1
  119. package/dist/components/cura-display.js +1 -1
  120. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  121. package/dist/components/cura-dropdown-search-option.js +2 -2
  122. package/dist/components/cura-dropdown-search.js +21 -11
  123. package/dist/components/cura-dropdown-search.js.map +1 -1
  124. package/dist/components/cura-heading2.js +8 -7
  125. package/dist/components/cura-heading2.js.map +1 -1
  126. package/dist/components/cura-icon2.js +1 -1
  127. package/dist/components/cura-icons-view.js +3 -3
  128. package/dist/components/cura-input-date.js +54 -57
  129. package/dist/components/cura-input-date.js.map +1 -1
  130. package/dist/components/cura-label2.js +1 -1
  131. package/dist/components/cura-loader-bar2.js +1 -1
  132. package/dist/components/cura-loader-circle2.js +1 -1
  133. package/dist/components/cura-page-template.js +1 -1
  134. package/dist/components/cura-paragraph2.js +1 -1
  135. package/dist/components/cura-radio.js +1 -1
  136. package/dist/components/cura-select-option2.js +1 -1
  137. package/dist/components/cura-select2.js +3 -3
  138. package/dist/components/cura-switch.js +1 -1
  139. package/dist/components/cura-toast.js +1 -1
  140. package/dist/components/cura-tooltip.d.ts +11 -0
  141. package/dist/components/cura-tooltip.js +291 -0
  142. package/dist/components/cura-tooltip.js.map +1 -0
  143. package/dist/components/index.js +33 -0
  144. package/dist/components/index.js.map +1 -1
  145. package/dist/cura/cura.esm.js +1 -1
  146. package/dist/cura/cura.esm.js.map +1 -1
  147. package/dist/cura/{p-116a1cd6.entry.js → p-01e301d4.entry.js} +2 -2
  148. package/dist/cura/{p-c6508bd7.entry.js → p-022b22b6.entry.js} +2 -2
  149. package/dist/cura/p-0308cf6b.entry.js +2 -0
  150. package/dist/cura/p-0308cf6b.entry.js.map +1 -0
  151. package/dist/cura/p-22e921d9.entry.js +2 -0
  152. package/dist/cura/p-22e921d9.entry.js.map +1 -0
  153. package/dist/cura/p-2b9eadc7.entry.js +2 -0
  154. package/dist/cura/p-2b9eadc7.entry.js.map +1 -0
  155. package/dist/cura/{p-b2d5db22.entry.js → p-2c0f5497.entry.js} +2 -2
  156. package/dist/cura/p-5bb8302c.entry.js +2 -0
  157. package/dist/cura/p-5bb8302c.entry.js.map +1 -0
  158. package/dist/cura/{p-fcbf4311.entry.js → p-639c1b67.entry.js} +2 -2
  159. package/dist/cura/{p-2956f120.entry.js → p-7853ab16.entry.js} +2 -2
  160. package/dist/cura/{p-2956f120.entry.js.map → p-7853ab16.entry.js.map} +1 -1
  161. package/dist/cura/{p-41c3d47d.entry.js → p-81c66f2b.entry.js} +2 -2
  162. package/dist/cura/p-82b99090.js +2 -0
  163. package/dist/cura/p-82b99090.js.map +1 -0
  164. package/dist/cura/p-93525d68.entry.js +2 -0
  165. package/dist/cura/p-93525d68.entry.js.map +1 -0
  166. package/dist/cura/p-9991f7db.entry.js +2 -0
  167. package/dist/cura/p-9e3d26fe.entry.js +2 -0
  168. package/dist/cura/p-9e3d26fe.entry.js.map +1 -0
  169. package/dist/cura/{p-dcd2e5bb.entry.js → p-a7ecea4a.entry.js} +2 -2
  170. package/dist/cura/{p-33772510.entry.js → p-b0451cb3.entry.js} +2 -2
  171. package/dist/cura/{p-8f3db0fe.entry.js → p-b883e098.entry.js} +2 -2
  172. package/dist/cura/{p-907b3d12.entry.js → p-bfb5e9e1.entry.js} +2 -2
  173. package/dist/cura/{p-e5023e34.entry.js → p-c444e692.entry.js} +2 -2
  174. package/dist/cura/{p-fdce91a7.entry.js → p-d635501a.entry.js} +2 -2
  175. package/dist/cura/{p-fd083399.entry.js → p-df851816.entry.js} +2 -2
  176. package/dist/cura/{p-44e3325a.entry.js → p-e3d3bc3d.entry.js} +2 -2
  177. package/dist/cura/p-eda28278.entry.js +2 -0
  178. package/dist/cura/p-eda28278.entry.js.map +1 -0
  179. package/dist/esm/{app-globals-6ca7103d.js → app-globals-e54ee4c3.js} +32 -1
  180. package/dist/esm/app-globals-e54ee4c3.js.map +1 -0
  181. package/dist/esm/cura-accordion_12.entry.js +39 -38
  182. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  183. package/dist/esm/cura-alert.entry.js +3 -2
  184. package/dist/esm/cura-alert.entry.js.map +1 -1
  185. package/dist/esm/cura-avatar.entry.js +1 -1
  186. package/dist/esm/cura-badge-distance.entry.js +1 -1
  187. package/dist/esm/cura-badge-number.entry.js +2 -2
  188. package/dist/esm/cura-badge-number.entry.js.map +1 -1
  189. package/dist/esm/cura-button-outline.entry.js +1 -1
  190. package/dist/esm/cura-button-select.entry.js +17 -9
  191. package/dist/esm/cura-button-select.entry.js.map +1 -1
  192. package/dist/esm/cura-button-transparent.entry.js +1 -1
  193. package/dist/esm/cura-calendar.entry.js +2 -2
  194. package/dist/esm/cura-calendar.entry.js.map +1 -1
  195. package/dist/esm/cura-card.entry.js +1 -1
  196. package/dist/esm/cura-checkbox.entry.js +1 -1
  197. package/dist/esm/cura-display.entry.js +1 -1
  198. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  199. package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
  200. package/dist/esm/cura-dropdown-search.entry.js +21 -11
  201. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  202. package/dist/esm/cura-icons-view.entry.js +3 -3
  203. package/dist/esm/cura-input-date.entry.js +45 -45
  204. package/dist/esm/cura-input-date.entry.js.map +1 -1
  205. package/dist/esm/cura-loader-bar.entry.js +1 -1
  206. package/dist/esm/cura-radio.entry.js +1 -1
  207. package/dist/esm/cura-switch.entry.js +1 -1
  208. package/dist/esm/cura-toast.entry.js +1 -1
  209. package/dist/esm/cura-tooltip.entry.js +228 -0
  210. package/dist/esm/cura-tooltip.entry.js.map +1 -0
  211. package/dist/esm/cura.js +2 -2
  212. package/dist/esm/loader.js +2 -2
  213. package/dist/types/api/theme-presets/theme-presets.d.ts +43 -0
  214. package/dist/types/api/theme-presets/theme-richet.d.ts +43 -0
  215. package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +7 -3
  216. package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +38 -16
  217. package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +8 -3
  218. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +2 -0
  219. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +14 -0
  220. package/dist/types/components/cura-tooltip/cura-tooltip.d.ts +25 -0
  221. package/dist/types/components/cura-tooltip/cura-tooltip.stories.d.ts +119 -0
  222. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +1 -0
  223. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +19 -19
  224. package/dist/types/components/text/cura-heading/cura-heading.d.ts +1 -0
  225. package/dist/types/components.d.ts +75 -10
  226. package/package.json +2 -2
  227. package/dist/cjs/app-globals-4d07f363.js.map +0 -1
  228. package/dist/cura/p-0b7a7306.js +0 -2
  229. package/dist/cura/p-0b7a7306.js.map +0 -1
  230. package/dist/cura/p-2d267d23.entry.js +0 -2
  231. package/dist/cura/p-2d267d23.entry.js.map +0 -1
  232. package/dist/cura/p-4e14c01c.entry.js +0 -2
  233. package/dist/cura/p-b43b69f3.entry.js +0 -2
  234. package/dist/cura/p-b43b69f3.entry.js.map +0 -1
  235. package/dist/cura/p-be10b681.entry.js +0 -2
  236. package/dist/cura/p-be10b681.entry.js.map +0 -1
  237. package/dist/cura/p-cda24a1e.entry.js +0 -2
  238. package/dist/cura/p-cda24a1e.entry.js.map +0 -1
  239. package/dist/cura/p-e8bc6381.entry.js +0 -2
  240. package/dist/cura/p-e8bc6381.entry.js.map +0 -1
  241. package/dist/cura/p-ed97cf3c.entry.js +0 -2
  242. package/dist/cura/p-ed97cf3c.entry.js.map +0 -1
  243. package/dist/esm/app-globals-6ca7103d.js.map +0 -1
  244. /package/dist/cura/{p-116a1cd6.entry.js.map → p-01e301d4.entry.js.map} +0 -0
  245. /package/dist/cura/{p-c6508bd7.entry.js.map → p-022b22b6.entry.js.map} +0 -0
  246. /package/dist/cura/{p-b2d5db22.entry.js.map → p-2c0f5497.entry.js.map} +0 -0
  247. /package/dist/cura/{p-fcbf4311.entry.js.map → p-639c1b67.entry.js.map} +0 -0
  248. /package/dist/cura/{p-41c3d47d.entry.js.map → p-81c66f2b.entry.js.map} +0 -0
  249. /package/dist/cura/{p-4e14c01c.entry.js.map → p-9991f7db.entry.js.map} +0 -0
  250. /package/dist/cura/{p-dcd2e5bb.entry.js.map → p-a7ecea4a.entry.js.map} +0 -0
  251. /package/dist/cura/{p-33772510.entry.js.map → p-b0451cb3.entry.js.map} +0 -0
  252. /package/dist/cura/{p-8f3db0fe.entry.js.map → p-b883e098.entry.js.map} +0 -0
  253. /package/dist/cura/{p-907b3d12.entry.js.map → p-bfb5e9e1.entry.js.map} +0 -0
  254. /package/dist/cura/{p-e5023e34.entry.js.map → p-c444e692.entry.js.map} +0 -0
  255. /package/dist/cura/{p-fdce91a7.entry.js.map → p-d635501a.entry.js.map} +0 -0
  256. /package/dist/cura/{p-fd083399.entry.js.map → p-df851816.entry.js.map} +0 -0
  257. /package/dist/cura/{p-44e3325a.entry.js.map → p-e3d3bc3d.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as o,H as r,g as s}from"./p-fd5ed6b0.js";import{l as i}from"./p-efcb32eb.js";const a=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--color-border)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-background-hover);border-color:var(--color-border-hover-pressed)}:host button:focus,:host a:focus{border-color:var(--color-border) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, "left")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:10px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-select);border-color:var(--color-select)}:host button.selected:not(.disabled):hover,:host a.selected:not(.disabled):hover{background-color:var(--color-border-hover-pressed);border-color:var(--color-border-hover-pressed)}:host button.selected:focus,:host a.selected:focus{border-color:var(--color-select-focus) !important}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--color-disable-select);border-color:var(--color-disable-select)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--color-border-disable-unselect)}';const l=a;const n=class{constructor(o){t(this,o);this.onclick=e(this,"onclick",7);this.theme=window.CuraAPI.theme;this.selected=false;this.iconName=undefined;this.size=undefined;this.counter=undefined;this.disabled=undefined;this.background=undefined;this.color=undefined;this.hovered=false;this.styles={}}setColors(){const t=[{name:"--color-border",thema:this.background==="light"?`${this.color}-darker`:"neutral-white"},{name:"--color-border-hover-pressed",thema:this.background==="light"?`${this.color}-dark`:`${this.color}-light`},{name:"--color-background-hover",thema:this.background==="light"?`${this.color}-light`:`${this.color}-dark`},{name:"--color-select",thema:this.background==="light"?`${this.color}-base`:"neutral-white"},{name:"--color-select-hover-pressed",thema:this.background==="light"?`${this.color}-dark`:`${this.color}-lighter`},{name:"--color-select-focus",thema:this.background==="light"?`${this.color}-base`:`${this.color}-lighter`},{name:"--color-disable-select",thema:this.background==="light"?"neutral-white":"neutral-black"},{name:"--color-border-disable-unselect",thema:"neutral-dark"},{name:"--color-counter-disabled",thema:this.background==="light"?"neutral-pale":"neutral-black"},{name:"--color-counter",thema:!this.disabled&&"primary-lighter"}];t.forEach((t=>this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.thema)));this.styles=Object.assign({},this.styles)}getClasses(){var t;const e={};e[`${(t=this.size)===null||t===void 0?void 0:t.toLowerCase()}`]=true;e["icon"]=true;e["disabled"]=this.disabled;e["selected"]=this.selected;return e}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium;this.setColors()}getLabelFontColor(){if(this.disabled)return"neutral-dark";if(this.background==="dark"){return this.selected?"neutral-black":"neutral-white"}if(this.background==="light"){return this.selected?"neutral-white":"neutral-black"}}getColorCounter(){if(this.background==="dark"&&this.disabled){return!this.selected?"neutral-black":"neutral-dark"}if(this.background==="light"&&this.disabled){return"neutral-pale"}return`${this.color}-lighter`}getColorBagdeNumber(){if(this.background==="dark"&&this.disabled){return this.selected?"neutral-black":"neutral-dark"}if(this.background==="light"&&this.disabled){return"neutral-medium"}return`${this.color}-darker`}getIcon(){const t=this.size==="large"?24:this.size==="medium"?20:16;return o("cura-icon",{class:"button-icon",name:this.iconName,size:t,color:this.getLabelFontColor()})}getCounter(){return o("cura-badge-number",{color:this.getColorCounter()},o("cura-label",{color:this.getColorBagdeNumber()},this.counter))}handleMouseEnter(){if(this.disabled)return;this.hovered=true}handleMouseLeave(){this.hovered=false}handleClick(t){if(this.disabled)t.preventDefault();this.selected=!this.selected;this.onclick.emit({selected:this.selected})}render(){const t=i[this.size]||i["default"];return o(r,{key:"368f94693c0ce8ec2d95a9eb258fd6e411ade7a5"},o("button",{key:"ddc421e819342b29772d763b0a62f98a4aca37c0",class:this.getClasses(),style:this.styles,disabled:this.disabled,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},o("div",{key:"70bb7a295f1fb8984aabc432edf6e8e3f464daf1",class:"button-container"},this.iconName?this.getIcon():null,o("cura-label",{key:"281bbb73ff59a231f2daef9bac9a49b46f3c55df",class:"label",size:t,lineHeight:"0%",color:this.getLabelFontColor(),weight:"regular"},o("slot",{key:"ef955647ac927fea6bb1dc686720031260fc5212"})),this.counter?this.getCounter():null)))}get host(){return s(this)}static get watchers(){return{background:["setColors"],color:["setColors"]}}};n.style=l;export{n as cura_button_select};
2
- //# sourceMappingURL=p-cda24a1e.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaButtonSelectCss","CuraButtonSelectStyle0","CuraButtonSelect","this","theme","window","CuraAPI","setColors","colors","name","thema","background","color","disabled","forEach","styles","getColor","Object","assign","getClasses","classes","_a","size","toLowerCase","selected","connectedCallback","weights","fonts","getWeights","spacing","getSpacing","getSize","getFamily","medium","getLabelFontColor","getColorCounter","getColorBagdeNumber","getIcon","iconSize","h","class","iconName","getCounter","counter","handleMouseEnter","hovered","handleMouseLeave","handleClick","e","preventDefault","onclick","emit","render","labelSize","labelSizes","Host","key","style","onClick","onMouseEnter","onMouseLeave","lineHeight","weight"],"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: 2px solid var(--color-border);\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 gap: 10px;\n }\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';\n @Prop({ reflect: true, mutable: true }) counter: string | number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light';\n @Prop() color: string;\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'] = 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' ? 24 : this.size === 'medium' ? 20 : 16;\n\n return <cura-icon class=\"button-icon\" name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-number color={this.getColorCounter()}>\n <cura-label color={this.getColorBagdeNumber()}>{this.counter}</cura-label>\n </cura-badge-number>\n );\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 </div>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"oGAAA,MAAMA,EAAsB,g0EAC5B,MAAAC,EAAeD,E,MCOFE,EAAgB,M,0DAgB3BC,KAAAC,MAAQC,OAAOC,QAAQF,M,cAb4B,M,uJAQhC,M,YACD,E,CAUlB,SAAAG,GACE,MAAMC,EAAS,CACb,CAAEC,KAAM,iBAAkBC,MAAOP,KAAKQ,aAAe,QAAU,GAAGR,KAAKS,eAAiB,iBACxF,CAAEH,KAAM,+BAAgCC,MAAOP,KAAKQ,aAAe,QAAU,GAAGR,KAAKS,aAAe,GAAGT,KAAKS,eAC5G,CAAEH,KAAM,2BAA4BC,MAAOP,KAAKQ,aAAe,QAAU,GAAGR,KAAKS,cAAgB,GAAGT,KAAKS,cACzG,CAAEH,KAAM,iBAAkBC,MAAOP,KAAKQ,aAAe,QAAU,GAAGR,KAAKS,aAAe,iBACtF,CAAEH,KAAM,+BAAgCC,MAAOP,KAAKQ,aAAe,QAAU,GAAGR,KAAKS,aAAe,GAAGT,KAAKS,iBAC5G,CAAEH,KAAM,uBAAwBC,MAAOP,KAA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CAAKhB,MAAM,oBACRrC,KAAKsC,SAAWtC,KAAKkC,UAAY,KAClCE,EAAA,cAAAiB,IAAA,2CAAYhB,MAAM,QAAQlB,KAAM+B,EAAWQ,WAAW,KAAKjD,MAAOT,KAAK+B,oBAAqB4B,OAAO,WACjGvB,EAAA,QAAAiB,IAAA,8CAEDrD,KAAKwC,QAAUxC,KAAKuC,aAAe,O","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as s,H as i,g as a}from"./p-fd5ed6b0.js";import{i as r,a as n}from"./p-272c784a.js";const h=":host{display:block}.container{display:flex;flex-direction:column}.container .calendar{padding:0px calc(var(--base-spacing) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}";const d=h;const l=class{constructor(s){t(this,s);this.dateChange=e(this,"dateChange",7);this.label="";this.status="default";this.size="medium";this.name="";this.helperText=undefined;this.enableRangeDates=undefined;this.disableFutureDates=undefined;this.disablePassDates=undefined;this.iconName="";this.placeholder=null;this.styles={};this.isCalendarVisible=false;this.dates=[];this.value=""}connectedCallback(){const t=window.CuraAPI.theme.fonts.getWeights();this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing();this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);this.styles["--neutral-lighter"]=window.CuraAPI.theme.colors.getColor(`neutral-lighter`);this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor(`neutral-base`);this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-regular"]=t.regular}formAssociatedCallback(t){t.ariaLabel=this.label}setPlaceholder(){if(this.placeholder){return this.placeholder}return this.enableRangeDates?"dd/mm/aaaa - dd/mm/aaaa":"dd/mm/aaaa"}setMask(){return this.enableRangeDates?"dateRange":"date"}setMode(){return this.enableRangeDates?"range":"single"}handleClick(t){if(this.el.contains(t.target)){return}this.hideCalendar()}hideCalendar(){this.isCalendarVisible=false}showCalendar(){this.isCalendarVisible=true}handleInputDates(t){const e=t.target.value;const s=/^(\d{2}\/\d{2}\/\d{4})\s*-\s*(\d{2}\/\d{2}\/\d{4})$/;const i=/^(\d{2}\/\d{2}\/\d{4})$/;if(s.test(e)){const t=e.match(s);const i=this.parseStringToDate(t[1]);const a=this.parseStringToDate(t[2]);if(this.isDateValid(i)&&this.isDateValid(a)){this.status="default";this.dates=[i,a];this.value=`${this.parseDateToString(i)} - ${this.parseDateToString(a)}`;this.dateChange.emit(this.value)}else{this.status="error";this.dates=[]}}else if(i.test(e)){const t=e.match(i);const s=this.parseStringToDate(t[1]);if(this.isDateValid(s)){this.status="default";this.dates=[s];this.value=this.parseDateToString(s);this.dateChange.emit(this.value)}else{this.status="error";this.dates=[]}}else{this.dates=[]}}handleChangeDates(t){if(t.detail===""){this.dates=[];this.status="default";this.value="";this.dateChange.emit(this.value)}}isDateValid(t){const e=new Date;e.setHours(0,0,0,0);if(this.disablePassDates)return!r(t,e);if(this.disableFutureDates)return!n(t,e);return true}parseStringToDate(t){const[e,s,i]=t.split("/").map(Number);return new Date(i,s-1,e)}parseDateToString(t){const e=String(t.getDate()).padStart(2,"0");const s=String(t.getMonth()+1).padStart(2,"0");const i=t.getFullYear();return`${e}/${s}/${i}`}renderCalendarOrHelperText(){if(this.isCalendarVisible){return s("div",{class:"calendar"},s("cura-calendar",{customDates:this.dates,mode:this.setMode(),width:"100%",embedded:false,floating:false,disableFutureDates:this.disableFutureDates,disablePassDates:this.disablePassDates,onOnchangeday:t=>{const e=t.detail.days;if(e.length===1){this.value=this.parseDateToString(e[0])}else if(e.length>0){this.value=`${this.parseDateToString(e[0])} - ${this.parseDateToString(e[e.length-1])}`}else{this.value=""}this.dateChange.emit(this.value)}}))}else{return this.helperText}}render(){return s(i,{key:"8bf7141427b370ea271d2f589c26060111862f79"},s("div",{key:"5c955bf76f93912512bbf18887db5305e6772faa",class:"container",style:this.styles},s("cura-input-text",{key:"a8c3ff65ca54123d0f7612f61e06e44275047961",label:this.label,name:this.name,status:this.status,value:this.value,onFocus:()=>this.showCalendar(),size:this.size,iconName:this.iconName,placeholder:this.setPlaceholder(),"mask-preset":this.setMask(),"enable-selection-mode":true,onKeyUp:t=>this.handleInputDates(t),autocomplete:"off",onValueChange:t=>this.handleChangeDates(t)},this.renderCalendarOrHelperText())))}static get formAssociated(){return true}get el(){return a(this)}static get watchers(){return{enableRangeDates:["setPlaceholder","setMask","setMode"],disableFutureDates:["isDateValid","renderCalendarOrHelperText"],disablePassDates:["isDateValid"],dates:["renderCalendarOrHelperText"],isCalendarVisible:["renderCalendarOrHelperText"]}}};l.style=d;export{l as cura_input_date};
2
- //# sourceMappingURL=p-e8bc6381.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaInputDateCss","CuraInputDateStyle0","CuraInputDate","connectedCallback","weights","window","CuraAPI","theme","fonts","getWeights","this","styles","spacing","getSpacing","colors","getColor","getSize","getFamily","regular","formAssociatedCallback","form","ariaLabel","label","setPlaceholder","placeholder","enableRangeDates","setMask","setMode","handleClick","ev","el","contains","target","hideCalendar","isCalendarVisible","showCalendar","handleInputDates","event","inputValue","value","dateRangeRegex","simpleDateRegex","test","matches","match","startDate","parseStringToDate","endDate","isDateValid","status","dates","parseDateToString","dateChange","emit","singleDate","handleChangeDates","detail","date","today","Date","setHours","disablePassDates","isBefore","disableFutureDates","isAfter","dateString","day","month","year","split","map","Number","String","getDate","padStart","getMonth","getFullYear","renderCalendarOrHelperText","h","class","customDates","mode","width","embedded","floating","onOnchangeday","e","days","length","helperText","render","Host","key","style","name","onFocus","size","iconName","onKeyUp","autocomplete","onValueChange"],"sources":["src/components/forms/cura-input-date/cura-input-date.scss?tag=cura-input-date&encapsulation=shadow","src/components/forms/cura-input-date/cura-input-date.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n@import '../../../../src/scss/mixins/spacing.scss';\n\n:host {\n display: block;\n}\n\n.container{\n display: flex;\n flex-direction: column;\n\n .calendar{\n padding: #{$spacing-none} #{$spacing-xxxs};\n margin-top: -8px;\n border-radius: 0px 0px 4px 4px;\n border-top: 0px;\n border-right: 2px solid #D4D4D4;\n border-bottom:2px solid #D4D4D4;\n border-left: 2px solid #D4D4D4;\n @include shadow-level3(--neutral-black-shadow);\n }\n}\n","import { Component, Element, Host, Listen, Prop, State, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport { CuraInputTextCustomEvent } from '../../../components';\nimport { isAfter, isBefore } from 'date-fns';\n\n@Component({\n tag: 'cura-input-date',\n styleUrl: 'cura-input-date.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraInputDate {\n @Element() el: HTMLElement;\n\n /**\n * Label text for the input date\n */\n @Prop({ reflect: true }) label?: string = '';\n\n /**\n * Indicates input status (default: default)\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n\n /**\n * Size of the input mode default: 'small', 'medium', or 'large' (default: 'medium')\n */\n @Prop({ reflect: true, mutable: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Name text for the input date\n */\n @Prop({ reflect: true }) name?: string = '';\n\n /**\n * Helper text displayed below the input\n */\n @Prop({ reflect: true, mutable: true }) helperText?: string;\n\n /**\n * Enables the date range selection mode, allowing users to select a period of dates\n */\n @Prop({ reflect: true, mutable: true }) enableRangeDates: boolean;\n\n /**\n * Controls whether future dates (dates before the current date) should be disabled\n */\n @Prop({ reflect: true, mutable: true }) disableFutureDates: boolean;\n\n /**\n * Controls whether past dates (dates before the current date) should be disabled\n */\n @Prop({ reflect: true, mutable: true }) disablePassDates: boolean;\n\n /**\n * Whether to display a cura icon (default: null)\n */\n @Prop({ reflect: true, mutable: true }) iconName?: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n\n /**\n * Emitted when the value of the input changes\n * @type {EventEmitter<string>}\n */\n @Event() dateChange: EventEmitter<string>;\n\n @State() styles = {};\n\n @State() isCalendarVisible: boolean = false;\n\n @State() dates: Date[] = [];\n\n @State() value?: string = '';\n\n connectedCallback() {\n const weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-lighter'] = window.CuraAPI.theme.colors.getColor(`neutral-lighter`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-regular'] = weights.regular;\n }\n\n /**\n * Callback for form association\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Formats the placeholder based on the enableRangeDates flag\n *\n * @returns {string} A string representing the placeholder format,\n * either for a date range ('dd/mm/yyyy - dd/mm/yyyy') or a single date ('dd/mm/yyyy')\n */\n @Watch('enableRangeDates')\n setPlaceholder(): string {\n if (this.placeholder) {\n return this.placeholder;\n }\n return this.enableRangeDates ? 'dd/mm/aaaa - dd/mm/aaaa' : 'dd/mm/aaaa';\n }\n\n /**\n * Sets the mask type based on the enableRangeDates flag\n *\n * @returns {string} The mask type, either 'dateRange' or 'date'\n */\n @Watch('enableRangeDates')\n setMask(): string {\n return this.enableRangeDates ? 'dateRange' : 'date';\n }\n\n /**\n * Sets the mode type based on the enableRangeDates flag\n *\n * @returns {'range' | 'single'}\n */\n @Watch('enableRangeDates')\n setMode(): 'range' | 'single' {\n return this.enableRangeDates ? 'range' : 'single';\n }\n\n @Listen('click', { target: 'window' })\n handleClick(ev: { target: Node }) {\n if (this.el.contains(ev.target)) {\n return;\n }\n this.hideCalendar();\n }\n\n hideCalendar() {\n this.isCalendarVisible = false;\n }\n\n showCalendar() {\n this.isCalendarVisible = true;\n }\n\n handleInputDates(event: any) {\n const inputValue = event.target.value;\n\n const dateRangeRegex = /^(\\d{2}\\/\\d{2}\\/\\d{4})\\s*-\\s*(\\d{2}\\/\\d{2}\\/\\d{4})$/;\n const simpleDateRegex = /^(\\d{2}\\/\\d{2}\\/\\d{4})$/;\n\n if (dateRangeRegex.test(inputValue)) {\n const matches = inputValue.match(dateRangeRegex);\n const startDate = this.parseStringToDate(matches[1]);\n const endDate = this.parseStringToDate(matches[2]);\n if (this.isDateValid(startDate) && this.isDateValid(endDate)) {\n this.status = 'default';\n this.dates = [startDate, endDate];\n this.value = `${this.parseDateToString(startDate)} - ${this.parseDateToString(endDate)}`;\n this.dateChange.emit(this.value);\n } else {\n this.status = 'error';\n this.dates = [];\n }\n } else if (simpleDateRegex.test(inputValue)) {\n const matches = inputValue.match(simpleDateRegex);\n const singleDate = this.parseStringToDate(matches[1]);\n if (this.isDateValid(singleDate)) {\n this.status = 'default';\n this.dates = [singleDate];\n this.value = this.parseDateToString(singleDate);\n this.dateChange.emit(this.value);\n } else {\n this.status = 'error';\n this.dates = [];\n }\n } else {\n this.dates = [];\n }\n }\n\n handleChangeDates(event: CuraInputTextCustomEvent<string | number>) {\n if (event.detail === '') {\n this.dates = [];\n this.status = 'default';\n this.value = '';\n this.dateChange.emit(this.value);\n }\n }\n\n @Watch('disableFutureDates')\n @Watch('disablePassDates')\n isDateValid(date: Date) {\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n\n if (this.disablePassDates) return !isBefore(date, today);\n if (this.disableFutureDates) return !isAfter(date, today);\n return true;\n }\n\n parseStringToDate(dateString: string): Date {\n const [day, month, year] = dateString.split('/').map(Number);\n return new Date(year, month - 1, day);\n }\n\n parseDateToString(date: Date): string {\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n\n return `${day}/${month}/${year}`;\n }\n\n @Watch('dates')\n @Watch('isCalendarVisible')\n @Watch('disableFutureDates')\n renderCalendarOrHelperText() {\n if (this.isCalendarVisible) {\n return (\n <div class=\"calendar\">\n <cura-calendar\n customDates={this.dates}\n mode={this.setMode()}\n width=\"100%\"\n embedded={false}\n floating={false}\n disableFutureDates={this.disableFutureDates}\n disablePassDates={this.disablePassDates}\n onOnchangeday={e => {\n const days = e.detail.days;\n if (days.length === 1) {\n this.value = this.parseDateToString(days[0]);\n } else if (days.length > 0) {\n this.value = `${this.parseDateToString(days[0])} - ${this.parseDateToString(days[days.length - 1])}`;\n } else {\n this.value = '';\n }\n this.dateChange.emit(this.value);\n }}\n />\n </div>\n );\n } else {\n return this.helperText;\n }\n }\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-input-text\n label={this.label}\n name={this.name}\n status={this.status}\n value={this.value}\n onFocus={() => this.showCalendar()}\n size={this.size}\n iconName={this.iconName}\n placeholder={this.setPlaceholder()}\n mask-preset={this.setMask()}\n enable-selection-mode={true}\n onKeyUp={event => this.handleInputDates(event)}\n autocomplete=\"off\"\n onValueChange={event => this.handleChangeDates(event)}\n >\n {this.renderCalendarOrHelperText()}\n </cura-input-text>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAmB,+WACzB,MAAAC,EAAeD,E,MCSFE,EAAa,M,2EAMkB,G,YAKwC,U,UAKL,S,UAKpC,G,0IAyBmB,G,iBAKL,K,YAQrC,G,uBAEoB,M,WAEb,G,WAEC,E,CAE1B,iBAAAC,GACE,MAAMC,EAAUC,OAAOC,QAAQC,MAAMC,MAAMC,aAC3CC,KAAKC,OAAO,kBAAoBN,OAAOC,QAAQC,MAAMK,QAAQC,aAC7DH,KAAKC,OAAO,uBAAyBN,OAAOC,QAAQC,MAAMO,OAAOC,SAAS,qBAC1EL,KAAKC,O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KAAKwB,kBAAmB,CAC1B,OACE4C,EAAA,OAAKC,MAAM,YACTD,EAAA,iBACEE,YAAatE,KAAKwC,MAClB+B,KAAMvE,KAAKiB,UACXuD,MAAM,OACNC,SAAU,MACVC,SAAU,MACVrB,mBAAoBrD,KAAKqD,mBACzBF,iBAAkBnD,KAAKmD,iBACvBwB,cAAeC,IACb,MAAMC,EAAOD,EAAE9B,OAAO+B,KACtB,GAAIA,EAAKC,SAAW,EAAG,CACrB9E,KAAK6B,MAAQ7B,KAAKyC,kBAAkBoC,EAAK,G,MACpC,GAAIA,EAAKC,OAAS,EAAG,CAC1B9E,KAAK6B,MAAQ,GAAG7B,KAAKyC,kBAAkBoC,EAAK,SAAS7E,KAAKyC,kBAAkBoC,EAAKA,EAAKC,OAAS,K,KAC1F,CACL9E,KAAK6B,MAAQ,E,CAEf7B,KAAK0C,WAAWC,KAAK3C,KAAK6B,MAAM,I,KAKnC,CACL,OAAO7B,KAAK+E,U,EAIhB,MAAAC,GACE,OACEZ,EAACa,EAAI,CAAAC,IAAA,4CACHd,EAAA,OAAAc,IAAA,2CAAKb,MAAM,YAAYc,MAAOnF,KAAKC,QACjCmE,EAAA,mBAAAc,IAAA,2CACEtE,MAAOZ,KAAKY,MACZwE,KAAMpF,KAAKoF,KACX7C,OAAQvC,KAAKuC,OACbV,MAAO7B,KAAK6B,MACZwD,QAAS,IAAMrF,KAAKyB,eACpB6D,KAAMtF,KAAKsF,KACXC,SAAUvF,KAAKuF,SACfzE,YAAad,KAAKa,iBAAgB,cACrBb,KAAKgB,UAAS,wBACJ,KACvBwE,QAAS7D,GAAS3B,KAAK0B,iBAAiBC,GACxC8D,aAAa,MACbC,cAAe/D,GAAS3B,KAAK6C,kBAAkBlB,IAE9C3B,KAAKmE,+B","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as s}from"./p-fd5ed6b0.js";const r=":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:1%;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;gap:4px;padding:12px 8px;background-color:var(--neutral-purewhite);border-bottom:2px solid var(--info-base);z-index:10000}.dropdown-mobile .dropdown-input-search cura-button-transparent{display:flex}.dropdown-mobile .dropdown-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile .dropdown-input-search.dropdown-open{display:flex}.dropdown-mobile .dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:block}.dropdown-mobile .dropdown-search-list{position:static;width:100%;height:100%;max-height:none;padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:none;border:none;background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;z-index:10000}";const n=r;const d=class{constructor(e){t(this,e);this.valueChanged=i(this,"valueChanged",7);this.onselect=i(this,"onselect",7);this.overlayElement=null;this.adjustInputPosition=()=>{window.visualViewport.addEventListener("resize",(()=>{var t;const i=window.innerHeight<window.screen.height*.8;const e=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-mobile");if(i){e.style.position="absolute";e.style.bottom=`${window.screen.height-window.innerHeight}px`}else{e.style.position="fixed";e.style.bottom="0"}window.scroll({top:0,left:0,behavior:"smooth"})}))};this.handleSlotChange=()=>{this.options=Array.from(this.host.querySelectorAll("cura-dropdown-search-option"));this.addClickListenersToOptions();this.updateHoveredIndex()};this.handleInputChange=t=>{const i=t.target;this.value=i.value;this.onValueChange(this.value)};this.handleKeyDown=t=>{if(t.key==="ArrowDown"){t.preventDefault();this.moveHighlight(1)}else if(t.key==="ArrowUp"){t.preventDefault();this.moveHighlight(-1)}else if(t.key==="Enter"){t.preventDefault();if(this.hoveredIndex>-1){this.handleOnBlur();this.onSelectedOption(this.hoveredIndex)}}};this.handleResize=()=>{this.isMobile=window.innerWidth<768;if(this.isDropdownOpen){if(this.isMobile){this.showOverlay()}else{this.removeOverlay()}}};this.size="large";this.status="default";this.disabled=false;this.name=undefined;this.required=false;this.selected=false;this.value="";this.placeholder="";this.label="";this.iconName="search";this.dropdownMaxHeight="630px";this.overlayVisible=false;this.isDropdownOpen=false;this.styles={};this.isMobile=window.innerWidth<768;this.mode="default";this.inputTextRef=undefined;this.isOnBlurInput=true;this.hoveredIndex=-1;this.options=[]}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base");this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light");this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark");this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor(`neutral-black`,.16);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark");this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter");this.styles["--breakpoints"]=window.CuraAPI.theme.breakpoints.get();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium}onValueChange(t){this.updateSelectedOption(t);this.valueChanged.emit(t)}componentWillLoad(){this.updateSelectedOption(this.value)}componentDidRender(){if(this.isDropdownOpen&&this.isMobile){this.showOverlay()}else{this.removeOverlay()}}componentDidLoad(){window.addEventListener("resize",this.handleResize);window.addEventListener("resize",this.adjustInputPosition)}disconnectedCallback(){window.removeEventListener("resize",this.handleResize);window.removeEventListener("resize",this.adjustInputPosition)}showOverlay(){if(!this.overlayElement){this.overlayElement=document.createElement("div");this.overlayElement.className="dropdown-overlay";this.overlayElement.style.position="fixed";this.overlayElement.style.top="0";this.overlayElement.style.left="0";this.overlayElement.style.width="100%";this.overlayElement.style.height="100%";this.overlayElement.style.zIndex="9999";this.overlayElement.style.backgroundColor="white";document.body.appendChild(this.overlayElement)}}removeOverlay(){if(this.overlayElement&&this.overlayElement.parentNode===document.body){document.body.removeChild(this.overlayElement);this.overlayElement=null}}addClickListenersToOptions(){this.options.forEach(((t,i)=>{t.addEventListener("optionSelected",(()=>this.onSelectedOption(i)))}))}updateSelectedOption(t){const i=this.options.findIndex((i=>i.getAttribute("value")===t));this.hoveredIndex=i;this.updateOptionAttribute("hovered",this.hoveredIndex);this.updateOptionAttribute("selected",this.hoveredIndex);this.scrollIntoView();this.adjustInputPosition()}onSelectedOption(t){const i=this.options[t];if(i.selectable){const t=i.getAttribute("value")||i.textContent;this.value=t||"";this.updateSelectedOption(this.value);this.isDropdownOpen=false;this.isOnBlurInput=true;this.removeOverlay()}}moveHighlight(t){const i=this.options;const e=(this.hoveredIndex+t+i.length)%i.length;this.hoveredIndex=e;this.updateOptionAttribute("hovered",this.hoveredIndex);this.scrollIntoView()}updateOptionAttribute(t,i){this.options.forEach(((e,o)=>{e[t]=o===i}))}updateHoveredIndex(){const t=this.options;const i=this.value;this.hoveredIndex=t.findIndex((t=>t.getAttribute("value")===i))}scrollIntoView(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-search-list");const e=this.options[this.hoveredIndex];if(i&&e){const t=e.getBoundingClientRect();const o=i.getBoundingClientRect();if(t.bottom>o.bottom){i.scrollTop+=t.bottom-o.bottom}if(t.top<o.top){i.scrollTop-=o.top-t.top}}}handleOnBlur(){if(this.isOnBlurInput===true){setTimeout((()=>{this.isDropdownOpen=false;this.removeOverlay()}),200)}}getClasses(){return{"dropdown-input-search":true,"dropdown-open":this.isDropdownOpen,disabled:this.disabled,[this.status]:true}}getDropdownClasses(){return{"dropdown-search-list":true,visible:this.options.length&&this.isDropdownOpen?true:false}}hostCSSProperties(){return{"--dropdown-max-height":this.dropdownMaxHeight}}handleOnFocus(){this.isDropdownOpen=true}render(){const t=this.isMobile&&this.isDropdownOpen;return e(o,{key:"a4defbdfabd6cff5db81d35b43580009256abfa8",style:this.hostCSSProperties(),class:"dropdown-overlay"},e("div",{key:"0c8db33b0fb93ef7ccb234ea6b61bd63851d4460",class:`dropdown ${t?"dropdown-mobile":""}`,style:this.styles},e("div",{key:"47430e63175189b9969f83254b1e92c40f7e0063",class:this.getClasses()},this.isMobile&&this.isDropdownOpen&&e("cura-button-transparent",{key:"932450ba13c8b47ea20fb83e963073243a7f71b7",fontColor:"dark",onClick:()=>this.isMobile=false,iconName:"arrowLeft",size:"medium",iconOnly:true,color:"primary"}),e("cura-input-text",{key:"af9b7356b90d30a16b142a9249072867b4b79182",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:t?"transparent":"default",required:this.required,hideErrorIcon:this.status==="error",iconName:this.iconName||"search",value:this.value,status:this.status,onValueChange:t=>this.onValueChange(t.target.value),onInput:t=>this.handleInputChange(t),onFocus:()=>this.handleOnFocus(),onClick:()=>window.innerWidth<768?this.isMobile=true:null,onBlur:()=>{this.handleOnBlur()},placeholder:this.placeholder,size:this.size,onKeyDown:this.handleKeyDown},e("slot",{key:"87db405a858148aee63f7338ebcde28afc64c768",name:"helperText"}))),e("div",{key:"90f39c78512853a0c430f5947705b494093ba8e3",id:"dropdown-search-list",class:this.getDropdownClasses()},e("slot",{key:"decb45f75adfd4af1f1102778c39d8f4e4a94bfa",name:"dropdown-search-option",onSlotchange:this.handleSlotChange}))))}get host(){return s(this)}static get watchers(){return{value:["onValueChange"]}}};d.style=n;export{d as cura_dropdown_search};
2
- //# sourceMappingURL=p-ed97cf3c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaDropdownSearchCss","CuraDropdownSearchStyle0","CuraDropdownSearch","this","overlayElement","adjustInputPosition","window","visualViewport","addEventListener","isKeyboardOpen","innerHeight","screen","height","dropdown","_a","host","shadowRoot","querySelector","style","position","bottom","scroll","top","left","behavior","handleSlotChange","options","Array","from","querySelectorAll","addClickListenersToOptions","updateHoveredIndex","handleInputChange","event","input","target","value","onValueChange","handleKeyDown","key","preventDefault","moveHighlight","hoveredIndex","handleOnBlur","onSelectedOption","handleResize","isMobile","innerWidth","isDropdownOpen","showOverlay","removeOverlay","connectedCallback","weights","CuraAPI","theme","fonts","getWeights","styles","colors","getColor","breakpoints","get","getSize","getFamily","medium","newValue","updateSelectedOption","valueChanged","emit","componentWillLoad","componentDidRender","componentDidLoad","disconnectedCallback","removeEventListener","document","createElement","className","width","zIndex","backgroundColor","body","appendChild","parentNode","removeChild","forEach","option","index","selectedOptionIndex","findIndex","getAttribute","updateOptionAttribute","scrollIntoView","selectedOption","selectable","selectedValue","textContent","isOnBlurInput","direction","visibleOptions","newIndex","length","attribute","indexToUpdate","currentValue","container","hoveredOption","optionRect","getBoundingClientRect","containerRect","scrollTop","setTimeout","getClasses","disabled","status","getDropdownClasses","visible","hostCSSProperties","dropdownMaxHeight","handleOnFocus","render","isMobileDropdown","h","Host","class","fontColor","onClick","iconName","size","iconOnly","color","label","part","mode","required","hideErrorIcon","e","onInput","onFocus","onBlur","placeholder","onKeyDown","name","id","onSlotchange"],"sources":["src/components/forms/cura-dropdown-search/cura-dropdown-search.scss?tag=cura-dropdown-search&encapsulation=shadow","src/components/forms/cura-dropdown-search/cura-dropdown-search.tsx"],"sourcesContent":["@import '../../../scss/mixins/shadows.scss';\n\n:host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n}\n\n.dropdown {\n display: flex;\n position: relative;\n\n flex-direction: column;\n width: inherit;\n\n .dropdown-search-list {\n z-index: 1000;\n }\n\n &-input-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n\n\n &.dropdown-open {\n ::part(cura-input-field) {\n border-radius: 4px 4px 0px 0px;\n }\n ::slotted([slot='helperText']) {\n display: none;\n }\n\n cura-input-text {\n ::slotted([slot='helperText']) {\n display: none;\n }\n }\n }\n }\n\n &-search-list {\n position: absolute;\n top: calc(100% - 8px);\n width: 100%;\n max-height: var(--dropdown-max-height);\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n @include shadow-level3(--neutral-black-shadow);\n border-radius: 0px 0px 4px 4px;\n border-top: 0 var(--neutral-light);\n border-right: 2px solid var(--neutral-light);\n border-bottom: 2px solid var(--neutral-light);\n border-left: 2px solid var(--neutral-light);\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n display: none;\n\n &.visible {\n display: block;\n }\n\n &-input-search {\n width: inherit;\n\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px 8px;\n border-bottom: 2px solid var(--info-base);\n background-color: var(--neutral-purewhite);\n\n cura-input-text {\n width: inherit;\n }\n\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n }\n }\n\n &-mobile {\n position: fixed;\n top: 1%;\n left: 0;\n right: 0;\n width: 100%;\n\n z-index: 10000;\n .dropdown-input-search {\n display: flex;\n gap: 4px;\n padding: 12px 8px;\n background-color: var(--neutral-purewhite);\n border-bottom: 2px solid var(--info-base);\n z-index: 10000;\n cura-button-transparent {\n display: flex;\n }\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n &.dropdown-open {\n display: flex;\n\n ::slotted([slot='helperText']) {\n display: block;\n }\n }\n }\n .dropdown-search-list {\n position: static;\n width: 100%;\n height: 100%;\n max-height: none;\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n box-shadow: none;\n border: none;\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n z-index: 10000;\n }\n }\n}\n","import { Component, Host, Prop, State, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-dropdown-search',\n styleUrl: 'cura-dropdown-search.scss',\n shadow: true,\n})\nexport class CuraDropdownSearch {\n /**\n * Size of the dropdown search mode default: 'small', 'medium', or 'large' (default: 'large')\n */\n @Prop({ reflect: true, mutable: true }) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Define the status of the dropdown search.\n */\n @Prop({ reflect: true }) status: 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * The name of the dropdown search component.\n */\n @Prop({ reflect: true }) name: string;\n\n /**\n * Indicates if the dropdown search is required.\n */\n @Prop({ reflect: true, mutable: true }) required: boolean = false;\n\n /**\n * Indicates if the dropdown search is selected.\n */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /**\n * The value of the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * The placeholder text for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) placeholder: string = '';\n\n /**\n * The label for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) label: string = '';\n\n /**\n * Custom icon name. Default: search.\n */\n @Prop({ reflect: true }) iconName = 'search';\n\n /**\n * CSS max-height property for dropdown item.\n * Default to 630px\n */\n @Prop({ reflect: true }) dropdownMaxHeight = '630px';\n\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n /**\n * Indicates if the overlay is visible.\n */\n @State() overlayVisible: boolean = false;\n\n /**\n * Event emitted when the value changes.\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Indicates if the dropdown is open.\n */\n @State() isDropdownOpen: boolean = false;\n\n /**\n * Styles for the component.\n\n */\n @State() styles = {};\n\n /**\n * Indicates if the component is being viewed on a mobile device.\n */\n @State() isMobile: boolean = window.innerWidth < 768;\n\n /**\n * The mode of the dropdown search.\n */\n @State() mode: 'default' | 'transparent' = 'default';\n\n @Event() onselect: EventEmitter;\n\n @State() inputTextRef!: HTMLCuraInputTextElement;\n\n /**\n * Indicates if the input is on blur.\n */\n @State() isOnBlurInput: boolean = true;\n\n /**\n * The index of the currently hovered option.\n */\n @State() hoveredIndex: number = -1;\n\n /**\n * The options for the dropdown search.\n * @type {HTMLCuraDropdownSearchOptionElement[]}\n */\n\n weights;\n\n private overlayElement: HTMLDivElement | null = null;\n\n @State() options: HTMLCuraDropdownSearchOptionElement[] = [];\n\n\n private adjustInputPosition = () => {\n window.visualViewport.addEventListener('resize', () => {\n\n const isKeyboardOpen = window.innerHeight < window.screen.height * 0.8;\n const dropdown = this.host.shadowRoot?.querySelector('.dropdown-mobile') as HTMLInputElement;\n\n if (isKeyboardOpen) {\n dropdown.style.position = 'absolute';\n dropdown.style.bottom = `${window.screen.height - window.innerHeight}px`;\n } else {\n dropdown.style.position = 'fixed';\n dropdown.style.bottom = '0';\n }\n\n window.scroll({\n top: 0,\n left: 0,\n behavior: \"smooth\",\n });\n });\n };\n\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--breakpoints'] = window.CuraAPI.theme.breakpoints.get();\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\n\n }\n\n @Watch('value')\n onValueChange(newValue: string) {\n this.updateSelectedOption(newValue);\n this.valueChanged.emit(newValue);\n }\n\n componentWillLoad() {\n this.updateSelectedOption(this.value);\n }\n\n componentDidRender() {\n if (this.isDropdownOpen && this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n window.addEventListener('resize', this.adjustInputPosition);\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\n window.removeEventListener('resize', this.adjustInputPosition);\n\n }\n\n private showOverlay() {\n if (!this.overlayElement) {\n this.overlayElement = document.createElement('div');\n this.overlayElement.className = 'dropdown-overlay';\n this.overlayElement.style.position = 'fixed';\n this.overlayElement.style.top = '0';\n this.overlayElement.style.left = '0';\n this.overlayElement.style.width = '100%';\n this.overlayElement.style.height = '100%';\n this.overlayElement.style.zIndex = '9999';\n this.overlayElement.style.backgroundColor = 'white';\n document.body.appendChild(this.overlayElement);\n }\n }\n\n private removeOverlay() {\n if (this.overlayElement && this.overlayElement.parentNode === document.body) {\n document.body.removeChild(this.overlayElement);\n this.overlayElement = null;\n }\n }\n\n private handleSlotChange = () => {\n this.options = Array.from(this.host.querySelectorAll('cura-dropdown-search-option'));\n this.addClickListenersToOptions();\n this.updateHoveredIndex();\n };\n\n private addClickListenersToOptions() {\n this.options.forEach((option, index) => {\n option.addEventListener('optionSelected', () => this.onSelectedOption(index));\n });\n }\n\n private updateSelectedOption(value: string) {\n const selectedOptionIndex = this.options.findIndex(option => option.getAttribute('value') === value);\n this.hoveredIndex = selectedOptionIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.updateOptionAttribute('selected', this.hoveredIndex);\n\n this.scrollIntoView();\n this.adjustInputPosition();\n\n }\n\n private handleInputChange = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.onValueChange(this.value);\n // this.valueChanged.emit(this.value);\n };\n\n private onSelectedOption(index: number) {\n const selectedOption = this.options[index];\n if (selectedOption.selectable) {\n const selectedValue = selectedOption.getAttribute('value') || selectedOption.textContent;\n\n this.value = selectedValue || '';\n this.updateSelectedOption(this.value);\n\n this.isDropdownOpen = false;\n this.isOnBlurInput = true;\n this.removeOverlay();\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.moveHighlight(1);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n this.moveHighlight(-1);\n } else if (event.key === 'Enter') {\n event.preventDefault();\n if (this.hoveredIndex > -1) {\n this.handleOnBlur();\n this.onSelectedOption(this.hoveredIndex);\n }\n }\n };\n\n private moveHighlight(direction: number) {\n const visibleOptions = this.options;\n const newIndex = (this.hoveredIndex + direction + visibleOptions.length) % visibleOptions.length;\n this.hoveredIndex = newIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.scrollIntoView();\n }\n\n private updateOptionAttribute(attribute: string, indexToUpdate: number) {\n this.options.forEach((option, index) => {\n (option as any)[attribute] = index === indexToUpdate;\n });\n }\n\n private updateHoveredIndex() {\n const visibleOptions = this.options;\n const currentValue = this.value;\n this.hoveredIndex = visibleOptions.findIndex(option => option.getAttribute('value') === currentValue);\n }\n\n private scrollIntoView() {\n const container = this.host.shadowRoot?.querySelector('.dropdown-search-list');\n const hoveredOption = this.options[this.hoveredIndex];\n\n if (container && hoveredOption) {\n const optionRect = hoveredOption.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n\n if (optionRect.bottom > containerRect.bottom) {\n container.scrollTop += optionRect.bottom - containerRect.bottom;\n }\n\n if (optionRect.top < containerRect.top) {\n container.scrollTop -= containerRect.top - optionRect.top;\n }\n }\n }\n\n private handleResize = () => {\n this.isMobile = window.innerWidth < 768;\n if (this.isDropdownOpen) {\n if (this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n };\n\n handleOnBlur() {\n if (this.isOnBlurInput === true) {\n setTimeout(() => {\n this.isDropdownOpen = false;\n this.removeOverlay();\n }, 200);\n }\n }\n getClasses() {\n return {\n 'dropdown-input-search': true,\n 'dropdown-open': this.isDropdownOpen,\n 'disabled': this.disabled,\n [this.status]: true,\n };\n }\n\n getDropdownClasses() {\n return {\n 'dropdown-search-list': true,\n 'visible': this.options.length && this.isDropdownOpen ? true : false,\n };\n }\n\n hostCSSProperties() {\n return {\n '--dropdown-max-height': this.dropdownMaxHeight,\n };\n }\n\n handleOnFocus() {\n this.isDropdownOpen = true;\n }\n\n\n render() {\n const isMobileDropdown = this.isMobile && this.isDropdownOpen;\n return (\n <Host style={this.hostCSSProperties()} class=\"dropdown-overlay\">\n <div class={`dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`} style={this.styles}>\n <div class={this.getClasses()}>\n {this.isMobile && this.isDropdownOpen && (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={() => (this.isMobile = false)}\n iconName=\"arrowLeft\"\n size=\"medium\"\n iconOnly\n color=\"primary\"\n ></cura-button-transparent>\n )}\n <cura-input-text\n disabled={this.disabled}\n label={this.label}\n part=\"cura-input-field\"\n mode={isMobileDropdown ? 'transparent' : 'default'}\n required={this.required}\n hideErrorIcon={this.status === 'error'}\n iconName={this.iconName || 'search'}\n value={this.value}\n status={this.status}\n onValueChange={e => this.onValueChange(e.target.value as string)}\n onInput={e => this.handleInputChange(e)}\n onFocus={() => this.handleOnFocus()}\n onClick={() => (window.innerWidth < 768 ? (this.isMobile = true) : null)}\n onBlur={() => {\n this.handleOnBlur();\n }}\n placeholder={this.placeholder}\n size={this.size}\n onKeyDown={this.handleKeyDown}\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div id=\"dropdown-search-list\" class={this.getDropdownClasses()}>\n <slot name=\"dropdown-search-option\" onSlotchange={this.handleSlotChange}></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAwB,u1EAC9B,MAAAC,EAAeD,E,MCMFE,EAAkB,M,uGAmHrBC,KAAAC,eAAwC,KAKxCD,KAAAE,oBAAsB,KAC5BC,OAAOC,eAAeC,iBAAiB,UAAU,K,MAE/C,MAAMC,EAAiBH,OAAOI,YAAcJ,OAAOK,OAAOC,OAAS,GACnE,MAAMC,GAAWC,EAAAX,KAAKY,KAAKC,cAAU,MAAAF,SAAA,SAAAA,EAAEG,cAAc,oBAErD,GAAIR,EAAgB,CAClBI,EAASK,MAAMC,SAAW,WAC1BN,EAASK,MAAME,OAAS,GAAGd,OAAOK,OAAOC,OAASN,OAAOI,e,KACpD,CACLG,EAASK,MAAMC,SAAW,QAC1BN,EAASK,MAAME,OAAS,G,CAG1Bd,OAAOe,OAAO,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,UACV,GACF,EAuEIrB,KAAAsB,iBAAmB,KACzBtB,KAAKuB,QAAUC,MAAMC,KAAKzB,KAAKY,KAAKc,iBAAiB,gCACrD1B,KAAK2B,6BACL3B,KAAK4B,oBAAoB,EAoBnB5B,KAAA6B,kBAAqBC,IAC3B,MAAMC,EAAQD,EAAME,OACpBhC,KAAKiC,MAAQF,EAAME,MACnBjC,KAAKkC,cAAclC,KAAKiC,MAAM,EAkBxBjC,KAAAmC,cAAiBL,IACvB,GAAIA,EAAMM,MAAQ,YAAa,CAC7BN,EAAMO,iBACNrC,KAAKsC,cAAc,E,MACd,GAAIR,EAAMM,MAAQ,UAAW,CAClCN,EAAMO,iBAC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EAAE,cAAa,OAAO,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA,EAAE;aAC7D;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,cAAa,OAAO,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE;aACpE;YACD,WAAW,EAAE;gBACX,GAAG,EAAE,UAAS,IAAyD,EAAE,QAAwB,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE;aAC3J;SACH,CAAC;QACD,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;YAChC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;SAC1C;aAAM;YACL,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;YAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxB;KACF;;;;ICvBD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC/B,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9D,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;IAC3B,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,EAAC,GAAG,EAAC,EAAE,CAAC,CAAC,CAAC;IACzE,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;QAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/api/theme-presets/theme-default.ts","src/api/theme-presets/theme-maternity.ts","src/api/theme-presets/theme-oncology.ts","src/api/theme-presets/theme-legacy-default.ts","src/api/theme-presets/theme-presets.ts","src/api/theme-presets/static.ts","src/api/modules/cura-theme-colors-module.ts","src/api/modules/cura-theme-spacing-module.ts","src/api/modules/cura-theme-fonts-module.ts","src/api/modules/cura-theme-breakpoints-module.ts","src/api/modules/cura-theme-module.ts","src/api/cura-api.ts","src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.rootElement.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/home/marcuslima/Documents/www/rededor/web/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}