@db-ux/wc-core-components 2.2.3 → 2.2.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 (211) hide show
  1. package/dist/cjs/db-accordion-item.cjs.entry.js +1 -1
  2. package/dist/cjs/db-accordion.cjs.entry.js +1 -1
  3. package/dist/cjs/db-badge.cjs.entry.js +1 -1
  4. package/dist/cjs/db-brand.cjs.entry.js +1 -1
  5. package/dist/cjs/db-button.cjs.entry.js +1 -1
  6. package/dist/cjs/db-card.cjs.entry.js +1 -1
  7. package/dist/cjs/db-checkbox.cjs.entry.js +1 -1
  8. package/dist/cjs/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.cjs.js.map +1 -1
  9. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +6 -4
  10. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js.map +1 -1
  11. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +1 -1
  12. package/dist/cjs/db-custom-select.cjs.entry.js +33 -25
  13. package/dist/cjs/db-custom-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/db-custom-select.entry.cjs.js.map +1 -1
  15. package/dist/cjs/db-divider.cjs.entry.js +1 -1
  16. package/dist/cjs/db-drawer.cjs.entry.js +26 -15
  17. package/dist/cjs/db-drawer.cjs.entry.js.map +1 -1
  18. package/dist/cjs/db-drawer.entry.cjs.js.map +1 -1
  19. package/dist/cjs/db-header.cjs.entry.js +1 -1
  20. package/dist/cjs/db-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/db-infotext.cjs.entry.js +1 -1
  22. package/dist/cjs/db-link.cjs.entry.js +1 -1
  23. package/dist/cjs/db-navigation-item.cjs.entry.js +1 -1
  24. package/dist/cjs/db-navigation.cjs.entry.js +1 -1
  25. package/dist/cjs/db-notification.cjs.entry.js +5 -3
  26. package/dist/cjs/db-notification.cjs.entry.js.map +1 -1
  27. package/dist/cjs/db-notification.entry.cjs.js.map +1 -1
  28. package/dist/cjs/db-page.cjs.entry.js +1 -1
  29. package/dist/cjs/db-popover.cjs.entry.js +2 -2
  30. package/dist/cjs/db-radio.cjs.entry.js +1 -1
  31. package/dist/cjs/db-section.cjs.entry.js +1 -1
  32. package/dist/cjs/db-select.cjs.entry.js +1 -1
  33. package/dist/cjs/db-stack.cjs.entry.js +1 -1
  34. package/dist/cjs/db-switch.cjs.entry.js +1 -1
  35. package/dist/cjs/db-tab-item_3.cjs.entry.js +1 -1
  36. package/dist/cjs/db-tabs.cjs.entry.js +8 -5
  37. package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
  38. package/dist/cjs/db-tabs.entry.cjs.js.map +1 -1
  39. package/dist/cjs/db-textarea.cjs.entry.js +1 -1
  40. package/dist/cjs/db-tooltip.cjs.entry.js +2 -2
  41. package/dist/cjs/{document-click-listener-DT5rWFez.js → document-click-listener-CKUiT8IL.js} +3 -3
  42. package/dist/cjs/{document-click-listener-DT5rWFez.js.map → document-click-listener-CKUiT8IL.js.map} +1 -1
  43. package/dist/cjs/{document-scroll-listener-Dr1OKmow.js → document-scroll-listener-BlwNKh0i.js} +3 -3
  44. package/dist/cjs/{document-scroll-listener-Dr1OKmow.js.map → document-scroll-listener-BlwNKh0i.js.map} +1 -1
  45. package/dist/cjs/{index-ArRmNC2k.js → index-DjV59BYq.js} +4 -2
  46. package/dist/cjs/index-DjV59BYq.js.map +1 -0
  47. package/dist/cjs/index.cjs.js +4 -3
  48. package/dist/cjs/index.cjs.js.map +1 -1
  49. package/dist/collection/components/custom-select/custom-select.js +30 -22
  50. package/dist/collection/components/custom-select/custom-select.js.map +1 -1
  51. package/dist/collection/components/custom-select/model.js.map +1 -1
  52. package/dist/collection/components/drawer/drawer.js +26 -15
  53. package/dist/collection/components/drawer/drawer.js.map +1 -1
  54. package/dist/collection/components/drawer/model.js.map +1 -1
  55. package/dist/collection/components/notification/model.js.map +1 -1
  56. package/dist/collection/components/notification/notification.js +4 -2
  57. package/dist/collection/components/notification/notification.js.map +1 -1
  58. package/dist/collection/components/tabs/model.js.map +1 -1
  59. package/dist/collection/components/tabs/tabs.js +7 -4
  60. package/dist/collection/components/tabs/tabs.js.map +1 -1
  61. package/dist/collection/components/tag/model.js.map +1 -1
  62. package/dist/collection/components/tag/tag.js +5 -3
  63. package/dist/collection/components/tag/tag.js.map +1 -1
  64. package/dist/collection/shared/model.js.map +1 -1
  65. package/dist/collection/utils/index.js +1 -0
  66. package/dist/collection/utils/index.js.map +1 -1
  67. package/dist/custom-elements.json +21 -9
  68. package/dist/db-ux/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.esm.js.map +1 -1
  69. package/dist/db-ux/db-custom-select.entry.esm.js.map +1 -1
  70. package/dist/db-ux/db-drawer.entry.esm.js.map +1 -1
  71. package/dist/db-ux/db-notification.entry.esm.js.map +1 -1
  72. package/dist/db-ux/db-tabs.entry.esm.js.map +1 -1
  73. package/dist/db-ux/db-ux.esm.js +1 -1
  74. package/dist/db-ux/index.esm.js +1 -1
  75. package/dist/db-ux/index.esm.js.map +1 -1
  76. package/dist/db-ux/{p-c673c483.entry.js → p-04fa8562.entry.js} +2 -2
  77. package/dist/db-ux/{p-55f53705.entry.js → p-131a7c94.entry.js} +2 -2
  78. package/dist/db-ux/{p-0bb2fc14.entry.js → p-218c7d80.entry.js} +2 -2
  79. package/dist/db-ux/{p-36b32211.entry.js → p-2a4a072e.entry.js} +2 -2
  80. package/dist/db-ux/{p-5c63036a.entry.js → p-384b62b0.entry.js} +2 -2
  81. package/dist/db-ux/{p-4c47f2d7.entry.js → p-3f65c9b0.entry.js} +2 -2
  82. package/dist/db-ux/{p-d5e0c0b5.entry.js → p-452ecd6f.entry.js} +2 -2
  83. package/dist/db-ux/p-4cabc896.entry.js +2 -0
  84. package/dist/db-ux/p-4cabc896.entry.js.map +1 -0
  85. package/dist/db-ux/{p-cff88428.entry.js → p-4fb24866.entry.js} +2 -2
  86. package/dist/db-ux/{p-0d8b6ecd.entry.js → p-51efe709.entry.js} +2 -2
  87. package/dist/db-ux/{p-87a03fc0.entry.js → p-577469fa.entry.js} +2 -2
  88. package/dist/db-ux/p-5a572caf.entry.js +2 -0
  89. package/dist/db-ux/p-5a572caf.entry.js.map +1 -0
  90. package/dist/db-ux/{p-ef6cda9f.entry.js → p-8fb2fd78.entry.js} +2 -2
  91. package/dist/db-ux/p-9030a5a3.entry.js +2 -0
  92. package/dist/db-ux/p-9030a5a3.entry.js.map +1 -0
  93. package/dist/db-ux/{p-833f8694.entry.js → p-9b46016a.entry.js} +2 -2
  94. package/dist/db-ux/{p-BbHrTk7a.js → p-BRouKtF5.js} +2 -2
  95. package/dist/db-ux/{p-BbHrTk7a.js.map → p-BRouKtF5.js.map} +1 -1
  96. package/dist/db-ux/{p-Dgkqk5fN.js → p-BwSmFFdU.js} +2 -2
  97. package/dist/db-ux/{p-Dgkqk5fN.js.map → p-BwSmFFdU.js.map} +1 -1
  98. package/dist/db-ux/{p-BgQRUWMZ.js → p-YECpAE3G.js} +2 -2
  99. package/dist/db-ux/p-YECpAE3G.js.map +1 -0
  100. package/dist/db-ux/{p-1face452.entry.js → p-a7e6d250.entry.js} +2 -2
  101. package/dist/db-ux/{p-f71fe126.entry.js → p-b1964c50.entry.js} +2 -2
  102. package/dist/db-ux/{p-a107ec7c.entry.js → p-b22c2a49.entry.js} +2 -2
  103. package/dist/db-ux/{p-010a7372.entry.js → p-b240055c.entry.js} +2 -2
  104. package/dist/db-ux/{p-144ebba2.entry.js → p-c119e349.entry.js} +2 -2
  105. package/dist/db-ux/{p-ca134c76.entry.js → p-c15e15a6.entry.js} +2 -2
  106. package/dist/db-ux/{p-6f1226da.entry.js → p-c7a5e00f.entry.js} +2 -2
  107. package/dist/db-ux/{p-d22637ab.entry.js → p-cefb88b4.entry.js} +2 -2
  108. package/dist/db-ux/p-cefdb628.entry.js +2 -0
  109. package/dist/db-ux/p-cefdb628.entry.js.map +1 -0
  110. package/dist/db-ux/p-d077d88e.entry.js +2 -0
  111. package/dist/db-ux/p-d077d88e.entry.js.map +1 -0
  112. package/dist/db-ux/{p-f3ac974b.entry.js → p-d73c6d4a.entry.js} +2 -2
  113. package/dist/db-ux/{p-c40a990b.entry.js → p-dd4c5af6.entry.js} +2 -2
  114. package/dist/db-ux/{p-b0c5f546.entry.js → p-ef88c992.entry.js} +2 -2
  115. package/dist/db-ux/{p-53f83d20.entry.js → p-f4922cf7.entry.js} +2 -2
  116. package/dist/db-ux/{p-34d4f584.entry.js → p-fc5ce2fc.entry.js} +2 -2
  117. package/dist/esm/db-accordion-item.entry.js +1 -1
  118. package/dist/esm/db-accordion.entry.js +1 -1
  119. package/dist/esm/db-badge.entry.js +1 -1
  120. package/dist/esm/db-brand.entry.js +1 -1
  121. package/dist/esm/db-button.entry.js +1 -1
  122. package/dist/esm/db-card.entry.js +1 -1
  123. package/dist/esm/db-checkbox.entry.js +1 -1
  124. package/dist/esm/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.js.map +1 -1
  125. package/dist/esm/db-custom-select-dropdown_5.entry.js +6 -4
  126. package/dist/esm/db-custom-select-dropdown_5.entry.js.map +1 -1
  127. package/dist/esm/db-custom-select-form-field.entry.js +1 -1
  128. package/dist/esm/db-custom-select.entry.js +33 -25
  129. package/dist/esm/db-custom-select.entry.js.map +1 -1
  130. package/dist/esm/db-divider.entry.js +1 -1
  131. package/dist/esm/db-drawer.entry.js +26 -15
  132. package/dist/esm/db-drawer.entry.js.map +1 -1
  133. package/dist/esm/db-header.entry.js +1 -1
  134. package/dist/esm/db-icon.entry.js +1 -1
  135. package/dist/esm/db-infotext.entry.js +1 -1
  136. package/dist/esm/db-link.entry.js +1 -1
  137. package/dist/esm/db-navigation-item.entry.js +1 -1
  138. package/dist/esm/db-navigation.entry.js +1 -1
  139. package/dist/esm/db-notification.entry.js +5 -3
  140. package/dist/esm/db-notification.entry.js.map +1 -1
  141. package/dist/esm/db-page.entry.js +1 -1
  142. package/dist/esm/db-popover.entry.js +2 -2
  143. package/dist/esm/db-radio.entry.js +1 -1
  144. package/dist/esm/db-section.entry.js +1 -1
  145. package/dist/esm/db-select.entry.js +1 -1
  146. package/dist/esm/db-stack.entry.js +1 -1
  147. package/dist/esm/db-switch.entry.js +1 -1
  148. package/dist/esm/db-tab-item_3.entry.js +1 -1
  149. package/dist/esm/db-tabs.entry.js +8 -5
  150. package/dist/esm/db-tabs.entry.js.map +1 -1
  151. package/dist/esm/db-textarea.entry.js +1 -1
  152. package/dist/esm/db-tooltip.entry.js +2 -2
  153. package/dist/esm/{document-click-listener-CG0rJGJ-.js → document-click-listener-B4S1N-ro.js} +3 -3
  154. package/dist/esm/{document-click-listener-CG0rJGJ-.js.map → document-click-listener-B4S1N-ro.js.map} +1 -1
  155. package/dist/esm/{document-scroll-listener-CwWQuwL5.js → document-scroll-listener-DC7DAxof.js} +3 -3
  156. package/dist/esm/{document-scroll-listener-CwWQuwL5.js.map → document-scroll-listener-DC7DAxof.js.map} +1 -1
  157. package/dist/esm/{index-BgQRUWMZ.js → index-YECpAE3G.js} +4 -3
  158. package/dist/esm/index-YECpAE3G.js.map +1 -0
  159. package/dist/esm/index.js +3 -3
  160. package/dist/esm/index.js.map +1 -1
  161. package/dist/types/components/custom-select/custom-select.d.ts +5 -4
  162. package/dist/types/components/custom-select/model.d.ts +7 -7
  163. package/dist/types/components/drawer/drawer.d.ts +3 -2
  164. package/dist/types/components/drawer/model.d.ts +3 -3
  165. package/dist/types/components/notification/model.d.ts +3 -3
  166. package/dist/types/components/notification/notification.d.ts +1 -1
  167. package/dist/types/components/tabs/model.d.ts +13 -11
  168. package/dist/types/components/tabs/tabs.d.ts +2 -1
  169. package/dist/types/components/tag/model.d.ts +12 -10
  170. package/dist/types/components/tag/tag.d.ts +1 -1
  171. package/dist/types/shared/model.d.ts +9 -7
  172. package/dist/types/utils/index.d.ts +2 -0
  173. package/package.json +3 -3
  174. package/dist/cjs/index-ArRmNC2k.js.map +0 -1
  175. package/dist/db-ux/p-02e09419.entry.js +0 -2
  176. package/dist/db-ux/p-02e09419.entry.js.map +0 -1
  177. package/dist/db-ux/p-04fb737c.entry.js +0 -2
  178. package/dist/db-ux/p-04fb737c.entry.js.map +0 -1
  179. package/dist/db-ux/p-0f107c11.entry.js +0 -2
  180. package/dist/db-ux/p-0f107c11.entry.js.map +0 -1
  181. package/dist/db-ux/p-77ce5cb6.entry.js +0 -2
  182. package/dist/db-ux/p-77ce5cb6.entry.js.map +0 -1
  183. package/dist/db-ux/p-BgQRUWMZ.js.map +0 -1
  184. package/dist/db-ux/p-f60fc221.entry.js +0 -2
  185. package/dist/db-ux/p-f60fc221.entry.js.map +0 -1
  186. package/dist/esm/index-BgQRUWMZ.js.map +0 -1
  187. /package/dist/db-ux/{p-c673c483.entry.js.map → p-04fa8562.entry.js.map} +0 -0
  188. /package/dist/db-ux/{p-55f53705.entry.js.map → p-131a7c94.entry.js.map} +0 -0
  189. /package/dist/db-ux/{p-0bb2fc14.entry.js.map → p-218c7d80.entry.js.map} +0 -0
  190. /package/dist/db-ux/{p-36b32211.entry.js.map → p-2a4a072e.entry.js.map} +0 -0
  191. /package/dist/db-ux/{p-5c63036a.entry.js.map → p-384b62b0.entry.js.map} +0 -0
  192. /package/dist/db-ux/{p-4c47f2d7.entry.js.map → p-3f65c9b0.entry.js.map} +0 -0
  193. /package/dist/db-ux/{p-d5e0c0b5.entry.js.map → p-452ecd6f.entry.js.map} +0 -0
  194. /package/dist/db-ux/{p-cff88428.entry.js.map → p-4fb24866.entry.js.map} +0 -0
  195. /package/dist/db-ux/{p-0d8b6ecd.entry.js.map → p-51efe709.entry.js.map} +0 -0
  196. /package/dist/db-ux/{p-87a03fc0.entry.js.map → p-577469fa.entry.js.map} +0 -0
  197. /package/dist/db-ux/{p-ef6cda9f.entry.js.map → p-8fb2fd78.entry.js.map} +0 -0
  198. /package/dist/db-ux/{p-833f8694.entry.js.map → p-9b46016a.entry.js.map} +0 -0
  199. /package/dist/db-ux/{p-1face452.entry.js.map → p-a7e6d250.entry.js.map} +0 -0
  200. /package/dist/db-ux/{p-f71fe126.entry.js.map → p-b1964c50.entry.js.map} +0 -0
  201. /package/dist/db-ux/{p-a107ec7c.entry.js.map → p-b22c2a49.entry.js.map} +0 -0
  202. /package/dist/db-ux/{p-010a7372.entry.js.map → p-b240055c.entry.js.map} +0 -0
  203. /package/dist/db-ux/{p-144ebba2.entry.js.map → p-c119e349.entry.js.map} +0 -0
  204. /package/dist/db-ux/{p-ca134c76.entry.js.map → p-c15e15a6.entry.js.map} +0 -0
  205. /package/dist/db-ux/{p-6f1226da.entry.js.map → p-c7a5e00f.entry.js.map} +0 -0
  206. /package/dist/db-ux/{p-d22637ab.entry.js.map → p-cefb88b4.entry.js.map} +0 -0
  207. /package/dist/db-ux/{p-f3ac974b.entry.js.map → p-d73c6d4a.entry.js.map} +0 -0
  208. /package/dist/db-ux/{p-c40a990b.entry.js.map → p-dd4c5af6.entry.js.map} +0 -0
  209. /package/dist/db-ux/{p-b0c5f546.entry.js.map → p-ef88c992.entry.js.map} +0 -0
  210. /package/dist/db-ux/{p-53f83d20.entry.js.map → p-f4922cf7.entry.js.map} +0 -0
  211. /package/dist/db-ux/{p-34d4f584.entry.js.map → p-fc5ce2fc.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["src/shared/model.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * @deprecated\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean | string;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const;\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean | string;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = ['medium', 'small', 'large', 'none'] as const;\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType | string;\n};\nexport const MarginList = ['medium', 'small', 'large', 'none'] as const;\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementHorizontalList = ['left', 'right', 'left-start', 'left-end', 'right-start', 'right-end'] as const;\nexport type PlacementHorizontalType = (typeof PlacementHorizontalList)[number];\nexport const PlacementVerticalList = ['top', 'bottom', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const;\nexport type PlacementVerticalType = (typeof PlacementVerticalList)[number];\nexport const PlacementList = [...PlacementHorizontalList, ...PlacementVerticalList] as const;\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean | string;\n};\nexport const GapSpacingList = ['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const;\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean | string;\n};\nexport const OrientationList = ['horizontal', 'vertical'] as const;\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = ['full', 'auto'] as const;\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType | string;\n};\nexport const MaxWidthList = ['full', 'medium', 'large', 'small'] as const;\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = ['none', 'slow', 'fast'] as const;\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = ['auto', 'fixed'] as const;\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean | string;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type NameProps = {\n /**\n * The name attribute gives the name of the element to group it.\n */\n name?: string;\n};\nexport type NameState = {\n _name?: string;\n handleNameAttribute: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = ['small', 'medium'] as const;\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = ['weak', 'strong'] as const;\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const ValidationList = ['invalid', 'valid', 'no-validation'] as const;\nexport type ValidationType = (typeof ValidationList)[number];\nexport type RequiredProps = {\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean | string;\n};\nexport type ShowLabelProps = {\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean | string;\n};\nexport type ValueProps = {\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type BaseFormProps = {\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean | string;\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n};\nexport type CustomFormProps = {\n /**\n * Overwrites auto handling for aria-describedby.\n */\n ariaDescribedBy?: string;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n};\nexport type FormProps = CustomFormProps & BaseFormProps & RequiredProps & ShowLabelProps & ValueProps;\nexport const FieldSizingList = ['fixed', 'content'] as const;\nexport type FieldSizingType = (typeof FieldSizingList)[number];\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number | string;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number | string;\n /**\n * Maximum length (number of characters) of value\n */\n maxlength?: number | string;\n /**\n * Minimum length (number of characters) of value\n */\n minlength?: number | string;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean | string;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readonly?: boolean | string;\n\n /**\n * Adds shrinkwrap for input and textarea: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing\n * Note: Only supported in Chromium browsers so far\n */\n fieldSizing?: FieldSizingType;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean | string;\n};\nexport const LabelVariantList = ['above', 'floating'] as const;\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = ['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const;\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean | string;\n};\nexport type FromValidState = {\n hasValidState: () => boolean;\n handleValidation: () => void;\n _invalidMessage?: string;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n _invalidMessage?: string;\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = ['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const;\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = ['_self', '_blank', '_parent', '_top'] as const;\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const;\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean | string;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean | string;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T> | any) => void;\n};\nexport type ToggleEventProps = {\n toggle?: (open: boolean | any) => void;\n onToggle?: (open: boolean | any) => void;\n};\nexport type ToggleEventState<T> = {\n handleToggle: (event?: ClickEvent<T> | any) => void;\n};\nexport type CloseEventProps = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: any) => void;\n /**\n * Function to handle button click (close).\n */\n close?: (event?: any) => void;\n};\nexport type CloseEventState = {\n handleClose: (event: any, forceClose?: boolean) => void;\n};\nexport const AlignmentList = ['start', 'center'] as const;\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType | string;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean | string;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T> | any) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T> | any) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T> | any) => void;\n handleFocus: (event: InteractionEvent<T> | any) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n};\nexport type DocumentScrollState = {\n _documentScrollListenerCallbackId?: string;\n handleDocumentScroll: (event: any, parent?: HTMLElement) => void;\n _observer?: IntersectionObserver;\n};\nexport type PopoverState = {\n handleEscape: (event: any) => void;\n handleAutoPlacement: (parent?: HTMLElement) => void;\n handleEnter: (parent?: HTMLElement) => void;\n handleLeave: (event?: any) => void;\n} & DocumentScrollState"],"names":[],"mappings":";;;;;;;;;;AAAA;AAuCa,MAAA,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY;AA2BjG,MAAM,WAAW,GAAG,CAAC,QAAQ,EAA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,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU;AA+Dt0B,MAAA,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;AAEpF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM;MAEtD,sBAAsB,GAAG,CAAC,aAAa,EAAE,4BAA4B,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,iCAAiC,EAAE,YAAY;MAkF5L,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":["src/shared/model.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * @deprecated\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean | string;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const;\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean | string;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = ['medium', 'small', 'large', 'none'] as const;\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType | string;\n};\nexport const MarginList = ['medium', 'small', 'large', 'none'] as const;\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementHorizontalList = ['left', 'right', 'left-start', 'left-end', 'right-start', 'right-end'] as const;\nexport type PlacementHorizontalType = (typeof PlacementHorizontalList)[number];\nexport const PlacementVerticalList = ['top', 'bottom', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const;\nexport type PlacementVerticalType = (typeof PlacementVerticalList)[number];\nexport const PlacementList = [...PlacementHorizontalList, ...PlacementVerticalList] as const;\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean | string;\n};\nexport const GapSpacingList = ['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const;\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean | string;\n};\nexport const OrientationList = ['horizontal', 'vertical'] as const;\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = ['full', 'auto'] as const;\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType | string;\n};\nexport const MaxWidthList = ['full', 'medium', 'large', 'small'] as const;\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = ['none', 'slow', 'fast'] as const;\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = ['auto', 'fixed'] as const;\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean | string;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type NameProps = {\n /**\n * The name attribute gives the name of the element to group it.\n */\n name?: string;\n};\nexport type NameState = {\n _name?: string;\n handleNameAttribute: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = ['small', 'medium'] as const;\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = ['weak', 'strong'] as const;\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const ValidationList = ['invalid', 'valid', 'no-validation'] as const;\nexport type ValidationType = (typeof ValidationList)[number];\nexport type RequiredProps = {\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean | string;\n};\nexport type ShowLabelProps = {\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean | string;\n};\nexport type ValueProps = {\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type BaseFormProps = {\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean | string;\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n};\nexport type CustomFormProps = {\n /**\n * Overwrites auto handling for aria-describedby.\n */\n ariaDescribedBy?: string;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n};\nexport type FormProps = CustomFormProps & BaseFormProps & RequiredProps & ShowLabelProps & ValueProps;\nexport const FieldSizingList = ['fixed', 'content'] as const;\nexport type FieldSizingType = (typeof FieldSizingList)[number];\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number | string;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number | string;\n /**\n * Maximum length (number of characters) of value\n */\n maxlength?: number | string;\n /**\n * Minimum length (number of characters) of value\n */\n minlength?: number | string;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean | string;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readonly?: boolean | string;\n\n /**\n * Adds shrinkwrap for input and textarea: https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing\n * Note: Only supported in Chromium browsers so far\n */\n fieldSizing?: FieldSizingType;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean | string;\n};\nexport const LabelVariantList = ['above', 'floating'] as const;\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = ['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const;\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean | string;\n};\nexport type FromValidState = {\n hasValidState: () => boolean;\n handleValidation: () => void;\n _invalidMessage?: string;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n _invalidMessage?: string;\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = ['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const;\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = ['_self', '_blank', '_parent', '_top'] as const;\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const;\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean | string;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean | string;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type GeneralEvent<T> = Event;\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type GeneralKeyboardEvent<T> = KeyboardEvent;\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T> | any) => void;\n};\nexport type ToggleEventProps = {\n toggle?: (open: boolean) => void;\n onToggle?: (open: boolean) => void;\n};\nexport type ToggleEventState<T> = {\n handleToggle: (event?: ClickEvent<T> | any) => void;\n};\nexport type CloseEventProps<T> = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: T) => void;\n /**\n * Function to handle button click (close).\n */\n close?: (event?: T) => void;\n};\nexport type CloseEventState<T> = {\n handleClose: (event?: T | void, forceClose?: boolean) => void;\n};\nexport const AlignmentList = ['start', 'center'] as const;\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType | string;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean | string;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T> | any) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T> | any) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T> | any) => void;\n handleFocus: (event: InteractionEvent<T> | any) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n};\nexport type DocumentScrollState = {\n _documentScrollListenerCallbackId?: string;\n handleDocumentScroll: (event: any, parent?: HTMLElement) => void;\n _observer?: IntersectionObserver;\n};\nexport type PopoverState = {\n handleEscape: (event: any) => void;\n handleAutoPlacement: (parent?: HTMLElement) => void;\n handleEnter: (parent?: HTMLElement) => void;\n handleLeave: (event?: any) => void;\n} & DocumentScrollState"],"names":[],"mappings":";;;;;;;;;;AAAA;AAuCa,MAAA,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY;AA2BjG,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;AAQvD,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM;AAQhD,MAAA,uBAAuB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW;AAEhG,MAAA,qBAAqB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY;AAE9F,MAAA,aAAa,GAAG,CAAC,GAAG,uBAAuB,EAAE,GAAG,qBAAqB;AAiBrE,MAAA,cAAc,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU;MAc1H,eAAe,GAAG,CAAC,YAAY,EAAE,UAAU;MAQ3C,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM;AAQjC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;AAQlD,MAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM;MAE1C,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO;MAgCnC,QAAQ,GAAG,CAAC,OAAO,EAAE,QAAQ;MAQ7B,YAAY,GAAG,CAAC,MAAM,E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AuF5L,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -99,14 +99,14 @@ export class DBCustomSelect {
99
99
  event.stopPropagation();
100
100
  this.dropdownToggle.emit(event);
101
101
  }
