@db-ux/wc-core-components 3.0.2-copilot2-e7bf98b → 3.0.2-shell2-badc28f

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 (558) hide show
  1. package/README.md +0 -10
  2. package/dist/cjs/{constants-CTtyzyuo.js → constants-BOd99bQT.js} +7 -2
  3. package/dist/cjs/constants-BOd99bQT.js.map +1 -0
  4. package/dist/cjs/db-accordion-item.cjs.entry.js +2 -2
  5. package/dist/cjs/db-accordion.cjs.entry.js +2 -2
  6. package/dist/cjs/db-badge.cjs.entry.js +2 -2
  7. package/dist/cjs/db-button.cjs.entry.js +2 -2
  8. package/dist/cjs/db-card.cjs.entry.js +3 -3
  9. package/dist/cjs/db-checkbox.cjs.entry.js +6 -6
  10. package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -1
  11. package/dist/cjs/db-checkbox.entry.cjs.js.map +1 -1
  12. package/dist/cjs/db-control-panel-brand.cjs.entry.js +57 -0
  13. package/dist/cjs/db-control-panel-brand.cjs.entry.js.map +1 -0
  14. package/dist/cjs/db-control-panel-brand.entry.cjs.js.map +1 -0
  15. package/dist/cjs/db-control-panel-desktop.cjs.entry.js +91 -0
  16. package/dist/cjs/db-control-panel-desktop.cjs.entry.js.map +1 -0
  17. package/dist/cjs/db-control-panel-desktop.entry.cjs.js.map +1 -0
  18. package/dist/cjs/db-control-panel-flat-icon-navigation.cjs.entry.js +76 -0
  19. package/dist/cjs/db-control-panel-flat-icon-navigation.cjs.entry.js.map +1 -0
  20. package/dist/cjs/db-control-panel-flat-icon-navigation.entry.cjs.js.map +1 -0
  21. package/dist/cjs/{db-brand.cjs.entry.js → db-control-panel-meta-navigation.cjs.entry.js} +8 -10
  22. package/dist/cjs/db-control-panel-meta-navigation.cjs.entry.js.map +1 -0
  23. package/dist/cjs/db-control-panel-meta-navigation.entry.cjs.js.map +1 -0
  24. package/dist/cjs/db-control-panel-mobile.cjs.entry.js +76 -0
  25. package/dist/cjs/db-control-panel-mobile.cjs.entry.js.map +1 -0
  26. package/dist/cjs/db-control-panel-mobile.entry.cjs.js.map +1 -0
  27. package/dist/cjs/db-control-panel-primary-actions.cjs.entry.js +55 -0
  28. package/dist/cjs/db-control-panel-primary-actions.cjs.entry.js.map +1 -0
  29. package/dist/cjs/db-control-panel-primary-actions.entry.cjs.js.map +1 -0
  30. package/dist/cjs/db-control-panel-secondary-actions.cjs.entry.js +55 -0
  31. package/dist/cjs/db-control-panel-secondary-actions.cjs.entry.js.map +1 -0
  32. package/dist/cjs/db-control-panel-secondary-actions.entry.cjs.js.map +1 -0
  33. 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
  34. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +13 -13
  35. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js.map +1 -1
  36. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +3 -3
  37. package/dist/cjs/db-custom-select.cjs.entry.js +15 -15
  38. package/dist/cjs/db-custom-select.cjs.entry.js.map +1 -1
  39. package/dist/cjs/db-custom-select.entry.cjs.js.map +1 -1
  40. package/dist/cjs/db-divider.cjs.entry.js +2 -2
  41. package/dist/cjs/db-drawer.cjs.entry.js +6 -6
  42. package/dist/cjs/db-drawer.cjs.entry.js.map +1 -1
  43. package/dist/cjs/db-drawer.entry.cjs.js.map +1 -1
  44. package/dist/cjs/db-icon.cjs.entry.js +2 -2
  45. package/dist/cjs/db-infotext.cjs.entry.js +2 -2
  46. package/dist/cjs/db-link.cjs.entry.js +2 -2
  47. package/dist/cjs/db-navigation-item-group.cjs.entry.js +159 -0
  48. package/dist/cjs/db-navigation-item-group.cjs.entry.js.map +1 -0
  49. package/dist/cjs/db-navigation-item-group.entry.cjs.js.map +1 -0
  50. package/dist/cjs/db-navigation-item.cjs.entry.js +4 -72
  51. package/dist/cjs/db-navigation-item.cjs.entry.js.map +1 -1
  52. package/dist/cjs/db-navigation-item.entry.cjs.js.map +1 -1
  53. package/dist/cjs/db-navigation.cjs.entry.js +112 -6
  54. package/dist/cjs/db-navigation.cjs.entry.js.map +1 -1
  55. package/dist/cjs/db-navigation.entry.cjs.js.map +1 -1
  56. package/dist/cjs/db-notification.cjs.entry.js +4 -4
  57. package/dist/cjs/db-popover.cjs.entry.js +5 -6
  58. package/dist/cjs/db-popover.cjs.entry.js.map +1 -1
  59. package/dist/cjs/db-popover.entry.cjs.js.map +1 -1
  60. package/dist/cjs/db-radio.cjs.entry.js +2 -2
  61. package/dist/cjs/db-section.cjs.entry.js +4 -4
  62. package/dist/cjs/db-select.cjs.entry.js +7 -7
  63. package/dist/cjs/db-select.cjs.entry.js.map +1 -1
  64. package/dist/cjs/db-select.entry.cjs.js.map +1 -1
  65. package/dist/cjs/db-shell-sub-navigation.cjs.entry.js +71 -0
  66. package/dist/cjs/db-shell-sub-navigation.cjs.entry.js.map +1 -0
  67. package/dist/cjs/db-shell-sub-navigation.entry.cjs.js.map +1 -0
  68. package/dist/cjs/{db-page.cjs.entry.js → db-shell.cjs.entry.js} +9 -15
  69. package/dist/cjs/db-shell.cjs.entry.js.map +1 -0
  70. package/dist/cjs/db-shell.entry.cjs.js.map +1 -0
  71. package/dist/cjs/db-stack.cjs.entry.js +3 -3
  72. package/dist/cjs/db-switch.cjs.entry.js +2 -2
  73. package/dist/cjs/db-tab-item_3.cjs.entry.js +8 -8
  74. package/dist/cjs/db-tabs.cjs.entry.js +5 -5
  75. package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
  76. package/dist/cjs/db-tabs.entry.cjs.js.map +1 -1
  77. package/dist/cjs/db-textarea.cjs.entry.js +6 -6
  78. package/dist/cjs/db-textarea.cjs.entry.js.map +1 -1
  79. package/dist/cjs/db-textarea.entry.cjs.js.map +1 -1
  80. package/dist/cjs/db-tooltip.cjs.entry.js +7 -8
  81. package/dist/cjs/db-tooltip.cjs.entry.js.map +1 -1
  82. package/dist/cjs/db-tooltip.entry.cjs.js.map +1 -1
  83. package/dist/cjs/db-ux.cjs.js +3 -3
  84. package/dist/cjs/db-ux.cjs.js.map +1 -1
  85. package/dist/cjs/{floating-components-ogUqz72V.js → floating-components-DSENlGvK.js} +78 -50
  86. package/dist/cjs/floating-components-DSENlGvK.js.map +1 -0
  87. package/dist/cjs/{index-9urL1KCD.js → index-B1qpUQFv.js} +9 -3
  88. package/dist/cjs/index-B1qpUQFv.js.map +1 -0
  89. package/dist/cjs/index.cjs.js +21 -11
  90. package/dist/cjs/index.cjs.js.map +1 -1
  91. package/dist/cjs/loader.cjs.js +2 -2
  92. package/dist/cjs/{navigation-DauGE-qj.js → navigation-DWSyoPJm.js} +38 -21
  93. package/dist/cjs/navigation-DWSyoPJm.js.map +1 -0
  94. package/dist/collection/collection-manifest.json +14 -7
  95. package/dist/collection/components/button/button.js +1 -1
  96. package/dist/collection/components/card/card.js +2 -2
  97. package/dist/collection/components/checkbox/checkbox.js +4 -4
  98. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  99. package/dist/collection/components/{brand/brand.js → control-panel-brand/control-panel-brand.js} +22 -47
  100. package/dist/collection/components/control-panel-brand/control-panel-brand.js.map +1 -0
  101. package/dist/collection/components/control-panel-brand/index.js +3 -0
  102. package/dist/collection/components/control-panel-brand/index.js.map +1 -0
  103. package/dist/collection/components/control-panel-brand/model.js.map +1 -0
  104. package/dist/collection/components/control-panel-desktop/control-panel-desktop.js +267 -0
  105. package/dist/collection/components/control-panel-desktop/control-panel-desktop.js.map +1 -0
  106. package/dist/collection/components/control-panel-desktop/index.js +3 -0
  107. package/dist/collection/components/control-panel-desktop/index.js.map +1 -0
  108. package/dist/collection/components/control-panel-desktop/model.js.map +1 -0
  109. package/dist/collection/components/control-panel-flat-icon-navigation/control-panel-flat-icon-navigation.js +162 -0
  110. package/dist/collection/components/control-panel-flat-icon-navigation/control-panel-flat-icon-navigation.js.map +1 -0
  111. package/dist/collection/components/control-panel-flat-icon-navigation/index.js +3 -0
  112. package/dist/collection/components/control-panel-flat-icon-navigation/index.js.map +1 -0
  113. package/dist/collection/components/control-panel-flat-icon-navigation/model.js +2 -0
  114. package/dist/collection/components/control-panel-flat-icon-navigation/model.js.map +1 -0
  115. package/dist/collection/components/control-panel-meta-navigation/control-panel-meta-navigation.js +104 -0
  116. package/dist/collection/components/control-panel-meta-navigation/control-panel-meta-navigation.js.map +1 -0
  117. package/dist/collection/components/control-panel-meta-navigation/index.js +3 -0
  118. package/dist/collection/components/control-panel-meta-navigation/index.js.map +1 -0
  119. package/dist/collection/components/control-panel-meta-navigation/model.js +2 -0
  120. package/dist/collection/components/control-panel-meta-navigation/model.js.map +1 -0
  121. package/dist/collection/components/{header/header.js → control-panel-mobile/control-panel-mobile.js} +76 -76
  122. package/dist/collection/components/control-panel-mobile/control-panel-mobile.js.map +1 -0
  123. package/dist/collection/components/control-panel-mobile/index.js +3 -0
  124. package/dist/collection/components/control-panel-mobile/index.js.map +1 -0
  125. package/dist/collection/components/control-panel-mobile/model.js +2 -0
  126. package/dist/collection/components/control-panel-mobile/model.js.map +1 -0
  127. package/dist/collection/components/control-panel-primary-actions/control-panel-primary-actions.js +104 -0
  128. package/dist/collection/components/control-panel-primary-actions/control-panel-primary-actions.js.map +1 -0
  129. package/dist/collection/components/control-panel-primary-actions/index.js +3 -0
  130. package/dist/collection/components/control-panel-primary-actions/index.js.map +1 -0
  131. package/dist/collection/components/control-panel-primary-actions/model.js +2 -0
  132. package/dist/collection/components/control-panel-primary-actions/model.js.map +1 -0
  133. package/dist/collection/components/control-panel-secondary-actions/control-panel-secondary-actions.js +104 -0
  134. package/dist/collection/components/control-panel-secondary-actions/control-panel-secondary-actions.js.map +1 -0
  135. package/dist/collection/components/control-panel-secondary-actions/index.js +3 -0
  136. package/dist/collection/components/control-panel-secondary-actions/index.js.map +1 -0
  137. package/dist/collection/components/control-panel-secondary-actions/model.js +2 -0
  138. package/dist/collection/components/control-panel-secondary-actions/model.js.map +1 -0
  139. package/dist/collection/components/custom-select/custom-select.js +12 -12
  140. package/dist/collection/components/custom-select/custom-select.js.map +1 -1
  141. package/dist/collection/components/custom-select/model.js.map +1 -1
  142. package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +2 -2
  143. package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +2 -2
  144. package/dist/collection/components/custom-select-list/custom-select-list.js +2 -2
  145. package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +1 -1
  146. package/dist/collection/components/divider/divider.js +1 -1
  147. package/dist/collection/components/drawer/drawer.js +30 -5
  148. package/dist/collection/components/drawer/drawer.js.map +1 -1
  149. package/dist/collection/components/drawer/model.js +1 -1
  150. package/dist/collection/components/drawer/model.js.map +1 -1
  151. package/dist/collection/components/icon/icon.js +1 -1
  152. package/dist/collection/components/infotext/infotext.js +1 -1
  153. package/dist/collection/components/input/input.js +4 -4
  154. package/dist/collection/components/input/input.js.map +1 -1
  155. package/dist/collection/components/link/link.js +1 -1
  156. package/dist/collection/components/navigation/model.js.map +1 -1
  157. package/dist/collection/components/navigation/navigation.js +206 -7
  158. package/dist/collection/components/navigation/navigation.js.map +1 -1
  159. package/dist/collection/components/navigation-item/model.js.map +1 -1
  160. package/dist/collection/components/navigation-item/navigation-item.js +9 -238
  161. package/dist/collection/components/navigation-item/navigation-item.js.map +1 -1
  162. package/dist/collection/components/navigation-item-group/index.js +3 -0
  163. package/dist/collection/components/navigation-item-group/index.js.map +1 -0
  164. package/dist/collection/components/navigation-item-group/model.js +2 -0
  165. package/dist/collection/components/navigation-item-group/model.js.map +1 -0
  166. package/dist/collection/components/navigation-item-group/navigation-item-group.js +453 -0
  167. package/dist/collection/components/navigation-item-group/navigation-item-group.js.map +1 -0
  168. package/dist/collection/components/notification/notification.js +2 -2
  169. package/dist/collection/components/popover/popover.js +28 -29
  170. package/dist/collection/components/popover/popover.js.map +1 -1
  171. package/dist/collection/components/radio/radio.js +1 -1
  172. package/dist/collection/components/section/section.js +2 -2
  173. package/dist/collection/components/select/select.js +5 -5
  174. package/dist/collection/components/select/select.js.map +1 -1
  175. package/dist/collection/components/shell/index.js +3 -0
  176. package/dist/collection/components/shell/index.js.map +1 -0
  177. package/dist/collection/components/shell/model.js +2 -0
  178. package/dist/collection/components/shell/model.js.map +1 -0
  179. package/dist/collection/components/shell/shell.js +299 -0
  180. package/dist/collection/components/shell/shell.js.map +1 -0
  181. package/dist/collection/components/shell-sub-navigation/index.js +3 -0
  182. package/dist/collection/components/shell-sub-navigation/index.js.map +1 -0
  183. package/dist/collection/components/shell-sub-navigation/model.js +2 -0
  184. package/dist/collection/components/shell-sub-navigation/model.js.map +1 -0
  185. package/dist/collection/components/{page/page.js → shell-sub-navigation/shell-sub-navigation.js} +43 -94
  186. package/dist/collection/components/shell-sub-navigation/shell-sub-navigation.js.map +1 -0
  187. package/dist/collection/components/stack/stack.js +2 -2
  188. package/dist/collection/components/switch/switch.js +1 -1
  189. package/dist/collection/components/tab-item/tab-item.js +2 -2
  190. package/dist/collection/components/tab-list/tab-list.js +2 -2
  191. package/dist/collection/components/tab-panel/tab-panel.js +2 -2
  192. package/dist/collection/components/tabs/model.js.map +1 -1
  193. package/dist/collection/components/tabs/tabs.js +4 -4
  194. package/dist/collection/components/tabs/tabs.js.map +1 -1
  195. package/dist/collection/components/tag/tag.js +2 -2
  196. package/dist/collection/components/textarea/textarea.js +4 -4
  197. package/dist/collection/components/textarea/textarea.js.map +1 -1
  198. package/dist/collection/components/tooltip/tooltip.js +29 -30
  199. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  200. package/dist/collection/index.js +19 -6
  201. package/dist/collection/index.js.map +1 -1
  202. package/dist/collection/shared/constants.js +3 -0
  203. package/dist/collection/shared/constants.js.map +1 -1
  204. package/dist/collection/shared/model.js +3 -0
  205. package/dist/collection/shared/model.js.map +1 -1
  206. package/dist/collection/utils/floating-components.js +76 -48
  207. package/dist/collection/utils/floating-components.js.map +1 -1
  208. package/dist/collection/utils/navigation.js +34 -22
  209. package/dist/collection/utils/navigation.js.map +1 -1
  210. package/dist/custom-elements.json +7740 -6149
  211. package/dist/db-ux/db-checkbox.entry.esm.js.map +1 -1
  212. package/dist/db-ux/db-control-panel-brand.entry.esm.js.map +1 -0
  213. package/dist/db-ux/db-control-panel-desktop.entry.esm.js.map +1 -0
  214. package/dist/db-ux/db-control-panel-flat-icon-navigation.entry.esm.js.map +1 -0
  215. package/dist/db-ux/db-control-panel-meta-navigation.entry.esm.js.map +1 -0
  216. package/dist/db-ux/db-control-panel-mobile.entry.esm.js.map +1 -0
  217. package/dist/db-ux/db-control-panel-primary-actions.entry.esm.js.map +1 -0
  218. package/dist/db-ux/db-control-panel-secondary-actions.entry.esm.js.map +1 -0
  219. 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
  220. package/dist/db-ux/db-custom-select.entry.esm.js.map +1 -1
  221. package/dist/db-ux/db-drawer.entry.esm.js.map +1 -1
  222. package/dist/db-ux/db-navigation-item-group.entry.esm.js.map +1 -0
  223. package/dist/db-ux/db-navigation-item.entry.esm.js.map +1 -1
  224. package/dist/db-ux/db-navigation.entry.esm.js.map +1 -1
  225. package/dist/db-ux/db-popover.entry.esm.js.map +1 -1
  226. package/dist/db-ux/db-select.entry.esm.js.map +1 -1
  227. package/dist/db-ux/db-shell-sub-navigation.entry.esm.js.map +1 -0
  228. package/dist/db-ux/db-shell.entry.esm.js.map +1 -0
  229. package/dist/db-ux/db-tabs.entry.esm.js.map +1 -1
  230. package/dist/db-ux/db-textarea.entry.esm.js.map +1 -1
  231. package/dist/db-ux/db-tooltip.entry.esm.js.map +1 -1
  232. package/dist/db-ux/db-ux.esm.js +1 -1
  233. package/dist/db-ux/db-ux.esm.js.map +1 -1
  234. package/dist/db-ux/index.esm.js +1 -1
  235. package/dist/db-ux/index.esm.js.map +1 -1
  236. package/dist/db-ux/p-0262e847.entry.js +2 -0
  237. package/dist/db-ux/p-0262e847.entry.js.map +1 -0
  238. package/dist/db-ux/p-13f527fb.entry.js +2 -0
  239. package/dist/db-ux/p-13f527fb.entry.js.map +1 -0
  240. package/dist/db-ux/p-1a56dee3.entry.js +2 -0
  241. package/dist/db-ux/p-1a56dee3.entry.js.map +1 -0
  242. package/dist/db-ux/p-1b0815ab.entry.js +2 -0
  243. package/dist/db-ux/p-1b0815ab.entry.js.map +1 -0
  244. package/dist/db-ux/p-1d41f71c.entry.js +2 -0
  245. package/dist/db-ux/p-1d41f71c.entry.js.map +1 -0
  246. package/dist/db-ux/p-1dccdff4.entry.js +2 -0
  247. package/dist/db-ux/p-29dcb78d.entry.js +2 -0
  248. package/dist/db-ux/p-29dcb78d.entry.js.map +1 -0
  249. package/dist/db-ux/p-3f2ab801.entry.js +2 -0
  250. package/dist/db-ux/p-3f2ab801.entry.js.map +1 -0
  251. package/dist/db-ux/p-40e42146.entry.js +2 -0
  252. package/dist/db-ux/p-40e42146.entry.js.map +1 -0
  253. package/dist/db-ux/p-4645cc92.entry.js +2 -0
  254. package/dist/db-ux/{p-c5ff3d3f.entry.js → p-504a9cfc.entry.js} +2 -2
  255. package/dist/db-ux/{p-e6e7719e.entry.js → p-53682d25.entry.js} +2 -2
  256. package/dist/db-ux/p-5be272f0.entry.js +2 -0
  257. package/dist/db-ux/p-5cb180c4.entry.js +2 -0
  258. package/dist/db-ux/p-5cb180c4.entry.js.map +1 -0
  259. package/dist/db-ux/{p-16f1fa7c.entry.js → p-5d292f94.entry.js} +2 -2
  260. package/dist/db-ux/{p-02fcd4a8.entry.js → p-5e4ac324.entry.js} +2 -2
  261. package/dist/db-ux/p-6c023c87.entry.js +2 -0
  262. package/dist/db-ux/p-6c023c87.entry.js.map +1 -0
  263. package/dist/db-ux/{p-f03f7076.entry.js → p-6fd148ce.entry.js} +2 -2
  264. package/dist/db-ux/p-7153636c.entry.js +2 -0
  265. package/dist/db-ux/p-73614370.entry.js +2 -0
  266. package/dist/db-ux/{p-209cf793.entry.js → p-81d7921b.entry.js} +2 -2
  267. package/dist/db-ux/{p-d7168627.entry.js → p-8262ab69.entry.js} +2 -2
  268. package/dist/db-ux/p-8db3c126.entry.js +2 -0
  269. package/dist/db-ux/{p-d6aeabf0.entry.js.map → p-8db3c126.entry.js.map} +1 -1
  270. package/dist/db-ux/p-99d090b7.entry.js +2 -0
  271. package/dist/db-ux/p-9d18d065.entry.js +2 -0
  272. package/dist/db-ux/p-9d18d065.entry.js.map +1 -0
  273. package/dist/db-ux/p-CZxi1Pek.js +2 -0
  274. package/dist/db-ux/p-CZxi1Pek.js.map +1 -0
  275. package/dist/db-ux/p-D3kmGlOI.js +2 -0
  276. package/dist/db-ux/p-D3kmGlOI.js.map +1 -0
  277. package/dist/db-ux/p-Dst8dqRS.js +2 -0
  278. package/dist/db-ux/p-Dst8dqRS.js.map +1 -0
  279. package/dist/db-ux/p-a652e0d0.entry.js +2 -0
  280. package/dist/db-ux/p-a652e0d0.entry.js.map +1 -0
  281. package/dist/db-ux/{p-bd7d1646.entry.js → p-b713791b.entry.js} +2 -2
  282. package/dist/db-ux/p-b90f037e.entry.js +2 -0
  283. package/dist/db-ux/p-b90f037e.entry.js.map +1 -0
  284. package/dist/db-ux/p-bb9043b3.entry.js +2 -0
  285. package/dist/db-ux/p-bb9043b3.entry.js.map +1 -0
  286. package/dist/db-ux/p-bbbb47fe.entry.js +2 -0
  287. package/dist/db-ux/p-bbbb47fe.entry.js.map +1 -0
  288. package/dist/db-ux/p-c00303d4.entry.js +2 -0
  289. package/dist/db-ux/p-c00303d4.entry.js.map +1 -0
  290. package/dist/db-ux/p-c841ce92.entry.js +2 -0
  291. package/dist/db-ux/p-c841ce92.entry.js.map +1 -0
  292. package/dist/db-ux/{p-a2b55626.entry.js → p-d6047812.entry.js} +2 -2
  293. package/dist/db-ux/p-d8f87aaa.entry.js +2 -0
  294. package/dist/db-ux/p-d8f87aaa.entry.js.map +1 -0
  295. package/dist/db-ux/p-e39aeff2.entry.js +2 -0
  296. package/dist/db-ux/p-e39aeff2.entry.js.map +1 -0
  297. package/dist/db-ux/p-e418dace.entry.js +2 -0
  298. package/dist/db-ux/p-e418dace.entry.js.map +1 -0
  299. package/dist/db-ux/p-eaa14b89.entry.js +2 -0
  300. package/dist/db-ux/p-eaa14b89.entry.js.map +1 -0
  301. package/dist/db-ux/p-uOzX56mL.js +3 -0
  302. package/dist/db-ux/p-uOzX56mL.js.map +1 -0
  303. package/dist/esm/{constants-DC9V_oNU.js → constants-Dst8dqRS.js} +6 -3
  304. package/dist/esm/constants-Dst8dqRS.js.map +1 -0
  305. package/dist/esm/db-accordion-item.entry.js +2 -2
  306. package/dist/esm/db-accordion.entry.js +2 -2
  307. package/dist/esm/db-badge.entry.js +2 -2
  308. package/dist/esm/db-button.entry.js +2 -2
  309. package/dist/esm/db-card.entry.js +3 -3
  310. package/dist/esm/db-checkbox.entry.js +6 -6
  311. package/dist/esm/db-checkbox.entry.js.map +1 -1
  312. package/dist/esm/db-control-panel-brand.entry.js +55 -0
  313. package/dist/esm/db-control-panel-brand.entry.js.map +1 -0
  314. package/dist/esm/db-control-panel-desktop.entry.js +89 -0
  315. package/dist/esm/db-control-panel-desktop.entry.js.map +1 -0
  316. package/dist/esm/db-control-panel-flat-icon-navigation.entry.js +74 -0
  317. package/dist/esm/db-control-panel-flat-icon-navigation.entry.js.map +1 -0
  318. package/dist/esm/{db-brand.entry.js → db-control-panel-meta-navigation.entry.js} +9 -11
  319. package/dist/esm/db-control-panel-meta-navigation.entry.js.map +1 -0
  320. package/dist/esm/db-control-panel-mobile.entry.js +74 -0
  321. package/dist/esm/db-control-panel-mobile.entry.js.map +1 -0
  322. package/dist/esm/db-control-panel-primary-actions.entry.js +53 -0
  323. package/dist/esm/db-control-panel-primary-actions.entry.js.map +1 -0
  324. package/dist/esm/db-control-panel-secondary-actions.entry.js +53 -0
  325. package/dist/esm/db-control-panel-secondary-actions.entry.js.map +1 -0
  326. 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
  327. package/dist/esm/db-custom-select-dropdown_5.entry.js +13 -13
  328. package/dist/esm/db-custom-select-dropdown_5.entry.js.map +1 -1
  329. package/dist/esm/db-custom-select-form-field.entry.js +3 -3
  330. package/dist/esm/db-custom-select.entry.js +15 -15
  331. package/dist/esm/db-custom-select.entry.js.map +1 -1
  332. package/dist/esm/db-divider.entry.js +2 -2
  333. package/dist/esm/db-drawer.entry.js +6 -6
  334. package/dist/esm/db-drawer.entry.js.map +1 -1
  335. package/dist/esm/db-icon.entry.js +2 -2
  336. package/dist/esm/db-infotext.entry.js +2 -2
  337. package/dist/esm/db-link.entry.js +2 -2
  338. package/dist/esm/db-navigation-item-group.entry.js +157 -0
  339. package/dist/esm/db-navigation-item-group.entry.js.map +1 -0
  340. package/dist/esm/db-navigation-item.entry.js +5 -73
  341. package/dist/esm/db-navigation-item.entry.js.map +1 -1
  342. package/dist/esm/db-navigation.entry.js +113 -7
  343. package/dist/esm/db-navigation.entry.js.map +1 -1
  344. package/dist/esm/db-notification.entry.js +4 -4
  345. package/dist/esm/db-popover.entry.js +5 -6
  346. package/dist/esm/db-popover.entry.js.map +1 -1
  347. package/dist/esm/db-radio.entry.js +2 -2
  348. package/dist/esm/db-section.entry.js +4 -4
  349. package/dist/esm/db-select.entry.js +7 -7
  350. package/dist/esm/db-select.entry.js.map +1 -1
  351. package/dist/esm/db-shell-sub-navigation.entry.js +69 -0
  352. package/dist/esm/db-shell-sub-navigation.entry.js.map +1 -0
  353. package/dist/esm/{db-page.entry.js → db-shell.entry.js} +9 -15
  354. package/dist/esm/db-shell.entry.js.map +1 -0
  355. package/dist/esm/db-stack.entry.js +3 -3
  356. package/dist/esm/db-switch.entry.js +2 -2
  357. package/dist/esm/db-tab-item_3.entry.js +8 -8
  358. package/dist/esm/db-tabs.entry.js +5 -5
  359. package/dist/esm/db-tabs.entry.js.map +1 -1
  360. package/dist/esm/db-textarea.entry.js +6 -6
  361. package/dist/esm/db-textarea.entry.js.map +1 -1
  362. package/dist/esm/db-tooltip.entry.js +7 -8
  363. package/dist/esm/db-tooltip.entry.js.map +1 -1
  364. package/dist/esm/db-ux.js +4 -4
  365. package/dist/esm/db-ux.js.map +1 -1
  366. package/dist/esm/{floating-components-G-TursYV.js → floating-components-D3kmGlOI.js} +78 -50
  367. package/dist/esm/floating-components-D3kmGlOI.js.map +1 -0
  368. package/dist/esm/{index-CNzNv7KB.js → index-uOzX56mL.js} +9 -3
  369. package/dist/esm/index-uOzX56mL.js.map +1 -0
  370. package/dist/esm/index.js +12 -8
  371. package/dist/esm/index.js.map +1 -1
  372. package/dist/esm/loader.js +3 -3
  373. package/dist/esm/{navigation--UdC9CzO.js → navigation-CJ-OxodG.js} +38 -22
  374. package/dist/esm/navigation-CJ-OxodG.js.map +1 -0
  375. package/dist/types/components/control-panel-brand/control-panel-brand.d.ts +21 -0
  376. package/dist/types/components/control-panel-brand/index.d.ts +2 -0
  377. package/dist/types/components/control-panel-brand/model.d.ts +5 -0
  378. package/dist/types/components/control-panel-desktop/control-panel-desktop.d.ts +33 -0
  379. package/dist/types/components/control-panel-desktop/index.d.ts +2 -0
  380. package/dist/types/components/control-panel-desktop/model.d.ts +7 -0
  381. package/dist/types/components/control-panel-flat-icon-navigation/control-panel-flat-icon-navigation.d.ts +22 -0
  382. package/dist/types/components/control-panel-flat-icon-navigation/index.d.ts +2 -0
  383. package/dist/types/components/control-panel-flat-icon-navigation/model.d.ts +7 -0
  384. package/dist/types/components/{brand/brand.d.ts → control-panel-meta-navigation/control-panel-meta-navigation.d.ts} +4 -8
  385. package/dist/types/components/control-panel-meta-navigation/index.d.ts +2 -0
  386. package/dist/types/components/control-panel-meta-navigation/model.d.ts +5 -0
  387. package/dist/types/components/control-panel-mobile/control-panel-mobile.d.ts +32 -0
  388. package/dist/types/components/control-panel-mobile/index.d.ts +2 -0
  389. package/dist/types/components/control-panel-mobile/model.d.ts +30 -0
  390. package/dist/types/components/control-panel-primary-actions/control-panel-primary-actions.d.ts +18 -0
  391. package/dist/types/components/control-panel-primary-actions/index.d.ts +2 -0
  392. package/dist/types/components/control-panel-primary-actions/model.d.ts +5 -0
  393. package/dist/types/components/control-panel-secondary-actions/control-panel-secondary-actions.d.ts +18 -0
  394. package/dist/types/components/control-panel-secondary-actions/index.d.ts +2 -0
  395. package/dist/types/components/control-panel-secondary-actions/model.d.ts +5 -0
  396. package/dist/types/components/custom-select/custom-select.d.ts +1 -1
  397. package/dist/types/components/custom-select/model.d.ts +4 -1
  398. package/dist/types/components/drawer/drawer.d.ts +1 -0
  399. package/dist/types/components/drawer/model.d.ts +5 -1
  400. package/dist/types/components/navigation/model.d.ts +14 -5
  401. package/dist/types/components/navigation/navigation.d.ts +19 -1
  402. package/dist/types/components/navigation-item/model.d.ts +9 -24
  403. package/dist/types/components/navigation-item/navigation-item.d.ts +2 -24
  404. package/dist/types/components/navigation-item-group/index.d.ts +2 -0
  405. package/dist/types/components/navigation-item-group/model.d.ts +26 -0
  406. package/dist/types/components/navigation-item-group/navigation-item-group.d.ts +50 -0
  407. package/dist/types/components/popover/popover.d.ts +1 -1
  408. package/dist/types/components/shell/index.d.ts +2 -0
  409. package/dist/types/components/shell/model.d.ts +50 -0
  410. package/dist/types/components/shell/shell.d.ts +28 -0
  411. package/dist/types/components/shell-sub-navigation/index.d.ts +2 -0
  412. package/dist/types/components/shell-sub-navigation/model.d.ts +5 -0
  413. package/dist/types/components/shell-sub-navigation/shell-sub-navigation.d.ts +24 -0
  414. package/dist/types/components/tabs/model.d.ts +3 -11
  415. package/dist/types/components/tooltip/tooltip.d.ts +1 -1
  416. package/dist/types/components.d.ts +302 -119
  417. package/dist/types/index.d.ts +19 -6
  418. package/dist/types/shared/constants.d.ts +3 -0
  419. package/dist/types/shared/model.d.ts +82 -3
  420. package/dist/types/utils/floating-components.d.ts +17 -1
  421. package/dist/types/utils/navigation.d.ts +2 -6
  422. package/dist/vscode.html-custom-data.json +532 -327
  423. package/dist/web-types.json +1235 -795
  424. package/package.json +5 -7
  425. package/agent/Accordion.md +0 -23
  426. package/agent/AccordionItem.md +0 -29
  427. package/agent/Badge.md +0 -32
  428. package/agent/Brand.md +0 -13
  429. package/agent/Button.md +0 -47
  430. package/agent/Card.md +0 -23
  431. package/agent/Checkbox.md +0 -41
  432. package/agent/CustomSelect.md +0 -54
  433. package/agent/Divider.md +0 -21
  434. package/agent/Drawer.md +0 -71
  435. package/agent/Header.md +0 -29
  436. package/agent/Icon.md +0 -20
  437. package/agent/Infotext.md +0 -25
  438. package/agent/Input.md +0 -48
  439. package/agent/Link.md +0 -52
  440. package/agent/Navigation.md +0 -19
  441. package/agent/NavigationItem.md +0 -29
  442. package/agent/Notification.md +0 -38
  443. package/agent/Page.md +0 -27
  444. package/agent/Popover.md +0 -52
  445. package/agent/Radio.md +0 -28
  446. package/agent/Section.md +0 -21
  447. package/agent/Select.md +0 -62
  448. package/agent/Stack.md +0 -35
  449. package/agent/Switch.md +0 -44
  450. package/agent/TabItem.md +0 -25
  451. package/agent/Tabs.md +0 -61
  452. package/agent/Tag.md +0 -41
  453. package/agent/Textarea.md +0 -44
  454. package/agent/Tooltip.md +0 -37
  455. package/agent/_instructions.md +0 -31
  456. package/dist/cjs/constants-CTtyzyuo.js.map +0 -1
  457. package/dist/cjs/db-brand.cjs.entry.js.map +0 -1
  458. package/dist/cjs/db-brand.entry.cjs.js.map +0 -1
  459. package/dist/cjs/db-header.cjs.entry.js +0 -96
  460. package/dist/cjs/db-header.cjs.entry.js.map +0 -1
  461. package/dist/cjs/db-header.entry.cjs.js.map +0 -1
  462. package/dist/cjs/db-page.cjs.entry.js.map +0 -1
  463. package/dist/cjs/db-page.entry.cjs.js.map +0 -1
  464. package/dist/cjs/floating-components-ogUqz72V.js.map +0 -1
  465. package/dist/cjs/index-9urL1KCD.js.map +0 -1
  466. package/dist/cjs/navigation-DauGE-qj.js.map +0 -1
  467. package/dist/collection/components/brand/brand.js.map +0 -1
  468. package/dist/collection/components/brand/index.js +0 -3
  469. package/dist/collection/components/brand/index.js.map +0 -1
  470. package/dist/collection/components/brand/model.js.map +0 -1
  471. package/dist/collection/components/header/header.js.map +0 -1
  472. package/dist/collection/components/header/index.js +0 -3
  473. package/dist/collection/components/header/index.js.map +0 -1
  474. package/dist/collection/components/header/model.js.map +0 -1
  475. package/dist/collection/components/page/index.js +0 -3
  476. package/dist/collection/components/page/index.js.map +0 -1
  477. package/dist/collection/components/page/model.js +0 -3
  478. package/dist/collection/components/page/model.js.map +0 -1
  479. package/dist/collection/components/page/page.js.map +0 -1
  480. package/dist/db-ux/db-brand.entry.esm.js.map +0 -1
  481. package/dist/db-ux/db-header.entry.esm.js.map +0 -1
  482. package/dist/db-ux/db-page.entry.esm.js.map +0 -1
  483. package/dist/db-ux/p-340bb722.entry.js +0 -2
  484. package/dist/db-ux/p-340bb722.entry.js.map +0 -1
  485. package/dist/db-ux/p-3d7eb768.entry.js +0 -2
  486. package/dist/db-ux/p-3d7eb768.entry.js.map +0 -1
  487. package/dist/db-ux/p-51de401e.entry.js +0 -2
  488. package/dist/db-ux/p-58007675.entry.js +0 -2
  489. package/dist/db-ux/p-58007675.entry.js.map +0 -1
  490. package/dist/db-ux/p-5b45664d.entry.js +0 -2
  491. package/dist/db-ux/p-5c6da0f3.entry.js +0 -2
  492. package/dist/db-ux/p-6e35a260.entry.js +0 -2
  493. package/dist/db-ux/p-6e35a260.entry.js.map +0 -1
  494. package/dist/db-ux/p-72330d25.entry.js +0 -2
  495. package/dist/db-ux/p-72330d25.entry.js.map +0 -1
  496. package/dist/db-ux/p-84dd974f.entry.js +0 -2
  497. package/dist/db-ux/p-84dd974f.entry.js.map +0 -1
  498. package/dist/db-ux/p-8b41c30e.entry.js +0 -2
  499. package/dist/db-ux/p-8b41c30e.entry.js.map +0 -1
  500. package/dist/db-ux/p-971a16c3.entry.js +0 -2
  501. package/dist/db-ux/p-971a16c3.entry.js.map +0 -1
  502. package/dist/db-ux/p-9d0996e9.entry.js +0 -2
  503. package/dist/db-ux/p-CNzNv7KB.js +0 -3
  504. package/dist/db-ux/p-CNzNv7KB.js.map +0 -1
  505. package/dist/db-ux/p-DC9V_oNU.js +0 -2
  506. package/dist/db-ux/p-DC9V_oNU.js.map +0 -1
  507. package/dist/db-ux/p-G-TursYV.js +0 -2
  508. package/dist/db-ux/p-G-TursYV.js.map +0 -1
  509. package/dist/db-ux/p-a3541c03.entry.js +0 -2
  510. package/dist/db-ux/p-a3541c03.entry.js.map +0 -1
  511. package/dist/db-ux/p-c8bdd952.entry.js +0 -2
  512. package/dist/db-ux/p-c8cdde8c.entry.js +0 -2
  513. package/dist/db-ux/p-ce895e0c.entry.js +0 -2
  514. package/dist/db-ux/p-ce895e0c.entry.js.map +0 -1
  515. package/dist/db-ux/p-d4e3d1db.entry.js +0 -2
  516. package/dist/db-ux/p-d4e3d1db.entry.js.map +0 -1
  517. package/dist/db-ux/p-d6aeabf0.entry.js +0 -2
  518. package/dist/db-ux/p-e9c323af.entry.js +0 -2
  519. package/dist/db-ux/p-e9c323af.entry.js.map +0 -1
  520. package/dist/db-ux/p-ec957247.entry.js +0 -2
  521. package/dist/db-ux/p-ec957247.entry.js.map +0 -1
  522. package/dist/db-ux/p-fdf5578d.entry.js +0 -2
  523. package/dist/db-ux/p-fdf5578d.entry.js.map +0 -1
  524. package/dist/db-ux/p-sP2NlPcu.js +0 -2
  525. package/dist/db-ux/p-sP2NlPcu.js.map +0 -1
  526. package/dist/esm/constants-DC9V_oNU.js.map +0 -1
  527. package/dist/esm/db-brand.entry.js.map +0 -1
  528. package/dist/esm/db-header.entry.js +0 -94
  529. package/dist/esm/db-header.entry.js.map +0 -1
  530. package/dist/esm/db-page.entry.js.map +0 -1
  531. package/dist/esm/floating-components-G-TursYV.js.map +0 -1
  532. package/dist/esm/index-CNzNv7KB.js.map +0 -1
  533. package/dist/esm/navigation--UdC9CzO.js.map +0 -1
  534. package/dist/types/components/brand/index.d.ts +0 -2
  535. package/dist/types/components/brand/model.d.ts +0 -10
  536. package/dist/types/components/header/header.d.ts +0 -33
  537. package/dist/types/components/header/index.d.ts +0 -2
  538. package/dist/types/components/header/model.d.ts +0 -44
  539. package/dist/types/components/page/index.d.ts +0 -2
  540. package/dist/types/components/page/model.d.ts +0 -36
  541. package/dist/types/components/page/page.d.ts +0 -25
  542. /package/dist/collection/components/{brand → control-panel-brand}/model.js +0 -0
  543. /package/dist/collection/components/{header → control-panel-desktop}/model.js +0 -0
  544. /package/dist/db-ux/{p-5c6da0f3.entry.js.map → p-1dccdff4.entry.js.map} +0 -0
  545. /package/dist/db-ux/{p-c8bdd952.entry.js.map → p-4645cc92.entry.js.map} +0 -0
  546. /package/dist/db-ux/{p-c5ff3d3f.entry.js.map → p-504a9cfc.entry.js.map} +0 -0
  547. /package/dist/db-ux/{p-e6e7719e.entry.js.map → p-53682d25.entry.js.map} +0 -0
  548. /package/dist/db-ux/{p-51de401e.entry.js.map → p-5be272f0.entry.js.map} +0 -0
  549. /package/dist/db-ux/{p-16f1fa7c.entry.js.map → p-5d292f94.entry.js.map} +0 -0
  550. /package/dist/db-ux/{p-02fcd4a8.entry.js.map → p-5e4ac324.entry.js.map} +0 -0
  551. /package/dist/db-ux/{p-f03f7076.entry.js.map → p-6fd148ce.entry.js.map} +0 -0
  552. /package/dist/db-ux/{p-5b45664d.entry.js.map → p-7153636c.entry.js.map} +0 -0
  553. /package/dist/db-ux/{p-9d0996e9.entry.js.map → p-73614370.entry.js.map} +0 -0
  554. /package/dist/db-ux/{p-209cf793.entry.js.map → p-81d7921b.entry.js.map} +0 -0
  555. /package/dist/db-ux/{p-d7168627.entry.js.map → p-8262ab69.entry.js.map} +0 -0
  556. /package/dist/db-ux/{p-c8cdde8c.entry.js.map → p-99d090b7.entry.js.map} +0 -0
  557. /package/dist/db-ux/{p-bd7d1646.entry.js.map → p-b713791b.entry.js.map} +0 -0
  558. /package/dist/db-ux/{p-a2b55626.entry.js.map → p-d6047812.entry.js.map} +0 -0
