@db-ux/wc-core-components 4.4.3 → 4.5.1

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 (283) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/agent/.gitkeep +0 -0
  3. package/dist/cjs/db-accordion-item.cjs.entry.js +5 -4
  4. package/dist/cjs/db-accordion.cjs.entry.js +6 -6
  5. package/dist/cjs/db-badge.cjs.entry.js +5 -5
  6. package/dist/cjs/db-brand.cjs.entry.js +5 -5
  7. package/dist/cjs/db-button.cjs.entry.js +5 -5
  8. package/dist/cjs/db-card.cjs.entry.js +5 -4
  9. package/dist/cjs/db-checkbox.cjs.entry.js +53 -34
  10. package/dist/cjs/db-custom-button.cjs.entry.js +57 -0
  11. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +59 -37
  12. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +5 -4
  13. package/dist/cjs/db-custom-select.cjs.entry.js +132 -109
  14. package/dist/cjs/db-divider.cjs.entry.js +5 -4
  15. package/dist/cjs/db-drawer.cjs.entry.js +6 -6
  16. package/dist/cjs/db-header.cjs.entry.js +7 -7
  17. package/dist/cjs/db-icon.cjs.entry.js +5 -4
  18. package/dist/cjs/db-infotext.cjs.entry.js +5 -5
  19. package/dist/cjs/db-link.cjs.entry.js +5 -5
  20. package/dist/cjs/db-navigation-item.cjs.entry.js +7 -7
  21. package/dist/cjs/db-navigation.cjs.entry.js +5 -4
  22. package/dist/cjs/db-notification.cjs.entry.js +6 -6
  23. package/dist/cjs/db-page.cjs.entry.js +5 -4
  24. package/dist/cjs/db-popover.cjs.entry.js +7 -7
  25. package/dist/cjs/db-radio.cjs.entry.js +33 -14
  26. package/dist/cjs/db-section.cjs.entry.js +5 -4
  27. package/dist/cjs/db-select.cjs.entry.js +48 -29
  28. package/dist/cjs/db-stack.cjs.entry.js +5 -4
  29. package/dist/cjs/db-switch.cjs.entry.js +58 -22
  30. package/dist/cjs/db-tab-item_3.cjs.entry.js +11 -9
  31. package/dist/cjs/db-tabs.cjs.entry.js +6 -6
  32. package/dist/cjs/db-textarea.cjs.entry.js +46 -27
  33. package/dist/cjs/db-tooltip.cjs.entry.js +17 -9
  34. package/dist/cjs/db-ux.cjs.js +3 -3
  35. package/dist/cjs/{document-click-listener-Bb3Tinb8.js → document-click-listener-B2-xKJv3.js} +1 -1
  36. package/dist/cjs/{document-scroll-listener-unypEU42.js → document-scroll-listener-ChQ7XZRk.js} +1 -1
  37. package/dist/cjs/{floating-components-pYaTeNhp.js → floating-components-DlstoCKH.js} +4 -0
  38. package/dist/cjs/{form-components-LsqVohyb.js → form-components-_ncB_U2D.js} +1 -1
  39. package/dist/cjs/{index-CsHqnQII.js → index-2_9ESkQu.js} +6 -7
  40. package/dist/cjs/{index-Bh5ovRL2.js → index-D_vrmAD6.js} +23 -14
  41. package/dist/cjs/index.cjs.js +5 -5
  42. package/dist/cjs/loader.cjs.js +2 -2
  43. package/dist/cjs/{navigation-BztJmEHf.js → navigation-Bah882nU.js} +1 -1
  44. package/dist/collection/collection-manifest.json +3 -1
  45. package/dist/collection/components/accordion/accordion.js +28 -4
  46. package/dist/collection/components/accordion-item/accordion-item.js +27 -2
  47. package/dist/collection/components/badge/badge.js +54 -4
  48. package/dist/collection/components/brand/brand.js +27 -3
  49. package/dist/collection/components/button/button.js +53 -3
  50. package/dist/collection/components/card/card.js +27 -2
  51. package/dist/collection/components/checkbox/checkbox.js +81 -38
  52. package/dist/collection/components/custom-button/custom-button.js +394 -0
  53. package/dist/collection/components/custom-button/index.js +2 -0
  54. package/dist/collection/components/custom-button/model.js +1 -0
  55. package/dist/collection/components/custom-select/custom-select.js +156 -109
  56. package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +27 -2
  57. package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +27 -2
  58. package/dist/collection/components/custom-select-list/custom-select-list.js +27 -2
  59. package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +27 -2
  60. package/dist/collection/components/divider/divider.js +27 -2
  61. package/dist/collection/components/drawer/drawer.js +28 -4
  62. package/dist/collection/components/header/header.js +27 -3
  63. package/dist/collection/components/icon/icon.js +27 -2
  64. package/dist/collection/components/infotext/infotext.js +53 -3
  65. package/dist/collection/components/input/input.js +74 -31
  66. package/dist/collection/components/link/link.js +27 -3
  67. package/dist/collection/components/navigation/navigation.js +27 -2
  68. package/dist/collection/components/navigation-item/navigation-item.js +27 -3
  69. package/dist/collection/components/notification/notification.js +28 -4
  70. package/dist/collection/components/page/page.js +27 -2
  71. package/dist/collection/components/popover/popover.js +27 -3
  72. package/dist/collection/components/radio/radio.js +54 -11
  73. package/dist/collection/components/section/section.js +27 -2
  74. package/dist/collection/components/select/select.js +75 -32
  75. package/dist/collection/components/stack/stack.js +27 -2
  76. package/dist/collection/components/switch/switch.js +107 -45
  77. package/dist/collection/components/tab-item/tab-item.js +27 -3
  78. package/dist/collection/components/tab-list/tab-list.js +27 -2
  79. package/dist/collection/components/tab-panel/tab-panel.js +27 -2
  80. package/dist/collection/components/tabs/tabs.js +28 -4
  81. package/dist/collection/components/tag/tag.js +27 -3
  82. package/dist/collection/components/textarea/textarea.js +73 -30
  83. package/dist/collection/components/tooltip/tooltip.js +63 -5
  84. package/dist/collection/index.js +2 -0
  85. package/dist/collection/utils/floating-components.js +4 -0
  86. package/dist/collection/utils/index.js +6 -7
  87. package/dist/custom-elements.json +3692 -1698
  88. package/dist/db-ux/db-ux.esm.js +1 -1
  89. package/dist/db-ux/index.esm.js +1 -1
  90. package/dist/db-ux/p-043c407c.entry.js +1 -0
  91. package/dist/db-ux/p-0541c3c2.entry.js +1 -0
  92. package/dist/db-ux/p-074e4a43.entry.js +1 -0
  93. package/dist/db-ux/p-11251b99.entry.js +1 -0
  94. package/dist/db-ux/p-1c89f0fc.entry.js +1 -0
  95. package/dist/db-ux/p-213bfff6.entry.js +1 -0
  96. package/dist/db-ux/p-29442fd9.entry.js +1 -0
  97. package/dist/db-ux/p-2bce91e1.entry.js +1 -0
  98. package/dist/db-ux/p-32c4a1b5.entry.js +1 -0
  99. package/dist/db-ux/p-3e5be44c.entry.js +1 -0
  100. package/dist/db-ux/p-4cda36f1.entry.js +1 -0
  101. package/dist/db-ux/p-4cf64cbb.entry.js +1 -0
  102. package/dist/db-ux/p-5028b12e.entry.js +1 -0
  103. package/dist/db-ux/{p-b07122c4.entry.js → p-56af9177.entry.js} +1 -1
  104. package/dist/db-ux/{p-64264628.entry.js → p-587263ad.entry.js} +1 -1
  105. package/dist/db-ux/p-58f21c03.entry.js +1 -0
  106. package/dist/db-ux/{p-77150a25.entry.js → p-6b073570.entry.js} +1 -1
  107. package/dist/db-ux/p-745ccfb8.entry.js +1 -0
  108. package/dist/db-ux/p-836f0fef.entry.js +1 -0
  109. package/dist/db-ux/p-9a19e197.entry.js +1 -0
  110. package/dist/db-ux/p-9fb146d1.entry.js +1 -0
  111. package/dist/db-ux/p-BjIPMjCM.js +2 -0
  112. package/dist/db-ux/{p-cNk4ImpW.js → p-BuBrj57D.js} +1 -1
  113. package/dist/db-ux/p-CHLgQ9vn.js +1 -0
  114. package/dist/db-ux/{p-CAEpg8tJ.js → p-D5mInaY7.js} +1 -1
  115. package/dist/db-ux/p-DOPXnIzL.js +1 -0
  116. package/dist/db-ux/p-D_roHmuC.js +1 -0
  117. package/dist/db-ux/p-a34d2691.entry.js +1 -0
  118. package/dist/db-ux/p-c6f43506.entry.js +1 -0
  119. package/dist/db-ux/p-cdfaf027.entry.js +1 -0
  120. package/dist/db-ux/p-d186aef4.entry.js +1 -0
  121. package/dist/db-ux/p-dceb35a8.entry.js +1 -0
  122. package/dist/db-ux/p-e199b6f9.entry.js +1 -0
  123. package/dist/db-ux/p-e3664354.entry.js +1 -0
  124. package/dist/db-ux/p-ef034bba.entry.js +1 -0
  125. package/dist/db-ux/p-f0bc176a.entry.js +1 -0
  126. package/dist/db-ux/p-ff3866f3.entry.js +1 -0
  127. package/dist/db-ux/p-xkoBSP8R.js +1 -0
  128. package/dist/esm/db-accordion-item.entry.js +5 -4
  129. package/dist/esm/db-accordion.entry.js +6 -6
  130. package/dist/esm/db-badge.entry.js +5 -5
  131. package/dist/esm/db-brand.entry.js +5 -5
  132. package/dist/esm/db-button.entry.js +5 -5
  133. package/dist/esm/db-card.entry.js +5 -4
  134. package/dist/esm/db-checkbox.entry.js +54 -35
  135. package/dist/esm/db-custom-button.entry.js +55 -0
  136. package/dist/esm/db-custom-select-dropdown_5.entry.js +60 -38
  137. package/dist/esm/db-custom-select-form-field.entry.js +5 -4
  138. package/dist/esm/db-custom-select.entry.js +133 -110
  139. package/dist/esm/db-divider.entry.js +5 -4
  140. package/dist/esm/db-drawer.entry.js +6 -6
  141. package/dist/esm/db-header.entry.js +7 -7
  142. package/dist/esm/db-icon.entry.js +5 -4
  143. package/dist/esm/db-infotext.entry.js +5 -5
  144. package/dist/esm/db-link.entry.js +5 -5
  145. package/dist/esm/db-navigation-item.entry.js +7 -7
  146. package/dist/esm/db-navigation.entry.js +5 -4
  147. package/dist/esm/db-notification.entry.js +6 -6
  148. package/dist/esm/db-page.entry.js +5 -4
  149. package/dist/esm/db-popover.entry.js +7 -7
  150. package/dist/esm/db-radio.entry.js +33 -14
  151. package/dist/esm/db-section.entry.js +5 -4
  152. package/dist/esm/db-select.entry.js +49 -30
  153. package/dist/esm/db-stack.entry.js +5 -4
  154. package/dist/esm/db-switch.entry.js +58 -22
  155. package/dist/esm/db-tab-item_3.entry.js +11 -9
  156. package/dist/esm/db-tabs.entry.js +6 -6
  157. package/dist/esm/db-textarea.entry.js +47 -28
  158. package/dist/esm/db-tooltip.entry.js +17 -9
  159. package/dist/esm/db-ux.js +4 -4
  160. package/dist/esm/{document-click-listener-CmYoXpGE.js → document-click-listener-D7W_VE5O.js} +1 -1
  161. package/dist/esm/{document-scroll-listener-65bHuFAN.js → document-scroll-listener-DOBe3Oa9.js} +1 -1
  162. package/dist/esm/{floating-components-DfYL98sI.js → floating-components-DOPXnIzL.js} +4 -0
  163. package/dist/esm/{form-components-BLsiOrPI.js → form-components-D6LQfJvq.js} +1 -1
  164. package/dist/esm/{index-Crtu1dn6.js → index-BjIPMjCM.js} +23 -14
  165. package/dist/esm/{index-C4x0SOcx.js → index-xkoBSP8R.js} +6 -7
  166. package/dist/esm/index.js +5 -5
  167. package/dist/esm/loader.js +3 -3
  168. package/dist/esm/{navigation-DgsMCdfn.js → navigation-Jh6m0eMk.js} +1 -1
  169. package/dist/types/components/accordion/accordion.d.ts +1 -0
  170. package/dist/types/components/accordion-item/accordion-item.d.ts +1 -0
  171. package/dist/types/components/badge/badge.d.ts +2 -0
  172. package/dist/types/components/badge/model.d.ts +2 -2
  173. package/dist/types/components/brand/brand.d.ts +1 -0
  174. package/dist/types/components/button/button.d.ts +2 -0
  175. package/dist/types/components/button/model.d.ts +8 -10
  176. package/dist/types/components/card/card.d.ts +1 -0
  177. package/dist/types/components/checkbox/checkbox.d.ts +5 -1
  178. package/dist/types/components/custom-button/custom-button.d.ts +29 -0
  179. package/dist/types/components/custom-button/index.d.ts +2 -0
  180. package/dist/types/components/custom-button/model.d.ts +6 -0
  181. package/dist/types/components/custom-select/custom-select.d.ts +5 -1
  182. package/dist/types/components/custom-select-dropdown/custom-select-dropdown.d.ts +1 -0
  183. package/dist/types/components/custom-select-form-field/custom-select-form-field.d.ts +1 -0
  184. package/dist/types/components/custom-select-list/custom-select-list.d.ts +1 -0
  185. package/dist/types/components/custom-select-list-item/custom-select-list-item.d.ts +1 -0
  186. package/dist/types/components/divider/divider.d.ts +1 -0
  187. package/dist/types/components/drawer/drawer.d.ts +1 -0
  188. package/dist/types/components/header/header.d.ts +1 -0
  189. package/dist/types/components/icon/icon.d.ts +1 -0
  190. package/dist/types/components/infotext/infotext.d.ts +2 -0
  191. package/dist/types/components/infotext/model.d.ts +2 -2
  192. package/dist/types/components/input/input.d.ts +5 -1
  193. package/dist/types/components/link/link.d.ts +1 -0
  194. package/dist/types/components/navigation/navigation.d.ts +1 -0
  195. package/dist/types/components/navigation-item/navigation-item.d.ts +1 -0
  196. package/dist/types/components/notification/model.d.ts +2 -2
  197. package/dist/types/components/notification/notification.d.ts +1 -0
  198. package/dist/types/components/page/page.d.ts +1 -0
  199. package/dist/types/components/popover/popover.d.ts +1 -0
  200. package/dist/types/components/radio/radio.d.ts +4 -0
  201. package/dist/types/components/section/section.d.ts +1 -0
  202. package/dist/types/components/select/select.d.ts +5 -1
  203. package/dist/types/components/stack/stack.d.ts +1 -0
  204. package/dist/types/components/switch/switch.d.ts +7 -1
  205. package/dist/types/components/tab-item/tab-item.d.ts +1 -0
  206. package/dist/types/components/tab-list/tab-list.d.ts +1 -0
  207. package/dist/types/components/tab-panel/tab-panel.d.ts +1 -0
  208. package/dist/types/components/tabs/tabs.d.ts +1 -0
  209. package/dist/types/components/tag/model.d.ts +2 -6
  210. package/dist/types/components/tag/tag.d.ts +1 -0
  211. package/dist/types/components/textarea/textarea.d.ts +5 -1
  212. package/dist/types/components/tooltip/model.d.ts +3 -3
  213. package/dist/types/components/tooltip/tooltip.d.ts +3 -0
  214. package/dist/types/components.d.ts +145 -6
  215. package/dist/types/index.d.ts +2 -0
  216. package/dist/types/shared/model.d.ts +15 -1
  217. package/dist/types/stencil-public-runtime.d.ts +3 -1
  218. package/dist/vscode.html-custom-data.json +397 -85
  219. package/dist/web-types.json +730 -153
  220. package/package.json +4 -4
  221. package/agent/Accordion.md +0 -23
  222. package/agent/AccordionItem.md +0 -29
  223. package/agent/Badge.md +0 -32
  224. package/agent/Brand.md +0 -13
  225. package/agent/Button.md +0 -47
  226. package/agent/Card.md +0 -23
  227. package/agent/Checkbox.md +0 -41
  228. package/agent/CustomSelect.md +0 -54
  229. package/agent/Divider.md +0 -21
  230. package/agent/Drawer.md +0 -71
  231. package/agent/Header.md +0 -29
  232. package/agent/Icon.md +0 -20
  233. package/agent/Infotext.md +0 -25
  234. package/agent/Input.md +0 -48
  235. package/agent/Link.md +0 -52
  236. package/agent/Navigation.md +0 -19
  237. package/agent/NavigationItem.md +0 -29
  238. package/agent/Notification.md +0 -38
  239. package/agent/Page.md +0 -27
  240. package/agent/Popover.md +0 -52
  241. package/agent/Radio.md +0 -28
  242. package/agent/Section.md +0 -21
  243. package/agent/Select.md +0 -62
  244. package/agent/Stack.md +0 -35
  245. package/agent/Switch.md +0 -44
  246. package/agent/TabItem.md +0 -25
  247. package/agent/Tabs.md +0 -61
  248. package/agent/Tag.md +0 -41
  249. package/agent/Textarea.md +0 -44
  250. package/agent/Tooltip.md +0 -37
  251. package/agent/_instructions.md +0 -31
  252. package/dist/db-ux/p-1a72176e.entry.js +0 -1
  253. package/dist/db-ux/p-1b7f6a0b.entry.js +0 -1
  254. package/dist/db-ux/p-1da21066.entry.js +0 -1
  255. package/dist/db-ux/p-2d15e200.entry.js +0 -1
  256. package/dist/db-ux/p-312d52da.entry.js +0 -1
  257. package/dist/db-ux/p-3e6b86d6.entry.js +0 -1
  258. package/dist/db-ux/p-4aa16916.entry.js +0 -1
  259. package/dist/db-ux/p-4b69acea.entry.js +0 -1
  260. package/dist/db-ux/p-4cfff250.entry.js +0 -1
  261. package/dist/db-ux/p-5237e5d5.entry.js +0 -1
  262. package/dist/db-ux/p-5b1a0f0f.entry.js +0 -1
  263. package/dist/db-ux/p-5fa85b19.entry.js +0 -1
  264. package/dist/db-ux/p-7351b5ab.entry.js +0 -1
  265. package/dist/db-ux/p-7c6b7578.entry.js +0 -1
  266. package/dist/db-ux/p-828a77d8.entry.js +0 -1
  267. package/dist/db-ux/p-9b47dc80.entry.js +0 -1
  268. package/dist/db-ux/p-BhXdfCpU.js +0 -1
  269. package/dist/db-ux/p-C4x0SOcx.js +0 -1
  270. package/dist/db-ux/p-Crtu1dn6.js +0 -2
  271. package/dist/db-ux/p-DfYL98sI.js +0 -1
  272. package/dist/db-ux/p-RHqkTr-_.js +0 -1
  273. package/dist/db-ux/p-a3a8ce36.entry.js +0 -1
  274. package/dist/db-ux/p-aa0f7280.entry.js +0 -1
  275. package/dist/db-ux/p-b1fc0f4c.entry.js +0 -1
  276. package/dist/db-ux/p-c2624e1b.entry.js +0 -1
  277. package/dist/db-ux/p-c29d8e32.entry.js +0 -1
  278. package/dist/db-ux/p-cf50169a.entry.js +0 -1
  279. package/dist/db-ux/p-d4f3cfa2.entry.js +0 -1
  280. package/dist/db-ux/p-e05fee5a.entry.js +0 -1
  281. package/dist/db-ux/p-f40d2d61.entry.js +0 -1
  282. package/dist/db-ux/p-fcf8e274.entry.js +0 -1
  283. package/dist/db-ux/p-fe06f815.entry.js +0 -1
