globuswebcomponents 0.8.3 → 0.8.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 (102) hide show
  1. package/dist/cjs/{gb-avatar_34.cjs.entry.js → gb-avatar_38.cjs.entry.js} +291 -79
  2. package/dist/cjs/gb-avatar_38.cjs.entry.js.map +1 -0
  3. package/dist/cjs/{gb-toast-button.cjs.entry.js → gb-progress-bar.cjs.entry.js} +12 -14
  4. package/dist/cjs/gb-progress-bar.cjs.entry.js.map +1 -0
  5. package/dist/cjs/globuscomponents.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/gb-avatar/gb-avatar.js +60 -16
  8. package/dist/collection/components/gb-avatar/gb-avatar.js.map +1 -1
  9. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.css +1 -0
  10. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +45 -75
  11. package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -1
  12. package/dist/collection/components/gb-pagination/gb-pagination.css +4 -0
  13. package/dist/collection/components/gb-pagination/gb-pagination.js +16 -5
  14. package/dist/collection/components/gb-pagination/gb-pagination.js.map +1 -1
  15. package/dist/collection/components/gb-tag/gb-tag.js +3 -3
  16. package/dist/collection/components/gb-tag/gb-tag.js.map +1 -1
  17. package/dist/components/gb-avatar-dropdown.js +2 -2
  18. package/dist/components/gb-avatar-group.js +1 -1
  19. package/dist/components/gb-avatar-label-group.js +1 -1
  20. package/dist/components/gb-avatar-profile-photo.js +1 -1
  21. package/dist/components/gb-avatar.js +1 -1
  22. package/dist/components/gb-badge.js +1 -1
  23. package/dist/components/gb-checkbox-group-item.js +1 -1
  24. package/dist/components/gb-checkbox-group.js +2 -2
  25. package/dist/components/gb-header.js +1 -1
  26. package/dist/components/gb-horizontal-tabs.js +3 -3
  27. package/dist/components/gb-input-dropdown-menu-item.js +1 -1
  28. package/dist/components/gb-input-dropdown.js +1 -1
  29. package/dist/components/gb-input-field.js +2 -2
  30. package/dist/components/gb-pagination.js +15 -8
  31. package/dist/components/gb-pagination.js.map +1 -1
  32. package/dist/components/gb-rich-text.js +5 -5
  33. package/dist/components/gb-side-bar-item.js +1 -1
  34. package/dist/components/gb-sidebar.js +3 -3
  35. package/dist/components/gb-tab-button-base.js +1 -1
  36. package/dist/components/gb-tag.js +1 -1
  37. package/dist/components/gb-wysiwyg-toolbar.js +1 -1
  38. package/dist/components/{p-76a3c3f0.js → p-2118c4ab.js} +2 -2
  39. package/dist/components/{p-76a3c3f0.js.map → p-2118c4ab.js.map} +1 -1
  40. package/dist/components/{p-74c3dd24.js → p-2b1373b7.js} +2 -2
  41. package/dist/components/{p-74c3dd24.js.map → p-2b1373b7.js.map} +1 -1
  42. package/dist/components/{p-b487814d.js → p-348decbf.js} +49 -62
  43. package/dist/components/p-348decbf.js.map +1 -0
  44. package/dist/components/{p-a1275da5.js → p-4331afb5.js} +5 -5
  45. package/dist/components/{p-a1275da5.js.map → p-4331afb5.js.map} +1 -1
  46. package/dist/components/{p-158023dc.js → p-8982f495.js} +58 -18
  47. package/dist/components/p-8982f495.js.map +1 -0
  48. package/dist/components/{p-ba4c1270.js → p-8f4d38af.js} +3 -3
  49. package/dist/components/{p-ba4c1270.js.map → p-8f4d38af.js.map} +1 -1
  50. package/dist/components/{p-56c502d1.js → p-9dfa101b.js} +3 -3
  51. package/dist/components/{p-56c502d1.js.map → p-9dfa101b.js.map} +1 -1
  52. package/dist/components/{p-aac3959b.js → p-d1debf83.js} +3 -3
  53. package/dist/components/{p-aac3959b.js.map → p-d1debf83.js.map} +1 -1
  54. package/dist/components/{p-372729ba.js → p-d784bf9d.js} +2 -2
  55. package/dist/components/{p-372729ba.js.map → p-d784bf9d.js.map} +1 -1
  56. package/dist/components/{p-9980394c.js → p-fabaa8ea.js} +2 -2
  57. package/dist/components/{p-9980394c.js.map → p-fabaa8ea.js.map} +1 -1
  58. package/dist/esm/{gb-avatar_34.entry.js → gb-avatar_38.entry.js} +288 -80
  59. package/dist/esm/gb-avatar_38.entry.js.map +1 -0
  60. package/dist/esm/{gb-toast-button.entry.js → gb-progress-bar.entry.js} +13 -15
  61. package/dist/esm/gb-progress-bar.entry.js.map +1 -0
  62. package/dist/esm/globuscomponents.js +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/globuscomponents/globuscomponents.esm.js +1 -1
  65. package/dist/globuscomponents/globuscomponents.esm.js.map +1 -1
  66. package/dist/globuscomponents/p-263a83c6.entry.js +2 -0
  67. package/dist/globuscomponents/p-263a83c6.entry.js.map +1 -0
  68. package/dist/globuscomponents/{p-c771ac70.entry.js → p-f32007ec.entry.js} +2 -2
  69. package/dist/globuscomponents/p-f32007ec.entry.js.map +1 -0
  70. package/dist/types/components/gb-avatar/gb-avatar.d.ts +4 -0
  71. package/dist/types/components/gb-input-dropdown/gb-input-dropdown.d.ts +2 -4
  72. package/dist/types/components/gb-pagination/gb-pagination.d.ts +3 -1
  73. package/dist/types/components/gb-tag/gb-tag.d.ts +1 -1
  74. package/dist/types/components.d.ts +6 -22
  75. package/package.json +1 -1
  76. package/dist/cjs/gb-avatar-label-group.cjs.entry.js +0 -104
  77. package/dist/cjs/gb-avatar-label-group.cjs.entry.js.map +0 -1
  78. package/dist/cjs/gb-avatar_34.cjs.entry.js.map +0 -1
  79. package/dist/cjs/gb-button-close_2.cjs.entry.js +0 -43
  80. package/dist/cjs/gb-button-close_2.cjs.entry.js.map +0 -1
  81. package/dist/cjs/gb-toast-button.cjs.entry.js.map +0 -1
  82. package/dist/cjs/gb-toast.cjs.entry.js +0 -57
  83. package/dist/cjs/gb-toast.cjs.entry.js.map +0 -1
  84. package/dist/components/p-158023dc.js.map +0 -1
  85. package/dist/components/p-b487814d.js.map +0 -1
  86. package/dist/esm/gb-avatar-label-group.entry.js +0 -100
  87. package/dist/esm/gb-avatar-label-group.entry.js.map +0 -1
  88. package/dist/esm/gb-avatar_34.entry.js.map +0 -1
  89. package/dist/esm/gb-button-close_2.entry.js +0 -38
  90. package/dist/esm/gb-button-close_2.entry.js.map +0 -1
  91. package/dist/esm/gb-toast-button.entry.js.map +0 -1
  92. package/dist/esm/gb-toast.entry.js +0 -53
  93. package/dist/esm/gb-toast.entry.js.map +0 -1
  94. package/dist/globuscomponents/p-3f2bb288.entry.js +0 -2
  95. package/dist/globuscomponents/p-3f2bb288.entry.js.map +0 -1
  96. package/dist/globuscomponents/p-5aa666cf.entry.js +0 -2
  97. package/dist/globuscomponents/p-5aa666cf.entry.js.map +0 -1
  98. package/dist/globuscomponents/p-b73848e7.entry.js +0 -2
  99. package/dist/globuscomponents/p-b73848e7.entry.js.map +0 -1
  100. package/dist/globuscomponents/p-b90e0cff.entry.js +0 -2
  101. package/dist/globuscomponents/p-b90e0cff.entry.js.map +0 -1
  102. package/dist/globuscomponents/p-c771ac70.entry.js.map +0 -1
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy(JSON.parse("[[\"gb-avatar_34.cjs\",[[1,\"gb-pagination\",{\"type\":[1],\"shape\":[1],\"breakpoint\":[1],\"currentPage\":[1026,\"current-page\"],\"totalPages\":[1026,\"total-pages\"],\"entries\":[1040]}],[1,\"gb-input-field\",{\"size\":[1],\"type\":[1],\"destructive\":[4],\"state\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"],\"errorText\":[1,\"error-text\"],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showHelpIcon\":[4,\"show-help-icon\"],\"showValidation\":[4,\"show-validation\"],\"iconSwap\":[1,\"icon-swap\"],\"showCloseButton\":[4,\"show-close-button\"],\"options\":[1040],\"inputValue\":[32],\"tags\":[32],\"leadingIconSvg\":[32],\"isPasswordVisible\":[32],\"showDropdown\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleClickOutside\"]],{\"options\":[\"optionsChanged\"]}],[1,\"gb-sidebar\",{\"state\":[1025],\"category\":[1],\"showSecondCategory\":[4,\"show-second-category\"],\"applicationName\":[1,\"application-name\"],\"firstItemIcon\":[1,\"first-item-icon\"],\"secondItemIcon\":[1,\"second-item-icon\"],\"thirdItemIcon\":[1,\"third-item-icon\"],\"fourthItemIcon\":[1,\"fourth-item-icon\"],\"fifthItemIcon\":[1,\"fifth-item-icon\"],\"sixthItemIcon\":[1,\"sixth-item-icon\"],\"seventhItemIcon\":[1,\"seventh-item-icon\"],\"eighthItemIcon\":[1,\"eighth-item-icon\"],\"ninthItemIcon\":[1,\"ninth-item-icon\"],\"tenthItemIcon\":[1,\"tenth-item-icon\"],\"iconInstance\":[1,\"icon-instance\"],\"label\":[1],\"firstItemLabel\":[1,\"first-item-label\"],\"secondItemLabel\":[1,\"second-item-label\"],\"thirdItemLabel\":[1,\"third-item-label\"],\"fourthItemLabel\":[1,\"fourth-item-label\"],\"fifthItemLabel\":[1,\"fifth-item-label\"],\"sixthItemLabel\":[1,\"sixth-item-label\"],\"seventhItemLabel\":[1,\"seventh-item-label\"],\"eighthItemLabel\":[1,\"eighth-item-label\"],\"ninthItemLabel\":[1,\"ninth-item-label\"],\"tenthItemLabel\":[1,\"tenth-item-label\"],\"activeIndex\":[1026,\"active-index\"],\"leadingIconSvg\":[32],\"sideBarItemClicked\":[64]}],[1,\"gb-horizontal-tabs\",{\"type\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"firstTabName\":[1,\"first-tab-name\"],\"secondTabName\":[1,\"second-tab-name\"],\"thirdTabName\":[1,\"third-tab-name\"],\"fourthTabName\":[1,\"fourth-tab-name\"],\"fifthTabName\":[1,\"fifth-tab-name\"],\"sixthTabName\":[1,\"sixth-tab-name\"],\"seventhTabName\":[1,\"seventh-tab-name\"],\"eighthTabName\":[1,\"eighth-tab-name\"],\"ninthTabName\":[1,\"ninth-tab-name\"],\"tenthTabName\":[1,\"tenth-tab-name\"],\"eleventhTabName\":[1,\"eleventh-tab-name\"],\"twelfthTabName\":[1,\"twelfth-tab-name\"],\"thirteenthTabName\":[1,\"thirteenth-tab-name\"],\"fourteenthTabName\":[1,\"fourteenth-tab-name\"],\"fifteenthTabName\":[1,\"fifteenth-tab-name\"],\"sixteenthTabName\":[1,\"sixteenth-tab-name\"],\"seventeenthTabName\":[1,\"seventeenth-tab-name\"],\"eighteenthTabName\":[1,\"eighteenth-tab-name\"],\"nineteenthTabName\":[1,\"nineteenth-tab-name\"],\"twentiethTabName\":[1,\"twentieth-tab-name\"],\"activeIndex\":[1026,\"active-index\"]}],[1,\"gb-header\",{\"state\":[1],\"showIndicator\":[4,\"show-indicator\"],\"text\":[4],\"placeholder\":[4],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"onNavBarItemClicked\":[64]}],[1,\"gb-notification-pane\",{\"state\":[1],\"notifications\":[16],\"icon\":[1],\"label\":[1],\"time\":[1],\"supportingText\":[1,\"supporting-text\"]}],[0,\"gb-carousel-arrow\",{\"size\":[1],\"chevron\":[1]}],[1,\"gb-pagination-button-group-base\",{\"icon\":[1],\"iconLeading\":[1,\"icon-leading\"],\"iconTrailing\":[1,\"icon-trailing\"]}],[0,\"gb-pagination-dot-indicator\",{\"current\":[4],\"type\":[1],\"size\":[1]}],[1,\"gb-side-bar-item\",{\"state\":[1],\"type\":[1],\"label\":[1],\"icon\":[1],\"category\":[1],\"showArrow\":[4,\"show-arrow\"],\"showBadge\":[4,\"show-badge\"],\"showTooltip\":[1028,\"show-tooltip\"],\"leadingIconSvg\":[32],\"textState\":[32]}],[1,\"gb-tab-button-base\",{\"current\":[4],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"badge\":[4],\"type\":[1],\"tabName\":[1,\"tab-name\"]}],[1,\"gb-password-button\",{\"state\":[1],\"isPasswordVisible\":[32]}],[1,\"gb-collapse-button\",{\"color\":[1],\"isCollapsed\":[1028,\"is-collapsed\"],\"action\":[1025],\"isHovered\":[1028,\"is-hovered\"],\"collapseSidebar\":[64],\"expandSidebar\":[64]}],[1,\"gb-header-icon\",{\"state\":[1],\"showIndicator\":[4,\"show-indicator\"],\"icon\":[1]}],[1,\"gb-notification-content\",{\"icon\":[1],\"label\":[1],\"time\":[1],\"supportingText\":[1,\"supporting-text\"]}],[1,\"gb-pagination-number-base\",{\"shape\":[1],\"state\":[1]}],[1,\"gb-toggle-base\",{\"size\":[1],\"state\":[1],\"pressed\":[1028]}],[4,\"gb-btn\",{\"size\":[1],\"hierarchy\":[1],\"icon\":[1],\"destructive\":[4],\"state\":[1],\"iconLeading\":[4,\"icon-leading\"],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailing\":[4,\"icon-trailing\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"leadingIconSvg\":[32],\"trailingIconSvg\":[32]}],[1,\"gb-input-dropdown\",{\"type\":[1],\"state\":[1025],\"size\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"placeholder\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"],\"showHelpIcon\":[4,\"show-help-icon\"],\"showLeadingIcon\":[4,\"show-leading-icon\"],\"iconSwap\":[1,\"icon-swap\"],\"text\":[4],\"leadingIcon\":[1,\"leading-icon\"],\"icon\":[1],\"items\":[1040],\"supportingText\":[4,\"supporting-text\"],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"menuPosition\":[1,\"menu-position\"],\"leadingIconSvg\":[32],\"dropdownOpen\":[32],\"selectedItems\":[32],\"unselectedItems\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleClickOutside\"]]],[1,\"gb-tag\",{\"size\":[1],\"icon\":[1],\"action\":[1],\"flagSwap\":[1,\"flag-swap\"],\"checkbox\":[4],\"onTagClose\":[64]}],[1,\"gb-badge\",{\"size\":[1],\"icon\":[1],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"flagSwap\":[1,\"flag-swap\"],\"color\":[1],\"type\":[1],\"closeButton\":[4,\"close-button\"],\"leadingIconContent\":[32],\"trailingIconContent\":[32]}],[1,\"gb-input-dropdown-menu-item\",{\"type\":[1],\"supportingText\":[4,\"supporting-text\"],\"selected\":[1028],\"state\":[1],\"color\":[1]}],[1,\"gb-help-tooltip\",{\"showArrow\":[4,\"show-arrow\"],\"showSupportingText\":[4,\"show-supporting-text\"],\"showHelpTooltip\":[32]}],[1,\"gb-badge-close\",{\"color\":[1],\"type\":[1]}],[1,\"gb-tag-checkbox\",{\"checked\":[4],\"size\":[1],\"disabled\":[4]}],[1,\"gb-tag-close\",{\"size\":[1]}],[1,\"gb-tag-count\",{\"size\":[1]}],[1,\"gb-button\",{\"size\":[1],\"hierarchy\":[1],\"icon\":[1],\"destructive\":[4],\"state\":[1],\"iconLeading\":[4,\"icon-leading\"],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailing\":[4,\"icon-trailing\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"leadingIconSvg\":[32],\"trailingIconSvg\":[32]}],[1,\"gb-checkbox\",{\"checked\":[4],\"indeterminate\":[4],\"size\":[1],\"type\":[1],\"state\":[1],\"text\":[4],\"supportingText\":[4,\"supporting-text\"]}],[1,\"gb-checkbox-base\",{\"state\":[1025],\"size\":[1],\"type\":[1],\"checked\":[1028],\"indeterminate\":[1028]}],[1,\"gb-tooltip\",{\"showArrow\":[4,\"show-arrow\"],\"arrow\":[1],\"showSupportingText\":[4,\"show-supporting-text\"]}],[1,\"gb-avatar\",{\"size\":[1],\"placeholder\":[4],\"text\":[4],\"statusIcon\":[1,\"status-icon\"],\"state\":[1],\"icon\":[1],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"weight\":[1]}],[1,\"gb-avatar-contrast-inner-border\",{\"weight\":[1],\"size\":[1],\"showBorder\":[4,\"show-border\"]}],[1,\"gb-status-indicator\",{\"statusIcon\":[1,\"status-icon\"],\"size\":[1],\"state\":[1],\"indicatorStateClass\":[1,\"indicator-state-class\"]}]]],[\"gb-rich-text.cjs\",[[1,\"gb-rich-text\",{\"state\":[1],\"destructive\":[4],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-avatar-dropdown.cjs\",[[1,\"gb-avatar-dropdown\",{\"type\":[1],\"text\":[4],\"showProfile\":[4,\"show-profile\"],\"showDarkTheme\":[4,\"show-dark-theme\"],\"showLogOut\":[4,\"show-log-out\"],\"listGroupOne\":[4,\"list-group-one\"],\"listGroupTwo\":[4,\"list-group-two\"],\"listGroupThree\":[4,\"list-group-three\"],\"color\":[1],\"showBorder\":[4,\"show-border\"]}]]],[\"gb-checkbox-group.cjs\",[[1,\"gb-checkbox-group\",{\"size\":[1],\"breakpoint\":[1],\"icon\":[1],\"selected\":[4],\"type\":[1]}]]],[\"gb-avatar-group.cjs\",[[1,\"gb-avatar-group\",{\"size\":[1],\"moreUsers\":[4,\"more-users\"],\"addMoreButton\":[4,\"add-more-button\"],\"text\":[4],\"state\":[1],\"images\":[16]}]]],[\"gb-file-upload.cjs\",[[1,\"gb-file-upload\",{\"icon\":[1],\"type\":[1],\"heightSize\":[1,\"height-size\"],\"state\":[1],\"destructive\":[4],\"showLabel\":[4,\"show-label\"]}]]],[\"gb-avatar-profile-photo.cjs\",[[1,\"gb-avatar-profile-photo\",{\"placeholder\":[4],\"text\":[4],\"size\":[1],\"verified\":[4],\"icon\":[1]}]]],[\"gb-export-dropdown.cjs\",[[1,\"gb-export-dropdown\",{\"state\":[1],\"showFirstSubDropdown\":[32],\"showSecondSubDropdown\":[32]}]]],[\"gb-help-dropdown.cjs\",[[1,\"gb-help-dropdown\",{\"showLogError\":[4,\"show-log-error\"],\"onHelpItemClicked\":[64]}]]],[\"gb-toast.cjs\",[[1,\"gb-toast\",{\"color\":[1],\"size\":[1],\"breakpoint\":[1],\"xCloseButton\":[4,\"x-close-button\"],\"actions\":[4],\"showSupportingText\":[4,\"show-supporting-text\"]}]]],[\"gb-control-handle.cjs\",[[1,\"gb-control-handle\",{\"value\":[2],\"type\":[1],\"isHovered\":[32],\"isFocused\":[32]}]]],[\"gb-toggle.cjs\",[[1,\"gb-toggle\",{\"size\":[1],\"state\":[1],\"supportingText\":[4,\"supporting-text\"],\"pressed\":[4]}]]],[\"gb-token-field.cjs\",[[1,\"gb-token-field\",{\"size\":[1],\"digits\":[2],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showSupportingText\":[4,\"show-supporting-text\"],\"supportingText\":[1,\"supporting-text\"]}]]],[\"gb-verification-code-field.cjs\",[[1,\"gb-verification-code-field\",{\"size\":[1],\"digits\":[2],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-wysiwyg-tooltip.cjs\",[[1,\"gb-wysiwyg-tooltip\",{\"arrow\":[1],\"breakpoint\":[1]}]]],[\"gb-file-type-icon.cjs\",[[1,\"gb-file-type-icon\"]]],[\"gb-progress-circle.cjs\",[[1,\"gb-progress-circle\",{\"size\":[1],\"shape\":[1],\"label\":[4],\"progress\":[2]},null,{\"progress\":[\"handleProgressChange\"]}]]],[\"gb-scrollbar.cjs\",[[1,\"gb-scrollbar\",{\"length\":[1]}]]],[\"gb-slider.cjs\",[[1,\"gb-slider\",{\"min\":[2],\"max\":[2],\"thumbType\":[1,\"thumb-type\"],\"leftValue\":[32],\"rightValue\":[32]}]]],[\"gb-textarea-input-field.cjs\",[[1,\"gb-textarea-input-field\",{\"type\":[1],\"destructive\":[4],\"state\":[1],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-wysiwyg-toolbar.cjs\",[[1,\"gb-wysiwyg-toolbar\",{\"breakpoint\":[1],\"fontSelector\":[4,\"font-selector\"],\"bold\":[4],\"italic\":[4],\"h1\":[4,\"h-1\"],\"h2\":[4,\"h-2\"],\"quote\":[4],\"link\":[4],\"image\":[4],\"bulletList\":[4,\"bullet-list\"],\"numberList\":[4,\"number-list\"]}]]],[\"gb-checkbox-group-item.cjs\",[[1,\"gb-checkbox-group-item\",{\"size\":[1],\"type\":[1],\"state\":[1],\"breakpoint\":[1],\"showCost\":[4,\"show-cost\"],\"selected\":[1028]}]]],[\"gb-file-upload-item-base.cjs\",[[1,\"gb-file-upload-item-base\",{\"icon\":[1],\"state\":[1],\"heightSize\":[1,\"height-size\"],\"fileType\":[1,\"file-type\"],\"buttonState\":[1,\"button-state\"]}]]],[\"gb-avatar-label-group.cjs\",[[1,\"gb-avatar-label-group\",{\"size\":[1],\"statusIcon\":[1,\"status-icon\"],\"state\":[1],\"placeholder\":[4],\"text\":[4],\"color\":[1],\"showBorder\":[4,\"show-border\"]}]]],[\"gb-avatar-add-button.cjs\",[[1,\"gb-avatar-add-button\",{\"size\":[1],\"showToolTip\":[1028,\"show-tool-tip\"],\"state\":[1],\"el\":[16]}]]],[\"gb-toast-button.cjs\",[[1,\"gb-toast-button\",{\"state\":[1],\"color\":[1]}]]],[\"gb-dropdown-items-with-shortcut.cjs\",[[1,\"gb-dropdown-items-with-shortcut\",{\"icon\":[4],\"iconSrc\":[1,\"icon-src\"],\"checkbox\":[4],\"shortcut\":[4],\"shortcutIcon\":[1,\"shortcut-icon\"],\"label\":[1],\"state\":[1]}]]],[\"gb-export-sub-dropdown-item.cjs\",[[1,\"gb-export-sub-dropdown-item\",{\"icon\":[1],\"state\":[1],\"leadingIconSvg\":[32]}]]],[\"gb-export-dropdown-item_2.cjs\",[[1,\"gb-export-sub-dropdown\"],[1,\"gb-export-dropdown-item\",{\"icon\":[4],\"state\":[1],\"type\":[1]}]]],[\"gb-megainput-field.cjs\",[[1,\"gb-megainput-field\",{\"size\":[1],\"state\":[1],\"inputValue\":[32]}]]],[\"gb-wysiwyg-editor-icon.cjs\",[[1,\"gb-wysiwyg-editor-icon\",{\"active\":[4],\"type\":[1],\"state\":[1]}]]],[\"gb-button-close_2.cjs\",[[1,\"gb-progress-bar\",{\"progress\":[2],\"showLabel\":[4,\"show-label\"],\"labelPosition\":[1,\"label-position\"],\"el\":[16]}],[1,\"gb-button-close\",{\"size\":[1],\"color\":[1]}]]]]"), options);
11
+ return index.bootstrapLazy(JSON.parse("[[\"gb-avatar_38.cjs\",[[1,\"gb-pagination\",{\"type\":[1],\"shape\":[1],\"breakpoint\":[1],\"currentPage\":[1026,\"current-page\"],\"totalPages\":[1026,\"total-pages\"],\"entries\":[1040],\"selectedPageSize\":[32]}],[1,\"gb-input-field\",{\"size\":[1],\"type\":[1],\"destructive\":[4],\"state\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"],\"errorText\":[1,\"error-text\"],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showHelpIcon\":[4,\"show-help-icon\"],\"showValidation\":[4,\"show-validation\"],\"iconSwap\":[1,\"icon-swap\"],\"showCloseButton\":[4,\"show-close-button\"],\"options\":[1040],\"inputValue\":[32],\"tags\":[32],\"leadingIconSvg\":[32],\"isPasswordVisible\":[32],\"showDropdown\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleClickOutside\"]],{\"options\":[\"optionsChanged\"]}],[1,\"gb-sidebar\",{\"state\":[1025],\"category\":[1],\"showSecondCategory\":[4,\"show-second-category\"],\"applicationName\":[1,\"application-name\"],\"firstItemIcon\":[1,\"first-item-icon\"],\"secondItemIcon\":[1,\"second-item-icon\"],\"thirdItemIcon\":[1,\"third-item-icon\"],\"fourthItemIcon\":[1,\"fourth-item-icon\"],\"fifthItemIcon\":[1,\"fifth-item-icon\"],\"sixthItemIcon\":[1,\"sixth-item-icon\"],\"seventhItemIcon\":[1,\"seventh-item-icon\"],\"eighthItemIcon\":[1,\"eighth-item-icon\"],\"ninthItemIcon\":[1,\"ninth-item-icon\"],\"tenthItemIcon\":[1,\"tenth-item-icon\"],\"iconInstance\":[1,\"icon-instance\"],\"label\":[1],\"firstItemLabel\":[1,\"first-item-label\"],\"secondItemLabel\":[1,\"second-item-label\"],\"thirdItemLabel\":[1,\"third-item-label\"],\"fourthItemLabel\":[1,\"fourth-item-label\"],\"fifthItemLabel\":[1,\"fifth-item-label\"],\"sixthItemLabel\":[1,\"sixth-item-label\"],\"seventhItemLabel\":[1,\"seventh-item-label\"],\"eighthItemLabel\":[1,\"eighth-item-label\"],\"ninthItemLabel\":[1,\"ninth-item-label\"],\"tenthItemLabel\":[1,\"tenth-item-label\"],\"activeIndex\":[1026,\"active-index\"],\"leadingIconSvg\":[32],\"sideBarItemClicked\":[64]}],[1,\"gb-horizontal-tabs\",{\"type\":[1],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"firstTabName\":[1,\"first-tab-name\"],\"secondTabName\":[1,\"second-tab-name\"],\"thirdTabName\":[1,\"third-tab-name\"],\"fourthTabName\":[1,\"fourth-tab-name\"],\"fifthTabName\":[1,\"fifth-tab-name\"],\"sixthTabName\":[1,\"sixth-tab-name\"],\"seventhTabName\":[1,\"seventh-tab-name\"],\"eighthTabName\":[1,\"eighth-tab-name\"],\"ninthTabName\":[1,\"ninth-tab-name\"],\"tenthTabName\":[1,\"tenth-tab-name\"],\"eleventhTabName\":[1,\"eleventh-tab-name\"],\"twelfthTabName\":[1,\"twelfth-tab-name\"],\"thirteenthTabName\":[1,\"thirteenth-tab-name\"],\"fourteenthTabName\":[1,\"fourteenth-tab-name\"],\"fifteenthTabName\":[1,\"fifteenth-tab-name\"],\"sixteenthTabName\":[1,\"sixteenth-tab-name\"],\"seventeenthTabName\":[1,\"seventeenth-tab-name\"],\"eighteenthTabName\":[1,\"eighteenth-tab-name\"],\"nineteenthTabName\":[1,\"nineteenth-tab-name\"],\"twentiethTabName\":[1,\"twentieth-tab-name\"],\"activeIndex\":[1026,\"active-index\"]}],[1,\"gb-header\",{\"state\":[1],\"showIndicator\":[4,\"show-indicator\"],\"text\":[4],\"placeholder\":[4],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"onNavBarItemClicked\":[64]}],[1,\"gb-toast\",{\"color\":[1],\"size\":[1],\"breakpoint\":[1],\"xCloseButton\":[4,\"x-close-button\"],\"actions\":[4],\"showSupportingText\":[4,\"show-supporting-text\"]}],[1,\"gb-notification-pane\",{\"state\":[1],\"notifications\":[16],\"icon\":[1],\"label\":[1],\"time\":[1],\"supportingText\":[1,\"supporting-text\"]}],[0,\"gb-carousel-arrow\",{\"size\":[1],\"chevron\":[1]}],[1,\"gb-pagination-button-group-base\",{\"icon\":[1],\"iconLeading\":[1,\"icon-leading\"],\"iconTrailing\":[1,\"icon-trailing\"]}],[0,\"gb-pagination-dot-indicator\",{\"current\":[4],\"type\":[1],\"size\":[1]}],[1,\"gb-side-bar-item\",{\"state\":[1],\"type\":[1],\"label\":[1],\"icon\":[1],\"category\":[1],\"showArrow\":[4,\"show-arrow\"],\"showBadge\":[4,\"show-badge\"],\"showTooltip\":[1028,\"show-tooltip\"],\"leadingIconSvg\":[32],\"textState\":[32]}],[1,\"gb-tab-button-base\",{\"current\":[4],\"size\":[1],\"fullWidth\":[4,\"full-width\"],\"badge\":[4],\"type\":[1],\"tabName\":[1,\"tab-name\"]}],[1,\"gb-avatar-label-group\",{\"size\":[1],\"statusIcon\":[1,\"status-icon\"],\"state\":[1],\"placeholder\":[4],\"text\":[4],\"color\":[1],\"showBorder\":[4,\"show-border\"]}],[1,\"gb-password-button\",{\"state\":[1],\"isPasswordVisible\":[32]}],[1,\"gb-collapse-button\",{\"color\":[1],\"isCollapsed\":[1028,\"is-collapsed\"],\"action\":[1025],\"isHovered\":[1028,\"is-hovered\"],\"collapseSidebar\":[64],\"expandSidebar\":[64]}],[1,\"gb-header-icon\",{\"state\":[1],\"showIndicator\":[4,\"show-indicator\"],\"icon\":[1]}],[1,\"gb-notification-content\",{\"icon\":[1],\"label\":[1],\"time\":[1],\"supportingText\":[1,\"supporting-text\"]}],[1,\"gb-pagination-number-base\",{\"shape\":[1],\"state\":[1]}],[1,\"gb-toast-button\",{\"state\":[1],\"color\":[1]}],[1,\"gb-toggle-base\",{\"size\":[1],\"state\":[1],\"pressed\":[1028]}],[4,\"gb-btn\",{\"size\":[1],\"hierarchy\":[1],\"icon\":[1],\"destructive\":[4],\"state\":[1],\"iconLeading\":[4,\"icon-leading\"],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailing\":[4,\"icon-trailing\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"leadingIconSvg\":[32],\"trailingIconSvg\":[32]}],[1,\"gb-input-dropdown\",{\"type\":[1],\"state\":[1025],\"size\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"placeholder\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"],\"showHelpIcon\":[4,\"show-help-icon\"],\"showLeadingIcon\":[4,\"show-leading-icon\"],\"iconSwap\":[1,\"icon-swap\"],\"text\":[4],\"leadingIcon\":[1,\"leading-icon\"],\"icon\":[1],\"items\":[1040],\"supportingText\":[4,\"supporting-text\"],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"menuPosition\":[1,\"menu-position\"],\"leadingIconSvg\":[32],\"dropdownOpen\":[32],\"selectedItems\":[32],\"unselectedItems\":[32],\"selectedItem\":[32]},[[4,\"click\",\"handleClickOutside\"]]],[1,\"gb-button-close\",{\"size\":[1],\"color\":[1]}],[1,\"gb-tag\",{\"size\":[1],\"icon\":[1],\"action\":[1],\"flagSwap\":[1,\"flag-swap\"],\"checkbox\":[4],\"onTagClose\":[64]}],[1,\"gb-badge\",{\"size\":[1],\"icon\":[1],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"flagSwap\":[1,\"flag-swap\"],\"color\":[1],\"type\":[1],\"closeButton\":[4,\"close-button\"],\"leadingIconContent\":[32],\"trailingIconContent\":[32]}],[1,\"gb-input-dropdown-menu-item\",{\"type\":[1],\"supportingText\":[4,\"supporting-text\"],\"selected\":[1028],\"state\":[1],\"color\":[1]}],[1,\"gb-help-tooltip\",{\"showArrow\":[4,\"show-arrow\"],\"showSupportingText\":[4,\"show-supporting-text\"],\"showHelpTooltip\":[32]}],[1,\"gb-badge-close\",{\"color\":[1],\"type\":[1]}],[1,\"gb-tag-checkbox\",{\"checked\":[4],\"size\":[1],\"disabled\":[4]}],[1,\"gb-tag-close\",{\"size\":[1]}],[1,\"gb-tag-count\",{\"size\":[1]}],[1,\"gb-button\",{\"size\":[1],\"hierarchy\":[1],\"icon\":[1],\"destructive\":[4],\"state\":[1],\"iconLeading\":[4,\"icon-leading\"],\"iconLeadingSwap\":[1,\"icon-leading-swap\"],\"iconTrailing\":[4,\"icon-trailing\"],\"iconTrailingSwap\":[1,\"icon-trailing-swap\"],\"leadingIconSvg\":[32],\"trailingIconSvg\":[32]}],[1,\"gb-checkbox\",{\"checked\":[4],\"indeterminate\":[4],\"size\":[1],\"type\":[1],\"state\":[1],\"text\":[4],\"supportingText\":[4,\"supporting-text\"]}],[1,\"gb-checkbox-base\",{\"state\":[1025],\"size\":[1],\"type\":[1],\"checked\":[1028],\"indeterminate\":[1028]}],[1,\"gb-tooltip\",{\"showArrow\":[4,\"show-arrow\"],\"arrow\":[1],\"showSupportingText\":[4,\"show-supporting-text\"]}],[1,\"gb-avatar\",{\"size\":[1],\"placeholder\":[4],\"text\":[4],\"statusIcon\":[1,\"status-icon\"],\"state\":[1],\"icon\":[1],\"color\":[1],\"showBorder\":[4,\"show-border\"],\"weight\":[1],\"assignedColorClass\":[32]}],[1,\"gb-avatar-contrast-inner-border\",{\"weight\":[1],\"size\":[1],\"showBorder\":[4,\"show-border\"]}],[1,\"gb-status-indicator\",{\"statusIcon\":[1,\"status-icon\"],\"size\":[1],\"state\":[1],\"indicatorStateClass\":[1,\"indicator-state-class\"]}]]],[\"gb-rich-text.cjs\",[[1,\"gb-rich-text\",{\"state\":[1],\"destructive\":[4],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-avatar-dropdown.cjs\",[[1,\"gb-avatar-dropdown\",{\"type\":[1],\"text\":[4],\"showProfile\":[4,\"show-profile\"],\"showDarkTheme\":[4,\"show-dark-theme\"],\"showLogOut\":[4,\"show-log-out\"],\"listGroupOne\":[4,\"list-group-one\"],\"listGroupTwo\":[4,\"list-group-two\"],\"listGroupThree\":[4,\"list-group-three\"],\"color\":[1],\"showBorder\":[4,\"show-border\"]}]]],[\"gb-checkbox-group.cjs\",[[1,\"gb-checkbox-group\",{\"size\":[1],\"breakpoint\":[1],\"icon\":[1],\"selected\":[4],\"type\":[1]}]]],[\"gb-avatar-group.cjs\",[[1,\"gb-avatar-group\",{\"size\":[1],\"moreUsers\":[4,\"more-users\"],\"addMoreButton\":[4,\"add-more-button\"],\"text\":[4],\"state\":[1],\"images\":[16]}]]],[\"gb-file-upload.cjs\",[[1,\"gb-file-upload\",{\"icon\":[1],\"type\":[1],\"heightSize\":[1,\"height-size\"],\"state\":[1],\"destructive\":[4],\"showLabel\":[4,\"show-label\"]}]]],[\"gb-avatar-profile-photo.cjs\",[[1,\"gb-avatar-profile-photo\",{\"placeholder\":[4],\"text\":[4],\"size\":[1],\"verified\":[4],\"icon\":[1]}]]],[\"gb-export-dropdown.cjs\",[[1,\"gb-export-dropdown\",{\"state\":[1],\"showFirstSubDropdown\":[32],\"showSecondSubDropdown\":[32]}]]],[\"gb-help-dropdown.cjs\",[[1,\"gb-help-dropdown\",{\"showLogError\":[4,\"show-log-error\"],\"onHelpItemClicked\":[64]}]]],[\"gb-control-handle.cjs\",[[1,\"gb-control-handle\",{\"value\":[2],\"type\":[1],\"isHovered\":[32],\"isFocused\":[32]}]]],[\"gb-toggle.cjs\",[[1,\"gb-toggle\",{\"size\":[1],\"state\":[1],\"supportingText\":[4,\"supporting-text\"],\"pressed\":[4]}]]],[\"gb-token-field.cjs\",[[1,\"gb-token-field\",{\"size\":[1],\"digits\":[2],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showSupportingText\":[4,\"show-supporting-text\"],\"supportingText\":[1,\"supporting-text\"]}]]],[\"gb-verification-code-field.cjs\",[[1,\"gb-verification-code-field\",{\"size\":[1],\"digits\":[2],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-wysiwyg-tooltip.cjs\",[[1,\"gb-wysiwyg-tooltip\",{\"arrow\":[1],\"breakpoint\":[1]}]]],[\"gb-file-type-icon.cjs\",[[1,\"gb-file-type-icon\"]]],[\"gb-progress-circle.cjs\",[[1,\"gb-progress-circle\",{\"size\":[1],\"shape\":[1],\"label\":[4],\"progress\":[2]},null,{\"progress\":[\"handleProgressChange\"]}]]],[\"gb-scrollbar.cjs\",[[1,\"gb-scrollbar\",{\"length\":[1]}]]],[\"gb-slider.cjs\",[[1,\"gb-slider\",{\"min\":[2],\"max\":[2],\"thumbType\":[1,\"thumb-type\"],\"leftValue\":[32],\"rightValue\":[32]}]]],[\"gb-textarea-input-field.cjs\",[[1,\"gb-textarea-input-field\",{\"type\":[1],\"destructive\":[4],\"state\":[1],\"showPlaceholder\":[4,\"show-placeholder\"],\"placeholder\":[1],\"showLabel\":[4,\"show-label\"],\"label\":[1],\"showHintText\":[4,\"show-hint-text\"],\"hintText\":[1,\"hint-text\"]}]]],[\"gb-wysiwyg-toolbar.cjs\",[[1,\"gb-wysiwyg-toolbar\",{\"breakpoint\":[1],\"fontSelector\":[4,\"font-selector\"],\"bold\":[4],\"italic\":[4],\"h1\":[4,\"h-1\"],\"h2\":[4,\"h-2\"],\"quote\":[4],\"link\":[4],\"image\":[4],\"bulletList\":[4,\"bullet-list\"],\"numberList\":[4,\"number-list\"]}]]],[\"gb-checkbox-group-item.cjs\",[[1,\"gb-checkbox-group-item\",{\"size\":[1],\"type\":[1],\"state\":[1],\"breakpoint\":[1],\"showCost\":[4,\"show-cost\"],\"selected\":[1028]}]]],[\"gb-file-upload-item-base.cjs\",[[1,\"gb-file-upload-item-base\",{\"icon\":[1],\"state\":[1],\"heightSize\":[1,\"height-size\"],\"fileType\":[1,\"file-type\"],\"buttonState\":[1,\"button-state\"]}]]],[\"gb-avatar-add-button.cjs\",[[1,\"gb-avatar-add-button\",{\"size\":[1],\"showToolTip\":[1028,\"show-tool-tip\"],\"state\":[1],\"el\":[16]}]]],[\"gb-dropdown-items-with-shortcut.cjs\",[[1,\"gb-dropdown-items-with-shortcut\",{\"icon\":[4],\"iconSrc\":[1,\"icon-src\"],\"checkbox\":[4],\"shortcut\":[4],\"shortcutIcon\":[1,\"shortcut-icon\"],\"label\":[1],\"state\":[1]}]]],[\"gb-progress-bar.cjs\",[[1,\"gb-progress-bar\",{\"progress\":[2],\"showLabel\":[4,\"show-label\"],\"labelPosition\":[1,\"label-position\"],\"el\":[16]}]]],[\"gb-export-sub-dropdown-item.cjs\",[[1,\"gb-export-sub-dropdown-item\",{\"icon\":[1],\"state\":[1],\"leadingIconSvg\":[32]}]]],[\"gb-export-dropdown-item_2.cjs\",[[1,\"gb-export-sub-dropdown\"],[1,\"gb-export-dropdown-item\",{\"icon\":[4],\"state\":[1],\"type\":[1]}]]],[\"gb-megainput-field.cjs\",[[1,\"gb-megainput-field\",{\"size\":[1],\"state\":[1],\"inputValue\":[32]}]]],[\"gb-wysiwyg-editor-icon.cjs\",[[1,\"gb-wysiwyg-editor-icon\",{\"active\":[4],\"type\":[1],\"state\":[1]}]]]]"), options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,6 +2,15 @@ import { h } from "@stencil/core";
2
2
  import { BorderWeights, OnlineIndicatorStates } from "../../models/reusableModels";
