@dnb/eufemia 9.39.1 → 9.41.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 (356) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/cjs/components/accordion/style/_accordion.scss +2 -2
  3. package/cjs/components/accordion/style/dnb-accordion.css +3 -3
  4. package/cjs/components/accordion/style/dnb-accordion.min.css +1 -1
  5. package/cjs/components/autocomplete/style/dnb-autocomplete.css +3 -14
  6. package/cjs/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
  7. package/cjs/components/checkbox/style/dnb-checkbox.css +0 -7
  8. package/cjs/components/checkbox/style/dnb-checkbox.min.css +1 -1
  9. package/cjs/components/date-picker/style/dnb-date-picker.css +3 -35
  10. package/cjs/components/date-picker/style/dnb-date-picker.min.css +2 -2
  11. package/cjs/components/dialog/Dialog.d.ts +1 -1
  12. package/cjs/components/dialog/parts/DialogAction.d.ts +5 -4
  13. package/cjs/components/dialog/parts/DialogAction.js +23 -4
  14. package/cjs/components/dialog/style/_dialog.scss +7 -30
  15. package/cjs/components/dialog/style/dnb-dialog.css +21 -44
  16. package/cjs/components/dialog/style/dnb-dialog.min.css +1 -1
  17. package/cjs/components/dialog/style/themes/dnb-dialog-theme-ui.css +20 -0
  18. package/cjs/components/dialog/style/themes/dnb-dialog-theme-ui.min.css +1 -1
  19. package/cjs/components/dialog/style/themes/dnb-dialog-theme-ui.scss +29 -0
  20. package/cjs/components/drawer/style/_drawer.scss +1 -0
  21. package/cjs/components/drawer/style/dnb-drawer.css +12 -22
  22. package/cjs/components/drawer/style/dnb-drawer.min.css +1 -1
  23. package/cjs/components/drawer/types.d.ts +5 -5
  24. package/cjs/components/dropdown/style/dnb-dropdown.css +0 -7
  25. package/cjs/components/dropdown/style/dnb-dropdown.min.css +1 -1
  26. package/cjs/components/form-label/FormLabel.js +1 -1
  27. package/cjs/components/form-label/style/_form-label.scss +0 -13
  28. package/cjs/components/form-label/style/dnb-form-label.css +0 -7
  29. package/cjs/components/form-label/style/dnb-form-label.min.css +1 -1
  30. package/cjs/components/form-row/style/dnb-form-row.css +0 -7
  31. package/cjs/components/form-row/style/dnb-form-row.min.css +1 -1
  32. package/cjs/components/input/style/_input.scss +4 -0
  33. package/cjs/components/input/style/dnb-input.css +3 -7
  34. package/cjs/components/input/style/dnb-input.min.css +1 -1
  35. package/cjs/components/input-masked/style/dnb-input-masked.css +3 -7
  36. package/cjs/components/input-masked/style/dnb-input-masked.min.css +1 -1
  37. package/cjs/components/lib.d.ts +1 -1
  38. package/cjs/components/modal/Modal.d.ts +2 -2
  39. package/cjs/components/modal/style/dnb-modal.css +11 -22
  40. package/cjs/components/modal/style/dnb-modal.min.css +1 -1
  41. package/cjs/components/number-format/NumberFormat.js +1 -1
  42. package/cjs/components/number-format/NumberUtils.d.ts +3 -0
  43. package/cjs/components/radio/style/dnb-radio.css +0 -7
  44. package/cjs/components/radio/style/dnb-radio.min.css +1 -1
  45. package/cjs/components/slider/style/dnb-slider.css +0 -7
  46. package/cjs/components/slider/style/dnb-slider.min.css +1 -1
  47. package/cjs/components/switch/style/dnb-switch.css +0 -7
  48. package/cjs/components/switch/style/dnb-switch.min.css +1 -1
  49. package/cjs/components/table/Table.d.ts +2 -0
  50. package/cjs/components/table/Table.js +14 -50
  51. package/cjs/components/table/TableAccordion.d.ts +10 -0
  52. package/cjs/components/table/TableAccordion.js +265 -0
  53. package/cjs/components/table/TableAccordionContent.d.ts +18 -0
  54. package/cjs/components/table/TableAccordionContent.js +126 -0
  55. package/cjs/components/table/TableContainer.js +3 -2
  56. package/cjs/components/table/TableScrollView.js +2 -1
  57. package/cjs/components/table/TableStickyHeader.d.ts +4 -1
  58. package/cjs/components/table/TableStickyHeader.js +112 -83
  59. package/cjs/components/table/TableTd.d.ts +6 -1
  60. package/cjs/components/table/TableTd.js +5 -1
  61. package/cjs/components/table/TableTh.d.ts +4 -4
  62. package/cjs/components/table/TableTh.js +6 -1
  63. package/cjs/components/table/TableTr.d.ts +27 -0
  64. package/cjs/components/table/TableTr.js +95 -18
  65. package/cjs/components/table/style/_table-accordion.scss +280 -0
  66. package/cjs/components/table/style/_table-cell.scss +4 -4
  67. package/cjs/components/table/style/_table-container.scss +7 -17
  68. package/cjs/components/table/style/_table-deprecated.scss +74 -0
  69. package/cjs/components/table/style/_table-header-buttons.scss +2 -1
  70. package/cjs/components/table/style/_table-sticky.scss +24 -23
  71. package/cjs/components/table/style/_table-td.scss +46 -38
  72. package/cjs/components/table/style/_table-th.scss +44 -0
  73. package/cjs/components/table/style/_table-tr.scss +8 -2
  74. package/cjs/components/table/style/_table.scss +21 -77
  75. package/cjs/components/table/style/dnb-table.css +538 -271
  76. package/cjs/components/table/style/dnb-table.min.css +11 -2
  77. package/cjs/components/table/style/themes/dnb-table-theme-ui.css +82 -63
  78. package/cjs/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
  79. package/cjs/components/table/style/themes/dnb-table-theme-ui.scss +49 -16
  80. package/cjs/components/textarea/style/dnb-textarea.css +0 -7
  81. package/cjs/components/textarea/style/dnb-textarea.min.css +1 -1
  82. package/cjs/components/toggle-button/style/dnb-toggle-button.css +0 -21
  83. package/cjs/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
  84. package/cjs/components/visually-hidden/VisuallyHidden.d.ts +2 -11
  85. package/cjs/components/visually-hidden/VisuallyHidden.js +2 -5
  86. package/cjs/components/visually-hidden/style/_visually-hidden.scss +0 -8
  87. package/cjs/components/visually-hidden/style/dnb-visually-hidden.css +10 -42
  88. package/cjs/components/visually-hidden/style/dnb-visually-hidden.min.css +1 -1
  89. package/cjs/elements/Element.d.ts +1 -1
  90. package/cjs/fragments/lib.d.ts +4 -7
  91. package/cjs/fragments/scroll-view/ScrollView.d.ts +12 -11
  92. package/cjs/fragments/scroll-view/ScrollView.js +8 -5
  93. package/cjs/fragments/scroll-view/style/_scroll-view.scss +8 -0
  94. package/cjs/shared/Eufemia.js +1 -1
  95. package/cjs/shared/helpers.js +7 -1
  96. package/cjs/shared/locales/en-GB.d.ts +4 -0
  97. package/cjs/shared/locales/en-GB.js +4 -0
  98. package/cjs/shared/locales/en-US.d.ts +4 -0
  99. package/cjs/shared/locales/index.d.ts +8 -0
  100. package/cjs/shared/locales/nb-NO.d.ts +4 -0
  101. package/cjs/shared/locales/nb-NO.js +4 -0
  102. package/cjs/style/core/helper-classes/helper-classes.scss +3 -0
  103. package/cjs/style/core/utilities.scss +15 -16
  104. package/cjs/style/dnb-ui-basis.css +20 -13
  105. package/cjs/style/dnb-ui-basis.min.css +1 -1
  106. package/cjs/style/dnb-ui-components.css +599 -365
  107. package/cjs/style/dnb-ui-components.min.css +13 -4
  108. package/cjs/style/dnb-ui-core.css +20 -13
  109. package/cjs/style/dnb-ui-core.min.css +1 -1
  110. package/cjs/style/dnb-ui-fragments.css +14 -0
  111. package/cjs/style/dnb-ui-fragments.min.css +1 -1
  112. package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.css +102 -63
  113. package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
  114. package/cjs/style/themes/theme-ui/dnb-theme-ui.css +102 -63
  115. package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
  116. package/components/accordion/style/_accordion.scss +2 -2
  117. package/components/accordion/style/dnb-accordion.css +3 -3
  118. package/components/accordion/style/dnb-accordion.min.css +1 -1
  119. package/components/autocomplete/style/dnb-autocomplete.css +3 -14
  120. package/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
  121. package/components/checkbox/style/dnb-checkbox.css +0 -7
  122. package/components/checkbox/style/dnb-checkbox.min.css +1 -1
  123. package/components/date-picker/style/dnb-date-picker.css +3 -35
  124. package/components/date-picker/style/dnb-date-picker.min.css +2 -2
  125. package/components/dialog/Dialog.d.ts +1 -1
  126. package/components/dialog/parts/DialogAction.d.ts +5 -4
  127. package/components/dialog/parts/DialogAction.js +19 -11
  128. package/components/dialog/style/_dialog.scss +7 -30
  129. package/components/dialog/style/dnb-dialog.css +21 -44
  130. package/components/dialog/style/dnb-dialog.min.css +1 -1
  131. package/components/dialog/style/themes/dnb-dialog-theme-ui.css +20 -0
  132. package/components/dialog/style/themes/dnb-dialog-theme-ui.min.css +1 -1
  133. package/components/dialog/style/themes/dnb-dialog-theme-ui.scss +29 -0
  134. package/components/drawer/style/_drawer.scss +1 -0
  135. package/components/drawer/style/dnb-drawer.css +12 -22
  136. package/components/drawer/style/dnb-drawer.min.css +1 -1
  137. package/components/drawer/types.d.ts +5 -5
  138. package/components/dropdown/style/dnb-dropdown.css +0 -7
  139. package/components/dropdown/style/dnb-dropdown.min.css +1 -1
  140. package/components/form-label/FormLabel.js +1 -1
  141. package/components/form-label/style/_form-label.scss +0 -13
  142. package/components/form-label/style/dnb-form-label.css +0 -7
  143. package/components/form-label/style/dnb-form-label.min.css +1 -1
  144. package/components/form-row/style/dnb-form-row.css +0 -7
  145. package/components/form-row/style/dnb-form-row.min.css +1 -1
  146. package/components/input/style/_input.scss +4 -0
  147. package/components/input/style/dnb-input.css +3 -7
  148. package/components/input/style/dnb-input.min.css +1 -1
  149. package/components/input-masked/style/dnb-input-masked.css +3 -7
  150. package/components/input-masked/style/dnb-input-masked.min.css +1 -1
  151. package/components/lib.d.ts +1 -1
  152. package/components/modal/Modal.d.ts +2 -2
  153. package/components/modal/style/dnb-modal.css +11 -22
  154. package/components/modal/style/dnb-modal.min.css +1 -1
  155. package/components/number-format/NumberFormat.js +1 -1
  156. package/components/number-format/NumberUtils.d.ts +3 -0
  157. package/components/radio/style/dnb-radio.css +0 -7
  158. package/components/radio/style/dnb-radio.min.css +1 -1
  159. package/components/slider/style/dnb-slider.css +0 -7
  160. package/components/slider/style/dnb-slider.min.css +1 -1
  161. package/components/switch/style/dnb-switch.css +0 -7
  162. package/components/switch/style/dnb-switch.min.css +1 -1
  163. package/components/table/Table.d.ts +2 -0
  164. package/components/table/Table.js +12 -20
  165. package/components/table/TableAccordion.d.ts +10 -0
  166. package/components/table/TableAccordion.js +192 -0
  167. package/components/table/TableAccordionContent.d.ts +18 -0
  168. package/components/table/TableAccordionContent.js +63 -0
  169. package/components/table/TableContainer.js +2 -1
  170. package/components/table/TableScrollView.js +2 -1
  171. package/components/table/TableStickyHeader.d.ts +4 -1
  172. package/components/table/TableStickyHeader.js +112 -51
  173. package/components/table/TableTd.d.ts +6 -1
  174. package/components/table/TableTd.js +3 -1
  175. package/components/table/TableTh.d.ts +4 -4
  176. package/components/table/TableTh.js +6 -1
  177. package/components/table/TableTr.d.ts +27 -0
  178. package/components/table/TableTr.js +59 -16
  179. package/components/table/style/_table-accordion.scss +280 -0
  180. package/components/table/style/_table-cell.scss +4 -4
  181. package/components/table/style/_table-container.scss +7 -17
  182. package/components/table/style/_table-deprecated.scss +74 -0
  183. package/components/table/style/_table-header-buttons.scss +2 -1
  184. package/components/table/style/_table-sticky.scss +24 -23
  185. package/components/table/style/_table-td.scss +46 -38
  186. package/components/table/style/_table-th.scss +44 -0
  187. package/components/table/style/_table-tr.scss +8 -2
  188. package/components/table/style/_table.scss +21 -77
  189. package/components/table/style/dnb-table.css +538 -271
  190. package/components/table/style/dnb-table.min.css +11 -2
  191. package/components/table/style/themes/dnb-table-theme-ui.css +82 -63
  192. package/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
  193. package/components/table/style/themes/dnb-table-theme-ui.scss +49 -16
  194. package/components/textarea/style/dnb-textarea.css +0 -7
  195. package/components/textarea/style/dnb-textarea.min.css +1 -1
  196. package/components/toggle-button/style/dnb-toggle-button.css +0 -21
  197. package/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
  198. package/components/visually-hidden/VisuallyHidden.d.ts +2 -11
  199. package/components/visually-hidden/VisuallyHidden.js +2 -5
  200. package/components/visually-hidden/style/_visually-hidden.scss +0 -8
  201. package/components/visually-hidden/style/dnb-visually-hidden.css +10 -42
  202. package/components/visually-hidden/style/dnb-visually-hidden.min.css +1 -1
  203. package/elements/Element.d.ts +1 -1
  204. package/es/components/accordion/style/_accordion.scss +2 -2
  205. package/es/components/accordion/style/dnb-accordion.css +3 -3
  206. package/es/components/accordion/style/dnb-accordion.min.css +1 -1
  207. package/es/components/autocomplete/style/dnb-autocomplete.css +3 -14
  208. package/es/components/autocomplete/style/dnb-autocomplete.min.css +2 -2
  209. package/es/components/checkbox/style/dnb-checkbox.css +0 -7
  210. package/es/components/checkbox/style/dnb-checkbox.min.css +1 -1
  211. package/es/components/date-picker/style/dnb-date-picker.css +3 -35
  212. package/es/components/date-picker/style/dnb-date-picker.min.css +2 -2
  213. package/es/components/dialog/Dialog.d.ts +1 -1
  214. package/es/components/dialog/parts/DialogAction.d.ts +5 -4
  215. package/es/components/dialog/parts/DialogAction.js +21 -11
  216. package/es/components/dialog/style/_dialog.scss +7 -30
  217. package/es/components/dialog/style/dnb-dialog.css +21 -44
  218. package/es/components/dialog/style/dnb-dialog.min.css +1 -1
  219. package/es/components/dialog/style/themes/dnb-dialog-theme-ui.css +20 -0
  220. package/es/components/dialog/style/themes/dnb-dialog-theme-ui.min.css +1 -1
  221. package/es/components/dialog/style/themes/dnb-dialog-theme-ui.scss +29 -0
  222. package/es/components/drawer/style/_drawer.scss +1 -0
  223. package/es/components/drawer/style/dnb-drawer.css +12 -22
  224. package/es/components/drawer/style/dnb-drawer.min.css +1 -1
  225. package/es/components/drawer/types.d.ts +5 -5
  226. package/es/components/dropdown/style/dnb-dropdown.css +0 -7
  227. package/es/components/dropdown/style/dnb-dropdown.min.css +1 -1
  228. package/es/components/form-label/FormLabel.js +1 -1
  229. package/es/components/form-label/style/_form-label.scss +0 -13
  230. package/es/components/form-label/style/dnb-form-label.css +0 -7
  231. package/es/components/form-label/style/dnb-form-label.min.css +1 -1
  232. package/es/components/form-row/style/dnb-form-row.css +0 -7
  233. package/es/components/form-row/style/dnb-form-row.min.css +1 -1
  234. package/es/components/input/style/_input.scss +4 -0
  235. package/es/components/input/style/dnb-input.css +3 -7
  236. package/es/components/input/style/dnb-input.min.css +1 -1
  237. package/es/components/input-masked/style/dnb-input-masked.css +3 -7
  238. package/es/components/input-masked/style/dnb-input-masked.min.css +1 -1
  239. package/es/components/lib.d.ts +1 -1
  240. package/es/components/modal/Modal.d.ts +2 -2
  241. package/es/components/modal/style/dnb-modal.css +11 -22
  242. package/es/components/modal/style/dnb-modal.min.css +1 -1
  243. package/es/components/number-format/NumberFormat.js +1 -1
  244. package/es/components/number-format/NumberUtils.d.ts +3 -0
  245. package/es/components/radio/style/dnb-radio.css +0 -7
  246. package/es/components/radio/style/dnb-radio.min.css +1 -1
  247. package/es/components/slider/style/dnb-slider.css +0 -7
  248. package/es/components/slider/style/dnb-slider.min.css +1 -1
  249. package/es/components/switch/style/dnb-switch.css +0 -7
  250. package/es/components/switch/style/dnb-switch.min.css +1 -1
  251. package/es/components/table/Table.d.ts +2 -0
  252. package/es/components/table/Table.js +13 -14
  253. package/es/components/table/TableAccordion.d.ts +10 -0
  254. package/es/components/table/TableAccordion.js +175 -0
  255. package/es/components/table/TableAccordionContent.d.ts +18 -0
  256. package/es/components/table/TableAccordionContent.js +54 -0
  257. package/es/components/table/TableContainer.js +2 -1
  258. package/es/components/table/TableScrollView.js +2 -1
  259. package/es/components/table/TableStickyHeader.d.ts +4 -1
  260. package/es/components/table/TableStickyHeader.js +112 -48
  261. package/es/components/table/TableTd.d.ts +6 -1
  262. package/es/components/table/TableTd.js +3 -1
  263. package/es/components/table/TableTh.d.ts +4 -4
  264. package/es/components/table/TableTh.js +6 -1
  265. package/es/components/table/TableTr.d.ts +27 -0
  266. package/es/components/table/TableTr.js +51 -15
  267. package/es/components/table/style/_table-accordion.scss +280 -0
  268. package/es/components/table/style/_table-cell.scss +4 -4
  269. package/es/components/table/style/_table-container.scss +7 -17
  270. package/es/components/table/style/_table-deprecated.scss +74 -0
  271. package/es/components/table/style/_table-header-buttons.scss +2 -1
  272. package/es/components/table/style/_table-sticky.scss +24 -23
  273. package/es/components/table/style/_table-td.scss +46 -38
  274. package/es/components/table/style/_table-th.scss +44 -0
  275. package/es/components/table/style/_table-tr.scss +8 -2
  276. package/es/components/table/style/_table.scss +21 -77
  277. package/es/components/table/style/dnb-table.css +538 -271
  278. package/es/components/table/style/dnb-table.min.css +11 -2
  279. package/es/components/table/style/themes/dnb-table-theme-ui.css +82 -63
  280. package/es/components/table/style/themes/dnb-table-theme-ui.min.css +1 -1
  281. package/es/components/table/style/themes/dnb-table-theme-ui.scss +49 -16
  282. package/es/components/textarea/style/dnb-textarea.css +0 -7
  283. package/es/components/textarea/style/dnb-textarea.min.css +1 -1
  284. package/es/components/toggle-button/style/dnb-toggle-button.css +0 -21
  285. package/es/components/toggle-button/style/dnb-toggle-button.min.css +1 -1
  286. package/es/components/visually-hidden/VisuallyHidden.d.ts +2 -11
  287. package/es/components/visually-hidden/VisuallyHidden.js +2 -5
  288. package/es/components/visually-hidden/style/_visually-hidden.scss +0 -8
  289. package/es/components/visually-hidden/style/dnb-visually-hidden.css +10 -42
  290. package/es/components/visually-hidden/style/dnb-visually-hidden.min.css +1 -1
  291. package/es/elements/Element.d.ts +1 -1
  292. package/es/fragments/lib.d.ts +4 -7
  293. package/es/fragments/scroll-view/ScrollView.d.ts +12 -11
  294. package/es/fragments/scroll-view/ScrollView.js +7 -3
  295. package/es/fragments/scroll-view/style/_scroll-view.scss +8 -0
  296. package/es/shared/Eufemia.js +1 -1
  297. package/es/shared/helpers.js +7 -1
  298. package/es/shared/locales/en-GB.d.ts +4 -0
  299. package/es/shared/locales/en-GB.js +4 -0
  300. package/es/shared/locales/en-US.d.ts +4 -0
  301. package/es/shared/locales/index.d.ts +8 -0
  302. package/es/shared/locales/nb-NO.d.ts +4 -0
  303. package/es/shared/locales/nb-NO.js +4 -0
  304. package/es/style/core/helper-classes/helper-classes.scss +3 -0
  305. package/es/style/core/utilities.scss +15 -16
  306. package/es/style/dnb-ui-basis.css +20 -13
  307. package/es/style/dnb-ui-basis.min.css +1 -1
  308. package/es/style/dnb-ui-components.css +599 -365
  309. package/es/style/dnb-ui-components.min.css +13 -4
  310. package/es/style/dnb-ui-core.css +20 -13
  311. package/es/style/dnb-ui-core.min.css +1 -1
  312. package/es/style/dnb-ui-fragments.css +14 -0
  313. package/es/style/dnb-ui-fragments.min.css +1 -1
  314. package/es/style/themes/theme-eiendom/dnb-theme-eiendom.css +102 -63
  315. package/es/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
  316. package/es/style/themes/theme-ui/dnb-theme-ui.css +102 -63
  317. package/es/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
  318. package/esm/dnb-ui-basis.min.mjs +2 -2
  319. package/esm/dnb-ui-components.min.mjs +4 -4
  320. package/esm/dnb-ui-elements.min.mjs +4 -4
  321. package/esm/dnb-ui-extensions.min.mjs +4 -4
  322. package/esm/dnb-ui-lib.min.mjs +4 -4
  323. package/esm/dnb-ui-web-components.min.mjs +4 -4
  324. package/fragments/lib.d.ts +4 -7
  325. package/fragments/scroll-view/ScrollView.d.ts +12 -11
  326. package/fragments/scroll-view/ScrollView.js +8 -4
  327. package/fragments/scroll-view/style/_scroll-view.scss +8 -0
  328. package/package.json +2 -2
  329. package/shared/Eufemia.js +1 -1
  330. package/shared/helpers.js +7 -1
  331. package/shared/locales/en-GB.d.ts +4 -0
  332. package/shared/locales/en-GB.js +4 -0
  333. package/shared/locales/en-US.d.ts +4 -0
  334. package/shared/locales/index.d.ts +8 -0
  335. package/shared/locales/nb-NO.d.ts +4 -0
  336. package/shared/locales/nb-NO.js +4 -0
  337. package/style/core/helper-classes/helper-classes.scss +3 -0
  338. package/style/core/utilities.scss +15 -16
  339. package/style/dnb-ui-basis.css +20 -13
  340. package/style/dnb-ui-basis.min.css +1 -1
  341. package/style/dnb-ui-components.css +599 -365
  342. package/style/dnb-ui-components.min.css +13 -4
  343. package/style/dnb-ui-core.css +20 -13
  344. package/style/dnb-ui-core.min.css +1 -1
  345. package/style/dnb-ui-fragments.css +14 -0
  346. package/style/dnb-ui-fragments.min.css +1 -1
  347. package/style/themes/theme-eiendom/dnb-theme-eiendom.css +102 -63
  348. package/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
  349. package/style/themes/theme-ui/dnb-theme-ui.css +102 -63
  350. package/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
  351. package/umd/dnb-ui-basis.min.js +3 -3
  352. package/umd/dnb-ui-components.min.js +5 -5
  353. package/umd/dnb-ui-elements.min.js +4 -4
  354. package/umd/dnb-ui-extensions.min.js +5 -5
  355. package/umd/dnb-ui-lib.min.js +5 -5
  356. package/umd/dnb-ui-web-components.min.js +5 -5
