globuswebcomponents 0.5.3 → 0.5.5

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 (402) hide show
  1. package/dist/cjs/gb-avatar-add-button.cjs.entry.js +1 -1
  2. package/dist/cjs/gb-avatar-group.cjs.entry.js +1 -1
  3. package/dist/cjs/gb-avatar-profile-photo.cjs.entry.js +1 -1
  4. package/dist/cjs/{gb-avatar_28.cjs.entry.js → gb-avatar_34.cjs.entry.js} +370 -83
  5. package/dist/cjs/gb-avatar_34.cjs.entry.js.map +1 -0
  6. package/dist/cjs/gb-button-close_2.cjs.entry.js +2 -2
  7. package/dist/cjs/gb-checkbox-group-item.cjs.entry.js +1 -1
  8. package/dist/cjs/gb-checkbox-group.cjs.entry.js +1 -1
  9. package/dist/cjs/gb-file-type-icon.cjs.entry.js +1 -1
  10. package/dist/cjs/gb-file-upload-item-base.cjs.entry.js +1 -1
  11. package/dist/cjs/gb-file-upload.cjs.entry.js +1 -1
  12. package/dist/cjs/gb-help-dropdown.cjs.entry.js +1 -1
  13. package/dist/cjs/gb-megainput-field.cjs.entry.js +3 -3
  14. package/dist/cjs/gb-notification-content.cjs.entry.js +2 -2
  15. package/dist/cjs/gb-password-button.cjs.entry.js +27 -0
  16. package/dist/{components/p-eed6f80c.js.map → cjs/gb-password-button.cjs.entry.js.map} +1 -1
  17. package/dist/cjs/gb-progress-circle.cjs.entry.js +2 -2
  18. package/dist/cjs/gb-rich-text.cjs.entry.js +2 -2
  19. package/dist/cjs/gb-scrollbar.cjs.entry.js +2 -2
  20. package/dist/cjs/gb-slider-control-handle.cjs.entry.js +2 -2
  21. package/dist/cjs/gb-slider.cjs.entry.js +2 -2
  22. package/dist/cjs/gb-textarea-input-field.cjs.entry.js +1 -1
  23. package/dist/cjs/gb-toast-button.cjs.entry.js +2 -2
  24. package/dist/cjs/gb-toast.cjs.entry.js +2 -2
  25. package/dist/cjs/gb-toggle-base.cjs.entry.js +3 -3
  26. package/dist/cjs/gb-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/gb-token-field.cjs.entry.js +2 -2
  28. package/dist/cjs/gb-verification-code-field.cjs.entry.js +3 -3
  29. package/dist/cjs/gb-wysiwyg-editor-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/gb-wysiwyg-toolbar.cjs.entry.js +1 -1
  31. package/dist/cjs/gb-wysiwyg-tooltip.cjs.entry.js +1 -1
  32. package/dist/cjs/globuscomponents.cjs.js +2 -2
  33. package/dist/cjs/{index-76d06259.js → index-804eab7e.js} +9 -4
  34. package/dist/cjs/index-804eab7e.js.map +1 -0
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/assets/user-group.svg +10 -0
  37. package/dist/collection/collection-manifest.json +1 -0
  38. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js +38 -2
  39. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js.map +1 -1
  40. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js +49 -7
  41. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js.map +1 -1
  42. package/dist/collection/components/gb-btn/gb-btn.css +1 -0
  43. package/dist/collection/components/gb-button/gb-button.css +1 -0
  44. package/dist/collection/components/gb-button/gb-button.js +4 -4
  45. package/dist/collection/components/gb-button/gb-button.js.map +1 -1
  46. package/dist/collection/components/gb-button/gb-button.tsx +3 -3
  47. package/dist/collection/components/gb-checkbox/gb-checkbox.css +6 -2
  48. package/dist/collection/components/gb-checkbox/gb-checkbox.js +20 -1
  49. package/dist/collection/components/gb-checkbox/gb-checkbox.js.map +1 -1
  50. package/dist/collection/components/gb-header/gb-header.js +37 -1
  51. package/dist/collection/components/gb-header/gb-header.js.map +1 -1
  52. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.css +2686 -0
  53. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js +80 -0
  54. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js.map +1 -0
  55. package/dist/collection/components/gb-horizontal-tabs/gb-horizontal-tabs.js +1 -1
  56. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.css +17 -0
  57. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +37 -40
  58. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -1
  59. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.css +5 -5
  60. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js +4 -2
  61. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js.map +1 -1
  62. package/dist/collection/components/gb-input-field/gb-input-field.css +10 -315
  63. package/dist/collection/components/gb-input-field/gb-input-field.js +8 -14
  64. package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
  65. package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.js +2 -2
  66. package/dist/collection/components/gb-notification-content/gb-notification-content.js +1 -1
  67. package/dist/collection/components/gb-notification-pane/gb-notification-pane.js +1 -1
  68. package/dist/collection/components/gb-pagination/gb-pagination.js +1 -1
  69. package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.js +1 -1
  70. package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.js +1 -1
  71. package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.js +1 -1
  72. package/dist/collection/components/gb-password-button/gb-password-button.js +1 -1
  73. package/dist/collection/components/gb-progress-bar/gb-progress-bar.js +1 -1
  74. package/dist/collection/components/gb-progress-circle/gb-progress-circle.js +1 -1
  75. package/dist/collection/components/gb-rich-text/gb-rich-text.js +1 -1
  76. package/dist/collection/components/gb-scrollbar/gb-scrollbar.js +1 -1
  77. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.css +25 -1
  78. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.js +1 -1
  79. package/dist/collection/components/gb-sidebar/gb-sidebar.js +1 -1
  80. package/dist/collection/components/gb-slider/gb-slider.js +1 -1
  81. package/dist/collection/components/gb-slider-control-handle/slider-control-handle.js +1 -1
  82. package/dist/collection/components/gb-status-indicator/gb-status-indicator.js +1 -1
  83. package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.js +3 -3
  84. package/dist/collection/components/gb-tag/gb-tag.css +1 -0
  85. package/dist/collection/components/gb-tag/gb-tag.js +1 -1
  86. package/dist/collection/components/gb-tag/gb-tag.js.map +1 -1
  87. package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.js +1 -1
  88. package/dist/collection/components/gb-tag-close/gb-tag-close.js +1 -1
  89. package/dist/collection/components/gb-tag-count/gb-tag-count.js +1 -1
  90. package/dist/collection/components/gb-toast/gb-toast.js +1 -1
  91. package/dist/collection/components/gb-toast-button/gb-toast-button.js +1 -1
  92. package/dist/collection/components/gb-toggle/gb-toggle.js +1 -1
  93. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js +2 -2
  94. package/dist/collection/components/gb-token-field/gb-token-field.js +1 -1
  95. package/dist/collection/components/gb-tooltip/gb-tooltip.css +2 -2
  96. package/dist/collection/components/gb-tooltip/gb-tooltip.js +1 -1
  97. package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.js +2 -2
  98. package/dist/components/gb-avatar-add-button.js +1 -1
  99. package/dist/components/gb-avatar-contrast-inner-border.js +1 -1
  100. package/dist/components/gb-avatar-dropdown.js +24 -10
  101. package/dist/components/gb-avatar-dropdown.js.map +1 -1
  102. package/dist/components/gb-avatar-group.js +6 -6
  103. package/dist/components/gb-avatar-label-group.js +1 -1
  104. package/dist/components/gb-avatar-profile-photo.js +4 -4
  105. package/dist/components/gb-avatar.js +1 -1
  106. package/dist/components/gb-badge-close.js +1 -1
  107. package/dist/components/gb-badge.js +1 -1
  108. package/dist/components/gb-btn.js +1 -1
  109. package/dist/components/gb-button-close.js +1 -1
  110. package/dist/components/gb-button.js +1 -1
  111. package/dist/components/gb-carousel-arrow.js +1 -1
  112. package/dist/components/gb-checkbox-base.js +1 -1
  113. package/dist/components/gb-checkbox-group-item.js +1 -1
  114. package/dist/components/gb-checkbox-group.js +8 -8
  115. package/dist/components/gb-checkbox.js +1 -1
  116. package/dist/components/gb-collapse-button.js +1 -1
  117. package/dist/components/gb-dropdown-items-with-shortcut.js +1 -1
  118. package/dist/components/gb-file-type-icon.js +1 -1
  119. package/dist/components/gb-file-upload-item-base.js +1 -1
  120. package/dist/components/gb-file-upload.js +6 -6
  121. package/dist/components/gb-header-icon.js +1 -1
  122. package/dist/components/gb-header.js +20 -6
  123. package/dist/components/gb-header.js.map +1 -1
  124. package/dist/components/gb-help-dropdown.js +4 -4
  125. package/dist/components/gb-help-tooltip.d.ts +11 -0
  126. package/dist/components/gb-help-tooltip.js +8 -0
  127. package/dist/components/gb-help-tooltip.js.map +1 -0
  128. package/dist/components/gb-horizontal-tabs.js +8 -8
  129. package/dist/components/gb-input-dropdown-menu-item.js +1 -1
  130. package/dist/components/gb-input-dropdown.js +1 -1
  131. package/dist/components/gb-input-field.js +9 -33
  132. package/dist/components/gb-input-field.js.map +1 -1
  133. package/dist/components/gb-megainput-field.js +1 -1
  134. package/dist/components/gb-notification-content.js +2 -2
  135. package/dist/components/gb-notification-pane.js +3 -3
  136. package/dist/components/gb-pagination-button-group-base.js +2 -2
  137. package/dist/components/gb-pagination-dot-indicator.js +2 -2
  138. package/dist/components/gb-pagination-number-base.js +2 -2
  139. package/dist/components/gb-pagination.js +3 -3
  140. package/dist/components/gb-password-button.js +50 -1
  141. package/dist/components/gb-password-button.js.map +1 -1
  142. package/dist/components/gb-progress-bar.js +1 -1
  143. package/dist/components/gb-progress-circle.js +2 -2
  144. package/dist/components/gb-rich-text.js +38 -26
  145. package/dist/components/gb-rich-text.js.map +1 -1
  146. package/dist/components/gb-scrollbar.js +2 -2
  147. package/dist/components/gb-side-bar-item.js +1 -1
  148. package/dist/components/gb-sidebar.js +10 -10
  149. package/dist/components/gb-slider-control-handle.js +1 -1
  150. package/dist/components/gb-slider.js +4 -4
  151. package/dist/components/gb-status-indicator.js +1 -1
  152. package/dist/components/gb-tab-button-base.js +1 -1
  153. package/dist/components/gb-tag-checkbox.js +1 -1
  154. package/dist/components/gb-tag-close.js +1 -1
  155. package/dist/components/gb-tag-count.js +1 -1
  156. package/dist/components/gb-tag.js +1 -1
  157. package/dist/components/gb-textarea-input-field.js +1 -1
  158. package/dist/components/gb-toast-button.js +1 -1
  159. package/dist/components/gb-toast.js +5 -5
  160. package/dist/components/gb-toggle-base.js +1 -1
  161. package/dist/components/gb-toggle.js +3 -3
  162. package/dist/components/gb-token-field.js +3 -3
  163. package/dist/components/gb-tooltip.js +1 -1
  164. package/dist/components/gb-verification-code-field.js +4 -4
  165. package/dist/components/gb-wysiwyg-editor-icon.js +1 -1
  166. package/dist/components/gb-wysiwyg-toolbar.js +1 -1
  167. package/dist/components/gb-wysiwyg-tooltip.js +2 -2
  168. package/dist/components/index.js +1 -1
  169. package/dist/components/{p-18aeff75.js → p-049f8084.js} +2 -2
  170. package/dist/components/{p-18aeff75.js.map → p-049f8084.js.map} +1 -1
  171. package/dist/components/{p-26d1508d.js → p-0519dce2.js} +2 -2
  172. package/dist/components/{p-26d1508d.js.map → p-0519dce2.js.map} +1 -1
  173. package/dist/components/{p-655bac91.js → p-062cb1f9.js} +2 -2
  174. package/dist/components/{p-655bac91.js.map → p-062cb1f9.js.map} +1 -1
  175. package/dist/components/{p-35054a6a.js → p-0767d31b.js} +4 -4
  176. package/dist/components/{p-35054a6a.js.map → p-0767d31b.js.map} +1 -1
  177. package/dist/components/{p-a714f550.js → p-12d84b99.js} +4 -4
  178. package/dist/components/{p-a714f550.js.map → p-12d84b99.js.map} +1 -1
  179. package/dist/components/{p-ce85b058.js → p-14ae77f4.js} +4 -4
  180. package/dist/components/{p-ce85b058.js.map → p-14ae77f4.js.map} +1 -1
  181. package/dist/components/{p-0190e346.js → p-1787a21b.js} +4 -4
  182. package/dist/components/{p-0190e346.js.map → p-1787a21b.js.map} +1 -1
  183. package/dist/components/{p-d947050b.js → p-1c27c0dc.js} +10 -10
  184. package/dist/components/p-1c27c0dc.js.map +1 -0
  185. package/dist/components/{p-983e2798.js → p-200efa06.js} +10 -10
  186. package/dist/components/{p-983e2798.js.map → p-200efa06.js.map} +1 -1
  187. package/dist/components/{p-3fd78bcf.js → p-2849e182.js} +3 -3
  188. package/dist/components/{p-3fd78bcf.js.map → p-2849e182.js.map} +1 -1
  189. package/dist/components/{p-0b8ae984.js → p-3eee1170.js} +2 -2
  190. package/dist/components/{p-0b8ae984.js.map → p-3eee1170.js.map} +1 -1
  191. package/dist/components/{p-0129a72b.js → p-43c70bd8.js} +3 -3
  192. package/dist/components/{p-0129a72b.js.map → p-43c70bd8.js.map} +1 -1
  193. package/dist/components/{p-1cf0a465.js → p-443d3de1.js} +3 -3
  194. package/dist/components/{p-1cf0a465.js.map → p-443d3de1.js.map} +1 -1
  195. package/dist/components/{p-9e4aaaff.js → p-55426266.js} +8 -8
  196. package/dist/components/{p-9e4aaaff.js.map → p-55426266.js.map} +1 -1
  197. package/dist/components/{p-623ed6aa.js → p-5ba87b93.js} +3 -3
  198. package/dist/components/{p-623ed6aa.js.map → p-5ba87b93.js.map} +1 -1
  199. package/dist/components/{p-a9079204.js → p-65de39d5.js} +21 -18
  200. package/dist/components/p-65de39d5.js.map +1 -0
  201. package/dist/components/{p-7d2b0b60.js → p-6b8ad833.js} +12 -10
  202. package/dist/components/p-6b8ad833.js.map +1 -0
  203. package/dist/components/{p-8bfb593e.js → p-8ae9de24.js} +7 -5
  204. package/dist/components/p-8ae9de24.js.map +1 -0
  205. package/dist/components/{p-e790d9c3.js → p-9023f483.js} +7 -7
  206. package/dist/components/p-9023f483.js.map +1 -0
  207. package/dist/components/{p-e198d18d.js → p-92877dec.js} +3 -3
  208. package/dist/components/{p-e198d18d.js.map → p-92877dec.js.map} +1 -1
  209. package/dist/components/{p-5a30e92a.js → p-977764ce.js} +2 -2
  210. package/dist/components/{p-5a30e92a.js.map → p-977764ce.js.map} +1 -1
  211. package/dist/components/{p-17144463.js → p-9af82179.js} +3 -3
  212. package/dist/components/{p-17144463.js.map → p-9af82179.js.map} +1 -1
  213. package/dist/components/{p-6c339b3f.js → p-a8fc1a6f.js} +33 -13
  214. package/dist/components/p-a8fc1a6f.js.map +1 -0
  215. package/dist/components/{p-0c3f1ae2.js → p-ad5a06e5.js} +6 -6
  216. package/dist/components/{p-0c3f1ae2.js.map → p-ad5a06e5.js.map} +1 -1
  217. package/dist/components/{p-a7c4e272.js → p-b20e1208.js} +37 -25
  218. package/dist/components/p-b20e1208.js.map +1 -0
  219. package/dist/components/{p-64964951.js → p-bf8461c6.js} +3 -3
  220. package/dist/components/{p-64964951.js.map → p-bf8461c6.js.map} +1 -1
  221. package/dist/components/p-c2bbed0e.js +55 -0
  222. package/dist/components/p-c2bbed0e.js.map +1 -0
  223. package/dist/components/{p-3d8f80e9.js → p-c991b6ce.js} +6 -2
  224. package/dist/components/p-c991b6ce.js.map +1 -0
  225. package/dist/components/{p-fb46b2b0.js → p-d033be88.js} +10 -10
  226. package/dist/components/p-d033be88.js.map +1 -0
  227. package/dist/components/{p-43250a93.js → p-dacb769c.js} +6 -6
  228. package/dist/components/{p-43250a93.js.map → p-dacb769c.js.map} +1 -1
  229. package/dist/components/{p-8d1707cb.js → p-e4b16ff4.js} +3 -3
  230. package/dist/components/{p-8d1707cb.js.map → p-e4b16ff4.js.map} +1 -1
  231. package/dist/components/{p-888acea3.js → p-eaaefb80.js} +4 -4
  232. package/dist/components/{p-888acea3.js.map → p-eaaefb80.js.map} +1 -1
  233. package/dist/components/{p-40b924b3.js → p-f260054c.js} +71 -45
  234. package/dist/components/p-f260054c.js.map +1 -0
  235. package/dist/components/{p-df6f1225.js → p-fc3b2733.js} +4 -4
  236. package/dist/components/{p-df6f1225.js.map → p-fc3b2733.js.map} +1 -1
  237. package/dist/components/{p-32cf95f6.js → p-fd8f1d13.js} +2 -2
  238. package/dist/components/{p-32cf95f6.js.map → p-fd8f1d13.js.map} +1 -1
  239. package/dist/esm/gb-avatar-add-button.entry.js +1 -1
  240. package/dist/esm/gb-avatar-group.entry.js +1 -1
  241. package/dist/esm/gb-avatar-profile-photo.entry.js +1 -1
  242. package/dist/esm/{gb-avatar_28.entry.js → gb-avatar_34.entry.js} +364 -83
  243. package/dist/esm/gb-avatar_34.entry.js.map +1 -0
  244. package/dist/esm/gb-button-close_2.entry.js +2 -2
  245. package/dist/esm/gb-checkbox-group-item.entry.js +1 -1
  246. package/dist/esm/gb-checkbox-group.entry.js +1 -1
  247. package/dist/esm/gb-file-type-icon.entry.js +1 -1
  248. package/dist/esm/gb-file-upload-item-base.entry.js +1 -1
  249. package/dist/esm/gb-file-upload.entry.js +1 -1
  250. package/dist/esm/gb-help-dropdown.entry.js +1 -1
  251. package/dist/esm/gb-megainput-field.entry.js +3 -3
  252. package/dist/esm/gb-notification-content.entry.js +2 -2
  253. package/dist/{components/p-eed6f80c.js → esm/gb-password-button.entry.js} +9 -40
  254. package/dist/esm/gb-password-button.entry.js.map +1 -0
  255. package/dist/esm/gb-progress-circle.entry.js +2 -2
  256. package/dist/esm/gb-rich-text.entry.js +2 -2
  257. package/dist/esm/gb-scrollbar.entry.js +2 -2
  258. package/dist/esm/gb-slider-control-handle.entry.js +2 -2
  259. package/dist/esm/gb-slider.entry.js +2 -2
  260. package/dist/esm/gb-textarea-input-field.entry.js +1 -1
  261. package/dist/esm/gb-toast-button.entry.js +2 -2
  262. package/dist/esm/gb-toast.entry.js +2 -2
  263. package/dist/esm/gb-toggle-base.entry.js +3 -3
  264. package/dist/esm/gb-toggle.entry.js +2 -2
  265. package/dist/esm/gb-token-field.entry.js +2 -2
  266. package/dist/esm/gb-verification-code-field.entry.js +3 -3
  267. package/dist/esm/gb-wysiwyg-editor-icon.entry.js +1 -1
  268. package/dist/esm/gb-wysiwyg-toolbar.entry.js +1 -1
  269. package/dist/esm/gb-wysiwyg-tooltip.entry.js +1 -1
  270. package/dist/esm/globuscomponents.js +3 -3
  271. package/dist/esm/{index-e1003372.js → index-be73e596.js} +9 -4
  272. package/dist/esm/index-be73e596.js.map +1 -0
  273. package/dist/esm/loader.js +3 -3
  274. package/dist/globuscomponents/assets/user-group.svg +10 -0
  275. package/dist/globuscomponents/gb-button.css +1 -0
  276. package/dist/globuscomponents/gb-button.tsx +3 -3
  277. package/dist/globuscomponents/globuscomponents.esm.js +1 -1
  278. package/dist/globuscomponents/globuscomponents.esm.js.map +1 -1
  279. package/dist/globuscomponents/{p-32d3c7d7.entry.js → p-1c4be13a.entry.js} +2 -2
  280. package/dist/globuscomponents/{p-f16ffdee.entry.js → p-1d2985a5.entry.js} +2 -2
  281. package/dist/globuscomponents/{p-727bfde6.entry.js → p-263e06c7.entry.js} +2 -2
  282. package/dist/globuscomponents/{p-e25f6faa.entry.js → p-2adda6a5.entry.js} +2 -2
  283. package/dist/globuscomponents/p-2f557384.entry.js +2 -0
  284. package/dist/globuscomponents/p-2f557384.entry.js.map +1 -0
  285. package/dist/globuscomponents/{p-2f175d13.entry.js → p-3d8baf6c.entry.js} +2 -2
  286. package/dist/globuscomponents/{p-e718da9d.entry.js → p-3e8c8ead.entry.js} +2 -2
  287. package/dist/globuscomponents/{p-a2a9d289.entry.js → p-3fc3956d.entry.js} +2 -2
  288. package/dist/globuscomponents/{p-840531e9.entry.js → p-40f11c62.entry.js} +2 -2
  289. package/dist/globuscomponents/{p-767e5360.entry.js → p-427cfeeb.entry.js} +2 -2
  290. package/dist/globuscomponents/{p-2322ea7a.entry.js → p-4e97f7cd.entry.js} +2 -2
  291. package/dist/globuscomponents/{p-f9619e08.entry.js → p-4eebea94.entry.js} +2 -2
  292. package/dist/globuscomponents/{p-e8f2fe42.js → p-593875d5.js} +3 -3
  293. package/dist/globuscomponents/p-593875d5.js.map +1 -0
  294. package/dist/globuscomponents/p-5ea9e5cd.entry.js +2 -0
  295. package/dist/globuscomponents/{p-d3b5c5b4.entry.js → p-67b452b7.entry.js} +2 -2
  296. package/dist/globuscomponents/{p-049fa055.entry.js → p-748089ba.entry.js} +2 -2
  297. package/dist/globuscomponents/{p-db6d90c3.entry.js → p-790abb4e.entry.js} +2 -2
  298. package/dist/globuscomponents/p-81eb4639.entry.js +2 -0
  299. package/dist/globuscomponents/p-92c7f3ab.entry.js +2 -0
  300. package/dist/globuscomponents/p-92c7f3ab.entry.js.map +1 -0
  301. package/dist/globuscomponents/{p-37bbc2bf.entry.js → p-a05326b0.entry.js} +2 -2
  302. package/dist/globuscomponents/{p-363fe580.entry.js → p-aa4006c2.entry.js} +2 -2
  303. package/dist/globuscomponents/{p-42fb642f.entry.js → p-acf94a1a.entry.js} +2 -2
  304. package/dist/globuscomponents/{p-2b72d966.entry.js → p-c0e095b8.entry.js} +2 -2
  305. package/dist/globuscomponents/{p-fc55539e.entry.js → p-c6e2e53a.entry.js} +2 -2
  306. package/dist/globuscomponents/{p-0179fa9e.entry.js → p-cf24a49c.entry.js} +2 -2
  307. package/dist/globuscomponents/{p-78b3b361.entry.js → p-d1103820.entry.js} +2 -2
  308. package/dist/globuscomponents/{p-8ddf3c50.entry.js → p-d6fb070d.entry.js} +2 -2
  309. package/dist/globuscomponents/{p-7a7cdc5c.entry.js → p-d7187578.entry.js} +2 -2
  310. package/dist/globuscomponents/{p-173cf34c.entry.js → p-e3e0a65e.entry.js} +2 -2
  311. package/dist/globuscomponents/{p-e631fbd1.entry.js → p-e77016c3.entry.js} +2 -2
  312. package/dist/types/components/gb-avatar-dropdown/gb-avatar-dropdown.d.ts +3 -0
  313. package/dist/types/components/gb-avatar-label-group/gb-avatar-label-group.d.ts +3 -1
  314. package/dist/types/components/gb-checkbox/gb-checkbox.d.ts +1 -0
  315. package/dist/types/components/gb-header/gb-header.d.ts +3 -1
  316. package/dist/types/components/gb-help-tooltip/gb-help-tooltip.d.ts +8 -0
  317. package/dist/types/components/gb-input-dropdown/gb-input-dropdown.d.ts +5 -3
  318. package/dist/types/components/gb-input-field/gb-input-field.d.ts +1 -1
  319. package/dist/types/components.d.ts +29 -6
  320. package/package.json +1 -1
  321. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js +0 -44
  322. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js.map +0 -1
  323. package/dist/cjs/gb-avatar-label-group.cjs.entry.js +0 -77
  324. package/dist/cjs/gb-avatar-label-group.cjs.entry.js.map +0 -1
  325. package/dist/cjs/gb-avatar_28.cjs.entry.js.map +0 -1
  326. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js +0 -31
  327. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js.map +0 -1
  328. package/dist/cjs/gb-header-icon.cjs.entry.js +0 -34
  329. package/dist/cjs/gb-header-icon.cjs.entry.js.map +0 -1
  330. package/dist/cjs/gb-header.cjs.entry.js +0 -42
  331. package/dist/cjs/gb-header.cjs.entry.js.map +0 -1
  332. package/dist/cjs/gb-notification-pane.cjs.entry.js +0 -45
  333. package/dist/cjs/gb-notification-pane.cjs.entry.js.map +0 -1
  334. package/dist/cjs/index-76d06259.js.map +0 -1
  335. package/dist/components/p-3d8f80e9.js.map +0 -1
  336. package/dist/components/p-40b924b3.js.map +0 -1
  337. package/dist/components/p-6c339b3f.js.map +0 -1
  338. package/dist/components/p-7d2b0b60.js.map +0 -1
  339. package/dist/components/p-8bfb593e.js.map +0 -1
  340. package/dist/components/p-a7c4e272.js.map +0 -1
  341. package/dist/components/p-a9079204.js.map +0 -1
  342. package/dist/components/p-d947050b.js.map +0 -1
  343. package/dist/components/p-e790d9c3.js.map +0 -1
  344. package/dist/components/p-fb46b2b0.js.map +0 -1
  345. package/dist/esm/gb-avatar-dropdown.entry.js +0 -40
  346. package/dist/esm/gb-avatar-dropdown.entry.js.map +0 -1
  347. package/dist/esm/gb-avatar-label-group.entry.js +0 -73
  348. package/dist/esm/gb-avatar-label-group.entry.js.map +0 -1
  349. package/dist/esm/gb-avatar_28.entry.js.map +0 -1
  350. package/dist/esm/gb-dropdown-items-with-shortcut.entry.js +0 -27
  351. package/dist/esm/gb-dropdown-items-with-shortcut.entry.js.map +0 -1
  352. package/dist/esm/gb-header-icon.entry.js +0 -30
  353. package/dist/esm/gb-header-icon.entry.js.map +0 -1
  354. package/dist/esm/gb-header.entry.js +0 -38
  355. package/dist/esm/gb-header.entry.js.map +0 -1
  356. package/dist/esm/gb-notification-pane.entry.js +0 -41
  357. package/dist/esm/gb-notification-pane.entry.js.map +0 -1
  358. package/dist/esm/index-e1003372.js.map +0 -1
  359. package/dist/globuscomponents/p-34a50ac8.entry.js +0 -2
  360. package/dist/globuscomponents/p-34a50ac8.entry.js.map +0 -1
  361. package/dist/globuscomponents/p-598cae99.entry.js +0 -2
  362. package/dist/globuscomponents/p-598cae99.entry.js.map +0 -1
  363. package/dist/globuscomponents/p-5c53945b.entry.js +0 -2
  364. package/dist/globuscomponents/p-76c62d1e.entry.js +0 -2
  365. package/dist/globuscomponents/p-a495b1f4.entry.js +0 -2
  366. package/dist/globuscomponents/p-a495b1f4.entry.js.map +0 -1
  367. package/dist/globuscomponents/p-c69ca52b.entry.js +0 -2
  368. package/dist/globuscomponents/p-c69ca52b.entry.js.map +0 -1
  369. package/dist/globuscomponents/p-c7e4235c.entry.js +0 -2
  370. package/dist/globuscomponents/p-c7e4235c.entry.js.map +0 -1
  371. package/dist/globuscomponents/p-ded71532.entry.js +0 -2
  372. package/dist/globuscomponents/p-ded71532.entry.js.map +0 -1
  373. package/dist/globuscomponents/p-e8b51d32.entry.js +0 -2
  374. package/dist/globuscomponents/p-e8b51d32.entry.js.map +0 -1
  375. package/dist/globuscomponents/p-e8f2fe42.js.map +0 -1
  376. /package/dist/globuscomponents/{p-32d3c7d7.entry.js.map → p-1c4be13a.entry.js.map} +0 -0
  377. /package/dist/globuscomponents/{p-f16ffdee.entry.js.map → p-1d2985a5.entry.js.map} +0 -0
  378. /package/dist/globuscomponents/{p-727bfde6.entry.js.map → p-263e06c7.entry.js.map} +0 -0
  379. /package/dist/globuscomponents/{p-e25f6faa.entry.js.map → p-2adda6a5.entry.js.map} +0 -0
  380. /package/dist/globuscomponents/{p-2f175d13.entry.js.map → p-3d8baf6c.entry.js.map} +0 -0
  381. /package/dist/globuscomponents/{p-e718da9d.entry.js.map → p-3e8c8ead.entry.js.map} +0 -0
  382. /package/dist/globuscomponents/{p-a2a9d289.entry.js.map → p-3fc3956d.entry.js.map} +0 -0
  383. /package/dist/globuscomponents/{p-840531e9.entry.js.map → p-40f11c62.entry.js.map} +0 -0
  384. /package/dist/globuscomponents/{p-767e5360.entry.js.map → p-427cfeeb.entry.js.map} +0 -0
  385. /package/dist/globuscomponents/{p-2322ea7a.entry.js.map → p-4e97f7cd.entry.js.map} +0 -0
  386. /package/dist/globuscomponents/{p-f9619e08.entry.js.map → p-4eebea94.entry.js.map} +0 -0
  387. /package/dist/globuscomponents/{p-76c62d1e.entry.js.map → p-5ea9e5cd.entry.js.map} +0 -0
  388. /package/dist/globuscomponents/{p-d3b5c5b4.entry.js.map → p-67b452b7.entry.js.map} +0 -0
  389. /package/dist/globuscomponents/{p-049fa055.entry.js.map → p-748089ba.entry.js.map} +0 -0
  390. /package/dist/globuscomponents/{p-db6d90c3.entry.js.map → p-790abb4e.entry.js.map} +0 -0
  391. /package/dist/globuscomponents/{p-5c53945b.entry.js.map → p-81eb4639.entry.js.map} +0 -0
  392. /package/dist/globuscomponents/{p-37bbc2bf.entry.js.map → p-a05326b0.entry.js.map} +0 -0
  393. /package/dist/globuscomponents/{p-363fe580.entry.js.map → p-aa4006c2.entry.js.map} +0 -0
  394. /package/dist/globuscomponents/{p-42fb642f.entry.js.map → p-acf94a1a.entry.js.map} +0 -0
  395. /package/dist/globuscomponents/{p-2b72d966.entry.js.map → p-c0e095b8.entry.js.map} +0 -0
  396. /package/dist/globuscomponents/{p-fc55539e.entry.js.map → p-c6e2e53a.entry.js.map} +0 -0
  397. /package/dist/globuscomponents/{p-0179fa9e.entry.js.map → p-cf24a49c.entry.js.map} +0 -0
  398. /package/dist/globuscomponents/{p-78b3b361.entry.js.map → p-d1103820.entry.js.map} +0 -0
  399. /package/dist/globuscomponents/{p-8ddf3c50.entry.js.map → p-d6fb070d.entry.js.map} +0 -0
  400. /package/dist/globuscomponents/{p-7a7cdc5c.entry.js.map → p-d7187578.entry.js.map} +0 -0
  401. /package/dist/globuscomponents/{p-173cf34c.entry.js.map → p-e3e0a65e.entry.js.map} +0 -0
  402. /package/dist/globuscomponents/{p-e631fbd1.entry.js.map → p-e77016c3.entry.js.map} +0 -0