3
3
  export class GbAvatar {
4
4
  constructor() {
5
+ this.colorClasses = [
6
+ 'gray', // Red
7
+ 'blue', // Green
8
+ 'cyan', // Blue
9
+ 'green', // Pink
10
+ 'purple', // Yellow
11
+ 'pink', // Purple
12
+ 'yellow', // Teal
13
+ ];
5
14
  this.size = undefined;
6
15
  this.placeholder = false;
7
16
  this.text = true;
@@ -11,16 +20,24 @@ export class GbAvatar {
11
20
  this.color = undefined;
12
21
  this.showBorder = false;
13
22
  this.weight = BorderWeights.Light;
23
+ this.assignedColorClass = undefined;
14
24
  }
15
25
  getInitialsSize() {
16
26
  switch (this.size) {
17
- case 'xl2': return 'display-xs-semi-bold';
18
- case 'xl': return 'text-xl-semi-bold';
19
- case 'lg': return 'text-lg-semi-bold';
20
- case 'md': return 'text-md-semi-bold';
21
- case 'sm': return 'text-sm-semi-bold';
22
- case 'xs': return 'text-xs-semi-bold';
23
- case 'xxs': return 'text-xxs-semi-bold';
27
+ case 'xl2':
28
+ return 'display-xs-semi-bold';
29
+ case 'xl':
30
+ return 'text-xl-semi-bold';
31
+ case 'lg':
32
+ return 'text-lg-semi-bold';
33
+ case 'md':
34
+ return 'text-md-semi-bold';
35
+ case 'sm':
36
+ return 'text-sm-semi-bold';
37
+ case 'xs':
38
+ return 'text-xs-semi-bold';
39
+ case 'xxs':
40
+ return 'text-xxs-semi-bold';
24
41
  }
25
42
  }
26
43
  setWeight() {
@@ -45,25 +62,47 @@ export class GbAvatar {
45
62
  }
46
63
  applyColorToInitials() {
47
64
  switch (this.color) {
48
- case 'gray': return 'gray';
49
- case 'blue': return 'blue';
50
- case 'cyan': return 'cyan';
51
- case 'pink': return 'pink';
52
- case 'purple': return 'purple';
53
- case 'green': return 'green';
54
- case 'yellow': return 'yellow';
65
+ case 'gray':
66
+ return 'gray';
67
+ case 'blue':
68
+ return 'blue';
69
+ case 'cyan':
70
+ return 'cyan';
71
+ case 'pink':
72
+ return 'pink';
73
+ case 'purple':
74
+ return 'purple';
75
+ case 'green':
76
+ return 'green';
77
+ case 'yellow':
78
+ return 'yellow';
55
79
  }
56
80
  }
81
+ getRandomColorClass() {
82
+ const randomIndex = Math.floor(Math.random() * this.colorClasses.length);
83
+ return this.colorClasses[randomIndex];
84
+ }
57
85
  componentDidLoad() {
58
86
  const slottedInitials = this.el.querySelector('h1');
59
87
  if (slottedInitials) {
60
88
  slottedInitials.classList.add(this.getInitialsSize());
61
- slottedInitials.classList.add(this.applyColorToInitials() || 'gray');
89
+ slottedInitials.classList.add(this.assignedColorClass);
90
+ }
91
+ }
92
+ componentWillLoad() {
93
+ if (!this.color) {
94
+ this.assignedColorClass = this.getRandomColorClass();
95
+ }
96
+ else {
97
+ this.assignedColorClass = this.color.toLowerCase();
62
98
  }
63
99
  }
64
100
  render() {
101
+ const classes = `${this.assignedColorClass}`;
65
102
  return [
66
- h("div", { key: '775cf7ba5eabbc8488b8d2ba03ee258b57b32140', class: "avatar" }, h("gb-avatar-contrast-inner-border", { key: 'f84eb681b4c8797a895538b9f1eeb939d0c34bc7', "show-border": this.showBorder, size: this.size, weight: this.weight }, h("div", { key: '3618eca98b7f41234c5e7b28d70c0fc923df82e3', class: `inner_content ${this.size}` }, this.text ? (h("div", { class: `initials ${!this.color ? 'gray' : this.color}` }, h("slot", { name: "initials" }))) : (h("slot", { name: "image" })), this.placeholder && (h("div", { key: 'ab0c967fb78e8307ae120e88d35fe435065460c8', class: `placeholder ${!this.color ? 'gray' : this.color}` }, this.icon === 'user' && (h("svg", { key: '8b9c165d35264ac7375d45449155ece04da55123', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: `user_avatar ${this.size} ${this.color} ${!this.color ? 'gray' : this.color}` }, h("path", { key: 'e030a366b3a56c57e830542b49820848880b3e04', d: "M11.8706 9.89137C11.9482 9.93754 12.044 9.99158 12.1524 10.0528C12.6276 10.3209 13.3459 10.7261 13.8381 11.2078C14.1458 11.5091 14.4383 11.9061 14.4914 12.3924C14.548 12.9097 14.3223 13.395 13.8697 13.8263C13.0887 14.5703 12.1515 15.1666 10.9393 15.1666H5.06045C3.84825 15.1666 2.91106 14.5703 2.13009 13.8263C1.67741 13.395 1.45177 12.9097 1.50831 12.3924C1.56147 11.9061 1.85391 11.5091 2.16169 11.2078C2.6538 10.7261 3.37214 10.3209 3.84735 10.0528C3.95578 9.99158 4.05158 9.93754 4.12912 9.89137C6.49848 8.48055 9.50126 8.48055 11.8706 9.89137Z", fill: "#697586" }), h("path", { key: 'c1ef3c0a412747bd4422db59d298a2f8d3ceaff4', d: "M4.49987 4.33325C4.49987 2.40026 6.06688 0.833252 7.99987 0.833252C9.93287 0.833252 11.4999 2.40026 11.4999 4.33325C11.4999 6.26625 9.93287 7.83325 7.99987 7.83325C6.06688 7.83325 4.49987 6.26625 4.49987 4.33325Z", fill: "#697586" }))))))), h("gb-status-indicator", { key: '6878d679bcbbfc288bd9471ad0c1bddc930338c7', class: `indicator ${this.size}`, "status-icon": this.statusIcon, size: this.size, state: this.state })),
103
+ h("div", { key: '78a2ae7ec0fe7e84b4865cbd2aa6d730a4f6d853', class: "avatar" }, h("gb-avatar-contrast-inner-border", { key: 'e8808de59d5e6f717ec05da28e8f426e8901db3d', "show-border": this.showBorder, size: this.size, weight: this.weight }, h("div", { key: '828372aa1ec9483a238d75a4a45e899d9a2d2b9a', class: `inner_content ${this.size}` }, this.text ? (
104
+ // ${!this.color ? 'gray' : this.color}
105
+ h("div", { class: `initials ${classes}` }, h("slot", { name: "initials" }))) : (h("slot", { name: "image" })), this.placeholder && (h("div", { key: '5cbba859eef07664af617e5e5120360af035f54c', class: `placeholder ${classes}` }, this.icon === 'user' && (h("svg", { key: 'f98212a325681ff1d84e2fc7436bccccf80041a8', xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: `user_avatar ${this.size} ${classes}` }, h("path", { key: '8ab2ccefc3d7850bf3f60a6335058a196ee0f8f7', d: "M11.8706 9.89137C11.9482 9.93754 12.044 9.99158 12.1524 10.0528C12.6276 10.3209 13.3459 10.7261 13.8381 11.2078C14.1458 11.5091 14.4383 11.9061 14.4914 12.3924C14.548 12.9097 14.3223 13.395 13.8697 13.8263C13.0887 14.5703 12.1515 15.1666 10.9393 15.1666H5.06045C3.84825 15.1666 2.91106 14.5703 2.13009 13.8263C1.67741 13.395 1.45177 12.9097 1.50831 12.3924C1.56147 11.9061 1.85391 11.5091 2.16169 11.2078C2.6538 10.7261 3.37214 10.3209 3.84735 10.0528C3.95578 9.99158 4.05158 9.93754 4.12912 9.89137C6.49848 8.48055 9.50126 8.48055 11.8706 9.89137Z", fill: "#697586" }), h("path", { key: '9d2aa4af2b1d4d560ccbe532859d9471a9c81690', d: "M4.49987 4.33325C4.49987 2.40026 6.06688 0.833252 7.99987 0.833252C9.93287 0.833252 11.4999 2.40026 11.4999 4.33325C11.4999 6.26625 9.93287 7.83325 7.99987 7.83325C6.06688 7.83325 4.49987 6.26625 4.49987 4.33325Z", fill: "#697586" }))))))), h("gb-status-indicator", { key: 'c9319baf7e901312b943d57ce0530a2a54136f1a', class: `indicator ${this.size}`, "status-icon": this.statusIcon, size: this.size, state: this.state })),
67
106
  ];
68
107
  }
69
108
  static get is() { return "gb-avatar"; }
@@ -266,6 +305,11 @@ export class GbAvatar {
266
305
  }
267
306
  };
268
307
  }
308
+ static get states() {
309
+ return {
310
+ "assignedColorClass": {}
311
+ };
312
+ }
269
313
  static get elementRef() { return "el"; }
270
314
  }
