dap-design-system 0.62.3 → 0.63.0

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 (663) hide show
  1. package/README.md +5 -1
  2. package/dist/common/utils.d.ts +8 -0
  3. package/dist/common/utils.js +53 -48
  4. package/dist/common/utils.js.map +1 -1
  5. package/dist/components/accordion/accordion-base-element.js +15 -19
  6. package/dist/components/accordion/accordion-base-element.js.map +1 -1
  7. package/dist/components/accordion/accordion.component.d.ts +1 -0
  8. package/dist/components/accordion/accordion.component.js.map +1 -1
  9. package/dist/components/accordion-group/accordion-group.component.js +20 -24
  10. package/dist/components/accordion-group/accordion-group.component.js.map +1 -1
  11. package/dist/components/anchor-heading/anchor-heading.component.d.ts +1 -0
  12. package/dist/components/anchor-heading/anchor-heading.component.js +20 -23
  13. package/dist/components/anchor-heading/anchor-heading.component.js.map +1 -1
  14. package/dist/components/avatar/avatar.component.js +51 -55
  15. package/dist/components/avatar/avatar.component.js.map +1 -1
  16. package/dist/components/avatar-group/avatar-group.component.js +18 -22
  17. package/dist/components/avatar-group/avatar-group.component.js.map +1 -1
  18. package/dist/components/badge/badge.component.js +17 -20
  19. package/dist/components/badge/badge.component.js.map +1 -1
  20. package/dist/components/banner/banner.component.d.ts +1 -1
  21. package/dist/components/banner/banner.component.js +18 -24
  22. package/dist/components/banner/banner.component.js.map +1 -1
  23. package/dist/components/breadcrumb/breadcrumb.component.d.ts +2 -1
  24. package/dist/components/breadcrumb/breadcrumb.component.js +32 -32
  25. package/dist/components/breadcrumb/breadcrumb.component.js.map +1 -1
  26. package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +8 -0
  27. package/dist/components/breadcrumb-item/breadcrumb-item.component.js +33 -28
  28. package/dist/components/breadcrumb-item/breadcrumb-item.component.js.map +1 -1
  29. package/dist/components/button/_styles/button.scss.js +1 -1
  30. package/dist/components/button/button.component.js +18 -22
  31. package/dist/components/button/button.component.js.map +1 -1
  32. package/dist/components/button-group/_styles/button-group-separator.scss.js +5 -0
  33. package/dist/components/button-group/_styles/button-group-separator.scss.js.map +1 -0
  34. package/dist/components/button-group/_styles/button-group-text.scss.js +5 -0
  35. package/dist/components/button-group/_styles/button-group-text.scss.js.map +1 -0
  36. package/dist/components/button-group/_styles/button-group.scss.js +5 -0
  37. package/dist/components/button-group/_styles/button-group.scss.js.map +1 -0
  38. package/dist/components/button-group/button-group-separator.component.d.ts +28 -0
  39. package/dist/components/button-group/button-group-separator.component.js +18 -0
  40. package/dist/components/button-group/button-group-separator.component.js.map +1 -0
  41. package/dist/components/button-group/button-group-separator.d.ts +8 -0
  42. package/dist/components/button-group/button-group-separator.js +6 -0
  43. package/dist/components/button-group/button-group-separator.js.map +1 -0
  44. package/dist/components/button-group/button-group-text.component.d.ts +33 -0
  45. package/dist/components/button-group/button-group-text.component.js +17 -0
  46. package/dist/components/button-group/button-group-text.component.js.map +1 -0
  47. package/dist/components/button-group/button-group-text.d.ts +8 -0
  48. package/dist/components/button-group/button-group-text.js +6 -0
  49. package/dist/components/button-group/button-group-text.js.map +1 -0
  50. package/dist/components/button-group/button-group.component.d.ts +52 -0
  51. package/dist/components/button-group/button-group.component.js +30 -0
  52. package/dist/components/button-group/button-group.component.js.map +1 -0
  53. package/dist/components/button-group/button-group.d.ts +8 -0
  54. package/dist/components/button-group/button-group.js +6 -0
  55. package/dist/components/button-group/button-group.js.map +1 -0
  56. package/dist/components/calendar/calendar-cell.component.js +26 -29
  57. package/dist/components/calendar/calendar-cell.component.js.map +1 -1
  58. package/dist/components/calendar/calendar.component.d.ts +10 -1
  59. package/dist/components/calendar/calendar.component.js +37 -46
  60. package/dist/components/calendar/calendar.component.js.map +1 -1
  61. package/dist/components/callout/callout.component.d.ts +4 -0
  62. package/dist/components/callout/callout.component.js +71 -69
  63. package/dist/components/callout/callout.component.js.map +1 -1
  64. package/dist/components/card/card-actions.component.js +8 -11
  65. package/dist/components/card/card-actions.component.js.map +1 -1
  66. package/dist/components/card/card-content.component.js +20 -23
  67. package/dist/components/card/card-content.component.js.map +1 -1
  68. package/dist/components/card/card-image.component.js +18 -21
  69. package/dist/components/card/card-image.component.js.map +1 -1
  70. package/dist/components/card/card-subtitle.component.js +18 -21
  71. package/dist/components/card/card-subtitle.component.js.map +1 -1
  72. package/dist/components/card/card-title.component.js +18 -21
  73. package/dist/components/card/card-title.component.js.map +1 -1
  74. package/dist/components/card/card.component.d.ts +1 -0
  75. package/dist/components/card/card.component.js +25 -28
  76. package/dist/components/card/card.component.js.map +1 -1
  77. package/dist/components/checkbox/_styles/checkbox.scss.js +1 -1
  78. package/dist/components/checkbox/checkbox.component.d.ts +7 -1
  79. package/dist/components/checkbox/checkbox.component.js +71 -74
  80. package/dist/components/checkbox/checkbox.component.js.map +1 -1
  81. package/dist/components/chip/chip.component.d.ts +1 -0
  82. package/dist/components/chip/chip.component.js +21 -26
  83. package/dist/components/chip/chip.component.js.map +1 -1
  84. package/dist/components/code-puncher/code-puncher-slot.component.js +34 -38
  85. package/dist/components/code-puncher/code-puncher-slot.component.js.map +1 -1
  86. package/dist/components/code-puncher/code-puncher.component.d.ts +4 -0
  87. package/dist/components/code-puncher/code-puncher.component.js +97 -102
  88. package/dist/components/code-puncher/code-puncher.component.js.map +1 -1
  89. package/dist/components/code-puncher/code-puncher.context.js +1 -1
  90. package/dist/components/code-puncher/code-puncher.context.js.map +1 -1
  91. package/dist/components/code-puncher/code-puncher.scss.js +1 -1
  92. package/dist/components/combobox/combobox.component.d.ts +9 -1
  93. package/dist/components/combobox/combobox.component.js.map +1 -1
  94. package/dist/components/combobox/combobox.scss.js +1 -1
  95. package/dist/components/combobox/comboboxBase.d.ts +29 -0
  96. package/dist/components/combobox/comboboxBase.js +218 -150
  97. package/dist/components/combobox/comboboxBase.js.map +1 -1
  98. package/dist/components/command/command-group.component.js +19 -23
  99. package/dist/components/command/command-group.component.js.map +1 -1
  100. package/dist/components/command/command-item.component.js +17 -22
  101. package/dist/components/command/command-item.component.js.map +1 -1
  102. package/dist/components/command/command.component.d.ts +3 -0
  103. package/dist/components/command/command.component.js +28 -33
  104. package/dist/components/command/command.component.js.map +1 -1
  105. package/dist/components/content-switcher/content-switcher-item.component.js +16 -19
  106. package/dist/components/content-switcher/content-switcher-item.component.js.map +1 -1
  107. package/dist/components/content-switcher/content-switcher.component.js +19 -22
  108. package/dist/components/content-switcher/content-switcher.component.js.map +1 -1
  109. package/dist/components/copybox-input/copybox-input.component.d.ts +11 -0
  110. package/dist/components/copybox-input/copybox-input.component.js +12 -16
  111. package/dist/components/copybox-input/copybox-input.component.js.map +1 -1
  112. package/dist/components/dap-badge/dap-badge.component.js +13 -18
  113. package/dist/components/dap-badge/dap-badge.component.js.map +1 -1
  114. package/dist/components/datatable/datatable.component.d.ts +17 -0
  115. package/dist/components/datatable/datatable.component.js +38 -42
  116. package/dist/components/datatable/datatable.component.js.map +1 -1
  117. package/dist/components/datatable/utils/cell-renderer.js +6 -8
  118. package/dist/components/datatable/utils/cell-renderer.js.map +1 -1
  119. package/dist/components/datepicker/datepicker.component.d.ts +8 -0
  120. package/dist/components/datepicker/datepicker.component.js +76 -81
  121. package/dist/components/datepicker/datepicker.component.js.map +1 -1
  122. package/dist/components/datepicker/datepicker.scss.js +1 -1
  123. package/dist/components/divider/divider.component.js +18 -21
  124. package/dist/components/divider/divider.component.js.map +1 -1
  125. package/dist/components/feedback/feedback.component.js +8 -11
  126. package/dist/components/feedback/feedback.component.js.map +1 -1
  127. package/dist/components/file-input/file-input-list-item.component.d.ts +1 -0
  128. package/dist/components/file-input/file-input-list-item.component.js +36 -40
  129. package/dist/components/file-input/file-input-list-item.component.js.map +1 -1
  130. package/dist/components/file-input/file-input-list.component.js +15 -20
  131. package/dist/components/file-input/file-input-list.component.js.map +1 -1
  132. package/dist/components/file-input/file-input-list.scss.js +1 -1
  133. package/dist/components/file-input/file-input.component.d.ts +3 -0
  134. package/dist/components/file-input/file-input.component.js +135 -142
  135. package/dist/components/file-input/file-input.component.js.map +1 -1
  136. package/dist/components/file-input/file-input.scss.js +1 -1
  137. package/dist/components/form/form-label/form-label.component.d.ts +1 -1
  138. package/dist/components/form/form-label/form-label.component.js +20 -23
  139. package/dist/components/form/form-label/form-label.component.js.map +1 -1
  140. package/dist/components/form/input-group/input-group.component.d.ts +4 -0
  141. package/dist/components/form/input-group/input-group.component.js +42 -42
  142. package/dist/components/form/input-group/input-group.component.js.map +1 -1
  143. package/dist/components/form/input-group/input-group.scss.js +2 -2
  144. package/dist/components/form/radio-group/radio-group.component.d.ts +5 -0
  145. package/dist/components/form/radio-group/radio-group.component.js +54 -55
  146. package/dist/components/form/radio-group/radio-group.component.js.map +1 -1
  147. package/dist/components/icon/icon.component.js +25 -28
  148. package/dist/components/icon/icon.component.js.map +1 -1
  149. package/dist/components/icon-button/icon-button.component.d.ts +1 -0
  150. package/dist/components/icon-button/icon-button.component.js +11 -14
  151. package/dist/components/icon-button/icon-button.component.js.map +1 -1
  152. package/dist/components/icon-button/icon-button.scss.js +1 -1
  153. package/dist/components/icons/arrows/arrows-arrow-down-line/arrows-arrow-down-line.component.js +9 -12
  154. package/dist/components/icons/arrows/arrows-arrow-down-line/arrows-arrow-down-line.component.js.map +1 -1
  155. package/dist/components/icons/arrows/arrows-arrow-down-s-fill/arrows-arrow-down-s-fill.component.js +7 -10
  156. package/dist/components/icons/arrows/arrows-arrow-down-s-fill/arrows-arrow-down-s-fill.component.js.map +1 -1
  157. package/dist/components/icons/arrows/arrows-arrow-down-s-line/arrows-arrow-down-s-line.component.js +12 -15
  158. package/dist/components/icons/arrows/arrows-arrow-down-s-line/arrows-arrow-down-s-line.component.js.map +1 -1
  159. package/dist/components/icons/arrows/arrows-arrow-left-down-line/arrows-arrow-left-down-line.component.js +8 -11
  160. package/dist/components/icons/arrows/arrows-arrow-left-down-line/arrows-arrow-left-down-line.component.js.map +1 -1
  161. package/dist/components/icons/arrows/arrows-arrow-left-l-line/arrows-arrow-left-l-line.component.js +15 -18
  162. package/dist/components/icons/arrows/arrows-arrow-left-l-line/arrows-arrow-left-l-line.component.js.map +1 -1
  163. package/dist/components/icons/arrows/arrows-arrow-left-line/arrows-arrow-left-line.component.js +7 -10
  164. package/dist/components/icons/arrows/arrows-arrow-left-line/arrows-arrow-left-line.component.js.map +1 -1
  165. package/dist/components/icons/arrows/arrows-arrow-left-s-fill/arrows-arrow-left-s-fill.component.js +10 -13
  166. package/dist/components/icons/arrows/arrows-arrow-left-s-fill/arrows-arrow-left-s-fill.component.js.map +1 -1
  167. package/dist/components/icons/arrows/arrows-arrow-left-s-line/arrows-arrow-left-s-line.component.js +7 -10
  168. package/dist/components/icons/arrows/arrows-arrow-left-s-line/arrows-arrow-left-s-line.component.js.map +1 -1
  169. package/dist/components/icons/arrows/arrows-arrow-left-up-line/arrows-arrow-left-up-line.component.js +6 -9
  170. package/dist/components/icons/arrows/arrows-arrow-left-up-line/arrows-arrow-left-up-line.component.js.map +1 -1
  171. package/dist/components/icons/arrows/arrows-arrow-right-down-line/arrows-arrow-right-down-line.component.js +18 -21
  172. package/dist/components/icons/arrows/arrows-arrow-right-down-line/arrows-arrow-right-down-line.component.js.map +1 -1
  173. package/dist/components/icons/arrows/arrows-arrow-right-l-line/arrows-arrow-right-l-line.component.js +15 -18
  174. package/dist/components/icons/arrows/arrows-arrow-right-l-line/arrows-arrow-right-l-line.component.js.map +1 -1
  175. package/dist/components/icons/arrows/arrows-arrow-right-line/arrows-arrow-right-line.component.js +17 -20
  176. package/dist/components/icons/arrows/arrows-arrow-right-line/arrows-arrow-right-line.component.js.map +1 -1
  177. package/dist/components/icons/arrows/arrows-arrow-right-s-fill/arrows-arrow-right-s-fill.component.js +17 -20
  178. package/dist/components/icons/arrows/arrows-arrow-right-s-fill/arrows-arrow-right-s-fill.component.js.map +1 -1
  179. package/dist/components/icons/arrows/arrows-arrow-right-s-line/arrows-arrow-right-s-line.component.js +17 -20
  180. package/dist/components/icons/arrows/arrows-arrow-right-s-line/arrows-arrow-right-s-line.component.js.map +1 -1
  181. package/dist/components/icons/arrows/arrows-arrow-right-up-line/arrows-arrow-right-up-line.component.js +18 -21
  182. package/dist/components/icons/arrows/arrows-arrow-right-up-line/arrows-arrow-right-up-line.component.js.map +1 -1
  183. package/dist/components/icons/arrows/arrows-arrow-up-line/arrows-arrow-up-line.component.js +9 -12
  184. package/dist/components/icons/arrows/arrows-arrow-up-line/arrows-arrow-up-line.component.js.map +1 -1
  185. package/dist/components/icons/arrows/arrows-arrow-up-s-fill/arrows-arrow-up-s-fill.component.js +8 -11
  186. package/dist/components/icons/arrows/arrows-arrow-up-s-fill/arrows-arrow-up-s-fill.component.js.map +1 -1
  187. package/dist/components/icons/arrows/arrows-arrow-up-s-line/arrows-arrow-up-s-line.component.js +9 -12
  188. package/dist/components/icons/arrows/arrows-arrow-up-s-line/arrows-arrow-up-s-line.component.js.map +1 -1
  189. package/dist/components/icons/arrows/arrows-expand-up-down-fill/arrows-expand-up-down-fill.component.js +11 -14
  190. package/dist/components/icons/arrows/arrows-expand-up-down-fill/arrows-expand-up-down-fill.component.js.map +1 -1
  191. package/dist/components/icons/buildings/buildings-home-6-line/buildings-home-6-line.component.js +10 -13
  192. package/dist/components/icons/buildings/buildings-home-6-line/buildings-home-6-line.component.js.map +1 -1
  193. package/dist/components/icons/business/business-calendar-line/business-calendar-line.component.js +11 -14
  194. package/dist/components/icons/business/business-calendar-line/business-calendar-line.component.js.map +1 -1
  195. package/dist/components/icons/design/design-edit-line/design-edit-line.component.js +6 -9
  196. package/dist/components/icons/design/design-edit-line/design-edit-line.component.js.map +1 -1
  197. package/dist/components/icons/design/design-tools-line/design-tools-line.component.js +12 -15
  198. package/dist/components/icons/design/design-tools-line/design-tools-line.component.js.map +1 -1
  199. package/dist/components/icons/device/device-computer-line/device-computer-line.component.js +16 -19
  200. package/dist/components/icons/device/device-computer-line/device-computer-line.component.js.map +1 -1
  201. package/dist/components/icons/document/document-clipboard-line/document-clipboard-line.component.js +11 -14
  202. package/dist/components/icons/document/document-clipboard-line/document-clipboard-line.component.js.map +1 -1
  203. package/dist/components/icons/document/document-file-copy-line/document-file-copy-line.component.js +10 -13
  204. package/dist/components/icons/document/document-file-copy-line/document-file-copy-line.component.js.map +1 -1
  205. package/dist/components/icons/document/document-file-image-line/document-file-image-line.component.js +11 -14
  206. package/dist/components/icons/document/document-file-image-line/document-file-image-line.component.js.map +1 -1
  207. package/dist/components/icons/document/document-file-music-line/document-file-music-line.component.js +11 -14
  208. package/dist/components/icons/document/document-file-music-line/document-file-music-line.component.js.map +1 -1
  209. package/dist/components/icons/document/document-file-text-line/document-file-text-line.component.js +10 -13
  210. package/dist/components/icons/document/document-file-text-line/document-file-text-line.component.js.map +1 -1
  211. package/dist/components/icons/document/document-file-video-line/document-file-video-line.component.js +11 -14
  212. package/dist/components/icons/document/document-file-video-line/document-file-video-line.component.js.map +1 -1
  213. package/dist/components/icons/document/document-folder-line/document-folder-line.component.js +11 -14
  214. package/dist/components/icons/document/document-folder-line/document-folder-line.component.js.map +1 -1
  215. package/dist/components/icons/document/document-folder-open-line/document-folder-open-line.component.js +10 -13
  216. package/dist/components/icons/document/document-folder-open-line/document-folder-open-line.component.js.map +1 -1
  217. package/dist/components/icons/editor/editor-separator/editor-separator.component.js +10 -13
  218. package/dist/components/icons/editor/editor-separator/editor-separator.component.js.map +1 -1
  219. package/dist/components/icons/health/health-heart-fill/health-heart-fill.component.js +8 -11
  220. package/dist/components/icons/health/health-heart-fill/health-heart-fill.component.js.map +1 -1
  221. package/dist/components/icons/health/health-heart-line/health-heart-line.component.js +10 -13
  222. package/dist/components/icons/health/health-heart-line/health-heart-line.component.js.map +1 -1
  223. package/dist/components/icons/others/others-cookie-line/others-cookie-line.component.js +6 -9
  224. package/dist/components/icons/others/others-cookie-line/others-cookie-line.component.js.map +1 -1
  225. package/dist/components/icons/system/system-add-line/system-add-line.component.js +11 -14
  226. package/dist/components/icons/system/system-add-line/system-add-line.component.js.map +1 -1
  227. package/dist/components/icons/system/system-alert-fill/system-alert-fill.component.js +9 -12
  228. package/dist/components/icons/system/system-alert-fill/system-alert-fill.component.js.map +1 -1
  229. package/dist/components/icons/system/system-alert-line/system-alert-line.component.js +11 -14
  230. package/dist/components/icons/system/system-alert-line/system-alert-line.component.js.map +1 -1
  231. package/dist/components/icons/system/system-check-line/system-check-line.component.js +9 -12
  232. package/dist/components/icons/system/system-check-line/system-check-line.component.js.map +1 -1
  233. package/dist/components/icons/system/system-check-line2/system-check-line2.component.js +11 -14
  234. package/dist/components/icons/system/system-check-line2/system-check-line2.component.js.map +1 -1
  235. package/dist/components/icons/system/system-checkbox-blank-circle-fill/system-checkbox-blank-circle-fill.component.js +9 -12
  236. package/dist/components/icons/system/system-checkbox-blank-circle-fill/system-checkbox-blank-circle-fill.component.js.map +1 -1
  237. package/dist/components/icons/system/system-checkbox-blank-circle-fill-check/system-checkbox-blank-circle-fill-check.component.js +12 -15
  238. package/dist/components/icons/system/system-checkbox-blank-circle-fill-check/system-checkbox-blank-circle-fill-check.component.js.map +1 -1
  239. package/dist/components/icons/system/system-checkbox-blank-circle-line/system-checkbox-blank-circle-line.component.js +13 -16
  240. package/dist/components/icons/system/system-checkbox-blank-circle-line/system-checkbox-blank-circle-line.component.js.map +1 -1
  241. package/dist/components/icons/system/system-checkbox-circle-fill/system-checkbox-circle-fill.component.js +11 -14
  242. package/dist/components/icons/system/system-checkbox-circle-fill/system-checkbox-circle-fill.component.js.map +1 -1
  243. package/dist/components/icons/system/system-checkbox-circle-line/system-checkbox-circle-line.component.js +11 -14
  244. package/dist/components/icons/system/system-checkbox-circle-line/system-checkbox-circle-line.component.js.map +1 -1
  245. package/dist/components/icons/system/system-close-circle-fill/system-close-circle-fill.component.js +11 -14
  246. package/dist/components/icons/system/system-close-circle-fill/system-close-circle-fill.component.js.map +1 -1
  247. package/dist/components/icons/system/system-close-circle-line/system-close-circle-line.component.js +7 -10
  248. package/dist/components/icons/system/system-close-circle-line/system-close-circle-line.component.js.map +1 -1
  249. package/dist/components/icons/system/system-close-fill/system-close-fill.component.js +11 -14
  250. package/dist/components/icons/system/system-close-fill/system-close-fill.component.js.map +1 -1
  251. package/dist/components/icons/system/system-close-line/system-close-line.component.js +11 -14
  252. package/dist/components/icons/system/system-close-line/system-close-line.component.js.map +1 -1
  253. package/dist/components/icons/system/system-delete-bin-fill/system-delete-bin-fill.component.js +7 -10
  254. package/dist/components/icons/system/system-delete-bin-fill/system-delete-bin-fill.component.js.map +1 -1
  255. package/dist/components/icons/system/system-delete-bin-line/system-delete-bin-line.component.js +9 -12
  256. package/dist/components/icons/system/system-delete-bin-line/system-delete-bin-line.component.js.map +1 -1
  257. package/dist/components/icons/system/system-download-line/system-download-line.component.js +9 -12
  258. package/dist/components/icons/system/system-download-line/system-download-line.component.js.map +1 -1
  259. package/dist/components/icons/system/system-error-warning-fill/system-error-warning-fill.component.js +7 -10
  260. package/dist/components/icons/system/system-error-warning-fill/system-error-warning-fill.component.js.map +1 -1
  261. package/dist/components/icons/system/system-error-warning-line/system-error-warning-line.component.js +11 -14
  262. package/dist/components/icons/system/system-error-warning-line/system-error-warning-line.component.js.map +1 -1
  263. package/dist/components/icons/system/system-external-link-line/system-external-link-line.component.js +9 -12
  264. package/dist/components/icons/system/system-external-link-line/system-external-link-line.component.js.map +1 -1
  265. package/dist/components/icons/system/system-eye-line/system-eye-line.component.js +11 -14
  266. package/dist/components/icons/system/system-eye-line/system-eye-line.component.js.map +1 -1
  267. package/dist/components/icons/system/system-eye-off-line/system-eye-off-line.component.js +6 -9
  268. package/dist/components/icons/system/system-eye-off-line/system-eye-off-line.component.js.map +1 -1
  269. package/dist/components/icons/system/system-forbid-fill/system-forbid-fill.component.js +9 -12
  270. package/dist/components/icons/system/system-forbid-fill/system-forbid-fill.component.js.map +1 -1
  271. package/dist/components/icons/system/system-information-2-fill/system-information-2-fill.component.js +9 -12
  272. package/dist/components/icons/system/system-information-2-fill/system-information-2-fill.component.js.map +1 -1
  273. package/dist/components/icons/system/system-information-fill/system-information-fill.component.js +9 -12
  274. package/dist/components/icons/system/system-information-fill/system-information-fill.component.js.map +1 -1
  275. package/dist/components/icons/system/system-information-line/system-information-line.component.js +9 -12
  276. package/dist/components/icons/system/system-information-line/system-information-line.component.js.map +1 -1
  277. package/dist/components/icons/system/system-lightbulb-fill/system-lightbulb-fill.component.js +9 -12
  278. package/dist/components/icons/system/system-lightbulb-fill/system-lightbulb-fill.component.js.map +1 -1
  279. package/dist/components/icons/system/system-loading-spinner/system-loading-spinner.component.js +9 -12
  280. package/dist/components/icons/system/system-loading-spinner/system-loading-spinner.component.js.map +1 -1
  281. package/dist/components/icons/system/system-lock-fill/system-lock-fill.component.js +13 -16
  282. package/dist/components/icons/system/system-lock-fill/system-lock-fill.component.js.map +1 -1
  283. package/dist/components/icons/system/system-lock-line/system-lock-line.component.js +10 -13
  284. package/dist/components/icons/system/system-lock-line/system-lock-line.component.js.map +1 -1
  285. package/dist/components/icons/system/system-menu-line/system-menu-line.component.js +9 -12
  286. package/dist/components/icons/system/system-menu-line/system-menu-line.component.js.map +1 -1
  287. package/dist/components/icons/system/system-menu-line-s/system-menu-line-s.component.js +9 -12
  288. package/dist/components/icons/system/system-menu-line-s/system-menu-line-s.component.js.map +1 -1
  289. package/dist/components/icons/system/system-more-2-line/system-more-2-line.component.js +10 -13
  290. package/dist/components/icons/system/system-more-2-line/system-more-2-line.component.js.map +1 -1
  291. package/dist/components/icons/system/system-more-line/system-more-line.component.js +16 -19
  292. package/dist/components/icons/system/system-more-line/system-more-line.component.js.map +1 -1
  293. package/dist/components/icons/system/system-search-line/system-search-line.component.js +11 -14
  294. package/dist/components/icons/system/system-search-line/system-search-line.component.js.map +1 -1
  295. package/dist/components/icons/system/system-share-line/system-share-line.component.js +9 -12
  296. package/dist/components/icons/system/system-share-line/system-share-line.component.js.map +1 -1
  297. package/dist/components/icons/system/system-shield-check-fill/system-shield-check-fill.component.js +8 -11
  298. package/dist/components/icons/system/system-shield-check-fill/system-shield-check-fill.component.js.map +1 -1
  299. package/dist/components/icons/system/system-shield-check-line/system-shield-check-line.component.js +6 -9
  300. package/dist/components/icons/system/system-shield-check-line/system-shield-check-line.component.js.map +1 -1
  301. package/dist/components/icons/system/system-star-fill/system-star-fill.component.js +13 -16
  302. package/dist/components/icons/system/system-star-fill/system-star-fill.component.js.map +1 -1
  303. package/dist/components/icons/system/system-subtract-line/system-subtract-line.component.js +11 -14
  304. package/dist/components/icons/system/system-subtract-line/system-subtract-line.component.js.map +1 -1
  305. package/dist/components/icons/system/system-subtract-line2/system-subtract-line2.component.js +7 -10
  306. package/dist/components/icons/system/system-subtract-line2/system-subtract-line2.component.js.map +1 -1
  307. package/dist/components/icons/system/system-time-fill/system-time-fill.component.js +11 -14
  308. package/dist/components/icons/system/system-time-fill/system-time-fill.component.js.map +1 -1
  309. package/dist/components/icons/system/system-time-line/system-time-line.component.js +11 -14
  310. package/dist/components/icons/system/system-time-line/system-time-line.component.js.map +1 -1
  311. package/dist/components/icons/system/system-upload-2-fill/system-upload-2-fill.component.js +5 -8
  312. package/dist/components/icons/system/system-upload-2-fill/system-upload-2-fill.component.js.map +1 -1
  313. package/dist/components/icons/system/system-upload-2-line/system-upload-2-line.component.js +7 -10
  314. package/dist/components/icons/system/system-upload-2-line/system-upload-2-line.component.js.map +1 -1
  315. package/dist/components/icons/system/system-upload-line/system-upload-line.component.js +9 -12
  316. package/dist/components/icons/system/system-upload-line/system-upload-line.component.js.map +1 -1
  317. package/dist/components/icons/system/system-zoom-in-line/system-zoom-in-line.component.js +9 -12
  318. package/dist/components/icons/system/system-zoom-in-line/system-zoom-in-line.component.js.map +1 -1
  319. package/dist/components/icons/system/system-zoom-out-line/system-zoom-out-line.component.js +11 -14
  320. package/dist/components/icons/system/system-zoom-out-line/system-zoom-out-line.component.js.map +1 -1
  321. package/dist/components/icons/user/user-account-circle-fill/user-account-circle-fill.component.js +16 -19
  322. package/dist/components/icons/user/user-account-circle-fill/user-account-circle-fill.component.js.map +1 -1
  323. package/dist/components/icons/user/user-account-circle-line/user-account-circle-line.component.js +13 -16
  324. package/dist/components/icons/user/user-account-circle-line/user-account-circle-line.component.js.map +1 -1
  325. package/dist/components/icons/user/user-user-fill/user-user-fill.component.js +8 -11
  326. package/dist/components/icons/user/user-user-fill/user-user-fill.component.js.map +1 -1
  327. package/dist/components/icons/user/user-user-line/user-user-line.component.js +11 -14
  328. package/dist/components/icons/user/user-user-line/user-user-line.component.js.map +1 -1
  329. package/dist/components/image-zoom/image-zoom.component.js +12 -17
  330. package/dist/components/image-zoom/image-zoom.component.js.map +1 -1
  331. package/dist/components/input/_styles/input.scss.js +1 -1
  332. package/dist/components/input/input-base-element.js +41 -47
  333. package/dist/components/input/input-base-element.js.map +1 -1
  334. package/dist/components/label/_styles/label.scss.js +1 -1
  335. package/dist/components/label/label.component.js +8 -11
  336. package/dist/components/label/label.component.js.map +1 -1
  337. package/dist/components/link/link.component.js +23 -27
  338. package/dist/components/link/link.component.js.map +1 -1
  339. package/dist/components/list-item/list-item.component.d.ts +2 -0
  340. package/dist/components/list-item/list-item.component.js +24 -29
  341. package/dist/components/list-item/list-item.component.js.map +1 -1
  342. package/dist/components/modal/modal-base-element.js +36 -42
  343. package/dist/components/modal/modal-base-element.js.map +1 -1
  344. package/dist/components/navigation-menu/navigation-menu-item.component.d.ts +9 -1
  345. package/dist/components/navigation-menu/navigation-menu-item.component.js +36 -31
  346. package/dist/components/navigation-menu/navigation-menu-item.component.js.map +1 -1
  347. package/dist/components/navigation-menu/navigation-menu.component.js +20 -24
  348. package/dist/components/navigation-menu/navigation-menu.component.js.map +1 -1
  349. package/dist/components/notification-badge/notification-badge.component.js +28 -32
  350. package/dist/components/notification-badge/notification-badge.component.js.map +1 -1
  351. package/dist/components/number-input/number-input.component.d.ts +7 -0
  352. package/dist/components/number-input/number-input.component.js +23 -29
  353. package/dist/components/number-input/number-input.component.js.map +1 -1
  354. package/dist/components/official-website-banner/official-website-banner.component.d.ts +1 -0
  355. package/dist/components/official-website-banner/official-website-banner.component.js +19 -24
  356. package/dist/components/official-website-banner/official-website-banner.component.js.map +1 -1
  357. package/dist/components/option-group/option-group.component.js +17 -20
  358. package/dist/components/option-group/option-group.component.js.map +1 -1
  359. package/dist/components/option-item/option-item.component.d.ts +10 -0
  360. package/dist/components/option-item/option-item.component.js +66 -60
  361. package/dist/components/option-item/option-item.component.js.map +1 -1
  362. package/dist/components/option-item/option-item.scss.js +1 -1
  363. package/dist/components/option-list/__test__/listbox-harness.d.ts +129 -0
  364. package/dist/components/option-list/listbox-state.d.ts +230 -0
  365. package/dist/components/option-list/listbox-state.js +312 -0
  366. package/dist/components/option-list/listbox-state.js.map +1 -0
  367. package/dist/components/option-list/option-data.d.ts +35 -0
  368. package/dist/components/option-list/option-data.js +34 -0
  369. package/dist/components/option-list/option-data.js.map +1 -0
  370. package/dist/components/option-list/option-list.component.d.ts +68 -14
  371. package/dist/components/option-list/option-list.component.js +364 -274
  372. package/dist/components/option-list/option-list.component.js.map +1 -1
  373. package/dist/components/overlay/overlay.component.js +10 -13
  374. package/dist/components/overlay/overlay.component.js.map +1 -1
  375. package/dist/components/pager/pager.component.js +31 -37
  376. package/dist/components/pager/pager.component.js.map +1 -1
  377. package/dist/components/password-input/password-input.component.d.ts +12 -5
  378. package/dist/components/password-input/password-input.component.js +24 -30
  379. package/dist/components/password-input/password-input.component.js.map +1 -1
  380. package/dist/components/popup/popup-base-element.d.ts +6 -0
  381. package/dist/components/popup/popup-base-element.js +96 -71
  382. package/dist/components/popup/popup-base-element.js.map +1 -1
  383. package/dist/components/progress/progress.component.js +17 -21
  384. package/dist/components/progress/progress.component.js.map +1 -1
  385. package/dist/components/radio-button/_styles/radio-button.scss.js +1 -1
  386. package/dist/components/radio-button/radio-button.component.d.ts +5 -0
  387. package/dist/components/radio-button/radio-button.component.js +58 -62
  388. package/dist/components/radio-button/radio-button.component.js.map +1 -1
  389. package/dist/components/rating/_styles/rating.scss.js +2 -2
  390. package/dist/components/rating/rating.component.js +37 -41
  391. package/dist/components/rating/rating.component.js.map +1 -1
  392. package/dist/components/scroll-area/scroll-area.component.d.ts +2 -1
  393. package/dist/components/scroll-area/scroll-area.component.js +25 -28
  394. package/dist/components/scroll-area/scroll-area.component.js.map +1 -1
  395. package/dist/components/scroll-progress/scroll-progress.component.js +13 -17
  396. package/dist/components/scroll-progress/scroll-progress.component.js.map +1 -1
  397. package/dist/components/search/search.component.d.ts +6 -1
  398. package/dist/components/search/search.component.js.map +1 -1
  399. package/dist/components/select/select.component.d.ts +47 -0
  400. package/dist/components/select/select.component.js +271 -157
  401. package/dist/components/select/select.component.js.map +1 -1
  402. package/dist/components/select/select.scss.js +1 -1
  403. package/dist/components/sidenav/sidenav-group.component.d.ts +1 -0
  404. package/dist/components/sidenav/sidenav-group.component.js +11 -14
  405. package/dist/components/sidenav/sidenav-group.component.js.map +1 -1
  406. package/dist/components/sidenav/sidenav-item.component.js +20 -23
  407. package/dist/components/sidenav/sidenav-item.component.js.map +1 -1
  408. package/dist/components/sidenav/sidenav.component.js +17 -20
  409. package/dist/components/sidenav/sidenav.component.js.map +1 -1
  410. package/dist/components/skeleton/skeleton.component.js +9 -12
  411. package/dist/components/skeleton/skeleton.component.js.map +1 -1
  412. package/dist/components/skip-link/skip-link.component.js +13 -16
  413. package/dist/components/skip-link/skip-link.component.js.map +1 -1
  414. package/dist/components/snackbar/snackbar-message.component.d.ts +3 -1
  415. package/dist/components/snackbar/snackbar-message.component.js +39 -44
  416. package/dist/components/snackbar/snackbar-message.component.js.map +1 -1
  417. package/dist/components/snackbar/snackbar.component.d.ts +0 -1
  418. package/dist/components/snackbar/snackbar.component.js +36 -42
  419. package/dist/components/snackbar/snackbar.component.js.map +1 -1
  420. package/dist/components/spinner/spinner.component.js +33 -38
  421. package/dist/components/spinner/spinner.component.js.map +1 -1
  422. package/dist/components/stack/stack.component.d.ts +2 -1
  423. package/dist/components/stack/stack.component.js +16 -19
  424. package/dist/components/stack/stack.component.js.map +1 -1
  425. package/dist/components/switch/switch.component.d.ts +6 -0
  426. package/dist/components/switch/switch.component.js +48 -51
  427. package/dist/components/switch/switch.component.js.map +1 -1
  428. package/dist/components/switch/switch.scss.js +1 -1
  429. package/dist/components/tab/tab-group.component.d.ts +8 -3
  430. package/dist/components/tab/tab-group.component.js +43 -33
  431. package/dist/components/tab/tab-group.component.js.map +1 -1
  432. package/dist/components/tab/tab.component.js +22 -25
  433. package/dist/components/tab/tab.component.js.map +1 -1
  434. package/dist/components/table/table-cell.component.d.ts +1 -1
  435. package/dist/components/table/table-cell.component.js +16 -19
  436. package/dist/components/table/table-cell.component.js.map +1 -1
  437. package/dist/components/table/table-header.component.js +21 -24
  438. package/dist/components/table/table-header.component.js.map +1 -1
  439. package/dist/components/table/table-row.component.js +15 -18
  440. package/dist/components/table/table-row.component.js.map +1 -1
  441. package/dist/components/table/table.component.d.ts +2 -0
  442. package/dist/components/table/table.component.js +18 -22
  443. package/dist/components/table/table.component.js.map +1 -1
  444. package/dist/components/textarea/textarea.component.d.ts +2 -0
  445. package/dist/components/textarea/textarea.component.js +42 -46
  446. package/dist/components/textarea/textarea.component.js.map +1 -1
  447. package/dist/components/textarea/textarea.scss.js +1 -1
  448. package/dist/components/timeline/timeline-item.component.js +7 -10
  449. package/dist/components/timeline/timeline-item.component.js.map +1 -1
  450. package/dist/components/timeline/timeline.component.js +5 -8
  451. package/dist/components/timeline/timeline.component.js.map +1 -1
  452. package/dist/components/timepicker/time-grid.component.d.ts +3 -0
  453. package/dist/components/timepicker/time-grid.component.js +12 -15
  454. package/dist/components/timepicker/time-grid.component.js.map +1 -1
  455. package/dist/components/timepicker/timepicker.component.d.ts +5 -0
  456. package/dist/components/timepicker/timepicker.component.js +90 -95
  457. package/dist/components/timepicker/timepicker.component.js.map +1 -1
  458. package/dist/components/timepicker/timepicker.scss.js +1 -1
  459. package/dist/components/toc/toc.component.d.ts +2 -0
  460. package/dist/components/toc/toc.component.js +58 -61
  461. package/dist/components/toc/toc.component.js.map +1 -1
  462. package/dist/components/toggle-button/toggle-button.component.js +9 -12
  463. package/dist/components/toggle-button/toggle-button.component.js.map +1 -1
  464. package/dist/components/tooltip/tooltip.component.d.ts +2 -0
  465. package/dist/components/tooltip/tooltip.component.js +16 -18
  466. package/dist/components/tooltip/tooltip.component.js.map +1 -1
  467. package/dist/components/tray/tray.component.d.ts +4 -1
  468. package/dist/components/tray/tray.component.js +13 -16
  469. package/dist/components/tray/tray.component.js.map +1 -1
  470. package/dist/components/typography/typography.component.js +38 -41
  471. package/dist/components/typography/typography.component.js.map +1 -1
  472. package/dist/components.d.ts +3 -0
  473. package/dist/components.js +204 -195
  474. package/dist/components.js.map +1 -1
  475. package/dist/components.native.css +5 -2
  476. package/dist/components.native.css.map +1 -1
  477. package/dist/dap-design-system.d.ts +3 -0
  478. package/dist/dds-preupgrade.css +57 -0
  479. package/dist/dds.js +383 -374
  480. package/dist/dds.js.map +1 -1
  481. package/dist/internal/dds-hu-element.d.ts +8 -0
  482. package/dist/internal/dds-hu-element.js +40 -41
  483. package/dist/internal/dds-hu-element.js.map +1 -1
  484. package/dist/internal/mixin/choiceElementMixin.js +7 -7
  485. package/dist/internal/mixin/feedbackMixin.js +13 -15
  486. package/dist/internal/mixin/feedbackMixin.js.map +1 -1
  487. package/dist/internal/mixin/focusableMixin.js +6 -6
  488. package/dist/internal/mixin/formElementMixin.js +1 -1
  489. package/dist/internal/mixin/labelPositionedMixin.js +1 -1
  490. package/dist/internal/mixin/labelableMixin.d.ts +1 -1
  491. package/dist/internal/mixin/labelableMixin.js +61 -63
  492. package/dist/internal/mixin/labelableMixin.js.map +1 -1
  493. package/dist/internal/mixin/sizedMixin.js +29 -27
  494. package/dist/internal/mixin/sizedMixin.js.map +1 -1
  495. package/dist/internal/templates/formLabel.d.ts +41 -0
  496. package/dist/internal/templates/formLabel.js +47 -0
  497. package/dist/internal/templates/formLabel.js.map +1 -0
  498. package/dist/localization/locales/de.json.js +7 -7
  499. package/dist/localization/locales/en.json.js +6 -6
  500. package/dist/localization/locales/hu.json.js +1 -1
  501. package/dist/localization/localization.d.ts +1 -2
  502. package/dist/localization/localization.js +77 -76
  503. package/dist/localization/localization.js.map +1 -1
  504. package/dist/localization/localize-controller.d.ts +12 -0
  505. package/dist/localization/localize-controller.js +51 -0
  506. package/dist/localization/localize-controller.js.map +1 -0
  507. package/dist/manifest/types/vue/index.d.ts +509 -292
  508. package/dist/manifest/vscode.html-custom-data.json +328 -269
  509. package/dist/manifest/web-types.json +834 -720
  510. package/dist/react/dap-ds-accordion/index.d.ts +1 -0
  511. package/dist/react/dap-ds-accordion/index.js.map +1 -1
  512. package/dist/react/dap-ds-anchor-heading/index.d.ts +1 -0
  513. package/dist/react/dap-ds-anchor-heading/index.js.map +1 -1
  514. package/dist/react/dap-ds-banner/index.d.ts +1 -1
  515. package/dist/react/dap-ds-banner/index.js.map +1 -1
  516. package/dist/react/dap-ds-breadcrumb/index.d.ts +1 -1
  517. package/dist/react/dap-ds-breadcrumb/index.js.map +1 -1
  518. package/dist/react/dap-ds-button-group/index.d.ts +45 -0
  519. package/dist/react/dap-ds-button-group/index.js +15 -0
  520. package/dist/react/dap-ds-button-group/index.js.map +1 -0
  521. package/dist/react/dap-ds-button-group-separator/index.d.ts +24 -0
  522. package/dist/react/dap-ds-button-group-separator/index.js +15 -0
  523. package/dist/react/dap-ds-button-group-separator/index.js.map +1 -0
  524. package/dist/react/dap-ds-button-group-text/index.d.ts +30 -0
  525. package/dist/react/dap-ds-button-group-text/index.js +15 -0
  526. package/dist/react/dap-ds-button-group-text/index.js.map +1 -0
  527. package/dist/react/dap-ds-calendar/index.d.ts +3 -0
  528. package/dist/react/dap-ds-calendar/index.js.map +1 -1
  529. package/dist/react/dap-ds-callout/index.d.ts +1 -0
  530. package/dist/react/dap-ds-callout/index.js.map +1 -1
  531. package/dist/react/dap-ds-card/index.d.ts +1 -0
  532. package/dist/react/dap-ds-card/index.js.map +1 -1
  533. package/dist/react/dap-ds-checkbox/index.d.ts +7 -1
  534. package/dist/react/dap-ds-checkbox/index.js.map +1 -1
  535. package/dist/react/dap-ds-chip/index.d.ts +1 -0
  536. package/dist/react/dap-ds-chip/index.js.map +1 -1
  537. package/dist/react/dap-ds-code-puncher/index.d.ts +4 -0
  538. package/dist/react/dap-ds-code-puncher/index.js.map +1 -1
  539. package/dist/react/dap-ds-combobox/index.d.ts +9 -1
  540. package/dist/react/dap-ds-combobox/index.js.map +1 -1
  541. package/dist/react/dap-ds-command/index.d.ts +3 -0
  542. package/dist/react/dap-ds-command/index.js.map +1 -1
  543. package/dist/react/dap-ds-copybox-input/index.d.ts +11 -0
  544. package/dist/react/dap-ds-copybox-input/index.js.map +1 -1
  545. package/dist/react/dap-ds-datatable/index.d.ts +17 -0
  546. package/dist/react/dap-ds-datatable/index.js.map +1 -1
  547. package/dist/react/dap-ds-datepicker/index.d.ts +8 -0
  548. package/dist/react/dap-ds-datepicker/index.js.map +1 -1
  549. package/dist/react/dap-ds-file-input/index.d.ts +3 -0
  550. package/dist/react/dap-ds-file-input/index.js.map +1 -1
  551. package/dist/react/dap-ds-file-input-list-item/index.d.ts +1 -0
  552. package/dist/react/dap-ds-file-input-list-item/index.js.map +1 -1
  553. package/dist/react/dap-ds-form-label/index.d.ts +1 -1
  554. package/dist/react/dap-ds-form-label/index.js.map +1 -1
  555. package/dist/react/dap-ds-icon-button/index.d.ts +1 -0
  556. package/dist/react/dap-ds-icon-button/index.js.map +1 -1
  557. package/dist/react/dap-ds-input-group/index.d.ts +4 -0
  558. package/dist/react/dap-ds-input-group/index.js.map +1 -1
  559. package/dist/react/dap-ds-list-item/index.d.ts +2 -0
  560. package/dist/react/dap-ds-list-item/index.js.map +1 -1
  561. package/dist/react/dap-ds-number-input/index.d.ts +7 -0
  562. package/dist/react/dap-ds-number-input/index.js.map +1 -1
  563. package/dist/react/dap-ds-official-website-banner/index.d.ts +1 -0
  564. package/dist/react/dap-ds-official-website-banner/index.js.map +1 -1
  565. package/dist/react/dap-ds-option-item/index.d.ts +1 -0
  566. package/dist/react/dap-ds-option-item/index.js.map +1 -1
  567. package/dist/react/dap-ds-option-list/index.d.ts +1 -1
  568. package/dist/react/dap-ds-option-list/index.js.map +1 -1
  569. package/dist/react/dap-ds-password-input/index.d.ts +12 -5
  570. package/dist/react/dap-ds-password-input/index.js.map +1 -1
  571. package/dist/react/dap-ds-radio-button/index.d.ts +5 -0
  572. package/dist/react/dap-ds-radio-button/index.js.map +1 -1
  573. package/dist/react/dap-ds-radio-group/index.d.ts +5 -0
  574. package/dist/react/dap-ds-radio-group/index.js.map +1 -1
  575. package/dist/react/dap-ds-scroll-area/index.d.ts +2 -1
  576. package/dist/react/dap-ds-scroll-area/index.js.map +1 -1
  577. package/dist/react/dap-ds-search/index.d.ts +6 -1
  578. package/dist/react/dap-ds-search/index.js.map +1 -1
  579. package/dist/react/dap-ds-select/index.d.ts +6 -0
  580. package/dist/react/dap-ds-select/index.js.map +1 -1
  581. package/dist/react/dap-ds-sidenav-group/index.d.ts +1 -0
  582. package/dist/react/dap-ds-sidenav-group/index.js.map +1 -1
  583. package/dist/react/dap-ds-snackbar/index.d.ts +0 -1
  584. package/dist/react/dap-ds-snackbar/index.js.map +1 -1
  585. package/dist/react/dap-ds-snackbar-message/index.d.ts +3 -1
  586. package/dist/react/dap-ds-snackbar-message/index.js.map +1 -1
  587. package/dist/react/dap-ds-stack/index.d.ts +2 -1
  588. package/dist/react/dap-ds-stack/index.js.map +1 -1
  589. package/dist/react/dap-ds-switch/index.d.ts +6 -0
  590. package/dist/react/dap-ds-switch/index.js.map +1 -1
  591. package/dist/react/dap-ds-tab-group/index.d.ts +4 -2
  592. package/dist/react/dap-ds-tab-group/index.js.map +1 -1
  593. package/dist/react/dap-ds-table/index.d.ts +2 -0
  594. package/dist/react/dap-ds-table/index.js.map +1 -1
  595. package/dist/react/dap-ds-table-cell/index.d.ts +1 -1
  596. package/dist/react/dap-ds-table-cell/index.js.map +1 -1
  597. package/dist/react/dap-ds-textarea/index.d.ts +2 -0
  598. package/dist/react/dap-ds-textarea/index.js.map +1 -1
  599. package/dist/react/dap-ds-time-grid/index.d.ts +3 -0
  600. package/dist/react/dap-ds-time-grid/index.js.map +1 -1
  601. package/dist/react/dap-ds-timepicker/index.d.ts +5 -0
  602. package/dist/react/dap-ds-timepicker/index.js.map +1 -1
  603. package/dist/react/dap-ds-toc/index.d.ts +2 -0
  604. package/dist/react/dap-ds-toc/index.js.map +1 -1
  605. package/dist/react/dap-ds-tooltip/index.d.ts +2 -0
  606. package/dist/react/dap-ds-tooltip/index.js.map +1 -1
  607. package/dist/react/dap-ds-tray/index.d.ts +4 -1
  608. package/dist/react/dap-ds-tray/index.js.map +1 -1
  609. package/dist/react/index.d.ts +11 -8
  610. package/dist/react-types.ts +11 -8
  611. package/dist/react.js +362 -356
  612. package/dist/react.js.map +1 -1
  613. package/package.json +17 -3
  614. package/dist/node_modules/@lit/context/lib/context-request-event.js +0 -14
  615. package/dist/node_modules/@lit/context/lib/context-request-event.js.map +0 -1
  616. package/dist/node_modules/@lit/context/lib/controllers/context-consumer.js +0 -31
  617. package/dist/node_modules/@lit/context/lib/controllers/context-consumer.js.map +0 -1
  618. package/dist/node_modules/@lit/context/lib/controllers/context-provider.js +0 -40
  619. package/dist/node_modules/@lit/context/lib/controllers/context-provider.js.map +0 -1
  620. package/dist/node_modules/@lit/context/lib/create-context.js +0 -12
  621. package/dist/node_modules/@lit/context/lib/create-context.js.map +0 -1
  622. package/dist/node_modules/@lit/context/lib/value-notifier.js +0 -37
  623. package/dist/node_modules/@lit/context/lib/value-notifier.js.map +0 -1
  624. package/dist/node_modules/@lit/reactive-element/css-tag.js +0 -51
  625. package/dist/node_modules/@lit/reactive-element/css-tag.js.map +0 -1
  626. package/dist/node_modules/@lit/reactive-element/decorators/base.js +0 -10
  627. package/dist/node_modules/@lit/reactive-element/decorators/base.js.map +0 -1
  628. package/dist/node_modules/@lit/reactive-element/decorators/property.js +0 -38
  629. package/dist/node_modules/@lit/reactive-element/decorators/property.js.map +0 -1
  630. package/dist/node_modules/@lit/reactive-element/decorators/query-all.js +0 -17
  631. package/dist/node_modules/@lit/reactive-element/decorators/query-all.js.map +0 -1
  632. package/dist/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +0 -20
  633. package/dist/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map +0 -1
  634. package/dist/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +0 -20
  635. package/dist/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map +0 -1
  636. package/dist/node_modules/@lit/reactive-element/decorators/query.js +0 -21
  637. package/dist/node_modules/@lit/reactive-element/decorators/query.js.map +0 -1
  638. package/dist/node_modules/@lit/reactive-element/decorators/state.js +0 -25
  639. package/dist/node_modules/@lit/reactive-element/decorators/state.js.map +0 -1
  640. package/dist/node_modules/@lit/reactive-element/reactive-element.js +0 -276
  641. package/dist/node_modules/@lit/reactive-element/reactive-element.js.map +0 -1
  642. package/dist/node_modules/lit-element/lit-element.js +0 -53
  643. package/dist/node_modules/lit-element/lit-element.js.map +0 -1
  644. package/dist/node_modules/lit-html/async-directive.js +0 -71
  645. package/dist/node_modules/lit-html/async-directive.js.map +0 -1
  646. package/dist/node_modules/lit-html/directive-helpers.js +0 -46
  647. package/dist/node_modules/lit-html/directive-helpers.js.map +0 -1
  648. package/dist/node_modules/lit-html/directive.js +0 -28
  649. package/dist/node_modules/lit-html/directive.js.map +0 -1
  650. package/dist/node_modules/lit-html/directives/if-defined.js +0 -11
  651. package/dist/node_modules/lit-html/directives/if-defined.js.map +0 -1
  652. package/dist/node_modules/lit-html/directives/map.js +0 -15
  653. package/dist/node_modules/lit-html/directives/map.js.map +0 -1
  654. package/dist/node_modules/lit-html/directives/repeat.js +0 -63
  655. package/dist/node_modules/lit-html/directives/repeat.js.map +0 -1
  656. package/dist/node_modules/lit-html/directives/style-map.js +0 -37
  657. package/dist/node_modules/lit-html/directives/style-map.js.map +0 -1
  658. package/dist/node_modules/lit-html/lit-html.js +0 -249
  659. package/dist/node_modules/lit-html/lit-html.js.map +0 -1
  660. package/dist/node_modules/lit-html/static.js +0 -34
  661. package/dist/node_modules/lit-html/static.js.map +0 -1
  662. package/dist/node_modules/lit-i18n/src/lit-i18n.js +0 -95
  663. package/dist/node_modules/lit-i18n/src/lit-i18n.js.map +0 -1
