globuswebcomponents 0.5.4 → 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 (306) hide show
  1. package/dist/cjs/{gb-avatar_28.cjs.entry.js → gb-avatar_34.cjs.entry.js} +358 -80
  2. package/dist/cjs/gb-avatar_34.cjs.entry.js.map +1 -0
  3. package/dist/cjs/gb-button-close_2.cjs.entry.js +1 -1
  4. package/dist/cjs/gb-megainput-field.cjs.entry.js +2 -2
  5. package/dist/cjs/gb-notification-content.cjs.entry.js +1 -1
  6. package/dist/cjs/gb-password-button.cjs.entry.js +27 -0
  7. package/dist/{components/p-624a1576.js.map → cjs/gb-password-button.cjs.entry.js.map} +1 -1
  8. package/dist/cjs/gb-progress-circle.cjs.entry.js +1 -1
  9. package/dist/cjs/gb-rich-text.cjs.entry.js +1 -1
  10. package/dist/cjs/gb-scrollbar.cjs.entry.js +1 -1
  11. package/dist/cjs/gb-slider-control-handle.cjs.entry.js +1 -1
  12. package/dist/cjs/gb-slider.cjs.entry.js +1 -1
  13. package/dist/cjs/gb-toast-button.cjs.entry.js +1 -1
  14. package/dist/cjs/gb-toast.cjs.entry.js +1 -1
  15. package/dist/cjs/gb-toggle-base.cjs.entry.js +2 -2
  16. package/dist/cjs/gb-toggle.cjs.entry.js +1 -1
  17. package/dist/cjs/gb-token-field.cjs.entry.js +1 -1
  18. package/dist/cjs/gb-verification-code-field.cjs.entry.js +2 -2
  19. package/dist/cjs/globuscomponents.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js +38 -2
  23. package/dist/collection/components/gb-avatar-dropdown/gb-avatar-dropdown.js.map +1 -1
  24. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js +49 -7
  25. package/dist/collection/components/gb-avatar-label-group/gb-avatar-label-group.js.map +1 -1
  26. package/dist/collection/components/gb-button/gb-button.js +4 -4
  27. package/dist/collection/components/gb-button/gb-button.js.map +1 -1
  28. package/dist/collection/components/gb-button/gb-button.tsx +3 -3
  29. package/dist/collection/components/gb-checkbox/gb-checkbox.css +6 -2
  30. package/dist/collection/components/gb-checkbox/gb-checkbox.js +20 -1
  31. package/dist/collection/components/gb-checkbox/gb-checkbox.js.map +1 -1
  32. package/dist/collection/components/gb-header/gb-header.js +37 -1
  33. package/dist/collection/components/gb-header/gb-header.js.map +1 -1
  34. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.css +2686 -0
  35. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js +80 -0
  36. package/dist/collection/components/gb-help-tooltip/gb-help-tooltip.js.map +1 -0
  37. package/dist/collection/components/gb-horizontal-tabs/gb-horizontal-tabs.js +1 -1
  38. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.css +17 -0
  39. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +29 -41
  40. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -1
  41. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.css +5 -5
  42. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js +4 -2
  43. package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js.map +1 -1
  44. package/dist/collection/components/gb-input-field/gb-input-field.css +10 -315
  45. package/dist/collection/components/gb-input-field/gb-input-field.js +8 -14
  46. package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
  47. package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.js +2 -2
  48. package/dist/collection/components/gb-notification-content/gb-notification-content.js +1 -1
  49. package/dist/collection/components/gb-notification-pane/gb-notification-pane.js +1 -1
  50. package/dist/collection/components/gb-pagination/gb-pagination.js +1 -1
  51. package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.js +1 -1
  52. package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.js +1 -1
  53. package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.js +1 -1
  54. package/dist/collection/components/gb-password-button/gb-password-button.js +1 -1
  55. package/dist/collection/components/gb-progress-bar/gb-progress-bar.js +1 -1
  56. package/dist/collection/components/gb-progress-circle/gb-progress-circle.js +1 -1
  57. package/dist/collection/components/gb-rich-text/gb-rich-text.js +1 -1
  58. package/dist/collection/components/gb-scrollbar/gb-scrollbar.js +1 -1
  59. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.css +9 -1
  60. package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.js +1 -1
  61. package/dist/collection/components/gb-sidebar/gb-sidebar.js +1 -1
  62. package/dist/collection/components/gb-slider/gb-slider.js +1 -1
  63. package/dist/collection/components/gb-slider-control-handle/slider-control-handle.js +1 -1
  64. package/dist/collection/components/gb-status-indicator/gb-status-indicator.js +1 -1
  65. package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.js +3 -3
  66. package/dist/collection/components/gb-tag/gb-tag.js +1 -1
  67. package/dist/collection/components/gb-tag/gb-tag.js.map +1 -1
  68. package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.js +1 -1
  69. package/dist/collection/components/gb-tag-close/gb-tag-close.js +1 -1
  70. package/dist/collection/components/gb-tag-count/gb-tag-count.js +1 -1
  71. package/dist/collection/components/gb-toast/gb-toast.js +1 -1
  72. package/dist/collection/components/gb-toast-button/gb-toast-button.js +1 -1
  73. package/dist/collection/components/gb-toggle/gb-toggle.js +1 -1
  74. package/dist/collection/components/gb-toggle-base/gb-toggle-base.js +2 -2
  75. package/dist/collection/components/gb-token-field/gb-token-field.js +1 -1
  76. package/dist/collection/components/gb-tooltip/gb-tooltip.css +2 -2
  77. package/dist/collection/components/gb-tooltip/gb-tooltip.js +1 -1
  78. package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.js +2 -2
  79. package/dist/components/gb-avatar-add-button.js +1 -1
  80. package/dist/components/gb-avatar-dropdown.js +21 -7
  81. package/dist/components/gb-avatar-dropdown.js.map +1 -1
  82. package/dist/components/gb-avatar-group.js +4 -4
  83. package/dist/components/gb-avatar-label-group.js +1 -1
  84. package/dist/components/gb-avatar-profile-photo.js +2 -2
  85. package/dist/components/gb-avatar.js +1 -1
  86. package/dist/components/gb-badge.js +1 -1
  87. package/dist/components/gb-button.js +1 -1
  88. package/dist/components/gb-checkbox-group-item.js +1 -1
  89. package/dist/components/gb-checkbox-group.js +5 -5
  90. package/dist/components/gb-checkbox.js +1 -1
  91. package/dist/components/gb-collapse-button.js +1 -1
  92. package/dist/components/gb-dropdown-items-with-shortcut.js +1 -1
  93. package/dist/components/gb-file-upload-item-base.js +1 -1
  94. package/dist/components/gb-file-upload.js +4 -4
  95. package/dist/components/gb-header.js +17 -3
  96. package/dist/components/gb-header.js.map +1 -1
  97. package/dist/components/gb-help-dropdown.js +2 -2
  98. package/dist/components/gb-help-tooltip.d.ts +11 -0
  99. package/dist/components/gb-help-tooltip.js +8 -0
  100. package/dist/components/gb-help-tooltip.js.map +1 -0
  101. package/dist/components/gb-horizontal-tabs.js +5 -5
  102. package/dist/components/gb-input-dropdown-menu-item.js +1 -1
  103. package/dist/components/gb-input-dropdown.js +1 -1
  104. package/dist/components/gb-input-field.js +9 -33
  105. package/dist/components/gb-input-field.js.map +1 -1
  106. package/dist/components/gb-megainput-field.js +1 -1
  107. package/dist/components/gb-notification-content.js +1 -1
  108. package/dist/components/gb-notification-pane.js +2 -2
  109. package/dist/components/gb-pagination-button-group-base.js +1 -1
  110. package/dist/components/gb-pagination-dot-indicator.js +1 -1
  111. package/dist/components/gb-pagination-number-base.js +1 -1
  112. package/dist/components/gb-pagination.js +2 -2
  113. package/dist/components/gb-password-button.js +50 -1
  114. package/dist/components/gb-password-button.js.map +1 -1
  115. package/dist/components/gb-progress-bar.js +1 -1
  116. package/dist/components/gb-progress-circle.js +1 -1
  117. package/dist/components/gb-rich-text.js +36 -24
  118. package/dist/components/gb-rich-text.js.map +1 -1
  119. package/dist/components/gb-scrollbar.js +1 -1
  120. package/dist/components/gb-side-bar-item.js +1 -1
  121. package/dist/components/gb-sidebar.js +7 -7
  122. package/dist/components/gb-slider-control-handle.js +1 -1
  123. package/dist/components/gb-slider.js +3 -3
  124. package/dist/components/gb-status-indicator.js +1 -1
  125. package/dist/components/gb-tab-button-base.js +1 -1
  126. package/dist/components/gb-tag-checkbox.js +1 -1
  127. package/dist/components/gb-tag-close.js +1 -1
  128. package/dist/components/gb-tag-count.js +1 -1
  129. package/dist/components/gb-tag.js +1 -1
  130. package/dist/components/gb-toast-button.js +1 -1
  131. package/dist/components/gb-toast.js +3 -3
  132. package/dist/components/gb-toggle-base.js +1 -1
  133. package/dist/components/gb-toggle.js +2 -2
  134. package/dist/components/gb-token-field.js +2 -2
  135. package/dist/components/gb-tooltip.js +1 -1
  136. package/dist/components/gb-verification-code-field.js +3 -3
  137. package/dist/components/gb-wysiwyg-toolbar.js +1 -1
  138. package/dist/components/{p-6f80ffdd.js → p-0767d31b.js} +3 -3
  139. package/dist/components/{p-6f80ffdd.js.map → p-0767d31b.js.map} +1 -1
  140. package/dist/components/{p-828cdee0.js → p-12d84b99.js} +3 -3
  141. package/dist/components/{p-828cdee0.js.map → p-12d84b99.js.map} +1 -1
  142. package/dist/components/{p-d35a5ebf.js → p-14ae77f4.js} +2 -2
  143. package/dist/components/{p-d35a5ebf.js.map → p-14ae77f4.js.map} +1 -1
  144. package/dist/components/{p-80e5c981.js → p-1787a21b.js} +3 -3
  145. package/dist/components/{p-80e5c981.js.map → p-1787a21b.js.map} +1 -1
  146. package/dist/components/{p-45b383f3.js → p-1c27c0dc.js} +7 -7
  147. package/dist/components/p-1c27c0dc.js.map +1 -0
  148. package/dist/components/{p-5c8697f4.js → p-200efa06.js} +7 -7
  149. package/dist/components/{p-5c8697f4.js.map → p-200efa06.js.map} +1 -1
  150. package/dist/components/{p-0def795f.js → p-2849e182.js} +2 -2
  151. package/dist/components/{p-0def795f.js.map → p-2849e182.js.map} +1 -1
  152. package/dist/components/{p-1bf71f2b.js → p-43c70bd8.js} +2 -2
  153. package/dist/components/{p-1bf71f2b.js.map → p-43c70bd8.js.map} +1 -1
  154. package/dist/components/{p-86b97b4e.js → p-443d3de1.js} +2 -2
  155. package/dist/components/{p-86b97b4e.js.map → p-443d3de1.js.map} +1 -1
  156. package/dist/components/{p-01ca2c76.js → p-55426266.js} +5 -5
  157. package/dist/components/{p-01ca2c76.js.map → p-55426266.js.map} +1 -1
  158. package/dist/components/{p-3f0f1542.js → p-5ba87b93.js} +2 -2
  159. package/dist/components/{p-3f0f1542.js.map → p-5ba87b93.js.map} +1 -1
  160. package/dist/components/{p-69a17ca1.js → p-65de39d5.js} +21 -18
  161. package/dist/components/p-65de39d5.js.map +1 -0
  162. package/dist/components/{p-a621882d.js → p-6b8ad833.js} +9 -7
  163. package/dist/components/p-6b8ad833.js.map +1 -0
  164. package/dist/components/{p-4ad10413.js → p-8ae9de24.js} +5 -3
  165. package/dist/components/p-8ae9de24.js.map +1 -0
  166. package/dist/components/{p-29e457b4.js → p-9023f483.js} +5 -5
  167. package/dist/components/p-9023f483.js.map +1 -0
  168. package/dist/components/{p-16a63898.js → p-92877dec.js} +2 -2
  169. package/dist/components/{p-16a63898.js.map → p-92877dec.js.map} +1 -1
  170. package/dist/components/{p-136d6625.js → p-9af82179.js} +2 -2
  171. package/dist/components/{p-136d6625.js.map → p-9af82179.js.map} +1 -1
  172. package/dist/components/{p-4bc4b9d4.js → p-a8fc1a6f.js} +31 -11
  173. package/dist/components/p-a8fc1a6f.js.map +1 -0
  174. package/dist/components/{p-b3a3cd2c.js → p-ad5a06e5.js} +4 -4
  175. package/dist/components/{p-b3a3cd2c.js.map → p-ad5a06e5.js.map} +1 -1
  176. package/dist/components/{p-2ff90ce5.js → p-b20e1208.js} +35 -23
  177. package/dist/components/p-b20e1208.js.map +1 -0
  178. package/dist/components/p-c2bbed0e.js +55 -0
  179. package/dist/components/p-c2bbed0e.js.map +1 -0
  180. package/dist/components/{p-fa3dbfc9.js → p-d033be88.js} +7 -7
  181. package/dist/components/p-d033be88.js.map +1 -0
  182. package/dist/components/{p-c3435528.js → p-dacb769c.js} +3 -3
  183. package/dist/components/{p-c3435528.js.map → p-dacb769c.js.map} +1 -1
  184. package/dist/components/{p-684a3a44.js → p-e4b16ff4.js} +2 -2
  185. package/dist/components/{p-684a3a44.js.map → p-e4b16ff4.js.map} +1 -1
  186. package/dist/components/{p-85c64917.js → p-eaaefb80.js} +3 -3
  187. package/dist/components/{p-85c64917.js.map → p-eaaefb80.js.map} +1 -1
  188. package/dist/components/{p-da4c5b74.js → p-f260054c.js} +62 -45
  189. package/dist/components/p-f260054c.js.map +1 -0
  190. package/dist/components/{p-502ce20d.js → p-fc3b2733.js} +2 -2
  191. package/dist/components/{p-502ce20d.js.map → p-fc3b2733.js.map} +1 -1
  192. package/dist/esm/{gb-avatar_28.entry.js → gb-avatar_34.entry.js} +352 -80
  193. package/dist/esm/gb-avatar_34.entry.js.map +1 -0
  194. package/dist/esm/gb-button-close_2.entry.js +1 -1
  195. package/dist/esm/gb-megainput-field.entry.js +2 -2
  196. package/dist/esm/gb-notification-content.entry.js +1 -1
  197. package/dist/{components/p-624a1576.js → esm/gb-password-button.entry.js} +9 -40
  198. package/dist/esm/gb-password-button.entry.js.map +1 -0
  199. package/dist/esm/gb-progress-circle.entry.js +1 -1
  200. package/dist/esm/gb-rich-text.entry.js +1 -1
  201. package/dist/esm/gb-scrollbar.entry.js +1 -1
  202. package/dist/esm/gb-slider-control-handle.entry.js +1 -1
  203. package/dist/esm/gb-slider.entry.js +1 -1
  204. package/dist/esm/gb-toast-button.entry.js +1 -1
  205. package/dist/esm/gb-toast.entry.js +1 -1
  206. package/dist/esm/gb-toggle-base.entry.js +2 -2
  207. package/dist/esm/gb-toggle.entry.js +1 -1
  208. package/dist/esm/gb-token-field.entry.js +1 -1
  209. package/dist/esm/gb-verification-code-field.entry.js +2 -2
  210. package/dist/esm/globuscomponents.js +1 -1
  211. package/dist/esm/loader.js +1 -1
  212. package/dist/globuscomponents/gb-button.tsx +3 -3
  213. package/dist/globuscomponents/globuscomponents.esm.js +1 -1
  214. package/dist/globuscomponents/globuscomponents.esm.js.map +1 -1
  215. package/dist/globuscomponents/p-1d2985a5.entry.js +2 -0
  216. package/dist/globuscomponents/{p-7d39e1bb.entry.js → p-2adda6a5.entry.js} +2 -2
  217. package/dist/globuscomponents/p-2f557384.entry.js +2 -0
  218. package/dist/globuscomponents/p-2f557384.entry.js.map +1 -0
  219. package/dist/globuscomponents/{p-5e5e8adb.entry.js → p-3e8c8ead.entry.js} +2 -2
  220. package/dist/globuscomponents/{p-c319a1ac.entry.js → p-3fc3956d.entry.js} +2 -2
  221. package/dist/globuscomponents/{p-ae1e9810.entry.js → p-40f11c62.entry.js} +2 -2
  222. package/dist/globuscomponents/{p-c72859a2.entry.js → p-427cfeeb.entry.js} +2 -2
  223. package/dist/globuscomponents/{p-98dbf27b.entry.js → p-4e97f7cd.entry.js} +2 -2
  224. package/dist/globuscomponents/p-5ea9e5cd.entry.js +2 -0
  225. package/dist/globuscomponents/{p-f75875e4.entry.js → p-67b452b7.entry.js} +2 -2
  226. package/dist/globuscomponents/p-92c7f3ab.entry.js +2 -0
  227. package/dist/globuscomponents/p-92c7f3ab.entry.js.map +1 -0
  228. package/dist/globuscomponents/{p-9f6d25da.entry.js → p-aa4006c2.entry.js} +2 -2
  229. package/dist/globuscomponents/{p-74dc85da.entry.js → p-c6e2e53a.entry.js} +2 -2
  230. package/dist/globuscomponents/{p-934f454a.entry.js → p-cf24a49c.entry.js} +2 -2
  231. package/dist/globuscomponents/{p-52b8180e.entry.js → p-d1103820.entry.js} +2 -2
  232. package/dist/globuscomponents/{p-e52d8cdf.entry.js → p-d6fb070d.entry.js} +2 -2
  233. package/dist/types/components/gb-avatar-dropdown/gb-avatar-dropdown.d.ts +3 -0
  234. package/dist/types/components/gb-avatar-label-group/gb-avatar-label-group.d.ts +3 -1
  235. package/dist/types/components/gb-checkbox/gb-checkbox.d.ts +1 -0
  236. package/dist/types/components/gb-header/gb-header.d.ts +3 -1
  237. package/dist/types/components/gb-help-tooltip/gb-help-tooltip.d.ts +8 -0
  238. package/dist/types/components/gb-input-dropdown/gb-input-dropdown.d.ts +2 -3
  239. package/dist/types/components/gb-input-field/gb-input-field.d.ts +1 -1
  240. package/dist/types/components.d.ts +29 -6
  241. package/package.json +1 -1
  242. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js +0 -44
  243. package/dist/cjs/gb-avatar-dropdown.cjs.entry.js.map +0 -1
  244. package/dist/cjs/gb-avatar-label-group.cjs.entry.js +0 -77
  245. package/dist/cjs/gb-avatar-label-group.cjs.entry.js.map +0 -1
  246. package/dist/cjs/gb-avatar_28.cjs.entry.js.map +0 -1
  247. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js +0 -31
  248. package/dist/cjs/gb-dropdown-items-with-shortcut.cjs.entry.js.map +0 -1
  249. package/dist/cjs/gb-header-icon.cjs.entry.js +0 -34
  250. package/dist/cjs/gb-header-icon.cjs.entry.js.map +0 -1
  251. package/dist/cjs/gb-header.cjs.entry.js +0 -42
  252. package/dist/cjs/gb-header.cjs.entry.js.map +0 -1
  253. package/dist/cjs/gb-notification-pane.cjs.entry.js +0 -45
  254. package/dist/cjs/gb-notification-pane.cjs.entry.js.map +0 -1
  255. package/dist/components/p-29e457b4.js.map +0 -1
  256. package/dist/components/p-2ff90ce5.js.map +0 -1
  257. package/dist/components/p-45b383f3.js.map +0 -1
  258. package/dist/components/p-4ad10413.js.map +0 -1
  259. package/dist/components/p-4bc4b9d4.js.map +0 -1
  260. package/dist/components/p-69a17ca1.js.map +0 -1
  261. package/dist/components/p-a621882d.js.map +0 -1
  262. package/dist/components/p-da4c5b74.js.map +0 -1
  263. package/dist/components/p-fa3dbfc9.js.map +0 -1
  264. package/dist/esm/gb-avatar-dropdown.entry.js +0 -40
  265. package/dist/esm/gb-avatar-dropdown.entry.js.map +0 -1
  266. package/dist/esm/gb-avatar-label-group.entry.js +0 -73
  267. package/dist/esm/gb-avatar-label-group.entry.js.map +0 -1
  268. package/dist/esm/gb-avatar_28.entry.js.map +0 -1
  269. package/dist/esm/gb-dropdown-items-with-shortcut.entry.js +0 -27
  270. package/dist/esm/gb-dropdown-items-with-shortcut.entry.js.map +0 -1
  271. package/dist/esm/gb-header-icon.entry.js +0 -30
  272. package/dist/esm/gb-header-icon.entry.js.map +0 -1
  273. package/dist/esm/gb-header.entry.js +0 -38
  274. package/dist/esm/gb-header.entry.js.map +0 -1
  275. package/dist/esm/gb-notification-pane.entry.js +0 -41
  276. package/dist/esm/gb-notification-pane.entry.js.map +0 -1
  277. package/dist/globuscomponents/p-071f2e68.entry.js +0 -2
  278. package/dist/globuscomponents/p-071f2e68.entry.js.map +0 -1
  279. package/dist/globuscomponents/p-130d1778.entry.js +0 -2
  280. package/dist/globuscomponents/p-130d1778.entry.js.map +0 -1
  281. package/dist/globuscomponents/p-1626936d.entry.js +0 -2
  282. package/dist/globuscomponents/p-1626936d.entry.js.map +0 -1
  283. package/dist/globuscomponents/p-2a3cf534.entry.js +0 -2
  284. package/dist/globuscomponents/p-2a3cf534.entry.js.map +0 -1
  285. package/dist/globuscomponents/p-74d432cd.entry.js +0 -2
  286. package/dist/globuscomponents/p-85954677.entry.js +0 -2
  287. package/dist/globuscomponents/p-85954677.entry.js.map +0 -1
  288. package/dist/globuscomponents/p-863cf07a.entry.js +0 -2
  289. package/dist/globuscomponents/p-863cf07a.entry.js.map +0 -1
  290. package/dist/globuscomponents/p-8f90b024.entry.js +0 -2
  291. package/dist/globuscomponents/p-9f1b85de.entry.js +0 -2
  292. package/dist/globuscomponents/p-9f1b85de.entry.js.map +0 -1
  293. /package/dist/globuscomponents/{p-8f90b024.entry.js.map → p-1d2985a5.entry.js.map} +0 -0
  294. /package/dist/globuscomponents/{p-7d39e1bb.entry.js.map → p-2adda6a5.entry.js.map} +0 -0
  295. /package/dist/globuscomponents/{p-5e5e8adb.entry.js.map → p-3e8c8ead.entry.js.map} +0 -0
  296. /package/dist/globuscomponents/{p-c319a1ac.entry.js.map → p-3fc3956d.entry.js.map} +0 -0
  297. /package/dist/globuscomponents/{p-ae1e9810.entry.js.map → p-40f11c62.entry.js.map} +0 -0
  298. /package/dist/globuscomponents/{p-c72859a2.entry.js.map → p-427cfeeb.entry.js.map} +0 -0
  299. /package/dist/globuscomponents/{p-98dbf27b.entry.js.map → p-4e97f7cd.entry.js.map} +0 -0
  300. /package/dist/globuscomponents/{p-74d432cd.entry.js.map → p-5ea9e5cd.entry.js.map} +0 -0
  301. /package/dist/globuscomponents/{p-f75875e4.entry.js.map → p-67b452b7.entry.js.map} +0 -0
  302. /package/dist/globuscomponents/{p-9f6d25da.entry.js.map → p-aa4006c2.entry.js.map} +0 -0
  303. /package/dist/globuscomponents/{p-74dc85da.entry.js.map → p-c6e2e53a.entry.js.map} +0 -0
  304. /package/dist/globuscomponents/{p-934f454a.entry.js.map → p-cf24a49c.entry.js.map} +0 -0
  305. /package/dist/globuscomponents/{p-52b8180e.entry.js.map → p-d1103820.entry.js.map} +0 -0
  306. /package/dist/globuscomponents/{p-e52d8cdf.entry.js.map → p-d6fb070d.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":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAO7E,MAAM,OAAO,aAAa;;+BACY,KAAK;yBACZ,KAAK;kCACI,KAAK;;IAG3C,gBAAgB;QACd,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;QAC7D,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;QAE7E,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,kBAAkB,EAAE,CAAC;YACvB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL;YACE,4DACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,EACjD,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;gBAElD,6DACE,CAAC,EAAC,4ZAA4Z,EAC9Z,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE;YACL,IAAI,CAAC,eAAe,IAAI,CACvB,iFAAwB,IAAI,EAAE,KAAK,EAAC,cAAc,0BAAuB,IAAI,CAAC,kBAAkB,EAAE,KAAK,EAAC,SAAS;gBAC/G,6DAAM,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,GAAQ;gBACvC,6DAAM,IAAI,EAAC,iBAAiB,EAAC,IAAI,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
  }