102
- if (event.target.open) {
102
+ if (event.target instanceof HTMLDetailsElement && event.target.open) {
103
103
  this._documentClickListenerCallbackId =
104
104
  new DocumentClickListener().addCallback((event) => this.handleDocumentClose(event));
105
105
  this._documentScrollListenerCallbackId =
106
106
  new DocumentScrollListener().addCallback((event) => this.handleDocumentScroll(event));
107
107
  this.handleAutoPlacement();
108
108
  (_a = this._observer) === null || _a === void 0 ? void 0 : _a.observe(this.detailsRef);
109
- if (!event.target.dataset.test) {
109
+ if (!event.target.dataset["test"]) {
110
110
  // We need this workaround for snapshot testing
111
111
  this.handleOpenByKeyboardFocus();
112
112
  }
@@ -165,7 +165,9 @@ export class DBCustomSelect {
165
165
  }
166
166
  }
167
167
  handleTagRemove(option, event) {
168
- event.stopPropagation();
168
+ if (event) {
169
+ event.stopPropagation();
170
+ }
169
171
  this.handleSelect(option.value);
170
172
  this.handleSummaryFocus();
171
173
  }
@@ -232,7 +234,7 @@ export class DBCustomSelect {
232
234
  // 2. If we are on the search, and press up we go back to summary and close
233
235
  if (activeElement.getAttribute("type") === "search" &&
234
236
  (event.key === "ArrowUp" || event.key === "ArrowLeft")) {
235
- this.handleClose("close");
237
+ this.handleClose(undefined, true);
236
238
  this.handleSummaryFocus();
237
239
  }
238
240
  else {
@@ -258,7 +260,7 @@ export class DBCustomSelect {
258
260
  var _a;
259
261
  event.stopPropagation();
260
262
  if (event.key === "Escape" && ((_a = this.detailsRef) === null || _a === void 0 ? void 0 : _a.open)) {
261
- this.handleClose("close");
263
+ this.handleClose(undefined, true);
262
264
  this.handleSummaryFocus();
263
265
  }
264
266
  else if (event.key === "ArrowDown" ||
@@ -268,18 +270,20 @@ export class DBCustomSelect {
268
270
  this.handleArrowDownUp(event);
269
271
  }
270
272
  }
271
- handleClose(event) {
273
+ handleClose(event, forceClose) {
272
274
  if (this.detailsRef) {
273
- if (event === "close") {
275
+ if (forceClose) {
274
276
  this.detailsRef.open = false;
275
277
  this.handleSummaryFocus();
276
278
  }
277
- else if (this.detailsRef.open && (event === null || event === void 0 ? void 0 : event.relatedTarget)) {
278
- const relatedTarget = event.relatedTarget;
279
- if (!this.detailsRef.contains(relatedTarget)) {
280
- // We need to use delay here because the combination of `contains`
281
- // and changing the DOM element causes a race condition inside browser
282
- delay(() => (this.detailsRef.open = false), 1);
279
+ else if (this.detailsRef.open && event) {
280
+ if (event.relatedTarget) {
281
+ const relatedTarget = event.relatedTarget;
282
+ if (!this.detailsRef.contains(relatedTarget)) {
283
+ // We need to use delay here because the combination of `contains`
284
+ // and changing the DOM element causes a race condition inside browser
285
+ delay(() => (this.detailsRef.open = false), 1);
286
+ }
283
287
  }
284
288
  }
285
289
  }
@@ -317,7 +321,7 @@ export class DBCustomSelect {
317
321
  }
318
322
  else {
319
323
  this.handleOptionSelected([value]);
320
- this.handleClose("close");
324
+ this.handleClose(undefined, true);
321
325
  }
322
326
  }
323
327
  }
@@ -374,12 +378,16 @@ export class DBCustomSelect {
374
378
  }
375
379
  }
376
380
  }
377
- handleSearch(event) {
381
+ handleSearch(valueOrEvent) {
382
+ if (valueOrEvent === undefined) {
383
+ return;
384
+ }
378
385
  let filterText;
379
- if (typeof event === "string") {
380
- filterText = event;
386
+ if (typeof valueOrEvent === "string") {
387
+ filterText = valueOrEvent;
381
388
  }
382
389
  else {
390
+ const event = valueOrEvent;
383
391
  event.stopPropagation();
384
392
  if (this.search) {
385
393
  this.search.emit(event);
@@ -683,19 +691,19 @@ export class DBCustomSelect {
683
691
  }
684
692
  render() {
685
693
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
686
- return (h("div", { key: 'e7b8902a3381240fcfe7ca2e85f66e582f7cb284', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
694
+ return (h("div", { key: '3820762d6c678f32fcc942289f7131dc4da4dac8', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
687
695
  this._ref = el;
688
696
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
689
697
  this.selectedType === "tag" &&
690
698
  this.multiple
691
699
  ? "above"
692
- : this.variant, "data-required": getBooleanAsString(this.required), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-hide-icon": getHideProp(this.showIcon) }, h("label", { key: 'f740293d426b6a69fc2516cc469b2510b851c9ef', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '26f0299bdbbbf5b2593729e40cdbb724ba9224ba', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
700
+ : this.variant, "data-required": getBooleanAsString(this.required), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-hide-icon": getHideProp(this.showIcon) }, h("label", { key: 'e12f0a944dfc563b828bc2a2a7db72dc3d7b2e2a', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: 'd4154defbe4f72b78bcc14cdf28f94b935325ff6', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
693
701
  this.selectRef = el;
694
702
  }, form: this.form, name: this.name, multiple: getBoolean(this.multiple, "multiple"), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
695
703
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
696
- : null)), h("details", { key: '71956c98be403be038dbdabc4390aa09eabc8c22', ref: (el) => {
704
+ : null)), h("details", { key: 'ac40846a89d3bc6e82cfdf09885b2b8e7c503600', ref: (el) => {
697
705
  this.detailsRef = el;
698
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '5b3c566401a64350434dcb2b7f71eba5c08803d0' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(index), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
706
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '7e48e266caa446bb5f2208e97dd7dd2c8283a5bc' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(index), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
699
707
  this.searchInputRef = el;
700
708
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
701
709
  ? this._infoTextId
@@ -705,7 +713,7 @@ export class DBCustomSelect {
705
713
  this.selectAllRef = el;
706
714
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, h("db-custom-select-list", { multiple: getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.ariaListLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
707
715
  ? this.getOptionLabel(option)
708
- : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose("close") }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '1e6a1cd3d2da5ea7484309d10e1c9e7da31e1043', "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '4151b595eadab3814592ead50a73be825bae2d28', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '48364689d98dc1c25f70ec982de3e5a7505c1594', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
716
+ : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '859be8ebd28720c82589343858723788b37f55a0', "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'acb8190d25d62a88454d18df049fb471196a479c', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '6b78dcc1f7384d774dbfb181952f15f09b4978ac', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
709
717
  }
710
718
  static get is() { return "db-custom-select"; }
711
719
  static get properties() {
@@ -1 +1 @@
1
- {"version":3,"file":"custom-select.js","sourceRoot":"","sources":["../../../src/components/custom-select/custom-select.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EAEX,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,yBAAyB,EACzB,6BAA6B,EAC7B,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAchC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EACL,SAAS,EACT,CAAC,EACD,QAAQ,EACR,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,cAAc;IAH1B;QAgES,uBAAkB,GAA8C,IAAI,CAAC;QACrE,uBAAkB,GACxB,iBAAiB,CAAC;QAGX,QAAG,GAAG,SAAS,CAAC;QAChB,eAAU,GAAG,SAAS,CAAC;QACvB,oBAAe,GAAG,SAAS,CAAC;QAC5B,sBAAiB,GAAG,SAAS,CAAC;QAC9B,oBAAe,GAAG,SAAS,CAAC;QAC5B,cAAS,GAAG,SAAS,CAAC;QACtB,aAAQ,GAAG,SAAS,CAAC;QACrB,eAAU,GAAG,SAAS,CAAC;QACvB,mBAAc,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n CustomSelectOptionType,\n DBCustomSelectProps,\n DBCustomSelectState,\n} from \"./model\";\nimport {\n cls,\n delay,\n getBoolean,\n getBooleanAsString,\n getHideProp,\n getOptionKey,\n getSearchInput,\n hasVoiceOver,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n DEFAULT_CLOSE_BUTTON,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_LABEL_ID_SUFFIX,\n DEFAULT_MESSAGE,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER_ID_SUFFIX,\n DEFAULT_REMOVE,\n DEFAULT_SELECT_ID_SUFFIX,\n DEFAULT_SELECTED,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport { ChangeEvent, ClickEvent } from \"../../shared/model\";\nimport { DBCustomSelectList } from \"../custom-select-list/custom-select-list\";\nimport { DBCustomSelectListItem } from \"../custom-select-list-item/custom-select-list-item\";\nimport { DBCustomSelectDropdown } from \"../custom-select-dropdown/custom-select-dropdown\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBTag } from \"../tag/tag\";\nimport { DBButton } from \"../button/button\";\nimport { DBTooltip } from \"../tooltip/tooltip\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInput } from \"../input/input\";\nimport { DocumentClickListener } from \"../../utils/document-click-listener\";\nimport { DocumentScrollListener } from \"../../utils/document-scroll-listener\";\nimport { handleFixedDropdown } from \"../../utils/floating-components\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n EventEmitter,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-custom-select\",\n})\nexport class DBCustomSelect {\n private _ref!: HTMLDivElement | any;\n private detailsRef!: HTMLDetailsElement | any;\n private selectRef!: HTMLSelectElement | any;\n private selectAllRef!: HTMLInputElement | any;\n private searchInputRef!: HTMLInputElement | any;\n @Prop() id: DBCustomSelectProps[\"id\"];\n @Prop() invalidMessage: DBCustomSelectProps[\"invalidMessage\"];\n @Prop() message: DBCustomSelectProps[\"message\"];\n @Prop() showMessage: DBCustomSelectProps[\"showMessage\"];\n @Prop() ariaDescribedBy: DBCustomSelectProps[\"ariaDescribedBy\"];\n @Prop() showNoResults: DBCustomSelectProps[\"showNoResults\"];\n @Prop() multiple: DBCustomSelectProps[\"multiple\"];\n @Prop() showSelectAll: DBCustomSelectProps[\"showSelectAll\"];\n @Prop() showSearch: DBCustomSelectProps[\"showSearch\"];\n @Prop() values: DBCustomSelectProps[\"values\"];\n @Prop() validation: DBCustomSelectProps[\"validation\"];\n @Prop() options: DBCustomSelectProps[\"options\"];\n @Prop() searchValue: DBCustomSelectProps[\"searchValue\"];\n @Prop() selectedLabels: DBCustomSelectProps[\"selectedLabels\"];\n @Prop()\n transformSelectedLabels: DBCustomSelectProps[\"transformSelectedLabels\"];\n @Prop() selectedType: DBCustomSelectProps[\"selectedType\"];\n @Prop() amountText: DBCustomSelectProps[\"amountText\"];\n @Event() amountChange: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onAmountChange\"]>[number]\n > | void;\n @Prop() validMessage: DBCustomSelectProps[\"validMessage\"];\n @Prop() required: DBCustomSelectProps[\"required\"];\n @Event() dropdownToggle: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onDropdownToggle\"]>[number]\n > | void;\n @Prop() selectAllLabel: DBCustomSelectProps[\"selectAllLabel\"];\n @Prop() removeTagsTexts: DBCustomSelectProps[\"removeTagsTexts\"];\n @Prop() placement: DBCustomSelectProps[\"placement\"];\n @Event() optionSelected: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onOptionSelected\"]>[number]\n > | void;\n @Event() search: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onSearch\"]>[number]\n > | void;\n @Prop() searchFilter: DBCustomSelectProps[\"searchFilter\"];\n @Prop({attribute: \"classname\"}) className: DBCustomSelectProps[\"className\"];\n @Prop() formFieldWidth: DBCustomSelectProps[\"formFieldWidth\"];\n @Prop() variant: DBCustomSelectProps[\"variant\"];\n @Prop() showLabel: DBCustomSelectProps[\"showLabel\"];\n @Prop() icon: DBCustomSelectProps[\"icon\"];\n @Prop() showIcon: DBCustomSelectProps[\"showIcon\"];\n @Prop() label: DBCustomSelectProps[\"label\"];\n @Prop() form: DBCustomSelectProps[\"form\"];\n @Prop() name: DBCustomSelectProps[\"name\"];\n @Prop() disabled: DBCustomSelectProps[\"disabled\"];\n @Prop() open: DBCustomSelectProps[\"open\"];\n @Prop() dropdownWidth: DBCustomSelectProps[\"dropdownWidth\"];\n @Prop() searchLabel: DBCustomSelectProps[\"searchLabel\"];\n @Prop() searchPlaceholder: DBCustomSelectProps[\"searchPlaceholder\"];\n @Prop() showLoading: DBCustomSelectProps[\"showLoading\"];\n @Prop() ariaListLabel: DBCustomSelectProps[\"ariaListLabel\"];\n @Prop() noResultsText: DBCustomSelectProps[\"noResultsText\"];\n @Prop() loadingText: DBCustomSelectProps[\"loadingText\"];\n @Prop() mobileCloseButtonText: DBCustomSelectProps[\"mobileCloseButtonText\"];\n @Prop() showClearSelection: DBCustomSelectProps[\"showClearSelection\"] = true;\n @Prop() clearSelectionText: DBCustomSelectProps[\"clearSelectionText\"] =\n \"Clear selection\";\n @Prop() placeholder: DBCustomSelectProps[\"placeholder\"];\n @Prop() messageIcon: DBCustomSelectProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _selectId = undefined;\n @State() _labelId = undefined;\n @State() _summaryId = undefined;\n @State() _placeholderId = undefined;\n @State() _infoTextId = undefined;\n @State() _validity = \"no-validation\";\n @State() _descByIds = \"\";\n @State() _selectedLabels = \"\";\n @State() _selectedLabelsId = undefined;\n @State() _voiceOverFallback = \"\";\n @State() _selectedOptions = [];\n @State() selectAllEnabled = false;\n @State() searchEnabled = false;\n @State() amountOptions = 0;\n @State() _values = [];\n @State() _options = [];\n @State() _hasNoOptions = false;\n @State() _documentClickListenerCallbackId = undefined;\n @State() _internalChangeTimestamp = 0;\n @State() _documentScrollListenerCallbackId = undefined;\n @State() _observer = undefined;\n @State() _searchValue = undefined;\n @State() selectAllChecked = false;\n @State() selectAllIndeterminate = false;\n\n handleDocumentScroll(event: any) {\n if (event?.target?.contains && event?.target?.contains(this.detailsRef)) {\n this.handleAutoPlacement();\n }\n }\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n if (this.selectRef) {\n this.selectRef.value = this.getNativeSelectValue();\n }\n /* For a11y reasons we need to map the correct message with the select */\n if (!this.selectRef?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this.selectRef?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n this._validity = this.validation ?? \"invalid\";\n } else if (\n this.hasValidState() &&\n this.selectRef?.validity.valid &&\n this.required\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n this._validity = this.validation ?? \"valid\";\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n this._validity = this.validation ?? \"no-validation\";\n } else {\n this._descByIds = this._placeholderId;\n this._validity = this.validation ?? \"no-validation\";\n }\n }\n handleDropdownToggle(event: any) {\n if (this.dropdownToggle) {\n event.stopPropagation();\n this.dropdownToggle.emit(event);\n }\n if (event.target.open) {\n this._documentClickListenerCallbackId =\n new DocumentClickListener().addCallback((event) =>\n this.handleDocumentClose(event)\n );\n this._documentScrollListenerCallbackId =\n new DocumentScrollListener().addCallback((event) =>\n this.handleDocumentScroll(event)\n );\n this.handleAutoPlacement();\n this._observer?.observe(this.detailsRef);\n if (!event.target.dataset.test) {\n // We need this workaround for snapshot testing\n this.handleOpenByKeyboardFocus();\n }\n } else {\n if (this._documentClickListenerCallbackId) {\n new DocumentClickListener().removeCallback(\n this._documentClickListenerCallbackId!\n );\n }\n if (this._documentScrollListenerCallbackId) {\n new DocumentScrollListener().removeCallback(\n this._documentScrollListenerCallbackId!\n );\n }\n this._observer?.unobserve(this.detailsRef);\n }\n }\n getNativeSelectValue() {\n if (this._values?.length) {\n return this._values!.at(0) ?? \"\";\n }\n return \"\";\n }\n setDescById(descId?: string) {\n const descByIds: string[] = [];\n if (descId) {\n descByIds.push(descId);\n }\n if (this._selectedLabelsId && this._selectedLabels?.length) {\n descByIds.push(this._selectedLabelsId!);\n }\n this._descByIds = descByIds.join(\" \");\n }\n getSelectAllLabel() {\n return this.selectAllLabel ?? DEFAULT_LABEL;\n }\n getOptionLabel(option: CustomSelectOptionType) {\n return option.label ?? option.value?.toString() ?? \"\";\n }\n getOptionChecked(value?: string) {\n if (value && this._values?.includes) {\n return this._values?.includes(value!);\n }\n return false;\n }\n getTagRemoveLabel(index: number) {\n if (this.removeTagsTexts && this.removeTagsTexts!.length > index) {\n return this.removeTagsTexts!.at(index)!;\n } else {\n return `${DEFAULT_REMOVE} ${\n this._selectedOptions\n ? this.getOptionLabel(this._selectedOptions![index])\n : \"\"\n }`;\n }\n }\n handleTagRemove(option: CustomSelectOptionType, event: any) {\n event.stopPropagation();\n this.handleSelect(option.value);\n this.handleSummaryFocus();\n }\n handleAutoPlacement() {\n if (this.detailsRef) {\n const dropdown = this.detailsRef.querySelector(\"article\");\n if (dropdown) {\n // This is a workaround for Angular\n delay(() => {\n handleFixedDropdown(\n dropdown,\n this.detailsRef,\n (this.placement as unknown as string) ?? \"bottom\"\n );\n }, 1);\n }\n }\n }\n handleArrowDownUp(event: any) {\n if (this.detailsRef?.open) {\n if (self.document) {\n const activeElement = self.document.activeElement;\n if (activeElement) {\n // 1. we check if we are currently focusing a checkbox in the dropdown\n const isCheckbox =\n activeElement.getAttribute(\"type\") === \"checkbox\" ||\n activeElement.getAttribute(\"type\") === \"radio\";\n if (isCheckbox) {\n const listElement = activeElement?.closest(\"li\");\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n if (listElement?.nextElementSibling) {\n listElement?.nextElementSibling\n ?.querySelector(\"input\")\n ?.focus();\n } else {\n // We are on the last checkbox we move to the top checkbox\n this.handleFocusFirstDropdownCheckbox(activeElement);\n }\n } else {\n if (listElement?.previousElementSibling) {\n listElement?.previousElementSibling\n ?.querySelector(\"input\")\n ?.focus();\n } else if (\n this.detailsRef.querySelector(`input[type=\"checkbox\"]`) !==\n activeElement\n ) {\n // We are on the top list checkbox but there is a select all checkbox as well\n this.handleFocusFirstDropdownCheckbox(activeElement);\n } else {\n // We are on the top checkbox, we need to move to the search\n // or to the last checkbox\n const search = getSearchInput(this.detailsRef);\n if (search) {\n delay(() => {\n search.focus();\n }, 100);\n } else {\n const checkboxList: HTMLInputElement[] = Array.from(\n this.detailsRef?.querySelectorAll(\n `input[type=\"checkbox\"],input[type=\"radio\"]`\n )\n );\n if (checkboxList.length) {\n checkboxList.at(-1)?.focus();\n }\n }\n }\n }\n } else {\n // 2. If we are on the search, and press up we go back to summary and close\n if (\n activeElement.getAttribute(\"type\") === \"search\" &&\n (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\")\n ) {\n this.handleClose(\"close\");\n this.handleSummaryFocus();\n } else {\n // 3. Otherwise, we need to move to the first checkbox\n this.handleFocusFirstDropdownCheckbox(activeElement);\n }\n }\n }\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n // Open dropdown with arrows see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#keyboardinteraction\n this.handleAutoPlacement();\n if (this.detailsRef) {\n this.detailsRef.open = true;\n }\n this.handleOpenByKeyboardFocus();\n }\n event.stopPropagation();\n event.preventDefault();\n }\n handleKeyboardPress(event: any) {\n event.stopPropagation();\n if (event.key === \"Escape\" && this.detailsRef?.open) {\n this.handleClose(\"close\");\n this.handleSummaryFocus();\n } else if (\n event.key === \"ArrowDown\" ||\n event.key === \"ArrowUp\" ||\n event.key === \"ArrowLeft\" ||\n event.key === \"ArrowRight\"\n ) {\n this.handleArrowDownUp(event);\n }\n }\n handleClose(event: any) {\n if (this.detailsRef) {\n if (event === \"close\") {\n this.detailsRef.open = false;\n this.handleSummaryFocus();\n } else if (this.detailsRef.open && event?.relatedTarget) {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (!this.detailsRef.contains(relatedTarget)) {\n // We need to use delay here because the combination of `contains`\n // and changing the DOM element causes a race condition inside browser\n delay(() => (this.detailsRef.open = false), 1);\n }\n }\n }\n }\n handleDocumentClose(event: any) {\n if (event) {\n // stencil is sending a custom event which wraps the pointer event into details\n const target =\n typeof event.detail === \"number\" ? event.target : event.detail?.target;\n if (this.detailsRef?.open && !this.detailsRef.contains(target)) {\n this.detailsRef.open = false;\n }\n }\n }\n handleOptionSelected(values: string[]) {\n const skip = new Date().getTime() - this._internalChangeTimestamp < 200;\n if (skip) return;\n this._values = values;\n if (this.optionSelected) {\n this.optionSelected.emit(values ?? []);\n }\n this._internalChangeTimestamp = new Date().getTime();\n }\n handleSelect(value?: string) {\n if (value) {\n if (this.multiple) {\n if (this._values?.includes(value)) {\n this.handleOptionSelected(\n this._values!.filter((v: string) => v !== value)\n );\n } else {\n this.handleOptionSelected([...(this._values || []), value]);\n }\n } else {\n this.handleOptionSelected([value]);\n this.handleClose(\"close\");\n }\n }\n }\n handleSelectAll(event: any) {\n event.stopPropagation();\n if (this._values?.length === this.amountOptions) {\n this.handleOptionSelected([]);\n } else {\n const searchValue: string | undefined =\n this.searchEnabled && this.searchInputRef\n ? this.searchInputRef.value\n : undefined;\n this.handleOptionSelected(\n this.options\n ? this.options!.filter(\n (option) =>\n !option.isGroupTitle &&\n (!searchValue ||\n option.value\n ?.toLowerCase()\n .includes(searchValue.toLowerCase()))\n ).map((option) => option.value ?? \"\")\n : []\n );\n }\n }\n handleFocusFirstDropdownCheckbox(activeElement?: Element) {\n if (this.detailsRef) {\n const checkboxes: HTMLInputElement[] = Array.from(\n this.detailsRef.querySelectorAll(\n `input[type=\"checkbox\"],input[type=\"radio\"]`\n )\n );\n if (checkboxes.length) {\n const first = checkboxes.at(0);\n const checkbox =\n first === activeElement && checkboxes.length > 1\n ? checkboxes.at(1)\n : first;\n if (checkbox) {\n delay(() => {\n // Takes some time until element can be focused\n (checkbox as HTMLInputElement).focus();\n }, 1);\n }\n }\n }\n }\n handleOpenByKeyboardFocus() {\n if (this.detailsRef) {\n // Focus search if possible\n const search = getSearchInput(this.detailsRef);\n if (search) {\n delay(() => {\n // Takes some time until element can be focused\n search.focus();\n }, 1);\n } else {\n // Focus first checkbox otherwise\n this.handleFocusFirstDropdownCheckbox();\n }\n }\n }\n handleSearch(event: any) {\n let filterText;\n if (typeof event === \"string\") {\n filterText = event;\n } else {\n event.stopPropagation();\n if (this.search) {\n this.search.emit(event);\n }\n filterText = (event.target as HTMLInputElement).value;\n this._searchValue = filterText;\n }\n if (!this.options || !filterText || filterText.length === 0) {\n this._options = this.options;\n } else if (this.searchFilter) {\n this._options = this.options!.filter((option) =>\n this.searchFilter!(option, filterText)\n );\n } else {\n this._options = this.options!.filter(\n (option) =>\n !option.isGroupTitle &&\n this.getOptionLabel(option)\n .toLowerCase()\n .includes(filterText.toLowerCase())\n );\n }\n }\n handleClearAll(event: any) {\n event.stopPropagation();\n this.handleOptionSelected([]);\n this.handleSummaryFocus();\n }\n handleSummaryFocus() {\n if (this.detailsRef) {\n (this.detailsRef as HTMLDetailsElement).querySelector(\"summary\")?.focus();\n }\n }\n satisfyReact = function satisfyReact(event: any) {\n // This is a function to satisfy React\n event.stopPropagation();\n };\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this.detailsRef) {\n this.detailsRef.addEventListener(\"focusout\", (event: any) =>\n this.handleClose(event)\n );\n }\n }\n\n @Watch(\"detailsRef\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._labelId = this._id + DEFAULT_LABEL_ID_SUFFIX;\n this._selectId = this._id + DEFAULT_SELECT_ID_SUFFIX;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._placeholderId = this._id + DEFAULT_PLACEHOLDER_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this.setDescById(messageId);\n } else {\n this.setDescById();\n }\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n if (this.detailsRef) {\n const summary = this.detailsRef.querySelector(\"summary\");\n if (summary) {\n summary.setAttribute(\n \"aria-describedby\",\n this.ariaDescribedBy ?? (this._descByIds || \"\")\n );\n }\n }\n }\n\n @Watch(\"detailsRef\")\n @Watch(\"_descByIds\")\n watch2() {\n this.watch2Fn();\n }\n\n watch3Fn() {\n if (this.showNoResults !== undefined) {\n this._hasNoOptions = this.showNoResults!;\n } else if (this._options) {\n this._hasNoOptions = this._options!.length === 0;\n }\n }\n\n @Watch(\"showNoResults\")\n @Watch(\"_options\")\n watch3() {\n this.watch3Fn();\n }\n\n watch4Fn() {\n this.selectAllEnabled = Boolean(\n this.multiple && (this.showSelectAll ?? this.amountOptions > 5)\n );\n }\n\n @Watch(\"showSelectAll\")\n @Watch(\"amountOptions\")\n @Watch(\"multiple\")\n watch4() {\n this.watch4Fn();\n }\n\n watch5Fn() {\n this.searchEnabled = this.showSearch ?? this.amountOptions > 9;\n }\n\n @Watch(\"showSearch\")\n @Watch(\"amountOptions\")\n watch5() {\n this.watch5Fn();\n }\n\n watch6Fn() {\n if (\n this.values &&\n Array.isArray(this.values) &&\n this.values !== this._values\n ) {\n this._values = this.values ?? [];\n }\n }\n\n @Watch(\"values\")\n watch6() {\n this.watch6Fn();\n }\n\n watch7Fn() {\n this.handleValidation();\n }\n\n @Watch(\"_values\")\n watch7() {\n this.watch7Fn();\n }\n\n watch8Fn() {\n this._validity = this.validation;\n }\n\n @Watch(\"validation\")\n watch8() {\n this.watch8Fn();\n }\n\n watch9Fn() {\n if (this._values?.length === 0) {\n this.selectAllChecked = false;\n this.selectAllIndeterminate = false;\n } else if (this._values?.length === this.amountOptions) {\n this.selectAllIndeterminate = false;\n this.selectAllChecked = true;\n } else if (this._values) {\n this.selectAllIndeterminate = true;\n }\n }\n\n @Watch(\"_values\")\n @Watch(\"amountOptions\")\n watch9() {\n this.watch9Fn();\n }\n\n watch10Fn() {\n this._options = this.options;\n this.amountOptions =\n this.options?.filter((option) => !option.isGroupTitle).length ?? 0;\n }\n\n @Watch(\"options\")\n watch10() {\n this.watch10Fn();\n }\n\n watch11Fn() {\n this._searchValue = this.searchValue;\n if (this.searchValue) {\n const sValue = this.searchValue!; // <- workaround for Angular\n this.handleSearch(sValue);\n }\n }\n\n @Watch(\"searchValue\")\n watch11() {\n this.watch11Fn();\n }\n\n watch12Fn() {\n if (this.options?.length) {\n this._selectedOptions = this.options?.filter(\n (option: CustomSelectOptionType) => {\n if (!option.value || !this._values?.[\"includes\"]) {\n return false;\n }\n return !option.isGroupTitle && this._values?.includes(option.value);\n }\n );\n }\n }\n\n @Watch(\"options\")\n @Watch(\"_values\")\n watch12() {\n this.watch12Fn();\n }\n\n watch13Fn() {\n if (this.selectedLabels) {\n this._selectedLabels = this.selectedLabels;\n return;\n }\n if (this._selectedOptions?.length) {\n if (this.transformSelectedLabels) {\n // We need to add this to another ``const`` for Angular generated output to work\n const selectedOptions = this._selectedOptions;\n const transformFn = this.transformSelectedLabels!;\n this._selectedLabels = transformFn!(selectedOptions);\n return;\n }\n if (this.selectedType === \"amount\") {\n this._selectedLabels = this.amountText\n ? this.amountText\n : `${this._selectedOptions?.length} ${DEFAULT_SELECTED}`;\n } else {\n this._selectedLabels = this._selectedOptions\n ?.map((option: CustomSelectOptionType) => this.getOptionLabel(option))\n .join(\", \");\n }\n } else {\n this._selectedLabels = \"\";\n }\n }\n\n @Watch(\"_selectedOptions\")\n @Watch(\"selectedType\")\n @Watch(\"amountText\")\n @Watch(\"selectedLabels\")\n @Watch(\"transformSelectedLabels\")\n watch13() {\n this.watch13Fn();\n }\n\n watch14Fn() {\n if (this.amountChange) {\n this.amountChange.emit(this._selectedOptions?.length ?? 0);\n }\n }\n\n @Watch(\"_selectedOptions\")\n watch14() {\n this.watch14Fn();\n }\n\n watch15Fn() {\n if (this.selectAllRef) {\n this.selectAllRef.indeterminate = Boolean(this.selectAllIndeterminate);\n }\n }\n\n @Watch(\"selectAllIndeterminate\")\n @Watch(\"selectAllRef\")\n watch15() {\n this.watch15Fn();\n }\n\n watch16Fn() {\n this._invalidMessage =\n this.invalidMessage ||\n this.selectRef?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"selectRef\")\n @Watch(\"invalidMessage\")\n watch16() {\n this.watch16Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-custom-select\");\n const mId = this.id ?? `custom-select-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._selectId = mId + DEFAULT_SELECT_ID_SUFFIX;\n this._labelId = mId + DEFAULT_LABEL_ID_SUFFIX;\n this._summaryId = mId + \"-summary\";\n this._placeholderId = mId + DEFAULT_PLACEHOLDER_ID_SUFFIX;\n this._selectedLabelsId = mId + \"-selected-labels\";\n this._infoTextId = mId + \"-info\";\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n if (typeof window !== \"undefined\" && \"IntersectionObserver\" in window) {\n this._observer = new IntersectionObserver((payload) => {\n if (this.detailsRef) {\n const entry = payload.find(\n ({ target }) => target === this.detailsRef\n );\n if (entry && !entry.isIntersecting && this.detailsRef.open) {\n this.detailsRef.open = false;\n }\n }\n });\n }\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n this.watch3Fn();\n this.watch4Fn();\n this.watch5Fn();\n this.watch6Fn();\n this.watch7Fn();\n this.watch8Fn();\n this.watch9Fn();\n this.watch10Fn();\n this.watch11Fn();\n this.watch12Fn();\n this.watch13Fn();\n this.watch14Fn();\n this.watch15Fn();\n this.watch16Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-custom-select\", this.className)}\n id={this._id}\n ref={(el: any) => {\n this._ref = el;\n }}\n aria-invalid={this._validity === \"invalid\"}\n data-custom-validity={this._validity}\n data-width={this.formFieldWidth}\n data-variant={\n this.variant === \"floating\" &&\n this.selectedType === \"tag\" &&\n this.multiple\n ? \"above\"\n : this.variant\n }\n data-required={getBooleanAsString(this.required)}\n data-placement={this.placement}\n data-selected-type={this.multiple ? this.selectedType : \"text\"}\n data-hide-label={getHideProp(this.showLabel)}\n data-icon={this.icon}\n data-hide-icon={getHideProp(this.showIcon)}\n >\n <label id={this._labelId}>\n {this.label ?? DEFAULT_LABEL}\n <select\n role=\"none\"\n hidden={true}\n id={this._selectId}\n tabIndex={-1}\n ref={(el: any) => {\n this.selectRef = el;\n }}\n form={this.form}\n name={this.name}\n multiple={getBoolean(this.multiple, \"multiple\")}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n onChange={(event) => this.satisfyReact(event)}\n >\n {this.options?.length\n ? this.options?.map((option) => (\n <option\n disabled={option.disabled}\n value={option.value}\n key={undefined}\n >\n {this.getOptionLabel(option)}\n </option>\n ))\n : null}\n </select>\n </label>\n <details\n ref={(el: any) => {\n this.detailsRef = el;\n }}\n open={this.open}\n onToggle={(event) => this.handleDropdownToggle(event)}\n onKeyDown={(event) => this.handleKeyboardPress(event)}\n >\n <slot></slot>\n {this.options ? (\n <Fragment>\n <summary\n class=\"db-custom-select-form-field\"\n id={this._summaryId}\n aria-disabled={getBooleanAsString(this.disabled)}\n aria-labelledby={this._labelId}\n >\n {this._selectedLabels?.length ? (\n <span\n data-visually-hidden={getBooleanAsString(\n this.selectedType === \"tag\"\n )}\n id={this._selectedLabelsId}\n >\n {this._selectedLabels}\n </span>\n ) : null}\n {this.selectedType === \"tag\" ? (\n <div>\n {this._selectedOptions?.map((option, index) => (\n <db-tag\n emphasis=\"strong\"\n behavior=\"removable\"\n removeButton={this.getTagRemoveLabel(index)}\n onRemove={(event) =>\n this.handleTagRemove(option, event)\n }\n key={undefined}\n >\n {this.getOptionLabel(option)}\n </db-tag>\n ))}\n </div>\n ) : null}\n </summary>\n <db-custom-select-dropdown width={this.dropdownWidth}>\n {this.searchEnabled ? (\n <div>\n <db-input\n type=\"search\"\n ref={(el: any) => {\n this.searchInputRef = el;\n }}\n name={this._id}\n form={this._id}\n showLabel={false}\n value={this._searchValue}\n label={this.searchLabel ?? DEFAULT_LABEL}\n placeholder={this.searchPlaceholder ?? this.searchLabel}\n ariaDescribedBy={\n this._hasNoOptions || this.showLoading\n ? this._infoTextId\n : undefined\n }\n onInput={(event) => this.handleSearch(event)}\n ></db-input>\n </div>\n ) : null}\n {this._hasNoOptions || this.showLoading ? (\n <db-infotext\n id={this._infoTextId}\n icon={this._hasNoOptions ? undefined : \"circular_arrows\"}\n semantic={this._hasNoOptions ? \"warning\" : \"informational\"}\n >\n {(this._hasNoOptions\n ? this.noResultsText\n : this.loadingText) ?? DEFAULT_MESSAGE}\n </db-infotext>\n ) : (\n <Fragment>\n {this.selectAllEnabled ? (\n <div>\n <div class=\"db-checkbox db-custom-select-list-item\">\n <label>\n <input\n type=\"checkbox\"\n value=\"select-all\"\n ref={(el: any) => {\n this.selectAllRef = el;\n }}\n form={this._id}\n checked={this.selectAllChecked}\n onChange={(event) => this.handleSelectAll(event)}\n />\n {this.getSelectAllLabel()}\n </label>\n </div>\n </div>\n ) : null}\n <db-custom-select-list\n multiple={getBoolean(this.multiple, \"multiple\")}\n label={this.ariaListLabel ?? this.label ?? DEFAULT_LABEL}\n >\n {this._options?.map((option) => (\n <db-custom-select-list-item\n type={this.multiple ? \"checkbox\" : \"radio\"}\n showDivider={option.showDivider}\n icon={option.icon}\n isGroupTitle={option.isGroupTitle}\n groupTitle={this.getOptionLabel(option)}\n name={this._id}\n checked={this.getOptionChecked(option.value)}\n disabled={option.disabled}\n value={option.value}\n onChange={() => this.handleSelect(option.value)}\n key={undefined}\n >\n {!option.isGroupTitle\n ? this.getOptionLabel(option)\n : null}\n </db-custom-select-list-item>\n ))}\n </db-custom-select-list>\n </Fragment>\n )}\n <div>\n <db-button\n variant=\"ghost\"\n width=\"full\"\n icon=\"cross\"\n size=\"small\"\n name={this._id}\n form={this._id}\n onClick={() => this.handleClose(\"close\")}\n >\n {this.mobileCloseButtonText ?? DEFAULT_CLOSE_BUTTON}\n </db-button>\n </div>\n </db-custom-select-dropdown>\n </Fragment>\n ) : null}\n </details>\n {(this.showClearSelection ?? true) && this._values?.length ? (\n <db-button\n icon=\"cross\"\n variant=\"ghost\"\n size=\"small\"\n noText={true}\n name={this._id}\n form={this._id}\n onClick={(event) => this.handleClearAll(event)}\n >\n {this.clearSelectionText}\n <db-tooltip placement=\"top\">{this.clearSelectionText}</db-tooltip>\n </db-button>\n ) : null}\n <span aria-hidden={getBooleanAsString(true)} id={this._placeholderId}>\n {this.placeholder ?? this.label}\n </span>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"custom-select.js","sourceRoot":"","sources":["../../../src/components/custom-select/custom-select.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EAEX,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,yBAAyB,EACzB,6BAA6B,EAC7B,cAAc,EACd,wBAAw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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n CustomSelectOptionType,\n DBCustomSelectProps,\n DBCustomSelectState,\n} from \"./model\";\nimport {\n cls,\n delay,\n getBoolean,\n getBooleanAsString,\n getHideProp,\n getOptionKey,\n getSearchInput,\n hasVoiceOver,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n DEFAULT_CLOSE_BUTTON,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_LABEL_ID_SUFFIX,\n DEFAULT_MESSAGE,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER_ID_SUFFIX,\n DEFAULT_REMOVE,\n DEFAULT_SELECT_ID_SUFFIX,\n DEFAULT_SELECTED,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport {\n ClickEvent,\n GeneralEvent,\n InputEvent,\n InteractionEvent,\n} from \"../../shared/model\";\nimport { DBCustomSelectList } from \"../custom-select-list/custom-select-list\";\nimport { DBCustomSelectListItem } from \"../custom-select-list-item/custom-select-list-item\";\nimport { DBCustomSelectDropdown } from \"../custom-select-dropdown/custom-select-dropdown\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBTag } from \"../tag/tag\";\nimport { DBButton } from \"../button/button\";\nimport { DBTooltip } from \"../tooltip/tooltip\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInput } from \"../input/input\";\nimport { DocumentClickListener } from \"../../utils/document-click-listener\";\nimport { DocumentScrollListener } from \"../../utils/document-scroll-listener\";\nimport { handleFixedDropdown } from \"../../utils/floating-components\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n EventEmitter,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-custom-select\",\n})\nexport class DBCustomSelect {\n private _ref!: HTMLDivElement | any;\n private detailsRef!: HTMLDetailsElement | any;\n private selectRef!: HTMLSelectElement | any;\n private selectAllRef!: HTMLInputElement | any;\n private searchInputRef!: HTMLInputElement | any;\n @Prop() id: DBCustomSelectProps[\"id\"];\n @Prop() invalidMessage: DBCustomSelectProps[\"invalidMessage\"];\n @Prop() message: DBCustomSelectProps[\"message\"];\n @Prop() showMessage: DBCustomSelectProps[\"showMessage\"];\n @Prop() ariaDescribedBy: DBCustomSelectProps[\"ariaDescribedBy\"];\n @Prop() showNoResults: DBCustomSelectProps[\"showNoResults\"];\n @Prop() multiple: DBCustomSelectProps[\"multiple\"];\n @Prop() showSelectAll: DBCustomSelectProps[\"showSelectAll\"];\n @Prop() showSearch: DBCustomSelectProps[\"showSearch\"];\n @Prop() values: DBCustomSelectProps[\"values\"];\n @Prop() validation: DBCustomSelectProps[\"validation\"];\n @Prop() options: DBCustomSelectProps[\"options\"];\n @Prop() searchValue: DBCustomSelectProps[\"searchValue\"];\n @Prop() selectedLabels: DBCustomSelectProps[\"selectedLabels\"];\n @Prop()\n transformSelectedLabels: DBCustomSelectProps[\"transformSelectedLabels\"];\n @Prop() selectedType: DBCustomSelectProps[\"selectedType\"];\n @Prop() amountText: DBCustomSelectProps[\"amountText\"];\n @Event() amountChange: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onAmountChange\"]>[number]\n > | void;\n @Prop() validMessage: DBCustomSelectProps[\"validMessage\"];\n @Prop() required: DBCustomSelectProps[\"required\"];\n @Event() dropdownToggle: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onDropdownToggle\"]>[number]\n > | void;\n @Prop() selectAllLabel: DBCustomSelectProps[\"selectAllLabel\"];\n @Prop() removeTagsTexts: DBCustomSelectProps[\"removeTagsTexts\"];\n @Prop() placement: DBCustomSelectProps[\"placement\"];\n @Event() optionSelected: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onOptionSelected\"]>[number]\n > | void;\n @Event() search: EventEmitter<\n Parameters<Required<DBCustomSelectProps>[\"onSearch\"]>[number]\n > | void;\n @Prop() searchFilter: DBCustomSelectProps[\"searchFilter\"];\n @Prop({attribute: \"classname\"}) className: DBCustomSelectProps[\"className\"];\n @Prop() formFieldWidth: DBCustomSelectProps[\"formFieldWidth\"];\n @Prop() variant: DBCustomSelectProps[\"variant\"];\n @Prop() showLabel: DBCustomSelectProps[\"showLabel\"];\n @Prop() icon: DBCustomSelectProps[\"icon\"];\n @Prop() showIcon: DBCustomSelectProps[\"showIcon\"];\n @Prop() label: DBCustomSelectProps[\"label\"];\n @Prop() form: DBCustomSelectProps[\"form\"];\n @Prop() name: DBCustomSelectProps[\"name\"];\n @Prop() disabled: DBCustomSelectProps[\"disabled\"];\n @Prop() open: DBCustomSelectProps[\"open\"];\n @Prop() dropdownWidth: DBCustomSelectProps[\"dropdownWidth\"];\n @Prop() searchLabel: DBCustomSelectProps[\"searchLabel\"];\n @Prop() searchPlaceholder: DBCustomSelectProps[\"searchPlaceholder\"];\n @Prop() showLoading: DBCustomSelectProps[\"showLoading\"];\n @Prop() ariaListLabel: DBCustomSelectProps[\"ariaListLabel\"];\n @Prop() noResultsText: DBCustomSelectProps[\"noResultsText\"];\n @Prop() loadingText: DBCustomSelectProps[\"loadingText\"];\n @Prop() mobileCloseButtonText: DBCustomSelectProps[\"mobileCloseButtonText\"];\n @Prop() showClearSelection: DBCustomSelectProps[\"showClearSelection\"] = true;\n @Prop() clearSelectionText: DBCustomSelectProps[\"clearSelectionText\"] =\n \"Clear selection\";\n @Prop() placeholder: DBCustomSelectProps[\"placeholder\"];\n @Prop() messageIcon: DBCustomSelectProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _selectId = undefined;\n @State() _labelId = undefined;\n @State() _summaryId = undefined;\n @State() _placeholderId = undefined;\n @State() _infoTextId = undefined;\n @State() _validity = \"no-validation\";\n @State() _descByIds = \"\";\n @State() _selectedLabels = \"\";\n @State() _selectedLabelsId = undefined;\n @State() _voiceOverFallback = \"\";\n @State() _selectedOptions = [];\n @State() selectAllEnabled = false;\n @State() searchEnabled = false;\n @State() amountOptions = 0;\n @State() _values = [];\n @State() _options = [];\n @State() _hasNoOptions = false;\n @State() _documentClickListenerCallbackId = undefined;\n @State() _internalChangeTimestamp = 0;\n @State() _documentScrollListenerCallbackId = undefined;\n @State() _observer = undefined;\n @State() _searchValue = undefined;\n @State() selectAllChecked = false;\n @State() selectAllIndeterminate = false;\n\n handleDocumentScroll(event: any) {\n if (event?.target?.contains && event?.target?.contains(this.detailsRef)) {\n this.handleAutoPlacement();\n }\n }\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n if (this.selectRef) {\n this.selectRef.value = this.getNativeSelectValue();\n }\n /* For a11y reasons we need to map the correct message with the select */\n if (!this.selectRef?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this.selectRef?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n this._validity = this.validation ?? \"invalid\";\n } else if (\n this.hasValidState() &&\n this.selectRef?.validity.valid &&\n this.required\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n this._validity = this.validation ?? \"valid\";\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n this._validity = this.validation ?? \"no-validation\";\n } else {\n this._descByIds = this._placeholderId;\n this._validity = this.validation ?? \"no-validation\";\n }\n }\n handleDropdownToggle(event: GeneralEvent<HTMLDetailsElement>) {\n if (this.dropdownToggle) {\n event.stopPropagation();\n this.dropdownToggle.emit(event);\n }\n if (event.target instanceof HTMLDetailsElement && event.target.open) {\n this._documentClickListenerCallbackId =\n new DocumentClickListener().addCallback((event) =>\n this.handleDocumentClose(event)\n );\n this._documentScrollListenerCallbackId =\n new DocumentScrollListener().addCallback((event) =>\n this.handleDocumentScroll(event)\n );\n this.handleAutoPlacement();\n this._observer?.observe(this.detailsRef);\n if (!event.target.dataset[\"test\"]) {\n // We need this workaround for snapshot testing\n this.handleOpenByKeyboardFocus();\n }\n } else {\n if (this._documentClickListenerCallbackId) {\n new DocumentClickListener().removeCallback(\n this._documentClickListenerCallbackId!\n );\n }\n if (this._documentScrollListenerCallbackId) {\n new DocumentScrollListener().removeCallback(\n this._documentScrollListenerCallbackId!\n );\n }\n this._observer?.unobserve(this.detailsRef);\n }\n }\n getNativeSelectValue() {\n if (this._values?.length) {\n return this._values!.at(0) ?? \"\";\n }\n return \"\";\n }\n setDescById(descId?: string) {\n const descByIds: string[] = [];\n if (descId) {\n descByIds.push(descId);\n }\n if (this._selectedLabelsId && this._selectedLabels?.length) {\n descByIds.push(this._selectedLabelsId!);\n }\n this._descByIds = descByIds.join(\" \");\n }\n getSelectAllLabel() {\n return this.selectAllLabel ?? DEFAULT_LABEL;\n }\n getOptionLabel(option: CustomSelectOptionType) {\n return option.label ?? option.value?.toString() ?? \"\";\n }\n getOptionChecked(value?: string) {\n if (value && this._values?.includes) {\n return this._values?.includes(value!);\n }\n return false;\n }\n getTagRemoveLabel(index: number) {\n if (this.removeTagsTexts && this.removeTagsTexts!.length > index) {\n return this.removeTagsTexts!.at(index)!;\n } else {\n return `${DEFAULT_REMOVE} ${\n this._selectedOptions\n ? this.getOptionLabel(this._selectedOptions![index])\n : \"\"\n }`;\n }\n }\n handleTagRemove(\n option: CustomSelectOptionType,\n event?: ClickEvent<HTMLButtonElement> | void\n ) {\n if (event) {\n event.stopPropagation();\n }\n this.handleSelect(option.value);\n this.handleSummaryFocus();\n }\n handleAutoPlacement() {\n if (this.detailsRef) {\n const dropdown = this.detailsRef.querySelector(\"article\");\n if (dropdown) {\n // This is a workaround for Angular\n delay(() => {\n handleFixedDropdown(\n dropdown,\n this.detailsRef,\n (this.placement as unknown as string) ?? \"bottom\"\n );\n }, 1);\n }\n }\n }\n handleArrowDownUp(event: any) {\n if (this.detailsRef?.open) {\n if (self.document) {\n const activeElement = self.document.activeElement;\n if (activeElement) {\n // 1. we check if we are currently focusing a checkbox in the dropdown\n const isCheckbox =\n activeElement.getAttribute(\"type\") === \"checkbox\" ||\n activeElement.getAttribute(\"type\") === \"radio\";\n if (isCheckbox) {\n const listElement = activeElement?.closest(\"li\");\n if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n if (listElement?.nextElementSibling) {\n listElement?.nextElementSibling\n ?.querySelector(\"input\")\n ?.focus();\n } else {\n // We are on the last checkbox we move to the top checkbox\n this.handleFocusFirstDropdownCheckbox(activeElement);\n }\n } else {\n if (listElement?.previousElementSibling) {\n listElement?.previousElementSibling\n ?.querySelector(\"input\")\n ?.focus();\n } else if (\n this.detailsRef.querySelector(`input[type=\"checkbox\"]`) !==\n activeElement\n ) {\n // We are on the top list checkbox but there is a select all checkbox as well\n this.handleFocusFirstDropdownCheckbox(activeElement);\n } else {\n // We are on the top checkbox, we need to move to the search\n // or to the last checkbox\n const search = getSearchInput(this.detailsRef);\n if (search) {\n delay(() => {\n search.focus();\n }, 100);\n } else {\n const checkboxList: HTMLInputElement[] = Array.from(\n this.detailsRef?.querySelectorAll(\n `input[type=\"checkbox\"],input[type=\"radio\"]`\n )\n );\n if (checkboxList.length) {\n checkboxList.at(-1)?.focus();\n }\n }\n }\n }\n } else {\n // 2. If we are on the search, and press up we go back to summary and close\n if (\n activeElement.getAttribute(\"type\") === \"search\" &&\n (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\")\n ) {\n this.handleClose(undefined, true);\n this.handleSummaryFocus();\n } else {\n // 3. Otherwise, we need to move to the first checkbox\n this.handleFocusFirstDropdownCheckbox(activeElement);\n }\n }\n }\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n // Open dropdown with arrows see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/#keyboardinteraction\n this.handleAutoPlacement();\n if (this.detailsRef) {\n this.detailsRef.open = true;\n }\n this.handleOpenByKeyboardFocus();\n }\n event.stopPropagation();\n event.preventDefault();\n }\n handleKeyboardPress(event: any) {\n event.stopPropagation();\n if (event.key === \"Escape\" && this.detailsRef?.open) {\n this.handleClose(undefined, true);\n this.handleSummaryFocus();\n } else if (\n event.key === \"ArrowDown\" ||\n event.key === \"ArrowUp\" ||\n event.key === \"ArrowLeft\" ||\n event.key === \"ArrowRight\"\n ) {\n this.handleArrowDownUp(event);\n }\n }\n handleClose(\n event?: InteractionEvent<HTMLDetailsElement> | void,\n forceClose?: boolean\n ) {\n if (this.detailsRef) {\n if (forceClose) {\n this.detailsRef.open = false;\n this.handleSummaryFocus();\n } else if (this.detailsRef.open && event) {\n if (event.relatedTarget) {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (!this.detailsRef.contains(relatedTarget)) {\n // We need to use delay here because the combination of `contains`\n // and changing the DOM element causes a race condition inside browser\n delay(() => (this.detailsRef.open = false), 1);\n }\n }\n }\n }\n }\n handleDocumentClose(event: any) {\n if (event) {\n // stencil is sending a custom event which wraps the pointer event into details\n const target =\n typeof event.detail === \"number\" ? event.target : event.detail?.target;\n if (this.detailsRef?.open && !this.detailsRef.contains(target)) {\n this.detailsRef.open = false;\n }\n }\n }\n handleOptionSelected(values: string[]) {\n const skip = new Date().getTime() - this._internalChangeTimestamp < 200;\n if (skip) return;\n this._values = values;\n if (this.optionSelected) {\n this.optionSelected.emit(values ?? []);\n }\n this._internalChangeTimestamp = new Date().getTime();\n }\n handleSelect(value?: string) {\n if (value) {\n if (this.multiple) {\n if (this._values?.includes(value)) {\n this.handleOptionSelected(\n this._values!.filter((v: string) => v !== value)\n );\n } else {\n this.handleOptionSelected([...(this._values || []), value]);\n }\n } else {\n this.handleOptionSelected([value]);\n this.handleClose(undefined, true);\n }\n }\n }\n handleSelectAll(event: any) {\n event.stopPropagation();\n if (this._values?.length === this.amountOptions) {\n this.handleOptionSelected([]);\n } else {\n const searchValue: string | undefined =\n this.searchEnabled && this.searchInputRef\n ? this.searchInputRef.value\n : undefined;\n this.handleOptionSelected(\n this.options\n ? this.options!.filter(\n (option) =>\n !option.isGroupTitle &&\n (!searchValue ||\n option.value\n ?.toLowerCase()\n .includes(searchValue.toLowerCase()))\n ).map((option) => option.value ?? \"\")\n : []\n );\n }\n }\n handleFocusFirstDropdownCheckbox(activeElement?: Element) {\n if (this.detailsRef) {\n const checkboxes: HTMLInputElement[] = Array.from(\n this.detailsRef.querySelectorAll(\n `input[type=\"checkbox\"],input[type=\"radio\"]`\n )\n );\n if (checkboxes.length) {\n const first = checkboxes.at(0);\n const checkbox =\n first === activeElement && checkboxes.length > 1\n ? checkboxes.at(1)\n : first;\n if (checkbox) {\n delay(() => {\n // Takes some time until element can be focused\n (checkbox as HTMLInputElement).focus();\n }, 1);\n }\n }\n }\n }\n handleOpenByKeyboardFocus() {\n if (this.detailsRef) {\n // Focus search if possible\n const search = getSearchInput(this.detailsRef);\n if (search) {\n delay(() => {\n // Takes some time until element can be focused\n search.focus();\n }, 1);\n } else {\n // Focus first checkbox otherwise\n this.handleFocusFirstDropdownCheckbox();\n }\n }\n }\n handleSearch(valueOrEvent?: InputEvent<HTMLInputElement> | string | void) {\n if (valueOrEvent === undefined) {\n return;\n }\n let filterText;\n if (typeof valueOrEvent === \"string\") {\n filterText = valueOrEvent;\n } else {\n const event = valueOrEvent as InputEvent<HTMLInputElement>;\n event.stopPropagation();\n if (this.search) {\n this.search.emit(event);\n }\n filterText = (event.target as HTMLInputElement).value;\n this._searchValue = filterText;\n }\n if (!this.options || !filterText || filterText.length === 0) {\n this._options = this.options;\n } else if (this.searchFilter) {\n this._options = this.options!.filter((option) =>\n this.searchFilter!(option, filterText)\n );\n } else {\n this._options = this.options!.filter(\n (option) =>\n !option.isGroupTitle &&\n this.getOptionLabel(option)\n .toLowerCase()\n .includes(filterText.toLowerCase())\n );\n }\n }\n handleClearAll(event: any) {\n event.stopPropagation();\n this.handleOptionSelected([]);\n this.handleSummaryFocus();\n }\n handleSummaryFocus() {\n if (this.detailsRef) {\n (this.detailsRef as HTMLDetailsElement).querySelector(\"summary\")?.focus();\n }\n }\n satisfyReact = function satisfyReact(event: any) {\n // This is a function to satisfy React\n event.stopPropagation();\n };\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this.detailsRef) {\n this.detailsRef.addEventListener(\n \"focusout\",\n (event: InteractionEvent<HTMLDetailsElement>) => this.handleClose(event)\n );\n }\n }\n\n @Watch(\"detailsRef\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._labelId = this._id + DEFAULT_LABEL_ID_SUFFIX;\n this._selectId = this._id + DEFAULT_SELECT_ID_SUFFIX;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._placeholderId = this._id + DEFAULT_PLACEHOLDER_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this.setDescById(messageId);\n } else {\n this.setDescById();\n }\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n if (this.detailsRef) {\n const summary = this.detailsRef.querySelector(\"summary\");\n if (summary) {\n summary.setAttribute(\n \"aria-describedby\",\n this.ariaDescribedBy ?? (this._descByIds || \"\")\n );\n }\n }\n }\n\n @Watch(\"detailsRef\")\n @Watch(\"_descByIds\")\n watch2() {\n this.watch2Fn();\n }\n\n watch3Fn() {\n if (this.showNoResults !== undefined) {\n this._hasNoOptions = this.showNoResults!;\n } else if (this._options) {\n this._hasNoOptions = this._options!.length === 0;\n }\n }\n\n @Watch(\"showNoResults\")\n @Watch(\"_options\")\n watch3() {\n this.watch3Fn();\n }\n\n watch4Fn() {\n this.selectAllEnabled = Boolean(\n this.multiple && (this.showSelectAll ?? this.amountOptions > 5)\n );\n }\n\n @Watch(\"showSelectAll\")\n @Watch(\"amountOptions\")\n @Watch(\"multiple\")\n watch4() {\n this.watch4Fn();\n }\n\n watch5Fn() {\n this.searchEnabled = this.showSearch ?? this.amountOptions > 9;\n }\n\n @Watch(\"showSearch\")\n @Watch(\"amountOptions\")\n watch5() {\n this.watch5Fn();\n }\n\n watch6Fn() {\n if (\n this.values &&\n Array.isArray(this.values) &&\n this.values !== this._values\n ) {\n this._values = this.values ?? [];\n }\n }\n\n @Watch(\"values\")\n watch6() {\n this.watch6Fn();\n }\n\n watch7Fn() {\n this.handleValidation();\n }\n\n @Watch(\"_values\")\n watch7() {\n this.watch7Fn();\n }\n\n watch8Fn() {\n this._validity = this.validation;\n }\n\n @Watch(\"validation\")\n watch8() {\n this.watch8Fn();\n }\n\n watch9Fn() {\n if (this._values?.length === 0) {\n this.selectAllChecked = false;\n this.selectAllIndeterminate = false;\n } else if (this._values?.length === this.amountOptions) {\n this.selectAllIndeterminate = false;\n this.selectAllChecked = true;\n } else if (this._values) {\n this.selectAllIndeterminate = true;\n }\n }\n\n @Watch(\"_values\")\n @Watch(\"amountOptions\")\n watch9() {\n this.watch9Fn();\n }\n\n watch10Fn() {\n this._options = this.options;\n this.amountOptions =\n this.options?.filter((option) => !option.isGroupTitle).length ?? 0;\n }\n\n @Watch(\"options\")\n watch10() {\n this.watch10Fn();\n }\n\n watch11Fn() {\n this._searchValue = this.searchValue;\n if (this.searchValue) {\n const sValue = this.searchValue!; // <- workaround for Angular\n this.handleSearch(sValue);\n }\n }\n\n @Watch(\"searchValue\")\n watch11() {\n this.watch11Fn();\n }\n\n watch12Fn() {\n if (this.options?.length) {\n this._selectedOptions = this.options?.filter(\n (option: CustomSelectOptionType) => {\n if (!option.value || !this._values?.[\"includes\"]) {\n return false;\n }\n return !option.isGroupTitle && this._values?.includes(option.value);\n }\n );\n }\n }\n\n @Watch(\"options\")\n @Watch(\"_values\")\n watch12() {\n this.watch12Fn();\n }\n\n watch13Fn() {\n if (this.selectedLabels) {\n this._selectedLabels = this.selectedLabels;\n return;\n }\n if (this._selectedOptions?.length) {\n if (this.transformSelectedLabels) {\n // We need to add this to another ``const`` for Angular generated output to work\n const selectedOptions = this._selectedOptions;\n const transformFn = this.transformSelectedLabels!;\n this._selectedLabels = transformFn!(selectedOptions);\n return;\n }\n if (this.selectedType === \"amount\") {\n this._selectedLabels = this.amountText\n ? this.amountText\n : `${this._selectedOptions?.length} ${DEFAULT_SELECTED}`;\n } else {\n this._selectedLabels = this._selectedOptions\n ?.map((option: CustomSelectOptionType) => this.getOptionLabel(option))\n .join(\", \");\n }\n } else {\n this._selectedLabels = \"\";\n }\n }\n\n @Watch(\"_selectedOptions\")\n @Watch(\"selectedType\")\n @Watch(\"amountText\")\n @Watch(\"selectedLabels\")\n @Watch(\"transformSelectedLabels\")\n watch13() {\n this.watch13Fn();\n }\n\n watch14Fn() {\n if (this.amountChange) {\n this.amountChange.emit(this._selectedOptions?.length ?? 0);\n }\n }\n\n @Watch(\"_selectedOptions\")\n watch14() {\n this.watch14Fn();\n }\n\n watch15Fn() {\n if (this.selectAllRef) {\n this.selectAllRef.indeterminate = Boolean(this.selectAllIndeterminate);\n }\n }\n\n @Watch(\"selectAllIndeterminate\")\n @Watch(\"selectAllRef\")\n watch15() {\n this.watch15Fn();\n }\n\n watch16Fn() {\n this._invalidMessage =\n this.invalidMessage ||\n this.selectRef?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"selectRef\")\n @Watch(\"invalidMessage\")\n watch16() {\n this.watch16Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-custom-select\");\n const mId = this.id ?? `custom-select-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._selectId = mId + DEFAULT_SELECT_ID_SUFFIX;\n this._labelId = mId + DEFAULT_LABEL_ID_SUFFIX;\n this._summaryId = mId + \"-summary\";\n this._placeholderId = mId + DEFAULT_PLACEHOLDER_ID_SUFFIX;\n this._selectedLabelsId = mId + \"-selected-labels\";\n this._infoTextId = mId + \"-info\";\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n if (typeof window !== \"undefined\" && \"IntersectionObserver\" in window) {\n this._observer = new IntersectionObserver((payload) => {\n if (this.detailsRef) {\n const entry = payload.find(\n ({ target }) => target === this.detailsRef\n );\n if (entry && !entry.isIntersecting && this.detailsRef.open) {\n this.detailsRef.open = false;\n }\n }\n });\n }\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n this.watch3Fn();\n this.watch4Fn();\n this.watch5Fn();\n this.watch6Fn();\n this.watch7Fn();\n this.watch8Fn();\n this.watch9Fn();\n this.watch10Fn();\n this.watch11Fn();\n this.watch12Fn();\n this.watch13Fn();\n this.watch14Fn();\n this.watch15Fn();\n this.watch16Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-custom-select\", this.className)}\n id={this._id}\n ref={(el: any) => {\n this._ref = el;\n }}\n aria-invalid={this._validity === \"invalid\"}\n data-custom-validity={this._validity}\n data-width={this.formFieldWidth}\n data-variant={\n this.variant === \"floating\" &&\n this.selectedType === \"tag\" &&\n this.multiple\n ? \"above\"\n : this.variant\n }\n data-required={getBooleanAsString(this.required)}\n data-placement={this.placement}\n data-selected-type={this.multiple ? this.selectedType : \"text\"}\n data-hide-label={getHideProp(this.showLabel)}\n data-icon={this.icon}\n data-hide-icon={getHideProp(this.showIcon)}\n >\n <label id={this._labelId}>\n {this.label ?? DEFAULT_LABEL}\n <select\n role=\"none\"\n hidden={true}\n id={this._selectId}\n tabIndex={-1}\n ref={(el: any) => {\n this.selectRef = el;\n }}\n form={this.form}\n name={this.name}\n multiple={getBoolean(this.multiple, \"multiple\")}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n onChange={(event) => this.satisfyReact(event)}\n >\n {this.options?.length\n ? this.options?.map((option) => (\n <option\n disabled={option.disabled}\n value={option.value}\n key={undefined}\n >\n {this.getOptionLabel(option)}\n </option>\n ))\n : null}\n </select>\n </label>\n <details\n ref={(el: any) => {\n this.detailsRef = el;\n }}\n open={this.open}\n onToggle={(event) => this.handleDropdownToggle(event)}\n onKeyDown={(event) => this.handleKeyboardPress(event)}\n >\n <slot></slot>\n {this.options ? (\n <Fragment>\n <summary\n class=\"db-custom-select-form-field\"\n id={this._summaryId}\n aria-disabled={getBooleanAsString(this.disabled)}\n aria-labelledby={this._labelId}\n >\n {this._selectedLabels?.length ? (\n <span\n data-visually-hidden={getBooleanAsString(\n this.selectedType === \"tag\"\n )}\n id={this._selectedLabelsId}\n >\n {this._selectedLabels}\n </span>\n ) : null}\n {this.selectedType === \"tag\" ? (\n <div>\n {this._selectedOptions?.map((option, index) => (\n <db-tag\n emphasis=\"strong\"\n behavior=\"removable\"\n removeButton={this.getTagRemoveLabel(index)}\n onRemove={(event) =>\n this.handleTagRemove(option, event)\n }\n key={undefined}\n >\n {this.getOptionLabel(option)}\n </db-tag>\n ))}\n </div>\n ) : null}\n </summary>\n <db-custom-select-dropdown width={this.dropdownWidth}>\n {this.searchEnabled ? (\n <div>\n <db-input\n type=\"search\"\n ref={(el: any) => {\n this.searchInputRef = el;\n }}\n name={this._id}\n form={this._id}\n showLabel={false}\n value={this._searchValue}\n label={this.searchLabel ?? DEFAULT_LABEL}\n placeholder={this.searchPlaceholder ?? this.searchLabel}\n ariaDescribedBy={\n this._hasNoOptions || this.showLoading\n ? this._infoTextId\n : undefined\n }\n onInput={(event) => this.handleSearch(event)}\n ></db-input>\n </div>\n ) : null}\n {this._hasNoOptions || this.showLoading ? (\n <db-infotext\n id={this._infoTextId}\n icon={this._hasNoOptions ? undefined : \"circular_arrows\"}\n semantic={this._hasNoOptions ? \"warning\" : \"informational\"}\n >\n {(this._hasNoOptions\n ? this.noResultsText\n : this.loadingText) ?? DEFAULT_MESSAGE}\n </db-infotext>\n ) : (\n <Fragment>\n {this.selectAllEnabled ? (\n <div>\n <div class=\"db-checkbox db-custom-select-list-item\">\n <label>\n <input\n type=\"checkbox\"\n value=\"select-all\"\n ref={(el: any) => {\n this.selectAllRef = el;\n }}\n form={this._id}\n checked={this.selectAllChecked}\n onChange={(event) => this.handleSelectAll(event)}\n />\n {this.getSelectAllLabel()}\n </label>\n </div>\n </div>\n ) : null}\n <db-custom-select-list\n multiple={getBoolean(this.multiple, \"multiple\")}\n label={this.ariaListLabel ?? this.label ?? DEFAULT_LABEL}\n >\n {this._options?.map((option) => (\n <db-custom-select-list-item\n type={this.multiple ? \"checkbox\" : \"radio\"}\n showDivider={option.showDivider}\n icon={option.icon}\n isGroupTitle={option.isGroupTitle}\n groupTitle={this.getOptionLabel(option)}\n name={this._id}\n checked={this.getOptionChecked(option.value)}\n disabled={option.disabled}\n value={option.value}\n onChange={() => this.handleSelect(option.value)}\n key={undefined}\n >\n {!option.isGroupTitle\n ? this.getOptionLabel(option)\n : null}\n </db-custom-select-list-item>\n ))}\n </db-custom-select-list>\n </Fragment>\n )}\n <div>\n <db-button\n variant=\"ghost\"\n width=\"full\"\n icon=\"cross\"\n size=\"small\"\n name={this._id}\n form={this._id}\n onClick={() => this.handleClose(undefined, true)}\n >\n {this.mobileCloseButtonText ?? DEFAULT_CLOSE_BUTTON}\n </db-button>\n </div>\n </db-custom-select-dropdown>\n </Fragment>\n ) : null}\n </details>\n {(this.showClearSelection ?? true) && this._values?.length ? (\n <db-button\n icon=\"cross\"\n variant=\"ghost\"\n size=\"small\"\n noText={true}\n name={this._id}\n form={this._id}\n onClick={(event) => this.handleClearAll(event)}\n >\n {this.clearSelectionText}\n <db-tooltip placement=\"top\">{this.clearSelectionText}</db-tooltip>\n </db-button>\n ) : null}\n <span aria-hidden={getBooleanAsString(true)} id={this._placeholderId}>\n {this.placeholder ?? this.label}\n </span>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}