271
315
  //# sourceMappingURL=gb-avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gb-avatar.js","sourceRoot":"","sources":["../../../src/components/gb-avatar/gb-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAoB,aAAa,EAAgB,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAQnH,MAAM,OAA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,KAAK,EAAE,IAC3D,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CACvB,4DACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,eAAe,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE;4BAEpF,6DACE,CAAC,EAAC,siBAAsiB,EACxiB,IAAI,EAAC,SAAS,GACd;4BACF,6DACE,CAAC,EAAC,sNAAsN,EACxN,IAAI,EAAC,SAAS,GACd,CACE,CACP,CACG,CACP,CACG,CAC0B;gBAClC,4EAAqB,KAAK,EAAE,aAAa,IAAI,CAAC,IAAI,EAAE,iBAAe,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAwB,CAC1I;SACP,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Element, h, Prop } from \"@stencil/core\";\r\nimport { AvatarColorTypes, BorderWeights, GeneralSizes, OnlineIndicatorStates } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-avatar',\r\n styleUrl: 'gb-avatar.css',\r\n shadow: true\r\n})\r\n\r\nexport class GbAvatar {\r\n @Prop() size: GeneralSizes;\r\n @Prop() placeholder: boolean = false;\r\n @Prop() text: boolean = true;\r\n @Prop() statusIcon: string = '';\r\n @Prop() state: OnlineIndicatorStates = OnlineIndicatorStates.Online;\r\n @Prop() icon: 'user' = 'user';\r\n @Prop() color: AvatarColorTypes;\r\n @Prop() showBorder: boolean = false;\r\n @Element() el: HTMLElement;\r\n @Prop() weight: BorderWeights = BorderWeights.Light;\r\n\r\n getInitialsSize() {\r\n switch (this.size) {\r\n case 'xl2': return 'display-xs-semi-bold';\r\n case 'xl': return 'text-xl-semi-bold';\r\n case 'lg': return 'text-lg-semi-bold';\r\n case 'md': return 'text-md-semi-bold';\r\n case 'sm': return 'text-sm-semi-bold';\r\n case 'xs': return 'text-xs-semi-bold';\r\n case 'xxs': return 'text-xxs-semi-bold';\r\n }\r\n }\r\n\r\n setWeight() {\r\n if(this.showBorder){\r\n switch (this.size) {\r\n case 'xl2':\r\n return BorderWeights.Regular;\r\n case 'xl':\r\n return BorderWeights.Regular;\r\n case 'lg':\r\n return BorderWeights.Regular;\r\n case 'md':\r\n return BorderWeights.Regular;\r\n case 'sm':\r\n return BorderWeights.Light;\r\n case 'xs':\r\n return BorderWeights.Light;\r\n case 'xxs':\r\n return BorderWeights.VeryLight;\r\n }\r\n }\r\n }\r\n\r\n applyColorToInitials() {\r\n switch(this.color) {\r\n case 'gray': return 'gray';\r\n case 'blue': return 'blue';\r\n case 'cyan': return 'cyan';\r\n case 'pink': return 'pink';\r\n case 'purple': return 'purple';\r\n case 'green': return 'green';\r\n case 'yellow': return 'yellow';\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n const slottedInitials = this.el.querySelector('h1');\r\n \r\n if (slottedInitials) {\r\n slottedInitials.classList.add(this.getInitialsSize());\r\n slottedInitials.classList.add(this.applyColorToInitials() || 'gray');\r\n }\r\n }\r\n\r\n render() {\r\n return [\r\n <div class=\"avatar\">\r\n <gb-avatar-contrast-inner-border show-border={this.showBorder} size={this.size} weight={this.weight}>\r\n <div class={`inner_content ${this.size}`}>\r\n {this.text ? (\r\n <div class={`initials ${!this.color ? 'gray' : this.color}`}>\r\n <slot name=\"initials\"></slot>\r\n </div>\r\n ) : (\r\n <slot name=\"image\"></slot>\r\n )}\r\n {this.placeholder && (\r\n <div class={`placeholder ${!this.color ? 'gray' : this.color}`}>\r\n {this.icon === 'user' && (\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 class={`user_avatar ${this.size} ${this.color} ${!this.color ? 'gray' : this.color}`}\r\n >\r\n <path\r\n d=\"M11.8706 9.89137C11.9482 9.93754 12.044 9.99158 12.1524 10.0528C12.6276 10.3209 13.3459 10.7261 13.8381 11.2078C14.1458 11.5091 14.4383 11.9061 14.4914 12.3924C14.548 12.9097 14.3223 13.395 13.8697 13.8263C13.0887 14.5703 12.1515 15.1666 10.9393 15.1666H5.06045C3.84825 15.1666 2.91106 14.5703 2.13009 13.8263C1.67741 13.395 1.45177 12.9097 1.50831 12.3924C1.56147 11.9061 1.85391 11.5091 2.16169 11.2078C2.6538 10.7261 3.37214 10.3209 3.84735 10.0528C3.95578 9.99158 4.05158 9.93754 4.12912 9.89137C6.49848 8.48055 9.50126 8.48055 11.8706 9.89137Z\"\r\n fill=\"#697586\"\r\n />\r\n <path\r\n d=\"M4.49987 4.33325C4.49987 2.40026 6.06688 0.833252 7.99987 0.833252C9.93287 0.833252 11.4999 2.40026 11.4999 4.33325C11.4999 6.26625 9.93287 7.83325 7.99987 7.83325C6.06688 7.83325 4.49987 6.26625 4.49987 4.33325Z\"\r\n fill=\"#697586\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </gb-avatar-contrast-inner-border>\r\n <gb-status-indicator class={`indicator ${this.size}`} status-icon={this.statusIcon} size={this.size} state={this.state}></gb-status-indicator>\r\n </div>,\r\n ];\r\n }\r\n}"]}
