@govtechsg/sgds-web-component 3.0.0-rc.6 → 3.0.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 (382) hide show
  1. package/Masthead/index.js +2 -2
  2. package/README.md +2 -2
  3. package/base/button.js +1 -1
  4. package/base/card-element.d.ts +0 -3
  5. package/base/card-element.js +0 -3
  6. package/base/card-element.js.map +1 -1
  7. package/base/card.js +1 -1
  8. package/base/sgds-element2.js +1 -1
  9. package/components/Accordion/accordion-item.js +1 -1
  10. package/components/Accordion/accordion.js +1 -1
  11. package/components/Accordion/index.umd.js +137 -145
  12. package/components/Accordion/index.umd.js.map +1 -1
  13. package/components/Accordion/sgds-accordion-item.js +1 -5
  14. package/components/Accordion/sgds-accordion-item.js.map +1 -1
  15. package/components/Accordion/sgds-accordion.js +1 -6
  16. package/components/Accordion/sgds-accordion.js.map +1 -1
  17. package/components/Alert/alert.js +1 -1
  18. package/components/Alert/index.umd.js +3 -3
  19. package/components/Badge/badge.js +1 -1
  20. package/components/Badge/index.umd.js +3 -3
  21. package/components/Breadcrumb/breadcrumb-item.js +1 -1
  22. package/components/Breadcrumb/index.umd.js +19 -7
  23. package/components/Breadcrumb/index.umd.js.map +1 -1
  24. package/components/Button/button.js +1 -1
  25. package/components/Button/index.umd.js +3 -3
  26. package/components/Card/card.js +1 -1
  27. package/components/Card/index.umd.js +6 -9
  28. package/components/Card/index.umd.js.map +1 -1
  29. package/components/Card/sgds-card.d.ts +3 -3
  30. package/components/Card/sgds-card.js +3 -3
  31. package/components/Card/sgds-card.js.map +1 -1
  32. package/components/Checkbox/checkbox.js +1 -1
  33. package/components/Checkbox/index.umd.js +3 -3
  34. package/components/ComboBox/combo-box-item2.js +1 -1
  35. package/components/ComboBox/combo-box.js +1 -1
  36. package/components/ComboBox/index.umd.js +14 -9
  37. package/components/ComboBox/index.umd.js.map +1 -1
  38. package/components/ComboBox/sgds-combo-box.d.ts +6 -1
  39. package/components/ComboBox/sgds-combo-box.js +6 -1
  40. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  41. package/components/Datepicker/datepicker-calendar2.js +1 -1
  42. package/components/Datepicker/datepicker.js +1 -1
  43. package/components/Datepicker/index.umd.js +9 -9
  44. package/components/DescriptionList/description-list-group.js +1 -1
  45. package/components/DescriptionList/description-list.js +1 -1
  46. package/components/DescriptionList/index.umd.js +18 -20
  47. package/components/DescriptionList/index.umd.js.map +1 -1
  48. package/components/DescriptionList/sgds-description-list-group.d.ts +1 -1
  49. package/components/DescriptionList/sgds-description-list-group.js +11 -11
  50. package/components/DescriptionList/sgds-description-list-group.js.map +1 -1
  51. package/components/DescriptionList/sgds-description-list.js +4 -6
  52. package/components/DescriptionList/sgds-description-list.js.map +1 -1
  53. package/components/Divider/divider.js +1 -1
  54. package/components/Divider/index.umd.js +2 -2
  55. package/components/Drawer/drawer.js +1 -1
  56. package/components/Drawer/index.umd.js +31 -136
  57. package/components/Drawer/index.umd.js.map +1 -1
  58. package/components/Drawer/sgds-drawer.d.ts +3 -32
  59. package/components/Drawer/sgds-drawer.js +16 -73
  60. package/components/Drawer/sgds-drawer.js.map +1 -1
  61. package/components/Dropdown/dropdown-item.js +1 -1
  62. package/components/Dropdown/dropdown-menu.js +1 -1
  63. package/components/Dropdown/index.umd.js +3 -3
  64. package/components/Dropdown/index.umd.js.map +1 -1
  65. package/components/Dropdown/sgds-dropdown-item.d.ts +2 -1
  66. package/components/Dropdown/sgds-dropdown-item.js.map +1 -1
  67. package/components/FileUpload/file-upload.js +1 -1
  68. package/components/FileUpload/index.umd.js +8 -8
  69. package/components/FileUpload/index.umd.js.map +1 -1
  70. package/components/FileUpload/sgds-file-upload.js +2 -2
  71. package/components/FileUpload/sgds-file-upload.js.map +1 -1
  72. package/components/Footer/footer-item.js +1 -1
  73. package/components/Footer/footer.js +1 -1
  74. package/components/Footer/index.umd.js +3 -3
  75. package/components/Icon/index.umd.js +1 -1
  76. package/components/IconButton/index.umd.js +2 -2
  77. package/components/IconList/index.umd.js +1 -1
  78. package/components/Input/index.umd.js +4 -4
  79. package/components/Input/input.js +1 -1
  80. package/components/Link/index.umd.js +15 -3
  81. package/components/Link/index.umd.js.map +1 -1
  82. package/components/Link/link.js +1 -1
  83. package/components/Link/sgds-link.d.ts +2 -1
  84. package/components/Link/sgds-link.js +13 -1
  85. package/components/Link/sgds-link.js.map +1 -1
  86. package/components/Mainnav/index.umd.js +74 -93
  87. package/components/Mainnav/index.umd.js.map +1 -1
  88. package/components/Mainnav/mainnav-dropdown.js +1 -1
  89. package/components/Mainnav/mainnav-item.js +1 -1
  90. package/components/Mainnav/mainnav.js +1 -1
  91. package/components/Mainnav/sgds-mainnav-dropdown.d.ts +1 -4
  92. package/components/Mainnav/sgds-mainnav-dropdown.js +24 -37
  93. package/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
  94. package/components/Mainnav/sgds-mainnav-item.d.ts +9 -2
  95. package/components/Mainnav/sgds-mainnav-item.js +58 -3
  96. package/components/Mainnav/sgds-mainnav-item.js.map +1 -1
  97. package/components/Mainnav/sgds-mainnav.js +7 -6
  98. package/components/Mainnav/sgds-mainnav.js.map +1 -1
  99. package/components/Masthead/index.umd.js +2 -2
  100. package/components/Masthead/masthead.js +1 -1
  101. package/components/Modal/index.umd.js +3 -3
  102. package/components/Modal/modal.js +1 -1
  103. package/components/Pagination/index.umd.js +4 -4
  104. package/components/Pagination/pagination.js +1 -1
  105. package/components/ProgressBar/index.umd.js +3 -3
  106. package/components/ProgressBar/index.umd.js.map +1 -1
  107. package/components/ProgressBar/progress-bar.js +1 -1
  108. package/components/ProgressBar/sgds-progress-bar.d.ts +1 -1
  109. package/components/ProgressBar/sgds-progress-bar.js +1 -1
  110. package/components/ProgressBar/sgds-progress-bar.js.map +1 -1
  111. package/components/QuantityToggle/index.umd.js +5 -10
  112. package/components/QuantityToggle/index.umd.js.map +1 -1
  113. package/components/QuantityToggle/sgds-quantity-toggle.d.ts +0 -2
  114. package/components/QuantityToggle/sgds-quantity-toggle.js +0 -5
  115. package/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  116. package/components/Radio/index.umd.js +3 -3
  117. package/components/Radio/radio.js +1 -1
  118. package/components/Sidenav/index.umd.js +40 -44
  119. package/components/Sidenav/index.umd.js.map +1 -1
  120. package/components/Sidenav/sgds-sidenav-item.d.ts +14 -16
  121. package/components/Sidenav/sgds-sidenav-item.js +39 -43
  122. package/components/Sidenav/sgds-sidenav-item.js.map +1 -1
  123. package/components/Sidenav/sidenav-item.js +1 -1
  124. package/components/Sidenav/sidenav-link.js +1 -1
  125. package/components/Skeleton/index.umd.js +2 -2
  126. package/components/Skeleton/skeleton.js +1 -1
  127. package/components/Spinner/index.umd.js +2 -2
  128. package/components/Spinner/spinner.js +1 -1
  129. package/components/Stepper/index.umd.js +2 -2
  130. package/components/Stepper/stepper.js +1 -1
  131. package/components/Switch/index.umd.js +2 -2
  132. package/components/Switch/switch.js +1 -1
  133. package/components/Tab/index.umd.js +2 -2
  134. package/components/Tab/tab.js +1 -1
  135. package/components/Table/index.umd.js +63 -205
  136. package/components/Table/index.umd.js.map +1 -1
  137. package/components/Table/sgds-table.d.ts +12 -55
  138. package/components/Table/sgds-table.js +59 -201
  139. package/components/Table/sgds-table.js.map +1 -1
  140. package/components/Table/table.js +1 -1
  141. package/components/TableOfContents/index.d.ts +6 -0
  142. package/components/TableOfContents/index.js +4 -0
  143. package/components/TableOfContents/index.js.map +1 -0
  144. package/components/TableOfContents/index.umd.js +3995 -0
  145. package/components/TableOfContents/index.umd.js.map +1 -0
  146. package/components/TableOfContents/sgds-table-of-contents.d.ts +13 -0
  147. package/components/TableOfContents/sgds-table-of-contents.js +25 -0
  148. package/components/TableOfContents/sgds-table-of-contents.js.map +1 -0
  149. package/components/TableOfContents/table-of-contents.js +6 -0
  150. package/components/TableOfContents/table-of-contents.js.map +1 -0
  151. package/components/Textarea/index.umd.js +3 -3
  152. package/components/Textarea/textarea.js +1 -1
  153. package/components/Toast/index.umd.js +3 -3
  154. package/components/Toast/toast.js +1 -1
  155. package/components/Tooltip/index.umd.js +2 -2
  156. package/components/Tooltip/tooltip.js +1 -1
  157. package/components/index.d.ts +1 -1
  158. package/components/index.js +1 -1
  159. package/components/index.umd.js +2694 -3016
  160. package/components/index.umd.js.map +1 -1
  161. package/css/grid.css +110 -0
  162. package/css/reboot.css +7 -7
  163. package/css/sgds.css +1 -0
  164. package/index.d.ts +1 -1
  165. package/index.js +1 -1
  166. package/index.umd.js +2949 -3271
  167. package/index.umd.js.map +1 -1
  168. package/internals/CloseButton/close-button.js +1 -1
  169. package/internals/OverflowMenu/overflow-menu.js +1 -1
  170. package/package.json +1 -1
  171. package/react/base/button.cjs.js +1 -1
  172. package/react/base/button.js +1 -1
  173. package/react/base/card-element.cjs.js +0 -3
  174. package/react/base/card-element.cjs.js.map +1 -1
  175. package/react/base/card-element.js +0 -3
  176. package/react/base/card-element.js.map +1 -1
  177. package/react/base/card.cjs.js +1 -1
  178. package/react/base/card.js +1 -1
  179. package/react/base/sgds-element.cjs2.js +1 -1
  180. package/react/base/sgds-element2.js +1 -1
  181. package/react/components/Accordion/accordion-item.cjs.js +1 -1
  182. package/react/components/Accordion/accordion-item.js +1 -1
  183. package/react/components/Accordion/accordion.cjs.js +1 -1
  184. package/react/components/Accordion/accordion.js +1 -1
  185. package/react/components/Accordion/sgds-accordion-item.cjs.js +1 -5
  186. package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
  187. package/react/components/Accordion/sgds-accordion-item.js +1 -5
  188. package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
  189. package/react/components/Accordion/sgds-accordion.cjs.js +1 -6
  190. package/react/components/Accordion/sgds-accordion.cjs.js.map +1 -1
  191. package/react/components/Accordion/sgds-accordion.js +1 -6
  192. package/react/components/Accordion/sgds-accordion.js.map +1 -1
  193. package/react/components/Alert/alert.cjs.js +1 -1
  194. package/react/components/Alert/alert.js +1 -1
  195. package/react/components/Badge/badge.cjs.js +1 -1
  196. package/react/components/Badge/badge.js +1 -1
  197. package/react/components/Breadcrumb/breadcrumb-item.cjs.js +1 -1
  198. package/react/components/Breadcrumb/breadcrumb-item.js +1 -1
  199. package/react/components/Button/button.cjs.js +1 -1
  200. package/react/components/Button/button.js +1 -1
  201. package/react/components/Card/card.cjs.js +1 -1
  202. package/react/components/Card/card.js +1 -1
  203. package/react/components/Card/sgds-card.cjs.js +3 -3
  204. package/react/components/Card/sgds-card.cjs.js.map +1 -1
  205. package/react/components/Card/sgds-card.js +3 -3
  206. package/react/components/Card/sgds-card.js.map +1 -1
  207. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  208. package/react/components/Checkbox/checkbox.js +1 -1
  209. package/react/components/ComboBox/combo-box-item.cjs2.js +1 -1
  210. package/react/components/ComboBox/combo-box-item2.js +1 -1
  211. package/react/components/ComboBox/combo-box.cjs.js +1 -1
  212. package/react/components/ComboBox/combo-box.js +1 -1
  213. package/react/components/ComboBox/sgds-combo-box.cjs.js +6 -1
  214. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  215. package/react/components/ComboBox/sgds-combo-box.js +6 -1
  216. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  217. package/react/components/Datepicker/datepicker-calendar.cjs2.js +1 -1
  218. package/react/components/Datepicker/datepicker-calendar2.js +1 -1
  219. package/react/components/Datepicker/datepicker.cjs.js +1 -1
  220. package/react/components/Datepicker/datepicker.js +1 -1
  221. package/react/components/DescriptionList/description-list-group.cjs.js +1 -1
  222. package/react/components/DescriptionList/description-list-group.js +1 -1
  223. package/react/components/DescriptionList/description-list.cjs.js +1 -1
  224. package/react/components/DescriptionList/description-list.js +1 -1
  225. package/react/components/DescriptionList/sgds-description-list-group.cjs.js +11 -11
  226. package/react/components/DescriptionList/sgds-description-list-group.cjs.js.map +1 -1
  227. package/react/components/DescriptionList/sgds-description-list-group.js +11 -11
  228. package/react/components/DescriptionList/sgds-description-list-group.js.map +1 -1
  229. package/react/components/DescriptionList/sgds-description-list.cjs.js +4 -6
  230. package/react/components/DescriptionList/sgds-description-list.cjs.js.map +1 -1
  231. package/react/components/DescriptionList/sgds-description-list.js +4 -6
  232. package/react/components/DescriptionList/sgds-description-list.js.map +1 -1
  233. package/react/components/Divider/divider.cjs.js +1 -1
  234. package/react/components/Divider/divider.js +1 -1
  235. package/react/components/Drawer/drawer.cjs.js +1 -1
  236. package/react/components/Drawer/drawer.js +1 -1
  237. package/react/components/Drawer/sgds-drawer.cjs.js +15 -72
  238. package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
  239. package/react/components/Drawer/sgds-drawer.js +16 -73
  240. package/react/components/Drawer/sgds-drawer.js.map +1 -1
  241. package/react/components/Dropdown/dropdown-item.cjs.js +1 -1
  242. package/react/components/Dropdown/dropdown-item.js +1 -1
  243. package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
  244. package/react/components/Dropdown/dropdown-menu.js +1 -1
  245. package/react/components/Dropdown/sgds-dropdown-item.cjs.js.map +1 -1
  246. package/react/components/Dropdown/sgds-dropdown-item.js.map +1 -1
  247. package/react/components/FileUpload/file-upload.cjs.js +1 -1
  248. package/react/components/FileUpload/file-upload.js +1 -1
  249. package/react/components/FileUpload/sgds-file-upload.cjs.js +2 -2
  250. package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
  251. package/react/components/FileUpload/sgds-file-upload.js +2 -2
  252. package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
  253. package/react/components/Footer/footer-item.cjs.js +1 -1
  254. package/react/components/Footer/footer-item.js +1 -1
  255. package/react/components/Footer/footer.cjs.js +1 -1
  256. package/react/components/Footer/footer.js +1 -1
  257. package/react/components/Input/input.cjs.js +1 -1
  258. package/react/components/Input/input.js +1 -1
  259. package/react/components/Link/link.cjs.js +1 -1
  260. package/react/components/Link/link.js +1 -1
  261. package/react/components/Link/sgds-link.cjs.js +13 -1
  262. package/react/components/Link/sgds-link.cjs.js.map +1 -1
  263. package/react/components/Link/sgds-link.js +13 -1
  264. package/react/components/Link/sgds-link.js.map +1 -1
  265. package/react/components/Mainnav/mainnav-dropdown.cjs.js +1 -1
  266. package/react/components/Mainnav/mainnav-dropdown.js +1 -1
  267. package/react/components/Mainnav/mainnav-item.cjs.js +1 -1
  268. package/react/components/Mainnav/mainnav-item.js +1 -1
  269. package/react/components/Mainnav/mainnav.cjs.js +1 -1
  270. package/react/components/Mainnav/mainnav.js +1 -1
  271. package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js +23 -36
  272. package/react/components/Mainnav/sgds-mainnav-dropdown.cjs.js.map +1 -1
  273. package/react/components/Mainnav/sgds-mainnav-dropdown.js +24 -37
  274. package/react/components/Mainnav/sgds-mainnav-dropdown.js.map +1 -1
  275. package/react/components/Mainnav/sgds-mainnav-item.cjs.js +58 -3
  276. package/react/components/Mainnav/sgds-mainnav-item.cjs.js.map +1 -1
  277. package/react/components/Mainnav/sgds-mainnav-item.js +58 -3
  278. package/react/components/Mainnav/sgds-mainnav-item.js.map +1 -1
  279. package/react/components/Mainnav/sgds-mainnav.cjs.js +7 -6
  280. package/react/components/Mainnav/sgds-mainnav.cjs.js.map +1 -1
  281. package/react/components/Mainnav/sgds-mainnav.js +7 -6
  282. package/react/components/Mainnav/sgds-mainnav.js.map +1 -1
  283. package/react/components/Masthead/masthead.cjs.js +1 -1
  284. package/react/components/Masthead/masthead.js +1 -1
  285. package/react/components/Modal/modal.cjs.js +1 -1
  286. package/react/components/Modal/modal.js +1 -1
  287. package/react/components/Pagination/pagination.cjs.js +1 -1
  288. package/react/components/Pagination/pagination.js +1 -1
  289. package/react/components/ProgressBar/progress-bar.cjs.js +1 -1
  290. package/react/components/ProgressBar/progress-bar.js +1 -1
  291. package/react/components/ProgressBar/sgds-progress-bar.cjs.js +1 -1
  292. package/react/components/ProgressBar/sgds-progress-bar.cjs.js.map +1 -1
  293. package/react/components/ProgressBar/sgds-progress-bar.js +1 -1
  294. package/react/components/ProgressBar/sgds-progress-bar.js.map +1 -1
  295. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js +0 -5
  296. package/react/components/QuantityToggle/sgds-quantity-toggle.cjs.js.map +1 -1
  297. package/react/components/QuantityToggle/sgds-quantity-toggle.js +0 -5
  298. package/react/components/QuantityToggle/sgds-quantity-toggle.js.map +1 -1
  299. package/react/components/Radio/radio.cjs.js +1 -1
  300. package/react/components/Radio/radio.js +1 -1
  301. package/react/components/Sidenav/sgds-sidenav-item.cjs.js +37 -41
  302. package/react/components/Sidenav/sgds-sidenav-item.cjs.js.map +1 -1
  303. package/react/components/Sidenav/sgds-sidenav-item.js +39 -43
  304. package/react/components/Sidenav/sgds-sidenav-item.js.map +1 -1
  305. package/react/components/Sidenav/sidenav-item.cjs.js +1 -1
  306. package/react/components/Sidenav/sidenav-item.js +1 -1
  307. package/react/components/Sidenav/sidenav-link.cjs.js +1 -1
  308. package/react/components/Sidenav/sidenav-link.js +1 -1
  309. package/react/components/Skeleton/skeleton.cjs.js +1 -1
  310. package/react/components/Skeleton/skeleton.js +1 -1
  311. package/react/components/Spinner/spinner.cjs.js +1 -1
  312. package/react/components/Spinner/spinner.js +1 -1
  313. package/react/components/Stepper/stepper.cjs.js +1 -1
  314. package/react/components/Stepper/stepper.js +1 -1
  315. package/react/components/Switch/switch.cjs.js +1 -1
  316. package/react/components/Switch/switch.js +1 -1
  317. package/react/components/Tab/tab.cjs.js +1 -1
  318. package/react/components/Tab/tab.js +1 -1
  319. package/react/components/Table/sgds-table.cjs.js +59 -201
  320. package/react/components/Table/sgds-table.cjs.js.map +1 -1
  321. package/react/components/Table/sgds-table.js +59 -201
  322. package/react/components/Table/sgds-table.js.map +1 -1
  323. package/react/components/Table/table.cjs.js +1 -1
  324. package/react/components/Table/table.js +1 -1
  325. package/react/components/TableOfContents/sgds-table-of-contents.cjs.js +31 -0
  326. package/react/components/TableOfContents/sgds-table-of-contents.cjs.js.map +1 -0
  327. package/react/components/TableOfContents/sgds-table-of-contents.js +26 -0
  328. package/react/components/TableOfContents/sgds-table-of-contents.js.map +1 -0
  329. package/react/components/TableOfContents/table-of-contents.cjs.js +11 -0
  330. package/react/components/TableOfContents/table-of-contents.cjs.js.map +1 -0
  331. package/react/components/TableOfContents/table-of-contents.js +7 -0
  332. package/react/components/TableOfContents/table-of-contents.js.map +1 -0
  333. package/react/components/Textarea/textarea.cjs.js +1 -1
  334. package/react/components/Textarea/textarea.js +1 -1
  335. package/react/components/Toast/toast.cjs.js +1 -1
  336. package/react/components/Toast/toast.js +1 -1
  337. package/react/components/Tooltip/tooltip.cjs.js +1 -1
  338. package/react/components/Tooltip/tooltip.js +1 -1
  339. package/react/index.cjs.js +94 -94
  340. package/react/index.d.ts +1 -1
  341. package/react/index.js +1 -1
  342. package/react/internals/CloseButton/close-button.cjs.js +1 -1
  343. package/react/internals/CloseButton/close-button.js +1 -1
  344. package/react/internals/OverflowMenu/overflow-menu.cjs.js +1 -1
  345. package/react/internals/OverflowMenu/overflow-menu.js +1 -1
  346. package/react/styles/feedback.cjs.js +1 -1
  347. package/react/styles/feedback.js +1 -1
  348. package/react/{action-card → table-of-contents}/index.cjs.js +5 -7
  349. package/react/table-of-contents/index.cjs.js.map +1 -0
  350. package/react/{action-card → table-of-contents}/index.js +5 -7
  351. package/react/table-of-contents/index.js.map +1 -0
  352. package/styles/feedback.js +1 -1
  353. package/themes/day.css +112 -104
  354. package/themes/night.css +117 -109
  355. package/themes/root.css +92 -85
  356. package/base/link-element.js +0 -55
  357. package/base/link-element.js.map +0 -1
  358. package/components/ActionCard/action-card.js +0 -6
  359. package/components/ActionCard/action-card.js.map +0 -1
  360. package/components/ActionCard/index.d.ts +0 -6
  361. package/components/ActionCard/index.js +0 -5
  362. package/components/ActionCard/index.js.map +0 -1
  363. package/components/ActionCard/index.umd.js +0 -5860
  364. package/components/ActionCard/index.umd.js.map +0 -1
  365. package/components/ActionCard/sgds-action-card.d.ts +0 -54
  366. package/components/ActionCard/sgds-action-card.js +0 -148
  367. package/components/ActionCard/sgds-action-card.js.map +0 -1
  368. package/react/action-card/index.cjs.js.map +0 -1
  369. package/react/action-card/index.js.map +0 -1
  370. package/react/base/link-element.cjs.js +0 -60
  371. package/react/base/link-element.cjs.js.map +0 -1
  372. package/react/base/link-element.js +0 -56
  373. package/react/base/link-element.js.map +0 -1
  374. package/react/components/ActionCard/action-card.cjs.js +0 -11
  375. package/react/components/ActionCard/action-card.cjs.js.map +0 -1
  376. package/react/components/ActionCard/action-card.js +0 -7
  377. package/react/components/ActionCard/action-card.js.map +0 -1
  378. package/react/components/ActionCard/sgds-action-card.cjs.js +0 -154
  379. package/react/components/ActionCard/sgds-action-card.cjs.js.map +0 -1
  380. package/react/components/ActionCard/sgds-action-card.js +0 -149
  381. package/react/components/ActionCard/sgds-action-card.js.map +0 -1
  382. /package/react/{action-card → table-of-contents}/index.d.ts +0 -0