@@ -1,25 +1,19 @@
1
- import { clsx as m } from "../../node_modules/clsx/dist/clsx.js";
2
- import "../../node_modules/@lit/reactive-element/reactive-element.js";
3
- import { nothing as f, html as n } from "../../node_modules/lit-html/lit-html.js";
4
- import "../../node_modules/lit-element/lit-element.js";
5
- import { property as b } from "../../node_modules/@lit/reactive-element/decorators/property.js";
6
- import { state as u } from "../../node_modules/@lit/reactive-element/decorators/state.js";
7
- import { ifDefined as w } from "../../node_modules/lit-html/directives/if-defined.js";
8
- import "../../localization/localization.js";
1
+ import { clsx as h } from "../../node_modules/clsx/dist/clsx.js";
2
+ import { unsafeCSS as r, css as b, nothing as m, html as d } from "lit";
3
+ import { state as f, property as u } from "lit/decorators.js";
4
+ import { ifDefined as w } from "lit/directives/if-defined.js";
9
5
  import g from "../icon/icon.component.js";
10
6
  import y from "../icon-button/icon-button.component.js";
11
- import { InputBaseElement as d } from "../input/input-base-element.js";
7
+ import { InputBaseElement as l } from "../input/input-base-element.js";
12
8
  import x from "../spinner/spinner.component.js";