1
+ {"version":3,"file":"gb-avatar.js","sourceRoot":"","sources":["../../../src/components/gb-avatar/gb-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop, State } from \"@stencil/core\";\r\nimport { AvatarColorTypes, BorderWeights, GeneralSizes, OnlineIndicatorStates } from \"../../models/reusableModels\";\r\n\r\n@Component({\r\n tag: 'gb-avatar',\r\n styleUrl: 'gb-avatar.css',\r\n shadow: true,\r\n})\r\nexport class GbAvatar {\r\n @Prop() size: GeneralSizes;\r\n @Prop() placeholder: boolean = false;\r\n @Prop() text: boolean = true;\r\n @Prop() statusIcon: string = '';\r\n @Prop() state: OnlineIndicatorStates = OnlineIndicatorStates.Online;\r\n @Prop() icon: 'user' = 'user';\r\n @Prop() color: AvatarColorTypes;\r\n @Prop() showBorder: boolean = false;\r\n @Element() el: HTMLElement;\r\n @Prop() weight: BorderWeights = BorderWeights.Light;\r\n @State() assignedColorClass: string;\r\n\r\n private colorClasses = [\r\n 'gray', // Red\r\n 'blue', // Green\r\n 'cyan', // Blue\r\n 'green', // Pink\r\n 'purple', // Yellow\r\n 'pink', // Purple\r\n 'yellow', // Teal\r\n ];\r\n\r\n getInitialsSize() {\r\n switch (this.size) {\r\n case 'xl2':\r\n return 'display-xs-semi-bold';\r\n case 'xl':\r\n return 'text-xl-semi-bold';\r\n case 'lg':\r\n return 'text-lg-semi-bold';\r\n case 'md':\r\n return 'text-md-semi-bold';\r\n case 'sm':\r\n return 'text-sm-semi-bold';\r\n case 'xs':\r\n return 'text-xs-semi-bold';\r\n case 'xxs':\r\n return 'text-xxs-semi-bold';\r\n }\r\n }\r\n\r\n setWeight() {\r\n if (this.showBorder) {\r\n switch (this.size) {\r\n case 'xl2':\r\n return BorderWeights.Regular;\r\n case 'xl':\r\n return BorderWeights.Regular;\r\n case 'lg':\r\n return BorderWeights.Regular;\r\n case 'md':\r\n return BorderWeights.Regular;\r\n case 'sm':\r\n return BorderWeights.Light;\r\n case 'xs':\r\n return BorderWeights.Light;\r\n case 'xxs':\r\n return BorderWeights.VeryLight;\r\n }\r\n }\r\n }\r\n\r\n applyColorToInitials() {\r\n switch (this.color) {\r\n case 'gray':\r\n return 'gray';\r\n case 'blue':\r\n return 'blue';\r\n case 'cyan':\r\n return 'cyan';\r\n case 'pink':\r\n return 'pink';\r\n case 'purple':\r\n return 'purple';\r\n case 'green':\r\n return 'green';\r\n case 'yellow':\r\n return 'yellow';\r\n }\r\n }\r\n\r\n private getRandomColorClass(): string {\r\n const randomIndex = Math.floor(Math.random() * this.colorClasses.length);\r\n return this.colorClasses[randomIndex];\r\n }\r\n\r\n componentDidLoad() {\r\n const slottedInitials = this.el.querySelector('h1');\r\n\r\n if (slottedInitials) {\r\n slottedInitials.classList.add(this.getInitialsSize());\r\n slottedInitials.classList.add(this.assignedColorClass);\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (!this.color) {\r\n this.assignedColorClass = this.getRandomColorClass();\r\n } else {\r\n this.assignedColorClass = this.color.toLowerCase();\r\n }\r\n }\r\n\r\n render() {\r\n const classes = `${this.assignedColorClass}`;\r\n\r\n return [\r\n <div class=\"avatar\">\r\n <gb-avatar-contrast-inner-border show-border={this.showBorder} size={this.size} weight={this.weight}>\r\n <div class={`inner_content ${this.size}`}>\r\n {this.text ? (\r\n // ${!this.color ? 'gray' : this.color}\r\n <div class={`initials ${classes}`}>\r\n <slot name=\"initials\"></slot>\r\n </div>\r\n ) : (\r\n <slot name=\"image\"></slot>\r\n )}\r\n {this.placeholder && (\r\n <div class={`placeholder ${classes}`}>\r\n {this.icon === 'user' && (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" class={`user_avatar ${this.size} ${classes}`}>\r\n <path\r\n d=\"M11.8706 9.89137C11.9482 9.93754 12.044 9.99158 12.1524 10.0528C12.6276 10.3209 13.3459 10.7261 13.8381 11.2078C14.1458 11.5091 14.4383 11.9061 14.4914 12.3924C14.548 12.9097 14.3223 13.395 13.8697 13.8263C13.0887 14.5703 12.1515 15.1666 10.9393 15.1666H5.06045C3.84825 15.1666 2.91106 14.5703 2.13009 13.8263C1.67741 13.395 1.45177 12.9097 1.50831 12.3924C1.56147 11.9061 1.85391 11.5091 2.16169 11.2078C2.6538 10.7261 3.37214 10.3209 3.84735 10.0528C3.95578 9.99158 4.05158 9.93754 4.12912 9.89137C6.49848 8.48055 9.50126 8.48055 11.8706 9.89137Z\"\r\n fill=\"#697586\"\r\n />\r\n <path\r\n d=\"M4.49987 4.33325C4.49987 2.40026 6.06688 0.833252 7.99987 0.833252C9.93287 0.833252 11.4999 2.40026 11.4999 4.33325C11.4999 6.26625 9.93287 7.83325 7.99987 7.83325C6.06688 7.83325 4.49987 6.26625 4.49987 4.33325Z\"\r\n fill=\"#697586\"\r\n />\r\n </svg>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </gb-avatar-contrast-inner-border>\r\n <gb-status-indicator class={`indicator ${this.size}`} status-icon={this.statusIcon} size={this.size} state={this.state}></gb-status-indicator>\r\n </div>,\r\n ];\r\n }\r\n}"]}
@@ -2781,6 +2781,7 @@ svg.disabled path{
2781
2781
  position: absolute;
2782
2782
  z-index: 10;
2783
2783
  gap: var(--spacing-none);
2784
+ transition: 1s ease-in-out;
2784
2785
  }