@@ -1,77 +1,34 @@
1
1
  import SgdsElement from "../../base/sgds-element";
2
+ export type HeaderPosition = "horizontal" | "vertical" | "both";
2
3
  /**
3
4
  * @summary The use of a table is to organise a collections of data into readable rows
4
- *
5
- * @cssproperty --table-bg - Table's background color
6
- * @cssproperty --table-accent-bg - Table's accent background color
7
- * @cssproperty --table-striped-color - Text color for striped table
8
- * @cssproperty --table-striped-bg - Background color for striped table
9
- * @cssproperty --table-active-color - Active text color for hovered row
10
- * @cssproperty --table-active-bg - Active background color for hovered row
11
- * @cssproperty --table-hover-color - Hovered text color for hover table
12
- * @cssproperty --table-hover-bg - Hovered background color for hover table
13
5
  */
14
6
  export declare class SgdsTable extends SgdsElement {
15
7
  static styles: import("lit").CSSResult[];
16
- /**
17
- * Adds zebra-striping using striped to table row within the <tbody>
18
- */
19
- striped: boolean;
20
- /**
21
- * Add borders to all sides of table and cells
22
- */
23
- bordered: boolean;
24
- /**
25
- * Remove all borders to table and cells
26
- */
27
- borderless: boolean;
28
- /**
29
- * Add hoverable state on table rows
30
- */
31
- hover: boolean;
32
- /**
33
- * Add <code>.table-sm</code> to make table more compact
34
- */
35
- size: string;
36
- /**
37
- * Use contextual classes to add colors to table
38
- */
39
- variant: string;
40
- /**
41
- * Sorting on a column is enabled by adding the sort property. The sorting algorithm is based on javascript array.sort() method. In ascending order from bottom, alphabets come first, followed by numbers, and then symbols. Similarly, in descending order from bottom, symbols come first, followed by numbers, and then alphabets.
42
- */
43
- sort: boolean;
44
- /**
45
- * When removableSort is present, the third click removes the sorting from the column.
46
- */
47
- removableSort: boolean;
48
8
  /**
49
9
  * Use responsive="sm", responsive="md" , responsive="lg", or responsive="xl" as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally. Use reponsive="always" to let table be always responsive
50
10
  */
51
11
  responsive: "sm" | "md" | "lg" | "xl" | "always";
52
12
  /**
53
- * Populate header cells using Arrays
13
+ * Populate row header cells using Arrays
54
14
  */
55
- tableHeaders: string[];
15
+ rowHeader: string[];
16
+ /**
17
+ * Populate column header cells using Arrays only when <code>headerPosition="vertical"</code> or <code>headerPosition="both"</code>
18
+ */
19
+ columnHeader: string[];
56
20
  /**
57
21
  * Populate data cells using Arrays
58
22
  */
59
23
  tableData: Array<(string | number)[]>;
60
- /** @internal */
61
- sortColumn: number | null;
62
- /** @internal */
63
- sortAsc: boolean;
64
- /** @internal */
65
- activeColumn: number | null;
66
- /** @internal */
67
- sortClickCount: number;
68
- /** @internal */
69
- clickCount: number;
24
+ /**
25
+ * Defines the placement of headers in the table (horizontal, vertical, or both)
26
+ */
27
+ headerPosition: HeaderPosition;
70
28
  /** @internal */
71
29
  originalTableData: Array<(string | number)[]>;
72
30
  connectedCallback(): void;
73
- handleHeaderClick(columnIndex: number): void;
74
- getIcon(columnIndex: number): import("lit-html").TemplateResult<1>;
31
+ private _renderTable;
75
32
  render(): import("lit-html").TemplateResult<1>;
76
33
  }