13
- import $ from "../stack/stack.component.js";
14
- import V from "./password-input.scss.js";
15
- import { unsafeCSS as c, css as _ } from "../../node_modules/@lit/reactive-element/css-tag.js";
16
- import { translate as l } from "../../node_modules/lit-i18n/src/lit-i18n.js";
17
- var k = Object.defineProperty, h = (r, t, a, v) => {
18
- for (var s = void 0, e = r.length - 1, p; e >= 0; e--)
19
- (p = r[e]) && (s = p(t, a, s) || s);
20
- return s && k(t, a, s), s;
9
+ import V from "../stack/stack.component.js";
10
+ import $ from "./password-input.scss.js";
11
+ var _ = Object.defineProperty, c = (a, t, n, k) => {
12
+ for (var s = void 0, e = a.length - 1, p; e >= 0; e--)
13
+ (p = a[e]) && (s = p(t, n, s) || s);
14
+ return s && _(t, n, s), s;
21
15
  };
22
- const i = class i extends d {
16
+ const i = class i extends l {
23
17
  constructor() {
24
18
  super(), this.passwordVisibile = !1, this.toggleButtonTestId = "password-input-toggle-button", this.type = "password";
25
19
  }
@@ -31,20 +25,20 @@ const i = class i extends d {
31
25
  }
32
26
  render() {
33
27
  return this.renderInput(
34
- n` <span
28
+ d` <span
35
29
  part="postfix"
36
- class=${m("input__addon-postfix password-input", {
30
+ class=${h("input__addon-postfix password-input", {
37
31
  "password-input--visible": this.passwordVisibile
38
32
  })}>
39
33
  <dap-ds-stack direction="row" slot="postfix">
40
- ${this.loading ? n`<dap-ds-spinner size="lg"></dap-ds-spinner>` : f}
34
+ ${this.loading ? d`<dap-ds-spinner size="lg"></dap-ds-spinner>` : m}
41
35
  <dap-ds-icon-button
42
36
  part="show-button"
43
37
  data-testid=${this.toggleButtonTestId}
44
38
  exportparts="base:show-button-base, content: show-button-content"
45
39
  size=${w(this.getIconSize(this.size))}
46
40
  role="switch"
47
- arialabel="${this.passwordVisibile ? l("hide") : l("show")}"
41
+ arialabel="${this.passwordVisibile ? this.localize.t("hide") : this.localize.t("show")}"
48
42
  aria-checked=${this.passwordVisibile === !0 ? "true" : "false"}
49
43
  .disabled=${this.disabled}
50
44
  @click=${this._toggleVisibility}>
@@ -67,20 +61,20 @@ const i = class i extends d {
67
61
  }
68
62
  };
69
63
  i.tagName = "dap-ds-password-input", i.dependencies = {
70
- "dap-ds-stack": $,
64
+ "dap-ds-stack": V,
71
65
  "dap-ds-spinner": x,
72
66
  "dap-ds-icon-button": y,
73
67
  "dap-ds-icon": g
74
- }, i.styles = _`
75
- ${c(d.styles)}
76
- ${c(V)}
68
+ }, i.styles = b`
69
+ ${r(l.styles)}
70
+ ${r($)}
77
71
  `;
78
72
  let o = i;
79
- h([
80
- u()
73
+ c([
74
+ f()
81
75
  ], o.prototype, "passwordVisibile");
82
- h([
83
- b()
76
+ c([
77
+ u()
84
78
  ], o.prototype, "toggleButtonTestId");
85
79
  export {
86
80
  o as default
@@ -1 +1 @@
1
- {"version":3,"file":"password-input.component.js","sources":["../../../src/components/password-input/password-input.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { css, html, nothing, unsafeCSS } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { translate } from '@/localization/localization'\n\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport { InputBaseElement } from '../input/input-base-element'\nimport DapDSSpinner from '../spinner/spinner.component'\nimport DapDSStack from '../stack/stack.component'\nimport style from './password-input.scss?inline'\n\n/**\n * `dap-ds-password-input`\n * @summary A password input a field for entering a password.\n * @element dap-ds-password-input\n * @title - Password input\n *\n * @property {string} label - The label of the password input.\n * @property {string} placeholder - The placeholder of the password input.\n * @property {string} description - The description of the password input.\n * @property {string} tooltip - The tooltip of the password input.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the input.\n * @property {string} status - The status of the password input. Can be `success` or `error`.\n * @property {'xs' | 'sm' | 'sm'} size - The size of the password input. Default is `sm`.\n * @property {string} name - The name of the password input.\n * @property {string} value - The value of the password input.\n * @property {boolean} disabled - The disabled state of the password input. Default is false.\n * @property {boolean} required - The required state of the password input. Default is false.\n * @property {boolean} readonly - The readonly state of the password input. Default is false.\n * @property {boolean} autofocus - The autofocus state of the password input. Default is false.\n * @property {string} feedback - The feedback of the input.\n * @property {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.\n * @property {boolean} loading - The loading state of the password input. Default is false.\n * @property {boolean} optional - The optional state of the password input.\n * @property {string} optionalLabel - The optional label of the password input.\n * @property {string} requiredLabel - The required indicator of the password input. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n *\n * @event {{ value: string }} dds-change - Fired when the input value changes.\n * @event {{ value: string }} dds-input - Fired when the input value changes.\n * @event {{ value: string, originalEvent: Event }} dds-keydown - Fired when a key is pressed down.\n * @event {{ void }} dds-blur - Fired when the input loses focus.\n * @event {{ void }} dds-focus - Emitted when the input gains focus.\n *\n * @cssproperty --dds-input-height-xs - The height of the extra small input. (default: var(--dds-spacing-800)).\n * @cssproperty --dds-input-height-sm - The height of the small input. (default: var(--dds-spacing-1000)).\n * @cssproperty --dds-input-height-lg - The height of the large input. (default: var(--dds-spacing-1200)).\n * @cssproperty --dds-input-padding-xs - The padding of the extra small input. (default: 0 var(--dds-spacing-200)).\n * @cssproperty --dds-input-padding-sm - The padding of the small input. (default: 0 var(--dds-spacing-300)).\n * @cssproperty --dds-input-padding-lg - The padding of the large input. (default: 0 var(--dds-spacing-400)).\n * @cssproperty --dds-input-font-size-xs - The font size of the extra small input. (default: var(--dds-font-sm)).\n * @cssproperty --dds-input-font-size-sm - The font size of the small input. (default: var(--dds-font-base)).\n * @cssproperty --dds-input-font-size-lg - The font size of the large input. (default: var(--dds-font-lg)).\n * @cssproperty --dds-input-border - The border of the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-background - The background color of the input. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-text-color - The text color of the input. (default: var(--dds-text-neutral-base)).\n * @cssproperty --dds-input-border-radius - The border radius of the input. (default: var(--dds-radius-base)).\n * @cssproperty --dds-input-disabled-border - The border of the disabled input. (default: 0 solid var(--dds-border-neutral-disabled)).\n * @cssproperty --dds-input-disabled-background - The background color of the disabled input. (default: var(--dds-fields-background-disabled)).\n * @cssproperty --dds-input-disabled-text - The text color of the disabled input. (default: var(--dds-text-neutral-disabled)).\n * @cssproperty --dds-input-readonly-border - The border of the readonly input. (default: 0 solid var(--dds-border-neutral-subtle)).\n * @cssproperty --dds-input-readonly-background - The background color of the readonly input. (default: var(--dds-fields-background-read-only)).\n * @cssproperty --dds-input-readonly-text - The text color of the readonly input. (default: var(--dds-text-neutral-subtle)).\n * @cssproperty --dds-input-success-border - The border of the success input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-error-border - The border of the error input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-background - The background color of the input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-success-background - The background color of the success input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-error-background - The background color of the error input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-border-before - The border of the addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-addon-border-after - The border of the addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-addon-border-width-before - The border width of the addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-border-width-after - The border width of the addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n * @cssproperty --dds-input-addon-success-border - The border of the success addon. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-before - The border of the success addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-after - The border of the success addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-width-before - The border width of the success addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-success-border-width-after - The border width of the success addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n * @cssproperty --dds-input-addon-error-border-before - The border of the error addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-error-border-after - The border of the error addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-error-border-width-before - The border width of the error addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-error-border-width-after - The border width of the error addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n *\n * @csspart postfix - The postfix of the password input.\n * @csspart password-input - The password input.\n * @csspart password-input--visible - The visible password input.\n * @csspart show-button - The show button of the password input.\n * @csspart show-button-base - The base of the show button.\n * @csspart show-button-content - The content of the show button.\n * @csspart show-icon - The show icon of the password input.\n * @csspart show-icon-base - The base of the show icon.\n * @csspart hide-button - The hide button of the password input.\n * @csspart hide-button-base - The base of the hide button.\n * @csspart hide-button-content - The content of the hide button.\n * @csspart hide-icon - The hide icon of the password input.\n * @csspart hide-icon-base - The base of the hide icon.\n */\nexport default class DapDSPasswordInput extends InputBaseElement {\n static tagName = 'dap-ds-password-input'\n\n static dependencies = {\n 'dap-ds-stack': DapDSStack,\n 'dap-ds-spinner': DapDSSpinner,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n }\n\n @state() passwordVisibile: boolean = false\n\n /** `data-testid` for the show/hide toggle button. */\n @property() toggleButtonTestId = 'password-input-toggle-button'\n\n static readonly styles = css`\n ${unsafeCSS(InputBaseElement.styles)}\n ${unsafeCSS(style)}\n `\n constructor() {\n super()\n this.type = 'password'\n }\n\n private _toggleVisibility() {\n this.passwordVisibile = !this.passwordVisibile\n this.type = this.passwordVisibile ? 'text' : 'password'\n }\n\n private getIconSize(size: string) {\n if (size === 'sm') {\n return 'md'\n }\n return size\n }\n\n render() {\n return this.renderInput(\n html` <span\n part=\"postfix\"\n class=${clsx('input__addon-postfix password-input', {\n 'password-input--visible': this.passwordVisibile,\n })}>\n <dap-ds-stack direction=\"row\" slot=\"postfix\">\n ${this.loading\n ? html`<dap-ds-spinner size=\"lg\"></dap-ds-spinner>`\n : nothing}\n <dap-ds-icon-button\n part=\"show-button\"\n data-testid=${this.toggleButtonTestId}\n exportparts=\"base:show-button-base, content: show-button-content\"\n size=${ifDefined(this.getIconSize(this.size)) as 'lg' | 'md' | 'sm'}\n role=\"switch\"\n arialabel=\"${this.passwordVisibile\n ? translate('hide')\n : translate('show')}\"\n aria-checked=${this.passwordVisibile === true ? 'true' : 'false'}\n .disabled=${this.disabled}\n @click=${this._toggleVisibility}>\n <slot name=\"icon\">\n <dap-ds-icon\n name=\"eye-line\"\n class=\"input__icon-show\"\n part=\"show-icon\"\n exportparts=\"icon: show-icon, base: show-icon-base\"></dap-ds-icon>\n <dap-ds-icon\n name=\"eye-off-line\"\n class=\"input__icon-hide\"\n part=\"hide-icon\"\n exportparts=\"icon: hide-icon, base: hide-icon-base\"></dap-ds-icon>\n </slot>\n </dap-ds-icon-button>\n </dap-ds-stack>\n </span>`,\n )\n }\n}\n"],"names":["_DapDSPasswordInput","InputBaseElement","size","html","clsx","nothing","ifDefined","translate","DapDSStack","DapDSSpinner","DapDSIconButton","DapDSIcon","css","unsafeCSS","style","DapDSPasswordInput","__decorateClass","state","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmGA,MAAqBA,IAArB,MAAqBA,UAA2BC,EAAiB;AAAA,EAmB/D,cAAc;AACN,UAAA,GAV6B,KAAA,mBAAA,IAGJ,KAAA,qBAAA,gCAQ/B,KAAK,OAAO;AAAA,EAAA;AAAA,EAGN,oBAAoB;AACrB,SAAA,mBAAmB,CAAC,KAAK,kBACzB,KAAA,OAAO,KAAK,mBAAmB,SAAS;AAAA,EAAA;AAAA,EAGvC,YAAYC,GAAc;AAChC,WAAIA,MAAS,OACJ,OAEFA;AAAA,EAAA;AAAA,EAGT,SAAS;AACP,WAAO,KAAK;AAAA,MACVC;AAAAA;AAAAA,gBAEUC,EAAK,uCAAuC;AAAA,QAClD,2BAA2B,KAAK;AAAA,MAAA,CACjC,CAAC;AAAA;AAAA,YAEE,KAAK,UACHD,iDACAE,CAAO;AAAA;AAAA;AAAA,0BAGK,KAAK,kBAAkB;AAAA;AAAA,mBAE9BC,EAAU,KAAK,YAAY,KAAK,IAAI,CAAC,CAAuB;AAAA;AAAA,yBAEtD,KAAK,mBACdC,EAAU,MAAM,IAChBA,EAAU,MAAM,CAAC;AAAA,2BACN,KAAK,qBAAqB,KAAO,SAAS,OAAO;AAAA,wBACpD,KAAK,QAAQ;AAAA,qBAChB,KAAK,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBvC;AAAA,EAAA;AAEJ;AA3EEP,EAAO,UAAU,yBAEjBA,EAAO,eAAe;AAAA,EACpB,gBAAgBQ;AAAA,EAChB,kBAAkBC;AAAA,EAClB,sBAAsBC;AAAA,EACtB,eAAeC;AACjB,GAOAX,EAAgB,SAASY;AAAAA,MACrBC,EAAUZ,EAAiB,MAAM,CAAC;AAAA,MAClCY,EAAUC,CAAK,CAAC;AAAA;AAjBtB,IAAqBC,IAArBf;AAUWgB,EAAA;AAAA,EAARC,EAAM;AAAA,GAVYF,EAUV,WAAA,kBAAA;AAGGC,EAAA;AAAA,EAAXE,EAAS;AAAA,GAbSH,EAaP,WAAA,oBAAA;"}
1
+ {"version":3,"file":"password-input.component.js","sources":["../../../src/components/password-input/password-input.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { css, html, nothing, unsafeCSS } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport { InputBaseElement } from '../input/input-base-element'\nimport DapDSSpinner from '../spinner/spinner.component'\nimport DapDSStack from '../stack/stack.component'\nimport style from './password-input.scss?inline'\n\n/**\n * `dap-ds-password-input`\n * @summary A password input a field for entering a password.\n * @element dap-ds-password-input\n * @title - Password input\n *\n * @property {string} label - The label of the password input.\n * @property {string} placeholder - The placeholder of the password input.\n * @property {string} description - The description of the password input.\n * @property {string} tooltip - The tooltip of the password input.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the input.\n * @property {string} status - The status of the password input. Can be `success` or `error`.\n * @property {'xs' | 'sm' | 'sm'} size - The size of the password input. Default is `sm`.\n * @property {string} name - The name of the password input.\n * @property {string} value - The value of the password input.\n * @property {boolean} disabled - The disabled state of the password input. Default is false.\n * @property {boolean} required - The required state of the password input. Default is false.\n * @property {boolean} readonly - The readonly state of the password input. Default is false.\n * @property {boolean} autofocus - The autofocus state of the password input. Default is false.\n * @property {string} feedback - The feedback of the input.\n * @property {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the input. Can be `negative`, `positive`, or `warning`.\n * @property {boolean} loading - The loading state of the password input. Default is false.\n * @property {boolean} optional - The optional state of the password input.\n * @property {string} optionalLabel - The optional label of the password input.\n * @property {string} requiredLabel - The required indicator of the password input. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n *\n * @event {{ value: string }} dds-change - Fired when the input value changes.\n * @event {{ value: string }} dds-input - Fired when the input value changes.\n * @event {{ value: string, originalEvent: Event }} dds-keydown - Fired when a key is pressed down.\n * @event {{ void }} dds-blur - Fired when the input loses focus.\n * @event {{ void }} dds-focus - Emitted when the input gains focus.\n *\n * @cssproperty --dds-input-height-xs - The height of the extra small input. (default: var(--dds-spacing-800)).\n * @cssproperty --dds-input-height-sm - The height of the small input. (default: var(--dds-spacing-1000)).\n * @cssproperty --dds-input-height-lg - The height of the large input. (default: var(--dds-spacing-1200)).\n * @cssproperty --dds-input-padding-xs - The padding of the extra small input. (default: 0 var(--dds-spacing-200)).\n * @cssproperty --dds-input-padding-sm - The padding of the small input. (default: 0 var(--dds-spacing-300)).\n * @cssproperty --dds-input-padding-lg - The padding of the large input. (default: 0 var(--dds-spacing-400)).\n * @cssproperty --dds-input-font-size-xs - The font size of the extra small input. (default: var(--dds-font-sm)).\n * @cssproperty --dds-input-font-size-sm - The font size of the small input. (default: var(--dds-font-base)).\n * @cssproperty --dds-input-font-size-lg - The font size of the large input. (default: var(--dds-font-lg)).\n * @cssproperty --dds-input-border - The border of the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-background - The background color of the input. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-text-color - The text color of the input. (default: var(--dds-text-neutral-base)).\n * @cssproperty --dds-input-border-radius - The border radius of the input. (default: var(--dds-radius-base)).\n * @cssproperty --dds-input-disabled-border - The border of the disabled input. (default: 0 solid var(--dds-border-neutral-disabled)).\n * @cssproperty --dds-input-disabled-background - The background color of the disabled input. (default: var(--dds-fields-background-disabled)).\n * @cssproperty --dds-input-disabled-text - The text color of the disabled input. (default: var(--dds-text-neutral-disabled)).\n * @cssproperty --dds-input-readonly-border - The border of the readonly input. (default: 0 solid var(--dds-border-neutral-subtle)).\n * @cssproperty --dds-input-readonly-background - The background color of the readonly input. (default: var(--dds-fields-background-read-only)).\n * @cssproperty --dds-input-readonly-text - The text color of the readonly input. (default: var(--dds-text-neutral-subtle)).\n * @cssproperty --dds-input-success-border - The border of the success input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-error-border - The border of the error input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-background - The background color of the input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-success-background - The background color of the success input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-error-background - The background color of the error input addon. (default: var(--dds-fields-background-default)).\n * @cssproperty --dds-input-addon-border-before - The border of the addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-addon-border-after - The border of the addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-neutral-base)).\n * @cssproperty --dds-input-addon-border-width-before - The border width of the addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-border-width-after - The border width of the addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n * @cssproperty --dds-input-addon-success-border - The border of the success addon. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-before - The border of the success addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-after - The border of the success addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-positive-base)).\n * @cssproperty --dds-input-addon-success-border-width-before - The border width of the success addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-success-border-width-after - The border width of the success addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n * @cssproperty --dds-input-addon-error-border-before - The border of the error addon before the input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-error-border-after - The border of the error addon after the input. (default: var(--dds-border-width-base) solid var(--dds-border-negative-base)).\n * @cssproperty --dds-input-addon-error-border-width-before - The border width of the error addon before the input. (default: var(--dds-border-width-base) 0 var(--dds-border-width-base) var(--dds-border-width-base)).\n * @cssproperty --dds-input-addon-error-border-width-after - The border width of the error addon after the input. (default: var(--dds-border-width-base) var(--dds-border-width-base) var(--dds-border-width-base) 0).\n *\n * @csspart postfix - The postfix of the password input.\n * @csspart show-button - The show button of the password input.\n * @csspart show-button-base - The base of the show button.\n * @csspart show-button-content - The content of the show button.\n * @csspart show-icon - The show icon of the password input.\n * @csspart show-icon-base - The base of the show icon.\n * @csspart hide-icon - The hide icon of the password input.\n * @csspart hide-icon-base - The base of the hide icon.\n * @csspart base - The main input container.\n * @csspart input - The input element.\n * @csspart label - The label of the input.\n * @csspart description - The description of the input.\n * @csspart feedback - The feedback of the input.\n * @csspart tooltip - The tooltip of the input.\n * @csspart addon-before - The addon before the input.\n * @csspart addon-after - The addon after the input.\n * @csspart prefix - The prefix of the input.\n * @csspart label-base - The base of the label.\n * @csspart label-required - The required indicator of the label.\n * @csspart label-optional - The optional indicator of the label.\n */\nexport default class DapDSPasswordInput extends InputBaseElement {\n static tagName = 'dap-ds-password-input'\n\n static dependencies = {\n 'dap-ds-stack': DapDSStack,\n 'dap-ds-spinner': DapDSSpinner,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n }\n\n @state() passwordVisibile: boolean = false\n\n /** `data-testid` for the show/hide toggle button. */\n @property() toggleButtonTestId = 'password-input-toggle-button'\n\n static readonly styles = css`\n ${unsafeCSS(InputBaseElement.styles)}\n ${unsafeCSS(style)}\n `\n constructor() {\n super()\n this.type = 'password'\n }\n\n private _toggleVisibility() {\n this.passwordVisibile = !this.passwordVisibile\n this.type = this.passwordVisibile ? 'text' : 'password'\n }\n\n private getIconSize(size: string) {\n if (size === 'sm') {\n return 'md'\n }\n return size\n }\n\n render() {\n return this.renderInput(\n html` <span\n part=\"postfix\"\n class=${clsx('input__addon-postfix password-input', {\n 'password-input--visible': this.passwordVisibile,\n })}>\n <dap-ds-stack direction=\"row\" slot=\"postfix\">\n ${this.loading\n ? html`<dap-ds-spinner size=\"lg\"></dap-ds-spinner>`\n : nothing}\n <dap-ds-icon-button\n part=\"show-button\"\n data-testid=${this.toggleButtonTestId}\n exportparts=\"base:show-button-base, content: show-button-content\"\n size=${ifDefined(this.getIconSize(this.size)) as 'lg' | 'md' | 'sm'}\n role=\"switch\"\n arialabel=\"${this.passwordVisibile\n ? this.localize.t('hide')\n : this.localize.t('show')}\"\n aria-checked=${this.passwordVisibile === true ? 'true' : 'false'}\n .disabled=${this.disabled}\n @click=${this._toggleVisibility}>\n <slot name=\"icon\">\n <dap-ds-icon\n name=\"eye-line\"\n class=\"input__icon-show\"\n part=\"show-icon\"\n exportparts=\"icon: show-icon, base: show-icon-base\"></dap-ds-icon>\n <dap-ds-icon\n name=\"eye-off-line\"\n class=\"input__icon-hide\"\n part=\"hide-icon\"\n exportparts=\"icon: hide-icon, base: hide-icon-base\"></dap-ds-icon>\n </slot>\n </dap-ds-icon-button>\n </dap-ds-stack>\n </span>`,\n )\n }\n}\n"],"names":["_DapDSPasswordInput","InputBaseElement","size","html","clsx","nothing","ifDefined","DapDSStack","DapDSSpinner","DapDSIconButton","DapDSIcon","css","unsafeCSS","style","DapDSPasswordInput","__decorateClass","state","property"],"mappings":";;;;;;;;;;;;;;;AAwGA,MAAqBA,IAArB,MAAqBA,UAA2BC,EAAiB;AAAA,EAmB/D,cAAc;AACN,UAAA,GAV6B,KAAA,mBAAA,IAGJ,KAAA,qBAAA,gCAQ/B,KAAK,OAAO;AAAA,EAAA;AAAA,EAGN,oBAAoB;AACrB,SAAA,mBAAmB,CAAC,KAAK,kBACzB,KAAA,OAAO,KAAK,mBAAmB,SAAS;AAAA,EAAA;AAAA,EAGvC,YAAYC,GAAc;AAChC,WAAIA,MAAS,OACJ,OAEFA;AAAA,EAAA;AAAA,EAGT,SAAS;AACP,WAAO,KAAK;AAAA,MACVC;AAAA;AAAA,gBAEUC,EAAK,uCAAuC;AAAA,QAClD,2BAA2B,KAAK;AAAA,MAAA,CACjC,CAAC;AAAA;AAAA,YAEE,KAAK,UACHD,iDACAE,CAAO;AAAA;AAAA;AAAA,0BAGK,KAAK,kBAAkB;AAAA;AAAA,mBAE9BC,EAAU,KAAK,YAAY,KAAK,IAAI,CAAC,CAAuB;AAAA;AAAA,yBAEtD,KAAK,mBACd,KAAK,SAAS,EAAE,MAAM,IACtB,KAAK,SAAS,EAAE,MAAM,CAAC;AAAA,2BACZ,KAAK,qBAAqB,KAAO,SAAS,OAAO;AAAA,wBACpD,KAAK,QAAQ;AAAA,qBAChB,KAAK,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBvC;AAAA,EAAA;AAEJ;AA3EEN,EAAO,UAAU,yBAEjBA,EAAO,eAAe;AAAA,EACpB,gBAAgBO;AAAA,EAChB,kBAAkBC;AAAA,EAClB,sBAAsBC;AAAA,EACtB,eAAeC;AACjB,GAOAV,EAAgB,SAASW;AAAA,MACrBC,EAAUX,EAAiB,MAAM,CAAC;AAAA,MAClCW,EAAUC,CAAK,CAAC;AAAA;AAjBtB,IAAqBC,IAArBd;AAUWe,EAAA;AAAA,EAARC,EAAM;AAAA,GAVYF,EAUV,WAAA,kBAAA;AAGGC,EAAA;AAAA,EAAXE,EAAS;AAAA,GAbSH,EAaP,WAAA,oBAAA;"}
@@ -42,6 +42,12 @@ export default class PopupBaseElement extends PopupBaseElement_base {
42
42
  disableViewportAutoClose: boolean;
43
43
  connectedCallback(): Promise<void>;
44
44
  protected firstUpdated(changedProps: Map<string, unknown>): void;
45
+ /**
46
+ * Whether the trigger can carry aria-expanded. Role-less wrappers (e.g. the
47
+ * combobox/datepicker field frame) expose state on their own inner control.
48
+ */
49
+ private triggerSupportsExpanded;
50
+ private syncTriggerAria;
45
51
  updated(changedProps: Map<string, unknown>): Promise<void>;
46
52
  _handleTriggerSlotChange(e?: Event | undefined): Promise<void>;
47
53
  _handleTriggerSlotChangeCallback(_e?: Event): void;
@@ -1,60 +1,85 @@
1
1
  var O = Object.getPrototypeOf;
2
- var W = Reflect.get;
3
- var y = (h, t, e) => W(O(h), e, t);
4
- var u = (h, t, e) => new Promise((n, p) => {
5
- var l = (s) => {
2
+ var $ = Reflect.get;
3
+ var y = (l, t, e) => $(O(l), e, t);
4
+ var g = (l, t, e) => new Promise((u, n) => {
5
+ var a = (s) => {
6
6
  try {
7
- g(e.next(s));
8
- } catch (a) {
9
- p(a);
7
+ d(e.next(s));
8
+ } catch (p) {
9
+ n(p);
10
10
  }
11
- }, d = (s) => {
11
+ }, h = (s) => {
12
12
  try {
13
- g(e.throw(s));
14
- } catch (a) {
15
- p(a);
13
+ d(e.throw(s));
14
+ } catch (p) {
15
+ n(p);
16
16
  }
17
- }, g = (s) => s.done ? n(s.value) : Promise.resolve(s.value).then(l, d);
18
- g((e = e.apply(h, t)).next());
17
+ }, d = (s) => s.done ? u(s.value) : Promise.resolve(s.value).then(a, h);
18
+ d((e = e.apply(l, t)).next());
19
19
  });
20
- import { autoUpdate as H, computePosition as U, offset as M, flip as T, shift as k, size as V, arrow as q } from "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
21
- import { clsx as _ } from "../../node_modules/clsx/dist/clsx.js";
22
- import "../../node_modules/@lit/reactive-element/reactive-element.js";
23
- import "../../node_modules/lit-html/lit-html.js";
24
- import "../../node_modules/lit-element/lit-element.js";
25
- import { property as o } from "../../node_modules/@lit/reactive-element/decorators/property.js";
26
- import { query as S } from "../../node_modules/@lit/reactive-element/decorators/query.js";
27
- import { html as w } from "../../node_modules/lit-html/static.js";
28
- import { SizedMixin as B } from "../../internal/mixin/sizedMixin.js";
29
- import { DdsElement as j } from "../../internal/dds-hu-element.js";
30
- import z from "./popup.scss.js";
31
- import { unsafeCSS as L } from "../../node_modules/@lit/reactive-element/css-tag.js";
32
- var N = Object.defineProperty, r = (h, t, e, n) => {
33
- for (var p = void 0, l = h.length - 1, d; l >= 0; l--)
34
- (d = h[l]) && (p = d(t, e, p) || p);
35
- return p && N(t, e, p), p;
20
+ import { autoUpdate as U, computePosition as W, offset as H, flip as N, shift as M, size as k, arrow as B } from "../../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
21
+ import { clsx as S } from "../../node_modules/clsx/dist/clsx.js";
22
+ import { unsafeCSS as P } from "lit";
23
+ import { query as C, property as o } from "lit/decorators.js";
24
+ import { html as b } from "lit/static-html.js";
25
+ import { SizedMixin as L } from "../../internal/mixin/sizedMixin.js";
26
+ import { DdsElement as V } from "../../internal/dds-hu-element.js";
27
+ import q from "./popup.scss.js";
28
+ var D = Object.defineProperty, r = (l, t, e, u) => {
29
+ for (var n = void 0, a = l.length - 1, h; a >= 0; a--)
30
+ (h = l[a]) && (n = h(t, e, n) || n);
31
+ return n && D(t, e, n), n;
36
32
  };
37
- const c = class c extends B(j) {
33
+ const I = /* @__PURE__ */ new Set([
34
+ "application",
35
+ "button",
36
+ "checkbox",
37
+ "columnheader",
38
+ "combobox",
39
+ "gridcell",
40
+ "link",
41
+ "menuitem",
42
+ "row",
43
+ "rowheader",
44
+ "tab",
45
+ "treeitem"
46
+ ]), R = /* @__PURE__ */ new Set([
47
+ "button",
48
+ "checkbox",
49
+ "image",
50
+ "reset",
51
+ "submit"
52
+ ]), c = class c extends L(V) {
38
53
  constructor() {
39
54
  super(...arguments), this.triggerElement = null, this.intersectionObserver = null, this.disabled = !1, this.opened = !1, this.placement = "bottom", this.floatingStrategy = "absolute", this.offset = 0, this.maxHeight = 250, this.maxWidth = "auto", this.disableViewportAutoClose = !1;
40
55
  }
41
56
  connectedCallback() {
42
- return u(this, null, function* () {
57
+ return g(this, null, function* () {
43
58
  y(c.prototype, this, "connectedCallback").call(this), yield this.updateComplete, this.startUpdate();
44
59
  });
45
60
  }
46
61
  firstUpdated(t) {
47
- var e, n;
48
- super.firstUpdated(t), (e = this.triggerElement) == null || e.setAttribute("aria-controls", "popup"), (n = this.triggerElement) == null || n.setAttribute("aria-expanded", "false");
62
+ super.firstUpdated(t), this.triggerElement || this._handleTriggerSlotChange(), this.syncTriggerAria();
63
+ }
64
+ /**
65
+ * Whether the trigger can carry aria-expanded. Role-less wrappers (e.g. the
66
+ * combobox/datepicker field frame) expose state on their own inner control.
67
+ */
68
+ triggerSupportsExpanded(t) {
69
+ const e = t.getAttribute("role");
70
+ return e ? I.has(e) : t.tagName === "BUTTON" ? !0 : t.tagName === "A" ? t.hasAttribute("href") : t.tagName === "INPUT" ? R.has(t.type) : !1;
71
+ }
72
+ syncTriggerAria() {
73
+ const t = this.triggerElement;
74
+ !t || !this.triggerSupportsExpanded(t) || (t.hasAttribute("aria-controls") || t.setAttribute("aria-controls", "popup"), t.setAttribute("aria-expanded", String(!!this.opened)));
49
75
  }
50
76
  updated(t) {
51
- return u(this, null, function* () {
52
- var e, n;
53
- y(c.prototype, this, "updated").call(this, t), t.has("opened") && (this.opened ? (this.startUpdate(), (e = this.triggerElement) == null || e.setAttribute("aria-expanded", "true"), this.emit("dds-opened")) : (this.stopUpdate(), (n = this.triggerElement) == null || n.setAttribute("aria-expanded", "false"), this.emit("dds-closed"))), t.has("anchor") && this._handleTriggerSlotChange(), this.opened && (yield this.updateComplete, this.updatePosition());
77
+ return g(this, null, function* () {
78
+ y(c.prototype, this, "updated").call(this, t), t.has("opened") && (this.opened ? (this.startUpdate(), this.syncTriggerAria(), this.emit("dds-opened")) : (this.stopUpdate(), this.syncTriggerAria(), this.emit("dds-closed"))), t.has("anchor") && this._handleTriggerSlotChange(), this.opened && (yield this.updateComplete, this.updatePosition());
54
79
  });
55
80
  }
56
81
  _handleTriggerSlotChange(t) {
57
- return u(this, null, function* () {
82
+ return g(this, null, function* () {
58
83
  var e;
59
84
  this._handleTriggerSlotChangeCallback(t), yield this.stopUpdate(), this.triggerElement = this.querySelector(
60
85
  ':scope > [slot="trigger"]'
@@ -71,17 +96,17 @@ const c = class c extends B(j) {
71
96
  }
72
97
  startUpdate() {
73
98
  var t;
74
- this.triggerElement && ((t = this.intersectionObserver) == null || t.disconnect(), this.intersectionObserver = new IntersectionObserver(
99
+ !this.triggerElement || !this.popup || ((t = this.intersectionObserver) == null || t.disconnect(), this.intersectionObserver = new IntersectionObserver(
75
100
  (e) => {
76
101
  e[0] && !e[0].isIntersecting && this.opened && !this.disableViewportAutoClose && (this.opened = !1, this.emit("dds-close"));
77
102
  },
78
103
  { threshold: 0 }
79
- ), this.intersectionObserver.observe(this.triggerElement), this.cleanup = H(this.triggerElement, this.popup, () => {
104
+ ), this.intersectionObserver.observe(this.triggerElement), this.cleanup = U(this.triggerElement, this.popup, () => {
80
105
  this.updatePosition();
81
106
  }));
82
107
  }
83
108
  stopUpdate() {
84
- return u(this, null, function* () {
109
+ return g(this, null, function* () {
85
110
  return new Promise((t) => {
86
111
  this.intersectionObserver && (this.intersectionObserver.disconnect(), this.intersectionObserver = null), this.cleanup ? (this.cleanup(), this.cleanup = void 0, requestAnimationFrame(() => t())) : t();
87
112
  });
@@ -91,67 +116,67 @@ const c = class c extends B(j) {
91
116
  super.disconnectedCallback(), this.intersectionObserver && (this.intersectionObserver.disconnect(), this.intersectionObserver = null), this.stopUpdate();
92
117
  }
93
118
  updatePosition() {
94
- return u(this, null, function* () {
95
- var g;
96
- if (this.disabled || !this.triggerElement)
119
+ return g(this, null, function* () {
120
+ var d;
121
+ if (this.disabled || !this.triggerElement || !this.popup)
97
122
  return;
98
123
  const t = this.triggerElement.getBoundingClientRect();
99
124
  if (!(t.top < window.innerHeight && t.bottom > 0 && t.left < window.innerWidth && t.right > 0)) {
100
125
  this.opened && !this.disableViewportAutoClose && (this.opened = !1, this.emit("dds-close"));
101
126
  return;
102
127
  }
103
- const { x: n, y: p, placement: l, middlewareData: d } = yield U(
128
+ const { x: u, y: n, placement: a, middlewareData: h } = yield W(
104
129
  this.triggerElement,
105
130
  this.popup,
106
131
  {
107
132
  placement: this.placement,
108
133
  strategy: this.floatingStrategy,
109
134
  middleware: [
110
- M(this.offset),
111
- T(),
112
- k(),
113
- V({
114
- apply: ({ rects: s, availableHeight: a, availableWidth: m, elements: f }) => {
115
- const b = Math.max(0, a), x = Math.max(0, m), $ = this.sync;
116
- this.popup.style.width = $ ? `${s.reference.width}px` : "";
117
- const v = typeof this.maxHeight == "number" ? this.maxHeight : void 0, C = v != null ? Math.min(v, b) : b;
118
- this.popup.style.maxHeight = C >= f.floating.scrollHeight ? "" : `${C}px`;
119
- const E = typeof this.maxWidth == "number" ? this.maxWidth : void 0, A = E != null ? Math.min(E, x) : x;
120
- this.popup.style.maxWidth = `${A}px`, this.fullWidth && (this.popup.style.width = "100vw");
135
+ H(this.offset),
136
+ N(),
137
+ M(),
138
+ k({
139
+ apply: ({ rects: s, availableHeight: p, availableWidth: f, elements: m }) => {
140
+ const w = Math.max(0, p), x = Math.max(0, f), A = this.sync;
141
+ this.popup.style.width = A ? `${s.reference.width}px` : "";
142
+ const v = typeof this.maxHeight == "number" ? this.maxHeight : void 0, E = v != null ? Math.min(v, w) : w;
143
+ this.popup.style.maxHeight = E >= m.floating.scrollHeight ? "" : `${E}px`;
144
+ const _ = typeof this.maxWidth == "number" ? this.maxWidth : void 0, T = _ != null ? Math.min(_, x) : x;
145
+ this.popup.style.maxWidth = `${T}px`, this.fullWidth && (this.popup.style.width = "100vw");
121
146
  }
122
147
  }),
123
- ...this.arrowElement ? [q({ element: this.arrowElement, padding: 8 })] : []
148
+ ...this.arrowElement ? [B({ element: this.arrowElement, padding: 8 })] : []
124
149
  ]
125
150
  }
126
151
  );
127
152
  if (Object.assign(this.popup.style, {
128
- left: `${n}px`,
129
- top: `${p}px`
153
+ left: `${u}px`,
154
+ top: `${n}px`
130
155
  }), this.arrowElement) {
131
- const { x: s, y: a } = d.arrow, [m] = l.split("-"), f = (g = {
156
+ const { x: s, y: p } = h.arrow, [f] = a.split("-"), m = (d = {
132
157
  top: "bottom",
133
158
  right: "left",
134
159
  bottom: "top",
135
160
  left: "right"
136
- }[m]) != null ? g : "";
161
+ }[f]) != null ? d : "";
137
162
  Object.assign(this.arrowElement.style, {
138
163
  left: s != null ? `${s}px` : "",
139
- top: a != null ? `${a}px` : "",
140
- [f]: "-5px"
164
+ top: p != null ? `${p}px` : "",
165
+ [m]: "-5px"
141
166
  }), this.arrowElement.classList.remove(
142
167
  "popup__arrow--top",
143
168
  "popup__arrow--right",
144
169
  "popup__arrow--bottom",
145
170
  "popup__arrow--left"
146
- ), this.arrowElement.classList.add(`popup__arrow--${m}`);
171
+ ), this.arrowElement.classList.add(`popup__arrow--${f}`);
147
172
  }
148
173
  });
149
174
  }
150
175
  renderTrigger() {
151
- return w``;
176
+ return b``;
152
177
  }
153
178
  renderPopup() {
154
- return w`
179
+ return b`
155
180
  <slot name="trigger" @slotchange=${this._handleTriggerSlotChange}>
156
181
  ${this.renderTrigger()}
157
182
  </slot>
@@ -159,7 +184,7 @@ const c = class c extends B(j) {
159
184
  part="popup"
160
185
  id="popup"
161
186
  ?inert=${!this.opened}
162
- class=${_("popup", `popup--${this.size}`, {
187
+ class=${S("popup", `popup--${this.size}`, {
163
188
  "popup--opened": this.opened,
164
189
  "popup--fixed": this.floatingStrategy === "fixed",
165
190
  "popup--has-arrow": this.hasArrow,
@@ -167,21 +192,21 @@ const c = class c extends B(j) {
167
192
  "popup--full-width": this.fullWidth
168
193
  })}>
169
194
  <slot @slotchange=${this._handleContentSlotChange}></slot>
170
- ${this.hasArrow ? w`<div
195
+ ${this.hasArrow ? b`<div
171
196
  part="arrow"
172
- class=${_("popup__arrow")}
197
+ class=${S("popup__arrow")}
173
198
  role="presentation"></div>` : ""}
174
199
  </div>
175
200
  `;
176
201
  }
177
202
  };
178
- c.styles = L(z);
203
+ c.styles = P(q);
179
204
  let i = c;
180
205
  r([
181
- S(".popup")
206
+ C(".popup")
182
207
  ], i.prototype, "popup");
183
208
  r([
184
- S(".popup__arrow")
209
+ C(".popup__arrow")
185
210
  ], i.prototype, "arrowElement");
186
211
  r([
187
212
  o({ reflect: !0, type: Boolean })
@@ -1 +1 @@
1
- {"version":3,"file":"popup-base-element.js","sources":["../../../src/components/popup/popup-base-element.ts"],"sourcesContent":["import {\n arrow,\n autoUpdate,\n computePosition,\n Coords,\n flip,\n offset,\n shift,\n size,\n} from '@floating-ui/dom'\nimport { clsx } from 'clsx'\nimport { TemplateResult, unsafeCSS } from 'lit'\nimport { property, query } from 'lit/decorators.js'\nimport { html } from 'lit/static-html.js'\n\nimport { SizedMixin } from '@/internal/mixin/sizedMixin'\n\nimport { FloatingStrategy, PopupPlacement } from '../../common/types'\nimport { DdsElement } from '../../internal/dds-hu-element'\nimport styles from './popup.scss?inline'\n\nexport default class PopupBaseElement extends SizedMixin(DdsElement) {\n static readonly styles = unsafeCSS(styles)\n\n protected triggerElement: Element | null = null\n private cleanup: ReturnType<typeof autoUpdate> | undefined\n private intersectionObserver: IntersectionObserver | null = null\n\n @query('.popup') protected readonly popup!: HTMLDivElement\n @query('.popup__arrow') private readonly arrowElement?: HTMLDivElement\n\n /** The disabled state of the popup. */\n @property({ reflect: true, type: Boolean }) disabled? = false\n\n /** The open state of the popup. */\n @property({ reflect: true, type: Boolean }) opened? = false\n\n /** The placement of the popup.\n * @type {'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom'\n\n /** The floating strategy of the popup.\n * @type {'absolute' | 'fixed'}\n */\n @property({ reflect: true })\n floatingStrategy: FloatingStrategy = 'absolute'\n\n /** The offset of the popup. */\n @property({ type: Number }) offset = 0\n\n /** Whether the popup should sync its width with the trigger. */\n @property({ type: Boolean }) sync?: boolean\n\n /** The maximum height of the popup. */\n @property({ type: Number }) maxHeight: number | 'auto' = 250\n\n /** The maximum width of the popup. */\n @property({ type: Number }) maxWidth: number | 'auto' = 'auto'\n\n /** Whether the popup has an arrow. */\n @property({ type: Boolean }) hasArrow: boolean\n\n /** Whether the popup should overflow. */\n @property({ type: Boolean }) overflow: boolean\n\n /** Whether the popup should take full width of the screen. */\n @property({ type: Boolean }) fullWidth: boolean\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n async connectedCallback() {\n super.connectedCallback()\n\n await this.updateComplete\n this.startUpdate()\n }\n\n protected firstUpdated(changedProps: Map<string, unknown>) {\n super.firstUpdated(changedProps)\n\n this.triggerElement?.setAttribute('aria-controls', 'popup')\n this.triggerElement?.setAttribute('aria-expanded', 'false')\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps)\n\n if (changedProps.has('opened')) {\n if (this.opened) {\n this.startUpdate()\n this.triggerElement?.setAttribute('aria-expanded', 'true')\n this.emit('dds-opened')\n } else {\n this.stopUpdate()\n this.triggerElement?.setAttribute('aria-expanded', 'false')\n this.emit('dds-closed')\n }\n }\n\n if (changedProps.has('anchor')) {\n this._handleTriggerSlotChange()\n }\n\n if (this.opened) {\n await this.updateComplete\n this.updatePosition()\n }\n }\n\n async _handleTriggerSlotChange(e?: Event | undefined) {\n this._handleTriggerSlotChangeCallback(e)\n\n await this.stopUpdate()\n\n // Use :scope > to only match direct children, not descendants\n this.triggerElement = this.querySelector<HTMLElement>(\n ':scope > [slot=\"trigger\"]',\n )\n\n if (!this.triggerElement) {\n this.triggerElement = this.shadowRoot?.querySelector(\n 'slot[name=\"trigger\"] *',\n ) as HTMLElement\n }\n\n if (this.triggerElement instanceof HTMLSlotElement) {\n this.triggerElement = this.triggerElement.assignedElements({\n flatten: true,\n })[0] as HTMLElement\n }\n\n if (this.triggerElement) {\n this.startUpdate()\n }\n }\n\n public _handleTriggerSlotChangeCallback(_e?: Event) {\n return\n }\n\n public _handleContentSlotChange(_e: Event) {\n return\n }\n\n public startUpdate() {\n if (!this.triggerElement) {\n return\n }\n\n // Create IntersectionObserver to detect when trigger is out of viewport\n this.intersectionObserver?.disconnect()\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n // If trigger is not intersecting (out of viewport), close the popup\n if (\n entries[0] &&\n !entries[0].isIntersecting &&\n this.opened &&\n !this.disableViewportAutoClose\n ) {\n this.opened = false\n this.emit('dds-close')\n }\n },\n { threshold: 0 },\n )\n this.intersectionObserver.observe(this.triggerElement)\n\n this.cleanup = autoUpdate(this.triggerElement, this.popup, () => {\n this.updatePosition()\n })\n }\n\n public async stopUpdate(): Promise<void> {\n return new Promise(resolve => {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n\n if (this.cleanup) {\n this.cleanup()\n this.cleanup = undefined\n requestAnimationFrame(() => resolve())\n } else {\n resolve()\n }\n })\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n // Clean up the IntersectionObserver\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n\n this.stopUpdate()\n }\n\n protected async updatePosition() {\n if (this.disabled || !this.triggerElement) {\n return\n }\n\n // Check if trigger element is visible in viewport\n const triggerRect = this.triggerElement.getBoundingClientRect()\n const isVisible =\n triggerRect.top < window.innerHeight &&\n triggerRect.bottom > 0 &&\n triggerRect.left < window.innerWidth &&\n triggerRect.right > 0\n\n if (!isVisible) {\n if (this.opened && !this.disableViewportAutoClose) {\n this.opened = false\n this.emit('dds-close')\n }\n return\n }\n\n const { x, y, placement, middlewareData } = await computePosition(\n this.triggerElement,\n this.popup,\n {\n placement: this.placement,\n strategy: this.floatingStrategy,\n middleware: [\n offset(this.offset),\n flip(),\n shift(),\n size({\n apply: ({ rects, availableHeight, availableWidth, elements }) => {\n const safeAvailableHeight = Math.max(0, availableHeight)\n const safeAvailableWidth = Math.max(0, availableWidth)\n const syncWidth = this.sync\n this.popup.style.width = syncWidth\n ? `${rects.reference.width}px`\n : ''\n\n const configuredMaxHeight =\n typeof this.maxHeight === 'number' ? this.maxHeight : undefined\n const effectiveMaxHeight =\n configuredMaxHeight != null\n ? Math.min(configuredMaxHeight, safeAvailableHeight)\n : safeAvailableHeight\n this.popup.style.maxHeight =\n effectiveMaxHeight >= elements.floating.scrollHeight\n ? ''\n : `${effectiveMaxHeight}px`\n\n const configuredMaxWidth =\n typeof this.maxWidth === 'number' ? this.maxWidth : undefined\n const effectiveMaxWidth =\n configuredMaxWidth != null\n ? Math.min(configuredMaxWidth, safeAvailableWidth)\n : safeAvailableWidth\n this.popup.style.maxWidth = `${effectiveMaxWidth}px`\n\n if (this.fullWidth) {\n this.popup.style.width = '100vw'\n }\n },\n }),\n ...(this.arrowElement\n ? [arrow({ element: this.arrowElement, padding: 8 })]\n : []),\n ],\n },\n )\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`,\n })\n\n if (this.arrowElement) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow as Coords\n const [side] = placement.split('-')\n const staticSide =\n {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[side] ?? ''\n\n Object.assign(this.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: `-5px`,\n })\n\n this.arrowElement.classList.remove(\n 'popup__arrow--top',\n 'popup__arrow--right',\n 'popup__arrow--bottom',\n 'popup__arrow--left',\n )\n this.arrowElement.classList.add(`popup__arrow--${side}`)\n }\n }\n\n renderTrigger(): TemplateResult {\n return html``\n }\n\n renderPopup() {\n return html`\n <slot name=\"trigger\" @slotchange=${this._handleTriggerSlotChange}>\n ${this.renderTrigger()}\n </slot>\n <div\n part=\"popup\"\n id=\"popup\"\n ?inert=${!this.opened}\n class=${clsx('popup', `popup--${this.size}`, {\n 'popup--opened': this.opened,\n 'popup--fixed': this.floatingStrategy === 'fixed',\n 'popup--has-arrow': this.hasArrow,\n 'popup--overflow': this.overflow,\n 'popup--full-width': this.fullWidth,\n })}>\n <slot @slotchange=${this._handleContentSlotChange}></slot>\n ${this.hasArrow\n ? html`<div\n part=\"arrow\"\n class=${clsx('popup__arrow')}\n role=\"presentation\"></div>`\n : ''}\n </div>\n `\n }\n}\n"],"names":["_PopupBaseElement","SizedMixin","DdsElement","__async","__superGet","changedProps","_a","_b","e","_e","entries","autoUpdate","resolve","triggerRect","x","y","placement","middlewareData","computePosition","offset","flip","shift","size","rects","availableHeight","availableWidth","elements","safeAvailableHeight","safeAvailableWidth","syncWidth","configuredMaxHeight","effectiveMaxHeight","configuredMaxWidth","effectiveMaxWidth","arrow","arrowX","arrowY","side","staticSide","html","clsx","unsafeCSS","styles","PopupBaseElement","__decorateClass","query","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBqB,MAAAA,IAAA,MAAAA,UAAyBC,EAAWC,CAAU,EAAE;AAAA,EAArE,cAAA;AAAA,UAAA,GAAA,SAAA,GAGE,KAAU,iBAAiC,MAE3C,KAAQ,uBAAoD,MAMJ,KAAA,WAAA,IAGF,KAAA,SAAA,IAKG,KAAA,YAAA,UAMpB,KAAA,mBAAA,YAGA,KAAA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A;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAjDRH,EAiDU,WAAA,0BAAA;"}
1
+ {"version":3,"file":"popup-base-element.js","sources":["../../../src/components/popup/popup-base-element.ts"],"sourcesContent":["import {\n arrow,\n autoUpdate,\n computePosition,\n Coords,\n flip,\n offset,\n shift,\n size,\n} from '@floating-ui/dom'\nimport { clsx } from 'clsx'\nimport { TemplateResult, unsafeCSS } from 'lit'\nimport { property, query } from 'lit/decorators.js'\nimport { html } from 'lit/static-html.js'\n\nimport { SizedMixin } from '@/internal/mixin/sizedMixin'\n\nimport { FloatingStrategy, PopupPlacement } from '../../common/types'\nimport { DdsElement } from '../../internal/dds-hu-element'\nimport styles from './popup.scss?inline'\n\n// Roles on which ARIA 1.2 permits aria-expanded; on any other role axe reports aria-allowed-attr\nconst EXPANDABLE_ROLES = new Set([\n 'application',\n 'button',\n 'checkbox',\n 'columnheader',\n 'combobox',\n 'gridcell',\n 'link',\n 'menuitem',\n 'row',\n 'rowheader',\n 'tab',\n 'treeitem',\n])\n\nconst EXPANDABLE_INPUT_TYPES = new Set([\n 'button',\n 'checkbox',\n 'image',\n 'reset',\n 'submit',\n])\n\nexport default class PopupBaseElement extends SizedMixin(DdsElement) {\n static readonly styles = unsafeCSS(styles)\n\n protected triggerElement: Element | null = null\n private cleanup: ReturnType<typeof autoUpdate> | undefined\n private intersectionObserver: IntersectionObserver | null = null\n\n @query('.popup') protected readonly popup!: HTMLDivElement\n @query('.popup__arrow') private readonly arrowElement?: HTMLDivElement\n\n /** The disabled state of the popup. */\n @property({ reflect: true, type: Boolean }) disabled? = false\n\n /** The open state of the popup. */\n @property({ reflect: true, type: Boolean }) opened? = false\n\n /** The placement of the popup.\n * @type {'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom'\n\n /** The floating strategy of the popup.\n * @type {'absolute' | 'fixed'}\n */\n @property({ reflect: true })\n floatingStrategy: FloatingStrategy = 'absolute'\n\n /** The offset of the popup. */\n @property({ type: Number }) offset = 0\n\n /** Whether the popup should sync its width with the trigger. */\n @property({ type: Boolean }) sync?: boolean\n\n /** The maximum height of the popup. */\n @property({ type: Number }) maxHeight: number | 'auto' = 250\n\n /** The maximum width of the popup. */\n @property({ type: Number }) maxWidth: number | 'auto' = 'auto'\n\n /** Whether the popup has an arrow. */\n @property({ type: Boolean }) hasArrow: boolean\n\n /** Whether the popup should overflow. */\n @property({ type: Boolean }) overflow: boolean\n\n /** Whether the popup should take full width of the screen. */\n @property({ type: Boolean }) fullWidth: boolean\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n async connectedCallback() {\n super.connectedCallback()\n\n await this.updateComplete\n this.startUpdate()\n }\n\n protected firstUpdated(changedProps: Map<string, unknown>) {\n super.firstUpdated(changedProps)\n\n // Resolve the trigger element on first render. Normally this happens via the\n // trigger slot's `slotchange` event, but that event does NOT fire when the\n // slotted trigger is server-rendered (declarative shadow DOM) and the\n // component hydrates. Without this, the popup never finds its anchor and\n // floating-ui positions it at (0,0) — e.g. datepicker/select dropdowns\n // appearing in the top-left corner under SSR.\n if (!this.triggerElement) {\n void this._handleTriggerSlotChange()\n }\n\n this.syncTriggerAria()\n }\n\n /**\n * Whether the trigger can carry aria-expanded. Role-less wrappers (e.g. the\n * combobox/datepicker field frame) expose state on their own inner control.\n */\n private triggerSupportsExpanded(el: Element): boolean {\n const role = el.getAttribute('role')\n if (role) {\n return EXPANDABLE_ROLES.has(role)\n }\n if (el.tagName === 'BUTTON') {\n return true\n }\n if (el.tagName === 'A') {\n return el.hasAttribute('href')\n }\n if (el.tagName === 'INPUT') {\n return EXPANDABLE_INPUT_TYPES.has((el as HTMLInputElement).type)\n }\n return false\n }\n\n private syncTriggerAria() {\n const trigger = this.triggerElement\n if (!trigger || !this.triggerSupportsExpanded(trigger)) {\n return\n }\n // Keep a trigger's own aria-controls (e.g. select points at its option list)\n if (!trigger.hasAttribute('aria-controls')) {\n trigger.setAttribute('aria-controls', 'popup')\n }\n trigger.setAttribute('aria-expanded', String(!!this.opened))\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps)\n\n if (changedProps.has('opened')) {\n if (this.opened) {\n this.startUpdate()\n this.syncTriggerAria()\n this.emit('dds-opened')\n } else {\n this.stopUpdate()\n this.syncTriggerAria()\n this.emit('dds-closed')\n }\n }\n\n if (changedProps.has('anchor')) {\n this._handleTriggerSlotChange()\n }\n\n if (this.opened) {\n await this.updateComplete\n this.updatePosition()\n }\n }\n\n async _handleTriggerSlotChange(e?: Event | undefined) {\n this._handleTriggerSlotChangeCallback(e)\n\n await this.stopUpdate()\n\n // Use :scope > to only match direct children, not descendants\n this.triggerElement = this.querySelector<HTMLElement>(\n ':scope > [slot=\"trigger\"]',\n )\n\n if (!this.triggerElement) {\n this.triggerElement = this.shadowRoot?.querySelector(\n 'slot[name=\"trigger\"] *',\n ) as HTMLElement\n }\n\n if (this.triggerElement instanceof HTMLSlotElement) {\n this.triggerElement = this.triggerElement.assignedElements({\n flatten: true,\n })[0] as HTMLElement\n }\n\n if (this.triggerElement) {\n this.startUpdate()\n }\n }\n\n public _handleTriggerSlotChangeCallback(_e?: Event) {\n return\n }\n\n public _handleContentSlotChange(_e: Event) {\n return\n }\n\n public startUpdate() {\n // `this.popup` (the floating element) is required by floating-ui's\n // autoUpdate. Subclasses that delegate to a nested popup (e.g. command) have\n // no local `.popup`, and it may not exist yet during firstUpdated — bail\n // rather than calling autoUpdate with a null floating element.\n if (!this.triggerElement || !this.popup) {\n return\n }\n\n // Create IntersectionObserver to detect when trigger is out of viewport\n this.intersectionObserver?.disconnect()\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n // If trigger is not intersecting (out of viewport), close the popup\n if (\n entries[0] &&\n !entries[0].isIntersecting &&\n this.opened &&\n !this.disableViewportAutoClose\n ) {\n this.opened = false\n this.emit('dds-close')\n }\n },\n { threshold: 0 },\n )\n this.intersectionObserver.observe(this.triggerElement)\n\n this.cleanup = autoUpdate(this.triggerElement, this.popup, () => {\n this.updatePosition()\n })\n }\n\n public async stopUpdate(): Promise<void> {\n return new Promise(resolve => {\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n\n if (this.cleanup) {\n this.cleanup()\n this.cleanup = undefined\n requestAnimationFrame(() => resolve())\n } else {\n resolve()\n }\n })\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n // Clean up the IntersectionObserver\n if (this.intersectionObserver) {\n this.intersectionObserver.disconnect()\n this.intersectionObserver = null\n }\n\n this.stopUpdate()\n }\n\n protected async updatePosition() {\n // `this.popup` (the floating element) can be null on subclasses that\n // delegate to a nested popup (e.g. command) — see startUpdate. Without this\n // guard computePosition passes null to floating-ui, whose isRTL calls\n // getComputedStyle(null) and throws \"not of type Element\" under jsdom.\n if (this.disabled || !this.triggerElement || !this.popup) {\n return\n }\n\n // Check if trigger element is visible in viewport\n const triggerRect = this.triggerElement.getBoundingClientRect()\n const isVisible =\n triggerRect.top < window.innerHeight &&\n triggerRect.bottom > 0 &&\n triggerRect.left < window.innerWidth &&\n triggerRect.right > 0\n\n if (!isVisible) {\n if (this.opened && !this.disableViewportAutoClose) {\n this.opened = false\n this.emit('dds-close')\n }\n return\n }\n\n const { x, y, placement, middlewareData } = await computePosition(\n this.triggerElement,\n this.popup,\n {\n placement: this.placement,\n strategy: this.floatingStrategy,\n middleware: [\n offset(this.offset),\n flip(),\n shift(),\n size({\n apply: ({ rects, availableHeight, availableWidth, elements }) => {\n const safeAvailableHeight = Math.max(0, availableHeight)\n const safeAvailableWidth = Math.max(0, availableWidth)\n const syncWidth = this.sync\n this.popup.style.width = syncWidth\n ? `${rects.reference.width}px`\n : ''\n\n const configuredMaxHeight =\n typeof this.maxHeight === 'number' ? this.maxHeight : undefined\n const effectiveMaxHeight =\n configuredMaxHeight != null\n ? Math.min(configuredMaxHeight, safeAvailableHeight)\n : safeAvailableHeight\n this.popup.style.maxHeight =\n effectiveMaxHeight >= elements.floating.scrollHeight\n ? ''\n : `${effectiveMaxHeight}px`\n\n const configuredMaxWidth =\n typeof this.maxWidth === 'number' ? this.maxWidth : undefined\n const effectiveMaxWidth =\n configuredMaxWidth != null\n ? Math.min(configuredMaxWidth, safeAvailableWidth)\n : safeAvailableWidth\n this.popup.style.maxWidth = `${effectiveMaxWidth}px`\n\n if (this.fullWidth) {\n this.popup.style.width = '100vw'\n }\n },\n }),\n ...(this.arrowElement\n ? [arrow({ element: this.arrowElement, padding: 8 })]\n : []),\n ],\n },\n )\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`,\n })\n\n if (this.arrowElement) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow as Coords\n const [side] = placement.split('-')\n const staticSide =\n {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[side] ?? ''\n\n Object.assign(this.arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n [staticSide]: `-5px`,\n })\n\n this.arrowElement.classList.remove(\n 'popup__arrow--top',\n 'popup__arrow--right',\n 'popup__arrow--bottom',\n 'popup__arrow--left',\n )\n this.arrowElement.classList.add(`popup__arrow--${side}`)\n }\n }\n\n renderTrigger(): TemplateResult {\n return html``\n }\n\n renderPopup() {\n return html`\n <slot name=\"trigger\" @slotchange=${this._handleTriggerSlotChange}>\n ${this.renderTrigger()}\n </slot>\n <div\n part=\"popup\"\n id=\"popup\"\n ?inert=${!this.opened}\n class=${clsx('popup', `popup--${this.size}`, {\n 'popup--opened': this.opened,\n 'popup--fixed': this.floatingStrategy === 'fixed',\n 'popup--has-arrow': this.hasArrow,\n 'popup--overflow': this.overflow,\n 'popup--full-width': this.fullWidth,\n })}>\n <slot @slotchange=${this._handleContentSlotChange}></slot>\n ${this.hasArrow\n ? html`<div\n part=\"arrow\"\n class=${clsx('popup__arrow')}\n role=\"presentation\"></div>`\n : ''}\n </div>\n `\n }\n}\n"],"names":["EXPANDABLE_ROLES","EXPANDABLE_INPUT_TYPES","_PopupBaseElement","SizedMixin","DdsElement","__async","__superGet","changedProps","el","role","trigger","e","_a","_e","entries","autoUpdate","resolve","triggerRect","x","y","placement","middlewareData","computePosition","offset","flip","shift","size","rects","availableHeight","availableWidth","elements","safeAvailableHeight","safeAvailableWidth","syncWidth","configuredMaxHeight","effectiveMaxHeight","configuredMaxWidth","effectiveMaxWidth","arrow","arrowX","arrowY","side","staticSide","html","clsx","unsafeCSS","styles","PopupBaseElement","__decorateClass","query","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,wBAAuB,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEKC,wBAA6B,IAAI;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,GAEoBC,IAAA,MAAAA,UAAyBC,EAAWC,CAAU,EAAE;AAAA,EAArE,cAAA;AAAA,UAAA,GAAA,SAAA,GAGE,KAAU,iBAAiC,MAE3C,KAAQ,uBAAoD,MAMJ,KAAA,WAAA,IAGF,KAAA,SAAA,IAKG,KAAA,YAAA,UAMpB,KAAA,mBAAA,YAGA,KAAA,SAAA,GAMoB,KAAA,YAAA,KAGD,KAAA,WAAA,QAYS,KAAA,2BAAA;AAAA,EAAA;AAAA,EAE3D,oBAAoB;AAAA,WAAAC,EAAA;AACxB,MAAAC,EAAAJ,EAAA,iBAAM,0BAAN,IAAwB,GAExB,MAAM,KAAK,gBACX,KAAK,YAAY;AAAA,IAAA;AAAA;AAAA,EAGT,aAAaK,GAAoC;AACzD,UAAM,aAAaA,CAAY,GAQ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MAAM,QAAS,CAAA;AAAA,GA3CRH,EA2CU,WAAA,UAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA9CRH,EA8CU,WAAA,WAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAjDRH,EAiDU,WAAA,0BAAA;"}
@@ -1,19 +1,15 @@
1
- import { clsx as m } from "../../node_modules/clsx/dist/clsx.js";
2
- import "../../node_modules/@lit/reactive-element/reactive-element.js";
3
- import { html as n, nothing as o } from "../../node_modules/lit-html/lit-html.js";
4
- import "../../node_modules/lit-element/lit-element.js";
5
- import { property as t } from "../../node_modules/@lit/reactive-element/decorators/property.js";
6
- import { translate as l } from "../../node_modules/lit-i18n/src/lit-i18n.js";
7
- import { DdsElement as u } from "../../internal/dds-hu-element.js";
8
- import { SizedMixin as f } from "../../internal/mixin/sizedMixin.js";
9
- import v from "./progress.scss.js";
10
- import { unsafeCSS as y } from "../../node_modules/@lit/reactive-element/css-tag.js";
11
- var $ = Object.defineProperty, i = (h, a, s, p) => {
12
- for (var r = void 0, d = h.length - 1, g; d >= 0; d--)
13
- (g = h[d]) && (r = g(a, s, r) || r);
14
- return r && $(a, s, r), r;
1
+ import { clsx as g } from "../../node_modules/clsx/dist/clsx.js";
2
+ import { unsafeCSS as u, html as n, nothing as o } from "lit";
3
+ import { property as t } from "lit/decorators.js";
4
+ import { DdsElement as m } from "../../internal/dds-hu-element.js";
5
+ import { SizedMixin as v } from "../../internal/mixin/sizedMixin.js";
6
+ import f from "./progress.scss.js";
7
+ var y = Object.defineProperty, i = (h, a, s, c) => {
8
+ for (var r = void 0, p = h.length - 1, d; p >= 0; p--)
9
+ (d = h[p]) && (r = d(a, s, r) || r);
10
+ return r && y(a, s, r), r;
15
11
  };
16
- const _ = f(u), c = class c extends _ {
12
+ const $ = v(m), l = class l extends $ {
17
13
  constructor() {
18
14
  super(...arguments), this.variant = "linear", this.color = "brand", this.max = 100, this.indeterminate = !1, this.showPercentage = !1, this.ariaLive = "polite";
19
15
  }
@@ -88,12 +84,12 @@ const _ = f(u), c = class c extends _ {
88
84
  `;
89
85
  }
90
86
  render() {
91
- var p, r;
87
+ var c, r;
92
88
  const a = this.indeterminate ? "status" : "progressbar", s = this.indeterminate ? "true" : "false";
93
89
  return n`
94
90
  <div
95
91
  part="base"
96
- class=${m(
92
+ class=${g(
97
93
  "progress",
98
94
  `progress--${this.variant}`,
99
95
  `progress--${this.color}`,
@@ -104,7 +100,7 @@ const _ = f(u), c = class c extends _ {
104
100
  )}
105
101
  role=${a}
106
102
  aria-busy=${s}
107
- aria-label=${(r = (p = this.ariaLabel) != null ? p : this.label) != null ? r : this.indeterminate ? l("progress.loading") : l("progress.progress", {
103
+ aria-label=${(r = (c = this.ariaLabel) != null ? c : this.label) != null ? r : this.indeterminate ? this.localize.t("progress.loading") : this.localize.t("progress.progress", {
108
104
  percentage: Math.round(this.percentage)
109
105
  })}
110
106
  aria-live=${this.ariaLive}
@@ -120,7 +116,7 @@ const _ = f(u), c = class c extends _ {
120
116
 
121
117
  <!-- Screen reader announcements -->
122
118
  <div class="sr-only" aria-live=${this.ariaLive} aria-atomic="true">
123
- ${this.indeterminate ? l("progress.loading") : l("progress.progress", {
119
+ ${this.indeterminate ? this.localize.t("progress.loading") : this.localize.t("progress.progress", {
124
120
  percentage: Math.round(this.percentage)
125
121
  })}
126
122
  </div>
@@ -128,8 +124,8 @@ const _ = f(u), c = class c extends _ {
128
124
  `;
129
125
  }
130
126
  };
131
- c.tagName = "dap-ds-progress", c.styles = y(v);
132
- let e = c;
127
+ l.tagName = "dap-ds-progress", l.styles = u(f);
128
+ let e = l;
133
129
  i([
134
130
  t({ type: String, reflect: !0 })
135
131
  ], e.prototype, "variant");