@@ -4,17 +4,17 @@ import TableHelpButton from './TableHelpButton';
4
4
  export declare type TableThChildren = React.ReactNode | ReturnType<typeof TableSortButton> | ReturnType<typeof TableHelpButton>;
5
5
  export declare type TableThProps = {
6
6
  /**
7
- * Defines the table header as sortable
7
+ * Defines the table header as sortable (ascending)
8
8
  * Default: false
9
9
  */
10
10
  sortable?: boolean;
11
11
  /**
12
- * Defines the sortable column as the current active
12
+ * Defines the sortable column as the current active (ascending)
13
13
  * Default: false
14
14
  */
15
15
  active?: boolean;
16
16
  /**
17
- * Defines the sortable column as in reversed order
17
+ * Defines the sortable column as in reversed order (descending)
18
18
  * Default: false
19
19
  */
20
20
  reversed?: boolean;
@@ -26,7 +26,7 @@ export declare type TableThProps = {
26
26
  /**
27
27
  * The content of the table header given as Tr.
28
28
  */
29
- children: TableThChildren | Array<TableThChildren>;
29
+ children?: TableThChildren | Array<TableThChildren>;
30
30
  };
31
31
  declare function Th(componentProps: TableThProps & React.ThHTMLAttributes<HTMLTableCellElement>): JSX.Element;
32
32
  declare namespace Th {
@@ -15,8 +15,13 @@ export default function Th(componentProps) {
15
15
  noWrap = componentProps.noWrap,
16
16
  props = _objectWithoutProperties(componentProps, _excluded);
17
17
 
18
+ var role = props.scope === 'row' ? 'rowheader' : 'columnheader';
19
+ var scope = props.scope === 'row' ? 'row' : 'col';
20
+ var ariaSort = sortable ? reversed ? 'descending' : 'ascending' : undefined;
18
21
  return React.createElement("th", _extends({
19
- role: "columnheader",
22
+ role: role,
23
+ scope: scope,
24
+ "aria-sort": ariaSort,
20
25
  className: classnames('dnb-table__th', className, sortable && 'dnb-table--sortable', active && 'dnb-table--active', reversed && 'dnb-table--reversed', noWrap && 'dnb-table--no-wrap')
21
26
  }, props), children);
22
27
  }
@@ -10,9 +10,36 @@ export declare type TableTrProps = {
10
10
  * Default: false
11
11
  */
12
12
  noWrap?: boolean;
13
+ /**
14
+ * Set true to render the tr initially as expanded
15
+ * Default: false
16
+ */
17
+ expanded?: boolean;
18
+ /**
19
+ * Set true to disable the tr to be accessible as an interactive element
20
+ * Default: false
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * Set to true to skip animation
25
+ * Default: false
26
+ */
27
+ noAnimation?: boolean;
13
28
  /**
14
29
  * The content of the component.
15
30
  */
16
31
  children: React.ReactElement<TableTdProps> | Array<React.ReactElement<TableTdProps>>;
17
32
  };
18
33
  export default function Tr(componentProps: TableTrProps & React.TableHTMLAttributes<HTMLTableRowElement>): JSX.Element;
34
+ /**
35
+ * Handle odd/even on re-render and React.StrictMode
36
+ */
37
+ export declare function useHandleOddEven({ children }: {
38
+ children: any;
39
+ }): {
40
+ trCountRef: React.MutableRefObject<{
41
+ count: number;
42
+ }>;
43
+ rerenderAlias: {};
44
+ setRerenderAlias: React.Dispatch<React.SetStateAction<{}>>;
45
+ };
@@ -1,12 +1,17 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["variant", "noWrap", "children", "className"];
4
+ var _excluded = ["variant", "noWrap", "expanded", "disabled", "noAnimation", "children", "className"];
4
5
  import React from 'react';
5
6
  import classnames from 'classnames';
7
+ import { useTableAccordion } from './TableAccordion';
6
8
  import TableContext from './TableContext';
7
9
  export default function Tr(componentProps) {
8
10
  var variant = componentProps.variant,
9
11
  noWrap = componentProps.noWrap,
12
+ expanded = componentProps.expanded,
13
+ disabled = componentProps.disabled,
14
+ noAnimation = componentProps.noAnimation,
10
15
  children = componentProps.children,
11
16
  _className = componentProps.className,
12
17
  props = _objectWithoutProperties(componentProps, _excluded);
@@ -17,6 +22,19 @@ export default function Tr(componentProps) {
17
22
  currentVariant = _useHandleTrVariant.currentVariant;
18
23
 
19
24
  var className = classnames('dnb-table__tr', _className, currentVariant && "dnb-table__tr--".concat(currentVariant), noWrap && 'dnb-table--no-wrap');
25
+ var accordionTr = useTableAccordion({
26
+ className: className,
27
+ children: children,
28
+ props: props,
29
+ expanded: expanded,
30
+ disabled: disabled,
31
+ noAnimation: noAnimation
32
+ });
33
+
34
+ if (accordionTr) {
35
+ return accordionTr;
36
+ }
37
+
20
38
  return React.createElement("tr", _extends({
21
39
  role: "row",
22
40
  className: className
@@ -40,24 +58,18 @@ function useHandleTrVariant(_ref) {
40
58
  return countRef.count;
41
59
  };
42
60
 
43
- var decrement = function decrement() {
44
- if (typeof countRef === 'undefined') {
45
- return null;
61
+ var _React$useState = React.useState(function () {
62
+ if (typeof window === 'undefined') {
63
+ return increment();
46
64
  }
65
+ }),
66
+ _React$useState2 = _slicedToArray(_React$useState, 2),
67
+ count = _React$useState2[0],
68
+ setCount = _React$useState2[1];
47
69
 
48
- if (!variant || variant === 'even' && countRef.count % 2 === 1 || variant === 'odd' && countRef.count % 2 === 0) {
49
- countRef.count--;
50
- tableContext === null || tableContext === void 0 ? void 0 : tableContext.forceRerender();
51
- }
52
- };
53
-
54
- var count = React.useMemo(increment, [tableContext === null || tableContext === void 0 ? void 0 : tableContext.rerenderAlias]);
55
70
  React.useEffect(function () {
56
- return decrement;
57
- }, [tableContext === null || tableContext === void 0 ? void 0 : tableContext.trCountRef]);
58
- React.useEffect(function () {
59
- tableContext === null || tableContext === void 0 ? void 0 : tableContext.forceRerender();
60
- }, [variant]);
71
+ setCount(increment());
72
+ }, [tableContext === null || tableContext === void 0 ? void 0 : tableContext.rerenderAlias]);
61
73
  var currentVariant = variant;
62
74
 
63
75
  if (!currentVariant) {
@@ -67,4 +79,35 @@ function useHandleTrVariant(_ref) {
67
79
  return {
68
80
  currentVariant: currentVariant
69
81
  };
82
+ }
83
+
84
+ export function useHandleOddEven(_ref2) {
85
+ var children = _ref2.children;
86
+ var trCountRef = React.useRef({
87
+ count: 0
88
+ });
89
+
90
+ var _React$useState3 = React.useState({}),
91
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
92
+ rerenderAlias = _React$useState4[0],
93
+ setRerenderAlias = _React$useState4[1];
94
+
95
+ var isMounted = React.useRef(false);
96
+ React.useEffect(function () {
97
+ if (isMounted.current) {
98
+ forceRerender();
99
+ }
100
+
101
+ isMounted.current = true;
102
+ }, [children]);
103
+ return {
104
+ trCountRef: trCountRef,
105
+ rerenderAlias: rerenderAlias,
106
+ setRerenderAlias: setRerenderAlias
107
+ };
108
+
109
+ function forceRerender() {
110
+ trCountRef.current.count = 0;
111
+ setRerenderAlias({});
112
+ }
70
113
  }
@@ -0,0 +1,280 @@
1
+ /*
2
+ * Table component
3
+ *
4
+ */
5
+
6
+ @mixin tableAccordionActiveColor {
7
+ .dnb-table__td__accordion-icon .dnb-icon {
8
+ color: var(--color-emerald-green);
9
+ }
10
+ }
11
+ @mixin tableAccordionDisabledColor {
12
+ .dnb-table__td__accordion-icon .dnb-icon {
13
+ color: var(--color-sea-green-30);
14
+ }
15
+ }
16
+
17
+ .dnb-table {
18
+ --accordion-background: var(--color-white);
19
+ --accordion-border-width: 0.0625rem;
20
+ --accordion-border: var(--accordion-border-width) solid
21
+ var(--color-black-20);
22
+
23
+ &__th#{&}__th__accordion-icon {
24
+ padding: 0;
25
+
26
+ // In case the table-layout is fixed
27
+ div {
28
+ width: 3.5rem;
29
+
30
+ .dnb-table__size--medium & {
31
+ width: 3rem;
32
+ }
33
+ .dnb-table__size--small & {
34
+ width: 2.5rem;
35
+ }
36
+
37
+ text-indent: -300vw;
38
+ }
39
+ }
40
+
41
+ &__td#{&}__td__accordion-icon {
42
+ padding: 0;
43
+ user-select: none; // prevent selection on double-click
44
+ }
45
+
46
+ &__tr--has-accordion-content &__toggle-button {
47
+ display: flex; // to ensure we inherit the correct size from its content
48
+ justify-content: center;
49
+
50
+ .dnb-icon {
51
+ color: var(--color-sea-green);
52
+ transition: transform 500ms var(--accordion-easing);
53
+ }
54
+ }
55
+ &__tr--has-accordion-content#{&}__tr--no-animation
56
+ &__toggle-button
57
+ .dnb-icon,
58
+ html[data-visual-test]
59
+ &__tr--has-accordion-content
60
+ &__toggle-button
61
+ .dnb-icon {
62
+ transition: none !important;
63
+ }
64
+
65
+ &__tr--has-accordion-content,
66
+ &__tr__accordion_content {
67
+ position: relative;
68
+ z-index: 2;
69
+ }
70
+ &__tr--has-accordion-content:hover,
71
+ &__tr--has-accordion-content:active,
72
+ &__tr--has-accordion-content:focus,
73
+ &__tr--has-accordion-content#{&}__tr--expanded,
74
+ &__tr__accordion_content {
75
+ // ensure borders are visible in certain states
76
+ z-index: 3;
77
+ }
78
+
79
+ &__tr--has-accordion-content#{&}__tr--expanded
80
+ &__toggle-button
81
+ .dnb-icon {
82
+ transform: rotate(180deg);
83
+ }
84
+
85
+ &__tr--has-accordion-content#{&}__tr--expanded {
86
+ .dnb-table--border & td::after {
87
+ border-bottom: none;
88
+ }
89
+ .dnb-table--border & td:not(:first-of-type)::after {
90
+ border-left: none;
91
+ }
92
+ }
93
+
94
+ &__tr--has-accordion-content#{&}__tr:not(&__tr--disabled) {
95
+ outline: none;
96
+
97
+ td::before {
98
+ content: '';
99
+ position: absolute;
100
+ z-index: 3; // ensure we are over the "tableBorder"
101
+
102
+ // A negative number will force the table to overflow and a scrollbar will show up
103
+ inset: 0;
104
+
105
+ pointer-events: none;
106
+
107
+ // Here we use border to support Safari v16 on macOS
108
+ // but also to only have a border on specific sides
109
+ border: $focusRingWidth solid transparent;
110
+ }
111
+ td:not(:first-of-type)::before {
112
+ border-left: none;
113
+ }
114
+ td:not(:last-of-type)::before {
115
+ border-right: none;
116
+ }
117
+
118
+ @include hover() {
119
+ td::before {
120
+ border-color: var(--color-emerald-green);
121
+ }
122
+
123
+ @include tableAccordionActiveColor();
124
+ }
125
+ }
126
+
127
+ &__tr--has-accordion-content#{&}__tr--expanded:not(&__tr--disabled):hover
128
+ &__td {
129
+ background-color: var(--color-white);
130
+ }
131
+
132
+ &__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):not(:active):not(:hover):focus {
133
+ td::before {
134
+ @include whatInput(keyboard) {
135
+ top: 0;
136
+ bottom: 0;
137
+ border-color: var(--color-emerald-green);
138
+ }
139
+ }
140
+ td:first-of-type::before {
141
+ left: 0;
142
+ }
143
+ td:last-of-type::before {
144
+ right: 0;
145
+ }
146
+ }
147
+
148
+ &__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):active {
149
+ html:not([data-whatintent='touch']) &:hover td::before,
150
+ td::before {
151
+ border-color: var(--color-emerald-green);
152
+ border-width: 0.0625rem; // TODO: we should have something like activeRingWidth
153
+ }
154
+ }
155
+
156
+ &__tr--has-accordion-content#{&}__tr:not(&__tr--disabled):active &__td {
157
+ background-color: var(--color-pistachio);
158
+
159
+ @include tableAccordionActiveColor();
160
+ }
161
+
162
+ &__tr--has-accordion-content#{&}__tr--expanded:not(&__tr--disabled)#{&}__tr--hover:not(:active):hover
163
+ &__td {
164
+ background-color: var(--accordion-background);
165
+
166
+ &::before {
167
+ border: none;
168
+ border-top: var(--accordion-border);
169
+ }
170
+ }
171
+
172
+ &__tr--has-accordion-content#{&}__tr#{&}__tr--expanded:not(&__tr--disabled):not(:active):not(:hover) {
173
+ @include whatInputNot('keyboard') {
174
+ background-color: var(--accordion-background);
175
+
176
+ td::before {
177
+ border: none;
178
+ border-top: var(--accordion-border);
179
+ }
180
+ }
181
+ }
182
+
183
+ &__tr--has-accordion-content#{&}__tr--disabled {
184
+ @include tableAccordionDisabledColor();
185
+ }
186
+
187
+ &__tr__accordion_content {
188
+ @include IS_SAFARI_DESKTOP {
189
+ &[hidden] {
190
+ /**
191
+ * By reverting the display from "none" to "block",
192
+ * we trick VoiceOver to not make this row as the end of the table. We still need "hidden" to get the correct number of rows (childCount).
193
+ */
194
+ display: block;
195
+ }
196
+ }
197
+
198
+ td::before {
199
+ content: '';
200
+ position: absolute;
201
+ top: auto;
202
+ left: 0;
203
+ right: 0;
204
+ bottom: calc(var(--accordion-border-width) * -1);
205
+
206
+ pointer-events: none;
207
+
208
+ border-bottom: var(--accordion-border);
209
+ }
210
+
211
+ // because, when table has --outline
212
+ .dnb-table--outline &:last-of-type td::before {
213
+ border-bottom: none;
214
+ }
215
+
216
+ // because, when table has --border
217
+ .dnb-table--border & td::after {
218
+ border-top: none;
219
+ }
220
+
221
+ &__inner {
222
+ overflow: hidden;
223
+ will-change: height;
224
+ transition: height 400ms var(--accordion-easing);
225
+
226
+ &__spacing {
227
+ padding: 1rem;
228
+
229
+ transform: translateY(-10px);
230
+ transition: transform 500ms var(--accordion-easing);
231
+ }
232
+
233
+ position: relative;
234
+ }
235
+ &--parallax &__inner {
236
+ &__spacing {
237
+ transform: translateY(0);
238
+ }
239
+ }
240
+
241
+ > td,
242
+ > td.dnb-table__td {
243
+ padding: 0;
244
+
245
+ .dnb-dl,
246
+ .dnb-dl dt {
247
+ margin: 0;
248
+ }
249
+ }
250
+
251
+ &--expanded > td,
252
+ &--expanded > td.dnb-table__td {
253
+ background-color: var(--color-white);
254
+ }
255
+ }
256
+
257
+ &__tr__accordion_content#{&}__tr &__td {
258
+ background-color: var(--accordion-background);
259
+
260
+ /**
261
+ * Safari on iOS and macOS has problems on animating when vertical-align is baseline.
262
+ * What happens is that the td is not 0, even the content inside is 0. With vertical top, we omit that.
263
+ * But we do not need baseline in this tr > td, so we reset it.
264
+ */
265
+ vertical-align: top;
266
+ }
267
+
268
+ &__tr--has-accordion-content:not(&__tr--disabled) {
269
+ cursor: pointer;
270
+ }
271
+ // prevent selection while animating – useful when user double-clicks
272
+ // TODO: Our SASS version doe sot support :has – so we may use this in future
273
+ // &__tr--has-accordion-content:has(& + &__tr__accordion_content--animating) {
274
+ // user-select: none;
275
+ // }
276
+
277
+ &__td-wrapper {
278
+ display: flex;
279
+ }
280
+ }
@@ -4,10 +4,10 @@
4
4
  */
