@rededor/cura 1.0.0-alpha.7 → 1.0.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 (267) hide show
  1. package/dist/assets/assets/icons/iconset-default-list.ts +1 -1
  2. package/dist/assets/assets/icons/iconset-default-tmp.svg +4 -0
  3. package/dist/assets/assets/icons/iconset-default.svg +1 -1
  4. package/dist/cjs/{app-globals-bcffd819.js → app-globals-b77d5b06.js} +7 -7
  5. package/dist/cjs/{app-globals-bcffd819.js.map → app-globals-b77d5b06.js.map} +1 -1
  6. package/dist/cjs/cura-accordion_12.cjs.entry.js +30 -16
  7. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  8. package/dist/cjs/cura-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/cura-badge-distance.cjs.entry.js +46 -0
  11. package/dist/cjs/cura-badge-distance.cjs.entry.js.map +1 -0
  12. package/dist/cjs/cura-button-outline.cjs.entry.js +10 -6
  13. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  14. package/dist/cjs/cura-button-select.cjs.entry.js +2 -2
  15. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  16. package/dist/cjs/cura-button-transparent.cjs.entry.js +11 -7
  17. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
  18. package/dist/cjs/cura-button.definitions-f036371c.js +12 -0
  19. package/dist/cjs/cura-button.definitions-f036371c.js.map +1 -0
  20. package/dist/cjs/cura-calendar.cjs.entry.js +99 -10
  21. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  22. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  23. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  24. package/dist/cjs/cura-display.cjs.entry.js +19 -10
  25. package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
  26. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
  27. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +5 -3
  28. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -1
  29. package/dist/cjs/cura-dropdown-search.cjs.entry.js +3 -3
  30. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  31. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
  32. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
  33. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  34. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  35. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  36. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  37. package/dist/cjs/cura.cjs.js +2 -2
  38. package/dist/cjs/loader.cjs.js +2 -2
  39. package/dist/collection/api/theme-presets/theme-maternity.js +6 -6
  40. package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -1
  41. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  42. package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
  43. package/dist/collection/assets/icons/iconset-default-tmp.svg +4 -0
  44. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  45. package/dist/collection/assets-raw/icons/default/drug.svg +3 -0
  46. package/dist/collection/collection-manifest.json +1 -0
  47. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.css +28 -0
  48. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +94 -0
  49. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -0
  50. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.stories.js +56 -0
  51. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.stories.js.map +1 -0
  52. package/dist/collection/components/buttons/cura-button/cura-button.css +61 -65
  53. package/dist/collection/components/buttons/cura-button/cura-button.js +26 -3
  54. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  55. package/dist/collection/components/buttons/cura-button/cura-button.stories.js +28 -2
  56. package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
  57. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +50 -53
  58. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +28 -6
  59. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  60. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +28 -2
  61. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
  62. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +29 -33
  63. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +1 -1
  64. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +37 -54
  65. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +31 -9
  66. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  67. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +16 -6
  68. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
  69. package/dist/collection/components/buttons/cura-button.definitions.js +7 -0
  70. package/dist/collection/components/buttons/cura-button.definitions.js.map +1 -0
  71. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  72. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  73. package/dist/collection/components/cura-calendar/cura-calendar.css +18 -1
  74. package/dist/collection/components/cura-calendar/cura-calendar.js +93 -17
  75. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  76. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +24 -4
  77. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
  78. package/dist/collection/components/cura-card/cura-card.js +1 -1
  79. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  80. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  81. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  82. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  83. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  84. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +48 -29
  85. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +4 -2
  86. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
  87. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  88. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +3 -3
  89. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  90. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
  91. package/dist/collection/components/forms/cura-label/cura-label.js +3 -3
  92. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
  93. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  94. package/dist/collection/components/forms/cura-select/cura-select.js +14 -3
  95. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  96. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  97. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  98. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  99. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  100. package/dist/collection/components/text/cura-display/cura-display.css +16 -0
  101. package/dist/collection/components/text/cura-display/cura-display.js +37 -10
  102. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  103. package/dist/collection/components/text/cura-display/cura-display.stories.js +13 -2
  104. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  105. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  106. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +9 -1
  107. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  108. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +1 -1
  109. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  110. package/dist/components/cura-alert.js +1 -1
  111. package/dist/components/cura-avatar.js +1 -1
  112. package/dist/components/cura-badge-distance.d.ts +11 -0
  113. package/dist/components/cura-badge-distance.js +73 -0
  114. package/dist/components/cura-badge-distance.js.map +1 -0
  115. package/dist/components/cura-button-outline.js +11 -6
  116. package/dist/components/cura-button-outline.js.map +1 -1
  117. package/dist/components/cura-button-select.js +2 -2
  118. package/dist/components/cura-button-select.js.map +1 -1
  119. package/dist/components/cura-button-transparent2.js +13 -8
  120. package/dist/components/cura-button-transparent2.js.map +1 -1
  121. package/dist/components/cura-button.definitions.js +10 -0
  122. package/dist/components/cura-button.definitions.js.map +1 -0
  123. package/dist/components/cura-button.js +10 -4
  124. package/dist/components/cura-button.js.map +1 -1
  125. package/dist/components/cura-calendar.js +118 -15
  126. package/dist/components/cura-calendar.js.map +1 -1
  127. package/dist/components/cura-card.js +1 -1
  128. package/dist/components/cura-checkbox.js +1 -1
  129. package/dist/components/cura-display.js +21 -11
  130. package/dist/components/cura-display.js.map +1 -1
  131. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  132. package/dist/components/cura-dropdown-search-option.js +5 -3
  133. package/dist/components/cura-dropdown-search-option.js.map +1 -1
  134. package/dist/components/cura-dropdown-search.js +3 -3
  135. package/dist/components/cura-dropdown-search.js.map +1 -1
  136. package/dist/components/cura-heading2.js +1 -1
  137. package/dist/components/cura-icon2.js +1 -1
  138. package/dist/components/cura-icons-view.js +4 -4
  139. package/dist/components/cura-icons-view.js.map +1 -1
  140. package/dist/components/cura-label2.js +1 -1
  141. package/dist/components/cura-label2.js.map +1 -1
  142. package/dist/components/cura-loader-bar2.js +1 -1
  143. package/dist/components/cura-loader-circle2.js +1 -1
  144. package/dist/components/cura-page-template.js +1 -1
  145. package/dist/components/cura-paragraph2.js +2 -2
  146. package/dist/components/cura-paragraph2.js.map +1 -1
  147. package/dist/components/cura-radio.js +1 -1
  148. package/dist/components/cura-select-option2.js +1 -1
  149. package/dist/components/cura-select2.js +15 -5
  150. package/dist/components/cura-select2.js.map +1 -1
  151. package/dist/components/cura-switch.js +1 -1
  152. package/dist/components/cura-toast.js +1 -1
  153. package/dist/components/index.js +8 -6
  154. package/dist/components/index.js.map +1 -1
  155. package/dist/cura/cura.esm.js +1 -1
  156. package/dist/cura/cura.esm.js.map +1 -1
  157. package/dist/cura/p-0a923806.entry.js +2 -0
  158. package/dist/cura/p-0a923806.entry.js.map +1 -0
  159. package/dist/cura/{p-260edb61.entry.js → p-0d435e42.entry.js} +2 -2
  160. package/dist/cura/{p-8433fec9.entry.js → p-0dd837cf.entry.js} +2 -2
  161. package/dist/cura/{p-c63f4695.entry.js → p-2203e829.entry.js} +2 -2
  162. package/dist/cura/{p-6373c7cd.entry.js → p-4c7a2419.entry.js} +2 -2
  163. package/dist/cura/p-4ef24fbd.entry.js +2 -0
  164. package/dist/cura/p-4ef24fbd.entry.js.map +1 -0
  165. package/dist/cura/p-57b8b468.entry.js +2 -0
  166. package/dist/cura/p-57b8b468.entry.js.map +1 -0
  167. package/dist/cura/p-599acc84.entry.js +2 -0
  168. package/dist/cura/p-599acc84.entry.js.map +1 -0
  169. package/dist/cura/p-6682619b.entry.js +2 -0
  170. package/dist/cura/p-6682619b.entry.js.map +1 -0
  171. package/dist/cura/{p-5fcfbf32.entry.js → p-66c5cf5f.entry.js} +2 -2
  172. package/dist/cura/{p-4eaeb590.entry.js → p-84d8c67d.entry.js} +2 -2
  173. package/dist/cura/p-a00d2c68.entry.js +2 -0
  174. package/dist/cura/p-a00d2c68.entry.js.map +1 -0
  175. package/dist/cura/{p-a9dad622.entry.js → p-a5cf0fd6.entry.js} +2 -2
  176. package/dist/cura/{p-70c369b1.js → p-a6c3c0ea.js} +2 -2
  177. package/dist/cura/{p-70c369b1.js.map → p-a6c3c0ea.js.map} +1 -1
  178. package/dist/cura/{p-f016eb62.entry.js → p-ad8a7e0f.entry.js} +2 -2
  179. package/dist/cura/p-b301a1ef.entry.js +2 -0
  180. package/dist/cura/p-b301a1ef.entry.js.map +1 -0
  181. package/dist/cura/{p-0b1829ed.entry.js → p-dc5d0c29.entry.js} +2 -2
  182. package/dist/cura/p-dc5d0c29.entry.js.map +1 -0
  183. package/dist/cura/p-df5c3a86.entry.js +2 -0
  184. package/dist/cura/{p-17a878d4.entry.js.map → p-df5c3a86.entry.js.map} +1 -1
  185. package/dist/cura/p-dfc65f66.entry.js +2 -0
  186. package/dist/cura/p-efcb32eb.js +2 -0
  187. package/dist/cura/p-efcb32eb.js.map +1 -0
  188. package/dist/cura/p-f9433d24.entry.js +2 -0
  189. package/dist/cura/p-f9433d24.entry.js.map +1 -0
  190. package/dist/esm/{app-globals-f2da2b14.js → app-globals-488bf508.js} +7 -7
  191. package/dist/esm/{app-globals-f2da2b14.js.map → app-globals-488bf508.js.map} +1 -1
  192. package/dist/esm/cura-accordion_12.entry.js +30 -16
  193. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  194. package/dist/esm/cura-alert.entry.js +1 -1
  195. package/dist/esm/cura-avatar.entry.js +1 -1
  196. package/dist/esm/cura-badge-distance.entry.js +42 -0
  197. package/dist/esm/cura-badge-distance.entry.js.map +1 -0
  198. package/dist/esm/cura-button-outline.entry.js +10 -6
  199. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  200. package/dist/esm/cura-button-select.entry.js +2 -2
  201. package/dist/esm/cura-button-select.entry.js.map +1 -1
  202. package/dist/esm/cura-button-transparent.entry.js +11 -7
  203. package/dist/esm/cura-button-transparent.entry.js.map +1 -1
  204. package/dist/esm/cura-button.definitions-617d3bad.js +10 -0
  205. package/dist/esm/cura-button.definitions-617d3bad.js.map +1 -0
  206. package/dist/esm/cura-calendar.entry.js +99 -10
  207. package/dist/esm/cura-calendar.entry.js.map +1 -1
  208. package/dist/esm/cura-card.entry.js +1 -1
  209. package/dist/esm/cura-checkbox.entry.js +1 -1
  210. package/dist/esm/cura-display.entry.js +19 -10
  211. package/dist/esm/cura-display.entry.js.map +1 -1
  212. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  213. package/dist/esm/cura-dropdown-search-option.entry.js +5 -3
  214. package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -1
  215. package/dist/esm/cura-dropdown-search.entry.js +3 -3
  216. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  217. package/dist/esm/cura-icons-view.entry.js +4 -4
  218. package/dist/esm/cura-icons-view.entry.js.map +1 -1
  219. package/dist/esm/cura-loader-bar.entry.js +1 -1
  220. package/dist/esm/cura-radio.entry.js +1 -1
  221. package/dist/esm/cura-switch.entry.js +1 -1
  222. package/dist/esm/cura-toast.entry.js +1 -1
  223. package/dist/esm/cura.js +2 -2
  224. package/dist/esm/loader.js +2 -2
  225. package/dist/types/components/badges/cura-badge-distance/cura-badge-distance.d.ts +12 -0
  226. package/dist/types/components/badges/cura-badge-distance/cura-badge-distance.stories.d.ts +39 -0
  227. package/dist/types/components/buttons/cura-button/cura-button.d.ts +5 -0
  228. package/dist/types/components/buttons/cura-button/cura-button.stories.d.ts +23 -0
  229. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +6 -1
  230. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.stories.d.ts +23 -0
  231. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +6 -0
  232. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.stories.d.ts +11 -0
  233. package/dist/types/components/buttons/cura-button.definitions.d.ts +6 -0
  234. package/dist/types/components/cura-calendar/cura-calendar.d.ts +13 -7
  235. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +23 -1
  236. package/dist/types/components/forms/cura-label/cura-label.d.ts +1 -1
  237. package/dist/types/components/forms/cura-select/cura-select.d.ts +1 -0
  238. package/dist/types/components/text/cura-display/cura-display.d.ts +6 -0
  239. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +14 -0
  240. package/dist/types/components.d.ts +67 -14
  241. package/package.json +2 -2
  242. package/dist/cura/p-0b1829ed.entry.js.map +0 -1
  243. package/dist/cura/p-17a878d4.entry.js +0 -2
  244. package/dist/cura/p-335323b5.entry.js +0 -2
  245. package/dist/cura/p-335323b5.entry.js.map +0 -1
  246. package/dist/cura/p-67e34464.entry.js +0 -2
  247. package/dist/cura/p-67e34464.entry.js.map +0 -1
  248. package/dist/cura/p-79fa3b97.entry.js +0 -2
  249. package/dist/cura/p-79fa3b97.entry.js.map +0 -1
  250. package/dist/cura/p-89014323.entry.js +0 -2
  251. package/dist/cura/p-89014323.entry.js.map +0 -1
  252. package/dist/cura/p-9a4094e3.entry.js +0 -2
  253. package/dist/cura/p-9a4094e3.entry.js.map +0 -1
  254. package/dist/cura/p-af2036a7.entry.js +0 -2
  255. package/dist/cura/p-b0d66386.entry.js +0 -2
  256. package/dist/cura/p-b0d66386.entry.js.map +0 -1
  257. package/dist/cura/p-c518a91c.entry.js +0 -2
  258. package/dist/cura/p-c518a91c.entry.js.map +0 -1
  259. /package/dist/cura/{p-260edb61.entry.js.map → p-0d435e42.entry.js.map} +0 -0
  260. /package/dist/cura/{p-8433fec9.entry.js.map → p-0dd837cf.entry.js.map} +0 -0
  261. /package/dist/cura/{p-c63f4695.entry.js.map → p-2203e829.entry.js.map} +0 -0
  262. /package/dist/cura/{p-6373c7cd.entry.js.map → p-4c7a2419.entry.js.map} +0 -0
  263. /package/dist/cura/{p-5fcfbf32.entry.js.map → p-66c5cf5f.entry.js.map} +0 -0
  264. /package/dist/cura/{p-4eaeb590.entry.js.map → p-84d8c67d.entry.js.map} +0 -0
  265. /package/dist/cura/{p-a9dad622.entry.js.map → p-a5cf0fd6.entry.js.map} +0 -0
  266. /package/dist/cura/{p-f016eb62.entry.js.map → p-ad8a7e0f.entry.js.map} +0 -0
  267. /package/dist/cura/{p-af2036a7.entry.js.map → p-dfc65f66.entry.js.map} +0 -0
