@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,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
- import { d as delay, g as getBooleanAsString, c as cls } from './index-BgQRUWMZ.js';
2
+ import { d as delay, g as getBooleanAsString, c as cls } from './index-YECpAE3G.js';
3
3
  import { b as handleFixedPopover } from './floating-components-BLKCMo7A.js';
4
- import { D as DocumentScrollListener } from './document-scroll-listener-CwWQuwL5.js';
4
+ import { D as DocumentScrollListener } from './document-scroll-listener-DC7DAxof.js';
5
5
 
6
6
  const DBPopover = class {
7
7
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-Ctmm4hMW.js';
2
- import { u as uuid, b as getBoolean, j as getHideProp, c as cls } from './index-BgQRUWMZ.js';
2
+ import { u as uuid, b as getBoolean, j as getHideProp, c as cls } from './index-YECpAE3G.js';
3
3
 
4
4
  const DBRadio = class {
5
5
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
- import { u as uuid, c as cls } from './index-BgQRUWMZ.js';
2
+ import { u as uuid, c as cls } from './index-YECpAE3G.js';
3
3
  import { D as DEFAULT_ID } from './constants-DC9V_oNU.js';
4
4
 
5
5
  const DBSection = class {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Ctmm4hMW.js';
2
- import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, b as getBoolean, j as getHideProp, c as cls } from './index-BgQRUWMZ.js';
2
+ import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, b as getBoolean, j as getHideProp, c as cls } from './index-YECpAE3G.js';
3
3
  import { l as DEFAULT_INVALID_MESSAGE, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, f as DEFAULT_MESSAGE_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, a as DEFAULT_LABEL } from './constants-DC9V_oNU.js';
4
4
 
5
5
  const DBSelect = class {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
- import { g as getBooleanAsString, c as cls } from './index-BgQRUWMZ.js';
2
+ import { g as getBooleanAsString, c as cls } from './index-YECpAE3G.js';
3
3
 
4
4
  const DBStack = class {
5
5
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-Ctmm4hMW.js';
2
- import { b as getBoolean, u as uuid, g as getBooleanAsString, j as getHideProp, c as cls } from './index-BgQRUWMZ.js';
2
+ import { b as getBoolean, u as uuid, g as getBooleanAsString, j as getHideProp, c as cls } from './index-YECpAE3G.js';
3
3
 
4
4
  const DBSwitch = class {
5
5
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-Ctmm4hMW.js';
2
- import { g as getBooleanAsString, j as getHideProp, b as getBoolean, c as cls, u as uuid } from './index-BgQRUWMZ.js';
2
+ import { g as getBooleanAsString, j as getHideProp, b as getBoolean, c as cls, u as uuid } from './index-YECpAE3G.js';
3
3
  import { D as DEFAULT_ID } from './constants-DC9V_oNU.js';
4
4
 
5
5
  const DBTabItem = class {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Ctmm4hMW.js';
2
- import { u as uuid, c as cls } from './index-BgQRUWMZ.js';
2
+ import { u as uuid, c as cls } from './index-YECpAE3G.js';
3
3
 
4
4
  const DBTabs = class {
5
5
  constructor(hostRef) {
@@ -102,10 +102,13 @@ const DBTabs = class {
102
102
  handleChange(event) {
103
103
  var _a, _b;
104
104
  event.stopPropagation();
105
- const list = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest("ul");
105
+ const closest = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest;
106
+ if (!closest)
107
+ return;
108
+ const list = closest("ul");
106
109
  const listItem =
107
110
  // db-tab-item for angular and stencil wrapping elements
108
- (_b = event.target.closest("db-tab-item")) !== null && _b !== void 0 ? _b : event.target.closest("li");
111
+ (_b = closest("db-tab-item")) !== null && _b !== void 0 ? _b : closest("li");
109
112
  if (list !== null && listItem !== null) {
110
113
  const indices = Array.from(list.childNodes).indexOf(listItem);
111
114
  if (this.indexChange) {
@@ -182,10 +185,10 @@ const DBTabs = class {
182
185
  }
183
186
  render() {
184
187
  var _a, _b, _c, _d;
185
- return (h("div", { key: 'efdab501a5c293282a7de44b6a8d16a8a8cf4960', class: cls("db-tabs", this.className), ref: (el) => {
188
+ return (h("div", { key: '0985f8b421830546a2942eacba5768a2cb473aa5', class: cls("db-tabs", this.className), ref: (el) => {
186
189
  this._ref = el;
187
190
  }, id: this._id, "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-alignment": (_a = this.alignment) !== null && _a !== void 0 ? _a : "start", "data-width": (_b = this.width) !== null && _b !== void 0 ? _b : "auto", onInput: (event) => this.handleChange(event) }, this.showScrollLeft ? (h("db-button", { class: "tabs-scroll-left", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, "Scroll left")) : null, this.tabs ? (h(Fragment, null, h("db-tab-list", null, (_c = this.convertTabs()) === null || _c === void 0 ? void 0 : _c.map((tab, index) => (h("db-tab-item", { key: this.name + "tab-item" + index, active: tab.active, label: tab.label, iconAfter: tab.iconAfter, icon: tab.icon, noText: tab.noText })))), (_d = this.convertTabs()) === null || _d === void 0 ? void 0 :
188
- _d.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: 'b8e93e34b3ac44cdf845fb1c75da72cd980f54f0' })));
191
+ _d.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: 'ce4ad1e3a2dfdac38051896d1a4ebe556ccc45f8' })));
189
192
  }
190
193
  static get watchers() { return {
191
194
  "_ref": ["watch0"],
@@ -1 +1 @@
1
- {"version":3,"file":"db-tabs.entry.js","sources":["src/components/tabs/tabs.tsx"],"sourcesContent":["import { DBSimpleTabProps, DBTabsProps, DBTabsState } from \"./model\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBTabList } from \"../tab-list/tab-list\";\nimport { DBTabItem } from \"../tab-item/tab-item\";\nimport { DBTabPanel } from \"../tab-panel/tab-panel\";\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-tabs\",\n})\nexport class DBTabs {\n private _ref!: HTMLDivElement | any;\n @Prop() id: DBTabsProps[\"id\"];\n @Prop() name: DBTabsProps[\"name\"];\n @Prop() tabs: DBTabsProps[\"tabs\"];\n @Prop() arrowScrollDistance: DBTabsProps[\"arrowScrollDistance\"];\n @Prop() orientation: DBTabsProps[\"orientation\"];\n @Prop() behavior: DBTabsProps[\"behavior\"];\n @Prop() initialSelectedMode: DBTabsProps[\"initialSelectedMode\"];\n @Prop() initialSelectedIndex: DBTabsProps[\"initialSelectedIndex\"];\n @Event() indexChange: EventEmitter<\n Parameters<Required<DBTabsProps>[\"onIndexChange\"]>[number]\n > | void;\n @Event() tabSelect: EventEmitter<\n Parameters<Required<DBTabsProps>[\"onTabSelect\"]>[number]\n > | void;\n @Prop({attribute: \"classname\"}) className: DBTabsProps[\"className\"];\n @Prop() alignment: DBTabsProps[\"alignment\"];\n @Prop() width: DBTabsProps[\"width\"];\n @State() _id = \"tabs-\" + uuid();\n @State() _name = \"\";\n @State() initialized = false;\n @State() showScrollLeft = false;\n @State() showScrollRight = false;\n @State() scrollContainer = null;\n\n convertTabs() {\n try {\n if (typeof this.tabs === \"string\") {\n return JSON.parse(this.tabs as string);\n }\n return this.tabs as DBSimpleTabProps[];\n } catch (error) {\n console.error(error);\n }\n return [];\n }\n evaluateScrollButtons(tList: Element) {\n const needsScroll = tList.scrollWidth > tList.clientWidth;\n this.showScrollLeft = needsScroll && tList.scrollLeft > 1;\n this.showScrollRight =\n needsScroll && tList.scrollLeft < tList.scrollWidth - tList.clientWidth;\n }\n scroll(left?: boolean) {\n let step = Number(this.arrowScrollDistance) || 100;\n if (left) {\n step *= -1;\n }\n this.scrollContainer?.scrollBy({\n top: 0,\n left: step,\n behavior: \"smooth\",\n });\n }\n initTabList() {\n if (this._ref) {\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const container: HTMLElement | null =\n tabList.querySelector('[role=\"tablist\"]');\n if (container) {\n container.setAttribute(\n \"aria-orientation\",\n this.orientation || \"horizontal\"\n );\n if (this.behavior === \"arrows\") {\n this.scrollContainer = container;\n this.evaluateScrollButtons(container);\n container.addEventListener(\"scroll\", () => {\n this.evaluateScrollButtons(container);\n });\n }\n }\n }\n }\n }\n initTabs(init?: boolean) {\n if (this._ref) {\n const tabItems = Array.from<Element>(\n this._ref.getElementsByClassName(\"db-tab-item\")\n );\n const tabPanels = Array.from<Element>(\n this._ref.querySelectorAll(\n \":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)\"\n )\n );\n for (const tabItem of tabItems) {\n const index: number = tabItems.indexOf(tabItem);\n const label = tabItem.querySelector(\"label\");\n const input = tabItem.querySelector(\"input\");\n if (input && label) {\n if (!input.id) {\n const tabId = `${this._name}-tab-${index}`;\n label.setAttribute(\"for\", tabId);\n input.id = tabId;\n input.setAttribute(\"name\", this._name);\n if (tabPanels.length > index) {\n input.setAttribute(\n \"aria-controls\",\n `${this._name}-tab-panel-${index}`\n );\n }\n }\n if (init) {\n // Auto select\n const autoSelect =\n !this.initialSelectedMode || this.initialSelectedMode === \"auto\";\n const shouldAutoSelect =\n (this.initialSelectedIndex == null && index === 0) ||\n Number(this.initialSelectedIndex) === index;\n if (autoSelect && shouldAutoSelect) {\n input.click();\n }\n }\n }\n }\n for (const panel of tabPanels) {\n if (panel.id) continue;\n const index: number = tabPanels.indexOf(panel);\n panel.id = `${this._name}-tab-panel-${index}`;\n panel.setAttribute(\"aria-labelledby\", `${this._name}-tab-${index}`);\n }\n }\n }\n handleChange(event: any) {\n event.stopPropagation();\n const list = event.target?.closest(\"ul\");\n const listItem =\n // db-tab-item for angular and stencil wrapping elements\n event.target.closest(\"db-tab-item\") ?? event.target.closest(\"li\");\n if (list !== null && listItem !== null) {\n const indices = Array.from(list.childNodes).indexOf(listItem);\n if (this.indexChange) {\n this.indexChange.emit(indices);\n }\n }\n if (this.tabSelect) {\n this.tabSelect.emit(event);\n }\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._ref && this.initialized) {\n this.initTabList();\n this.initTabs(true);\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.removedNodes.length || mutation.addedNodes.length) {\n this.initTabList();\n this.initTabs();\n }\n });\n });\n observer.observe(tabList, {\n childList: true,\n subtree: true,\n });\n }\n this.initialized = false;\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tabs\");\n this._id = this.id || this._id;\n this._name = `tabs-${this.name || uuid()}`;\n this.initialized = true;\n this.watch0Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tabs\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-orientation={this.orientation}\n data-scroll-behavior={this.behavior}\n data-alignment={this.alignment ?? \"start\"}\n data-width={this.width ?? \"auto\"}\n onInput={(event) => this.handleChange(event)}\n >\n {this.showScrollLeft ? (\n <db-button\n class=\"tabs-scroll-left\"\n variant=\"ghost\"\n icon=\"chevron_left\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll(true)}\n >\n Scroll left\n </db-button>\n ) : null}\n {this.tabs ? (\n <Fragment>\n <db-tab-list>\n {this.convertTabs()?.map((tab, index) => (\n <db-tab-item\n key={this.name + \"tab-item\" + index}\n active={tab.active}\n label={tab.label}\n iconAfter={tab.iconAfter}\n icon={tab.icon}\n noText={tab.noText}\n ></db-tab-item>\n ))}\n </db-tab-list>\n {this.convertTabs()?.map((tab, index) => (\n <db-tab-panel\n key={this.name + \"tab-panel\" + index}\n content={tab.content}\n >\n {tab.children}\n </db-tab-panel>\n ))}\n </Fragment>\n ) : null}\n {this.showScrollRight ? (\n <db-button\n class=\"tabs-scroll-right\"\n variant=\"ghost\"\n icon=\"chevron_right\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll()}\n >\n Scroll right\n </db-button>\n ) : null}\n <slot></slot>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;MA0Ba,MAAM,GAAA,MAAA;AAHlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAsBU,QAAA,IAAA,CAAA,GAAG,GAAG,OAAO,GAAG,IAAI,EAAE;AACtB,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE;AACV,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AACnB,QAAA,IAAc,CAAA,cAAA,GAAG,KAAK;AACtB,QAAA,IAAe,CAAA,eAAA,GAAG,KAAK;AACvB,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAoQhC;IAlQC,WAAW,GAAA;AACT,QAAA,IAA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AAC,MAAM,EAAE,EAAA,EAAA,cAAA,CAGlB,IACV,IAAI,EACR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT;;;;;;;;;;"}
1
+ {"version":3,"file":"db-tabs.entry.js","sources":["src/components/tabs/tabs.tsx"],"sourcesContent":["import { DBSimpleTabProps, DBTabsProps, DBTabsState } from \"./model\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBTabList } from \"../tab-list/tab-list\";\nimport { DBTabItem } from \"../tab-item/tab-item\";\nimport { DBTabPanel } from \"../tab-panel/tab-panel\";\nimport { InputEvent } from \"../../shared/model\";\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-tabs\",\n})\nexport class DBTabs {\n private _ref!: HTMLDivElement | any;\n @Prop() id: DBTabsProps[\"id\"];\n @Prop() name: DBTabsProps[\"name\"];\n @Prop() tabs: DBTabsProps[\"tabs\"];\n @Prop() arrowScrollDistance: DBTabsProps[\"arrowScrollDistance\"];\n @Prop() orientation: DBTabsProps[\"orientation\"];\n @Prop() behavior: DBTabsProps[\"behavior\"];\n @Prop() initialSelectedMode: DBTabsProps[\"initialSelectedMode\"];\n @Prop() initialSelectedIndex: DBTabsProps[\"initialSelectedIndex\"];\n @Event() indexChange: EventEmitter<\n Parameters<Required<DBTabsProps>[\"onIndexChange\"]>[number]\n > | void;\n @Event() tabSelect: EventEmitter<\n Parameters<Required<DBTabsProps>[\"onTabSelect\"]>[number]\n > | void;\n @Prop({attribute: \"classname\"}) className: DBTabsProps[\"className\"];\n @Prop() alignment: DBTabsProps[\"alignment\"];\n @Prop() width: DBTabsProps[\"width\"];\n @State() _id = \"tabs-\" + uuid();\n @State() _name = \"\";\n @State() initialized = false;\n @State() showScrollLeft = false;\n @State() showScrollRight = false;\n @State() scrollContainer = null;\n\n convertTabs() {\n try {\n if (typeof this.tabs === \"string\") {\n return JSON.parse(this.tabs as string);\n }\n return this.tabs as DBSimpleTabProps[];\n } catch (error) {\n console.error(error);\n }\n return [];\n }\n evaluateScrollButtons(tList: Element) {\n const needsScroll = tList.scrollWidth > tList.clientWidth;\n this.showScrollLeft = needsScroll && tList.scrollLeft > 1;\n this.showScrollRight =\n needsScroll && tList.scrollLeft < tList.scrollWidth - tList.clientWidth;\n }\n scroll(left?: boolean) {\n let step = Number(this.arrowScrollDistance) || 100;\n if (left) {\n step *= -1;\n }\n this.scrollContainer?.scrollBy({\n top: 0,\n left: step,\n behavior: \"smooth\",\n });\n }\n initTabList() {\n if (this._ref) {\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const container: HTMLElement | null =\n tabList.querySelector('[role=\"tablist\"]');\n if (container) {\n container.setAttribute(\n \"aria-orientation\",\n this.orientation || \"horizontal\"\n );\n if (this.behavior === \"arrows\") {\n this.scrollContainer = container;\n this.evaluateScrollButtons(container);\n container.addEventListener(\"scroll\", () => {\n this.evaluateScrollButtons(container);\n });\n }\n }\n }\n }\n }\n initTabs(init?: boolean) {\n if (this._ref) {\n const tabItems = Array.from<Element>(\n this._ref.getElementsByClassName(\"db-tab-item\")\n );\n const tabPanels = Array.from<Element>(\n this._ref.querySelectorAll(\n \":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)\"\n )\n );\n for (const tabItem of tabItems) {\n const index: number = tabItems.indexOf(tabItem);\n const label = tabItem.querySelector(\"label\");\n const input = tabItem.querySelector(\"input\");\n if (input && label) {\n if (!input.id) {\n const tabId = `${this._name}-tab-${index}`;\n label.setAttribute(\"for\", tabId);\n input.id = tabId;\n input.setAttribute(\"name\", this._name);\n if (tabPanels.length > index) {\n input.setAttribute(\n \"aria-controls\",\n `${this._name}-tab-panel-${index}`\n );\n }\n }\n if (init) {\n // Auto select\n const autoSelect =\n !this.initialSelectedMode || this.initialSelectedMode === \"auto\";\n const shouldAutoSelect =\n (this.initialSelectedIndex == null && index === 0) ||\n Number(this.initialSelectedIndex) === index;\n if (autoSelect && shouldAutoSelect) {\n input.click();\n }\n }\n }\n }\n for (const panel of tabPanels) {\n if (panel.id) continue;\n const index: number = tabPanels.indexOf(panel);\n panel.id = `${this._name}-tab-panel-${index}`;\n panel.setAttribute(\"aria-labelledby\", `${this._name}-tab-${index}`);\n }\n }\n }\n handleChange(event: InputEvent<HTMLElement>) {\n event.stopPropagation();\n const closest: ((element: string) => HTMLElement | null) | undefined = (\n event.target as any\n )?.closest;\n if (!closest) return;\n const list = closest(\"ul\");\n const listItem =\n // db-tab-item for angular and stencil wrapping elements\n closest(\"db-tab-item\") ?? closest(\"li\");\n if (list !== null && listItem !== null) {\n const indices = Array.from(list.childNodes).indexOf(listItem);\n if (this.indexChange) {\n this.indexChange.emit(indices);\n }\n }\n if (this.tabSelect) {\n this.tabSelect.emit(event);\n }\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._ref && this.initialized) {\n this.initTabList();\n this.initTabs(true);\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.removedNodes.length || mutation.addedNodes.length) {\n this.initTabList();\n this.initTabs();\n }\n });\n });\n observer.observe(tabList, {\n childList: true,\n subtree: true,\n });\n }\n this.initialized = false;\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tabs\");\n this._id = this.id || this._id;\n this._name = `tabs-${this.name || uuid()}`;\n this.initialized = true;\n this.watch0Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tabs\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-orientation={this.orientation}\n data-scroll-behavior={this.behavior}\n data-alignment={this.alignment ?? \"start\"}\n data-width={this.width ?? \"auto\"}\n onInput={(event) => this.handleChange(event)}\n >\n {this.showScrollLeft ? (\n <db-button\n class=\"tabs-scroll-left\"\n variant=\"ghost\"\n icon=\"chevron_left\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll(true)}\n >\n Scroll left\n </db-button>\n ) : null}\n {this.tabs ? (\n <Fragment>\n <db-tab-list>\n {this.convertTabs()?.map((tab, index) => (\n <db-tab-item\n key={this.name + \"tab-item\" + index}\n active={tab.active}\n label={tab.label}\n iconAfter={tab.iconAfter}\n icon={tab.icon}\n noText={tab.noText}\n ></db-tab-item>\n ))}\n </db-tab-list>\n {this.convertTabs()?.map((tab, index) => (\n <db-tab-panel\n key={this.name + \"tab-panel\" + index}\n content={tab.content}\n >\n {tab.children}\n </db-tab-panel>\n ))}\n </Fragment>\n ) : null}\n {this.showScrollRight ? (\n <db-button\n class=\"tabs-scroll-right\"\n variant=\"ghost\"\n icon=\"chevron_right\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll()}\n >\n Scroll right\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,CAAA,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,MAClC,CAAA,CAAA,cAAA,EAAA,EACE,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG,WAAW,GAAG,KAAK,EACpC,OAAO,EAAE,GAAG,CAAC,OAAO,IAEnB,GAAG,CAAC,QAAQ,CACA,CAChB,CAAC,CACO,IACT,IAAI,EACP,IAAI,CAAC,eAAe,IACnB,iBACE,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,eAAe,EACpB,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,EAAE,EAAA,EAAA,cAAA,CAGlB,IACV,IAAI,EACR,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACT;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-Ctmm4hMW.js';
2
- import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getNumber, b as getBoolean, j as getHideProp, c as cls } from './index-BgQRUWMZ.js';
2
+ import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getNumber, b as getBoolean, j as getHideProp, c as cls } from './index-YECpAE3G.js';
3
3
  import { l as DEFAULT_INVALID_MESSAGE, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, f as DEFAULT_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, b as DEFAULT_PLACEHOLDER, r as DEFAULT_ROWS, a as DEFAULT_LABEL } from './constants-DC9V_oNU.js';
4
4
 
5
5
  const DBTextarea = class {
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h } from './index-Ctmm4hMW.js';
2
- import { d as delay, u as uuid, g as getBooleanAsString, c as cls } from './index-BgQRUWMZ.js';
2
+ import { d as delay, u as uuid, g as getBooleanAsString, c as cls } from './index-YECpAE3G.js';
3
3
  import { D as DEFAULT_ID } from './constants-DC9V_oNU.js';
4
4
  import { b as handleFixedPopover } from './floating-components-BLKCMo7A.js';
5
- import { D as DocumentScrollListener } from './document-scroll-listener-CwWQuwL5.js';
5
+ import { D as DocumentScrollListener } from './document-scroll-listener-DC7DAxof.js';
6
6
 
7
7
  const DBTooltip = class {
8
8
  constructor(hostRef) {
@@ -1,4 +1,4 @@
1
- import { u as uuid } from './index-BgQRUWMZ.js';
1
+ import { u as uuid } from './index-YECpAE3G.js';
2
2
 
3
3
  class DocumentClickListener {
4
4
  static runCallbacks(event) {
@@ -30,6 +30,6 @@ DocumentClickListener.callbacks = {};
30
30
  DocumentClickListener._instance = null;
31
31
 
32
32
  export { DocumentClickListener as D };
33
- //# sourceMappingURL=document-click-listener-CG0rJGJ-.js.map
33
+ //# sourceMappingURL=document-click-listener-B4S1N-ro.js.map
34
34
 
35
- //# sourceMappingURL=document-click-listener-CG0rJGJ-.js.map
35
+ //# sourceMappingURL=document-click-listener-B4S1N-ro.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-click-listener-CG0rJGJ-.js","sources":["src/utils/document-click-listener.ts"],"sourcesContent":["import { uuid } from './index';\nexport class DocumentClickListener {\n private static callbacks: Record<string, (event: any) => void> = {};\n private static _instance: DocumentClickListener | null = null;\n private static runCallbacks(event: any) {\n for (const callback of Object.values(DocumentClickListener.callbacks)) {\n if (typeof callback === 'function') {\n callback(event);\n }\n }\n }\n constructor() {\n if (DocumentClickListener._instance) {\n return DocumentClickListener._instance;\n }\n DocumentClickListener._instance = this;\n if (self.document) {\n self.document.addEventListener('click', event => DocumentClickListener.runCallbacks(event));\n }\n }\n public addCallback(callback: (event: any) => void) {\n const callbackID = uuid();\n DocumentClickListener.callbacks[callbackID] = callback;\n return callbackID;\n }\n public removeCallback(id: string) {\n delete DocumentClickListener.callbacks[id];\n }\n}"],"names":[],"mappings":";;MACa,qBAAqB,CAAA;IAGxB,OAAO,YAAY,CAAC,KAAU,EAAA;AACpC,QAAA,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE;AACrE,YAAA,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBAClC,QAAQ,CAAC,KAAK,CAAC;;;;AAIrB,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,qBAAqB,CAAC,SAAS,EAAE;YACnC,OAAO,qBAAqB,CAAC,SAAS;;AAExC,QAAA,qBAAqB,CAAC,SAAS,GAAG,IAAI;AACtC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,qBAAqB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;;;AAGxF,IAAA,WAAW,CAAC,QAA8B,EAAA;AAC/C,QAAA,MAAM,UAAU,GAAG,IAAI,EAAE;AACzB,QAAA,qBAAqB,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ;AACtD,QAAA,OAAO,UAAU;;AAEZ,IAAA,cAAc,CAAC,EAAU,EAAA;AAC9B,QAAA,OAAO,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;;;AAxB7B,qBAAS,CAAA,SAAA,GAAyC,EAAE;AACpD,qBAAS,CAAA,SAAA,GAAiC,IAAI;;;;"}
1
+ {"version":3,"file":"document-click-listener-B4S1N-ro.js","sources":["src/utils/document-click-listener.ts"],"sourcesContent":["import { uuid } from './index';\nexport class DocumentClickListener {\n private static callbacks: Record<string, (event: any) => void> = {};\n private static _instance: DocumentClickListener | null = null;\n private static runCallbacks(event: any) {\n for (const callback of Object.values(DocumentClickListener.callbacks)) {\n if (typeof callback === 'function') {\n callback(event);\n }\n }\n }\n constructor() {\n if (DocumentClickListener._instance) {\n return DocumentClickListener._instance;\n }\n DocumentClickListener._instance = this;\n if (self.document) {\n self.document.addEventListener('click', event => DocumentClickListener.runCallbacks(event));\n }\n }\n public addCallback(callback: (event: any) => void) {\n const callbackID = uuid();\n DocumentClickListener.callbacks[callbackID] = callback;\n return callbackID;\n }\n public removeCallback(id: string) {\n delete DocumentClickListener.callbacks[id];\n }\n}"],"names":[],"mappings":";;MACa,qBAAqB,CAAA;IAGxB,OAAO,YAAY,CAAC,KAAU,EAAA;AACpC,QAAA,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE;AACrE,YAAA,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBAClC,QAAQ,CAAC,KAAK,CAAC;;;;AAIrB,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,qBAAqB,CAAC,SAAS,EAAE;YACnC,OAAO,qBAAqB,CAAC,SAAS;;AAExC,QAAA,qBAAqB,CAAC,SAAS,GAAG,IAAI;AACtC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,IAAI,qBAAqB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;;;AAGxF,IAAA,WAAW,CAAC,QAA8B,EAAA;AAC/C,QAAA,MAAM,UAAU,GAAG,IAAI,EAAE;AACzB,QAAA,qBAAqB,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ;AACtD,QAAA,OAAO,UAAU;;AAEZ,IAAA,cAAc,CAAC,EAAU,EAAA;AAC9B,QAAA,OAAO,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;;;AAxB7B,qBAAS,CAAA,SAAA,GAAyC,EAAE;AACpD,qBAAS,CAAA,SAAA,GAAiC,IAAI;;;;"}
@@ -1,4 +1,4 @@
1
- import { u as uuid } from './index-BgQRUWMZ.js';
1
+ import { u as uuid } from './index-YECpAE3G.js';
2
2
 
3
3
  class DocumentScrollListener {
4
4
  static runCallbacks(event) {
@@ -39,6 +39,6 @@ DocumentScrollListener.callbacks = {};
39
39
  DocumentScrollListener._instance = null;
40
40
 
41
41
  export { DocumentScrollListener as D };
42
- //# sourceMappingURL=document-scroll-listener-CwWQuwL5.js.map
42
+ //# sourceMappingURL=document-scroll-listener-DC7DAxof.js.map
43
43
 
44
- //# sourceMappingURL=document-scroll-listener-CwWQuwL5.js.map
44
+ //# sourceMappingURL=document-scroll-listener-DC7DAxof.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-scroll-listener-CwWQuwL5.js","sources":["src/utils/document-scroll-listener.ts"],"sourcesContent":["import { uuid } from './index';\nexport class DocumentScrollListener {\n private static callbacks: Record<string, (event: any) => void> = {};\n private static _instance: DocumentScrollListener | null = null;\n private static runCallbacks(event: any) {\n for (const callback of Object.values(DocumentScrollListener.callbacks)) {\n if (typeof callback === 'function') {\n callback(event);\n }\n }\n }\n private ticking = false;\n constructor() {\n if (DocumentScrollListener._instance) {\n return DocumentScrollListener._instance;\n }\n DocumentScrollListener._instance = this;\n if (self.document) {\n self.document.addEventListener('scroll', event => {\n if (!this.ticking) {\n window.requestAnimationFrame(() => {\n DocumentScrollListener.runCallbacks(event);\n this.ticking = false;\n });\n this.ticking = true;\n }\n }, true);\n }\n }\n public addCallback(callback: (event: any) => void) {\n const callbackID = uuid();\n DocumentScrollListener.callbacks[callbackID] = callback;\n return callbackID;\n }\n public removeCallback(id: string) {\n delete DocumentScrollListener.callbacks[id];\n }\n}"],"names":[],"mappings":";;MACa,sBAAsB,CAAA;IAGzB,OAAO,YAAY,CAAC,KAAU,EAAA;AACpC,QAAA,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;AACtE,YAAA,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBAClC,QAAQ,CAAC,KAAK,CAAC;;;;AAKrB,IAAA,WAAA,GAAA;QADQ,IAAO,CAAA,OAAA,GAAG,KAAK;AAErB,QAAA,IAAI,sBAAsB,CAAC,SAAS,EAAE;YACpC,OAAO,sBAAsB,CAAC,SAAS;;AAEzC,QAAA,sBAAsB,CAAC,SAAS,GAAG,IAAI;AACvC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,IAAG;AAC/C,gBAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;AACjB,oBAAA,MAAM,CAAC,qBAAqB,CAAC,MAAK;AAChC,wBAAA,sBAAsB,CAAC,YAAY,CAAC,KAAK,CAAC;AAC1C,wBAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACtB,qBAAC,CAAC;AACF,oBAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;aAEtB,EAAE,IAAI,CAAC;;;AAGL,IAAA,WAAW,CAAC,QAA8B,EAAA;AAC/C,QAAA,MAAM,UAAU,GAAG,IAAI,EAAE;AACzB,QAAA,sBAAsB,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ;AACvD,QAAA,OAAO,UAAU;;AAEZ,IAAA,cAAc,CAAC,EAAU,EAAA;AAC9B,QAAA,OAAO,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC;;;AAjC9B,sBAAS,CAAA,SAAA,GAAyC,EAAzC;AACT,sBAAS,CAAA,SAAA,GAAkC,IAAlC;;;;"}
1
+ {"version":3,"file":"document-scroll-listener-DC7DAxof.js","sources":["src/utils/document-scroll-listener.ts"],"sourcesContent":["import { uuid } from './index';\nexport class DocumentScrollListener {\n private static callbacks: Record<string, (event: any) => void> = {};\n private static _instance: DocumentScrollListener | null = null;\n private static runCallbacks(event: any) {\n for (const callback of Object.values(DocumentScrollListener.callbacks)) {\n if (typeof callback === 'function') {\n callback(event);\n }\n }\n }\n private ticking = false;\n constructor() {\n if (DocumentScrollListener._instance) {\n return DocumentScrollListener._instance;\n }\n DocumentScrollListener._instance = this;\n if (self.document) {\n self.document.addEventListener('scroll', event => {\n if (!this.ticking) {\n window.requestAnimationFrame(() => {\n DocumentScrollListener.runCallbacks(event);\n this.ticking = false;\n });\n this.ticking = true;\n }\n }, true);\n }\n }\n public addCallback(callback: (event: any) => void) {\n const callbackID = uuid();\n DocumentScrollListener.callbacks[callbackID] = callback;\n return callbackID;\n }\n public removeCallback(id: string) {\n delete DocumentScrollListener.callbacks[id];\n }\n}"],"names":[],"mappings":";;MACa,sBAAsB,CAAA;IAGzB,OAAO,YAAY,CAAC,KAAU,EAAA;AACpC,QAAA,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;AACtE,YAAA,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBAClC,QAAQ,CAAC,KAAK,CAAC;;;;AAKrB,IAAA,WAAA,GAAA;QADQ,IAAO,CAAA,OAAA,GAAG,KAAK;AAErB,QAAA,IAAI,sBAAsB,CAAC,SAAS,EAAE;YACpC,OAAO,sBAAsB,CAAC,SAAS;;AAEzC,QAAA,sBAAsB,CAAC,SAAS,GAAG,IAAI;AACvC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,IAAG;AAC/C,gBAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;AACjB,oBAAA,MAAM,CAAC,qBAAqB,CAAC,MAAK;AAChC,wBAAA,sBAAsB,CAAC,YAAY,CAAC,KAAK,CAAC;AAC1C,wBAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACtB,qBAAC,CAAC;AACF,oBAAA,IAAI,CAAC,OAAO,GAAG,IAAI;;aAEtB,EAAE,IAAI,CAAC;;;AAGL,IAAA,WAAW,CAAC,QAA8B,EAAA;AAC/C,QAAA,MAAM,UAAU,GAAG,IAAI,EAAE;AACzB,QAAA,sBAAsB,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,QAAQ;AACvD,QAAA,OAAO,UAAU;;AAEZ,IAAA,cAAc,CAAC,EAAU,EAAA;AAC9B,QAAA,OAAO,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC;;;AAjC9B,sBAAS,CAAA,SAAA,GAAyC,EAAzC;AACT,sBAAS,CAAA,SAAA,GAAkC,IAAlC;;;;"}
@@ -103,8 +103,9 @@ const getOptionKey = (option, prefix) => {
103
103
  const key = (_b = (_a = option.id) !== null && _a !== void 0 ? _a : option.value) !== null && _b !== void 0 ? _b : uuid();
104
104
  return `${prefix}${key}`;
105
105
  };
106
+ const isKeyboardEvent = (event) => event.key !== undefined;
106
107
 
107
- export { addAttributeToChildren as a, getBoolean as b, cls as c, delay as d, getNumber as e, getInputValue as f, getBooleanAsString as g, hasVoiceOver as h, isArrayOfStrings as i, getHideProp as j, getSearchInput as k, getOptionKey as l, stringPropVisible as s, uuid as u };
108
- //# sourceMappingURL=index-BgQRUWMZ.js.map
108
+ export { addAttributeToChildren as a, getBoolean as b, cls as c, delay as d, getNumber as e, getInputValue as f, getBooleanAsString as g, hasVoiceOver as h, isArrayOfStrings as i, getHideProp as j, getSearchInput as k, getOptionKey as l, isKeyboardEvent as m, stringPropVisible as s, uuid as u };
109
+ //# sourceMappingURL=index-YECpAE3G.js.map
109
110
 
110
- //# sourceMappingURL=index-BgQRUWMZ.js.map
111
+ //# sourceMappingURL=index-YECpAE3G.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-YECpAE3G.js","sources":["src/utils/index.ts"],"sourcesContent":["import { ClickEvent, GeneralKeyboardEvent } from '../shared/model';\nexport const uuid = () => {\n if (typeof window !== 'undefined') {\n if (window.crypto?.randomUUID) {\n return window.crypto.randomUUID();\n } else if (window.crypto?.getRandomValues) {\n return window.crypto.getRandomValues(new Uint32Array(3)).join('-');\n }\n }\n return Math.random().toString().substring(2);\n};\nexport const addAttributeToChildren = (element: Element, attribute: {\n key: string;\n value: string;\n}) => {\n const children = element.children;\n Object.values(children).forEach((child: Element) => {\n child.setAttribute(attribute.key, attribute.value);\n if (child.children.length > 0) {\n addAttributeToChildren(child, attribute);\n }\n });\n};\nexport type ClassNameArg = string | {\n [key: string]: boolean | undefined;\n} | undefined;\nexport const cls = (...args: ClassNameArg[]) => {\n let result = '';\n for (const arg of args) {\n if (arg) {\n if (typeof arg === 'string') {\n result += `${arg} `;\n } else {\n for (const key in arg) {\n if (arg[key]) {\n result += `${key} `;\n }\n }\n }\n }\n }\n return result.trim();\n};\nexport const isArrayOfStrings = (value: unknown): value is string[] => Array.isArray(value) && value.every(item => typeof item === 'string');\nconst appleOs = ['Mac', 'iPhone', 'iPad', 'iPod'];\nexport const hasVoiceOver = (): boolean => typeof window !== 'undefined' && appleOs.some(os => window.navigator.userAgent.includes(os));\nexport const delay = (fn: () => void, ms: number) => new Promise(() => setTimeout(fn, ms));\n\n/**\n * Some frameworks like stencil would not add \"true\" as value for a prop\n * if it is used in a framework like angular e.g.: [disabled]=\"myDisabledProp\"\n * @param originBool Some boolean to convert to string\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getBooleanAsString = (originBool?: boolean | string): any => {\n if (originBool === undefined || originBool === null) return;\n if (typeof originBool === 'string') {\n return String(Boolean(originBool));\n }\n return String(originBool);\n};\nexport const getBoolean = (originBool?: boolean | string, propertyName?: string): boolean | undefined => {\n if (originBool === undefined || originBool === null) return;\n if (typeof originBool === 'string' && propertyName) {\n return Boolean(propertyName === originBool || originBool);\n }\n return Boolean(originBool);\n};\nexport const getNumber = (originNumber?: number | string, alternativeNumber?: number | string): number | undefined => {\n if ((originNumber === undefined || originNumber === null) && (alternativeNumber === undefined || alternativeNumber === null)) {\n return;\n }\n return Number(originNumber ?? alternativeNumber);\n};\n\n/**\n * Retrieves the input value based on the provided value and input type.\n *\n * If the input type is \"number\" or \"range\", the value is processed as a number.\n * Otherwise, the value is returned as-is.\n *\n * @param value - The input value, which can be a number, string, or undefined.\n * @param inputType - The type of the input, such as \"number\", \"range\", or other string types.\n * @returns The processed input value as a string, number, or undefined.\n */\nexport const getInputValue = (value?: number | string, inputType?: string): string | number | undefined => {\n return inputType && ['number', 'range'].includes(inputType) ? getNumber(value) : value;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const getHideProp = (show?: boolean | string): any => {\n if (show === undefined || show === null) {\n return undefined;\n }\n return getBooleanAsString(!Boolean(show));\n};\nexport const stringPropVisible = (givenString?: string, showString?: boolean | string) => {\n if (showString === undefined) {\n return !!givenString;\n } else {\n return Boolean(showString) && Boolean(givenString);\n }\n};\nexport const getSearchInput = (element: HTMLElement): HTMLInputElement | null => element.querySelector<HTMLInputElement>(`input[type=\"search\"]`);\nexport const getOptionKey = (option: {\n id?: string;\n value?: string | number | string[] | undefined;\n}, prefix: string) => {\n const key = option.id ?? option.value ?? uuid();\n return `${prefix}${key}`;\n};\nexport const isKeyboardEvent = <T,>(event?: ClickEvent<T> | GeneralKeyboardEvent<T>): event is GeneralKeyboardEvent<T> => (event as GeneralKeyboardEvent<T>).key !== undefined"],"names":[],"mappings":"AACO,MAAM,IAAI,GAAG,MAAK;;AACvB,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,QAAA,IAAI,MAAA,MAAM,CAAC,MAAM,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,UAAU,EAAE;AAC7B,YAAA,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;;AAC5B,aAAA,IAAI,MAAA,MAAM,CAAC,MAAM,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,eAAe,EAAE;AACzC,YAAA,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;AAGtE,IAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9C;MACa,sBAAsB,GAAG,CAAC,O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AAS;IAC1D,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;AACvC,QAAA,OAAO,SAAS;;IAElB,OAAO,kBAAkB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3C;MACa,iBAAiB,GAAG,CAAC,WAAoB,EAAE,UAA6B,KAAI;AACvF,IAAA,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,OAAO,CAAC,CAAC,WAAW;;SACf;QACL,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC;;AAEtD;AACO,MAAM,cAAc,GAAG,CAAC,OAAoB,KAA8B,OAAO,CAAC,aAAa,CAAmB,CAAA,oBAAA,CAAsB;MAClI,YAAY,GAAG,CAAC,MAG5B,EAAE,MAAc,KAAI;;AACnB,IAAA,MAAM,GAAG,GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAM,CAAC,EAAE,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,MAAM,CAAC,KAAK,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,EAAE;AAC/C,IAAA,OAAO,CAAG,EAAA,MAAM,CAAG,EAAA,GAAG,EAAE;AAC1B;AACO,MAAM,eAAe,GAAG,CAAK,KAA+C,KAAwC,KAAiC,CAAC,GAAG,KAAK;;;;"}
package/dist/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import './index-Ctmm4hMW.js';
2
2
  export { x as COLOR, y as COLORS, z as COLORS_SIMPLE, C as COLOR_CONST, w as COLOR_SIMPLE, n as DEFAULT_BACK, p as DEFAULT_BURGER_MENU, s as DEFAULT_CLOSE_BUTTON, j as DEFAULT_DATALIST_ID_SUFFIX, q as DEFAULT_ICON, D as DEFAULT_ID, l as DEFAULT_INVALID_MESSAGE, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, a as DEFAULT_LABEL, d as DEFAULT_LABEL_ID_SUFFIX, c as DEFAULT_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, b as DEFAULT_PLACEHOLDER, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, m as DEFAULT_REMOVE, r as DEFAULT_ROWS, o as DEFAULT_SELECTED, e as DEFAULT_SELECT_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, B as DEFAULT_VIEWPORT, v as DENSITIES, u as DENSITY, t as DENSITY_CONST, E as DESKTOP_VIEWPORT, S as SEMANTIC, A as SEMANTICS, T as TESTING_VIEWPORTS } from './constants-DC9V_oNU.js';
3
- export { a as addAttributeToChildren, c as cls, d as delay, b as getBoolean, g as getBooleanAsString, j as getHideProp, f as getInputValue, e as getNumber, l as getOptionKey, k as getSearchInput, h as hasVoiceOver, i as isArrayOfStrings, s as stringPropVisible, u as uuid } from './index-BgQRUWMZ.js';
3
+ export { a as addAttributeToChildren, c as cls, d as delay, b as getBoolean, g as getBooleanAsString, j as getHideProp, f as getInputValue, e as getNumber, l as getOptionKey, k as getSearchInput, h as hasVoiceOver, i as isArrayOfStrings, m as isKeyboardEvent, s as stringPropVisible, u as uuid } from './index-YECpAE3G.js';
4
4
  export { N as NavigationItemSafeTriangle, i as isEventTargetNavigationItem } from './navigation-C4qTkuYy.js';
5
- import './document-scroll-listener-CwWQuwL5.js';
6
- import './document-click-listener-CG0rJGJ-.js';
5
+ import './document-scroll-listener-DC7DAxof.js';
6
+ import './document-click-listener-B4S1N-ro.js';
7
7
  import './floating-components-BLKCMo7A.js';
8
8
 
9
9
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -1 +1 @@
1
- {"version":3,"file":"index.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: (par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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,gBA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sB,GAAG,CAAC,aAAa,EAAE,4BAA4B,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,iCAAiC,EAAE,YAAY;MAuF5L,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ;;;;"}
@@ -1,4 +1,5 @@
1
1
  import { CustomSelectOptionType, DBCustomSelectProps } from "./model";
2
+ import { ClickEvent, GeneralEvent, InputEvent, InteractionEvent } from "../../shared/model";
2
3
  import { EventEmitter } from "../../stencil-public-runtime";
3
4
  /**
4
5
  * @slot children - This is a default/unnamed slot
@@ -92,25 +93,25 @@ export declare class DBCustomSelect {
92
93
  handleDocumentScroll(event: any): void;
93
94
  hasValidState(): boolean;
94
95
  handleValidation(): void;
95
- handleDropdownToggle(event: any): void;
96
+ handleDropdownToggle(event: GeneralEvent<HTMLDetailsElement>): void;
96
97
  getNativeSelectValue(): any;
97
98
  setDescById(descId?: string): void;
98
99
  getSelectAllLabel(): string;
99
100
  getOptionLabel(option: CustomSelectOptionType): string;
100
101
  getOptionChecked(value?: string): boolean;
101
102
  getTagRemoveLabel(index: number): string;
102
- handleTagRemove(option: CustomSelectOptionType, event: any): void;
103
+ handleTagRemove(option: CustomSelectOptionType, event?: ClickEvent<HTMLButtonElement> | void): void;
103
104
  handleAutoPlacement(): void;
104
105
  handleArrowDownUp(event: any): void;
105
106
  handleKeyboardPress(event: any): void;
106
- handleClose(event: any): void;
107
+ handleClose(event?: InteractionEvent<HTMLDetailsElement> | void, forceClose?: boolean): void;
107
108
  handleDocumentClose(event: any): void;
108
109
  handleOptionSelected(values: string[]): void;
109
110
  handleSelect(value?: string): void;
110
111
  handleSelectAll(event: any): void;
111
112
  handleFocusFirstDropdownCheckbox(activeElement?: Element): void;
112
113
  handleOpenByKeyboardFocus(): void;
113
- handleSearch(event: any): void;
114
+ handleSearch(valueOrEvent?: InputEvent<HTMLInputElement> | string | void): void;
114
115
  handleClearAll(event: any): void;
115
116
  handleSummaryFocus(): void;
116
117
  satisfyReact: (event: any) => void;
@@ -1,4 +1,4 @@
1
- import { BaseFormProps, CloseEventState, CustomFormProps, DocumentScrollState, FormMessageProps, FormState, FromValidState, GlobalProps, GlobalState, IconProps, PlacementVerticalType, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthType } from '../../shared/model';
1
+ import { BaseFormProps, ClickEvent, CloseEventState, CustomFormProps, DocumentScrollState, FormMessageProps, FormState, FromValidState, GeneralEvent, GlobalProps, GlobalState, IconProps, InputEvent, InteractionEvent, PlacementVerticalType, RequiredProps, ShowIconProps, ShowLabelProps, ValidationType, WidthType } from '../../shared/model';
2
2
  import { DBCustomSelectFormFieldDefaultProps } from '../custom-select-form-field/model';
3
3
  import { CustomSelectDropdownWidthType } from '../custom-select-dropdown/model';
4
4
  import { DBCustomSelectListItemExtraProps } from '../custom-select-list-item/model';
@@ -46,19 +46,19 @@ export type DBCustomSelectEvents = {
46
46
  /**
47
47
  * Informs the user when dropdown was toggled.
48
48
  */
49
- onDropdownToggle?: (event: any) => void;
49
+ onDropdownToggle?: (event: GeneralEvent<HTMLDetailsElement>) => void;
50
50
  /**
51
51
  * Informs the user when dropdown was toggled.
52
52
  */
53
- dropdownToggle?: (event: any) => void;
53
+ dropdownToggle?: (event: GeneralEvent<HTMLDetailsElement>) => void;
54
54
  /**
55
55
  * Informs the user when a search was performed.
56
56
  */
57
- onSearch?: (event: any) => void;
57
+ onSearch?: (event: InputEvent<HTMLInputElement>) => void;
58
58
  /**
59
59
  * Informs the user when a search was performed.
60
60
  */
61
- search?: (event: any) => void;
61
+ search?: (event: InputEvent<HTMLInputElement>) => void;
62
62
  };
63
63
  export type DBCustomSelectDefaultProps = {
64
64
  /**
@@ -198,7 +198,7 @@ export type DBCustomSelectDefaultState = {
198
198
  searchEnabled: boolean;
199
199
  amountOptions: number;
200
200
  setDescById: (descId?: string) => void;
201
- handleTagRemove: (option: CustomSelectOptionType, event?: any) => void;
201
+ handleTagRemove: (option: CustomSelectOptionType, event?: ClickEvent<HTMLButtonElement> | void) => void;
202
202
  handleSummaryFocus: () => void;
203
203
  handleSelect: (value?: string) => void;
204
204
  handleSelectAll: (event: any) => void;
@@ -216,4 +216,4 @@ export type DBCustomSelectDefaultState = {
216
216
  selectAllIndeterminate: boolean;
217
217
  handleAutoPlacement: () => void;
218
218
  };
219
- export type DBCustomSelectState = DBCustomSelectDefaultState & GlobalState & FormState & FromValidState & CloseEventState & DocumentScrollState;
219
+ export type DBCustomSelectState = DBCustomSelectDefaultState & GlobalState & FormState & FromValidState & CloseEventState<InteractionEvent<HTMLDetailsElement>> & DocumentScrollState;
@@ -1,4 +1,5 @@
1
1
  import { DBDrawerProps } from "./model";
2
+ import { ClickEvent, GeneralKeyboardEvent } from "../../shared/model";
2
3
  import { EventEmitter } from "../../stencil-public-runtime";
3
4
  /**
4
5
  * @slot children - This is a default/unnamed slot
@@ -8,8 +9,8 @@ export declare class DBDrawer {
8
9
  private _ref;
9
10
  private dialogContainerRef;
10
11
  open: DBDrawerProps["open"];
11
- backdrop: DBDrawerProps["backdrop"];
12
12
  close: EventEmitter<Parameters<Required<DBDrawerProps>["onClose"]>[number]> | void;
13
+ backdrop: DBDrawerProps["backdrop"];
13
14
  variant: DBDrawerProps["variant"];
14
15
  id: DBDrawerProps["id"];
15
16
  className: DBDrawerProps["className"];
@@ -19,7 +20,7 @@ export declare class DBDrawer {
19
20
  rounded: DBDrawerProps["rounded"];
20
21
  closeButtonId: DBDrawerProps["closeButtonId"];
21
22
  closeButtonText: DBDrawerProps["closeButtonText"];
22
- handleClose(event: any, forceClose?: boolean): void;
23
+ handleClose(event?: ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement> | void, forceClose?: boolean): void;
23
24
  handleDialogOpen(): void;
24
25
  /**
25
26
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -1,4 +1,4 @@
1
- import { CloseEventProps, CloseEventState, GlobalProps, GlobalState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';
1
+ import { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';
2
2
  export declare const DrawerBackdropList: readonly ["none", "strong", "weak", "invisible"];
3
3
  export type DrawerBackdropType = (typeof DrawerBackdropList)[number];
4
4
  export declare const DrawerDirectionList: readonly ["left", "right", "up", "down"];
@@ -34,8 +34,8 @@ export type DBDrawerDefaultProps = {
34
34
  */
35
35
  variant?: DrawerVariantType;
36
36
  };
37
- export type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CloseEventProps & InnerCloseButtonProps & WidthProps & SpacingProps;
37
+ export type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CloseEventProps<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InnerCloseButtonProps & WidthProps & SpacingProps;
38
38
  export type DBDrawerDefaultState = {
39
39
  handleDialogOpen: () => void;
40
40
  };
41
- export type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState;
41
+ export type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>>;
@@ -1,4 +1,4 @@
1
- import { CloseEventProps, CloseEventState, GlobalProps, GlobalState, IconProps, InnerCloseButtonProps, PopoverProps, SemanticProps, ShowIconProps, TextProps } from '../../shared/model';
1
+ import { ClickEvent, CloseEventProps, CloseEventState, GlobalProps, GlobalState, IconProps, InnerCloseButtonProps, PopoverProps, SemanticProps, ShowIconProps, TextProps } from '../../shared/model';
2
2
  export declare const NotificationVariantList: readonly ["docked", "standalone", "overlay"];
3
3
  export type NotificationVariantType = (typeof NotificationVariantList)[number];
4
4
  export declare const NotificationLinkVariantList: readonly ["block", "inline"];
@@ -52,6 +52,6 @@ export type DBNotificationDefaultProps = {
52
52
  */
53
53
  variant?: NotificationVariantType;
54
54
  };
55
- export type DBNotificationProps = DBNotificationDefaultProps & GlobalProps & CloseEventProps & IconProps & SemanticProps & InnerCloseButtonProps & PopoverProps & ShowIconProps & TextProps;
55
+ export type DBNotificationProps = DBNotificationDefaultProps & GlobalProps & CloseEventProps<ClickEvent<HTMLButtonElement>> & IconProps & SemanticProps & InnerCloseButtonProps & PopoverProps & ShowIconProps & TextProps;
56
56
  export type DBNotificationDefaultState = {};
57
- export type DBNotificationState = DBNotificationDefaultState & GlobalState & CloseEventState;
57
+ export type DBNotificationState = DBNotificationDefaultState & GlobalState & CloseEventState<ClickEvent<HTMLButtonElement>>;
@@ -25,7 +25,7 @@ export declare class DBNotification {
25
25
  closeable: DBNotificationProps["closeable"];
26
26
  closeButtonId: DBNotificationProps["closeButtonId"];
27
27
  closeButtonText: DBNotificationProps["closeButtonText"];
28
- handleClose(event: ClickEvent<HTMLButtonElement> | any): void;
28
+ handleClose(event?: ClickEvent<HTMLButtonElement> | void): void;
29
29
  /**
30
30
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
31
31
  * @param element the ref for the component