77
34
  export default SgdsTable;
@@ -7,62 +7,26 @@ import css_248z from './table.js';
7
7
 
8
8
  /**
9
9
  * @summary The use of a table is to organise a collections of data into readable rows
10
- *
11
- * @cssproperty --table-bg - Table's background color
12
- * @cssproperty --table-accent-bg - Table's accent background color
13
- * @cssproperty --table-striped-color - Text color for striped table
14
- * @cssproperty --table-striped-bg - Background color for striped table
15
- * @cssproperty --table-active-color - Active text color for hovered row
16
- * @cssproperty --table-active-bg - Active background color for hovered row
17
- * @cssproperty --table-hover-color - Hovered text color for hover table
18
- * @cssproperty --table-hover-bg - Hovered background color for hover table
19
10
  */
20
11
  class SgdsTable extends SgdsElement {
21
12
  constructor() {
22
13
  super(...arguments);
23
14
  /**
24
- * Adds zebra-striping using striped to table row within the <tbody>
15
+ * Populate row header cells using Arrays
25
16
  */
26
- this.striped = false;
17
+ this.rowHeader = [];
27
18
  /**
28
- * Add borders to all sides of table and cells
19
+ * Populate column header cells using Arrays only when <code>headerPosition="vertical"</code> or <code>headerPosition="both"</code>
29
20
  */
30
- this.bordered = false;
31
- /**
32
- * Remove all borders to table and cells
33
- */
34
- this.borderless = false;
35
- /**
36
- * Add hoverable state on table rows
37
- */
38
- this.hover = false;
39
- /**
40
- * Sorting on a column is enabled by adding the sort property. The sorting algorithm is based on javascript array.sort() method. In ascending order from bottom, alphabets come first, followed by numbers, and then symbols. Similarly, in descending order from bottom, symbols come first, followed by numbers, and then alphabets.
41
- */
42
- this.sort = false;
43
- /**
44
- * When removableSort is present, the third click removes the sorting from the column.
45
- */
46
- this.removableSort = false;
47
- /**
48
- * Populate header cells using Arrays
49
- */
50
- this.tableHeaders = [];
21
+ this.columnHeader = [];
51
22
  /**
52
23
  * Populate data cells using Arrays
53
24
  */
54
25
  this.tableData = [];
55
- /** @internal */
56
- this.sortColumn = null;
57
- /** @internal */
58
- this.sortAsc = true;
59
- //TODO aria-sort
60
- /** @internal */
61
- this.activeColumn = null;
62
- /** @internal */
63
- this.sortClickCount = 0;
64
- /** @internal */
65
- this.clickCount = 0;
26
+ /**
27
+ * Defines the placement of headers in the table (horizontal, vertical, or both)
28
+ */
29
+ this.headerPosition = "horizontal";
66
30
  /** @internal */
67
31
  this.originalTableData = [];
68
32
  }
@@ -70,93 +34,51 @@ class SgdsTable extends SgdsElement {
70
34
  super.connectedCallback();
71
35
  this.originalTableData = [...this.tableData];
72
36
  }
73
- handleHeaderClick(columnIndex) {
74
- var _a;
75
- if (this.sort) {
76
- if (this.sortColumn === columnIndex) {
77
- this.sortAsc = !this.sortAsc;
78
- }
79
- else {
80
- this.sortColumn = columnIndex;
81
- this.sortAsc = true;
82
- }
83
- this.tableData = [...this.tableData].sort((a, b) => {
84
- const aValue = a[columnIndex];
85
- const bValue = b[columnIndex];
86
- if (typeof aValue === "string" && typeof bValue === "string") {
87
- return this.sortAsc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue);
88
- }
89
- else {
90
- return this.sortAsc ? aValue - bValue : bValue - aValue;
91
- }
92
- });
93
- // update the active column
94
- if (this.activeColumn === columnIndex) {
95
- this.clickCount++;
96
- if (this.clickCount === 3 && this.removableSort) {
97
- this.activeColumn = null;
98
- this.clickCount = 0;
99
- this.tableData = [...this.originalTableData];
100
- }
101
- }
102
- else {
103
- this.activeColumn = columnIndex;
104
- this.clickCount = 1;
105
- }
106
- // add the .active class to the clicked header cell
107
- const thElements = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("th");
108
- thElements.forEach((thElement, index) => {
109
- if (index === columnIndex) {
110
- thElement.classList.add("active");
111
- }
112
- else {
113
- thElement.classList.remove("active");
114
- }
115
- });
37
+ _renderTable() {
38
+ if (this.headerPosition === "horizontal") {
39
+ return html `
40
+ <thead>
41
+ <tr>
42
+ ${this.rowHeader.map((header, index) => html ` <th>${header}</th> `)}
43
+ </tr>
44
+ </thead>
45
+ <tbody>
46
+ ${this.tableData.map(row => html `
47
+ <tr>
48
+ ${row.map((cell) => html `<td>${cell}</td>`)}
49
+ </tr>
50
+ `)}
51
+ </tbody>
52
+ `;
116
53
  }
117
- }
118
- getIcon(columnIndex) {
119
- if (this.activeColumn !== columnIndex) {
120
- return html `<svg
121
- xmlns="http://www.w3.org/2000/svg"
122
- width="16"
123
- height="16"
124
- fill="currentColor"
125
- class="bi bi-arrow-down-up ms-2 align-self-center"
126
- viewBox="0 0 16 16"
127
- >
128
- <path
129
- fill-rule="evenodd"
130
- d="M11.5 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L11 2.707V14.5a.5.5 0 0 0 .5.5zm-7-14a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L4 13.293V1.5a.5.5 0 0 1 .5-.5z"
131
- />
132
- </svg>`;
54
+ if (this.headerPosition === "both") {
55
+ return html `
56
+ <thead>
57
+ <tr>
58
+ <th></th>
59
+ ${this.rowHeader.map((header, index) => html ` <th>${header}</th> `)}
60
+ </tr>
61
+ </thead>
62
+ <tbody>
63
+ ${this.tableData.map((row, index) => html `
64
+ <tr>
65
+ <th>${this.columnHeader[index]}</th>
66
+ ${row.map((cell) => html `<td>${cell}</td>`)}
67
+ </tr>
68
+ `)}
69
+ </tbody>
70
+ `;
133
71
  }
134
- else {
135
- return this.sortAsc
136
- ? html `<svg
137
- xmlns="http://www.w3.org/2000/svg"
138
- width="16"
139
- height="16"
140
- fill="currentColor"
141
- class="bi bi-sort-up-alt ms-2 align-self-center"
142
- viewBox="0 0 16 16"
143
- >
144
- <path
145
- d="M3.5 13.5a.5.5 0 0 1-1 0V4.707L1.354 5.854a.5.5 0 1 1-.708-.708l2-1.999.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L3.5 4.707V13.5zm4-9.5a.5.5 0 0 1 0-1h1a.5.5 0 0 1 0 1h-1zm0 3a.5.5 0 0 1 0-1h3a.5.5 0 0 1 0 1h-3zm0 3a.5.5 0 0 1 0-1h5a.5.5 0 0 1 0 1h-5zM7 12.5a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 0-1h-7a.5.5 0 0 0-.5.5z"
146
- />
147
- </svg>`
148
- : html `<svg
149
- xmlns="http://www.w3.org/2000/svg"
150
- width="16"
151
- height="16"
152
- fill="currentColor"
153
- class="bi bi-sort-down ms-2 align-self-center"
154
- viewBox="0 0 16 16"
155
- >
156
- <path
157
- d="M3.5 2.5a.5.5 0 0 0-1 0v8.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L3.5 11.293V2.5zm3.5 1a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z"
158
- />
159
- </svg>`;
72
+ if (this.headerPosition === "vertical") {
73
+ const flippedTableData = this.tableData[0].map((_, colIndex) => this.tableData.map(row => row[colIndex]));
74
+ return html `
75
+ ${flippedTableData.map((row, index) => html `
76
+ <tr>
77
+ <th>${this.columnHeader[index]}</th>
78
+ ${row.map((cell) => html `<td>${cell}</td>`)}
79
+ </tr>
80
+ `)}
81
+ `;
160
82
  }
161
83
  }
162
84
  render() {
@@ -171,93 +93,29 @@ class SgdsTable extends SgdsElement {
171
93
  })}
172
94
  tabindex="0"
173
95
  >
174
- <table
175
- class="table sgds ${classMap({
176
- [`table-striped`]: this.striped,
177
- [`table-bordered`]: this.bordered,
178
- [`table-borderless`]: this.borderless,
179
- [`table-hover`]: this.hover,
180
- [`table-${this.size}`]: this.size,
181
- [`table-${this.variant}`]: this.variant
182
- })}"
183
- >
184
- <thead>
185
- <tr>
186
- ${this.tableHeaders.map((header, index) => html `
187
- <th
188
- class="${classMap({
189
- "sortable-header": this.sort,
190
- active: this.activeColumn === index
191
- })}"
192
- @click=${() => this.handleHeaderClick(index)}
193
- //TODO aria-sort
194
- >
195
- ${header} ${this.sort ? this.getIcon(index) : null}
196
- </th>
197
- `)}
198
- </tr>
199
- </thead>
200
- <tbody>
201
- ${this.tableData.map(row => html `
202
- <tr>
203
- ${row.map((cell) => html `<td>${cell}</td>`)}
204
- </tr>
205
- `)}
206
- </tbody>
96
+ <table class="table">
97
+ ${this._renderTable()}
207
98
  </table>