5
5
 
6
6
  .dnb-table {
7
- & > tr > th,
8
- & > tr > td,
9
- & > thead > tr > th,
10
- & > tbody > tr > td,
7
+ & > tr > th, /* should be deprecated */
8
+ & > tr > td, /* should be deprecated */
9
+ & > thead > tr > th, /* should be deprecated */
10
+ & > tbody > tr > td, /* should be deprecated */
11
11
  &__th,
12
12
  &__td {
13
13
  position: relative;
@@ -3,28 +3,13 @@
3
3
  *
4
4
  */
5
5
 
6
- @mixin tableBorder {
7
- content: '';
8
- position: absolute;
9
- top: 0;
10
- left: 0;
11
- right: 0;
12
- bottom: 0;
13
- z-index: 1;
14
-
15
- pointer-events: none;
16
- }
17
-
18
6
  .dnb-table__container {
19
7
  position: relative;
20
8
 
21
- --border: 0.0625rem solid var(--color-black-8);
22
- background-color: var(--color-white);
23
-
24
9
  &::after {
25
10
  @include tableBorder();
26
-
27
- border: var(--border);
11
+ z-index: 3; // over sticky-header
12
+ border: var(--outline);
28
13
  }
29
14
 
30
15
  &,
@@ -58,4 +43,9 @@
58
43
  &__foot {
59
44
  padding: 0.5rem 1rem 2rem;
60
45
  }
46
+
47
+ // When placed inside a Modal/Drawer, let the parent scroll-bar do its job.
48
+ .dnb-modal__content & .dnb-table__scroll-view {
49
+ overflow: visible;
50
+ }
61
51
  }
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Table deprecated parts
3
+ *
4
+ */
5
+
6
+ .dnb-table {
7
+ /* stylelint-disable */
8
+
9
+ // deprecated – can be removed in v10
10
+ &,
11
+ &--left {
12
+ text-align: left;
13
+ }
14
+ &--right {
15
+ text-align: right;
16
+ }
17
+ &--center {
18
+ text-align: center;
19
+ }
20
+
21
+ // deprecated – can be removed in v10
22
+ &--small,
23
+ &--small > tr > th,
24
+ &--small > tr > td,
25
+ &--small > thead > tr > th,
26
+ &--small > tbody > tr > td {
27
+ font-size: var(--font-size-small);
28
+ }
29
+
30
+ // deprecated – can be removed in v10
31
+ & > tr#{&}--small > th,
32
+ & > tr#{&}--small > td,
33
+ & > thead > tr#{&}--small > th,
34
+ & > tbody > tr#{&}--small > td {
35
+ font-size: var(--font-size-small);
36
+ }
37
+
38
+ // deprecated – can be removed in v10
39
+ & > tr > th#{&}--small,
40
+ & > tr > td#{&}--small,
41
+ & > thead > tr > th#{&}--small,
42
+ & > tbody > tr > td#{&}--small,
43
+ &__th#{&}--small,
44
+ &__td#{&}--small {
45
+ font-size: var(--font-size-small);
46
+ }
47
+
48
+ // deprecated – can be removed in v10
49
+ &--x-small,
50
+ &--x-small > tr > th,
51
+ &--x-small > tr > td,
52
+ &--x-small > thead > tr > th,
53
+ &--x-small > tbody > tr > td {
54
+ font-size: var(--font-size-x-small);
55
+ }
56
+
57
+ // deprecated – can be removed in v10
58
+ & > tr#{&}--x-small > th,
59
+ & > tr#{&}--x-small > td,
60
+ & > thead > tr#{&}--x-small > th,
61
+ & > tbody > tr#{&}--x-small > td {
62
+ font-size: var(--font-size-x-small);
63
+ }
64
+
65
+ // deprecated – can be removed in v10
66
+ & > tr > th#{&}--x-small,
67
+ & > tr > td#{&}--x-small,
68
+ & > thead > tr > th#{&}--x-small,
69
+ & > tbody > tr > td#{&}--x-small,
70
+ &__th#{&}--x-small,
71
+ &__td#{&}--x-small {
72
+ font-size: var(--font-size-x-small);
73
+ }
74
+ }
@@ -33,7 +33,7 @@
33
33
  // reset anchor
