@db-ux/wc-core-components 4.10.2 → 4.11.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 (336) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bundle/db-accordion-item.js +1 -1
  3. package/bundle/db-accordion.js +1 -1
  4. package/bundle/db-badge.js +1 -1
  5. package/bundle/db-brand.js +1 -1
  6. package/bundle/db-button.js +1 -1
  7. package/bundle/db-card.js +1 -1
  8. package/bundle/db-checkbox.js +1 -1
  9. package/bundle/db-custom-button.js +1 -1
  10. package/bundle/db-custom-select-dropdown.js +1 -1
  11. package/bundle/db-custom-select-form-field.js +1 -1
  12. package/bundle/db-custom-select-list-item.js +1 -1
  13. package/bundle/db-custom-select-list.js +1 -1
  14. package/bundle/db-custom-select.js +1 -1
  15. package/bundle/db-divider.js +1 -1
  16. package/bundle/db-drawer.js +1 -1
  17. package/bundle/db-header.js +1 -1
  18. package/bundle/db-icon.js +1 -1
  19. package/bundle/db-infotext.js +1 -1
  20. package/bundle/db-input.js +1 -1
  21. package/bundle/db-link.js +1 -1
  22. package/bundle/db-navigation-item.js +1 -1
  23. package/bundle/db-navigation.js +1 -1
  24. package/bundle/db-notification.js +1 -1
  25. package/bundle/db-page.js +1 -1
  26. package/bundle/db-popover.js +1 -1
  27. package/bundle/db-radio.js +1 -1
  28. package/bundle/db-section.js +1 -1
  29. package/bundle/db-select.js +1 -1
  30. package/bundle/db-stack.js +1 -1
  31. package/bundle/db-switch.js +1 -1
  32. package/bundle/db-tab-item.js +1 -1
  33. package/bundle/db-tab-list.js +1 -1
  34. package/bundle/db-tab-panel.js +1 -1
  35. package/bundle/db-table-body.d.ts +11 -0
  36. package/bundle/db-table-body.js +1 -0
  37. package/bundle/db-table-caption.d.ts +11 -0
  38. package/bundle/db-table-caption.js +1 -0
  39. package/bundle/db-table-data-cell.d.ts +11 -0
  40. package/bundle/db-table-data-cell.js +1 -0
  41. package/bundle/db-table-footer.d.ts +11 -0
  42. package/bundle/db-table-footer.js +1 -0
  43. package/bundle/db-table-head.d.ts +11 -0
  44. package/bundle/db-table-head.js +1 -0
  45. package/bundle/db-table-header-cell.d.ts +11 -0
  46. package/bundle/db-table-header-cell.js +1 -0
  47. package/bundle/db-table-row.d.ts +11 -0
  48. package/bundle/db-table-row.js +1 -0
  49. package/bundle/db-table.d.ts +11 -0
  50. package/bundle/db-table.js +1 -0
  51. package/bundle/db-tabs.js +1 -1
  52. package/bundle/db-tag.js +1 -1
  53. package/bundle/db-textarea.js +1 -1
  54. package/bundle/db-tooltip.js +1 -1
  55. package/bundle/index.js +1 -1
  56. package/bundle/{p-BGVLpaFn.js → p-B5ANMEnQ.js} +1 -1
  57. package/bundle/p-BJwvv-yT.js +1 -0
  58. package/bundle/{p-B5E_0kTi.js → p-BNiKxu3y.js} +1 -1
  59. package/bundle/p-B_bPnncM.js +1 -0
  60. package/bundle/p-BnLhi6Lz.js +1 -0
  61. package/bundle/p-BrBlnLrn.js +1 -0
  62. package/bundle/p-CByFfoSH.js +1 -0
  63. package/bundle/{p-LbPYp2oP.js → p-CQo0C7QE.js} +1 -1
  64. package/bundle/p-CR2ZbfYe.js +1 -0
  65. package/bundle/p-CYYSsu3p.js +1 -0
  66. package/bundle/p-CeDu282h.js +1 -0
  67. package/bundle/p-CfLPOLHz.js +1 -0
  68. package/bundle/p-CoOxyQb2.js +1 -0
  69. package/bundle/p-CqED0CfD.js +1 -0
  70. package/bundle/p-Cr_z1Jfi.js +1 -0
  71. package/bundle/{p-DisehhY5.js → p-D-XzX0R7.js} +1 -1
  72. package/{dist/db-ux/p-D5mInaY7.js → bundle/p-D6L0n3gO.js} +1 -1
  73. package/bundle/p-DJTpgiBy.js +1 -0
  74. package/bundle/p-DMSIvqcA.js +1 -0
  75. package/bundle/p-DUiroUyR.js +1 -0
  76. package/bundle/p-DdyMClpj.js +1 -0
  77. package/bundle/p-DjVjS2Tb.js +1 -0
  78. package/bundle/p-in4Kv88F.js +1 -0
  79. package/dist/cjs/db-accordion-item.cjs.entry.js +4 -4
  80. package/dist/cjs/db-accordion.cjs.entry.js +3 -3
  81. package/dist/cjs/db-badge.cjs.entry.js +4 -4
  82. package/dist/cjs/db-brand.cjs.entry.js +4 -4
  83. package/dist/cjs/db-button.cjs.entry.js +6 -5
  84. package/dist/cjs/db-card.cjs.entry.js +4 -4
  85. package/dist/cjs/db-checkbox.cjs.entry.js +5 -5
  86. package/dist/cjs/db-custom-button.cjs.entry.js +6 -5
  87. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +18 -17
  88. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +4 -4
  89. package/dist/cjs/db-custom-select.cjs.entry.js +10 -10
  90. package/dist/cjs/db-divider.cjs.entry.js +3 -3
  91. package/dist/cjs/db-drawer.cjs.entry.js +5 -5
  92. package/dist/cjs/db-header.cjs.entry.js +4 -4
  93. package/dist/cjs/db-icon.cjs.entry.js +4 -4
  94. package/dist/cjs/db-infotext.cjs.entry.js +4 -4
  95. package/dist/cjs/db-link_4.cjs.entry.js +248 -0
  96. package/dist/cjs/db-navigation-item.cjs.entry.js +4 -4
  97. package/dist/cjs/db-navigation.cjs.entry.js +4 -4
  98. package/dist/cjs/db-notification.cjs.entry.js +4 -4
  99. package/dist/cjs/db-page.cjs.entry.js +4 -4
  100. package/dist/cjs/db-popover.cjs.entry.js +5 -5
  101. package/dist/cjs/db-radio.cjs.entry.js +5 -5
  102. package/dist/cjs/db-section.cjs.entry.js +4 -4
  103. package/dist/cjs/db-select.cjs.entry.js +6 -6
  104. package/dist/cjs/db-stack.cjs.entry.js +4 -4
  105. package/dist/cjs/db-switch.cjs.entry.js +5 -5
  106. package/dist/cjs/db-tab-item_3.cjs.entry.js +12 -11
  107. package/dist/cjs/db-table-body_3.cjs.entry.js +194 -0
  108. package/dist/cjs/{db-link.cjs.entry.js → db-table-caption.cjs.entry.js} +7 -8
  109. package/dist/cjs/db-table.cjs.entry.js +158 -0
  110. package/dist/cjs/db-tabs.cjs.entry.js +4 -4
  111. package/dist/cjs/db-textarea.cjs.entry.js +5 -5
  112. package/dist/cjs/db-tooltip.cjs.entry.js +5 -5
  113. package/dist/cjs/db-ux.cjs.js +2 -2
  114. package/dist/cjs/{document-click-listener-B2-xKJv3.js → document-click-listener-DdNXbErU.js} +1 -1
  115. package/dist/cjs/{document-scroll-listener-ChQ7XZRk.js → document-scroll-listener-CvAZ6uPr.js} +1 -1
  116. package/dist/cjs/{form-components-_ncB_U2D.js → form-components-CmQlkARp.js} +1 -1
  117. package/dist/cjs/{index-HN8AqU2e.js → index-C313bRqJ.js} +21 -0
  118. package/dist/cjs/{index-2_9ESkQu.js → index-spuu3sXz.js} +13 -8
  119. package/dist/cjs/index.cjs.js +23 -4
  120. package/dist/cjs/loader.cjs.js +2 -2
  121. package/dist/collection/collection-manifest.json +8 -0
  122. package/dist/collection/components/accordion/accordion.js +1 -1
  123. package/dist/collection/components/accordion-item/accordion-item.js +2 -2
  124. package/dist/collection/components/badge/badge.js +2 -2
  125. package/dist/collection/components/brand/brand.js +3 -3
  126. package/dist/collection/components/button/button.js +7 -6
  127. package/dist/collection/components/card/card.js +2 -2
  128. package/dist/collection/components/checkbox/checkbox.js +3 -3
  129. package/dist/collection/components/custom-button/custom-button.js +7 -6
  130. package/dist/collection/components/custom-select/custom-select.js +7 -7
  131. package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +2 -2
  132. package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +2 -2
  133. package/dist/collection/components/custom-select-list/custom-select-list.js +2 -2
  134. package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +3 -3
  135. package/dist/collection/components/divider/divider.js +1 -1
  136. package/dist/collection/components/drawer/drawer.js +3 -3
  137. package/dist/collection/components/header/header.js +2 -2
  138. package/dist/collection/components/icon/icon.js +3 -3
  139. package/dist/collection/components/infotext/infotext.js +3 -3
  140. package/dist/collection/components/input/input.js +11 -10
  141. package/dist/collection/components/link/link.js +2 -2
  142. package/dist/collection/components/navigation/navigation.js +2 -2
  143. package/dist/collection/components/navigation-item/navigation-item.js +3 -3
  144. package/dist/collection/components/notification/notification.js +3 -3
  145. package/dist/collection/components/page/page.js +2 -2
  146. package/dist/collection/components/popover/popover.js +2 -2
  147. package/dist/collection/components/radio/radio.js +2 -2
  148. package/dist/collection/components/section/section.js +2 -2
  149. package/dist/collection/components/select/select.js +5 -5
  150. package/dist/collection/components/stack/stack.js +2 -2
  151. package/dist/collection/components/switch/switch.js +6 -6
  152. package/dist/collection/components/tab-item/tab-item.js +9 -8
  153. package/dist/collection/components/tab-list/tab-list.js +2 -2
  154. package/dist/collection/components/tab-panel/tab-panel.js +2 -2
  155. package/dist/collection/components/table/examples/data.js +258 -0
  156. package/dist/collection/components/table/index.js +2 -0
  157. package/dist/collection/components/table/model.js +6 -0
  158. package/dist/collection/components/table/table.js +478 -0
  159. package/dist/collection/components/table-body/index.js +2 -0
  160. package/dist/collection/components/table-body/model.js +1 -0
  161. package/dist/collection/components/table-body/table-body.js +144 -0
  162. package/dist/collection/components/table-caption/index.js +2 -0
  163. package/dist/collection/components/table-caption/model.js +1 -0
  164. package/dist/collection/components/table-caption/table-caption.js +116 -0
  165. package/dist/collection/components/table-data-cell/index.js +2 -0
  166. package/dist/collection/components/table-data-cell/model.js +1 -0
  167. package/dist/collection/components/table-data-cell/table-data-cell.js +298 -0
  168. package/dist/collection/components/table-footer/index.js +2 -0
  169. package/dist/collection/components/table-footer/model.js +1 -0
  170. package/dist/collection/components/table-footer/table-footer.js +144 -0
  171. package/dist/collection/components/table-head/index.js +2 -0
  172. package/dist/collection/components/table-head/model.js +1 -0
  173. package/dist/collection/components/table-head/table-head.js +147 -0
  174. package/dist/collection/components/table-header-cell/index.js +2 -0
  175. package/dist/collection/components/table-header-cell/model.js +1 -0
  176. package/dist/collection/components/table-header-cell/table-header-cell.js +376 -0
  177. package/dist/collection/components/table-row/index.js +2 -0
  178. package/dist/collection/components/table-row/model.js +1 -0
  179. package/dist/collection/components/table-row/table-row.js +202 -0
  180. package/dist/collection/components/tabs/tabs.js +2 -2
  181. package/dist/collection/components/tag/tag.js +3 -3
  182. package/dist/collection/components/textarea/textarea.js +3 -3
  183. package/dist/collection/components/tooltip/tooltip.js +2 -2
  184. package/dist/collection/index.js +16 -0
  185. package/dist/collection/shared/model.js +1 -1
  186. package/dist/collection/utils/index.js +13 -8
  187. package/dist/custom-elements.json +6998 -3826
  188. package/dist/db-ux/db-ux.esm.js +1 -1
  189. package/dist/db-ux/index.esm.js +1 -1
  190. package/dist/db-ux/{p-2461e08a.entry.js → p-08271c80.entry.js} +1 -1
  191. package/dist/db-ux/{p-0f524f6c.entry.js → p-105ffa74.entry.js} +1 -1
  192. package/dist/db-ux/p-15adca91.entry.js +1 -0
  193. package/dist/db-ux/{p-db71c251.entry.js → p-1a322a0c.entry.js} +1 -1
  194. package/dist/db-ux/{p-46e3033b.entry.js → p-1f7232c0.entry.js} +1 -1
  195. package/dist/db-ux/p-27e2f6f2.entry.js +1 -0
  196. package/dist/db-ux/p-2907f214.entry.js +1 -0
  197. package/dist/db-ux/p-2ff958e4.entry.js +1 -0
  198. package/dist/db-ux/p-3423b7af.entry.js +1 -0
  199. package/dist/db-ux/p-365e6edf.entry.js +1 -0
  200. package/dist/db-ux/{p-fd334f14.entry.js → p-42516007.entry.js} +1 -1
  201. package/dist/db-ux/p-5045182c.entry.js +1 -0
  202. package/dist/db-ux/{p-26b7e21f.entry.js → p-5e1d42e5.entry.js} +1 -1
  203. package/dist/db-ux/{p-94de5791.entry.js → p-61b28212.entry.js} +1 -1
  204. package/dist/db-ux/p-6850a53c.entry.js +1 -0
  205. package/dist/db-ux/p-6bff55b4.entry.js +1 -0
  206. package/dist/db-ux/p-6e7c5e42.entry.js +1 -0
  207. package/dist/db-ux/p-76adf385.entry.js +1 -0
  208. package/dist/db-ux/p-78f7b353.entry.js +1 -0
  209. package/dist/db-ux/p-7fa5d304.entry.js +1 -0
  210. package/dist/db-ux/p-95b69e71.entry.js +1 -0
  211. package/dist/db-ux/p-99ebe6ec.entry.js +1 -0
  212. package/dist/db-ux/p-BihrW11j.js +1 -0
  213. package/dist/db-ux/p-BlbKvvUv.js +2 -0
  214. package/{bundle/p-BLyvxOmU.js → dist/db-ux/p-BtImZ8Nt.js} +1 -1
  215. package/dist/db-ux/p-OOIf-5XP.js +1 -0
  216. package/dist/db-ux/p-a5dc355d.entry.js +1 -0
  217. package/dist/db-ux/{p-4d5201a3.entry.js → p-a6113789.entry.js} +1 -1
  218. package/dist/db-ux/p-b9c0feaf.entry.js +1 -0
  219. package/dist/db-ux/p-c14fa91a.entry.js +1 -0
  220. package/dist/db-ux/p-c65b807e.entry.js +1 -0
  221. package/dist/db-ux/{p-d173eace.entry.js → p-dd9cedbe.entry.js} +1 -1
  222. package/dist/db-ux/{p-652739e4.entry.js → p-e3f705fd.entry.js} +1 -1
  223. package/dist/db-ux/{p-5eae34e7.entry.js → p-e4cddc9f.entry.js} +1 -1
  224. package/dist/db-ux/p-e7a8612c.entry.js +1 -0
  225. package/dist/db-ux/{p-4c3a8823.entry.js → p-ee8c3243.entry.js} +1 -1
  226. package/dist/db-ux/p-f0d0acfc.entry.js +1 -0
  227. package/dist/db-ux/{p-e2740857.entry.js → p-f15748ea.entry.js} +1 -1
  228. package/dist/db-ux/p-fumiz06Y.js +1 -0
  229. package/dist/esm/db-accordion-item.entry.js +4 -4
  230. package/dist/esm/db-accordion.entry.js +3 -3
  231. package/dist/esm/db-badge.entry.js +4 -4
  232. package/dist/esm/db-brand.entry.js +4 -4
  233. package/dist/esm/db-button.entry.js +6 -5
  234. package/dist/esm/db-card.entry.js +4 -4
  235. package/dist/esm/db-checkbox.entry.js +5 -5
  236. package/dist/esm/db-custom-button.entry.js +6 -5
  237. package/dist/esm/db-custom-select-dropdown_5.entry.js +18 -17
  238. package/dist/esm/db-custom-select-form-field.entry.js +4 -4
  239. package/dist/esm/db-custom-select.entry.js +10 -10
  240. package/dist/esm/db-divider.entry.js +3 -3
  241. package/dist/esm/db-drawer.entry.js +5 -5
  242. package/dist/esm/db-header.entry.js +4 -4
  243. package/dist/esm/db-icon.entry.js +4 -4
  244. package/dist/esm/db-infotext.entry.js +4 -4
  245. package/dist/esm/db-link_4.entry.js +243 -0
  246. package/dist/esm/db-navigation-item.entry.js +4 -4
  247. package/dist/esm/db-navigation.entry.js +4 -4
  248. package/dist/esm/db-notification.entry.js +4 -4
  249. package/dist/esm/db-page.entry.js +4 -4
  250. package/dist/esm/db-popover.entry.js +5 -5
  251. package/dist/esm/db-radio.entry.js +5 -5
  252. package/dist/esm/db-section.entry.js +4 -4
  253. package/dist/esm/db-select.entry.js +6 -6
  254. package/dist/esm/db-stack.entry.js +4 -4
  255. package/dist/esm/db-switch.entry.js +5 -5
  256. package/dist/esm/db-tab-item_3.entry.js +12 -11
  257. package/dist/esm/db-table-body_3.entry.js +190 -0
  258. package/dist/esm/{db-link.entry.js → db-table-caption.entry.js} +7 -8
  259. package/dist/esm/db-table.entry.js +156 -0
  260. package/dist/esm/db-tabs.entry.js +4 -4
  261. package/dist/esm/db-textarea.entry.js +5 -5
  262. package/dist/esm/db-tooltip.entry.js +5 -5
  263. package/dist/esm/db-ux.js +3 -3
  264. package/dist/esm/{document-click-listener-D7W_VE5O.js → document-click-listener-9wJfRcvz.js} +1 -1
  265. package/dist/esm/{document-scroll-listener-DOBe3Oa9.js → document-scroll-listener-4F0ZAg9p.js} +1 -1
  266. package/dist/esm/{form-components-D6LQfJvq.js → form-components-ZV7IN0oG.js} +1 -1
  267. package/dist/esm/{index-BGaQ0Bx8.js → index-BlbKvvUv.js} +21 -0
  268. package/dist/esm/{index-xkoBSP8R.js → index-fumiz06Y.js} +13 -8
  269. package/dist/esm/index.js +16 -5
  270. package/dist/esm/loader.js +3 -3
  271. package/dist/types/components/table/examples/data.d.ts +9 -0
  272. package/dist/types/components/table/index.d.ts +2 -0
  273. package/dist/types/components/table/model.d.ts +74 -0
  274. package/dist/types/components/table/table.d.ts +38 -0
  275. package/dist/types/components/table-body/index.d.ts +2 -0
  276. package/dist/types/components/table-body/model.d.ts +8 -0
  277. package/dist/types/components/table-body/table-body.d.ts +20 -0
  278. package/dist/types/components/table-caption/index.d.ts +2 -0
  279. package/dist/types/components/table-caption/model.d.ts +5 -0
  280. package/dist/types/components/table-caption/table-caption.d.ts +19 -0
  281. package/dist/types/components/table-data-cell/index.d.ts +2 -0
  282. package/dist/types/components/table-data-cell/model.d.ts +5 -0
  283. package/dist/types/components/table-data-cell/table-data-cell.d.ts +26 -0
  284. package/dist/types/components/table-footer/index.d.ts +2 -0
  285. package/dist/types/components/table-footer/model.d.ts +8 -0
  286. package/dist/types/components/table-footer/table-footer.d.ts +20 -0
  287. package/dist/types/components/table-head/index.d.ts +2 -0
  288. package/dist/types/components/table-head/model.d.ts +10 -0
  289. package/dist/types/components/table-head/table-head.d.ts +59 -0
  290. package/dist/types/components/table-header-cell/index.d.ts +2 -0
  291. package/dist/types/components/table-header-cell/model.d.ts +24 -0
  292. package/dist/types/components/table-header-cell/table-header-cell.d.ts +29 -0
  293. package/dist/types/components/table-row/index.d.ts +2 -0
  294. package/dist/types/components/table-row/model.d.ts +30 -0
  295. package/dist/types/components/table-row/table-row.d.ts +24 -0
  296. package/dist/types/components.d.ts +278 -0
  297. package/dist/types/index.d.ts +16 -0
  298. package/dist/types/shared/figma.d.ts +70 -18
  299. package/dist/types/shared/model.d.ts +44 -2
  300. package/dist/types/utils/index.d.ts +9 -4
  301. package/dist/vscode.html-custom-data.json +400 -2
  302. package/dist/web-types.json +744 -5
  303. package/package.json +4 -4
  304. package/bundle/p--qzKkpB9.js +0 -1
  305. package/bundle/p-9fgrfYbf.js +0 -1
  306. package/bundle/p-BChikMGc.js +0 -1
  307. package/bundle/p-BPxBqqlc.js +0 -1
  308. package/bundle/p-C6_y8Tot.js +0 -1
  309. package/bundle/p-CKfRqzsn.js +0 -1
  310. package/bundle/p-CnYMRGX1.js +0 -1
  311. package/bundle/p-CwzdaLE3.js +0 -1
  312. package/bundle/p-CyxQfbGC.js +0 -1
  313. package/bundle/p-DstwggLZ.js +0 -1
  314. package/bundle/p-suxDlmXD.js +0 -1
  315. package/dist/db-ux/p-11211f1a.entry.js +0 -1
  316. package/dist/db-ux/p-1a4881de.entry.js +0 -1
  317. package/dist/db-ux/p-21e5f6d0.entry.js +0 -1
  318. package/dist/db-ux/p-272bdffc.entry.js +0 -1
  319. package/dist/db-ux/p-32c359a9.entry.js +0 -1
  320. package/dist/db-ux/p-33606da9.entry.js +0 -1
  321. package/dist/db-ux/p-44391c06.entry.js +0 -1
  322. package/dist/db-ux/p-4b99f205.entry.js +0 -1
  323. package/dist/db-ux/p-4c238643.entry.js +0 -1
  324. package/dist/db-ux/p-93a6b1ee.entry.js +0 -1
  325. package/dist/db-ux/p-9728504d.entry.js +0 -1
  326. package/dist/db-ux/p-BGaQ0Bx8.js +0 -2
  327. package/dist/db-ux/p-CHLgQ9vn.js +0 -1
  328. package/dist/db-ux/p-D_roHmuC.js +0 -1
  329. package/dist/db-ux/p-a6c3ceaa.entry.js +0 -1
  330. package/dist/db-ux/p-cd3cfb4e.entry.js +0 -1
  331. package/dist/db-ux/p-cf045f35.entry.js +0 -1
  332. package/dist/db-ux/p-d3ada4cb.entry.js +0 -1
  333. package/dist/db-ux/p-d858f147.entry.js +0 -1
  334. package/dist/db-ux/p-ed5b3877.entry.js +0 -1
  335. package/dist/db-ux/p-fed0fc42.entry.js +0 -1
  336. package/dist/db-ux/p-xkoBSP8R.js +0 -1