2785
2786
 
2786
2787
  .dropdown_menu.top{
@@ -47,9 +47,15 @@ export class GbInputDropdown {
47
47
  this.dropdownOpen = !this.dropdownOpen;
48
48
  }
49
49
  }
50
- isItemSelected(selectedItem) {
51
- const found = this.selectedItems.find(item => item.name === selectedItem.name);
52
- return found !== undefined;
50
+ isItemSelected(item) {
51
+ // if(typeof selectedItem === 'object') {
52
+ // const found = this.selectedItems.find(item => item.name === selectedItem.name);
53
+ // return found !== undefined;
54
+ // } else {
55
+ // return this.selectedItem === selectedItem;
56
+ // }
57
+ const isObject = typeof item === 'object';
58
+ return this.selectedItems.some(i => (isObject ? i.name === item.name : i === item));
53
59
  }
54
60
  async loadIcon(iconName) {
55
61
  const iconPath = getAssetPath(`${iconName}`);
@@ -77,67 +83,50 @@ export class GbInputDropdown {
77
83
  });
78
84
  }
79
85
  handleItemSelect(item) {
86
+ const isObject = typeof item === 'object';
80
87
  if (this.type === 'tags') {
81
- const itemExists = this.selectedItems.some(i => i.name === item.name);
82
- if (itemExists) {
83
- // Unselect item if it exists
84
- this.selectedItems = this.selectedItems.filter(i => i.name !== item.name);
85
- item.selected = false;
86
- this.unselectedItems = [...this.unselectedItems, item];
88
+ // Handle multiple selection for "tags" type
89
+ const isSelected = this.selectedItems.some(i => (isObject ? i.name === item.name : i === item));
90
+ if (isSelected) {
91
+ // Unselect item: Move it from selectedItems to unselectedItems
92
+ this.selectedItems = this.selectedItems.filter(i => (isObject ? i.name !== item.name : i !== item));
93
+ if (!this.unselectedItems.some(i => (isObject ? i.name === item.name : i === item))) {
94
+ this.unselectedItems = [...this.unselectedItems, item];
95
+ }
87
96
  }
88
97
  else {
89
- // Select item
90
- item.selected = true;
98
+ // Select item: Move it from unselectedItems to selectedItems
91
99
  this.selectedItems = [...this.selectedItems, item];
92
- this.unselectedItems = this.unselectedItems.filter(unselectedItem => unselectedItem.name !== item.name);
100
+ this.unselectedItems = this.unselectedItems.filter(i => (isObject ? i.name !== item.name : i !== item));
93
101
  }
94
- // Emit selected items for tags
95
- this.dropdownValue.emit(this.selectedItems);
96
102
  }
97
103
  else {
98
- // For single selection types (non-tags)
99
- this.selectedItem = item;
100
- this.selectedItems = [item]; // Ensure only one item is selected
101
- this.state = 'filled';
102
- // Emit the single selected item
103
- this.dropdownValue.emit(this.selectedItem);
104
- // Close dropdown after selection
104
+ // Handle single selection for other types
105
+ this.selectedItem = item; // Store single selected item
106
+ this.selectedItems = [item]; // Ensure only one item in selectedItems
107
+ // this.unselectedItems = this.items.filter(i => (isObject ? i.name !== item.name : i !== item));
108
+ // Close the dropdown after selection for single selection types
105
109
  this.dropdownOpen = false;
106
110
  }
107
- // Update the dropdown state
108
111
  this.state = this.selectedItems.length > 0 ? 'filled' : 'default';
109
112
  }
110
113
  handleTagRemove(item) {
111
- // Remove the item from selectedItems array
112
- if (this.type === 'tags') {
113
- const itemExists = this.selectedItems.some(i => i.name === item.name);
114
- if (itemExists) {
115
- this.selectedItems = this.selectedItems.filter(i => i.name !== item.name);
116
- item.selected = false;
117
- if (!this.unselectedItems.includes(item)) {
118
- this.unselectedItems = [...this.unselectedItems, item];
119
- }
120
- }
121
- // Update the state based on whether there are selected items
122
- this.state = this.selectedItems.length > 0 ? 'filled' : 'default';
114
+ const isObject = typeof item === 'object';
115
+ // Remove item from selectedItems
116
+ this.selectedItems = this.selectedItems.filter(i => (isObject ? i.name !== item.name : i !== item));
117
+ // Add item back to unselectedItems if not already present
118
+ if (!this.unselectedItems.some(i => (isObject ? i.name === item.name : i === item))) {
119
+ this.unselectedItems = [...this.unselectedItems, item];
123
120
  }
124
- // For non-tags type, set selectedItem to null if that item is removed
125
- if (this.type !== 'tags' && this.selectedItem === item) {
126
- this.selectedItem = null;
127
- }
128
- // Update state based on whether there are selected items
121
+ // Optionally update state or emit event
129
122
  this.state = this.selectedItems.length > 0 ? 'filled' : 'default';
130
123
  }
131
124
  componentWillLoad() {
132
125
  this.loadIcon(this.leadingIcon);
133
- if (this.items && this.items.every(item => typeof item === 'object')) {
134
- if (this.type === 'tags') {
135
- this.selectedItems = this.items.filter(item => item.selected);
136
- this.unselectedItems = this.items.filter(item => !item.selected);
137
- }
138
- }
139
- else if (this.items && this.items.every(item => typeof item !== 'object')) {
140
- this.selectedItem = this.items.find(item => item) || null;
126
+ this.unselectedItems = [...this.items];
127
+ this.selectedItems = [];
128
+ if (this.type !== 'tags') {
129
+ this.selectedItem = null; // For single selection types
141
130
  }
142
131
  }
143
132
  componentDidLoad() {
@@ -176,16 +165,15 @@ export class GbInputDropdown {
176
165
  }
177
166
  }
178
167
  render() {
168
+ var _a;
179
169
  return [
180
- h("div", { key: '62564f1ca159be928257a5d3ad399b78e5eb88bd', class: `input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`, onClick: () => this.toggleDropdown() }, h("div", { key: 'f88b03fedbf28f4729faf91e2fb9a0b556a9e41a', class: `input_with_label` }, this.showLabel && (h("p", { key: 'e3888086b92126cb7d8d7a785407cfff2b0a66ad', class: "text-sm-regular", style: { color: '#4B5565' } }, this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase())), h("div", { key: '7c6e379a4213e3e5d4358e096c0b697ba7b8cab5', class: `input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}` }, this.type === 'icon_leading' && (h("svg", { key: 'fc1f66f25be92fd15a98c7ffec12d5749abc1894', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '3e8849679c6a24067dfeab6e9d2d237d2df23186', 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: 'acdcf29c80406e4f6c6c43eb4569c152d2c7ad34', 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(Fragment, null, this.state === 'default' && (h("svg", { key: '2995d19c4f87c194e0dd6dd92441de66f0409b36', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'fe320f709e3cb9d14243800ab80cc88c321b7ad4', 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: "#4B5565", "stroke-width": "1.66667" }), h("path", { key: 'f31aaf95c76c311380f244dc9870b2b1c914db3a', d: "M13.75 5.41666C13.75 7.48772 12.0711 9.16666 10 9.16666C7.92893 9.16666 6.25 7.48772 6.25 5.41666C6.25 3.34559 7.92893 1.66666 10 1.66666C12.0711 1.66666 13.75 3.34559 13.75 5.41666Z", stroke: "#4B5565", "stroke-width": "1.66667" }))), this.state === 'filled' && (h("gb-avatar", { key: '11c49c971ad68198b62280a2f5571c3aa3698b51', size: "xs", text: this.text, color: this.color, "show-border": this.showBorder }, h("h1", { key: '247be53f9a671d5c7e11416514594ec8fc8bbb32', slot: "initials" }, this.selectedItem.name.split(' ').map(part => part.charAt(0).toUpperCase())))))), 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: '2a9e467b08912ab619603f3dd9a2cb4316976b97', 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: '14663245e474a1b2e882ab7216a7193faddeebd1', cx: "5", cy: "5", r: "4", fill: "#079455" }))), h("div", { key: '288a7ab7d5d6f32175fcbfa923555c229c953733', class: "placeholder" }, h(Fragment, null, this.state === 'default' && (h(Fragment, null, this.placeholder && (h("p", { key: '80a410e6f77de2b92e17db922b37b3c5677a387d', class: "text-md-regular", style: { color: '#CDD5DF' } }, this.placeholder)))), this.state === 'filled' && (h(Fragment, null, h("div", { key: 'd9f6bf4ee3cbd09a5752fadb290707aa94065cae', class: `content` }, h("div", { key: '9507a4045e4aff6b9f39640d741293e5b148229e', class: `text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`, style: { color: '#4B5565' } }, this.type === 'tags' && (h(Fragment, null, this.selectedItems.map((item, index) => {
181
- {
182
- typeof item === 'object' ? (h("div", { class: "added_tag" }, h("gb-tag", { size: "sm", icon: !this.icon ? 'avatar' : this.icon, 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()))))) : ((console.log(item),
183
- (h("div", { class: "added_tag" }, h("gb-tag", { size: "sm", icon: "avatar", action: "X_close", key: index, onClick: () => this.handleTagRemove(item) }, h("p", { class: "text-xs-medium" }, item))))));
184
- }
185
- })))), this.supportingText && (h("div", { key: 'ae8c938509b0c7c8557992b51fb91c2a4b2d6ab7', class: "supporting_text text-sm-regular", style: { color: '#697586' } }, this.type === 'tags'
170
+ h("div", { key: 'c05a1e0a90d2a6d123f42b15022ed7d7c6e36b30', class: `input_dropdown_container ${this.type === 'tags' ? 'tag' : ''}`, onClick: () => this.toggleDropdown() }, h("div", { key: '9dd26307028206269aff983f46a878cf67e85ee1', class: `input_with_label` }, this.showLabel && (h("p", { key: 'b5cd043cadf7bd75bc3ffa6a0a86069d3911e4ff', class: "text-sm-regular", style: { color: '#4B5565' } }, this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase())), h("div", { key: '7164768bdfbe8e720eb9a6c23f310175174bd16e', class: `input_dropdown_div ${this.size} ${this.state} ${this.type === 'tags' ? 'tag' : ''}` }, this.type === 'icon_leading' && (h("svg", { key: 'c40c84647ed9e1b6d05a74d8dd8c5a6d6c0c861a', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '6a5bfec0339745f649c5d702e3a6d4fa40f853be', 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: 'd71e59cbd503b8eb7ad31d22b0c6b493d1c1d379', 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(Fragment, null, this.state === 'default' && (h("svg", { key: 'c2052c165d7da73fb7d9f23d842f7649f4926ef6', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '32b4e5e6451b2d93c59c928f27bf530e72edc929', 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: "#4B5565", "stroke-width": "1.66667" }), h("path", { key: '3934cb880c2a71a2f05226c8b7300ed347505709', d: "M13.75 5.41666C13.75 7.48772 12.0711 9.16666 10 9.16666C7.92893 9.16666 6.25 7.48772 6.25 5.41666C6.25 3.34559 7.92893 1.66666 10 1.66666C12.0711 1.66666 13.75 3.34559 13.75 5.41666Z", stroke: "#4B5565", "stroke-width": "1.66667" }))), this.state === 'filled' && (h("gb-avatar", { key: 'fe2e5da7c9ff6547d6de91cfc74b854830ff83c3', size: "xs", text: this.text, color: this.color, "show-border": this.showBorder }, h("h1", { key: '15c31e6729c35279b88f25bffc8fbcb00238accf', slot: "initials" }, this.selectedItem.name.split(' ').map(part => part.charAt(0).toUpperCase())))))), 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: 'df8ced3434e27c6a325af717909ec937d413a702', 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: 'b5e3eb5f6c46382ecc690ac8ebc982297a204c32', cx: "5", cy: "5", r: "4", fill: "#079455" }))), h("div", { key: '825b31dad3bd47a97a92276d898a849dc7164022', class: "placeholder" }, h(Fragment, null, this.state === 'default' && (h(Fragment, null, this.placeholder && (h("p", { key: '40bc7a1de481007ea0c1617fcd999bd08f32feed', class: "text-md-regular", style: { color: '#CDD5DF' } }, this.placeholder)))), this.state === 'filled' && (h(Fragment, null, h("div", { key: '7c371132987ca09c97ad4e4e502454d5c1c79f67', class: `content` }, h("div", { key: 'a4a30001d05d445bd17cc2667fef4311ac8f74e7', class: `text text-md-regular ${this.type === 'tags' ? 'tag' : ''}`, style: { color: '#4B5565' } }, this.type === 'tags' ? (h(Fragment, null, this.selectedItems.map((item, index) => typeof item === 'object' ? (h("div", { class: "added_tag", key: index }, h("gb-tag", { size: "sm", icon: !this.icon ? 'avatar' : this.icon ? this.icon : 'false', action: "X_close", 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
171
+ .split(' ')
172
+ .map(part => part.charAt(0).toUpperCase())
173
+ .join(''))))) : (h("div", { class: "added_tag", key: index }, h("gb-tag", { size: "sm", icon: "avatar", action: "X_close", onClick: () => this.handleTagRemove(item) }, h("p", { class: "text-xs-medium" }, item))))))) : (((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.name) || this.selectedItem)), this.supportingText && (h("div", { key: '70fec1afdfca2f007272d33a45503f1efa064db1', class: "supporting_text text-sm-regular", style: { color: '#697586' } }, this.type === 'tags'
186
174
  ? this.selectedItems.map(item => item.username).join(', ') // For multiple selections
187
- : this.selectedItem.username))))))), this.showHelpIcon && (h("div", { key: '950245814531d8834fba74099c11d9c4f36ad071', class: `help_icon` }, h("gb-help-tooltip", { key: '35f5ab08edee155ec2645c1dc9c0af1f2a20cfc7', "show-supporting-text": true }, h("slot", { key: '32df2997d5df8428b52428825626e47cbe591729', name: "tooltip_label", slot: "label" }), h("slot", { key: '9b6246463d00ab9dcb3186b8d891212b71419935', name: "tooltip_supporting_text", slot: "supporting_text" })))), this.type !== 'search' && (h("div", { key: 'aec5f1ab3a97424e72e7a06815bd830874980650', class: `dropdown_icon ${this.dropdownOpen ? 'opened' : ''}` }, h("svg", { key: '4990f7cbbe5452b636c9382f7e466c61a03b0447', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: `${this.state}` }, h("path", { key: 'eca379af5531e497831588722531227d52d9ba26', 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: 'b0c5bf5ce329c675299692c36c7f67d7f06d3452', class: "text-sm-regular", style: { color: '#697586' } }, this.hintText))),
188
- h(Fragment, null, this.dropdownOpen && (h("div", { key: 'a5012cf5d250288b5b42c3e4aa75501873de4a28', class: `dropdown_menu ${this.menuPosition}`, ref: el => (this.dropdownRef = el) }, this.type === 'tags' ? (h(Fragment, null, this.selectedItems.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.isItemSelected(item), onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))) : (h("p", { slot: "name" }, item))))), this.unselectedItems.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.isItemSelected(item) || false, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))) : (h("p", { slot: "name" }, item))))), this.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.isItemSelected(item), color: this.color, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("h1", { slot: "initials" }, item.name.split(' ').map(part => part.charAt(0).toUpperCase())), h("p", { slot: "supporting_text" }, "@", item.username))) : (typeof item !== 'object' && (console.log(item), (h("p", { slot: "name" }, item))))))))) : (h(Fragment, null, this.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.isItemSelected(item), color: this.color, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("h1", { slot: "initials" }, item.name.split(' ').map(part => part.charAt(0).toUpperCase())), h("p", { slot: "supporting_text" }, "@", item.username))) : (typeof item !== 'object' && (console.log(item), (h("p", { slot: "name" }, item)))))))))))),
175
+ : this.selectedItem.username))))))), this.showHelpIcon && (h("div", { key: '2d63d7a4ba7e43acb08ea83bd068c4c9cabf0cc8', class: `help_icon` }, h("gb-help-tooltip", { key: '5990767416dcb74cf0f2e178758328d7f02dc2ca', "show-supporting-text": true }, h("slot", { key: '8a649d1ff588495be018db3a4210deee93d41d21', name: "tooltip_label", slot: "label" }), h("slot", { key: '296c905530acbdea7b731e229be83bded756c931', name: "tooltip_supporting_text", slot: "supporting_text" })))), this.type !== 'search' && (h("div", { key: '8895bbaee36e9857e158191e966a839ff7ad9492', class: `dropdown_icon ${this.dropdownOpen ? 'opened' : ''}` }, h("svg", { key: 'cfa72f8a6f33b745eebb401bb1b26904a0a340e6', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: `${this.state}` }, h("path", { key: '47dfbd026976e4ffa766428701c9069b1eb0b2c3', 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: '5a6103dfea9f79299428323983ea1e474e43c435', class: "text-sm-regular", style: { color: '#697586' } }, this.hintText))),
176
+ h(Fragment, null, this.dropdownOpen && (h("div", { key: '9406e1596a6caf02fe2d2cfd0fc91bd45bc2e637', class: `dropdown_menu ${this.menuPosition}`, ref: el => (this.dropdownRef = el) }, this.type === 'tags' ? (h(Fragment, null, this.selectedItems.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: true, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))) : (h("p", { slot: "name" }, item))))), this.unselectedItems.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: false, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, "@", item.username))) : (h("p", { slot: "name" }, item))))))) : (h(Fragment, null, this.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.isItemSelected(item), color: this.color, onClick: () => this.handleItemSelect(item) }, typeof item === 'object' ? (h(Fragment, null, h("p", { slot: "name" }, item.name), h("h1", { slot: "initials" }, item.name.split(' ').map(part => part.charAt(0).toUpperCase())), h("p", { slot: "supporting_text" }, "@", item.username))) : (typeof item !== 'object' && (console.log(item), (h("p", { slot: "name" }, item)))))))))))),
189
177
  ];