34
34
  box-shadow: none;
35
35
 
36
- line-height: var(--line-height-basis);
36
+ line-height: inherit;
37
37
 
38
38
  margin: 0;
39
39
  padding: 0;
@@ -47,6 +47,7 @@
47
47
  .dnb-button__text {
48
48
  margin: 0;
49
49
  font-size: inherit;
50
+ line-height: inherit;
50
51
 
51
52
  // underline
52
53
  &::after {
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  .dnb-table {
7
+ // Deprecated in v10
7
8
  &__sticky-helper > td {
8
9
  display: block;
9
10
  overflow: hidden;
@@ -11,32 +12,32 @@
11
12
  height: 0;
12
13
  }
13
14
 
14
- tr.sticky th {
15
+ // Target th because of Safari transparent issue
16
+ tr.sticky:not(.css-position) th {
17
+ position: relative;
18
+ z-index: 3; // over borders and TDs
19
+
20
+ will-change: transform;
21
+ transform: translate3d(0, var(--table-offset, 0), 0);
22
+ }
23
+
24
+ tr.sticky.css-position {
15
25
  position: sticky;
26
+ z-index: 3; // over borders and TDs
16
27
  top: var(--table-top, 0); // is set by "stickyOffset" prop
17
- z-index: 2;
18
-
19
- &::before {
20
- content: '';
21
- position: absolute;
22
- opacity: 0;
23
- left: 0;
24
- right: 0;
25
- bottom: 0;
26
- height: 6px;
28
+ }
27
29
 
28
- // The @mixin defaultDropShadow() does not work in this case
29
- // because we need only a bottom shadow (with clip-path)
30
- box-shadow: var(--shadow-default-x) -2px 12px 8px var(--shadow-default-color);
31
- clip-path: inset(6px 0 -48px 0);
30
+ tr.sticky.is-sticky th::before {
31
+ content: '';
32
+ position: absolute;
33
+ left: 0;
34
+ right: 0;
35
+ bottom: 0;
36
+ height: 6px;
32
37
 
33
- transition: opacity 300ms ease-out;
34
- [data-visual-test-wrapper] & {
35
- transition: none;
36
- }
37
- }
38
- }
39
- tr.sticky.show-shadow th::before {
40
- opacity: 1;
38
+ // The @mixin defaultDropShadow() does not work in this case
39
+ // because we need only a bottom shadow (with clip-path)
40
+ box-shadow: var(--shadow-default-x) -2px 12px 8px var(--shadow-default-color);
41
+ clip-path: inset(6px 0 -48px 0);
41
42
  }
42
43
  }