@@ -12,8 +12,7 @@ export class GbInputDropdown {
12
12
  this.size = undefined;
13
13
  this.showLabel = false;
14
14
  this.label = '';
15
- this.showPlaceholder = false;
16
- this.placeholderText = '';
15
+ this.placeholder = '';
17
16
  this.showHintText = undefined;
18
17
  this.hintText = '';
19
18
  this.showHelpIcon = undefined;
@@ -26,6 +25,7 @@ export class GbInputDropdown {
26
25
  this.leadingIconSvg = '';
27
26
  this.dropdownOpen = false;
28
27
  this.selectedItems = [];
28
+ this.unselectedItems = [];
29
29
  this.selectedItem = undefined;
30
30
  this.isSelected = false;
31
31
  }
@@ -50,6 +50,9 @@ export class GbInputDropdown {
50
50
  }
51
51
  }
52
52
  handleItemSelect(item) {
53
+ console.log('item clicked');
54
+ console.log(item.selected);
55
+ this.isSelected = item.selected;
53
56
  if (this.type === 'tags') {
54
57
  // For 'tags', allow multiple selections
55
58
  if (this.selectedItems.includes(item)) {
@@ -72,18 +75,6 @@ export class GbInputDropdown {
72
75
  this.dropdownOpen = false; // Close the dropdown after selection
73
76
  }
74
77
  }
75
- isItemSelected() {
76
- if (this.type === 'tags') {
77
- this.selectedItems.map(item => {
78
- if (this.selectedItem === item) {
79
- return true;
80
- }
81
- else {
82
- return false;
83
- }
84
- });
85
- }
86
- }
87
78
  handleTagRemove(item) {
88
79
  // Remove the item from selectedItems array
89
80
  this.selectedItems = this.selectedItems.filter(i => i !== item);
@@ -98,38 +89,52 @@ export class GbInputDropdown {
98
89
  this.loadIcon(this.leadingIcon);
99
90
  }
100
91
  componentDidLoad() {
101
- document.addEventListener('click', this.handleOutsideClick);
92
+ if (this.type !== 'tags') {
93
+ document.addEventListener('click', this.handleOutsideClick);
94
+ }
102
95
  const slottedInitials = this.el.querySelector('[slot="initials"]');
103
- 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
+ }
104
105
  }
105
106
  render() {
106
107
  const items = [
107
108
  {
108
109
  name: 'Emmanuel Kadiri',
109
110
  username: 'kadiri2047',
111
+ selected: false,
110
112
  },
111
113
  {
112
114
  name: 'Gideon Ogunkola',
113
115
  username: 'gideon',
116
+ selected: false,
114
117
  },
115
118
  {
116
119
  name: 'Precious Okon',
117
120
  username: 'presh',
121
+ selected: false,
118
122
  },
119
123
  {
120
124
  name: 'Efe Dakara',
121
125
  username: 'efe',
126
+ selected: false,
122
127
  },
123
128
  ];
124
129
  console.log(this.selectedItems);
125
130
  console.log(this.selectedItem);
126
131
  return [
127
- h("div", { key: '0f93fedf54224073a37e7962c84ae58500d1bba4', class: `input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`, onClick: () => this.toggleDropdown() }, this.showLabel && (h("p", { key: '2f9c6c19d9965d550dd6563ee00a6fbd1cd044c4', class: "text-sm-regular", style: { color: '#4B5565' } }, this.label)), h("div", { key: '0aaaf6756888df12fd4e90894ff8f6fa82650585', class: `input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}` }, this.type === 'icon_leading' && (h("svg", { key: 'c9adc5039f0c089c413a9726b84f1bc5e59378c7', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'fae267ace9b2275c968309aef9894797d37c1d74', 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: '0ea9a36ab91d330aff921536c4820ce609cbdb67', 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: 'db34c525075d3b0862aef4c27c5fe8bc2c88e682', 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: '9f64d5be9e5a0d9f7e7aaf4c9ade8bda300369e9', 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: '11a8483b2357ea579d9de87ea8398c0de2fcbf1e', cx: "5", cy: "5", r: "4", fill: "#079455" }))), h("div", { key: '2f09b0fa3dd107f9be16842a4fd87d3e17ce053d', class: "placeholder" }, h(Fragment, null, this.state === 'default' && (h(Fragment, null, this.showPlaceholder && (h("p", { key: 'a52597307a170b76d9fd46836a13831d275f470f', class: "text-md-regular", style: { color: '#CDD5DF' } }, "Select team member")))), this.state === 'filled' && (h(Fragment, null, h("div", { key: '7f5d5d966996cc7112ce1b844b06b9725ac51d3f', class: `content` }, h("div", { key: '0c8a0dced1f035db9a8c0796fa4faaf385fbe948', class: `text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`, style: { color: '#4B5565' } }, this.type === 'tags'
128
- ? 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("img", { src: "build/assets/avatar_pic.jpg", alt: "", slot: "image" })))))
129
- : this.selectedItem.name), this.supportingText && (h("div", { key: '161bb02e72d1f56373e1f7a798c262849203c4f3', 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'
130
135
  ? this.selectedItems.map(item => item.username).join(', ') // For multiple selections
131
- : this.selectedItem.username))))))), this.showHelpIcon && (h("div", { key: 'cab6418e1b82f62219091fd168613968ba5e0e93', class: `help_icon` }, h("svg", { key: '75be8d7b6a66906cc7030c04a6160bfa16514341', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { key: '9e44e1ca57aa4ce3bfee3373f58437681f040d56', 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: '6cdb02fb9c828a227ea50a51ba16468a7f23136f', class: "dropdown_icon" }, h("svg", { key: 'e6abd201b2b93227925024ab62b990f3126321f0', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: `${this.state}` }, h("path", { key: 'dc23f4b64cf118e26e6e407beb67149a8908630b', 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: '641170e6407a091e936b4726addbcac5d8b47dae', class: "text-sm-regular", style: { color: '#697586' } }, this.hintText))),
132
- h(Fragment, null, this.dropdownOpen && (h("div", { key: '40e0284b63f43f216437cc751415c3a45f5accf5', 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.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))))))),
133
138
  ];
134
139
  }