190
178
  }
191
179
  static get is() { return "gb-input-dropdown"; }
@@ -447,8 +435,8 @@ export class GbInputDropdown {
447
435
  "type": "string",
448
436
  "mutable": false,
449
437
  "complexType": {
450
- "original": "'country' | 'avatar' | 'dot'",
451
- "resolved": "\"avatar\" | \"country\" | \"dot\"",
438
+ "original": "'country' | 'avatar' | 'dot' | 'false'",
439
+ "resolved": "\"avatar\" | \"country\" | \"dot\" | \"false\"",
452
440
  "references": {}
453
441
  },
454
442
  "required": false,
@@ -569,24 +557,6 @@ export class GbInputDropdown {
569
557
  "selectedItem": {}
570
558
  };
571
559
  }
572
- static get events() {
573
- return [{
574
- "method": "dropdownValue",
575
- "name": "dropdownValue",
576
- "bubbles": true,
577
- "cancelable": true,
578
- "composed": true,
579
- "docs": {
580
- "tags": [],
581
- "text": ""
582
- },
583
- "complexType": {
584
- "original": "any",
585
- "resolved": "any",
586
- "references": {}
587
- }
588
- }];
589
- }
590
560
  static get elementRef() { return "el"; }
591
561
  static get listeners() {
592
562
  return [{