@@ -0,0 +1,478 @@
1
+ import { cls, delay, getBooleanAsString } from "../../utils";
2
+ import { h, Fragment } from "@stencil/core";
3
+ /**
4
+ * @slot children - This is a default/unnamed slot
5
+ * @slot caption - TODO: Add description for slotCaption
6
+ */
7
+ export class DBTable {
8
+ constructor() {
9
+ this._data = undefined;
10
+ this._style = undefined;
11
+ }
12
+ convertData() {
13
+ try {
14
+ if (typeof this.data === "string") {
15
+ return JSON.parse(this.data);
16
+ }
17
+ return this.data;
18
+ }
19
+ catch (error) {
20
+ console.error(error);
21
+ }
22
+ return {};
23
+ }
24
+ /**
25
+ * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
26
+ * @param element the ref for the component
27
+ * @param customElementSelector the custom element like `my-component`
28
+ */
29
+ enableAttributePassing(element, customElementSelector) {
30
+ const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
31
+ if (element && parent) {
32
+ const attributes = parent.attributes;
33
+ for (let i = 0; i < attributes.length; i++) {
34
+ const attr = attributes.item(i);
35
+ if (attr && attr.name !== 'data-density' &&
36
+ (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
37
+ element.setAttribute(attr.name, attr.value);
38
+ parent.removeAttribute(attr.name);
39
+ }
40
+ else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
41
+ element.setAttribute(attr.name, attr.value);
42
+ parent.removeAttribute(attr.name);
43
+ }
44
+ else if (attr && attr.name === "class") {
45
+ const isWebComponent = attr.value.includes("hydrated");
46
+ const value = attr.value.replace("hydrated", "").trim();
47
+ const currentClass = element.getAttribute("class");
48
+ element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
49
+ if (isWebComponent) {
50
+ // Stencil is using this class for lazy loading component
51
+ parent.setAttribute("class", "hydrated");
52
+ }
53
+ else {
54
+ parent.removeAttribute(attr.name);
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ watch0Fn() {
61
+ if (this.data) {
62
+ this._data = this.convertData();
63
+ }
64
+ else {
65
+ this._data = undefined;
66
+ }
67
+ }
68
+ watch0() {
69
+ this.watch0Fn();
70
+ }
71
+ watch1Fn() {
72
+ if (this._ref && this.mobileVariant === "list") {
73
+ // Delay for angular
74
+ void delay(() => {
75
+ const table = this._ref;
76
+ if (!table)
77
+ return;
78
+ const headerCells = table.querySelectorAll("thead tr th");
79
+ if (headerCells.length) {
80
+ const otherRows = table.querySelectorAll(":is(tbody,tfoot) tr");
81
+ otherRows.forEach((row) => {
82
+ const cells = row.querySelectorAll(":is(td,th)");
83
+ cells.forEach((cell, index) => {
84
+ const headerCell = headerCells[index];
85
+ if (headerCell) {
86
+ // Use only direct text nodes to avoid including text from nested elements (e.g. sort buttons)
87
+ const directText = Array.from(headerCell.childNodes)
88
+ .filter((node) => node.nodeType === Node.TEXT_NODE)
89
+ .map((node) => { var _a; return (_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })
90
+ .filter(Boolean)
91
+ .join(" ");
92
+ if (directText) {
93
+ cell.dataset["header"] = directText;
94
+ }
95
+ }
96
+ });
97
+ });
98
+ }
99
+ }, 1);
100
+ }
101
+ }
102
+ watch1() {
103
+ this.watch1Fn();
104
+ }
105
+ watch2Fn() {
106
+ if (this.columnSizes) {
107
+ const columnStyles = {};
108
+ Object.entries(this.columnSizes).forEach(([key, value]) => {
109
+ columnStyles[`--db-table-column-size-${key}`] = value;
110
+ });
111
+ this._style = columnStyles;
112
+ }
113
+ else {
114
+ this._style = undefined;
115
+ }
116
+ }
117
+ watch2() {
118
+ this.watch2Fn();
119
+ }
120
+ componentDidLoad() {
121
+ if (typeof document !== "undefined" && this.rootElement && this.rootElement.dataset.connect) {
122
+ const connectedElement = document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);
123
+ if (connectedElement) {
124
+ connectedElement.remove();
125
+ }
126
+ }
127
+ this.enableAttributePassing(this._ref, "db-table");
128
+ this.watch0Fn();
129
+ this.watch1Fn();
130
+ this.watch2Fn();
131
+ }
132
+ render() {
133
+ var _a, _b, _c, _d, _e, _f;
134
+ return (h("div", { key: 'd4edb3348e35410ac540499f815e173237e533dc', class: cls("db-table", this.className), style: this._style, "data-width": this.width, "data-size": this.size, "data-divider": this.divider, "data-variant": this.variant, "data-mobile-variant": this.mobileVariant, "data-show-caption": getBooleanAsString(this.showCaption), "data-sticky-header": this.stickyHeader }, h("table", { key: '2eda8c59f2c86a480691a1a4fae4a1fdaa63a6b1', ref: (el) => {
135
+ this._ref = el;
136
+ }, id: this.id }, this.captionPlain ? (h("caption", null, this.captionPlain)) : (h("slot", { name: "caption" })), this._data ? (h(Fragment, null, ((_a = this._data) === null || _a === void 0 ? void 0 : _a.header) ? (h("db-table-head", { rows: (_b = this._data) === null || _b === void 0 ? void 0 : _b.header })) : null, ((_c = this._data) === null || _c === void 0 ? void 0 : _c.body) ? (h("db-table-body", { rows: (_d = this._data) === null || _d === void 0 ? void 0 : _d.body })) : null, ((_e = this._data) === null || _e === void 0 ? void 0 : _e.footer) ? (h("db-table-footer", { rows: (_f = this._data) === null || _f === void 0 ? void 0 : _f.footer })) : null)) : (h("slot", null)))));
137
+ }
138
+ static get is() { return "db-table"; }
139
+ static get properties() {
140
+ return {
141
+ "data": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "DBTableProps[\"data\"]",
146
+ "resolved": "string | { header?: DBTableRowDefaultProps[]; body?: DBTableRowDefaultProps[]; footer?: DBTableRowDefaultProps[]; }",
147
+ "references": {
148
+ "DBTableProps": {
149
+ "location": "import",
150
+ "path": "./model",
151
+ "id": "src/components/table/model.ts::DBTableProps",
152
+ "referenceLocation": "DBTableProps"
153
+ }
154
+ }
155
+ },
156
+ "required": false,
157
+ "optional": false,
158
+ "docs": {
159
+ "tags": [],
160
+ "text": ""
161
+ },
162
+ "getter": false,
163
+ "setter": false,
164
+ "reflect": false,
165
+ "attribute": "data"
166
+ },
167
+ "mobileVariant": {
168
+ "type": "string",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "DBTableProps[\"mobileVariant\"]",
172
+ "resolved": "\"list\" | \"table\"",
173
+ "references": {
174
+ "DBTableProps": {
175
+ "location": "import",
176
+ "path": "./model",
177
+ "id": "src/components/table/model.ts::DBTableProps",
178
+ "referenceLocation": "DBTableProps"
179
+ }
180
+ }
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": ""
187
+ },
188
+ "getter": false,
189
+ "setter": false,
190
+ "reflect": false,
191
+ "attribute": "mobile-variant"
192
+ },
193
+ "columnSizes": {
194
+ "type": "unknown",
195
+ "mutable": false,
196
+ "complexType": {
197
+ "original": "DBTableProps[\"columnSizes\"]",
198
+ "resolved": "number | string",
199
+ "references": {
200
+ "DBTableProps": {
201
+ "location": "import",
202
+ "path": "./model",
203
+ "id": "src/components/table/model.ts::DBTableProps",
204
+ "referenceLocation": "DBTableProps"
205
+ }
206
+ }
207
+ },
208
+ "required": false,
209
+ "optional": false,
210
+ "docs": {
211
+ "tags": [],
212
+ "text": ""
213
+ },
214
+ "getter": false,
215
+ "setter": false
216
+ },
217
+ "className": {
218
+ "type": "string",
219
+ "mutable": false,
220
+ "complexType": {
221
+ "original": "DBTableProps[\"className\"]",
222
+ "resolved": "string",
223
+ "references": {
224
+ "DBTableProps": {
225
+ "location": "import",
226
+ "path": "./model",
227
+ "id": "src/components/table/model.ts::DBTableProps",
228
+ "referenceLocation": "DBTableProps"
229
+ }
230
+ }
231
+ },
232
+ "required": false,
233
+ "optional": false,
234
+ "docs": {
235
+ "tags": [],
236
+ "text": ""
237
+ },
238
+ "getter": false,
239
+ "setter": false,
240
+ "reflect": false,
241
+ "attribute": "classname"
242
+ },
243
+ "width": {
244
+ "type": "string",
245
+ "mutable": false,
246
+ "complexType": {
247
+ "original": "DBTableProps[\"width\"]",
248
+ "resolved": "string",
249
+ "references": {
250
+ "DBTableProps": {
251
+ "location": "import",
252
+ "path": "./model",
253
+ "id": "src/components/table/model.ts::DBTableProps",
254
+ "referenceLocation": "DBTableProps"
255
+ }
256
+ }
257
+ },
258
+ "required": false,
259
+ "optional": false,
260
+ "docs": {
261
+ "tags": [],
262
+ "text": ""
263
+ },
264
+ "getter": false,
265
+ "setter": false,
266
+ "reflect": false,
267
+ "attribute": "width"
268
+ },
269
+ "size": {
270
+ "type": "string",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "DBTableProps[\"size\"]",
274
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"x-small\"",
275
+ "references": {
276
+ "DBTableProps": {
277
+ "location": "import",
278
+ "path": "./model",
279
+ "id": "src/components/table/model.ts::DBTableProps",
280
+ "referenceLocation": "DBTableProps"
281
+ }
282
+ }
283
+ },
284
+ "required": false,
285
+ "optional": false,
286
+ "docs": {
287
+ "tags": [],
288
+ "text": ""
289
+ },
290
+ "getter": false,
291
+ "setter": false,
292
+ "reflect": false,
293
+ "attribute": "size"
294
+ },
295
+ "divider": {
296
+ "type": "string",
297
+ "mutable": false,
298
+ "complexType": {
299
+ "original": "DBTableProps[\"divider\"]",
300
+ "resolved": "\"both\" | \"horizontal\" | \"none\" | \"vertical\"",
301
+ "references": {
302
+ "DBTableProps": {
303
+ "location": "import",
304
+ "path": "./model",
305
+ "id": "src/components/table/model.ts::DBTableProps",
306
+ "referenceLocation": "DBTableProps"
307
+ }
308
+ }
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": ""
315
+ },
316
+ "getter": false,
317
+ "setter": false,
318
+ "reflect": false,
319
+ "attribute": "divider"
320
+ },
321
+ "variant": {
322
+ "type": "string",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "DBTableProps[\"variant\"]",
326
+ "resolved": "\"flat\" | \"spaced\" | \"zebra\"",
327
+ "references": {
328
+ "DBTableProps": {
329
+ "location": "import",
330
+ "path": "./model",
331
+ "id": "src/components/table/model.ts::DBTableProps",
332
+ "referenceLocation": "DBTableProps"
333
+ }
334
+ }
335
+ },
336
+ "required": false,
337
+ "optional": false,
338
+ "docs": {
339
+ "tags": [],
340
+ "text": ""
341
+ },
342
+ "getter": false,
343
+ "setter": false,
344
+ "reflect": false,
345
+ "attribute": "variant"
346
+ },
347
+ "showCaption": {
348
+ "type": "any",
349
+ "mutable": false,
350
+ "complexType": {
351
+ "original": "DBTableProps[\"showCaption\"]",
352
+ "resolved": "boolean | string",
353
+ "references": {
354
+ "DBTableProps": {
355
+ "location": "import",
356
+ "path": "./model",
357
+ "id": "src/components/table/model.ts::DBTableProps",
358
+ "referenceLocation": "DBTableProps"
359
+ }
360
+ }
361
+ },
362
+ "required": false,
363
+ "optional": false,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "getter": false,
369
+ "setter": false,
370
+ "reflect": false,
371
+ "attribute": "show-caption"
372
+ },
373
+ "stickyHeader": {
374
+ "type": "string",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "DBTableProps[\"stickyHeader\"]",
378
+ "resolved": "\"both\" | \"horizontal\" | \"none\" | \"vertical\"",
379
+ "references": {
380
+ "DBTableProps": {
381
+ "location": "import",
382
+ "path": "./model",
383
+ "id": "src/components/table/model.ts::DBTableProps",
384
+ "referenceLocation": "DBTableProps"
385
+ }
386
+ }
387
+ },
388
+ "required": false,
389
+ "optional": false,
390
+ "docs": {
391
+ "tags": [],
392
+ "text": ""
393
+ },
394
+ "getter": false,
395
+ "setter": false,
396
+ "reflect": false,
397
+ "attribute": "sticky-header"
398
+ },
399
+ "id": {
400
+ "type": "string",
401
+ "mutable": false,
402
+ "complexType": {
403
+ "original": "DBTableProps[\"id\"]",
404
+ "resolved": "string",
405
+ "references": {
406
+ "DBTableProps": {
407
+ "location": "import",
408
+ "path": "./model",
409
+ "id": "src/components/table/model.ts::DBTableProps",
410
+ "referenceLocation": "DBTableProps"
411
+ }
412
+ }
413
+ },
414
+ "required": false,
415
+ "optional": false,
416
+ "docs": {
417
+ "tags": [],
418
+ "text": ""
419
+ },
420
+ "getter": false,
421
+ "setter": false,
422
+ "reflect": false,
423
+ "attribute": "id"
424
+ },
425
+ "captionPlain": {
426
+ "type": "string",
427
+ "mutable": false,
428
+ "complexType": {
429
+ "original": "DBTableProps[\"captionPlain\"]",
430
+ "resolved": "string",
431
+ "references": {
432
+ "DBTableProps": {
433
+ "location": "import",
434
+ "path": "./model",
435
+ "id": "src/components/table/model.ts::DBTableProps",
436
+ "referenceLocation": "DBTableProps"
437
+ }
438
+ }
439
+ },
440
+ "required": false,
441
+ "optional": false,
442
+ "docs": {
443
+ "tags": [],
444
+ "text": ""
445
+ },
446
+ "getter": false,
447
+ "setter": false,
448
+ "reflect": false,
449
+ "attribute": "caption-plain"
450
+ }
451
+ };
452
+ }
453
+ static get states() {
454
+ return {
455
+ "_data": {},
456
+ "_style": {}
457
+ };
458
+ }
459
+ static get elementRef() { return "rootElement"; }
460
+ static get watchers() {
461
+ return [{
462
+ "propName": "data",
463
+ "methodName": "watch0"
464
+ }, {
465
+ "propName": "mobileVariant",
466
+ "methodName": "watch1"
467
+ }, {
468
+ "propName": "_ref",
469
+ "methodName": "watch1"
470
+ }, {
471
+ "propName": "_data",
472
+ "methodName": "watch1"
473
+ }, {
474
+ "propName": "columnSizes",
475
+ "methodName": "watch2"
476
+ }];
477
+ }
478
+ }
@@ -0,0 +1,2 @@
1
+ import { DBTableBody } from "./table-body";
2
+ export default DBTableBody;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,144 @@
1
+ import { cls, uuid } from "../../utils";
2
+ import { h } from "@stencil/core";
3
+ /**
4
+ * @slot children - This is a default/unnamed slot
5
+
6
+ */
7
+ export class DBTableBody {
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
+ if (typeof document !== "undefined" && this.rootElement && this.rootElement.dataset.connect) {
46
+ const connectedElement = document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);
47
+ if (connectedElement) {
48
+ connectedElement.remove();
49
+ }
50
+ }
51
+ this.enableAttributePassing(this._ref, "db-table-body");
52
+ }
53
+ render() {
54
+ var _a;
55
+ return (h("tbody", { key: 'c497d5a4be20eda6884e6e04b37ef7c9e211f307', class: cls("db-table-body", this.className), ref: (el) => {
56
+ this._ref = el;
57
+ }, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
58
+ var _a, _b, _c;
59
+ return (h("db-table-row", { class: (_a = row.className) !== null && _a !== void 0 ? _a : row.class, key: `${(_c = (_b = row.id) !== null && _b !== void 0 ? _b : this.id) !== null && _c !== void 0 ? _c : uuid()}-table-body-row-${index}`, cells: row.cells, interactive: row.interactive, id: row.id }));
60
+ })) : (h("slot", null))));
61
+ }
62
+ static get is() { return "db-table-body"; }
63
+ static get properties() {
64
+ return {
65
+ "id": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "DBTableBodyProps[\"id\"]",
70
+ "resolved": "string",
71
+ "references": {
72
+ "DBTableBodyProps": {
73
+ "location": "import",
74
+ "path": "./model",
75
+ "id": "src/components/table-body/model.ts::DBTableBodyProps",
76
+ "referenceLocation": "DBTableBodyProps"
77
+ }
78
+ }
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "getter": false,
87
+ "setter": false,
88
+ "reflect": false,
89
+ "attribute": "id"
90
+ },
91
+ "className": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "DBTableBodyProps[\"className\"]",
96
+ "resolved": "string",
97
+ "references": {
98
+ "DBTableBodyProps": {
99
+ "location": "import",
100
+ "path": "./model",
101
+ "id": "src/components/table-body/model.ts::DBTableBodyProps",
102
+ "referenceLocation": "DBTableBodyProps"
103
+ }
104
+ }
105
+ },
106
+ "required": false,
107
+ "optional": false,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": ""
111
+ },
112
+ "getter": false,
113
+ "setter": false,
114
+ "reflect": false,
115
+ "attribute": "classname"
116
+ },
117
+ "rows": {
118
+ "type": "unknown",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "DBTableBodyProps[\"rows\"]",
122
+ "resolved": "DBTableRowProps[]",
123
+ "references": {
124
+ "DBTableBodyProps": {
125
+ "location": "import",
126
+ "path": "./model",
127
+ "id": "src/components/table-body/model.ts::DBTableBodyProps",
128
+ "referenceLocation": "DBTableBodyProps"
129
+ }
130
+ }
131
+ },
132
+ "required": false,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "getter": false,
139
+ "setter": false
140
+ }
141
+ };
142
+ }
143
+ static get elementRef() { return "rootElement"; }
144
+ }
@@ -0,0 +1,2 @@
1
+ import { DBTableCaption } from "./table-caption";
2
+ export default DBTableCaption;
@@ -0,0 +1 @@
1
+ export {};