@@ -43,7 +43,7 @@ const CuraCard = class {
43
43
  return classes;
44
44
  }
45
45
  render() {
46
- return (index.h(index.Host, { key: 'e158f46384cc9fddf84ad55aed0f945283339d38', role: this.href ? 'link' : 'div' }, this.href ? (index.h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, index.h("slot", null))) : (index.h("div", { class: this.getClasses(), style: this.styles }, index.h("slot", null)))));
46
+ return (index.h(index.Host, { key: '24318e0e70d7a9cb1cbdfa3503b2fa5bce791c00', role: this.href ? 'link' : 'div' }, this.href ? (index.h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, index.h("slot", null))) : (index.h("div", { class: this.getClasses(), style: this.styles }, index.h("slot", null)))));
47
47
  }
48
48
  };
49
49
  CuraCard.style = CuraCardStyle0;
@@ -164,7 +164,7 @@ const CuraCheckbox = class {
164
164
  return index.h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
165
165
  }
166
166
  render() {
167
- return (index.h(index.Host, { key: 'b74eebdbcaed952fa2157c3cbb3a84ce92bb9e6c' }, index.h("div", { key: 'e18e4e5aa12a3e298db65399ebf002aa991100f2', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, index.h("div", { key: 'fdbcf3ec4b12bf9c6d80cded5ce9d17c4f5e2a39', class: "info" }, index.h("div", { key: 'cbe76b43956bed00ab638b953a44d941ffb748d5', class: "label-wrapper" }, index.h("cura-label", { key: '259c5e5e63a6d36ed15845899eaf8c76b2b50273', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { key: '42d8b2777d4790bd8f83a7ddc939c6ab584b5cf0', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { key: 'bcafaacf64c8967f78a3e9b7ecfe6d1412517ea3', color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", { key: 'c9cc9e74cc9048ead8375a158253491e1aae4dfe' }))), index.h("div", { key: 'e63ba7ef796c9d46cf4729facf1be985b8174028', class: 'checkbox', tabIndex: this.ontabindex }, index.h("input", { key: '2e7e2e302e577f26d8022fe4a0108f0e6727450f', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
167
+ return (index.h(index.Host, { key: 'd24019856ac701df4acbe1f7e104df67eae93945' }, index.h("div", { key: '413093861acf19223c65aae30bd5cd62053eec43', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, index.h("div", { key: '5ba8881480f1ef8692cde13258246175ac52f3c8', class: "info" }, index.h("div", { key: 'e3473b617a9261dfacea2c2b8bd826b87a739c6b', class: "label-wrapper" }, index.h("cura-label", { key: '2a4b7c973795a23b123c250259d95df63796f53c', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { key: '093a39a051be67644f6206095686cda606a3c9f5', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { key: '8fe9215b5a56a1cf7f10871e721c1b04cd88d37f', color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", { key: '5633213ce05d2f554a2acc9804d5306436eaac45' }))), index.h("div", { key: '5ff152af172d4a8cb0e83e2e50ec8fa6449ef9e4', class: 'checkbox', tabIndex: this.ontabindex }, index.h("input", { key: 'f62a404773c19fedfd236aa82ecd8582fdfd4c36', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
168
168
  }
169
169
  static get formAssociated() { return true; }
170
170
  get host() { return index.getElement(this); }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-98e7ba54.js');
6
6
 
7
- const curaDisplayCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
7
+ const curaDisplayCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.2857142857em;letter-spacing:-1.68px}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.8571428571em;letter-spacing:-1.92px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.5714285714em;letter-spacing:-1.2px}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(i),:host ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
8
8
  const CuraDisplayStyle0 = curaDisplayCss;
9
9
 
10
10
  const CuraDisplay = class {
@@ -12,6 +12,7 @@ const CuraDisplay = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  this.theme = window.CuraAPI.theme;
14
14
  this.level = 1;
15
+ this.size = 'large';
15
16
  this.spotColor = 'accent-dark';
16
17
  this.color = undefined;
17
18
  this.marginBlock = '1.25em';
@@ -31,7 +32,8 @@ const CuraDisplay = class {
31
32
  this.styles = {
32
33
  '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),
33
34
  '--font-size': window.CuraAPI.theme.fonts.getSize(),
34
- '--font-weight-bold': this.weights.bold
35
+ '--font-weight-bold': this.weights.bold,
36
+ '--font-weight-medium': this.weights.medium
35
37
  };
36
38
  }
37
39
  hostCSSProperties() {
@@ -47,20 +49,27 @@ const CuraDisplay = class {
47
49
  : this.theme.fonts.getColor();
48
50
  this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
49
51
  }
52
+ getClasses() {
53
+ var _a;
54
+ const classes = {};
55
+ classes[`${(_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`] = true;
56
+ return classes;
57
+ }
50
58
  getHeadingTag() {
59
+ const classes = this.getClasses();
51
60
  const tags = {
52
- '1': index.h("h1", { style: this.styles }, index.h("slot", null)),
53
- '2': index.h("h2", { style: this.styles }, index.h("slot", null)),
54
- '3': index.h("h3", { style: this.styles }, index.h("slot", null)),
55
- '4': index.h("h4", { style: this.styles }, index.h("slot", null)),
56
- '5': index.h("h5", { style: this.styles }, index.h("slot", null)),
57
- '6': index.h("h6", { style: this.styles }, index.h("slot", null)),
58
- 'default': index.h("h1", { style: this.styles }, index.h("slot", null))
61
+ '1': index.h("h1", { style: this.styles, class: classes }, index.h("slot", null)),
62
+ '2': index.h("h2", { style: this.styles, class: classes }, index.h("slot", null)),
63
+ '3': index.h("h3", { style: this.styles, class: classes }, index.h("slot", null)),
64
+ '4': index.h("h4", { style: this.styles, class: classes }, index.h("slot", null)),
65
+ '5': index.h("h5", { style: this.styles, class: classes }, index.h("slot", null)),
66
+ '6': index.h("h6", { style: this.styles, class: classes }, index.h("slot", null)),
67
+ 'default': index.h("h1", { style: this.styles, class: classes }, index.h("slot", null))
59
68
  };
60
69
  return tags[`${this.level}`] || tags['default'];
61
70
  }
62
71
  render() {
63
- return (index.h(index.Host, { key: '89df8c001192a7526e6976d9b43099562d65809d', style: this.hostCSSProperties() }, this.getHeadingTag()));
72
+ return (index.h(index.Host, { key: 'ffd8e58f9bf50038554591ec2b191e0488ae0500', style: this.hostCSSProperties() }, this.getHeadingTag()));
64
73
  }
65
74
  get host() { return index.getElement(this); }
66
75
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-display.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,m7BAAm7B,CAAC;AAC38B,0BAAe,cAAc;;MCMhB,WAAW;;;QA+CtB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;qBAzCyB,CAAC;yBAMpB,aAAa;;2BAiBX,QAAQ;0BAMT,MAAM;sBAaxB,EAAE;;IA3BpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IA2BD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG;YACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;YAChE,aAAa,EAAE,MAAM,CAAC,O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S,EAAEA,gBAAI,KAAK,EAAE,IAAI,CAAC,MAAM,IAAEA,qBAAa,CAAK;SACtD,CAAC;QACF,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;KACjD;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACjC,IAAI,CAAC,aAAa,EAAE,CACjB,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0px;\n }\n\n @include medium-large() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 3.429em;\n }\n }\n\n @include xlarge-only() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 4.286em;\n line-height: calc(var(--line-height) + 5%);\n }\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1(default) to 6.\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 1;\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '120%';\n\n /**\n * Host element <cura-display>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n theme = window.CuraAPI.theme;\n @State() styles = {};\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n getHeadingTag() {\n const tags = {\n '1': <h1 style={this.styles}><slot></slot></h1>,\n '2': <h2 style={this.styles}><slot></slot></h2>,\n '3': <h3 style={this.styles}><slot></slot></h3>,\n '4': <h4 style={this.styles}><slot></slot></h4>,\n '5': <h5 style={this.styles}><slot></slot></h5>,\n '6': <h6 style={this.styles}><slot></slot></h6>,\n 'default': <h1 style={this.styles}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-display.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,cAAc,GAAG,+6CAA+6C,CAAC;AACv8C,0BAAe,cAAc;;MCMhB,WAAW;;;QAqDtB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;qBA/CyB,CAAC;oBAMN,OAAO;yBAMpC,aAAa;;2BAiBI,QAAQ;0BAMT,MAAM;sBAaxB,EAAE;;IA3BpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IA2BD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG;YACZ,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;YAChE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;YACnD,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;YACvC,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;SAC5C,CAAC;KACH;IAED,iBAAiB;QACf,OAAO;YACL,gBAAgB,EAAE,IAAI,CAAC,WAAW;YAClC,kBAAkB,EAAE,IAAI,CAAC,YAAY;YACrC,eAAe,EAAE,IAAI,CAAC,UAAU;SACjC,CAAC;KACH;IAED,SAAS;QAC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,gBAAI,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,IAAEA,qBAAa,CAAK;YAC/D,SAAS,EAAEA,gBAAI,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,IAAEA,qBAAa,CAAK;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;KACjD;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACjC,IAAI,CAAC,aAAa,EAAE,CACjB,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0px;\n\n &.small {\n font-size: 2.2857142857142856em;\n letter-spacing: -1.68px;\n }\n }\n\n @include medium-large() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 3.429em;\n\n &.small {\n font-size: 2.857142857142857em;\n letter-spacing: -1.92px;\n }\n }\n }\n\n @include xlarge-only() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 4.286em;\n line-height: calc(var(--line-height) + 5%);\n\n &.small {\n font-size: 3.5714285714285716em;\n letter-spacing: -1.2px;\n }\n }\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(i), ::slotted(em) {\n font-style: italic;\n font-weight: var(--font-weight-medium);\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1(default) to 6.\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 1;\n\n /**\n * Display size.\n * Values: 'large' (default) | 'small'.\n */\n @Prop({reflect: true}) size: 'large' | 'small' = 'large';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop() spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '120%';\n\n /**\n * Host element <cura-display>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n theme = window.CuraAPI.theme;\n @State() styles = {};\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold,\n '--font-weight-medium': this.weights.medium\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n return classes;\n }\n\n getHeadingTag() {\n const classes = this.getClasses();\n const tags = {\n '1': <h1 style={this.styles} class={classes}><slot></slot></h1>,\n '2': <h2 style={this.styles} class={classes}><slot></slot></h2>,\n '3': <h3 style={this.styles} class={classes}><slot></slot></h3>,\n '4': <h4 style={this.styles} class={classes}><slot></slot></h4>,\n '5': <h5 style={this.styles} class={classes}><slot></slot></h5>,\n '6': <h6 style={this.styles} class={classes}><slot></slot></h6>,\n 'default': <h1 style={this.styles} class={classes}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -12,7 +12,7 @@ const CuraDropdownSearchOptionTitle = class {
12
12
  index.registerInstance(this, hostRef);
13
13
  }
14
14
  render() {
15
- return (index.h(index.Host, { key: 'd27a47a6d61497f488c449188b2c6036529350cc', slot: "dropdown-search-option" }, index.h("cura-label", { key: 'ba63e9fce7392087551ccc7fb46a83cffa6785c9', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, index.h("slot", { key: 'f14d41a3ed995f6f9a946e7d96e5c0b0208310ad' }))));
15
+ return (index.h(index.Host, { key: 'b9fbb0edaea7457fad9244d5c032961bd913f170', slot: "dropdown-search-option" }, index.h("cura-label", { key: 'dbefa340f1001a532c7f2152907b87e5e2e1f0ec', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, index.h("slot", { key: '1d03c41d153dc707db82943c77dd96547c98c78a' }))));
16
16
  }
17
17
  };
18
18
  CuraDropdownSearchOptionTitle.style = CuraDropdownSearchOptionTitleStyle0;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-98e7ba54.js');
6
6
 
7
- const curaDropdownSearchOptionCss = ":host{display:block;box-sizing:border-box;width:100%}:host(:last-of-type) li{border-bottom:none}ul{list-style:none;width:100%;margin:0;padding:0}li{width:100%;display:flex;align-items:center;align-content:center;justify-content:center;gap:8px;padding:8px 4px;flex-direction:row;background-color:var(--neutral-purewhite);border-bottom:1px solid var(--neutral-light);box-sizing:border-box;cursor:pointer}li.disabled{cursor:default}li.hovered{background-color:var(--neutral-white)}li cura-heading{width:100%;margin-block:0px}li ::slotted(div[slot=image]){min-width:32px;display:flex;justify-content:center;align-items:center}li ::slotted(div[slot=action]){display:flex;justify-content:end}li.selected{background-color:var(--primary-lighter)}li:hover:not(.disabled){background-color:var(--neutral-white)}";
7
+ const curaDropdownSearchOptionCss = ":host{display:block;box-sizing:border-box;width:100%}:host(:last-of-type) .content-container{border-bottom:none}.option-container{width:100%;display:flex}.option-container:hover:not(.disabled):not(.selected) .content-container{background-color:var(--neutral-white)}.option-container.selected .content-container{background-color:var(--primary-lighter)}.option-container.disabled{cursor:default}.content-container{display:flex;width:100%;box-sizing:border-box;padding:calc(var(--base-spacing) * 2px) calc(var(--base-spacing) * 1px);background-color:var(--neutral-purewhite);border-bottom:1px solid var(--neutral-light)}.content-container ::slotted(div[slot=action]){display:flex;justify-content:end}.option-info{width:100%;display:flex;align-items:center;align-content:center;justify-content:center;gap:calc(var(--base-spacing) * 2px);flex-direction:row;box-sizing:border-box;cursor:pointer}.option-info cura-heading{width:100%;margin-block:0px}.option-info ::slotted(div[slot=image]){min-width:calc(var(--base-spacing) * 8px);display:flex;justify-content:center;align-items:center}";
8
8
  const CuraDropdownSearchOptionStyle0 = curaDropdownSearchOptionCss;
9
9
 
10
10
  const CuraDropdownSearchOption = class {
@@ -30,6 +30,7 @@ const CuraDropdownSearchOption = class {
30
30
  }
31
31
  connectedCallback() {
32
32
  this.weights = window.CuraAPI.theme.fonts.getWeights();
33
+ this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
33
34
  this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);
34
35
  this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);
35
36
  this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
@@ -45,11 +46,12 @@ const CuraDropdownSearchOption = class {
45
46
  }
46
47
  }
47
48
  render() {
48
- return (index.h(index.Host, { key: 'aa4b585c3f67a74d1371430200ad309f74015af6', style: this.styles, slot: "dropdown-search-option" }, index.h("ul", { key: '5413964e5e10e68e4ff2ac30f68f6e22cff6dcc1' }, index.h("li", { key: '3aab9b7d5e3904e57a7310addc4b15a51453d31d', onClick: (e) => this.handleOptionClick(e), value: this.value, class: {
49
+ return (index.h(index.Host, { key: '957218946adc6611a384d8e86860eb4f8ae50db3', slot: "dropdown-search-option" }, index.h("div", { key: 'a9b41feb6d72ae97cdeedd9a9aed36e2d6df40fe', style: this.styles, class: {
50
+ "option-container": true,
49
51
  hovered: this.selectable ? this.hovered : false,
50
52
  selected: this.selected,
51
53
  disabled: !this.selectable
52
- } }, index.h("slot", { key: '030c06f2e9bcfd0169b8d94c8976cd4b1e25b834', name: "image" }), index.h("cura-heading", { key: 'f5bd16d815a853a41d98aac09517359a5e1b432d', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, index.h("slot", { key: '878d1db64dc98c57530adf947cbc216ac1ce1be0' })), index.h("slot", { key: '81c92fcb864bc8f2324cc353574123705fc386a8', name: "action" })))));
54
+ } }, index.h("div", { key: '18994a7e0ad6e2b4ab37ae65edc796e4cdedce43', class: "content-container" }, index.h("div", { key: '2505977c08bea5d92b3cc33af5c117709120b82b', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, index.h("slot", { key: 'bc5ac8b88938f29693b6f9d68ec933e7abc513e4', name: "image" }), index.h("cura-heading", { key: '81d2b1d1e8b60f26a6e444d18dac0ddfc95b44ea', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, index.h("slot", { key: 'e91fb72dc20136d0a6b56da0d03eaba02327d80d' }))), index.h("slot", { key: 'f0e24b8548bec4ff52f3fcccd77562ef5548d5f6', name: "action" })))));
53
55
  }
54
56
  get hostElement() { return index.getElement(this); }
55
57
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-dropdown-search-option.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,2BAA2B,GAAG,kyBAAkyB,CAAC;AACv0B,uCAAe,2BAA2B;;MCM7B,wBAAwB;;;;QAwC3B,sBAAiB,GAAG,CAAC,CAAQ;YACnC,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACrC,IAAI,CAAC,eAAe,EAAE,CAAC;aACxB;iBAAM;gBACL,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,CAAC,CAAC,wBAAwB,EAAE,CAAC;aAC9B;SACF,CAAC;;wBAxC0D,KAAK;0BAKlB,IAAI;uBAKQ,KAAK;sBAE9C,EAAE;;IAWpB,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACvD,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC/F,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,M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,GAAQ,CACxB,CACF,CACA,EACP;KACH;;;;;;;;;;","names":["h","Host"],"sources":["src/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.scss?tag=cura-dropdown-search-option&encapsulation=shadow","src/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\n:host(:last-of-type) li {\n border-bottom: none;\n}\n\nul {\n list-style: none;\n width: 100%;\n margin: 0;\n padding: 0;\n}\nli {\n width: 100%;\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 4px;\n flex-direction: row;\n background-color: var(--neutral-purewhite);\n border-bottom: 1px solid var(--neutral-light);\n box-sizing: border-box;\n cursor: pointer;\n\n &.disabled {\n cursor: default;\n }\n\n &.hovered {\n background-color: var(--neutral-white);\n }\n\n cura-heading {\n width: 100%;\n margin-block: 0px;\n }\n\n ::slotted(div[slot='image']) {\n min-width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n ::slotted(div[slot='action']) {\n display: flex;\n justify-content: end;\n }\n\n &.selected {\n background-color: var(--primary-lighter);\n }\n\n &:hover:not(.disabled) {\n background-color: var(--neutral-white);\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-dropdown-search-option',\n styleUrl: 'cura-dropdown-search-option.scss',\n shadow: true,\n})\nexport class CuraDropdownSearchOption {\n /**\n * The value of the dropdown search option.\n */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Indicates if the dropdown search option is selected.\n */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /**\n * Indicates if the dropdown search is selectable.\n */\n @Prop({ reflect: true }) selectable: boolean = true;\n\n /**\n * Indicates if the dropdown search option is hovered.\n */\n @Prop({ reflect: true, mutable: true }) hovered: boolean = false;\n\n @State() styles = {};\n\n /**\n * Event emitted when the option is selected.\n */\n @Event() optionSelected: EventEmitter<string>;\n\n @Element() hostElement: HTMLElement;\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\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-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--primary-lighter'] = window.CuraAPI.theme.colors.getColor(`primary-lighter`, 50);\n }\n\n private handleOptionClick = (e: Event) => {\n if (this.selectable) {\n this.selected = !this.selected;\n this.optionSelected.emit(this.value);\n this.updateIconColor();\n } else {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n };\n\n componentDidLoad() {\n this.updateIconColor();\n }\n\n @Watch('selected')\n private updateIconColor() {\n const iconElement = this.hostElement.querySelector('[slot=\"image\"] cura-icon');\n if (iconElement) {\n iconElement.setAttribute('color', this.selected ? 'primary' : 'neutral-dark');\n }\n }\n\n render() {\n return (\n <Host style={this.styles} slot=\"dropdown-search-option\">\n <ul>\n <li\n onClick={(e) => this.handleOptionClick(e)}\n value={this.value}\n class={{\n hovered: this.selectable ? this.hovered : false,\n selected: this.selected,\n disabled: !this.selectable\n }}\n >\n <slot name=\"image\"></slot>\n <cura-heading size=\"xsmall\" lineHeight=\"16px\" marginBlock=\"0px\" weight=\"bold\" color=\"neutral-black\">\n <slot></slot>\n </cura-heading>\n <slot name=\"action\"></slot>\n </li>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"cura-dropdown-search-option.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,2BAA2B,GAAG,0jCAA0jC,CAAC;AAC/lC,uCAAe,2BAA2B;;MCM7B,wBAAwB;;;;QAyC3B,sBAAiB,GAAG,CAAC,CAAQ;YACnC,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,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,EAAE;YACf,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,cAAc,CAAC,CAAC;SAC/E;KACF;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,IAAI,EAAC,wBAAwB,IACjCD,kEACE,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,KAAK,EAAE;gBACL,kBAAkB,EAAE,IAAI;gBACxB,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK;gBAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAU;aAC3B,IACDA,kEAAK,KAAK,EAAC,mBAAmB,IAC5BA,kEAAK,KAAK,EAAC,aAAa,EAAC,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAChEA,mEAAM,IAAI,EAAC,OAAO,GAAQ,EAC1BA,2EAAc,IAAI,EAAC,QAAQ,EAAC,UAAU,EAAC,MAAM,EAAC,WAAW,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,IACjGA,oEAAa,CACA,CACX,EACNA,mEAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACF,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"sources":["src/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.scss?tag=cura-dropdown-search-option&encapsulation=shadow","src/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.tsx"],"sourcesContent":["@import \"../../../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\n:host(:last-of-type) .content-container {\n border-bottom: none;\n}\n\n.option-container {\n width: 100%;\n display: flex;\n\n &:hover:not(.disabled):not(.selected) .content-container {\n background-color: var(--neutral-white);\n }\n\n &.selected .content-container {\n background-color: var(--primary-lighter);\n }\n\n &.disabled {\n cursor: default;\n }\n}\n\n.content-container {\n display: flex;\n width: 100%;\n box-sizing: border-box;\n padding: #{$spacing-mini} #{$spacing-tiny};\n background-color: var(--neutral-purewhite);\n border-bottom: 1px solid var(--neutral-light);\n\n ::slotted(div[slot='action']) {\n display: flex;\n justify-content: end;\n }\n}\n\n.option-info {\n width: 100%;\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n gap: #{$spacing-mini};\n flex-direction: row;\n box-sizing: border-box;\n cursor: pointer;\n\n cura-heading {\n width: 100%;\n margin-block: 0px;\n }\n\n ::slotted(div[slot='image']) {\n min-width: #{$spacing-m};\n display: flex;\n justify-content: center;\n align-items: center;\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-dropdown-search-option',\n styleUrl: 'cura-dropdown-search-option.scss',\n shadow: true,\n})\nexport class CuraDropdownSearchOption {\n /**\n * The value of the dropdown search option.\n */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Indicates if the dropdown search option is selected.\n */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /**\n * Indicates if the dropdown search is selectable.\n */\n @Prop({ reflect: true }) selectable: boolean = true;\n\n /**\n * Indicates if the dropdown search option is hovered.\n */\n @Prop({ reflect: true, mutable: true }) hovered: boolean = false;\n\n @State() styles = {};\n\n /**\n * Event emitted when the option is selected.\n */\n @Event() optionSelected: EventEmitter<string>;\n\n @Element() hostElement: HTMLElement;\n\n weights;\n\n connectedCallback() {\n this.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-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--primary-lighter'] = window.CuraAPI.theme.colors.getColor(`primary-lighter`, 50);\n }\n\n private handleOptionClick = (e: Event) => {\n if (this.selectable) {\n this.selected = !this.selected;\n this.optionSelected.emit(this.value);\n this.updateIconColor();\n } else {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n };\n\n componentDidLoad() {\n this.updateIconColor();\n }\n\n @Watch('selected')\n private updateIconColor() {\n const iconElement = this.hostElement.querySelector('[slot=\"image\"] cura-icon');\n if (iconElement) {\n iconElement.setAttribute('color', this.selected ? 'primary' : 'neutral-dark');\n }\n }\n\n render() {\n return (\n <Host slot=\"dropdown-search-option\">\n <div\n style={this.styles}\n class={{\n \"option-container\": true,\n hovered: this.selectable ? this.hovered : false,\n selected: this.selected,\n disabled: !this.selectable\n }}>\n <div class=\"content-container\">\n <div class=\"option-info\" onClick={(e) => this.handleOptionClick(e)}>\n <slot name=\"image\"></slot>\n <cura-heading size=\"xsmall\" lineHeight=\"16px\" marginBlock=\"0px\" weight=\"bold\" color=\"neutral-black\">\n <slot></slot>\n </cura-heading>\n </div>\n <slot name=\"action\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -129,7 +129,7 @@ const CuraDropdownSearch = class {
129
129
  }
130
130
  addClickListenersToOptions() {
131
131
  this.options.forEach((option, index) => {
132
- option.addEventListener('click', () => this.onSelectedOption(index));
132
+ option.addEventListener('optionSelected', () => this.onSelectedOption(index));
133
133
  });
134
134
  }
135
135
  updateSelectedOption(value) {
@@ -211,9 +211,9 @@ const CuraDropdownSearch = class {
211
211
  }
212
212
  render() {
213
213
  const isMobileDropdown = this.isMobile && this.isDropdownOpen;
214
- return (index.h(index.Host, { key: 'b5fd18f900ab61704e75d3c768c73dd7c616e741', style: this.hostCSSProperties(), class: "dropdown-overlay" }, index.h("div", { key: 'd15ed52f0cd8fe17c3320c235f740b8118883cbf', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, index.h("div", { key: '8690cc4ecea61480603468e6e2d6b811c656ec72', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (index.h("cura-button-transparent", { key: '1de51bb3c1f6bb4ac67ac12b0a6983840df1f248', fontColor: "dark", onClick: () => (this.isMobile = false), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), index.h("cura-input-text", { key: '477980345bd09b89655f38b7ebf1db44f8475e35', 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.isDropdownOpen = true), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
214
+ return (index.h(index.Host, { key: '0332c943d5c4240283d9672d021e611a982fe52e', style: this.hostCSSProperties(), class: "dropdown-overlay" }, index.h("div", { key: '2f65822008f3f7fae7c55033e3a6d75efa3e8466', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, index.h("div", { key: '28bfa930d8f66007716f586a35c78ebf9086974e', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (index.h("cura-button-transparent", { key: '1e1c18de7fca61e6420b175c602865fc5aec5e36', fontColor: "dark", onClick: () => (this.isMobile = false), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), index.h("cura-input-text", { key: '5fc1a11e5491ae15d0cc9f1d9aab32cd69a2d2ba', 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.isDropdownOpen = true), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
215
215
  this.handleOnBlur();
216
- }, placeholder: this.placeholder, size: "large", onKeyDown: this.handleKeyDown }, index.h("slot", { key: '55a3e00b86b3bfcc54f0352d48399af44139eb2e', name: "helperText" }))), index.h("div", { key: 'd123c4f652f675eb3a98f7ea0f518c01c767b97f', id: "dropdown-search-list", class: this.getDropdownClasses() }, index.h("slot", { key: '06e5a691a3be5eaa0861953bd36779f8993af83a', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
216
+ }, placeholder: this.placeholder, size: "large", onKeyDown: this.handleKeyDown }, index.h("slot", { key: 'f6ae0aea0d15fded19af9152e68a8de56995497f', name: "helperText" }))), index.h("div", { key: '1ec396eafe90f062aea392faca54473ba3cc475b', id: "dropdown-search-list", class: this.getDropdownClasses() }, index.h("slot", { key: 'afc41aa7166145912e163086f6df603dc3e39d51', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
217
217
  }
218
218
  get host() { return index.getElement(this); }
219
219
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-dropdown-search.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,qBAAqB,GAAG,q1EAAq1E,CAAC;AACp3E,iCAAe,qBAAqB;;MCMvB,kBAAkB;;;;;QA8GrB,mBAAc,GAA0B,IAAI,CAAC;QAkE7C,qBAAgB,GAAG;YACzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACrF,IAAI,CAAC,0BAA0B,EAAE,CAAC;YAClC,IAAI,CAAC,kBAAkB,EAAE,CAAC;SAC3B,CAAC;QAiBM,sBAAiB,GAAG,CAAC,KAAY;YACvC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;SAEhC,CAAC;QAgBM,kBAAa,GAAG,CAAC,KAAoB;YAC3C,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE;gBAC7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AAE,IAAI,CAAC,aAAa,IAE7BA,mEAAM,IAAI,EAAC,YAAY,GAAQ,CACf,CACd,EACNA,kEAAK,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAC7DA,mEAAM,IAAI,EAAC,wBAAwB,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC5E,CACF,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"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: 0;\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 * 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 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 @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 }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\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('click', () => 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 }\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 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.isDropdownOpen = true)}\n onClick={() => (window.innerWidth < 768 ? (this.isMobile = true) : null)}\n onBlur={() => {\n this.handleOnBlur();\n }}\n placeholder={this.placeholder}\n size=\"large\"\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"],"version":3}
1
+ {"file":"cura-dropdown-search.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,qBAAqB,GAAG,q1EAAq1E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,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO,EACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,QAAQ,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,aAAa,EAAE,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAe,CAAC,EAChE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EACvC,OAAO,EAAE,OAAO,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,EAC3C,OAAO,EAAE,OAAO,MAAM,CAAC,UAAU,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,IAAI,CAAC,EACxE,MAAM,EAAE;gBACN,IAAI,CAAC,YAAY,EAAE,CAAC;aACrB,EACD,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,IAAI,CAAC,aAAa,IAE7BA,mEAAM,IAAI,EAAC,YAAY,GAAQ,CACf,CACd,EACNA,kEAAK,EAAE,EAAC,sBAAsB,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAC7DA,mEAAM,IAAI,EAAC,wBAAwB,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC5E,CACF,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"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: 0;\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 * 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 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 @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 }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\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 }\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 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.isDropdownOpen = true)}\n onClick={() => (window.innerWidth < 768 ? (this.isMobile = true) : null)}\n onBlur={() => {\n this.handleOnBlur();\n }}\n placeholder={this.placeholder}\n size=\"large\"\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"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-98e7ba54.js');
6
6
  const curaIcon_definitions = require('./cura-icon.definitions-8d714f6a.js');
7
7
 
8
- const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "contacts", "currency", "delete", "desktop", "doc", "down", "download", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCancel", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "swap", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
8
+ const iconsetdefaulticons = ["360", "accessibility", "addUser", "airdrop", "alertCircle", "alertTriangle", "arrowDown", "arrowDownCircle", "arrowLeft", "arrowLeftCircle", "arrowRight", "arrowRightCircle", "arrowUp", "arrowUpCircle", "attach", "avatarF", "avatarM", "biometry", "bloodGroup", "calendar", "cam", "camOff", "central", "chatCircle", "check", "checkBadge", "checkCircle", "checkDouble", "clock", "close", "closeCircle", "collapse", "config", "contacts", "currency", "delete", "desktop", "doc", "down", "download", "drug", "duplicate", "edit", "exam", "examDoc", "expand", "facebook", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "geotagUnity", "geotagUnityGroup", "google", "graph", "healthPlan", "heart", "height", "height2", "home", "horizontalList", "imageUp", "infoCircle", "instagram", "key", "lamp", "language", "language2", "languageEN", "languagePT", "lattes", "left", "like", "link", "linkExternal", "linkedin", "list", "login", "logout", "mail", "maintenance", "medDoc", "medEspec", "medImg", "medUser", "medical", "menuHamburguer", "menuKebab", "menuMeatballs", "mic", "micOff", "minus", "minusCircle", "minusSquare", "mobile", "news", "notification", "npsDeslike", "npsHate", "npsLike", "npsLove", "npsNeutral", "order", "partner", "phone", "play", "plus", "plusCircle", "plusSquare", "print", "profile", "profileCircle", "questionCircle", "questionSquare", "range", "reload", "ribbon", "right", "schedule", "scheduleCancel", "scheduleCheck", "scheduleHistorico", "search", "secure", "share", "siren", "sound", "soundOff", "subItem", "swap", "target", "team", "telegram", "twitter", "unLink", "unSecure", "unity", "unlike", "up", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "whatsapp", "wifi", "wifiOff", "youtube", "zoomIn", "zoomOut"];
9
9
 
10
10
  const curaIconsViewCss = ":host{display:block;padding:24px;font-family:\"Roboto\", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:flex;align-items:center}.iconSizes .size{display:flex;flex-direction:column;text-align:center;align-items:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px;margin:8px 0}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#2d2d2d;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:flex;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;transition:opacity 0.2s linear;width:105px;display:flex;flex-direction:column;text-align:center;align-items:center;margin-bottom:16px;box-sizing:border-box;}.icons .icon cura-label{margin-top:8px}.icons .icon cura-paragraph{margin-top:4px}";
11
11
  const CuraIconsViewStyle0 = curaIconsViewCss;
@@ -24,9 +24,9 @@ const CuraIconsView = class {
24
24
  this.sizes.unshift(this.sizes.pop());
25
25
  }
26
26
  render() {
27
- return (index.h(index.Host, { key: '57820e2608c03f54b58656602ca329c7166e142e' }, index.h("div", { key: '47fb932e5b2c0876f58fde68b88e30193e14b590', class: "iconDetail" }, index.h("cura-heading", { key: 'b4ad008b60026ac7ceccee16c68276e9bef114cb', size: "small", "margin-block": "0 24px" }, "Icon: ", index.h("b", { key: '6634d3ae9cf33df1942563e44e72f470199725e5' }, this.selected)), index.h("div", { key: '8c565d1b3714dc5b1aad971e408cab340a4aca46', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
28
- index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size }), index.h("span", null, size)))), index.h("div", { key: 'd979d1169689f583900d85d592c29bb2869ff62a', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
29
- index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), index.h("span", null, size))))), index.h("div", { key: '0ed5c55f057bcdea8de3bdaa1d2f45a516763d95', class: "icons" }, iconsetdefaulticons.map(icon => index.h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, index.h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), index.h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !curaIcon_definitions.microIcons.includes(icon) ? '' :
27
+ return (index.h(index.Host, { key: 'a6617c95d8f812380ad9a6471b2d3308f230d985' }, index.h("div", { key: 'fd3d146d453f37b1e1f8968113271bd59c870821', class: "iconDetail" }, index.h("cura-heading", { key: '6f8ba0f48fe6a3fd7d237bf8606f0e789bb9a24e', size: "small", "margin-block": "0 24px" }, "Icon: ", index.h("b", { key: '9a90cfdc2df40488ece88e4af4ddf7af4c8b7413' }, this.selected)), index.h("div", { key: '0b0978997491adc4bf5c9629c3ca93302d352a57', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
28
+ index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size }), index.h("span", null, size)))), index.h("div", { key: '0d8666083a28088fbb036920c0130770fadb9fe8', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !curaIcon_definitions.microIcons.includes(this.selected) ? '' :
29
+ index.h("div", { class: "size" }, index.h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), index.h("span", null, size))))), index.h("div", { key: 'fcc2275ca60d1c36dbcc5a7a5b10e1a35d2445e2', class: "icons" }, iconsetdefaulticons.map(icon => index.h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, index.h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), index.h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !curaIcon_definitions.microIcons.includes(icon) ? '' :
30
30
  index.h("cura-paragraph", { color: 'success-dark', size: "xsmall", "margin-block": "0px", "line-height": '100%' }, "MICRO"))))));
31
31
  }
32
32
  };
@@ -1 +1 @@
1
- {"file":"cura-icons-view.entry.cjs.js","mappings":";;;;;;;AAAA,4BAAe,CAAC,KAAK,EAAC,eAAe,EAAC,SAAS,EAAC,SAAS,EAAC,aAAa,EAAC,eAAe,EAAC,WAAW,EAAC,iBAAiB,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,EAAC,kBAAkB,EAAC,SAAS,EAAC,eAAe,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,EAAC,YAAY,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAC,YAAY,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,QAAQ,EAAC,UAAU,EAAC,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAC,KAAK,EAAC,MAAM,EAAC,UAAU,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,SAAS,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,EAAC,aAAa,EAAC,kBAAkB,EAAC,QAAQ,EAAC,OAAO,EAAC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AAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,eAAe,GAAa,EAC9EA,sBAAQ,IAAI,CAAS,CACjB,CACP,CACG,CACF,EACNA,kEAAK,KAAK,EAAC,OAAO,IACd,mBAAmB,CAAC,GAAG,CAAC,IAAI,IAC5BA,iBAAK,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAChGA,uBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAc,EAC9EA,wBACE,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACnD,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,IAAG,IAAI,CAAc,EACnF,CAACE,+BAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/BF,4BACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,kBACA,KAAK,iBACN,MAAM,YAAuB,CAEzC,CACP,CACG,CACD,EACP;KACH;;;;;;","names":["iconSizes","h","Host","microIcons"],"sources":["src/assets/icons/iconset-default-list.ts","src/components/cura-icons-view/cura-icons-view.scss?tag=cura-icons-view&encapsulation=shadow","src/components/cura-icons-view/cura-icons-view.tsx"],"sourcesContent":["export default [\"360\",\"accessibility\",\"addUser\",\"airdrop\",\"alertCircle\",\"alertTriangle\",\"arrowDown\",\"arrowDownCircle\",\"arrowLeft\",\"arrowLeftCircle\",\"arrowRight\",\"arrowRightCircle\",\"arrowUp\",\"arrowUpCircle\",\"attach\",\"avatarF\",\"avatarM\",\"biometry\",\"bloodGroup\",\"calendar\",\"cam\",\"camOff\",\"central\",\"chatCircle\",\"check\",\"checkBadge\",\"checkCircle\",\"checkDouble\",\"clock\",\"close\",\"closeCircle\",\"collapse\",\"config\",\"contacts\",\"currency\",\"delete\",\"desktop\",\"doc\",\"down\",\"download\",\"duplicate\",\"edit\",\"exam\",\"examDoc\",\"expand\",\"facebook\",\"fileBmp\",\"fileJpg\",\"filePdf\",\"filePng\",\"fileUpload\",\"fileXls\",\"filter\",\"fullscreen\",\"gallery\",\"geotag\",\"geotagUnity\",\"geotagUnityGroup\",\"google\",\"graph\",\"healthPlan\",\"heart\",\"height\",\"height2\",\"home\",\"horizontalList\",\"imageUp\",\"infoCircle\",\"instagram\",\"key\",\"lamp\",\"language\",\"language2\",\"languageEN\",\"languagePT\",\"lattes\",\"left\",\"like\",\"link\",\"linkExternal\",\"linkedin\",\"list\",\"login\",\"logout\",\"mail\",\"maintenance\",\"medDoc\",\"medEspec\",\"medImg\",\"medUser\",\"medical\",\"menuHamburguer\",\"menuKebab\",\"menuMeatballs\",\"mic\",\"micOff\",\"minus\",\"minusCircle\",\"minusSquare\",\"mobile\",\"news\",\"notification\",\"npsDeslike\",\"npsHate\",\"npsLike\",\"npsLove\",\"npsNeutral\",\"order\",\"partner\",\"phone\",\"play\",\"plus\",\"plusCircle\",\"plusSquare\",\"print\",\"profile\",\"profileCircle\",\"questionCircle\",\"questionSquare\",\"range\",\"reload\",\"ribbon\",\"right\",\"schedule\",\"scheduleCancel\",\"scheduleCheck\",\"scheduleHistorico\",\"search\",\"secure\",\"share\",\"siren\",\"sound\",\"soundOff\",\"subItem\",\"swap\",\"target\",\"team\",\"telegram\",\"twitter\",\"unLink\",\"unSecure\",\"unity\",\"unlike\",\"up\",\"upload\",\"verticalList\",\"viewFalse\",\"viewTrue\",\"weight\",\"whatsapp\",\"wifi\",\"wifiOff\",\"youtube\",\"zoomIn\",\"zoomOut\"];",":host {\n display: block;\n padding: 24px;\n font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.iconDetail {\n display: block;\n}\n\n.iconSizes {\n display: flex;\n align-items: center;\n\n\n .size {\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-right: 9px;\n padding: 8px;\n\n &:last-child { margin-right: 0; }\n span {\n font-size: 10px;\n margin: 8px 0;\n }\n }\n\n &.invert {\n margin-top: 12px;\n\n .size {\n background-color: #2d2d2d;\n color: #F6F6F6;\n border-radius: 3px;\n }\n }\n}\n\n.icons {\n margin-top: 28px;\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n .icon {\n position: relative;\n padding: 4px;\n cursor: pointer;\n opacity: .6;\n transition: opacity .2s linear;\n width: 105px;\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-bottom: 16px;\n box-sizing: border-box;\n cura-label {\n margin-top: 8px;\n }\n cura-paragraph {\n margin-top: 4px;\n }\n /* &.selected {\n transform: scale(1.2);\n } */\n }\n}\n\n","import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { microIcons, iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n { !microIcons.includes(icon) ? '' :\n <cura-paragraph\n color='success-dark'\n size=\"xsmall\"\n margin-block=\"0px\"\n line-height='100%'>MICRO</cura-paragraph>\n }\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-icons-view.entry.cjs.js","mappings":";;;;;;;AAAA,4BAAe,CAAC,KAAK,EAAC,eAAe,EAAC,SAAS,EAAC,SAAS,EAAC,aAAa,EAAC,eAAe,EAAC,WAAW,EAAC,iBAAiB,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,EAAC,kBAAkB,EAAC,SAAS,EAAC,eAAe,EAAC,QAAQ,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,EAAC,YAAY,EAAC,UAAU,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,YAAY,EAAC,OAAO,EAAC,YAAY,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,QAAQ,EAAC,UAAU,EAAC,UAAU,EAAC,QAAQ,EAAC,SAAS,EAAC,KAAK,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,WAAW,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAC,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,CAAC,GAAG,CAAE,IAAI,IACpB,IAAI,KAAK,OAAO,IAAI,CAACE,+BAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YAC5DF,iBAAK,KAAK,EAAC,MAAM,IACfA,uBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,eAAe,GAAa,EAC9EA,sBAAQ,IAAI,CAAS,CACjB,CACP,CACG,CACF,EACNA,kEAAK,KAAK,EAAC,OAAO,IACd,mBAAmB,CAAC,GAAG,CAAC,IAAI,IAC5BA,iBAAK,KAAK,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAChGA,uBACE,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAc,EAC9EA,wBACE,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,EACnD,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC,QAAQ,GAAG,aAAa,GAAG,cAAc,IAAG,IAAI,CAAc,EACnF,CAACE,+BAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/BF,4BACE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,kBACA,KAAK,iBACN,MAAM,YAAuB,CAEzC,CACP,CACG,CACD,EACP;KACH;;;;;;","names":["iconSizes","h","Host","microIcons"],"sources":["src/assets/icons/iconset-default-list.ts","src/components/cura-icons-view/cura-icons-view.scss?tag=cura-icons-view&encapsulation=shadow","src/components/cura-icons-view/cura-icons-view.tsx"],"sourcesContent":["export default [\"360\",\"accessibility\",\"addUser\",\"airdrop\",\"alertCircle\",\"alertTriangle\",\"arrowDown\",\"arrowDownCircle\",\"arrowLeft\",\"arrowLeftCircle\",\"arrowRight\",\"arrowRightCircle\",\"arrowUp\",\"arrowUpCircle\",\"attach\",\"avatarF\",\"avatarM\",\"biometry\",\"bloodGroup\",\"calendar\",\"cam\",\"camOff\",\"central\",\"chatCircle\",\"check\",\"checkBadge\",\"checkCircle\",\"checkDouble\",\"clock\",\"close\",\"closeCircle\",\"collapse\",\"config\",\"contacts\",\"currency\",\"delete\",\"desktop\",\"doc\",\"down\",\"download\",\"drug\",\"duplicate\",\"edit\",\"exam\",\"examDoc\",\"expand\",\"facebook\",\"fileBmp\",\"fileJpg\",\"filePdf\",\"filePng\",\"fileUpload\",\"fileXls\",\"filter\",\"fullscreen\",\"gallery\",\"geotag\",\"geotagUnity\",\"geotagUnityGroup\",\"google\",\"graph\",\"healthPlan\",\"heart\",\"height\",\"height2\",\"home\",\"horizontalList\",\"imageUp\",\"infoCircle\",\"instagram\",\"key\",\"lamp\",\"language\",\"language2\",\"languageEN\",\"languagePT\",\"lattes\",\"left\",\"like\",\"link\",\"linkExternal\",\"linkedin\",\"list\",\"login\",\"logout\",\"mail\",\"maintenance\",\"medDoc\",\"medEspec\",\"medImg\",\"medUser\",\"medical\",\"menuHamburguer\",\"menuKebab\",\"menuMeatballs\",\"mic\",\"micOff\",\"minus\",\"minusCircle\",\"minusSquare\",\"mobile\",\"news\",\"notification\",\"npsDeslike\",\"npsHate\",\"npsLike\",\"npsLove\",\"npsNeutral\",\"order\",\"partner\",\"phone\",\"play\",\"plus\",\"plusCircle\",\"plusSquare\",\"print\",\"profile\",\"profileCircle\",\"questionCircle\",\"questionSquare\",\"range\",\"reload\",\"ribbon\",\"right\",\"schedule\",\"scheduleCancel\",\"scheduleCheck\",\"scheduleHistorico\",\"search\",\"secure\",\"share\",\"siren\",\"sound\",\"soundOff\",\"subItem\",\"swap\",\"target\",\"team\",\"telegram\",\"twitter\",\"unLink\",\"unSecure\",\"unity\",\"unlike\",\"up\",\"upload\",\"verticalList\",\"viewFalse\",\"viewTrue\",\"weight\",\"whatsapp\",\"wifi\",\"wifiOff\",\"youtube\",\"zoomIn\",\"zoomOut\"];",":host {\n display: block;\n padding: 24px;\n font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.iconDetail {\n display: block;\n}\n\n.iconSizes {\n display: flex;\n align-items: center;\n\n\n .size {\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-right: 9px;\n padding: 8px;\n\n &:last-child { margin-right: 0; }\n span {\n font-size: 10px;\n margin: 8px 0;\n }\n }\n\n &.invert {\n margin-top: 12px;\n\n .size {\n background-color: #2d2d2d;\n color: #F6F6F6;\n border-radius: 3px;\n }\n }\n}\n\n.icons {\n margin-top: 28px;\n display: flex;\n flex-wrap: wrap;\n position: relative;\n\n .icon {\n position: relative;\n padding: 4px;\n cursor: pointer;\n opacity: .6;\n transition: opacity .2s linear;\n width: 105px;\n display: flex;\n flex-direction: column;\n text-align: center;\n align-items: center;\n margin-bottom: 16px;\n box-sizing: border-box;\n cura-label {\n margin-top: 8px;\n }\n cura-paragraph {\n margin-top: 4px;\n }\n /* &.selected {\n transform: scale(1.2);\n } */\n }\n}\n\n","import { Component, Host, h, State } from '@stencil/core';\nimport iconsetdefaulticons from '../../assets/icons/iconset-default-list';\nimport { microIcons, iconSizes } from '../cura-icon/cura-icon.definitions';\n\n@Component({\n tag: 'cura-icons-view',\n styleUrl: 'cura-icons-view.scss',\n shadow: true,\n})\nexport class CuraIconsView {\n\n sizes = Object.keys(iconSizes).filter(key => key !== 'default');\n colors = ['primary', 'secondary', 'accent', 'info', 'warning', 'error', 'success', 'neutral'];\n @State() selected = iconsetdefaulticons[0];\n\n connectedCallback() {\n this.sizes.unshift(this.sizes.pop());\n }\n\n setSelected = (icon) => {\n this.selected = icon;\n }\n\n render() {\n return (\n <Host>\n <div class=\"iconDetail\">\n <cura-heading size=\"small\" margin-block=\"0 24px\">Icon: <b>{ this.selected }</b></cura-heading>\n <div class=\"iconSizes\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size}></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n <div class=\"iconSizes invert\">\n { this.sizes.map( size =>\n size === 'micro' && !microIcons.includes(this.selected) ? '' :\n <div class=\"size\">\n <cura-icon name={this.selected} size={size} color=\"neutral-white\"></cura-icon>\n <span>{ size }</span>\n </div>\n )}\n </div>\n </div>\n <div class=\"icons\">\n { iconsetdefaulticons.map(icon =>\n <div class={{icon: true, selected: icon === this.selected }} onClick={() => this.setSelected(icon)}>\n <cura-icon\n name={icon}\n size=\"32\"\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}></cura-icon>\n <cura-label\n size=\"xsmall\"\n weight={icon === this.selected ? 'bold' : 'regular'}\n color={icon === this.selected ? 'accent-dark' : 'neutral-dark'}>{icon}</cura-label>\n { !microIcons.includes(icon) ? '' :\n <cura-paragraph\n color='success-dark'\n size=\"xsmall\"\n margin-block=\"0px\"\n line-height='100%'>MICRO</cura-paragraph>\n }\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -25,7 +25,7 @@ const CuraLoaderBar = class {
25
25
  this.setProgress();
26
26
  }
27
27
  render() {
28
- return (index.h(index.Host, { key: 'fbd3b560f2c5bc00e729300e3f2afa09690cabc8' }, index.h("div", { key: '0a728618223b33796b63768a543580b5d30e0115', id: "progress-bar", class: "progress-bar", style: this.styles }, index.h("span", { key: '06230a2ddf4bea3bef96a09814f3e0da9dde31a3', class: "progress-bar-fill" }))));
28
+ return (index.h(index.Host, { key: 'e8c5cf2c47e5b8a1a3e0ea758df9a5183b94afbe' }, index.h("div", { key: '4375509425a0f7f8a86ded54c792f04d8b34d004', id: "progress-bar", class: "progress-bar", style: this.styles }, index.h("span", { key: '2d78b8f09726918cb01ef2ba775cf061f8b1fbab', class: "progress-bar-fill" }))));
29
29
  }
30
30
  setColor() {
31
31
  this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2), '--color-base': window.CuraAPI.theme.colors.getColor(this.color) });
@@ -137,7 +137,7 @@ const CuraRadio = class {
137
137
  return statusColors[this.status][type];
138
138
  }
139
139
  render() {
140
- return (index.h(index.Host, { key: 'cd50b6a8c2b43e7ddfc44c2a2d634118e8c8180c' }, index.h("div", { key: '0ab58b0b1e0561cfbe5801167873d3f1f6b8b48d', class: this.getClasses(), style: this.styles }, index.h("div", { key: '24399f088f99dd08696b8421140c64765b7ae82f', class: "info" }, index.h("div", { key: '5fa201595808fd9aede224943fd37cfe8972b51e', class: "label-wrapper" }, index.h("cura-label", { key: '58f5d8d6f176a1519458c30fbbf0f11bc11b72c1', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { key: 'ce96f49de0925ca3739640acadd25bb8d9fbbd26', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { key: 'b2188df747035a27bae0ad5206ac48ef31320268', color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", { key: '215226214804fe80e0b049224a590411ddd1f01e' }))), index.h("input", { key: 'd3fc5b35a27e44f9d8e5f5ab9f9c348ef7bc8bb9', type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
140
+ return (index.h(index.Host, { key: '47a86162a780f9bfc554ab0f39e20e2f1e01a9d9' }, index.h("div", { key: 'a0f2860ed3ff500bfc100c1e546da8ced421b207', class: this.getClasses(), style: this.styles }, index.h("div", { key: '9191f64704f6c1d791922464a75e00afa0cdcb7e', class: "info" }, index.h("div", { key: 'c61a9ba353b49db897c27f6356bfe3d76651b186', class: "label-wrapper" }, index.h("cura-label", { key: 'aa942db786a175452697b17229dc05e9113e8097', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { key: 'aed6a56437cc00fb7050043ce0a89877770acc6c', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { key: '4b489038012fcf112d89d5cdcce46e55b363eca0', color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", { key: 'edff8c3ddc4875017dc7e9342fe3c9e19bdb86dc' }))), index.h("input", { key: '43d5c937fbaa9139abaa3c1c8b5534a39fa4017c', type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
141
141
  }
142
142
  static get formAssociated() { return true; }
143
143
  get host() { return index.getElement(this); }
@@ -109,7 +109,7 @@ const CuraSwitch = class {
109
109
  return classes;
110
110
  }
111
111
  render() {
112
- return (index.h(index.Host, { key: '2ccbfc3c5aae5ec8be3f879541b7cbcf203b62a9' }, index.h("div", { key: '2acacb0bab31f8736155dc764a6e3d57508f7a48', class: this.getClasses(), style: this.styles }, index.h("div", { key: '16c7cfedbd029d4e481cb2c3268690d594962ff3', class: "info" }, index.h("cura-label", { key: '24ed0fd9a9c0ebacc52407319b16a202f2defc96', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), index.h("cura-label", { key: '4a84fb18a2fd43c623cb9aa9e9573482a22f6372', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, index.h("slot", { key: '0ec0427dee691d224daa58db943c07d906d08dd0' }))), index.h("div", { key: '5b4a04200b4880474b693e605ba3e8671a3bd980', onClick: this.toggleSwitch, class: "control" }, index.h("div", { key: '2e3e764a87d57edc520f9d56b980d80d455d8d74', class: `track ${this.size.toLowerCase()}` }, index.h("div", { key: '36b9da57ea3b95e419d7bb0b5ad4f24d7acd1b63', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
112
+ return (index.h(index.Host, { key: 'a18d2e4516e63c9dc080fabb97ded6cb145f096f' }, index.h("div", { key: 'e6cfb0bada406eef4b6dc400eae2cc8e15ff209b', class: this.getClasses(), style: this.styles }, index.h("div", { key: '520489765d61a4c96079cc51395c9a7038c1ec12', class: "info" }, index.h("cura-label", { key: '3b064a7794c262d62e4d8e04475ca20d87febc7b', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), index.h("cura-label", { key: 'b94ac8cf1fd1e3ba0dce269b677636f09bc97597', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, index.h("slot", { key: '437f81a5bde1395d97c346928191c8ab0ce7219d' }))), index.h("div", { key: '3e36e82138a69c5f829f54ec82af0646fdea4fbb', onClick: this.toggleSwitch, class: "control" }, index.h("div", { key: '7068b0664ebb020037d63df565e5c835b7a4fa46', class: `track ${this.size.toLowerCase()}` }, index.h("div", { key: '6ce66dfe5d06bdfdb625b38b0e0adb20df7db130', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
113
113
  }
114
114
  static get formAssociated() { return true; }
115
115
  static get watchers() { return {
@@ -31,7 +31,7 @@ const CuraToast = class {
31
31
  this.setStyle();
32
32
  }
33
33
  render() {
34
- return (index.h(index.Host, { key: '47453cc474cc82642c9363b2e2dcb246bcbc0990' }, index.h("div", { key: '90eae573aa9343666cbd7c61f66c2314e24377b3', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: 'ca9c8dcbab273aada4d80d5e025d17f08e6b71fd', class: "default-icon", name: this.getNameIcon(), size: 16, color: `${this.type}-dark` }), index.h("div", { key: 'cc70492c6baf8a55a195a37378f23ad4174b79e7', class: "content" }, index.h("cura-heading", { key: '51881b8db43df91ce52bfcbe5f0db88fadd959ac', level: 4, size: "xsmall", color: `${this.type}-dark`, weight: "bold", "margin-block": "0" }, this.label), index.h("cura-paragraph", { key: '80fdd7048123b4ce8e7a604914c4d522aa75858c', color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: 'd74ba171c699de611f12e66110cfdd2573e6c210' })), index.h("slot", { key: '034e0d8efc6fd221967807c084226cd74e56ba18', name: "actions" })), this.closeButton && index.h("cura-icon", { key: '3077f5c74f0a109a706d295fa336595301837acb', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.loader && !!this.autoCloseDelay && index.h("cura-loader-bar", { key: '445383c6a9c18454ef157d025a80c376e1ce9419', color: `${this.type}-base`, progress: this.progress }))));
34
+ return (index.h(index.Host, { key: '65417f506ab0db06fd38449643c679d4fea1fffd' }, index.h("div", { key: '80e509d36768bea4b99e215dc9d81aec83b9143c', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: 'd2f6a36370ab4c6555bb679f481e1975fb234e41', class: "default-icon", name: this.getNameIcon(), size: 16, color: `${this.type}-dark` }), index.h("div", { key: 'c312e11dbb469c1a486eaf90898c6149ce099627', class: "content" }, index.h("cura-heading", { key: 'f0ff03c554caaf0213476c23004b1361a876cf19', level: 4, size: "xsmall", color: `${this.type}-dark`, weight: "bold", "margin-block": "0" }, this.label), index.h("cura-paragraph", { key: 'd94ab5591663c1135712bf54dd90182de5d18ed5', color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: '9dc18a1ded79abcc258b4a2c892084addb194c9f' })), index.h("slot", { key: '829788786a56a1492b6fef2dd053f84fdafd7ea1', name: "actions" })), this.closeButton && index.h("cura-icon", { key: '1d507a45d3a860e859f879de15d79bc7c3a34787', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.loader && !!this.autoCloseDelay && index.h("cura-loader-bar", { key: '0ad99ff90899e19b3b2e9a13a2ac3fa76dae286d', color: `${this.type}-base`, progress: this.progress }))));
35
35
  }
36
36
  componentDidLoad() {
37
37
  this.openContainer();