208
99
  </div>
209
100
  `;
210
101
  }
211
102
  }
212
103
  SgdsTable.styles = [...SgdsElement.styles, css_248z];
213
- __decorate([
214
- property({ type: Boolean, reflect: true })
215
- ], SgdsTable.prototype, "striped", void 0);
216
- __decorate([
217
- property({ type: Boolean, reflect: true })
218
- ], SgdsTable.prototype, "bordered", void 0);
219
- __decorate([
220
- property({ type: Boolean, reflect: true })
221
- ], SgdsTable.prototype, "borderless", void 0);
222
- __decorate([
223
- property({ type: Boolean, reflect: true })
224
- ], SgdsTable.prototype, "hover", void 0);
225
- __decorate([
226
- property({ type: String, reflect: true })
227
- ], SgdsTable.prototype, "size", void 0);
228
- __decorate([
229
- property({ type: String, reflect: true })
230
- ], SgdsTable.prototype, "variant", void 0);
231
- __decorate([
232
- property({ type: Boolean, reflect: true })
233
- ], SgdsTable.prototype, "sort", void 0);
234
- __decorate([
235
- property({ type: Boolean, reflect: true })
236
- ], SgdsTable.prototype, "removableSort", void 0);
237
104
  __decorate([
238
105
  property({ type: String, reflect: true })
239
106
  ], SgdsTable.prototype, "responsive", void 0);
240
107
  __decorate([
241
108
  property({ type: Array })
242
- ], SgdsTable.prototype, "tableHeaders", void 0);
109
+ ], SgdsTable.prototype, "rowHeader", void 0);
243
110
  __decorate([
244
111
  property({ type: Array })
245
- ], SgdsTable.prototype, "tableData", void 0);
112
+ ], SgdsTable.prototype, "columnHeader", void 0);
246
113
  __decorate([
247
- state()
248
- ], SgdsTable.prototype, "sortColumn", void 0);
249
- __decorate([
250
- state()
251
- ], SgdsTable.prototype, "sortAsc", void 0);
252
- __decorate([
253
- state()
254
- ], SgdsTable.prototype, "activeColumn", void 0);
255
- __decorate([
256
- state()
257
- ], SgdsTable.prototype, "sortClickCount", void 0);
114
+ property({ type: Array })
115
+ ], SgdsTable.prototype, "tableData", void 0);
258
116
  __decorate([
259
- state()
260
- ], SgdsTable.prototype, "clickCount", void 0);
117
+ property({ type: String, reflect: true })
118
+ ], SgdsTable.prototype, "headerPosition", void 0);
261
119
  __decorate([
262
120
  state()
263
121
  ], SgdsTable.prototype, "originalTableData", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"sgds-table.js","sources":["../../../src/components/Table/sgds-table.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport tableStyle from \"./table.css\";\n/**\n * @summary The use of a table is to organise a collections of data into readable rows\n *\n * @cssproperty --table-bg - Table's background color\n * @cssproperty --table-accent-bg - Table's accent background color\n * @cssproperty --table-striped-color - Text color for striped table\n * @cssproperty --table-striped-bg - Background color for striped table\n * @cssproperty --table-active-color - Active text color for hovered row\n * @cssproperty --table-active-bg - Active background color for hovered row\n * @cssproperty --table-hover-color - Hovered text color for hover table\n * @cssproperty --table-hover-bg - Hovered background color for hover table\n */\n\nexport class SgdsTable extends SgdsElement {\n static styles = [...SgdsElement.styles, tableStyle];\n\n /**\n * Adds zebra-striping using striped to table row within the <tbody>\n */\n @property({ type: Boolean, reflect: true }) striped = false;\n\n /**\n * Add borders to all sides of table and cells\n */\n @property({ type: Boolean, reflect: true }) bordered = false;\n\n /**\n * Remove all borders to table and cells\n */\n @property({ type: Boolean, reflect: true }) borderless = false;\n\n /**\n * Add hoverable state on table rows\n */\n @property({ type: Boolean, reflect: true }) hover = false;\n\n /**\n * Add <code>.table-sm</code> to make table more compact\n */\n @property({ type: String, reflect: true }) size: string;\n\n /**\n * Use contextual classes to add colors to table\n */\n @property({ type: String, reflect: true }) variant: string;\n\n /**\n * Sorting on a column is enabled by adding the sort property. The sorting algorithm is based on javascript array.sort() method. In ascending order from bottom, alphabets come first, followed by numbers, and then symbols. Similarly, in descending order from bottom, symbols come first, followed by numbers, and then alphabets.\n */\n @property({ type: Boolean, reflect: true }) sort = false;\n\n /**\n * When removableSort is present, the third click removes the sorting from the column.\n */\n @property({ type: Boolean, reflect: true }) removableSort = false;\n\n /**\n * Use responsive=\"sm\", responsive=\"md\" , responsive=\"lg\", or responsive=\"xl\" as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally. Use reponsive=\"always\" to let table be always responsive\n */\n @property({ type: String, reflect: true }) responsive: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"always\";\n\n /**\n * Populate header cells using Arrays\n */\n @property({ type: Array }) tableHeaders: string[] = [];\n\n /**\n * Populate data cells using Arrays\n */\n @property({ type: Array }) tableData: Array<(string | number)[]> = [];\n\n /** @internal */\n @state() sortColumn: number | null = null;\n\n /** @internal */\n @state() sortAsc = true;\n\n //TODO aria-sort\n\n /** @internal */\n @state() activeColumn: number | null = null;\n\n /** @internal */\n @state() sortClickCount = 0;\n\n /** @internal */\n @state() clickCount = 0;\n\n /** @internal */\n @state() originalTableData: Array<(string | number)[]> = [];\n\n connectedCallback() {\n super.connectedCallback();\n this.originalTableData = [...this.tableData];\n }\n\n handleHeaderClick(columnIndex: number) {\n if (this.sort) {\n if (this.sortColumn === columnIndex) {\n this.sortAsc = !this.sortAsc;\n } else {\n this.sortColumn = columnIndex;\n this.sortAsc = true;\n }\n\n this.tableData = [...this.tableData].sort((a, b) => {\n const aValue = a[columnIndex];\n const bValue = b[columnIndex];\n\n if (typeof aValue === \"string\" && typeof bValue === \"string\") {\n return this.sortAsc ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue);\n } else {\n return this.sortAsc ? (aValue as number) - (bValue as number) : (bValue as number) - (aValue as number);\n }\n });\n\n // update the active column\n if (this.activeColumn === columnIndex) {\n this.clickCount++;\n if (this.clickCount === 3 && this.removableSort) {\n this.activeColumn = null;\n this.clickCount = 0;\n this.tableData = [...this.originalTableData];\n }\n } else {\n this.activeColumn = columnIndex;\n this.clickCount = 1;\n }\n\n // add the .active class to the clicked header cell\n const thElements = this.shadowRoot?.querySelectorAll(\"th\");\n thElements.forEach((thElement, index) => {\n if (index === columnIndex) {\n thElement.classList.add(\"active\");\n } else {\n thElement.classList.remove(\"active\");\n }\n });\n }\n }\n\n getIcon(columnIndex: number) {\n if (this.activeColumn !== columnIndex) {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-arrow-down-up ms-2 align-self-center\"\n viewBox=\"0 0 16 16\"\n >\n <path\n fill-rule=\"evenodd\"\n d=\"M11.5 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L11 2.707V14.5a.5.5 0 0 0 .5.5zm-7-14a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L4 13.293V1.5a.5.5 0 0 1 .5-.5z\"\n />\n </svg>`;\n } else {\n return this.sortAsc\n ? html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-sort-up-alt ms-2 align-self-center\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M3.5 13.5a.5.5 0 0 1-1 0V4.707L1.354 5.854a.5.5 0 1 1-.708-.708l2-1.999.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L3.5 4.707V13.5zm4-9.5a.5.5 0 0 1 0-1h1a.5.5 0 0 1 0 1h-1zm0 3a.5.5 0 0 1 0-1h3a.5.5 0 0 1 0 1h-3zm0 3a.5.5 0 0 1 0-1h5a.5.5 0 0 1 0 1h-5zM7 12.5a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 0-1h-7a.5.5 0 0 0-.5.5z\"\n />\n </svg>`\n : html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n fill=\"currentColor\"\n class=\"bi bi-sort-down ms-2 align-self-center\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M3.5 2.5a.5.5 0 0 0-1 0v8.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L3.5 11.293V2.5zm3.5 1a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z\"\n />\n </svg>`;\n }\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n \"table-responsive\": this.responsive === \"always\",\n \"table-responsive-sm\": this.responsive === \"sm\",\n \"table-responsive-md\": this.responsive === \"md\",\n \"table-responsive-lg\": this.responsive === \"lg\",\n \"table-responsive-xl\": this.responsive === \"xl\"\n })}\n tabindex=\"0\"\n >\n <table\n class=\"table sgds ${classMap({\n [`table-striped`]: this.striped,\n [`table-bordered`]: this.bordered,\n [`table-borderless`]: this.borderless,\n [`table-hover`]: this.hover,\n [`table-${this.size}`]: this.size,\n [`table-${this.variant}`]: this.variant\n })}\"\n >\n <thead>\n <tr>\n ${this.tableHeaders.map(\n (header: string, index: number) => html`\n <th\n class=\"${classMap({\n \"sortable-header\": this.sort,\n active: this.activeColumn === index\n })}\"\n @click=${() => this.handleHeaderClick(index)}\n //TODO aria-sort \n >\n ${header} ${this.sort ? this.getIcon(index) : null}\n </th>\n `\n )}\n </tr>\n </thead>\n <tbody>\n ${this.tableData.map(\n row => html`\n <tr>\n ${row.map((cell: string) => html`<td>${cell}</td>`)}\n </tr>\n `\n )}\n </tbody>\n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CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"sgds-table.js","sources":["../../../src/components/Table/sgds-table.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport SgdsElement from \"../../base/sgds-element\";\nimport tableStyle from \"./table.css\";\n\nexport type HeaderPosition = \"horizontal\" | \"vertical\" | \"both\";\n\n/**\n * @summary The use of a table is to organise a collections of data into readable rows\n */\n\nexport class SgdsTable extends SgdsElement {\n static styles = [...SgdsElement.styles, tableStyle];\n\n /**\n * Use responsive=\"sm\", responsive=\"md\" , responsive=\"lg\", or responsive=\"xl\" as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally. Use reponsive=\"always\" to let table be always responsive\n */\n @property({ type: String, reflect: true }) responsive: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"always\";\n\n /**\n * Populate row header cells using Arrays\n */\n @property({ type: Array }) rowHeader: string[] = [];\n\n /**\n * Populate column header cells using Arrays only when <code>headerPosition=\"vertical\"</code> or <code>headerPosition=\"both\"</code>\n */\n @property({ type: Array }) columnHeader: string[] = [];\n\n /**\n * Populate data cells using Arrays\n */\n @property({ type: Array }) tableData: Array<(string | number)[]> = [];\n\n /**\n * Defines the placement of headers in the table (horizontal, vertical, or both)\n */\n @property({ type: String, reflect: true }) headerPosition: HeaderPosition = \"horizontal\";\n\n /** @internal */\n @state() originalTableData: Array<(string | number)[]> = [];\n\n connectedCallback() {\n super.connectedCallback();\n this.originalTableData = [...this.tableData];\n }\n\n private _renderTable() {\n if (this.headerPosition === \"horizontal\") {\n return html`\n <thead>\n <tr>\n ${this.rowHeader.map((header: string, index: number) => html` <th>${header}</th> `)}\n </tr>\n </thead>\n <tbody>\n ${this.tableData.map(\n row => html`\n <tr>\n ${row.map((cell: string) => html`<td>${cell}</td>`)}\n </tr>\n `\n )}\n </tbody>\n `;\n }\n\n if (this.headerPosition === \"both\") {\n return html`\n <thead>\n <tr>\n <th></th>\n ${this.rowHeader.map((header: string, index: number) => html` <th>${header}</th> `)}\n </tr>\n </thead>\n <tbody>\n ${this.tableData.map(\n (row, index) => html`\n <tr>\n <th>${this.columnHeader[index]}</th>\n ${row.map((cell: string) => html`<td>${cell}</td>`)}\n </tr>\n `\n )}\n </tbody>\n `;\n }\n\n if (this.headerPosition === \"vertical\") {\n const flippedTableData = this.tableData[0].map((_, colIndex) => this.tableData.map(row => row[colIndex]));\n\n return html`\n ${flippedTableData.map(\n (row, index) => html`\n <tr>\n <th>${this.columnHeader[index]}</th>\n ${row.map((cell: string) => html`<td>${cell}</td>`)}\n </tr>\n `\n )}\n `;\n }\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n \"table-responsive\": this.responsive === \"always\",\n \"table-responsive-sm\": this.responsive === \"sm\",\n \"table-responsive-md\": this.responsive === \"md\",\n \"table-responsive-lg\": this.responsive === \"lg\",\n \"table-responsive-xl\": this.responsive === \"xl\"\n })}\n tabindex=\"0\"\n >\n <table class=\"table\">\n ${this._renderTable()}\n </table>\n </div>\n `;\n }\n}\n\nexport default SgdsTable;\n"],"names":["tableStyle"],"mappings":";;;;;;;AAQA;;AAEG;AAEG,MAAO,SAAU,SAAQ,WAAW,CAAA;AAA1C,IAAA,WAAA,GAAA;;AAQE;;AAEG;QACwB,IAAS,CAAA,SAAA,GAAa,EAAE,CAAC;AAEpD;;AAEG;QACwB,IAAY,CAAA,YAAA,GAAa,EAAE,CAAC;AAEvD;;AAEG;QACwB,IAAS,CAAA,SAAA,GAA+B,EAAE,CAAC;AAEtE;;AAEG;QACwC,IAAc,CAAA,cAAA,GAAmB,YAAY,CAAC;;QAGhF,IAAiB,CAAA,iBAAA,GAA+B,EAAE,CAAC;KAkF7D;IAhFC,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,iBAAiB,GAAG,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E,KAAK,EAAE,CAAC;AAA0B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAKzB,UAAA,CAAA;AAA1B,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAA6B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,cAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK5B,UAAA,CAAA;AAA1B,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAA4C,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAK3B,UAAA,CAAA;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAA+C,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGhF,UAAA,CAAA;AAAR,IAAA,KAAK,EAAE;AAAoD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,KAAA,CAAA,CAAA;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