@@ -57,7 +57,7 @@ export class DBDrawer {
57
57
  if (this.dialogContainerRef) {
58
58
  this.dialogContainerRef.hidden = true;
59
59
  }
60
- delay(() => {
60
+ void delay(() => {
61
61
  var _a;
62
62
  if (this.dialogContainerRef) {
63
63
  this.dialogContainerRef.hidden = false;
@@ -126,11 +126,11 @@ export class DBDrawer {
126
126
  }
127
127
  render() {
128
128
  var _a;
129
- return (h("dialog", { key: 'bde9fb000bc000b3371ab4e7333ec0b7e802a1d5', class: "db-drawer", id: this.id, ref: (el) => {
129
+ return (h("dialog", { key: 'd1a6b2f5c2a2baeffa2ad7b1b1b366dc6cc4ac34', class: "db-drawer", id: this.id, ref: (el) => {
130
130
  this._ref = el;
131
- }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: '62fb34f827d93c6a52e6dc79fb0970879b07dd72', class: cls("db-drawer-container", this.className), ref: (el) => {
131
+ }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: 'ab857ff08589d6e9cb1b7c77c0eaef433b1cb30d', class: cls("db-drawer-container", this.className), ref: (el) => {
132
132
  this.dialogContainerRef = el;
133
- }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: '81567140972ebb1f244c46227f688f017b2d74da', class: "db-drawer-header" }, h("div", { key: '14fe9424f88dd71bedc5b670edf7d776639ad65f', class: "db-drawer-header-text" }, h("slot", { key: 'e8f703b2d8c81c9e64996f6c8214ae004484698c', name: "drawerHeader" })), h("db-button", { key: '7f18727c2550a75ed735d11b8983b9b6bca0f1d4', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: 'e2b7f182c9f321f5477ee4669451e10935cae010', class: "db-drawer-content" }, h("slot", { key: '23bb4b8cf2c617757379637fab20361b6d4943f2' })))));
133
+ }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: 'd0f1ea96c6826dd253c568dbc2f358acefe448ce', class: "db-drawer-header" }, h("div", { key: '78f28c5d595ecd9da5c0fc9b2dc38dcf1f67589c', class: "db-drawer-header-text" }, this.drawerHeaderPlain ? (this.drawerHeaderPlain) : (h("slot", { name: "drawerHeader" }))), h("db-button", { key: 'e79b4e31f09cc0481e06d866722c60f43d858559', class: "button-close-drawer", icon: "cross", variant: "ghost", type: "button", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: '44913afbc656fde966b0ba3006f8b30a71254198', class: "db-drawer-content" }, h("slot", { key: '83faa8b719f1fd4b30ca448cf9926ba15b1978fd' })))));
134
134
  }
135
135
  static get is() { return "db-drawer"; }
136
136
  static get properties() {
@@ -266,7 +266,7 @@ export class DBDrawer {
266
266
  "mutable": false,
267
267
  "complexType": {
268
268
  "original": "DBDrawerProps[\"direction\"]",
269
- "resolved": "\"down\" | \"left\" | \"right\" | \"up\"",
269
+ "resolved": "\"custom\" | \"down\" | \"left\" | \"right\" | \"up\"",
270
270
  "references": {
271
271
  "DBDrawerProps": {
272
272
  "location": "import",
@@ -385,6 +385,31 @@ export class DBDrawer {
385
385
  "setter": false,
386
386
  "reflect": false
387
387
  },
388
+ "drawerHeaderPlain": {
389
+ "type": "string",
390
+ "attribute": "drawer-header-plain",
391
+ "mutable": false,
392
+ "complexType": {
393
+ "original": "DBDrawerProps[\"drawerHeaderPlain\"]",
394
+ "resolved": "string",
395
+ "references": {
396
+ "DBDrawerProps": {
397
+ "location": "import",
398
+ "path": "./model",
399
+ "id": "src/components/drawer/model.ts::DBDrawerProps"
400
+ }
401
+ }
402
+ },
403
+ "required": false,
404
+ "optional": false,
405
+ "docs": {
406
+ "tags": [],
407
+ "text": ""
408
+ },
409
+ "getter": false,
410
+ "setter": false,
411
+ "reflect": false
412
+ },
388
413
  "closeButtonId": {
389
414
  "type": "string",
390
415
  "attribute": "close-button-id",
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAI9E,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,QAAQ;IAHpB;QAqBU,gBAAW,GAAG,KAAK,CAAC;KA2L9B;IAzLC,WAAW,CACT,KAGQ,EACR,UAAoB;;QAEpB,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,IAAI,eAAe,CAAwC,KAAK,CAAC,EAAE,CAAC;YAClE,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBAC3B,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,UAAU,EAAE,CAAC;gBACf,KAAK,CAAC,eAAe,EAAE,CAAC;gBACxB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;YACD,IACE,CAAA,MAAC,KAAK,CAAC,MAAc,0CAAE,QAAQ,MAAK,QAAQ;gBAC5C,KAAK,CAAC,IAAI,KAAK,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DEFAULT_CLOSE_BUTTON } from \"../../shared/constants\";\nimport { ClickEvent, GeneralKeyboardEvent } from \"../../shared/model\";\nimport { cls, delay, getBooleanAsString, isKeyboardEvent } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBDrawerProps, DBDrawerState } from \"./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 * @slot drawerHeader - TODO: Add description for slotDrawerHeader\n */\n @Component({\n tag: \"db-drawer\",\n})\nexport class DBDrawer {\n private _ref!: HTMLDialogElement | any;\n private dialogContainerRef!: HTMLDivElement | any;\n @Prop() open: DBDrawerProps[\"open\"];\n @Prop() position: DBDrawerProps[\"position\"];\n @Event() close: EventEmitter<\n Parameters<Required<DBDrawerProps>[\"onClose\"]>[number]\n > | void;\n @Prop() backdrop: DBDrawerProps[\"backdrop\"];\n @Prop() variant: DBDrawerProps[\"variant\"];\n @Prop() id: DBDrawerProps[\"id\"];\n @Prop() direction: DBDrawerProps[\"direction\"];\n @Prop({attribute: \"classname\"}) className: DBDrawerProps[\"className\"];\n @Prop() spacing: DBDrawerProps[\"spacing\"];\n @Prop() width: DBDrawerProps[\"width\"];\n @Prop() rounded: DBDrawerProps[\"rounded\"];\n @Prop() closeButtonId: DBDrawerProps[\"closeButtonId\"];\n @Prop() closeButtonText: DBDrawerProps[\"closeButtonText\"];\n @State() initialized = false;\n\n handleClose(\n event?:\n | ClickEvent<HTMLButtonElement | HTMLDialogElement>\n | GeneralKeyboardEvent<HTMLDialogElement>\n | void,\n forceClose?: boolean\n ) {\n if (!event) return;\n if (isKeyboardEvent<HTMLButtonElement | HTMLDialogElement>(event)) {\n if (event.key === \"Escape\") {\n event.preventDefault();\n if (this.close) {\n this.close.emit(event);\n }\n }\n } else {\n if (forceClose) {\n event.stopPropagation();\n if (this.close) {\n this.close.emit(event);\n }\n }\n if (\n (event.target as any)?.nodeName === \"DIALOG\" &&\n event.type === \"click\" &&\n this.backdrop !== \"none\"\n ) {\n if (this.close) {\n this.close.emit(event);\n }\n }\n }\n }\n handleDialogOpen() {\n if (this._ref) {\n const open = Boolean(this.open);\n if (open && !this._ref.open) {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = false;\n }\n if (\n this.position === \"absolute\" ||\n this.backdrop === \"none\" ||\n this.variant === \"inside\"\n ) {\n this._ref.show();\n } else {\n this._ref.showModal();\n }\n }\n if (!open && this._ref.open) {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = true;\n }\n delay(() => {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = false;\n }\n this._ref?.close();\n }, 401);\n }\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 this.handleDialogOpen();\n }\n\n @Watch(\"open\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._ref && this.initialized && this.position === \"absolute\") {\n const refElement = this._ref as HTMLDialogElement;\n const parent = refElement.parentElement;\n if (parent) {\n parent.style.position = \"relative\";\n }\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n @Watch(\"position\")\n watch1() {\n this.watch1Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-drawer\");\n this.handleDialogOpen();\n this.initialized = true;\n this.watch0Fn();\n this.watch1Fn();\n }\n\n render() {\n return (\n <dialog\n class=\"db-drawer\"\n id={this.id}\n ref={(el: any) => {\n this._ref = el;\n }}\n onClick={(event) => this.handleClose(event)}\n onKeyDown={(event) => this.handleClose(event)}\n data-position={this.position}\n data-backdrop={this.backdrop}\n data-direction={this.direction}\n data-variant={this.variant}\n >\n <article\n class={cls(\"db-drawer-container\", this.className)}\n ref={(el: any) => {\n this.dialogContainerRef = el;\n }}\n data-spacing={this.spacing}\n data-width={this.width}\n data-direction={this.direction}\n data-rounded={getBooleanAsString(this.rounded)}\n >\n <header class=\"db-drawer-header\">\n <div class=\"db-drawer-header-text\">\n <slot name=\"drawerHeader\"></slot>\n </div>\n <db-button\n class=\"button-close-drawer\"\n icon=\"cross\"\n variant=\"ghost\"\n id={this.closeButtonId}\n noText={true}\n onClick={(event) => this.handleClose(event, true)}\n >\n {this.closeButtonText ?? DEFAULT_CLOSE_BUTTON}\n </db-button>\n </header>\n <div class=\"db-drawer-content\">\n <slot></slot>\n </div>\n </article>\n </dialog>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DEFAULT_CLOSE_BUTTON } from \"../../shared/constants\";\nimport { ClickEvent, GeneralKeyboardEvent } from \"../../shared/model\";\nimport { cls, delay, getBooleanAsString, isKeyboardEvent } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBDrawerProps, DBDrawerState } from \"./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 * @slot drawerHeader - TODO: Add description for slotDrawerHeader\n */\n @Component({\n tag: \"db-drawer\",\n})\nexport class DBDrawer {\n private _ref!: HTMLDialogElement | any;\n private dialogContainerRef!: HTMLDivElement | any;\n @Prop() open: DBDrawerProps[\"open\"];\n @Prop() position: DBDrawerProps[\"position\"];\n @Event() close: EventEmitter<\n Parameters<Required<DBDrawerProps>[\"onClose\"]>[number]\n > | void;\n @Prop() backdrop: DBDrawerProps[\"backdrop\"];\n @Prop() variant: DBDrawerProps[\"variant\"];\n @Prop() id: DBDrawerProps[\"id\"];\n @Prop() direction: DBDrawerProps[\"direction\"];\n @Prop({attribute: \"classname\"}) className: DBDrawerProps[\"className\"];\n @Prop() spacing: DBDrawerProps[\"spacing\"];\n @Prop() width: DBDrawerProps[\"width\"];\n @Prop() rounded: DBDrawerProps[\"rounded\"];\n @Prop() drawerHeaderPlain: DBDrawerProps[\"drawerHeaderPlain\"];\n @Prop() closeButtonId: DBDrawerProps[\"closeButtonId\"];\n @Prop() closeButtonText: DBDrawerProps[\"closeButtonText\"];\n @State() initialized = false;\n\n handleClose(\n event?:\n | ClickEvent<HTMLButtonElement | HTMLDialogElement>\n | GeneralKeyboardEvent<HTMLDialogElement>\n | void,\n forceClose?: boolean\n ) {\n if (!event) return;\n if (isKeyboardEvent<HTMLButtonElement | HTMLDialogElement>(event)) {\n if (event.key === \"Escape\") {\n event.preventDefault();\n if (this.close) {\n this.close.emit(event);\n }\n }\n } else {\n if (forceClose) {\n event.stopPropagation();\n if (this.close) {\n this.close.emit(event);\n }\n }\n if (\n (event.target as any)?.nodeName === \"DIALOG\" &&\n event.type === \"click\" &&\n this.backdrop !== \"none\"\n ) {\n if (this.close) {\n this.close.emit(event);\n }\n }\n }\n }\n handleDialogOpen() {\n if (this._ref) {\n const open = Boolean(this.open);\n if (open && !this._ref.open) {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = false;\n }\n if (\n this.position === \"absolute\" ||\n this.backdrop === \"none\" ||\n this.variant === \"inside\"\n ) {\n this._ref.show();\n } else {\n this._ref.showModal();\n }\n }\n if (!open && this._ref.open) {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = true;\n }\n void delay(() => {\n if (this.dialogContainerRef) {\n this.dialogContainerRef.hidden = false;\n }\n this._ref?.close();\n }, 401);\n }\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 this.handleDialogOpen();\n }\n\n @Watch(\"open\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._ref && this.initialized && this.position === \"absolute\") {\n const refElement = this._ref as HTMLDialogElement;\n const parent = refElement.parentElement;\n if (parent) {\n parent.style.position = \"relative\";\n }\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n @Watch(\"position\")\n watch1() {\n this.watch1Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-drawer\");\n this.handleDialogOpen();\n this.initialized = true;\n this.watch0Fn();\n this.watch1Fn();\n }\n\n render() {\n return (\n <dialog\n class=\"db-drawer\"\n id={this.id}\n ref={(el: any) => {\n this._ref = el;\n }}\n onClick={(event) => this.handleClose(event)}\n onKeyDown={(event) => this.handleClose(event)}\n data-position={this.position}\n data-backdrop={this.backdrop}\n data-direction={this.direction}\n data-variant={this.variant}\n >\n <article\n class={cls(\"db-drawer-container\", this.className)}\n ref={(el: any) => {\n this.dialogContainerRef = el;\n }}\n data-spacing={this.spacing}\n data-width={this.width}\n data-direction={this.direction}\n data-rounded={getBooleanAsString(this.rounded)}\n >\n <header class=\"db-drawer-header\">\n <div class=\"db-drawer-header-text\">\n {this.drawerHeaderPlain ? (\n this.drawerHeaderPlain\n ) : (\n <slot name=\"drawerHeader\"></slot>\n )}\n </div>\n <db-button\n class=\"button-close-drawer\"\n icon=\"cross\"\n variant=\"ghost\"\n type=\"button\"\n id={this.closeButtonId}\n noText={true}\n onClick={(event) => this.handleClose(event, true)}\n >\n {this.closeButtonText ?? DEFAULT_CLOSE_BUTTON}\n </db-button>\n </header>\n <div class=\"db-drawer-content\">\n <slot></slot>\n </div>\n </article>\n </dialog>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  export const DrawerBackdropList = ['none', 'strong', 'weak', 'invisible'];
2
- export const DrawerDirectionList = ['left', 'right', 'up', 'down'];
2
+ export const DrawerDirectionList = ['custom', 'left', 'right', 'up', 'down'];
3
3
  export const DrawerVariantList = ['modal', 'inside'];
4
4
  export const DrawerPositionList = ['fixed', 'absolute'];
5
5
  //# sourceMappingURL=model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/drawer/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAU,CAAC;AAEnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AAE5E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';\nexport const DrawerBackdropList = ['none', 'strong', 'weak', 'invisible'] as const;\nexport type DrawerBackdropType = (typeof DrawerBackdropList)[number];\nexport const DrawerDirectionList = ['left', 'right', 'up', 'down'] as const;\nexport type DrawerDirectionType = (typeof DrawerDirectionList)[number];\nexport const DrawerVariantList = ['modal', 'inside'] as const;\nexport type DrawerVariantType = (typeof DrawerVariantList)[number];\nexport const DrawerPositionList = ['fixed', 'absolute'] as const;\nexport type DrawerPositionType = (typeof DrawerPositionList)[number];\nexport type DBDrawerDefaultProps = {\n /**\n * The backdrop attribute changes the opacity of the backdrop.\n * The backdrop 'none' will use `dialog.show()` instead of `dialog.showModal()`\n */\n backdrop?: DrawerBackdropType;\n /**\n * The direction attribute changes the position & animation of the drawer.\n * E.g. \"left\" slides from left screen border to the right.\n */\n direction?: DrawerDirectionType;\n\n /**\n * Slot for changing the header of the drawer.\n */\n drawerHeader?: any;\n\n /**\n * The open attribute opens or closes the drawer based on the state.\n */\n open?: boolean | string;\n /**\n * The rounded attribute changes the border radius of the corners on the \"end\" of the drawer.\n * The \"end\" depends on which direction you use.\n */\n rounded?: boolean | string;\n /**\n * Set the variant modal|inside. Defaults to modal.\n */\n variant?: DrawerVariantType;\n /**\n * The position attribute changes the css-position (fixed or absolute) of the drawer.\n *\n * - `fixed` (default): Renders with `showModal()`, creating a true modal with a focus trap.\n * - `absolute`: Renders with `show()`, acting as a simple overlay **without** a focus trap.\n */\n position?: DrawerPositionType;\n};\nexport type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CloseEventProps<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InnerCloseButtonProps & WidthProps & SpacingProps;\nexport type DBDrawerDefaultState = {\n handleDialogOpen: () => void;\n};\nexport type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InitializedState"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/drawer/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAU,CAAC;AAEnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState, InnerCloseButtonProps, SpacingProps, WidthProps } from '../../shared/model';\nexport const DrawerBackdropList = ['none', 'strong', 'weak', 'invisible'] as const;\nexport type DrawerBackdropType = (typeof DrawerBackdropList)[number];\nexport const DrawerDirectionList = ['custom', 'left', 'right', 'up', 'down'] as const;\nexport type DrawerDirectionType = (typeof DrawerDirectionList)[number];\nexport const DrawerVariantList = ['modal', 'inside'] as const;\nexport type DrawerVariantType = (typeof DrawerVariantList)[number];\nexport const DrawerPositionList = ['fixed', 'absolute'] as const;\nexport type DrawerPositionType = (typeof DrawerPositionList)[number];\nexport type DBDrawerDefaultProps = {\n /**\n * The backdrop attribute changes the opacity of the backdrop.\n * The backdrop 'none' will use `dialog.show()` instead of `dialog.showModal()`\n */\n backdrop?: DrawerBackdropType;\n /**\n * The direction attribute changes the position & animation of the drawer.\n * E.g. \"left\" slides from left screen border to the right.\n */\n direction?: DrawerDirectionType;\n\n /**\n * Slot for changing the header of the drawer.\n */\n drawerHeader?: any;\n\n /**\n * Text for changing the header of the drawer.\n */\n drawerHeaderPlain?: string;\n\n /**\n * The open attribute opens or closes the drawer based on the state.\n */\n open?: boolean | string;\n /**\n * The rounded attribute changes the border radius of the corners on the \"end\" of the drawer.\n * The \"end\" depends on which direction you use.\n */\n rounded?: boolean | string;\n /**\n * Set the variant modal|inside. Defaults to modal.\n */\n variant?: DrawerVariantType;\n /**\n * The position attribute changes the css-position (fixed or absolute) of the drawer.\n *\n * - `fixed` (default): Renders with `showModal()`, creating a true modal with a focus trap.\n * - `absolute`: Renders with `show()`, acting as a simple overlay **without** a focus trap.\n */\n position?: DrawerPositionType;\n};\nexport type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CloseEventProps<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InnerCloseButtonProps & WidthProps & SpacingProps;\nexport type DBDrawerDefaultState = {\n handleDialogOpen: () => void;\n};\nexport type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InitializedState"]}
@@ -41,7 +41,7 @@ export class DBIcon {
41
41
  this.enableAttributePassing(this._ref, "db-icon");
42
42
  }
43
43
  render() {
44
- return (h("span", { key: '3a67532009f85e493784e99774e230f52c588ccc', class: cls("db-icon", this.className), "aria-hidden": "true", ref: (el) => {
44
+ return (h("span", { key: 'be569cc6aff1ed4683701d1557f4569d0c6d341d', class: cls("db-icon", this.className), "aria-hidden": "true", ref: (el) => {
45
45
  this._ref = el;
46
46
  }, id: this.id, "data-icon": this.icon, "data-icon-weight": this.weight, "data-icon-variant": this.variant }, this.text ? this.text : h("slot", null)));
47
47
  }
@@ -42,7 +42,7 @@ export class DBInfotext {
42
42
  }
43
43
  render() {
44
44
  var _a;
45
- return (h("span", { key: 'c126d11d979284931006fa76b2a6a49e396f394c', class: cls("db-infotext", this.className), ref: (el) => {
45
+ return (h("span", { key: '9872eed41f083d37eb80ccad64f6288438466a7e', class: cls("db-infotext", this.className), ref: (el) => {
46
46
  this._ref = el;
47
47
  }, id: this.id, "data-icon": this.icon, "data-semantic": this.semantic, "data-size": this.size, "data-show-icon-leading": getBooleanAsString((_a = this.showIcon) !== null && _a !== void 0 ? _a : true) }, this.text ? this.text : h("slot", null)));
48
48
  }
@@ -32,7 +32,7 @@ export class DBInput {
32
32
  DEFAULT_INVALID_MESSAGE;
33
33
  if (hasVoiceOver()) {
34
34
  this._voiceOverFallback = this._invalidMessage;
35
- delay(() => (this._voiceOverFallback = ""), 1000);
35
+ void delay(() => (this._voiceOverFallback = ""), 1000);
36
36
  }
37
37
  }
38
38
  else if (this.hasValidState() &&
@@ -41,7 +41,7 @@ export class DBInput {
41
41
  this._descByIds = this._validMessageId;
42
42
  if (hasVoiceOver()) {
43
43
  this._voiceOverFallback = (_d = this.validMessage) !== null && _d !== void 0 ? _d : DEFAULT_VALID_MESSAGE;
44
- delay(() => (this._voiceOverFallback = ""), 1000);
44
+ void delay(() => (this._voiceOverFallback = ""), 1000);
45
45
  }
46
46
  }
47
47
  else if (stringPropVisible(this.message, this.showMessage)) {
@@ -164,10 +164,10 @@ export class DBInput {
164
164
  }
165
165
  render() {
166
166
  var _a, _b, _c, _d, _e, _f, _g;
167
- return (h("div", { key: '14f5ef53f59b28fc9ec86af2c8b73163ee0711eb', class: cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel), "data-show-icon": getBooleanAsString((_a = this.showIconLeading) !== null && _a !== void 0 ? _a : this.showIcon), "data-icon": (_b = this.iconLeading) !== null && _b !== void 0 ? _b : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing) }, h("label", { key: '742b1fff77d5984d9aaf7f9f7a8d3bec38cd0d7f', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL), h("input", { key: '6bf7b4ef207482801e3664c1234d7033caf24b3f', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
167
+ return (h("div", { key: '9c6664bf7695f11917a8c767399b29cdc6cf00a4', class: cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel), "data-show-icon": getBooleanAsString((_a = this.showIconLeading) !== null && _a !== void 0 ? _a : this.showIcon), "data-icon": (_b = this.iconLeading) !== null && _b !== void 0 ? _b : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing) }, h("label", { key: '564344e11d9681081eca3c4c265f6e700a55e4af', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL), h("input", { key: '8c56e7986857b4ae6412c44949574b4acae8928e', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
168
168
  this._ref = el;
169
169
  }, id: this._id, name: this.name, type: this.type || "text", multiple: getBoolean(this.multiple, "multiple"), placeholder: (_d = this.placeholder) !== null && _d !== void 0 ? _d : DEFAULT_PLACEHOLDER, disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), step: getNumber(this.step), value: (_e = this.value) !== null && _e !== void 0 ? _e : this._value, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), max: getInputValue(this.max, this.type), min: getInputValue(this.min, this.type), readOnly: getBoolean(this.readOnly, "readOnly") ||
170
- getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: getBoolean(this.autofocus, "autofocus"), onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds }), this.dataList ? (h("datalist", { id: this._dataListId }, (_g = this.getDataList()) === null || _g === void 0 ? void 0 : _g.map((option) => (h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, h("slot", { key: '7148441abf8ae48961d6c33e9d3e1aafd80b712e' }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '0138db84ad8a008ede50e58d69e72384e84b590b', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '8386b22d98880d515d0b310895c21f388ef172b1', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
170
+ getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: getBoolean(this.autofocus, "autofocus"), onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds }), this.dataList ? (h("datalist", { id: this._dataListId }, (_g = this.getDataList()) === null || _g === void 0 ? void 0 : _g.map((option) => (h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, h("slot", { key: 'a6e42329bdcd1bd34246dcdf1245f47abb9b7621' }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'a92feb0f228acbfbf3b02c5353c3e29e31df7928', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'c62ed20bb826a7f346de6119a35afbef2f264a80', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
171
171
  }
172
172
  static get is() { return "db-input"; }
173
173
  static get properties() {
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,OAAO;IAHnB;QA4DU,QAAG,GAAG,SAAS,CAAC;QAChB,eAAU,GA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n DEFAULT_DATALIST_ID_SUFFIX,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport {\n ChangeEvent,\n InputEvent,\n InteractionEvent,\n ValueLabelType,\n} from \"../../shared/model\";\nimport {\n cls,\n delay,\n getBoolean,\n getBooleanAsString,\n getHideProp,\n getInputValue,\n getNumber,\n hasVoiceOver,\n isArrayOfStrings,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBInputProps, DBInputState } from \"./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-input\",\n})\nexport class DBInput {\n private _ref!: HTMLInputElement | any;\n @Prop() id: DBInputProps[\"id\"];\n @Prop() invalidMessage: DBInputProps[\"invalidMessage\"];\n @Prop() dataListId: DBInputProps[\"dataListId\"];\n @Prop() message: DBInputProps[\"message\"];\n @Prop() showMessage: DBInputProps[\"showMessage\"];\n @Prop() value: DBInputProps[\"value\"];\n @Prop() validMessage: DBInputProps[\"validMessage\"];\n @Prop() validation: DBInputProps[\"validation\"];\n @Prop() required: DBInputProps[\"required\"];\n @Prop() minLength: DBInputProps[\"minLength\"];\n @Prop() maxLength: DBInputProps[\"maxLength\"];\n @Prop() pattern: DBInputProps[\"pattern\"];\n @Event() input: EventEmitter<\n Parameters<Required<DBInputProps>[\"onInput\"]>[number]\n > | void;\n @Event() change: EventEmitter<\n Parameters<Required<DBInputProps>[\"onChange\"]>[number]\n > | void;\n @Event() blur: EventEmitter<\n Parameters<Required<DBInputProps>[\"onBlur\"]>[number]\n > | void;\n @Event() focus: EventEmitter<\n Parameters<Required<DBInputProps>[\"onFocus\"]>[number]\n > | void;\n @Prop() dataList: DBInputProps[\"dataList\"];\n @Prop({attribute: \"classname\"}) className: DBInputProps[\"className\"];\n @Prop() variant: DBInputProps[\"variant\"];\n @Prop() showLabel: DBInputProps[\"showLabel\"];\n @Prop() showIconLeading: DBInputProps[\"showIconLeading\"];\n @Prop() showIcon: DBInputProps[\"showIcon\"];\n @Prop() iconLeading: DBInputProps[\"iconLeading\"];\n @Prop() icon: DBInputProps[\"icon\"];\n @Prop() iconTrailing: DBInputProps[\"iconTrailing\"];\n @Prop() showRequiredAsterisk: DBInputProps[\"showRequiredAsterisk\"];\n @Prop() showIconTrailing: DBInputProps[\"showIconTrailing\"];\n @Prop() label: DBInputProps[\"label\"];\n @Prop() fieldSizing: DBInputProps[\"fieldSizing\"];\n @Prop() name: DBInputProps[\"name\"];\n @Prop() type: DBInputProps[\"type\"];\n @Prop() multiple: DBInputProps[\"multiple\"];\n @Prop() placeholder: DBInputProps[\"placeholder\"];\n @Prop() disabled: DBInputProps[\"disabled\"];\n @Prop() step: DBInputProps[\"step\"];\n @Prop() maxlength: DBInputProps[\"maxlength\"];\n @Prop() minlength: DBInputProps[\"minlength\"];\n @Prop() max: DBInputProps[\"max\"];\n @Prop() min: DBInputProps[\"min\"];\n @Prop() readOnly: DBInputProps[\"readOnly\"];\n @Prop() readonly: DBInputProps[\"readonly\"];\n @Prop() form: DBInputProps[\"form\"];\n @Prop() size: DBInputProps[\"size\"];\n @Prop() autocomplete: DBInputProps[\"autocomplete\"];\n @Prop() autofocus: DBInputProps[\"autofocus\"];\n @Prop() ariaDescribedBy: DBInputProps[\"ariaDescribedBy\"];\n @Prop() messageIcon: DBInputProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _dataListId = undefined;\n @State() _descByIds = undefined;\n @State() _value = undefined;\n @State() _voiceOverFallback = \"\";\n\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n /* For a11y reasons we need to map the correct message with the input */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.hasValidState() &&\n this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength || this.pattern)\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = undefined;\n }\n }\n handleInput(event: InputEvent<HTMLInputElement>) {\n if (this.input) {\n this.input.emit(event);\n }\n this.handleValidation();\n }\n handleChange(event: ChangeEvent<HTMLInputElement>) {\n if (this.change) {\n this.change.emit(event);\n }\n this.handleValidation();\n }\n handleBlur(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.blur) {\n this.blur.emit(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.focus) {\n this.focus.emit(event);\n }\n }\n getDataList() {\n const _list = this.dataList;\n return Array.from(\n (isArrayOfStrings(_list)\n ? _list?.map((val: string) => ({\n value: val,\n label: undefined,\n }))\n : _list) || []\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: HTMLInputElement | 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 this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"_ref\")\n @Watch(\"invalidMessage\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId =\n this.dataListId ?? this._id + DEFAULT_DATALIST_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n this.handleValidation();\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n this._value = this.value;\n }\n\n @Watch(\"value\")\n watch2() {\n this.watch2Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-input\");\n const mId = this.id ?? `input-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId = mId + DEFAULT_DATALIST_ID_SUFFIX;\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-input\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n data-show-icon={getBooleanAsString(\n this.showIconLeading ?? this.showIcon\n )}\n data-icon={this.iconLeading ?? this.icon}\n data-icon-trailing={this.iconTrailing}\n data-hide-asterisk={getHideProp(this.showRequiredAsterisk)}\n data-show-icon-trailing={getBooleanAsString(this.showIconTrailing)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <input\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n data-field-sizing={this.fieldSizing}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n name={this.name}\n type={this.type || \"text\"}\n multiple={getBoolean(this.multiple, \"multiple\")}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n step={getNumber(this.step)}\n value={this.value ?? this._value}\n maxLength={getNumber(this.maxLength, this.maxlength)}\n minLength={getNumber(this.minLength, this.minlength)}\n max={getInputValue(this.max, this.type)}\n min={getInputValue(this.min, this.type)}\n readOnly={\n getBoolean(this.readOnly, \"readOnly\") ||\n getBoolean(this.readonly, \"readonly\")\n }\n form={this.form}\n pattern={this.pattern}\n size={this.size}\n autoComplete={this.autocomplete}\n autoFocus={getBoolean(this.autofocus, \"autofocus\")}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n list={this.dataList && this._dataListId}\n aria-describedby={this.ariaDescribedBy ?? this._descByIds}\n />\n {this.dataList ? (\n <datalist id={this._dataListId}>\n {this.getDataList()?.map((option) => (\n <option\n key={this._dataListId + \"-option-\" + option.value}\n value={option.value}\n >\n {option.label}\n </option>\n ))}\n </datalist>\n ) : null}\n <slot></slot>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,OAAO;IAHnB;QA4DU,QAAG,GAAG,SAAS,CAAC;QAChB,eAAU,GAAG,SAAS,CAAC;QACvB,oBAAe,GAAG,SAAS,CAAC;QAC5B,sBAAiB,GAAG,SAAS,CAAC;QAC9B,oBAAe,GAAG,SAAS,CAAC;QAC5B,gBAAW,GAAG,SAAS,CAAC;QACxB,eAAU,GAAG,SAAS,CAAC;QACvB,WAAM,GAAG,SAAS,CAAC;QACnB,uBAAkB,GAAG,EAAE,CAAC;KAkQlC;IAhQC,aAAa;;QACX,OAAO,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,IAAI,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC;IAC9D,CAAC;IACD,gBAAgB;;QACd,wEAAwE;QACxE,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,CAAC,KAAK,CAAA,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAChE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n DEFAULT_DATALIST_ID_SUFFIX,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport {\n ChangeEvent,\n InputEvent,\n InteractionEvent,\n ValueLabelType,\n} from \"../../shared/model\";\nimport {\n cls,\n delay,\n getBoolean,\n getBooleanAsString,\n getHideProp,\n getInputValue,\n getNumber,\n hasVoiceOver,\n isArrayOfStrings,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBInputProps, DBInputState } from \"./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-input\",\n})\nexport class DBInput {\n private _ref!: HTMLInputElement | any;\n @Prop() id: DBInputProps[\"id\"];\n @Prop() invalidMessage: DBInputProps[\"invalidMessage\"];\n @Prop() dataListId: DBInputProps[\"dataListId\"];\n @Prop() message: DBInputProps[\"message\"];\n @Prop() showMessage: DBInputProps[\"showMessage\"];\n @Prop() value: DBInputProps[\"value\"];\n @Prop() validMessage: DBInputProps[\"validMessage\"];\n @Prop() validation: DBInputProps[\"validation\"];\n @Prop() required: DBInputProps[\"required\"];\n @Prop() minLength: DBInputProps[\"minLength\"];\n @Prop() maxLength: DBInputProps[\"maxLength\"];\n @Prop() pattern: DBInputProps[\"pattern\"];\n @Event() input: EventEmitter<\n Parameters<Required<DBInputProps>[\"onInput\"]>[number]\n > | void;\n @Event() change: EventEmitter<\n Parameters<Required<DBInputProps>[\"onChange\"]>[number]\n > | void;\n @Event() blur: EventEmitter<\n Parameters<Required<DBInputProps>[\"onBlur\"]>[number]\n > | void;\n @Event() focus: EventEmitter<\n Parameters<Required<DBInputProps>[\"onFocus\"]>[number]\n > | void;\n @Prop() dataList: DBInputProps[\"dataList\"];\n @Prop({attribute: \"classname\"}) className: DBInputProps[\"className\"];\n @Prop() variant: DBInputProps[\"variant\"];\n @Prop() showLabel: DBInputProps[\"showLabel\"];\n @Prop() showIconLeading: DBInputProps[\"showIconLeading\"];\n @Prop() showIcon: DBInputProps[\"showIcon\"];\n @Prop() iconLeading: DBInputProps[\"iconLeading\"];\n @Prop() icon: DBInputProps[\"icon\"];\n @Prop() iconTrailing: DBInputProps[\"iconTrailing\"];\n @Prop() showRequiredAsterisk: DBInputProps[\"showRequiredAsterisk\"];\n @Prop() showIconTrailing: DBInputProps[\"showIconTrailing\"];\n @Prop() label: DBInputProps[\"label\"];\n @Prop() fieldSizing: DBInputProps[\"fieldSizing\"];\n @Prop() name: DBInputProps[\"name\"];\n @Prop() type: DBInputProps[\"type\"];\n @Prop() multiple: DBInputProps[\"multiple\"];\n @Prop() placeholder: DBInputProps[\"placeholder\"];\n @Prop() disabled: DBInputProps[\"disabled\"];\n @Prop() step: DBInputProps[\"step\"];\n @Prop() maxlength: DBInputProps[\"maxlength\"];\n @Prop() minlength: DBInputProps[\"minlength\"];\n @Prop() max: DBInputProps[\"max\"];\n @Prop() min: DBInputProps[\"min\"];\n @Prop() readOnly: DBInputProps[\"readOnly\"];\n @Prop() readonly: DBInputProps[\"readonly\"];\n @Prop() form: DBInputProps[\"form\"];\n @Prop() size: DBInputProps[\"size\"];\n @Prop() autocomplete: DBInputProps[\"autocomplete\"];\n @Prop() autofocus: DBInputProps[\"autofocus\"];\n @Prop() ariaDescribedBy: DBInputProps[\"ariaDescribedBy\"];\n @Prop() messageIcon: DBInputProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _dataListId = undefined;\n @State() _descByIds = undefined;\n @State() _value = undefined;\n @State() _voiceOverFallback = \"\";\n\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n /* For a11y reasons we need to map the correct message with the input */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n void delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.hasValidState() &&\n this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength || this.pattern)\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n void delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = undefined;\n }\n }\n handleInput(event: InputEvent<HTMLInputElement>) {\n if (this.input) {\n this.input.emit(event);\n }\n this.handleValidation();\n }\n handleChange(event: ChangeEvent<HTMLInputElement>) {\n if (this.change) {\n this.change.emit(event);\n }\n this.handleValidation();\n }\n handleBlur(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.blur) {\n this.blur.emit(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.focus) {\n this.focus.emit(event);\n }\n }\n getDataList() {\n const _list = this.dataList;\n return Array.from(\n (isArrayOfStrings(_list)\n ? _list?.map((val: string) => ({\n value: val,\n label: undefined,\n }))\n : _list) || []\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: HTMLInputElement | 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 this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"_ref\")\n @Watch(\"invalidMessage\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId =\n this.dataListId ?? this._id + DEFAULT_DATALIST_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n this.handleValidation();\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n this._value = this.value;\n }\n\n @Watch(\"value\")\n watch2() {\n this.watch2Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-input\");\n const mId = this.id ?? `input-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId = mId + DEFAULT_DATALIST_ID_SUFFIX;\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-input\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n data-show-icon={getBooleanAsString(\n this.showIconLeading ?? this.showIcon\n )}\n data-icon={this.iconLeading ?? this.icon}\n data-icon-trailing={this.iconTrailing}\n data-hide-asterisk={getHideProp(this.showRequiredAsterisk)}\n data-show-icon-trailing={getBooleanAsString(this.showIconTrailing)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <input\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n data-field-sizing={this.fieldSizing}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n name={this.name}\n type={this.type || \"text\"}\n multiple={getBoolean(this.multiple, \"multiple\")}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n step={getNumber(this.step)}\n value={this.value ?? this._value}\n maxLength={getNumber(this.maxLength, this.maxlength)}\n minLength={getNumber(this.minLength, this.minlength)}\n max={getInputValue(this.max, this.type)}\n min={getInputValue(this.min, this.type)}\n readOnly={\n getBoolean(this.readOnly, \"readOnly\") ||\n getBoolean(this.readonly, \"readonly\")\n }\n form={this.form}\n pattern={this.pattern}\n size={this.size}\n autoComplete={this.autocomplete}\n autoFocus={getBoolean(this.autofocus, \"autofocus\")}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n list={this.dataList && this._dataListId}\n aria-describedby={this.ariaDescribedBy ?? this._descByIds}\n />\n {this.dataList ? (\n <datalist id={this._dataListId}>\n {this.getDataList()?.map((option) => (\n <option\n key={this._dataListId + \"-option-\" + option.value}\n value={option.value}\n >\n {option.label}\n </option>\n ))}\n </datalist>\n ) : null}\n <slot></slot>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
@@ -42,7 +42,7 @@ export class DBLink {
42
42
  }
43
43
  render() {
44
44
  var _a;
45
- return (h("a", { key: 'c76a9caf23e3efc45794fd4ef5b55ee7d228f500', class: cls("db-link", this.className), ref: (el) => {
45
+ return (h("a", { key: 'e560890067d6ac7e1aa1dadddc08e421d413cd11', class: cls("db-link", this.className), ref: (el) => {
46
46
  this._ref = el;
47
47
  }, id: this.id, href: this.href, target: this.target, rel: this.rel, role: this.role, hrefLang: this.hreflang, "aria-disabled": getBooleanAsString(this.disabled), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": getBooleanAsString((_a = this.showIcon) !== null && _a !== void 0 ? _a : true), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": getBooleanAsString(this.wrap) }, this.text ? this.text : h("slot", null)));
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation/model.ts"],"names":[],"mappings":"","sourcesContent":["import { GlobalProps, GlobalState } from '../../shared/model';\nexport type DBNavigationDefaultProps = {};\nexport type DBNavigationProps = DBNavigationDefaultProps & GlobalProps;\nexport type DBNavigationDefaultState = {};\nexport type DBNavigationState = DBNavigationDefaultState & GlobalState"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation/model.ts"],"names":[],"mappings":"","sourcesContent":["import { GlobalProps, GlobalState, InitializedState, NavigationItemGroupVariant, NavigationItemGroupVariantType, OverflowScrollButtonProps, OverflowScrollButtonState } from '../../shared/model';\nexport type DBNavigationDefaultProps = {\n showTreeLine?: boolean | string;\n};\nexport type DBNavigationProps = DBNavigationDefaultProps & GlobalProps & OverflowScrollButtonProps & NavigationItemGroupVariant;\nexport type DBNavigationDefaultState = {\n onScroll: () => void;\n _variant?: NavigationItemGroupVariantType;\n _shellDesktopPosition?: string | null;\n _subNavigationDesktopPosition?: string | null;\n _handleSubNavigation: () => void;\n _isSubNavigation?: boolean;\n};\nexport type DBNavigationState = DBNavigationDefaultState & GlobalState & OverflowScrollButtonState & InitializedState"]}
@@ -1,5 +1,5 @@
1
- import { DEFAULT_ID } from "../../shared/constants";
2
- import { cls, uuid } from "../../utils";
1
+ import { cls, delay, getBooleanAsString } from "../../utils";
2
+ import { handleSubNavigationPosition } from "../../utils/navigation";
3
3
  import { h } from "@stencil/core";
4
4
  /**
5
5
  * @slot children - This is a default/unnamed slot
@@ -7,7 +7,44 @@ import { h } from "@stencil/core";
7
7
  */
8
8
  export class DBNavigation {
9
9
  constructor() {
10
- this._id = DEFAULT_ID;
10
+ this.showScrollLeft = false;
11
+ this.showScrollRight = false;
12
+ this._shellDesktopPosition = undefined;
13
+ this._subNavigationDesktopPosition = undefined;
14
+ this._variant = undefined;
15
+ this.initialized = false;
16
+ this._isSubNavigation = false;
17
+ }
18
+ evaluateScrollButtons(tList) {
19
+ const needsScroll = tList.scrollWidth > tList.clientWidth;
20
+ const scrollLeft = Math.ceil(tList.scrollLeft);
21
+ this.showScrollLeft = needsScroll && scrollLeft > 1;
22
+ this.showScrollRight =
23
+ needsScroll && scrollLeft < tList.scrollWidth - tList.clientWidth;
24
+ }
25
+ scroll(left) {
26
+ var _a;
27
+ let step = Number(this.arrowScrollDistance) || 100;
28
+ if (left) {
29
+ step *= -1;
30
+ }
31
+ (_a = this.menuRef) === null || _a === void 0 ? void 0 : _a.scrollBy({
32
+ top: 0,
33
+ left: step,
34
+ behavior: "smooth",
35
+ });
36
+ }
37
+ onScroll() {
38
+ this.evaluateScrollButtons(this.menuRef);
39
+ this._handleSubNavigation();
40
+ }
41
+ _handleSubNavigation() {
42
+ handleSubNavigationPosition(this.menuRef, this._shellDesktopPosition === "left" ||
43
+ (this._shellDesktopPosition === "top" &&
44
+ this._subNavigationDesktopPosition === "left" &&
45
+ this._isSubNavigation)
46
+ ? 1
47
+ : 0);
11
48
  }
12
49
  /**
13
50
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -41,18 +78,128 @@ export class DBNavigation {
41
78
  }
42
79
  }
43
80
  }
81
+ watch0Fn() {
82
+ if (this._ref && this.initialized) {
83
+ void delay(() => {
84
+ var _a, _b, _c, _d, _e;
85
+ const element = this._ref;
86
+ if (!element)
87
+ return;
88
+ let endVariant = (_a = this.variant) !== null && _a !== void 0 ? _a : "popover";
89
+ const parentClassList = ((_b = element.parentElement) === null || _b === void 0 ? void 0 : _b.nodeName.startsWith("DB"))
90
+ ? (_d = (_c = element.parentElement) === null || _c === void 0 ? void 0 : _c.parentElement) === null || _d === void 0 ? void 0 : _d.classList
91
+ : (_e = element.parentElement) === null || _e === void 0 ? void 0 : _e.classList;
92
+ const shell = element.closest(".db-shell");
93
+ const shellDesktopPosition = shell === null || shell === void 0 ? void 0 : shell.getAttribute("data-control-panel-desktop-position");
94
+ const shellSubNaviDesktopPosition = shell === null || shell === void 0 ? void 0 : shell.getAttribute("data-sub-navigation-desktop-position");
95
+ this._shellDesktopPosition = shellDesktopPosition;
96
+ this._subNavigationDesktopPosition = shellSubNaviDesktopPosition;
97
+ const isSubNavigation = parentClassList === null || parentClassList === void 0 ? void 0 : parentClassList.contains("db-shell-sub-navigation");
98
+ this._isSubNavigation = isSubNavigation;
99
+ const requiresPopover = (shellDesktopPosition === "top" &&
100
+ (parentClassList === null || parentClassList === void 0 ? void 0 : parentClassList.contains("db-control-panel-desktop-scroll-container"))) ||
101
+ ((shellSubNaviDesktopPosition === "top" ||
102
+ shellDesktopPosition === "left") &&
103
+ isSubNavigation);
104
+ if (requiresPopover) {
105
+ endVariant = "popover";
106
+ }
107
+ this._variant = endVariant;
108
+ }, 1);
109
+ }
110
+ }
111
+ watch0() {
112
+ this.watch0Fn();
113
+ }
114
+ watch1Fn() {
115
+ var _a;
116
+ if (this.menuRef && this._variant) {
117
+ if (!this._variant || this._variant === "popover") {
118
+ this._handleSubNavigation();
119
+ }
120
+ else if (this._variant === "tree") {
121
+ for (const menu of Array.from(this.menuRef.querySelectorAll(".db-navigation-item-group-menu"))) {
122
+ menu.style.position = "";
123
+ }
124
+ for (const navItem of Array.from(this.menuRef.querySelectorAll(".db-navigation-item, .db-navigation-item-group"))) {
125
+ // TODO: Add keyboard navigation support
126
+ navItem.setAttribute("role", "none");
127
+ (_a = navItem.querySelector("a, button")) === null || _a === void 0 ? void 0 : _a.setAttribute("role", "treeitem");
128
+ }
129
+ }
130
+ this.evaluateScrollButtons(this.menuRef);
131
+ }
132
+ }
133
+ watch1() {
134
+ this.watch1Fn();
135
+ }
44
136
  componentDidLoad() {
45
137
  this.enableAttributePassing(this._ref, "db-navigation");
46
- this._id = this.id || "navigation-" + uuid();
138
+ this.initialized = true;
139
+ this.watch0Fn();
140
+ this.watch1Fn();
47
141
  }
48
142
  render() {
49
- return (h("nav", { key: 'ed27159179b89985cbf0711be7dc494ca820cf75', class: cls("db-navigation", this.className), ref: (el) => {
143
+ var _a;
144
+ return (h("nav", { key: '3107723e96a604419f96e712778e5924fd3336cf', class: cls("db-navigation", this.className), ref: (el) => {
50
145
  this._ref = el;
51
- }, id: this._id }, h("menu", { key: '6aa518535f6c802abec874a174d6e8d028572269' }, h("slot", { key: '2307ee2093cf4bcec3c8f4b8d5e8e88a8d78cf08' }))));
146
+ }, id: this.id, "data-variant": this._variant, "data-show-tree-line": getBooleanAsString((_a = this.showTreeLine) !== null && _a !== void 0 ? _a : "true"), onScroll: () => this.onScroll() }, this.showScrollLeft ? (h("db-button", { class: "overflow-scroll-left-button", variant: "filled", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, "Scroll left")) : null, h("menu", { key: 'fe0b919e9981a4fbdb5a5cdc86caf5d6ab754e77', role: this._variant === "tree" ? "tree" : undefined, ref: (el) => {
147
+ this.menuRef = el;
148
+ }, onScroll: () => this.onScroll() }, h("slot", { key: '2a4141b4b2d5f7845590fb00fda5f10c80ad1e3e' })), this.showScrollRight ? (h("db-button", { class: "overflow-scroll-right-button", variant: "filled", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null));
52
149
  }
53
150
  static get is() { return "db-navigation"; }
54
151
  static get properties() {
55
152
  return {
153
+ "variant": {
154
+ "type": "string",
155
+ "attribute": "variant",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "DBNavigationProps[\"variant\"]",
159
+ "resolved": "\"popover\" | \"tree\"",
160
+ "references": {
161
+ "DBNavigationProps": {
162
+ "location": "import",
163
+ "path": "./model",
164
+ "id": "src/components/navigation/model.ts::DBNavigationProps"
165
+ }
166
+ }
167
+ },
168
+ "required": false,
169
+ "optional": false,
170
+ "docs": {
171
+ "tags": [],
172
+ "text": ""
173
+ },
174
+ "getter": false,
175
+ "setter": false,
176
+ "reflect": false
177
+ },
178
+ "arrowScrollDistance": {
179
+ "type": "any",
180
+ "attribute": "arrow-scroll-distance",
181
+ "mutable": false,
182
+ "complexType": {
183
+ "original": "DBNavigationProps[\"arrowScrollDistance\"]",
184
+ "resolved": "number | string",
185
+ "references": {
186
+ "DBNavigationProps": {
187
+ "location": "import",
188
+ "path": "./model",
189
+ "id": "src/components/navigation/model.ts::DBNavigationProps"
190
+ }
191
+ }
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": ""
198
+ },
199
+ "getter": false,
200
+ "setter": false,
201
+ "reflect": false
202
+ },
56
203
  "id": {
57
204
  "type": "string",
58
205
  "attribute": "id",
@@ -78,6 +225,31 @@ export class DBNavigation {
78
225
  "setter": false,
79
226
  "reflect": false
80
227
  },
228
+ "showTreeLine": {
229
+ "type": "any",
230
+ "attribute": "show-tree-line",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "DBNavigationProps[\"showTreeLine\"]",
234
+ "resolved": "boolean | string",
235
+ "references": {
236
+ "DBNavigationProps": {
237
+ "location": "import",
238
+ "path": "./model",
239
+ "id": "src/components/navigation/model.ts::DBNavigationProps"
240
+ }
241
+ }
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": ""
248
+ },
249
+ "getter": false,
250
+ "setter": false,
251
+ "reflect": false
252
+ },
81
253
  "className": {
82
254
  "type": "string",
83
255
  "attribute": "classname",
@@ -107,8 +279,35 @@ export class DBNavigation {
107
279
  }
108
280
  static get states() {
109
281
  return {
110
- "_id": {}
282
+ "showScrollLeft": {},
283
+ "showScrollRight": {},
284
+ "_shellDesktopPosition": {},
285
+ "_subNavigationDesktopPosition": {},
286
+ "_variant": {},
287
+ "initialized": {},
288
+ "_isSubNavigation": {}
111
289
  };
112
290
  }
291
+ static get watchers() {
292
+ return [{
293
+ "propName": "_ref",
294
+ "methodName": "watch0"
295
+ }, {
296
+ "propName": "variant",
297
+ "methodName": "watch0"
298
+ }, {
299
+ "propName": "initialized",
300
+ "methodName": "watch0"
301
+ }, {
302
+ "propName": "menuRef",
303
+ "methodName": "watch1"
304
+ }, {
305
+ "propName": "_variant",
306
+ "methodName": "watch1"
307
+ }, {
308
+ "propName": "_shellDesktopPosition",
309
+ "methodName": "watch1"
310
+ }];
311
+ }
113
312
  }
114
313
  //# sourceMappingURL=navigation.js.map