@@ -68,6 +68,14 @@ export class DBCheckbox {
68
68
  this.focus.emit(event);
69
69
  }
70
70
  }
71
+ resetIds() {
72
+ var _a, _b, _c;
73
+ const mId = (_c = (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : `checkbox-${uuid()}`;
74
+ this._id = mId;
75
+ this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
76
+ this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
77
+ this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
78
+ }
71
79
  /**
72
80
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
73
81
  * @param element the ref for the component
@@ -105,16 +113,25 @@ export class DBCheckbox {
105
113
  }
106
114
  }
107
115
  watch0Fn() {
116
+ var _a, _b;
117
+ if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
118
+ this.resetIds();
119
+ }
120
+ }
121
+ watch0() {
122
+ this.watch0Fn();
123
+ }
124
+ watch1Fn() {
108
125
  var _a;
109
126
  this._invalidMessage =
110
127
  this.invalidMessage ||
111
128
  ((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
112
129
  DEFAULT_INVALID_MESSAGE;
113
130
  }
114
- watch0() {
115
- this.watch0Fn();
131
+ watch1() {
132
+ this.watch1Fn();
116
133
  }
117
- watch1Fn() {
134
+ watch2Fn() {
118
135
  if (this._id) {
119
136
  const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;
120
137
  this._messageId = messageId;
@@ -126,10 +143,10 @@ export class DBCheckbox {
126
143
  this.handleValidation();
127
144
  }
128
145
  }
129
- watch1() {
130
- this.watch1Fn();
146
+ watch2() {
147
+ this.watch2Fn();
131
148
  }
132
- watch2Fn() {
149
+ watch3Fn() {
133
150
  if (this._ref) {
134
151
  if (this.indeterminate !== undefined) {
135
152
  // When indeterminate is set, the value of the checked prop only impacts the form submitted values.
@@ -138,10 +155,10 @@ export class DBCheckbox {
138
155
  }
139
156
  }
140
157
  }
141
- watch2() {
142
- this.watch2Fn();
158
+ watch3() {
159
+ this.watch3Fn();
143
160
  }
144
- watch3Fn() {
161
+ watch4Fn() {
145
162
  if (this.initialized && this._ref) {
146
163
  // in angular this must be set via native element
147
164
  if (this.checked != undefined) {
@@ -150,10 +167,10 @@ export class DBCheckbox {
150
167
  this.initialized = false;
151
168
  }
152
169
  }
153
- watch3() {
154
- this.watch3Fn();
170
+ watch4() {
171
+ this.watch4Fn();
155
172
  }
156
- watch4Fn() {
173
+ watch5Fn() {
157
174
  if (this._ref) {
158
175
  const defaultChecked = undefined;
159
176
  let controller = this.abortController;
@@ -169,24 +186,20 @@ export class DBCheckbox {
169
186
  }, controller.signal);
170
187
  }
171
188
  }
172
- watch4() {
173
- this.watch4Fn();
189
+ watch5() {
190
+ this.watch5Fn();
174
191
  }
175
192
  componentDidLoad() {
176
- var _a;
177
193
  this.enableAttributePassing(this._ref, "db-checkbox");
178
194
  this.initialized = true;
179
- const mId = (_a = this.id) !== null && _a !== void 0 ? _a : `checkbox-${uuid()}`;
180
- this._id = mId;
181
- this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
182
- this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
183
- this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
195
+ this.resetIds();
184
196
  this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
185
197
  this.watch0Fn();
186
198
  this.watch1Fn();
187
199
  this.watch2Fn();
188
200
  this.watch3Fn();
189
201
  this.watch4Fn();
202
+ this.watch5Fn();
190
203
  }
191
204
  disconnectedCallback() {
192
205
  var _a;
@@ -194,18 +207,18 @@ export class DBCheckbox {
194
207
  }
195
208
  render() {
196
209
  var _a;
197
- return (h("div", { key: '14207f00c5b68441e94201de7569324756b657d7', class: cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '577bdb32a38254f72a969d6da16fb220c620e156', htmlFor: this._id }, h("input", { key: 'ecbed0f4b8347617f2cc6d017b09a56d495b922d', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
210
+ return (h("div", { key: '4238fbd4e76d437554f9b6164d007f1039d4de80', class: cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '8d8743528e8ef8d117233e5de2957a78e37b0436', htmlFor: this._id }, h("input", { key: '631676480151dd94bca3c10cd1ccaf29f307b235', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
198
211
  this._ref = el;
199
- }, id: this._id, name: this.name, checked: getBoolean(this.checked, "checked"), disabled: getBoolean(this.disabled, "disabled"), value: this.value, required: getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : h("slot", null)), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'eae86bcaa2fe6e0fe39249fa5f9a7ae13e172f63', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '420c4244393b3ee266c374db1662dacfa43a0bce', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
212
+ }, id: this._id, name: this.name, checked: getBoolean(this.checked, "checked"), disabled: getBoolean(this.disabled, "disabled"), value: this.value, required: getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : h("slot", null)), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '986898b076efd93c970c6656ff44f9b949a63c1c', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '651eadfb4cbeaa60405335c76aef0c671b02851c', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
200
213
  }
201
214
  static get is() { return "db-checkbox"; }
202
215
  static get properties() {
203
216
  return {
204
- "id": {
217
+ "invalidMessage": {
205
218
  "type": "string",
206
219
  "mutable": false,
207
220
  "complexType": {
208
- "original": "DBCheckboxProps[\"id\"]",
221
+ "original": "DBCheckboxProps[\"invalidMessage\"]",
209
222
  "resolved": "string",
210
223
  "references": {
211
224
  "DBCheckboxProps": {
@@ -225,13 +238,13 @@ export class DBCheckbox {
225
238
  "getter": false,
226
239
  "setter": false,
227
240
  "reflect": false,
228
- "attribute": "id"
241
+ "attribute": "invalid-message"
229
242
  },
230
- "invalidMessage": {
243
+ "id": {
231
244
  "type": "string",
232
245
  "mutable": false,
233
246
  "complexType": {
234
- "original": "DBCheckboxProps[\"invalidMessage\"]",
247
+ "original": "DBCheckboxProps[\"id\"]",
235
248
  "resolved": "string",
236
249
  "references": {
237
250
  "DBCheckboxProps": {
@@ -251,7 +264,31 @@ export class DBCheckbox {
251
264
  "getter": false,
252
265
  "setter": false,
253
266
  "reflect": false,
254
- "attribute": "invalid-message"
267
+ "attribute": "id"
268
+ },
269
+ "propOverrides": {
270
+ "type": "unknown",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "DBCheckboxProps[\"propOverrides\"]",
274
+ "resolved": "{ id?: string; }",
275
+ "references": {
276
+ "DBCheckboxProps": {
277
+ "location": "import",
278
+ "path": "./model",
279
+ "id": "src/components/checkbox/model.ts::DBCheckboxProps",
280
+ "referenceLocation": "DBCheckboxProps"
281
+ }
282
+ }
283
+ },
284
+ "required": false,
285
+ "optional": false,
286
+ "docs": {
287
+ "tags": [],
288
+ "text": ""
289
+ },
290
+ "getter": false,
291
+ "setter": false
255
292
  },
256
293
  "message": {
257
294
  "type": "string",
@@ -760,22 +797,19 @@ export class DBCheckbox {
760
797
  }
761
798
  static get watchers() {
762
799
  return [{
763
- "propName": "_ref",
800
+ "propName": "id",
764
801
  "methodName": "watch0"
765
802
  }, {
766
- "propName": "invalidMessage",
803
+ "propName": "propOverrides?.id",
767
804
  "methodName": "watch0"
768
805
  }, {
769
- "propName": "_id",
806
+ "propName": "_ref",
770
807
  "methodName": "watch1"
771
808
  }, {
772
- "propName": "initialized",
773
- "methodName": "watch2"
774
- }, {
775
- "propName": "_ref",
776
- "methodName": "watch2"
809
+ "propName": "invalidMessage",
810
+ "methodName": "watch1"
777
811
  }, {
778
- "propName": "indeterminate",
812
+ "propName": "_id",
779
813
  "methodName": "watch2"
780
814
  }, {
781
815
  "propName": "initialized",
@@ -784,11 +818,20 @@ export class DBCheckbox {
784
818
  "propName": "_ref",
785
819
  "methodName": "watch3"
786
820
  }, {
787
- "propName": "checked",
821
+ "propName": "indeterminate",
788
822
  "methodName": "watch3"
823
+ }, {
824
+ "propName": "initialized",
825
+ "methodName": "watch4"
789
826
  }, {
790
827
  "propName": "_ref",
791
828
  "methodName": "watch4"
829
+ }, {
830
+ "propName": "checked",
831
+ "methodName": "watch4"
832
+ }, {
833
+ "propName": "_ref",
834
+ "methodName": "watch5"
792
835
  }];
793
836
  }
794
837
  }
@@ -0,0 +1,394 @@
1
+ import { cls, getBooleanAsString } from "../../utils";
2
+ import { h } from "@stencil/core";
3
+ /**
4
+ * @slot children - This is a default/unnamed slot
5
+
6
+ */
7
+ export class DBCustomButton {
8
+ /**
9
+ * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
10
+ * @param element the ref for the component
11
+ * @param customElementSelector the custom element like `my-component`
12
+ */
13
+ enableAttributePassing(element, customElementSelector) {
14
+ const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
15
+ if (element && parent) {
16
+ const attributes = parent.attributes;
17
+ for (let i = 0; i < attributes.length; i++) {
18
+ const attr = attributes.item(i);
19
+ if (attr && attr.name !== 'data-density' &&
20
+ (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
21
+ element.setAttribute(attr.name, attr.value);
22
+ parent.removeAttribute(attr.name);
23
+ }
24
+ else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
25
+ element.setAttribute(attr.name, attr.value);
26
+ parent.removeAttribute(attr.name);
27
+ }
28
+ else if (attr && attr.name === "class") {
29
+ const isWebComponent = attr.value.includes("hydrated");
30
+ const value = attr.value.replace("hydrated", "").trim();
31
+ const currentClass = element.getAttribute("class");
32
+ element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
33
+ if (isWebComponent) {
34
+ // Stencil is using this class for lazy loading component
35
+ parent.setAttribute("class", "hydrated");
36
+ }
37
+ else {
38
+ parent.removeAttribute(attr.name);
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ componentDidLoad() {
45
+ this.enableAttributePassing(this._ref, "db-custom-button");
46
+ }
47
+ render() {
48
+ var _a, _b, _c, _d;
49
+ return (h("div", { key: '3360941151b3648c3b03e8d1e231798e751b6445', class: cls("db-custom-button", this.className), ref: (el) => {
50
+ this._ref = el;
51
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": getBooleanAsString(this.noText) }, h("slot", { key: '5991018ad35e6c9e04febd57a3affb0d0f81513f' })));
52
+ }
53
+ static get is() { return "db-custom-button"; }
54
+ static get properties() {
55
+ return {
56
+ "id": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "DBCustomButtonProps[\"id\"]",
61
+ "resolved": "string",
62
+ "references": {
63
+ "DBCustomButtonProps": {
64
+ "location": "import",
65
+ "path": "./model",
66
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
67
+ "referenceLocation": "DBCustomButtonProps"
68
+ }
69
+ }
70
+ },
71
+ "required": false,
72
+ "optional": false,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": ""
76
+ },
77
+ "getter": false,
78
+ "setter": false,
79
+ "reflect": false,
80
+ "attribute": "id"
81
+ },
82
+ "propOverrides": {
83
+ "type": "unknown",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "DBCustomButtonProps[\"propOverrides\"]",
87
+ "resolved": "{ id?: string; }",
88
+ "references": {
89
+ "DBCustomButtonProps": {
90
+ "location": "import",
91
+ "path": "./model",
92
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
93
+ "referenceLocation": "DBCustomButtonProps"
94
+ }
95
+ }
96
+ },
97
+ "required": false,
98
+ "optional": false,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": ""
102
+ },
103
+ "getter": false,
104
+ "setter": false
105
+ },
106
+ "className": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "DBCustomButtonProps[\"className\"]",
111
+ "resolved": "string",
112
+ "references": {
113
+ "DBCustomButtonProps": {
114
+ "location": "import",
115
+ "path": "./model",
116
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
117
+ "referenceLocation": "DBCustomButtonProps"
118
+ }
119
+ }
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": ""
126
+ },
127
+ "getter": false,
128
+ "setter": false,
129
+ "reflect": false,
130
+ "attribute": "classname"
131
+ },
132
+ "iconLeading": {
133
+ "type": "string",
134
+ "mutable": false,
135
+ "complexType": {
136
+ "original": "DBCustomButtonProps[\"iconLeading\"]",
137
+ "resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
138
+ "references": {
139
+ "DBCustomButtonProps": {
140
+ "location": "import",
141
+ "path": "./model",
142
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
143
+ "referenceLocation": "DBCustomButtonProps"
144
+ }
145
+ }
146
+ },
147
+ "required": false,
148
+ "optional": false,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": ""
152
+ },
153
+ "getter": false,
154
+ "setter": false,
155
+ "reflect": false,
156
+ "attribute": "icon-leading"
157
+ },
158
+ "icon": {
159
+ "type": "string",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "DBCustomButtonProps[\"icon\"]",
163
+ "resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
164
+ "references": {
165
+ "DBCustomButtonProps": {
166
+ "location": "import",
167
+ "path": "./model",
168
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
169
+ "referenceLocation": "DBCustomButtonProps"
170
+ }
171
+ }
172
+ },
173
+ "required": false,
174
+ "optional": false,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": ""
178
+ },
179
+ "getter": false,
180
+ "setter": false,
181
+ "reflect": false,
182
+ "attribute": "icon"
183
+ },
184
+ "showIconLeading": {
185
+ "type": "any",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "DBCustomButtonProps[\"showIconLeading\"]",
189
+ "resolved": "boolean | string",
190
+ "references": {
191
+ "DBCustomButtonProps": {
192
+ "location": "import",
193
+ "path": "./model",
194
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
195
+ "referenceLocation": "DBCustomButtonProps"
196
+ }
197
+ }
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": ""
204
+ },
205
+ "getter": false,
206
+ "setter": false,
207
+ "reflect": false,
208
+ "attribute": "show-icon-leading"
209
+ },
210
+ "showIcon": {
211
+ "type": "any",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "DBCustomButtonProps[\"showIcon\"]",
215
+ "resolved": "boolean | string",
216
+ "references": {
217
+ "DBCustomButtonProps": {
218
+ "location": "import",
219
+ "path": "./model",
220
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
221
+ "referenceLocation": "DBCustomButtonProps"
222
+ }
223
+ }
224
+ },
225
+ "required": false,
226
+ "optional": false,
227
+ "docs": {
228
+ "tags": [],
229
+ "text": ""
230
+ },
231
+ "getter": false,
232
+ "setter": false,
233
+ "reflect": false,
234
+ "attribute": "show-icon"
235
+ },
236
+ "iconTrailing": {
237
+ "type": "string",
238
+ "mutable": false,
239
+ "complexType": {
240
+ "original": "DBCustomButtonProps[\"iconTrailing\"]",
241
+ "resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
242
+ "references": {
243
+ "DBCustomButtonProps": {
244
+ "location": "import",
245
+ "path": "./model",
246
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
247
+ "referenceLocation": "DBCustomButtonProps"
248
+ }
249
+ }
250
+ },
251
+ "required": false,
252
+ "optional": false,
253
+ "docs": {
254
+ "tags": [],
255
+ "text": ""
256
+ },
257
+ "getter": false,
258
+ "setter": false,
259
+ "reflect": false,
260
+ "attribute": "icon-trailing"
261
+ },
262
+ "showIconTrailing": {
263
+ "type": "any",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "DBCustomButtonProps[\"showIconTrailing\"]",
267
+ "resolved": "boolean | string",
268
+ "references": {
269
+ "DBCustomButtonProps": {
270
+ "location": "import",
271
+ "path": "./model",
272
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
273
+ "referenceLocation": "DBCustomButtonProps"
274
+ }
275
+ }
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": ""
282
+ },
283
+ "getter": false,
284
+ "setter": false,
285
+ "reflect": false,
286
+ "attribute": "show-icon-trailing"
287
+ },
288
+ "size": {
289
+ "type": "string",
290
+ "mutable": false,
291
+ "complexType": {
292
+ "original": "DBCustomButtonProps[\"size\"]",
293
+ "resolved": "\"medium\" | \"small\"",
294
+ "references": {
295
+ "DBCustomButtonProps": {
296
+ "location": "import",
297
+ "path": "./model",
298
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
299
+ "referenceLocation": "DBCustomButtonProps"
300
+ }
301
+ }
302
+ },
303
+ "required": false,
304
+ "optional": false,
305
+ "docs": {
306
+ "tags": [],
307
+ "text": ""
308
+ },
309
+ "getter": false,
310
+ "setter": false,
311
+ "reflect": false,
312
+ "attribute": "size"
313
+ },
314
+ "width": {
315
+ "type": "string",
316
+ "mutable": false,
317
+ "complexType": {
318
+ "original": "DBCustomButtonProps[\"width\"]",
319
+ "resolved": "string",
320
+ "references": {
321
+ "DBCustomButtonProps": {
322
+ "location": "import",
323
+ "path": "./model",
324
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
325
+ "referenceLocation": "DBCustomButtonProps"
326
+ }
327
+ }
328
+ },
329
+ "required": false,
330
+ "optional": false,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": ""
334
+ },
335
+ "getter": false,
336
+ "setter": false,
337
+ "reflect": false,
338
+ "attribute": "width"
339
+ },
340
+ "variant": {
341
+ "type": "string",
342
+ "mutable": false,
343
+ "complexType": {
344
+ "original": "DBCustomButtonProps[\"variant\"]",
345
+ "resolved": "string",
346
+ "references": {
347
+ "DBCustomButtonProps": {
348
+ "location": "import",
349
+ "path": "./model",
350
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
351
+ "referenceLocation": "DBCustomButtonProps"
352
+ }
353
+ }
354
+ },
355
+ "required": false,
356
+ "optional": false,
357
+ "docs": {
358
+ "tags": [],
359
+ "text": ""
360
+ },
361
+ "getter": false,
362
+ "setter": false,
363
+ "reflect": false,
364
+ "attribute": "variant"
365
+ },
366
+ "noText": {
367
+ "type": "any",
368
+ "mutable": false,
369
+ "complexType": {
370
+ "original": "DBCustomButtonProps[\"noText\"]",
371
+ "resolved": "boolean | string",
372
+ "references": {
373
+ "DBCustomButtonProps": {
374
+ "location": "import",
375
+ "path": "./model",
376
+ "id": "src/components/custom-button/model.ts::DBCustomButtonProps",
377
+ "referenceLocation": "DBCustomButtonProps"
378
+ }
379
+ }
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": ""
386
+ },
387
+ "getter": false,
388
+ "setter": false,
389
+ "reflect": false,
390
+ "attribute": "no-text"
391
+ }
392
+ };
393
+ }
394
+ }
@@ -0,0 +1,2 @@
1
+ import { DBCustomButton } from "./custom-button";
2
+ export default DBCustomButton;
@@ -0,0 +1 @@
1
+ export {};