2
 
3
- var css_248z = css`:host{--table-bg:transparent;--table-accent-bg:transparent;--table-striped-color:var(--sgds-gray-600);--table-striped-bg:rgba(0,0,0,.05);--table-active-color:var(--sgds-gray-600);--table-active-bg:rgba(0,0,0,.1);--table-hover-color:var(--sgds-gray-600);--table-hover-bg:rgba(0,0,0,.075)}tbody,td,th,thead,tr{border:0 solid;border-color:inherit}th{text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{--sgds-table-color-type:initial;--sgds-table-bg-type:initial;--sgds-table-color-state:initial;--sgds-table-bg-state:initial;--sgds-table-color:var(--sgds-emphasis-color);--sgds-table-bg:var(--table-bg);--sgds-table-border-color:var(--sgds-border-color);--sgds-table-accent-bg:var(--table-accent-bg);--sgds-table-striped-color:var(--table-striped-color);--sgds-table-striped-bg:var(--table-striped-bg);--sgds-table-active-color:var(--table-striped-color);--sgds-table-active-bg:rgba(0,0,0,.1);--sgds-table-hover-color:var(--table-striped-color);--sgds-table-hover-bg:rgba(0,0,0,.075);border-color:var(--sgds-table-border-color);margin-bottom:1rem;vertical-align:top;width:100%}.table>:not(caption)>*>*{background-color:var(--sgds-table-bg);border-bottom-width:var(--sgds-border-width);box-shadow:inset 0 0 0 9999px var(--sgds-table-bg-state,var(--sgds-table-bg-type,var(--sgds-table-accent-bg)));color:var(--sgds-table-color-state,var(--sgds-table-color-type,var(--sgds-table-color)));padding:1rem}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table-group-divider{border-top:calc(var(--sgds-border-width)*2) solid}.table-sm>:not(caption)>*>*{padding:.5rem}.table-bordered>:not(caption)>*{border-width:var(--sgds-border-width) 0}.table-bordered>:not(caption)>*>*{border-width:0 var(--sgds-border-width)}.table-borderless>:not(caption)>*>*{border-bottom-width:0}.table>:not(:first-child){border-top:2px solid}.table-borderless>:not(:first-child){border-top-width:0}.table-striped-columns>:not(caption)>tr>:nth-child(2n),.table-striped>tbody>tr:nth-of-type(odd)>*{--sgds-table-color-type:var(--sgds-table-striped-color);--sgds-table-bg-type:var(--sgds-table-striped-bg)}.table-active{--sgds-table-color-state:var(--sgds-table-active-color);--sgds-table-bg-state:var(--sgds-table-active-bg)}.table-hover>tbody>tr:hover>*{--sgds-table-color-state:var(--sgds-table-hover-color);--sgds-table-bg-state:var(--sgds-table-hover-bg)}.table-light{--sgds-table-color:#000;--sgds-table-bg:#b1b1b1;--sgds-table-border-color:#9f9f9f;--sgds-table-striped-bg:#a8a8a8;--sgds-table-striped-color:#000;--sgds-table-active-bg:#9f9f9f;--sgds-table-active-color:#000;--sgds-table-hover-bg:#a4a4a4;--sgds-table-hover-color:#000}.table-dark,.table-light{border-color:var(--sgds-table-border-color);color:var(--sgds-table-color)}.table-dark{--sgds-table-color:#fff;--sgds-table-bg:#252525;--sgds-table-border-color:#3b3b3b;--sgds-table-striped-bg:#303030;--sgds-table-striped-color:#fff;--sgds-table-active-bg:#3b3b3b;--sgds-table-active-color:#fff;--sgds-table-hover-bg:#353535;--sgds-table-hover-color:#fff}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}.sgds.table{font-size:1rem}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}@media (min-width:576px){.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}}@media (min-width:768px){.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}}@media (min-width:992px){.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}}@media (min-width:1200px){.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}}@media (min-width:1400px){.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}}@media print{.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}}.sortable-header{cursor:pointer}`;
3
+ var css_248z = css`tbody,td,th,thead,tr{border:var(--sgds-border-width-0) solid;border-color:inherit}th{text-align:-webkit-match-parent}table{border-collapse:collapse;caption-side:bottom}.table{border-color:var(--sgds-border-color-default);vertical-align:top;width:100%}.table>:not(caption) td,.table>:not(caption) th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-muted);padding:var(--sgds-padding-lg)}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.table>thead th{border-bottom:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-group-divider{border-top:calc(var(--sgds-border-width)*2) solid}.table>:not(:first-child){border-top:var(--sgds-border-width-1) solid var(--sgds-border-color-emphasis)}.table-responsive{-webkit-overflow-scrolling:touch;overflow-x:auto}@media (max-width:575.98px){.table-responsive-sm{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:767.98px){.table-responsive-md{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:991.98px){.table-responsive-lg{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1199.98px){.table-responsive-xl{-webkit-overflow-scrolling:touch;overflow-x:auto}}@media (max-width:1399.98px){.table-responsive-xxl{-webkit-overflow-scrolling:touch;overflow-x:auto}}`;
4
4
 
5
5
  export { css_248z as default };
6
6
  //# sourceMappingURL=table.js.map
@@ -0,0 +1,6 @@
1
+ import { SgdsTableOfContents } from "./sgds-table-of-contents";
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ "sgds-table-of-contents": SgdsTableOfContents;
5
+ }
6
+ }
@@ -0,0 +1,4 @@
1
+ import { SgdsTableOfContents } from './sgds-table-of-contents.js';
2
+
3
+ customElements.define("sgds-table-of-contents", SgdsTableOfContents);
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TableOfContents/index.ts"],"sourcesContent":["import { SgdsTableOfContents } from \"./sgds-table-of-contents\";\n\ncustomElements.define(\"sgds-table-of-contents\", SgdsTableOfContents);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"sgds-table-of-contents\": SgdsTableOfContents;\n }\n}\n"],"names":[],"mappings":";;AAEA,cAAc,CAAC,MAAM,CAAC,wBAAwB,EAAE,mBAAmB,CAAC"}