@@ -0,0 +1,80 @@
1
+ import { h, Fragment } from "@stencil/core";
2
+ export class GbHelpTooltip {
3
+ constructor() {
4
+ this.showHelpTooltip = false;
5
+ this.showArrow = false;
6
+ this.showSupportingText = false;
7
+ }
8
+ componentDidLoad() {
9
+ const mainTextSlot = this.el.querySelector('[slot="label"]');
10
+ const supportingTextSlot = this.el.querySelector('[slot="supporting_text"]');
11
+ if (mainTextSlot) {
12
+ mainTextSlot.classList.add('text-xs-semi-bold');
13
+ }
14
+ if (supportingTextSlot) {
15
+ supportingTextSlot.classList.add('text-xs-regular');
16
+ }
17
+ }
18
+ render() {
19
+ return (h(Fragment, null, h("svg", { key: '9e39302d6562740eba6d3952ba818ec0fda843da', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", onMouseEnter: () => (this.showHelpTooltip = true), onMouseLeave: () => (this.showHelpTooltip = false) }, h("path", { key: 'c598d3c02542c8f18dfca4bf71e39d6b2554cd46', d: "M6.66659 6C6.66659 5.26362 7.26354 4.66666 7.99992 4.66666C8.7363 4.66666 9.33325 5.26362 9.33325 6C9.33325 6.26543 9.25569 6.51275 9.12199 6.72052C8.72352 7.33978 7.99992 7.93028 7.99992 8.66666V9M7.99458 11.3333H8.00057M14.6666 8C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8C1.33325 4.3181 4.31802 1.33333 7.99992 1.33333C11.6818 1.33333 14.6666 4.3181 14.6666 8Z", stroke: "#697586", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), this.showHelpTooltip && (h("gb-tooltip", { key: 'd23d53e2dd4677827746202b1156d87d54f060ab', "show-arrow": true, arrow: "bottom_right", "show-supporting-text": this.showSupportingText, class: "tooltip" }, h("slot", { key: '4197d0b727d1bb1dfd385b5ce714b22de72f5578', name: "label", slot: "label" }), h("slot", { key: '4c401559ca54fefec776236d7a76174c0250b50d', name: "supporting_text", slot: "supporting_text" })))));
20
+ }
21
+ static get is() { return "gb-help-tooltip"; }
22
+ static get encapsulation() { return "shadow"; }
23
+ static get originalStyleUrls() {
24
+ return {
25
+ "$": ["gb-help-tooltip.css"]
26
+ };
27
+ }
28
+ static get styleUrls() {
29
+ return {
30
+ "$": ["gb-help-tooltip.css"]
31
+ };
32
+ }
33
+ static get properties() {
34
+ return {
35
+ "showArrow": {
36
+ "type": "boolean",
37
+ "mutable": false,
38
+ "complexType": {
39
+ "original": "boolean",
40
+ "resolved": "boolean",
41
+ "references": {}
42
+ },
43
+ "required": false,
44
+ "optional": false,
45
+ "docs": {
46
+ "tags": [],
47
+ "text": ""
48
+ },
49
+ "attribute": "show-arrow",
50
+ "reflect": false,
51
+ "defaultValue": "false"
52
+ },
53
+ "showSupportingText": {
54
+ "type": "boolean",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "boolean",
58
+ "resolved": "boolean",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "show-supporting-text",
68
+ "reflect": false,
69
+ "defaultValue": "false"
70
+ }
71
+ };
72
+ }
73
+ static get states() {
74
+ return {
75
+ "showHelpTooltip": {}
76
+ };
77
+ }
78
+ static get elementRef() { return "el"; }
79
+ }
80
+ //# sourceMappingURL=gb-help-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gb-help-tooltip.js","sourceRoot":"","sources":["../../../src/components/gb-help-tooltip/gb-help-tooltip.tsx"],"names":[],"mappings":"A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,EAAC,iBAAiB,GAAQ,CAChD,CACd,CACA,CACJ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Fragment, State, Element } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: 'gb-help-tooltip',\r\n styleUrl: 'gb-help-tooltip.css',\r\n shadow: true,\r\n})\r\nexport class GbHelpTooltip {\r\n @State() showHelpTooltip: boolean = false;\r\n @Prop() showArrow: boolean = false;\r\n @Prop() showSupportingText: boolean = false;\r\n @Element() el: HTMLElement;\r\n\r\n componentDidLoad() {\r\n const mainTextSlot = this.el.querySelector('[slot=\"label\"]');\r\n const supportingTextSlot = this.el.querySelector('[slot=\"supporting_text\"]');\r\n\r\n if (mainTextSlot) {\r\n mainTextSlot.classList.add('text-xs-semi-bold');\r\n }\r\n\r\n if (supportingTextSlot) {\r\n supportingTextSlot.classList.add('text-xs-regular');\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"none\"\r\n onMouseEnter={() => (this.showHelpTooltip = true)}\r\n onMouseLeave={() => (this.showHelpTooltip = false)}\r\n >\r\n <path\r\n d=\"M6.66659 6C6.66659 5.26362 7.26354 4.66666 7.99992 4.66666C8.7363 4.66666 9.33325 5.26362 9.33325 6C9.33325 6.26543 9.25569 6.51275 9.12199 6.72052C8.72352 7.33978 7.99992 7.93028 7.99992 8.66666V9M7.99458 11.3333H8.00057M14.6666 8C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8C1.33325 4.3181 4.31802 1.33333 7.99992 1.33333C11.6818 1.33333 14.6666 4.3181 14.6666 8Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n {this.showHelpTooltip && (\r\n <gb-tooltip show-arrow={true} arrow=\"bottom_right\" show-supporting-text={this.showSupportingText} class=\"tooltip\">\r\n <slot name=\"label\" slot=\"label\"></slot>\r\n <slot name=\"supporting_text\" slot=\"supporting_text\"></slot>\r\n </gb-tooltip>\r\n )}\r\n </>\r\n );\r\n }\r\n}"]}
@@ -43,7 +43,7 @@ export class GbHorizontalTabs {
43
43
  }
44
44
  }
45
45
  render() {
46
- return (h("div", { key: '4e898198a275b3436873e0bd824a3979e4b155e2', class: `horizontal_tab_div ${this.type} ${this.breakpoint} ${this.fullWidth ? 'full_width' : ''}` }, h("gb-tab-button-base", { key: 'ca806a0ba350bd032baebf65258d3844afa89c6c', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(0), current: this.activeIndex === 0, "tab-name": this.firstTabName }), h("gb-tab-button-base", { key: 'ee3b4d2ca2f71ff429c7f6028927d98ca5c933d5', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(1), current: this.activeIndex === 1, "tab-name": this.secondTabName }), this.thirdTab && (h("gb-tab-button-base", { key: '053ba0df78dae55499eb1a0f0c5eff3064cf90b1', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(2), current: this.activeIndex === 2, "tab-name": this.thirdTabName })), this.fourthTab && (h("gb-tab-button-base", { key: '1e5cdb6c3ccbb65bef1313c62f0f56a929ba57c8', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(3), current: this.activeIndex === 3, "tab-name": this.fourthTabName })), this.fifthTab && (h("gb-tab-button-base", { key: '491b946fb99e63d1766c15b2cedc39bfafb26a5e', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(4), current: this.activeIndex === 4, "tab-name": this.fifthTabName })), this.sixthTab && (h("gb-tab-button-base", { key: '96d2afc66f6b7a6b5b37d64d27b5d2ae85c896c3', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(5), current: this.activeIndex === 5, "tab-name": this.sixthTabName })), this.seventhTab && (h("gb-tab-button-base", { key: 'ced493fccdd977ca5a272cafc6eb11e7fe9a2572', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(6), current: this.activeIndex === 6, "tab-name": this.seventhTabName })), this.eighthTab && (h("gb-tab-button-base", { key: '18fbea2451afbca602a77154352f1fff9dff31b9', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(7), current: this.activeIndex === 7, "tab-name": this.eighthTabName })), this.ninthTab && (h("gb-tab-button-base", { key: '3bbd2b2b782d261471f7a3db143127d506168a81', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(8), current: this.activeIndex === 8, "tab-name": this.ninthTabName })), this.tenthTab && (h("gb-tab-button-base", { key: '57415a2e7d2798d0749e7717a743e635445e2fe1', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(9), current: this.activeIndex === 9, "tab-name": this.tenthTabName }))));
46
+ return (h("div", { key: 'e7879838378fd2cd2aefb3c0625f022e19edfc1d', class: `horizontal_tab_div ${this.type} ${this.breakpoint} ${this.fullWidth ? 'full_width' : ''}` }, h("gb-tab-button-base", { key: '2ca7d004c92c4e7f94e2079d5b51ea2284667dce', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(0), current: this.activeIndex === 0, "tab-name": this.firstTabName }), h("gb-tab-button-base", { key: '4e65cdb62024bb881622d2a140fb90128b2ff286', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(1), current: this.activeIndex === 1, "tab-name": this.secondTabName }), this.thirdTab && (h("gb-tab-button-base", { key: 'b5c686558b337fe8a88d674ea38b4e818579cc82', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(2), current: this.activeIndex === 2, "tab-name": this.thirdTabName })), this.fourthTab && (h("gb-tab-button-base", { key: '9e2d3aac8797287ac8f40999fe3682fc0572352c', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(3), current: this.activeIndex === 3, "tab-name": this.fourthTabName })), this.fifthTab && (h("gb-tab-button-base", { key: '31ee87950f01d1394c1f9564f1ce3cec01d0334b', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(4), current: this.activeIndex === 4, "tab-name": this.fifthTabName })), this.sixthTab && (h("gb-tab-button-base", { key: 'db38bec50b061bd6f5d7f927dea16e476cebc7b8', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(5), current: this.activeIndex === 5, "tab-name": this.sixthTabName })), this.seventhTab && (h("gb-tab-button-base", { key: 'a562cf2b221a0fe537ef8b3dd62bebbe357b21aa', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(6), current: this.activeIndex === 6, "tab-name": this.seventhTabName })), this.eighthTab && (h("gb-tab-button-base", { key: '825ea082dad6d8ad864b8351b954d5a81b683940', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(7), current: this.activeIndex === 7, "tab-name": this.eighthTabName })), this.ninthTab && (h("gb-tab-button-base", { key: '5826faf81789d7879ed4167643e665c905b5a327', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(8), current: this.activeIndex === 8, "tab-name": this.ninthTabName })), this.tenthTab && (h("gb-tab-button-base", { key: '2646008a28e3249120ac5ef41a71a6b3607c98b8', class: `tab_button_base ${this.fullWidth ? 'full_width' : ''}`, size: this.size, "full-width": this.fullWidth, type: this.type === 'button_white_border' ? 'button_white' : this.type === 'rounded_button_white_border' ? 'rounded_button_white' : this.type, onClick: () => this.handleTabClick(9), current: this.activeIndex === 9, "tab-name": this.tenthTabName }))));
47
47
  }
48
48
  static get is() { return "gb-horizontal-tabs"; }
49
49
  static get encapsulation() { return "shadow"; }
@@ -2797,4 +2797,21 @@ svg.disabled path{
2797
2797
 
2798
2798
  .input_dropdown_div.md.tag{
2799
2799
  min-height: 3rem;
2800
+ }
2801
+
2802
+ .opened{
2803
+ transform: rotate(180deg);
2804
+ transition: 0.2s ease-in-out;
2805
+ }
2806
+
2807
+ ::slotted([slot="tooltip_label"]){
2808
+ white-space: nowrap;
2809
+ color: var(--color-text, #4B5565);
2810
+ }
2811
+
2812
+ ::slotted([slot="tooltip_supporting_text"]){
2813
+ min-width: fit-content;
2814
+ max-width: 18.5rem;
2815
+ color: var(--color-text-subtle, #697586);
2816
+ margin-top: 5rem;
2800
2817
  }
@@ -2,13 +2,17 @@ import { h, Fragment, getAssetPath } from "@stencil/core";
2
2
  import { StateEnum } from "../../models/reusableModels";
3
3
  export class GbInputDropdown {
4
4
  constructor() {
5
+ this.handleOutsideClick = (event) => {
6
+ if (this.dropdownOpen && !this.dropdownRef.contains(event.target)) {
7
+ this.dropdownOpen = false; // Close the dropdown
8
+ }
9
+ };
5
10
  this.type = undefined;
6
11
  this.state = undefined;
7
12
  this.size = undefined;
8
13
  this.showLabel = false;
9
14
  this.label = '';
10
- this.showPlaceholder = false;
11
- this.placeholderText = '';
15
+ this.placeholder = '';
12
16
  this.showHintText = undefined;
13
17
  this.hintText = '';
14
18
  this.showHelpIcon = undefined;
@@ -21,9 +25,13 @@ export class GbInputDropdown {
21
25
  this.leadingIconSvg = '';
22
26
  this.dropdownOpen = false;
23
27
  this.selectedItems = [];
28
+ this.unselectedItems = [];
24
29
  this.selectedItem = undefined;
25
30
  this.isSelected = false;
26
31
  }
32
+ disconnectedCallback() {
33
+ document.removeEventListener('click', this.handleOutsideClick);
34
+ }
27
35
  toggleDropdown() {
28
36
  this.dropdownOpen = !this.dropdownOpen;
29
37
  }
@@ -42,6 +50,9 @@ export class GbInputDropdown {
42
50
  }
43
51
  }
44
52
  handleItemSelect(item) {
53
+ console.log('item clicked');
54
+ console.log(item.selected);
55
+ this.isSelected = item.selected;
45
56
  if (this.type === 'tags') {
46
57
  // For 'tags', allow multiple selections
47
58
  if (this.selectedItems.includes(item)) {
@@ -64,18 +75,6 @@ export class GbInputDropdown {
64
75
  this.dropdownOpen = false; // Close the dropdown after selection
65
76
  }
66
77
  }
67
- isItemSelected() {
68
- if (this.type === 'tags') {
69
- this.selectedItems.map(item => {
70
- if (this.selectedItem === item) {
71
- return true;
72
- }
73
- else {
74
- return false;
75
- }
76
- });
77
- }
78
- }
79
78
  handleTagRemove(item) {
80
79
  // Remove the item from selectedItems array
81
80
  this.selectedItems = this.selectedItems.filter(i => i !== item);
@@ -90,37 +89,52 @@ export class GbInputDropdown {
90
89
  this.loadIcon(this.leadingIcon);
91
90
  }
92
91
  componentDidLoad() {
92
+ if (this.type !== 'tags') {
93
+ document.addEventListener('click', this.handleOutsideClick);
94
+ }
93
95
  const slottedInitials = this.el.querySelector('[slot="initials"]');
94
- slottedInitials.classList.add('text-xs-semi-bold');
96
+ const mainTextSlot = this.el.querySelector('[slot="tooltip_label"]');
97
+ const supportingTextSlot = this.el.querySelector('[slot="tooltip_supporting_text"]');
98
+ slottedInitials.classList.add('text-xxs-semi-bold');
99
+ if (mainTextSlot) {
100
+ mainTextSlot.classList.add('text-xs-semi-bold');
101
+ }
102
+ if (supportingTextSlot) {
103
+ supportingTextSlot.classList.add('text-xs-regular');
104
+ }
95
105
  }
96
106
  render() {
97
107
  const items = [
98
108
  {
99
109
  name: 'Emmanuel Kadiri',
100
110
  username: 'kadiri2047',
111
+ selected: false,
101
112
  },
102
113
  {
103
114
  name: 'Gideon Ogunkola',
104
115
  username: 'gideon',
116
+ selected: false,
105
117
  },
106
118
  {
107
119
  name: 'Precious Okon',
108
120
  username: 'presh',
121
+ selected: false,
109
122
  },
110
123
  {
111
124
  name: 'Efe Dakara',
112
125
  username: 'efe',
126
+ selected: false,
113
127
  },
114
128
  ];
115
129
  console.log(this.selectedItems);
116
130
  console.log(this.selectedItem);
117
131
  return [
118
- h("div", { key: '0091d54aa1238a3ce995b8641c6039632c04305f', class: `input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`, onClick: () => this.toggleDropdown() }, this.showLabel && (h("p", { key: '0deb209d7be91abcddfaea72b4a4cc9493c9a5b3', class: "text-sm-regular", style: { color: '#4B5565' } }, this.label)), h("div", { key: '423bb657cfb1fbde5f663bd682d62080971bd341', class: `input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}` }, this.type === 'icon_leading' && (h("svg", { key: '6364580eaff1fa99b87440a44d0ae6e493fa06fd', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '3e7c2ade5433793e61822d3bce4da5152285508e', d: "M5.48131 12.9013C4.30234 13.6033 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3333 6.32572 18.3333H13.6743C14.9621 18.3333 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6033 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z", stroke: "#697586", "stroke-width": "1.66667" }), h("path", { key: 'c9e9f05cc253b163ecec2ff50e5a50532b8915de', d: "M13.75 5.41667C13.75 7.48774 12.0711 9.16667 10 9.16667C7.92893 9.16667 6.25 7.48774 6.25 5.41667C6.25 3.3456 7.92893 1.66667 10 1.66667C12.0711 1.66667 13.75 3.3456 13.75 5.41667Z", stroke: "#697586", "stroke-width": "1.66667" }))), this.type === 'avatar_leading' && (h("gb-avatar", { key: '6845c3ccc11a1403b39a68c26db47dea75ec4bcb', size: "xs", text: this.text, color: "blue" }, !this.text ? h("slot", { slot: "image", name: "image" }) : h("slot", { slot: "initials", name: "initials" }))), this.showLeadingIcon && h(Fragment, null, this.type === 'search' || this.type === 'tags' ? h("div", { class: `icon`, innerHTML: this.leadingIconSvg }) : null), this.type === 'dot_leading' && (h("svg", { key: '4d1f03e65774060b51aa1ad44d4d0c4dad78f340', xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", class: `dot ${this.size}` }, h("circle", { key: 'd423d00b60402370ab0ce4c4e00131e71701a000', cx: "5", cy: "5", r: "4", fill: "#079455" }))), h("div", { key: '56eb92891f3c765ca9a185ae78795f844c134925', class: "placeholder" }, h(Fragment, null, this.state === 'default' && (h(Fragment, null, this.showPlaceholder && (h("p", { key: 'dc83a906dba9f7f396f2f28309c0209fd17dc450', class: "text-md-regular", style: { color: '#CDD5DF' } }, "Select team member")))), this.state === 'filled' && (h(Fragment, null, h("div", { key: '48ecc43195a2d4d91333e6ae57bb9dafd7f033fe', class: `content` }, h("div", { key: 'ae06c7bcd73f703609e95c96f7a39dff0efeb3d5', class: `text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`, style: { color: '#4B5565' } }, this.type === 'tags'
119
- ? this.selectedItems.map((item, index) => (h("div", { class: "tag" }, h("gb-tag", { size: "sm", icon: "avatar", action: "X_close", key: index, onClick: () => this.handleTagRemove(index) }, h("p", { class: "text-xs-medium" }, item.name.split(' ')[0]), h("img", { src: "build/assets/avatar_pic.jpg", alt: "", slot: "image" })))))
120
- : this.selectedItem.name), this.supportingText && (h("div", { key: 'ddf2c86b4008ee9668592866cd2889da6afad8eb', class: "supporting_text text-sm-regular", style: { color: '#697586' } }, this.type === 'tags'
132
+ h("div", { key: '7d3c13e4f93d4ea480e09ab2745973ba3bf07658', class: `input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`, onClick: () => this.toggleDropdown() }, this.showLabel && (h("p", { key: '93ccf5c91d21bc72ee11637b1b35b71ab009fb18', class: "text-sm-regular", style: { color: '#4B5565' } }, this.label)), h("div", { key: '7c806c3b7515f901d196717ffeeb0dc7de758fb8', class: `input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}` }, this.type === 'icon_leading' && (h("svg", { key: '5da45be9fff8c359995afc5163c4d6fde4f36d72', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'e5226b51fde9ab196f5fd0d571ca8ae5335b42ff', d: "M5.48131 12.9013C4.30234 13.6033 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3333 6.32572 18.3333H13.6743C14.9621 18.3333 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6033 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z", stroke: "#697586", "stroke-width": "1.66667" }), h("path", { key: '3e4643cbc55d3545c188b9174be88e7adf69c856', d: "M13.75 5.41667C13.75 7.48774 12.0711 9.16667 10 9.16667C7.92893 9.16667 6.25 7.48774 6.25 5.41667C6.25 3.3456 7.92893 1.66667 10 1.66667C12.0711 1.66667 13.75 3.3456 13.75 5.41667Z", stroke: "#697586", "stroke-width": "1.66667" }))), this.type === 'avatar_leading' && (h("gb-avatar", { key: '2bc3072a739dd5aee7cce5eba4d8c93dc7109233', size: "xs", text: this.text, color: "blue" }, !this.text ? h("slot", { slot: "image", name: "image" }) : h("slot", { slot: "initials", name: "initials" }))), this.showLeadingIcon && h(Fragment, null, this.type === 'search' || this.type === 'tags' ? h("div", { class: `icon`, innerHTML: this.leadingIconSvg }) : null), this.type === 'dot_leading' && (h("svg", { key: 'd96a7ab763b09029339782fd042636b078377ae2', xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", class: `dot ${this.size}` }, h("circle", { key: '4a6b67f8f5f0f66962c4795bb71049b811e971a9', cx: "5", cy: "5", r: "4", fill: "#079455" }))), h("div", { key: 'b1c469ae98c332ee360563b06a7f3e811e8527c3', class: "placeholder" }, h(Fragment, null, this.state === 'default' && (h(Fragment, null, this.placeholder && (h("p", { key: '6c7416483dd149dc7e9e1e891ca8112aaee922b6', class: "text-md-regular", style: { color: '#CDD5DF' } }, this.placeholder)))), this.state === 'filled' && (h(Fragment, null, h("div", { key: 'a3fd10ed90c2a82763e57b600ef3d8987f7afab7', class: `content` }, h("div", { key: 'a2c1062e6e505a0791e099065aedf93bf40aa859', class: `text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`, style: { color: '#4B5565' } }, this.type === 'tags'
133
+ ? this.selectedItems.map((item, index) => (h("div", { class: "tag" }, h("gb-tag", { size: "sm", icon: "avatar", action: "X_close", key: index, onClick: () => this.handleTagRemove(item) }, h("p", { class: "text-xs-medium" }, item.name.split(' ')[0]), h("h1", { slot: "initials", class: "text-xxs-semi-bold" }, item.name.split(' ').map(part => part.charAt(0).toUpperCase()))))))
134
+ : this.selectedItem.name), this.supportingText && (h("div", { key: 'cfc0b678c2ee3d521707f1bdb876067c7ab94f5a', class: "supporting_text text-sm-regular", style: { color: '#697586' } }, this.type === 'tags'
121
135
  ? this.selectedItems.map(item => item.username).join(', ') // For multiple selections
122
- : this.selectedItem.username))))))), this.showHelpIcon && (h("div", { key: '54fa3e31e803667b870a734fd99726e8fc402705', class: `help_icon` }, h("svg", { key: 'b4a1be5818b29a7d311e697ab559187b972c4e1f', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { key: 'd398a1e64578496aa093ae3b395e0277eb3942ad', d: "M6.66665 6C6.66665 5.26362 7.2636 4.66667 7.99998 4.66667C8.73636 4.66667 9.33331 5.26362 9.33331 6C9.33331 6.26543 9.25575 6.51275 9.12205 6.72053C8.72358 7.33978 7.99998 7.93029 7.99998 8.66667V9M7.99464 11.3333H8.00063M14.6666 8C14.6666 11.6819 11.6819 14.6667 7.99998 14.6667C4.31808 14.6667 1.33331 11.6819 1.33331 8C1.33331 4.3181 4.31808 1.33333 7.99998 1.33333C11.6819 1.33333 14.6666 4.3181 14.6666 8Z", stroke: "#697586", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })))), this.type !== 'search' && (h("div", { key: '4d3ca47c25228db8cc3c31b476d96f92dbe52e63', class: "dropdown_icon" }, h("svg", { key: '2b86a39b2f56a4dc0aa8e631afe883ee4f04686b', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: `${this.state}` }, h("path", { key: '7182509ee882a40e98bf08bdc08ef5f6aa20c76a', d: "M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5", stroke: "#697586", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), this.showHintText && (h("p", { key: 'b8e18864fda59cc9d111046ca3bd6a7ade78178e', class: "text-sm-regular", style: { color: '#697586' } }, this.hintText))),
123
- h(Fragment, null, this.dropdownOpen && (h("div", { key: '74333e0656e5068aee59e81313cc05eb6240f597', class: "dropdown_menu" }, items.map(item => (h("gb-input-dropdown-menu-item", { type: this.type === 'search' ? 'checkbox' : this.type === 'tags' ? 'checkbox' : this.type, state: StateEnum.Default, "supporting-text": this.supportingText, selected: this.isSelected, onClick: () => this.handleItemSelect(item) }, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))))))),
136
+ : this.selectedItem.username))))))), this.showHelpIcon && (h("div", { key: '8378e2cb8728a41414db1e41a4e66949765084ac', class: `help_icon` }, h("gb-help-tooltip", { key: 'bf9caab0ffcb3e0f3023fcc5868c1f9e068482f7', "show-supporting-text": true }, h("slot", { key: '11c8b81a9b0c67518cc76662358c864dc0e1ca17', name: "tooltip_label", slot: "label" }), h("slot", { key: '281d5d86d2081e080f16dfc5346551eec1dd0f82', name: "tooltip_supporting_text", slot: "supporting_text" })))), this.type !== 'search' && (h("div", { key: '91e1591fa4a4b06940cf6125051fc0ad3614fda2', class: `dropdown_icon ${this.dropdownOpen ? 'opened' : ''}` }, h("svg", { key: '39795e27007d941616631ca85297ba9ace2d6ca2', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: `${this.state}` }, h("path", { key: '44f13540742b4004b8a663412c3a26ef27fdcdb3', d: "M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5", stroke: "#697586", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), this.showHintText && (h("p", { key: '94f83bba0b8716b1a9945890476ca78e1d5bd74a', class: "text-sm-regular", style: { color: '#697586' } }, this.hintText))),
137
+ h(Fragment, null, this.dropdownOpen && (h("div", { key: '87627d487fabd842993c03f4b605c1731f964245', class: "dropdown_menu", ref: el => (this.dropdownRef = el) }, items.map(item => (h("gb-input-dropdown-menu-item", { type: this.type === 'search' ? 'checkbox' : this.type === 'tags' ? 'checkbox' : this.type, state: StateEnum.Default, "supporting-text": this.supportingText, selected: this.selectedItems.includes(item), onClick: () => this.handleItemSelect(item) }, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))))))),
124
138
  ];
125
139
  }
126
140
  static get is() { return "gb-input-dropdown"; }
@@ -236,25 +250,7 @@ export class GbInputDropdown {
236
250
  "reflect": false,
237
251
  "defaultValue": "''"
238
252
  },
239
- "showPlaceholder": {
240
- "type": "boolean",
241
- "mutable": false,
242
- "complexType": {
243
- "original": "boolean",
244
- "resolved": "boolean",
245
- "references": {}
246
- },
247
- "required": false,
248
- "optional": false,
249
- "docs": {
250
- "tags": [],
251
- "text": ""
252
- },
253
- "attribute": "show-placeholder",
254
- "reflect": false,
255
- "defaultValue": "false"
256
- },
257
- "placeholderText": {
253
+ "placeholder": {
258
254
  "type": "string",
259
255
  "mutable": false,
260
256
  "complexType": {
@@ -268,7 +264,7 @@ export class GbInputDropdown {
268
264
  "tags": [],
269
265
  "text": ""
270
266
  },
271
- "attribute": "placeholder-text",
267
+ "attribute": "placeholder",
272
268
  "reflect": false,
273
269
  "defaultValue": "''"
274
270
  },
@@ -437,6 +433,7 @@ export class GbInputDropdown {
437
433
  "leadingIconSvg": {},
438
434
  "dropdownOpen": {},
439
435
  "selectedItems": {},
436
+ "unselectedItems": {},
440
437
  "selectedItem": {},
441
438
  "isSelected": {}
442
439
  };
@@ -1 +1 @@
1
- {"version":3,"file":"gb-input-dropdown.js","sourceRoot":"","sources":["../../../src/components/gb-input-dropdown/gb-input-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,EAA+B,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAOrF,MAAM,OAAO,eAAe;;;;;yBAIG,KAAK;qBACV,EAAE;+BACS,KAAK;+BACN,EAAE;;wBAET,EAAE;;+BAEM,KAAK;wBACb,EAAE;oBACL,KAAK;2BACC,EAAE;qBACT,EAAE;8BACS,KAAK;8BACL,EAAE;4BACH,KAAK;6BACN,EAAE;;0BAEH,KAAK;;IAGpC,cAAc;QACZ,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAgB;QAC7B,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,QAAQ,EAAE,CAAC,C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,QAAQ,CAAK,CAClB,CAC/B,CAAC,CACE,CACP,CACA;SACJ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Fragment, Element, State, getAssetPath } from \"@stencil/core\";\r\nimport { DropdownTypes, GeneralSizes, StateEnum } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-input-dropdown',\r\n styleUrl: 'gb-input-dropdown.css',\r\n shadow: true,\r\n})\r\nexport class GbInputDropdown {\r\n @Prop() type: DropdownTypes;\r\n @Prop({ mutable: true }) state: 'default' | 'focused' | 'disabled' | 'filled';\r\n @Prop() size: GeneralSizes;\r\n @Prop() showLabel: boolean = false;\r\n @Prop() label: string = '';\r\n @Prop() showPlaceholder: boolean = false;\r\n @Prop() placeholderText: string = '';\r\n @Prop() showHintText: boolean;\r\n @Prop() hintText: string = '';\r\n @Prop() showHelpIcon: boolean;\r\n @Prop() showLeadingIcon: boolean = false;\r\n @Prop() iconSwap: string = '';\r\n @Prop() text: boolean = false;\r\n @Prop() leadingIcon: string = '';\r\n @Prop() items: any[] = [];\r\n @Prop() supportingText: boolean = false;\r\n @State() leadingIconSvg: string = '';\r\n @State() dropdownOpen: boolean = false;\r\n @State() selectedItems: any[] = [];\r\n @State() selectedItem: any;\r\n @State() isSelected: boolean = false;\r\n @Element() el: HTMLElement;\r\n\r\n toggleDropdown() {\r\n this.dropdownOpen = !this.dropdownOpen;\r\n }\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n getAvatarSize() {\r\n switch (this.size) {\r\n case 'sm':\r\n return 'xs';\r\n case 'md':\r\n return 'xs';\r\n }\r\n }\r\n\r\n handleItemSelect(item) {\r\n if (this.type === 'tags') {\r\n // For 'tags', allow multiple selections\r\n if (this.selectedItems.includes(item)) {\r\n // Deselect if already selected\r\n this.selectedItems = this.selectedItems.filter(i => i !== item);\r\n } else {\r\n // Add to selected items\r\n this.selectedItem = item;\r\n this.selectedItems = [...this.selectedItems, this.selectedItem];\r\n }\r\n // Update state based on whether there are selected items\r\n this.state = this.selectedItems.length > 0 ? 'filled' : 'default';\r\n } else {\r\n // For other types, allow only one selection\r\n this.selectedItems = [item]; // Only one item in selectedItems\r\n this.selectedItem = item; // Store the selected item\r\n this.state = 'filled'; // Update state to 'filled'\r\n this.dropdownOpen = false; // Close the dropdown after selection\r\n }\r\n }\r\n\r\n isItemSelected() {\r\n if(this.type === 'tags') {\r\n this.selectedItems.map(item => {if(this.selectedItem === item){return true} else {return false}})\r\n }\r\n }\r\n\r\n handleTagRemove(item) {\r\n // Remove the item from selectedItems array\r\n this.selectedItems = this.selectedItems.filter(i => i !== item);\r\n\r\n // For non-tags type, set selectedItem to null if that item is removed\r\n if (this.type !== 'tags' && this.selectedItem === item) {\r\n this.selectedItem = null;\r\n }\r\n\r\n // Update state based on whether there are selected items\r\n this.state = this.selectedItems.length > 0 ? 'filled' : 'default';\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.leadingIcon);\r\n }\r\n\r\n componentDidLoad() {\r\n const slottedInitials = this.el.querySelector('[slot=\"initials\"]');\r\n\r\n slottedInitials.classList.add('text-xs-semi-bold');\r\n }\r\n\r\n render() {\r\n const items = [\r\n {\r\n name: 'Emmanuel Kadiri',\r\n username: 'kadiri2047',\r\n },\r\n {\r\n name: 'Gideon Ogunkola',\r\n username: 'gideon',\r\n },\r\n {\r\n name: 'Precious Okon',\r\n username: 'presh',\r\n },\r\n {\r\n name: 'Efe Dakara',\r\n username: 'efe',\r\n },\r\n ];\r\n\r\n console.log(this.selectedItems);\r\n console.log(this.selectedItem);\r\n \r\n return [\r\n <div class={`input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`} onClick={() => this.toggleDropdown()}>\r\n {this.showLabel && (\r\n <p class=\"text-sm-regular\" style={{ color: '#4B5565' }}>\r\n {this.label}\r\n </p>\r\n )}\r\n <div class={`input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}`}>\r\n {this.type === 'icon_leading' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M5.48131 12.9013C4.30234 13.6033 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3333 6.32572 18.3333H13.6743C14.9621 18.3333 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6033 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M13.75 5.41667C13.75 7.48774 12.0711 9.16667 10 9.16667C7.92893 9.16667 6.25 7.48774 6.25 5.41667C6.25 3.3456 7.92893 1.66667 10 1.66667C12.0711 1.66667 13.75 3.3456 13.75 5.41667Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n />\r\n </svg>\r\n )}\r\n {this.type === 'avatar_leading' && (\r\n <gb-avatar size=\"xs\" text={this.text} color=\"blue\">\r\n {!this.text ? <slot slot=\"image\" name=\"image\"></slot> : <slot slot=\"initials\" name=\"initials\"></slot>}\r\n </gb-avatar>\r\n )}\r\n {this.showLeadingIcon && <>{this.type === 'search' || this.type === 'tags' ? <div class={`icon`} innerHTML={this.leadingIconSvg}></div> : null}</>}\r\n {this.type === 'dot_leading' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" class={`dot ${this.size}`}>\r\n <circle cx=\"5\" cy=\"5\" r=\"4\" fill=\"#079455\" />\r\n </svg>\r\n )}\r\n <div class=\"placeholder\">\r\n <>\r\n {this.state === 'default' && (\r\n <>\r\n {this.showPlaceholder && (\r\n <p class=\"text-md-regular\" style={{ color: '#CDD5DF' }}>\r\n Select team member\r\n </p>\r\n )}\r\n </>\r\n )}\r\n {this.state === 'filled' && (\r\n <>\r\n <div class={`content`}>\r\n <div class={`text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`} style={{ color: '#4B5565' }}>\r\n {this.type === 'tags'\r\n ? this.selectedItems.map((item, index) => (\r\n <div class=\"tag\">\r\n <gb-tag size=\"sm\" icon=\"avatar\" action=\"X_close\" key={index} onClick={() => this.handleTagRemove(index)}>\r\n <p class=\"text-xs-medium\">{item.name.split(' ')[0]}</p>\r\n <img src=\"build/assets/avatar_pic.jpg\" alt=\"\" slot=\"image\" />\r\n </gb-tag>\r\n </div>\r\n ))\r\n : this.selectedItem.name}\r\n </div>\r\n {this.supportingText && (\r\n <div class=\"supporting_text text-sm-regular\" style={{ color: '#697586' }}>\r\n {this.type === 'tags'\r\n ? this.selectedItems.map(item => item.username).join(', ') // For multiple selections\r\n : this.selectedItem.username}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </>\r\n </div>\r\n {this.showHelpIcon && (\r\n <div class={`help_icon`}>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path\r\n d=\"M6.66665 6C6.66665 5.26362 7.2636 4.66667 7.99998 4.66667C8.73636 4.66667 9.33331 5.26362 9.33331 6C9.33331 6.26543 9.25575 6.51275 9.12205 6.72053C8.72358 7.33978 7.99998 7.93029 7.99998 8.66667V9M7.99464 11.3333H8.00063M14.6666 8C14.6666 11.6819 11.6819 14.6667 7.99998 14.6667C4.31808 14.6667 1.33331 11.6819 1.33331 8C1.33331 4.3181 4.31808 1.33333 7.99998 1.33333C11.6819 1.33333 14.6666 4.3181 14.6666 8Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n )}\r\n {this.type !== 'search' && (\r\n <div class=\"dropdown_icon\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class={`${this.state}`}>\r\n <path\r\n d=\"M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n )}\r\n </div>\r\n {this.showHintText && (\r\n <p class=\"text-sm-regular\" style={{ color: '#697586' }}>\r\n {this.hintText}\r\n </p>\r\n )}\r\n </div>,\r\n <>\r\n {this.dropdownOpen && (\r\n <div class=\"dropdown_menu\">\r\n {items.map(item => (\r\n <gb-input-dropdown-menu-item\r\n type={this.type === 'search' ? 'checkbox' : this.type === 'tags' ? 'checkbox' : this.type}\r\n state={StateEnum.Default}\r\n supporting-text={this.supportingText}\r\n selected={this.isSelected}\r\n onClick={() => this.handleItemSelect(item)}\r\n >\r\n <p slot=\"name\">{item.name}</p>\r\n <p slot=\"supporting_text\">@{item.username}</p>\r\n </gb-input-dropdown-menu-item>\r\n ))}\r\n </div>\r\n )}\r\n </>,\r\n ];\r\n }\r\n} \r\n "]}
1
+ {"version":3,"file":"gb-input-dropdown.js","sourceRoot":"","sources":["../../../src/components/gb-input-dropdown/gb-input-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SA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C,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EACzF,KAAK,EAAE,SAAS,CAAC,OAAO,qBACP,IAAI,CAAC,cAAc,EACpC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC3C,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAE1C,SAAG,IAAI,EAAC,MAAM,IAAE,IAAI,CAAC,IAAI,CAAK;gBAC9B,SAAG,IAAI,EAAC,iBAAiB;;oBAAG,IAAI,CAAC,QAAQ,CAAK,CAClB,CAC/B,CAAC,CACE,CACP,CACA;SACJ,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Fragment, Element, State, getAssetPath } from \"@stencil/core\";\r\nimport { DropdownTypes, GeneralSizes, StateEnum } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-input-dropdown',\r\n styleUrl: 'gb-input-dropdown.css',\r\n shadow: true,\r\n})\r\nexport class GbInputDropdown {\r\n @Prop() type: DropdownTypes;\r\n @Prop({ mutable: true }) state: 'default' | 'focused' | 'disabled' | 'filled';\r\n @Prop() size: GeneralSizes;\r\n @Prop() showLabel: boolean = false;\r\n @Prop() label: string = '';\r\n @Prop() placeholder: string = '';\r\n @Prop() showHintText: boolean;\r\n @Prop() hintText: string = '';\r\n @Prop() showHelpIcon: boolean;\r\n @Prop() showLeadingIcon: boolean = false;\r\n @Prop() iconSwap: string = '';\r\n @Prop() text: boolean = false;\r\n @Prop() leadingIcon: string = '';\r\n @Prop() items: any[] = [];\r\n @Prop() supportingText: boolean = false;\r\n @State() leadingIconSvg: string = '';\r\n @State() dropdownOpen: boolean = false;\r\n @State() selectedItems: any[] = [];\r\n @State() unselectedItems: any[] = [];\r\n @State() selectedItem: any;\r\n @State() isSelected: boolean = false;\r\n @Element() el: HTMLElement;\r\n\r\n dropdownRef!: HTMLDivElement;\r\n\r\n disconnectedCallback() {\r\n document.removeEventListener('click', this.handleOutsideClick);\r\n }\r\n\r\n handleOutsideClick = (event: MouseEvent) => {\r\n if (this.dropdownOpen && !this.dropdownRef.contains(event.target as Node)) {\r\n this.dropdownOpen = false; // Close the dropdown\r\n }\r\n };\r\n\r\n toggleDropdown() {\r\n this.dropdownOpen = !this.dropdownOpen;\r\n }\r\n\r\n async loadIcon(iconName: string) {\r\n const iconPath = getAssetPath(`${iconName}`);\r\n const response = await fetch(iconPath);\r\n const svg = await response.text();\r\n this.leadingIconSvg = svg;\r\n }\r\n\r\n getAvatarSize() {\r\n switch (this.size) {\r\n case 'sm':\r\n return 'xs';\r\n case 'md':\r\n return 'xs';\r\n }\r\n }\r\n\r\n handleItemSelect(item) {\r\n console.log('item clicked');\r\n console.log(item.selected);\r\n this.isSelected = item.selected;\r\n if (this.type === 'tags') {\r\n // For 'tags', allow multiple selections\r\n if (this.selectedItems.includes(item)) {\r\n // Deselect if already selected\r\n this.selectedItems = this.selectedItems.filter(i => i !== item);\r\n } else {\r\n // Add to selected items\r\n this.selectedItem = item;\r\n this.selectedItems = [...this.selectedItems, this.selectedItem];\r\n }\r\n // Update state based on whether there are selected items\r\n this.state = this.selectedItems.length > 0 ? 'filled' : 'default';\r\n } else {\r\n // For other types, allow only one selection\r\n this.selectedItems = [item]; // Only one item in selectedItems\r\n this.selectedItem = item; // Store the selected item\r\n this.state = 'filled'; // Update state to 'filled'\r\n this.dropdownOpen = false; // Close the dropdown after selection\r\n }\r\n }\r\n\r\n handleTagRemove(item) {\r\n // Remove the item from selectedItems array\r\n this.selectedItems = this.selectedItems.filter(i => i !== item);\r\n\r\n // For non-tags type, set selectedItem to null if that item is removed\r\n if (this.type !== 'tags' && this.selectedItem === item) {\r\n this.selectedItem = null;\r\n }\r\n\r\n // Update state based on whether there are selected items\r\n this.state = this.selectedItems.length > 0 ? 'filled' : 'default';\r\n }\r\n\r\n componentWillLoad() {\r\n this.loadIcon(this.leadingIcon);\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.type !== 'tags') {\r\n document.addEventListener('click', this.handleOutsideClick);\r\n }\r\n const slottedInitials = this.el.querySelector('[slot=\"initials\"]');\r\n\r\n const mainTextSlot = this.el.querySelector('[slot=\"tooltip_label\"]');\r\n const supportingTextSlot = this.el.querySelector('[slot=\"tooltip_supporting_text\"]');\r\n\r\n slottedInitials.classList.add('text-xxs-semi-bold');\r\n\r\n if (mainTextSlot) {\r\n mainTextSlot.classList.add('text-xs-semi-bold');\r\n }\r\n\r\n if (supportingTextSlot) {\r\n supportingTextSlot.classList.add('text-xs-regular');\r\n }\r\n }\r\n\r\n render() {\r\n const items = [\r\n {\r\n name: 'Emmanuel Kadiri',\r\n username: 'kadiri2047',\r\n selected: false,\r\n },\r\n {\r\n name: 'Gideon Ogunkola',\r\n username: 'gideon',\r\n selected: false,\r\n },\r\n {\r\n name: 'Precious Okon',\r\n username: 'presh',\r\n selected: false,\r\n },\r\n {\r\n name: 'Efe Dakara',\r\n username: 'efe',\r\n selected: false,\r\n },\r\n ];\r\n\r\n console.log(this.selectedItems);\r\n console.log(this.selectedItem);\r\n\r\n return [\r\n <div class={`input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`} onClick={() => this.toggleDropdown()}>\r\n {this.showLabel && (\r\n <p class=\"text-sm-regular\" style={{ color: '#4B5565' }}>\r\n {this.label}\r\n </p>\r\n )}\r\n <div class={`input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}`}>\r\n {this.type === 'icon_leading' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M5.48131 12.9013C4.30234 13.6033 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3333 6.32572 18.3333H13.6743C14.9621 18.3333 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6033 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M13.75 5.41667C13.75 7.48774 12.0711 9.16667 10 9.16667C7.92893 9.16667 6.25 7.48774 6.25 5.41667C6.25 3.3456 7.92893 1.66667 10 1.66667C12.0711 1.66667 13.75 3.3456 13.75 5.41667Z\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n />\r\n </svg>\r\n )}\r\n {this.type === 'avatar_leading' && (\r\n <gb-avatar size=\"xs\" text={this.text} color=\"blue\">\r\n {!this.text ? <slot slot=\"image\" name=\"image\"></slot> : <slot slot=\"initials\" name=\"initials\"></slot>}\r\n </gb-avatar>\r\n )}\r\n {this.showLeadingIcon && <>{this.type === 'search' || this.type === 'tags' ? <div class={`icon`} innerHTML={this.leadingIconSvg}></div> : null}</>}\r\n {this.type === 'dot_leading' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" class={`dot ${this.size}`}>\r\n <circle cx=\"5\" cy=\"5\" r=\"4\" fill=\"#079455\" />\r\n </svg>\r\n )}\r\n <div class=\"placeholder\">\r\n <>\r\n {this.state === 'default' && (\r\n <>\r\n {this.placeholder && (\r\n <p class=\"text-md-regular\" style={{ color: '#CDD5DF' }}>\r\n {this.placeholder}\r\n </p>\r\n )}\r\n </>\r\n )}\r\n {this.state === 'filled' && (\r\n <>\r\n <div class={`content`}>\r\n <div class={`text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`} style={{ color: '#4B5565' }}>\r\n {this.type === 'tags'\r\n ? this.selectedItems.map((item, index) => (\r\n <div class=\"tag\">\r\n <gb-tag size=\"sm\" icon=\"avatar\" action=\"X_close\" key={index} onClick={() => this.handleTagRemove(item)}>\r\n <p class=\"text-xs-medium\">{item.name.split(' ')[0]}</p>\r\n <h1 slot=\"initials\" class=\"text-xxs-semi-bold\">\r\n {item.name.split(' ').map(part => part.charAt(0).toUpperCase())}\r\n </h1>\r\n </gb-tag>\r\n </div>\r\n ))\r\n : this.selectedItem.name}\r\n </div>\r\n {this.supportingText && (\r\n <div class=\"supporting_text text-sm-regular\" style={{ color: '#697586' }}>\r\n {this.type === 'tags'\r\n ? this.selectedItems.map(item => item.username).join(', ') // For multiple selections\r\n : this.selectedItem.username}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </>\r\n </div>\r\n {this.showHelpIcon && (\r\n <div class={`help_icon`}>\r\n <gb-help-tooltip show-supporting-text={true}>\r\n <slot name=\"tooltip_label\" slot=\"label\"></slot>\r\n <slot name=\"tooltip_supporting_text\" slot=\"supporting_text\"></slot>\r\n </gb-help-tooltip>\r\n </div>\r\n )}\r\n {this.type !== 'search' && (\r\n <div class={`dropdown_icon ${this.dropdownOpen ? 'opened' : ''}`}>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" class={`${this.state}`}>\r\n <path\r\n d=\"M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5\"\r\n stroke=\"#697586\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n )}\r\n </div>\r\n {this.showHintText && (\r\n <p class=\"text-sm-regular\" style={{ color: '#697586' }}>\r\n {this.hintText}\r\n </p>\r\n )}\r\n </div>,\r\n <>\r\n {this.dropdownOpen && (\r\n <div class=\"dropdown_menu\" ref={el => (this.dropdownRef = el as HTMLDivElement)}>\r\n {items.map(item => (\r\n <gb-input-dropdown-menu-item\r\n type={this.type === 'search' ? 'checkbox' : this.type === 'tags' ? 'checkbox' : this.type}\r\n state={StateEnum.Default}\r\n supporting-text={this.supportingText}\r\n selected={this.selectedItems.includes(item)}\r\n onClick={() => this.handleItemSelect(item)}\r\n >\r\n <p slot=\"name\">{item.name}</p>\r\n <p slot=\"supporting_text\">@{item.username}</p>\r\n </gb-input-dropdown-menu-item>\r\n ))}\r\n </div>\r\n )}\r\n </>,\r\n ];\r\n }\r\n} \r\n "]}
@@ -2685,8 +2685,6 @@
2685
2685
 
2686
2686
  .dropdown-item {
2687
2687
  display: flex;
2688
- height: 2.5rem;
2689
- padding: var(--spacing-2);
2690
2688
  justify-content: flex-start;
2691
2689
  align-items: center;
2692
2690
  gap: var(--spacing-2);
@@ -2755,12 +2753,14 @@ gb-checkbox {
2755
2753
  padding-top: 4px;
2756
2754
  }
2757
2755
 
2758
- .text {
2756
+ .content {
2759
2757
  display: flex;
2760
- padding: var(--spacing-none);
2758
+ min-height: 2.5rem;
2759
+ padding: 0 var(--spacing-2);
2760
+ justify-content: flex-start;
2761
2761
  align-items: center;
2762
2762
  gap: var(--spacing-2);
2763
- align-self: stretch;
2763
+ flex: 1 0 0;
2764
2764
  }
2765
2765
 
2766
2766
  .dropdown-item--selected slot {
@@ -15,12 +15,14 @@ export class GbInputDropdownMenuItem {
15
15
  }
16
16
  }
17
17
  render() {
18
- return (h("div", { key: 'fb18da15d7ef76a6df5c0a781936a19ec5fd8efd', class: "dropdown-container", onClick: () => (this.selected = !this.selected) }, h("div", { key: 'c5b54a2b3e4ed3e5e96790140ae122864543e697', class: {
18
+ return (
19
+ // <div class="dropdown-container" onClick={() => (this.selected = !this.selected)}>
20
+ h("div", { key: '8b2607fec616e71d0d04b7bf9a3c92cf89d8f109', class: "dropdown-container" }, h("div", { key: '5974b92a68b3777a61fee9a7a253f28b0b3e782b', class: {
19
21
  'dropdown-item': true,
20
22
  'dropdown-item--selected': this.selected,
21
23
  'dropdown-item--disabled': this.state === 'disabled',
22
24
  [this.type]: true,
23
- }, role: "option", "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.state === 'disabled' ? 'true' : 'false' }, this.type === 'icon_leading' && (h("svg", { key: '3846fb583c762c61f86477ef371081bd14f662ac', id: "icon", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'aa199bd26431015018ea51d3431e8a8815b48f74', d: "M5.48131 12.9013C4.30234 13.6034 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3334 6.32572 18.3334H13.6743C14.9621 18.3334 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6034 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z", stroke: "#4B5565", "stroke-width": "1.5" }), h("path", { key: 'e651f73c04e902689ec064869d94544f2734311d', d: "M13.75 5.41669C13.75 7.48776 12.0711 9.16669 10 9.16669C7.92893 9.16669 6.25 7.48776 6.25 5.41669C6.25 3.34562 7.92893 1.66669 10 1.66669C12.0711 1.66669 13.75 3.34562 13.75 5.41669Z", stroke: "#4B5565", "stroke-width": "1.5" }))), this.type === 'avatar_leading' && (h("gb-avatar", { key: '8b9e3380057ae49c0114a201ef562ce02d576136', class: "avatar-icon", size: "xs", "status-icon": "false" }, h("slot", { key: '8e83645cb6ca7522b0ec383f52ff79016b6454b7', name: "image", slot: "image" }))), this.type === 'dot_leading' && (h("svg", { key: 'e6844999e74c0d9b48d95746d35f35a4e1b4e90b', id: "icon", xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 10 10", fill: "none" }, h("circle", { key: '0f29666d37aad3c58bafc34842f933e5e4da8b47', cx: "5", cy: "5", r: "4", fill: "#17B26A" }))), this.type === 'checkbox' && h("gb-checkbox", { key: '64b4b8195b5f43af6eb52e075427ea4f112dbcf3', class: "checkbox", size: "md", type: "checkbox", state: this.state, checked: this.selected }), h("div", { key: '4f63c7e058a803dfbed219f0d90424d758648a85', class: "text" }, h("slot", { key: '7dab479f70603a4b365625e5fbe15a67fa77fa04', name: "name" }), this.supportingText && (h("span", { key: '89614938b9b2e52abb63b10b31fc2015693202e4' }, h("slot", { key: 'f495866853e819f0cff595c9bb58e31316ea1e3f', name: "supporting_text" })))), this.selected && this.type !== 'checkbox' && (h("svg", { key: '6dbb9f9440a95d1de756e72b2e3ffb019f5ede09', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '7c6824083ebb2990ff402dc6992ccddb56919cde', d: "M4.16669 12.0834C4.16669 12.0834 5.41669 12.0834 7.08335 15C7.08335 15 11.7157 7.36115 15.8334 5.83337", stroke: "#075DB2", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
25
+ }, role: "option", "aria-selected": this.selected ? 'true' : 'false', "aria-disabled": this.state === 'disabled' ? 'true' : 'false' }, h("div", { key: '715d9b1fbce27804aa0f28d9ba3e8ea8ce6d855c', class: "content" }, this.type === 'icon_leading' && (h("svg", { key: '98071e46e1ed5edbd3d09f917a44bd8937722c78', id: "icon", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '1cb8f5c90620a14ad010459c66c61090feb2d99f', d: "M5.48131 12.9013C4.30234 13.6034 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3334 6.32572 18.3334H13.6743C14.9621 18.3334 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6034 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z", stroke: "#4B5565", "stroke-width": "1.5" }), h("path", { key: '874bc64d0e9937567e237130b4838a0124b92f9e', d: "M13.75 5.41669C13.75 7.48776 12.0711 9.16669 10 9.16669C7.92893 9.16669 6.25 7.48776 6.25 5.41669C6.25 3.34562 7.92893 1.66669 10 1.66669C12.0711 1.66669 13.75 3.34562 13.75 5.41669Z", stroke: "#4B5565", "stroke-width": "1.5" }))), this.type === 'avatar_leading' && (h("gb-avatar", { key: '405a429648228ccc71c2fbcc3b63b6fea65f0fc9', class: "avatar-icon", size: "xs", "status-icon": "false" }, h("slot", { key: 'c16a1c0750906bcfa149cfaf9633df411021df9f', name: "image", slot: "image" }))), this.type === 'dot_leading' && (h("svg", { key: '99f641214cee0a07d83284740fca29f4d4580b9c', id: "icon", xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 10 10", fill: "none" }, h("circle", { key: '0cd9a24fea938d587f00a9e9bb9dd4ea13dc4b2c', cx: "5", cy: "5", r: "4", fill: "#17B26A" }))), this.type === 'checkbox' && h("gb-checkbox", { key: '2aff6493c5927eb31cb873ac572cc3d7948786e1', class: "checkbox", size: "md", type: "checkbox", state: this.state, checked: this.selected }), h("slot", { key: '7b8fd042e2530084b64f3926792c1f96f86824f8', name: "name" }), this.supportingText && (h("span", { key: '20537480d14b9cd56b95beb9201984478ff99476' }, h("slot", { key: 'cd10d3d6a36ef2474b6167650235352c512a70cc', name: "supporting_text" })))), this.selected && this.type !== 'checkbox' && (h("svg", { key: 'a998472f2d5e87379465428a509ebb7e2316b0a9', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '2cb2f1003de871eae1ae2077bd924d9a51791c46', d: "M4.16669 12.0834C4.16669 12.0834 5.41669 12.0834 7.08335 15C7.08335 15 11.7157 7.36115 15.8334 5.83337", stroke: "#075DB2", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
24
26
  }
25
27
  static get is() { return "gb-input-dropdown-menu-item"; }
26
28
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"gb-input-dropdown-menu-item.js","sourceRoot":"","sources":["../../../src/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQ5D,MAAM,OAAO,uBAAuB;;;8BAEA,KAAK;wBACM,KAAK;;;IAIlD,gBAAgB;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACxD,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;QAE7E,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAEzC,IAAG,kBAAkB,EAAE,CAAC;YACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,oBAAoB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC7E,4DACE,KAAK,EAAE;oBACL,eAAe,EAAE,IAAI;oBACrB,yBAAyB,EAAE,IAAI,CAAC,QAAQ;oBACxC,yBAAyB,EAAE,IAAI,CAAC,KAAK,KAAK,UAAU;oBACpD,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI;iBAClB,EACD,IAAI,EAAC,QAAQ,mBACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,mBAChC,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBAE1D,IAAI,CAAC,I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AC,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,CAC5C,4DAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;oBAC5F,6DACE,CAAC,EAAC,wGAAwG,EAC1G,MAAM,EAAC,SAAS,kBACH,SAAS,oBACP,OAAO,qBACN,OAAO,GACvB,CACE,CACP,CACG,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, h } from \"@stencil/core\";\r\nimport { DropdownTypes, StateEnum } from '../../models/reusableModels';\r\n\r\n@Component({\r\n tag: 'gb-input-dropdown-menu-item',\r\n styleUrl: 'gb-input-dropdown-menu-item.css',\r\n shadow: true,\r\n})\r\nexport class GbInputDropdownMenuItem {\r\n @Prop() type: DropdownTypes;\r\n @Prop() supportingText: boolean = false;\r\n @Prop({ mutable: true }) selected: boolean = false;\r\n @Prop() state: StateEnum;\r\n @Element() el: HTMLElement;\r\n\r\n componentDidLoad() {\r\n const nameSlot = this.el.querySelector('[slot=\"name\"]');\r\n const supportingTextSlot = this.el.querySelector('[slot=\"supporting_text\"]');\r\n\r\n nameSlot.classList.add('text-md-medium');\r\n\r\n if(supportingTextSlot) {\r\n supportingTextSlot.classList.add('text-sm-regular');\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <div class=\"dropdown-container\" onClick={() => (this.selected = !this.selected)}>\r\n <div\r\n class={{\r\n 'dropdown-item': true,\r\n 'dropdown-item--selected': this.selected,\r\n 'dropdown-item--disabled': this.state === 'disabled',\r\n [this.type]: true,\r\n }}\r\n role=\"option\"\r\n aria-selected={this.selected ? 'true' : 'false'}\r\n aria-disabled={this.state === 'disabled' ? 'true' : 'false'}\r\n >\r\n {this.type === 'icon_leading' && (\r\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M5.48131 12.9013C4.30234 13.6034 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3334 6.32572 18.3334H13.6743C14.9621 18.3334 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6034 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z\"\r\n stroke=\"#4B5565\"\r\n stroke-width=\"1.5\"\r\n />\r\n <path\r\n d=\"M13.75 5.41669C13.75 7.48776 12.0711 9.16669 10 9.16669C7.92893 9.16669 6.25 7.48776 6.25 5.41669C6.25 3.34562 7.92893 1.66669 10 1.66669C12.0711 1.66669 13.75 3.34562 13.75 5.41669Z\"\r\n stroke=\"#4B5565\"\r\n stroke-width=\"1.5\"\r\n />\r\n </svg>\r\n )}\r\n {this.type === 'avatar_leading' && (\r\n <gb-avatar class=\"avatar-icon\" size=\"xs\" status-icon=\"false\">\r\n <slot name=\"image\" slot=\"image\"></slot>\r\n </gb-avatar>\r\n )}\r\n {this.type === 'dot_leading' && (\r\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 10 10\" fill=\"none\">\r\n <circle cx=\"5\" cy=\"5\" r=\"4\" fill=\"#17B26A\" />\r\n </svg>\r\n )}\r\n {this.type === 'checkbox' && <gb-checkbox class=\"checkbox\" size=\"md\" type=\"checkbox\" state={this.state} checked={this.selected}></gb-checkbox>}\r\n <div class=\"text\">\r\n <slot name=\"name\"></slot>\r\n {this.supportingText && (\r\n <span>\r\n <slot name=\"supporting_text\"></slot>\r\n </span>\r\n )}\r\n </div>\r\n {this.selected && this.type !== 'checkbox' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M4.16669 12.0834C4.16669 12.0834 5.41669 12.0834 7.08335 15C7.08335 15 11.7157 7.36115 15.8334 5.83337\"\r\n stroke=\"#075DB2\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}"]}
1
+ {"version":3,"file":"gb-input-dropdown-menu-item.js","sourceRoot":"","sources":["../../../src/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQ5D,MAAM,OAAO,uBAAuB;;;8BAEA,KAAK;wBACM,KAAK;;;IAIlD,gBAAgB;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;QACxD,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;QAE7E,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAEzC,IAAG,kBAAkB,EAAE,CAAC;YACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO;QACL,oFAAoF;QACpF,4DAAK,KAAK,EAAC,oBAAoB;YAC7B,4DACE,KAAK,EAAE;oBACL,eAAe,EAAE,IAAI;oBACrB,yBAAyB,EAAE,IAAI,CAAC,QAAQ;oBACxC,yBAAyB,EAAE,IAAI,CAAC,KAAK,KAAK,UAAU;oBACpD,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI;iBAClB,EACD,IAAI,EAAC,QAAQ,mBACE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,O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Q;oBACxB,IAAI,CAAC,cAAc,IAAI,CACtB;wBACE,6DAAM,IAAI,EAAC,iBAAiB,GAAQ,CAC/B,CACR,CACG;gBACL,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,CAC5C,4DAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM;oBAC5F,6DACE,CAAC,EAAC,wGAAwG,EAC1G,MAAM,EAAC,SAAS,kBACH,SAAS,oBACP,OAAO,qBACN,OAAO,GACvB,CACE,CACP,CACG,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Prop, h } from \"@stencil/core\";\r\nimport { DropdownTypes, StateEnum } from '../../models/reusableModels';\r\n\r\n@Component({\r\n tag: 'gb-input-dropdown-menu-item',\r\n styleUrl: 'gb-input-dropdown-menu-item.css',\r\n shadow: true,\r\n})\r\nexport class GbInputDropdownMenuItem {\r\n @Prop() type: DropdownTypes;\r\n @Prop() supportingText: boolean = false;\r\n @Prop({ mutable: true }) selected: boolean = false;\r\n @Prop() state: StateEnum;\r\n @Element() el: HTMLElement;\r\n\r\n componentDidLoad() {\r\n const nameSlot = this.el.querySelector('[slot=\"name\"]');\r\n const supportingTextSlot = this.el.querySelector('[slot=\"supporting_text\"]');\r\n\r\n nameSlot.classList.add('text-md-medium');\r\n\r\n if(supportingTextSlot) {\r\n supportingTextSlot.classList.add('text-sm-regular');\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n // <div class=\"dropdown-container\" onClick={() => (this.selected = !this.selected)}>\r\n <div class=\"dropdown-container\">\r\n <div\r\n class={{\r\n 'dropdown-item': true,\r\n 'dropdown-item--selected': this.selected,\r\n 'dropdown-item--disabled': this.state === 'disabled',\r\n [this.type]: true,\r\n }}\r\n role=\"option\"\r\n aria-selected={this.selected ? 'true' : 'false'}\r\n aria-disabled={this.state === 'disabled' ? 'true' : 'false'}\r\n >\r\n <div class=\"content\">\r\n {this.type === 'icon_leading' && (\r\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M5.48131 12.9013C4.30234 13.6034 1.21114 15.0368 3.09388 16.8305C4.01359 17.7067 5.03791 18.3334 6.32572 18.3334H13.6743C14.9621 18.3334 15.9864 17.7067 16.9061 16.8305C18.7889 15.0368 15.6977 13.6034 14.5187 12.9013C11.754 11.2551 8.24599 11.2551 5.48131 12.9013Z\"\r\n stroke=\"#4B5565\"\r\n stroke-width=\"1.5\"\r\n />\r\n <path\r\n d=\"M13.75 5.41669C13.75 7.48776 12.0711 9.16669 10 9.16669C7.92893 9.16669 6.25 7.48776 6.25 5.41669C6.25 3.34562 7.92893 1.66669 10 1.66669C12.0711 1.66669 13.75 3.34562 13.75 5.41669Z\"\r\n stroke=\"#4B5565\"\r\n stroke-width=\"1.5\"\r\n />\r\n </svg>\r\n )}\r\n {this.type === 'avatar_leading' && (\r\n <gb-avatar class=\"avatar-icon\" size=\"xs\" status-icon=\"false\">\r\n <slot name=\"image\" slot=\"image\"></slot>\r\n </gb-avatar>\r\n )}\r\n {this.type === 'dot_leading' && (\r\n <svg id=\"icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 10 10\" fill=\"none\">\r\n <circle cx=\"5\" cy=\"5\" r=\"4\" fill=\"#17B26A\" />\r\n </svg>\r\n )}\r\n {this.type === 'checkbox' && <gb-checkbox class=\"checkbox\" size=\"md\" type=\"checkbox\" state={this.state} checked={this.selected}></gb-checkbox>}\r\n <slot name=\"name\"></slot>\r\n {this.supportingText && (\r\n <span>\r\n <slot name=\"supporting_text\"></slot>\r\n </span>\r\n )}\r\n </div>\r\n {this.selected && this.type !== 'checkbox' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\r\n <path\r\n d=\"M4.16669 12.0834C4.16669 12.0834 5.41669 12.0834 7.08335 15C7.08335 15 11.7157 7.36115 15.8334 5.83337\"\r\n stroke=\"#075DB2\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}"]}