135
140
  static get is() { return "gb-input-dropdown"; }
@@ -245,25 +250,7 @@ export class GbInputDropdown {
245
250
  "reflect": false,
246
251
  "defaultValue": "''"
247
252
  },
248
- "showPlaceholder": {
249
- "type": "boolean",
250
- "mutable": false,
251
- "complexType": {
252
- "original": "boolean",
253
- "resolved": "boolean",
254
- "references": {}
255
- },
256
- "required": false,
257
- "optional": false,
258
- "docs": {
259
- "tags": [],
260
- "text": ""
261
- },
262
- "attribute": "show-placeholder",
263
- "reflect": false,
264
- "defaultValue": "false"
265
- },
266
- "placeholderText": {
253
+ "placeholder": {
267
254
  "type": "string",
268
255
  "mutable": false,
269
256
  "complexType": {
@@ -277,7 +264,7 @@ export class GbInputDropdown {
277
264
  "tags": [],
278
265
  "text": ""
279
266
  },
280
- "attribute": "placeholder-text",
267
+ "attribute": "placeholder",
281
268
  "reflect": false,
282
269
  "defaultValue": "''"
283
270
  },
@@ -446,6 +433,7 @@ export class GbInputDropdown {
446
433
  "leadingIconSvg": {},
447
434
  "dropdownOpen": {},
448
435
  "selectedItems": {},
436
+ "unselectedItems": {},
449
437
  "selectedItem": {},
450
438
  "isSelected": {}
451
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;;QA8B1B,uBAAkB,GAAG,CAAC,KAAiB,EAAE,EAAE;YACzC,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;gBAC1E,IAAI,CAAC,YAAY,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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 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 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 => {\r\n if (this.selectedItem === item) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n });\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 document.addEventListener('click', this.handleOutsideClick);\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(item)}>\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\" 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.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,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;;QA8B1B,uBAAkB,GAAG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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,OAA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C,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,OAAO,mBAChC,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBAE3D,4DAAK,KAAK,EAAC,SAAS;oBACjB,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,CAC/B,4DAAK,EAAE,EAAC,MAAM,EA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AAC,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}"]}