@helsenorge/designsystem-react 15.7.2 → 16.1.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 (326) hide show
  1. package/lib/Button.js +2 -2
  2. package/lib/Button.js.map +1 -1
  3. package/lib/CHANGELOG.md +2664 -997
  4. package/lib/Close.js +1 -1
  5. package/lib/Close.js.map +1 -1
  6. package/lib/Drawer.js +3 -4
  7. package/lib/Drawer.js.map +1 -1
  8. package/lib/DrawerNavigation.js +1 -0
  9. package/lib/DrawerNavigation.js.map +1 -1
  10. package/lib/Duolist.js +5 -1
  11. package/lib/Duolist.js.map +1 -1
  12. package/lib/ElementHeader.js.map +1 -1
  13. package/lib/Expander.js +1 -0
  14. package/lib/Expander.js.map +1 -1
  15. package/lib/FilterLinkList.js +1 -1
  16. package/lib/FilterLinkList.js.map +1 -1
  17. package/lib/FormGroup.js +3 -3
  18. package/lib/FormGroup.js.map +1 -1
  19. package/lib/HelpDetails.js +1 -1
  20. package/lib/HelpTriggerIcon.js +2 -2
  21. package/lib/HelpTriggerIcon.js.map +1 -1
  22. package/lib/HelpTriggerStandalone.js +1 -1
  23. package/lib/HelpTriggerStandalone.js.map +1 -1
  24. package/lib/HorizontalScroll.js +6 -10
  25. package/lib/HorizontalScroll.js.map +1 -1
  26. package/lib/LazyIcon.js +1 -0
  27. package/lib/LazyIcon.js.map +1 -1
  28. package/lib/LazyIllustration.js +2 -0
  29. package/lib/LazyIllustration.js.map +1 -1
  30. package/lib/LinkList.js +10 -10
  31. package/lib/LinkList.js.map +1 -1
  32. package/lib/ListEditMode.js +1 -1
  33. package/lib/ListEditMode.js.map +1 -1
  34. package/lib/PopOver.js +2 -2
  35. package/lib/PopOver.js.map +1 -1
  36. package/lib/Radio.js +65 -55
  37. package/lib/Radio.js.map +1 -1
  38. package/lib/Radio2.js +74 -0
  39. package/lib/Radio2.js.map +1 -0
  40. package/lib/RadioMarker.js +2 -2
  41. package/lib/RadioMarker.js.map +1 -1
  42. package/lib/StackedCellContent.js +15 -0
  43. package/lib/StackedCellContent.js.map +1 -0
  44. package/lib/TabList.js +5 -5
  45. package/lib/TabList.js.map +1 -1
  46. package/lib/TabPanel.js +1 -0
  47. package/lib/TabPanel.js.map +1 -1
  48. package/lib/TableContext.js +26 -0
  49. package/lib/TableContext.js.map +1 -0
  50. package/lib/Toggle.js +2 -2
  51. package/lib/Toggle.js.map +1 -1
  52. package/lib/UNSAFE_TableBody.js +22 -0
  53. package/lib/UNSAFE_TableBody.js.map +1 -0
  54. package/lib/UNSAFE_TableCell.js +26 -0
  55. package/lib/UNSAFE_TableCell.js.map +1 -0
  56. package/lib/UNSAFE_TableDetail.js +17 -0
  57. package/lib/UNSAFE_TableDetail.js.map +1 -0
  58. package/lib/UNSAFE_TableExpandedRow.js +46 -0
  59. package/lib/UNSAFE_TableExpandedRow.js.map +1 -0
  60. package/lib/UNSAFE_TableHead.js +25 -0
  61. package/lib/UNSAFE_TableHead.js.map +1 -0
  62. package/lib/UNSAFE_TableHeadCell.js +182 -0
  63. package/lib/UNSAFE_TableHeadCell.js.map +1 -0
  64. package/lib/UNSAFE_TableRow.js +130 -0
  65. package/lib/UNSAFE_TableRow.js.map +1 -0
  66. package/lib/VisualRadio.js +1 -1
  67. package/lib/VisualRadio.js.map +1 -1
  68. package/lib/__mocks__/ResizeObserver.js +4 -1
  69. package/lib/__mocks__/ResizeObserver.js.map +1 -1
  70. package/lib/components/AnchorLink/styles.module.scss +3 -4
  71. package/lib/components/ArticleTeaser/styles.module.scss +12 -12
  72. package/lib/components/Button/Button.d.ts +1 -1
  73. package/lib/components/Button/styles.module.scss +111 -60
  74. package/lib/components/Button/styles.module.scss.d.ts +1 -1
  75. package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +6 -6
  76. package/lib/components/Chip/styles.module.scss +2 -3
  77. package/lib/components/Close/styles.module.scss +2 -3
  78. package/lib/components/DictionaryTrigger/index.js +26 -1
  79. package/lib/{DictionaryTrigger.js.map → components/DictionaryTrigger/index.js.map} +1 -1
  80. package/lib/components/DictionaryTrigger/styles.module.scss +6 -8
  81. package/lib/components/Drawer/Drawer.d.ts +0 -4
  82. package/lib/components/Drawer/DrawerBackButton.module.scss +1 -2
  83. package/lib/components/Drawer/styles.module.scss +6 -3
  84. package/lib/components/Dropdown/SingleSelect/styles.module.scss +0 -2
  85. package/lib/components/Dropdown/index.js +9 -17
  86. package/lib/components/Dropdown/index.js.map +1 -1
  87. package/lib/components/Dropdown/styles.module.scss +12 -14
  88. package/lib/components/Duolist/Duolist.d.ts +14 -2
  89. package/lib/components/Duolist/styles.module.scss +28 -8
  90. package/lib/components/Duolist/styles.module.scss.d.ts +3 -0
  91. package/lib/components/ElementHeader/ElementHeader.d.ts +1 -1
  92. package/lib/components/ElementHeader/styles.module.scss +1 -1
  93. package/lib/components/EmptyState/styles.module.scss +1 -2
  94. package/lib/components/ErrorWrapper/styles.module.scss +3 -3
  95. package/lib/components/Expander/styles.module.scss +0 -2
  96. package/lib/components/Expander/styles.module.scss.d.ts +1 -1
  97. package/lib/components/ExpanderHierarchy/index.js +1 -0
  98. package/lib/components/ExpanderHierarchy/index.js.map +1 -1
  99. package/lib/components/ExpanderList/index.js +21 -19
  100. package/lib/components/ExpanderList/index.js.map +1 -1
  101. package/lib/components/ExpanderList/styles.module.scss +11 -11
  102. package/lib/components/FavoriteButton/index.js +3 -3
  103. package/lib/components/FavoriteButton/index.js.map +1 -1
  104. package/lib/components/FavoriteButton/styles.module.scss +0 -1
  105. package/lib/components/Filter/FilterButton/styles.module.scss +5 -6
  106. package/lib/components/Filter/FilterButtonAndChipsWrapper/styles.module.scss +0 -1
  107. package/lib/components/Filter/FilterDrawer/styles.module.scss +0 -1
  108. package/lib/components/Filter/FilterLinkList/FilterLinkList.module.scss +5 -6
  109. package/lib/components/Filter/FilterOverviewSearch/styles.module.scss +1 -4
  110. package/lib/components/Filter/FilterSearch/styles.module.scss +14 -15
  111. package/lib/components/Filter/FilterSort/styles.module.scss +1 -2
  112. package/lib/components/Filter/FilterStateWrapper/styles.module.scss +0 -2
  113. package/lib/components/Filter/LoaderSpinner/styles.module.scss +2 -4
  114. package/lib/components/FormFieldTag/styles.module.scss +0 -1
  115. package/lib/components/FormGroup/styles.module.scss +0 -1
  116. package/lib/components/HelpBubble/styles.module.scss +0 -1
  117. package/lib/components/HelpDetails/styles.module.scss +2 -4
  118. package/lib/components/HelpDrawer/styles.module.scss +1 -2
  119. package/lib/components/HelpPanel/HelpPanel.d.ts +2 -2
  120. package/lib/components/HelpPanel/index.js +1 -17
  121. package/lib/components/HelpPanel/index.js.map +1 -1
  122. package/lib/components/HelpPanel/styles.module.scss +2 -22
  123. package/lib/components/HelpPanel/styles.module.scss.d.ts +0 -4
  124. package/lib/components/HelpTeaser/styles.module.scss +7 -9
  125. package/lib/components/HelpTriggerIcon/HelpTriggerIcon.d.ts +2 -2
  126. package/lib/components/HelpTriggerIcon/styles.module.scss +20 -22
  127. package/lib/components/HelpTriggerIcon/styles.module.scss.d.ts +1 -1
  128. package/lib/components/HelpTriggerInline/styles.module.scss +3 -5
  129. package/lib/components/HelpTriggerStandalone/styles.module.scss +3 -5
  130. package/lib/components/HighlightPanel/styles.module.scss +2 -3
  131. package/lib/components/HorizontalScroll/HorizontalScroll.d.ts +0 -4
  132. package/lib/components/HorizontalScroll/styles.module.scss +1 -4
  133. package/lib/components/HorizontalScroll/styles.module.scss.d.ts +0 -1
  134. package/lib/components/Icons/AdditionalIconInformation.d.ts +4 -0
  135. package/lib/components/Icons/AdditionalIconInformation.js +14 -10
  136. package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
  137. package/lib/components/Icons/HistoryDocument.js +6 -7
  138. package/lib/components/Icons/HistoryDocument.js.map +1 -1
  139. package/lib/components/Icons/IconNames.d.ts +1 -1
  140. package/lib/components/Icons/IconNames.js +1 -0
  141. package/lib/components/Icons/IconNames.js.map +1 -1
  142. package/lib/components/Icons/YesNo.d.ts +3 -0
  143. package/lib/components/Icons/YesNo.js +53 -0
  144. package/lib/components/Icons/YesNo.js.map +1 -0
  145. package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
  146. package/lib/components/Illustrations/IllustrationNames.js +2 -0
  147. package/lib/components/Illustrations/IllustrationNames.js.map +1 -1
  148. package/lib/components/Illustrations/MoveAway.d.ts +11 -0
  149. package/lib/components/Illustrations/MoveAway.js +18 -0
  150. package/lib/components/Illustrations/MoveAway.js.map +1 -0
  151. package/lib/components/Illustrations/MoveAwayMedium.d.ts +3 -0
  152. package/lib/components/Illustrations/MoveAwayMedium.js +114 -0
  153. package/lib/components/Illustrations/MoveAwayMedium.js.map +1 -0
  154. package/lib/components/InfoTeaser/styles.module.scss +6 -8
  155. package/lib/components/Label/styles.module.scss +1 -1
  156. package/lib/components/LinkList/LinkList.d.ts +1 -1
  157. package/lib/components/LinkList/styles.module.scss +9 -11
  158. package/lib/components/LinkList/styles.module.scss.d.ts +1 -1
  159. package/lib/components/ListEditMode/styles.module.scss +5 -7
  160. package/lib/components/Loader/Loader.d.ts +1 -1
  161. package/lib/components/Loader/index.js +4 -4
  162. package/lib/components/Loader/index.js.map +1 -1
  163. package/lib/components/Loader/styles.module.scss +7 -7
  164. package/lib/components/Loader/styles.module.scss.d.ts +3 -3
  165. package/lib/components/Modal/constants.d.ts +1 -1
  166. package/lib/components/Modal/index.js +6 -3
  167. package/lib/components/Modal/index.js.map +1 -1
  168. package/lib/components/Modal/styles.module.scss +14 -19
  169. package/lib/components/Modal/styles.module.scss.d.ts +2 -3
  170. package/lib/components/Panel/index.js +1 -1
  171. package/lib/components/Panel/index.js.map +1 -1
  172. package/lib/components/Panel/styles.module.scss +15 -16
  173. package/lib/components/Panel/styles.module.scss.d.ts +1 -1
  174. package/lib/components/PopMenu/PopMenu.d.ts +4 -0
  175. package/lib/components/PopMenu/index.js +10 -5
  176. package/lib/components/PopMenu/index.js.map +1 -1
  177. package/lib/components/PopOver/styles.module.scss +1 -3
  178. package/lib/components/Progressbar/Progressbar.d.ts +1 -1
  179. package/lib/components/Progressbar/constants.d.ts +1 -1
  180. package/lib/components/Progressbar/index.js +4 -4
  181. package/lib/components/Progressbar/index.js.map +1 -1
  182. package/lib/components/Radio/Radio.d.ts +28 -0
  183. package/lib/components/Radio/index.d.ts +3 -0
  184. package/lib/components/Radio/index.js +7 -0
  185. package/lib/components/Radio/index.js.map +1 -0
  186. package/lib/components/{RadioButton → Radio}/styles.module.scss +8 -9
  187. package/lib/components/Radio/styles.module.scss.d.ts +26 -0
  188. package/lib/components/ServiceMessage/styles.module.scss +20 -22
  189. package/lib/components/Slider/styles.module.scss +1 -2
  190. package/lib/components/StatusDot/styles.module.scss +4 -5
  191. package/lib/components/StickyNote/index.js +2 -2
  192. package/lib/components/StickyNote/index.js.map +1 -1
  193. package/lib/components/StickyNote/styles.module.scss +9 -10
  194. package/lib/components/Table/index.js +0 -1
  195. package/lib/components/Table/index.js.map +1 -1
  196. package/lib/components/Tabs/TabList/styles.module.scss +20 -18
  197. package/lib/components/Tabs/TabPanel/styles.module.scss +2 -3
  198. package/lib/components/Tabs/styles.module.scss +0 -1
  199. package/lib/components/Tag/styles.module.scss +0 -1
  200. package/lib/components/Tile/styles.module.scss +5 -7
  201. package/lib/components/Toast/styles.module.scss +0 -1
  202. package/lib/components/Toggle/styles.module.scss +9 -10
  203. package/lib/components/UNSAFE_Table/StackedCellContent.d.ts +9 -0
  204. package/lib/components/UNSAFE_Table/TableCaption.d.ts +10 -0
  205. package/lib/components/UNSAFE_Table/TableContext.d.ts +22 -0
  206. package/lib/components/UNSAFE_Table/UNSAFE_Table.d.ts +37 -0
  207. package/lib/components/UNSAFE_Table/UNSAFE_TableBody/UNSAFE_TableBody.d.ts +10 -0
  208. package/lib/components/UNSAFE_Table/UNSAFE_TableBody/index.d.ts +3 -0
  209. package/lib/components/UNSAFE_Table/UNSAFE_TableBody/index.js +2 -0
  210. package/lib/components/UNSAFE_Table/UNSAFE_TableCell/UNSAFE_TableCell.d.ts +15 -0
  211. package/lib/components/UNSAFE_Table/UNSAFE_TableCell/index.d.ts +3 -0
  212. package/lib/components/UNSAFE_Table/UNSAFE_TableCell/index.js +7 -0
  213. package/lib/components/UNSAFE_Table/UNSAFE_TableCell/index.js.map +1 -0
  214. package/lib/components/UNSAFE_Table/UNSAFE_TableDetail/UNSAFE_TableDetail.d.ts +12 -0
  215. package/lib/components/UNSAFE_Table/UNSAFE_TableDetail/index.d.ts +3 -0
  216. package/lib/components/UNSAFE_Table/UNSAFE_TableDetail/index.js +7 -0
  217. package/lib/components/UNSAFE_Table/UNSAFE_TableDetail/index.js.map +1 -0
  218. package/lib/components/UNSAFE_Table/UNSAFE_TableExpandedRow/UNSAFE_TableExpandedRow.d.ts +17 -0
  219. package/lib/components/UNSAFE_Table/UNSAFE_TableExpandedRow/index.d.ts +3 -0
  220. package/lib/components/UNSAFE_Table/UNSAFE_TableExpandedRow/index.js +7 -0
  221. package/lib/components/UNSAFE_Table/UNSAFE_TableExpandedRow/index.js.map +1 -0
  222. package/lib/components/UNSAFE_Table/UNSAFE_TableExpanderCell/UNSAFE_TableExpanderCellMobile.d.ts +4 -0
  223. package/lib/components/UNSAFE_Table/UNSAFE_TableHead/UNSAFE_TableHead.d.ts +8 -0
  224. package/lib/components/UNSAFE_Table/UNSAFE_TableHead/index.d.ts +3 -0
  225. package/lib/components/UNSAFE_Table/UNSAFE_TableHead/index.js +7 -0
  226. package/lib/components/UNSAFE_Table/UNSAFE_TableHead/index.js.map +1 -0
  227. package/lib/components/UNSAFE_Table/UNSAFE_TableHeadCell/UNSAFE_TableHeadCell.d.ts +15 -0
  228. package/lib/components/UNSAFE_Table/UNSAFE_TableHeadCell/index.d.ts +3 -0
  229. package/lib/components/UNSAFE_Table/UNSAFE_TableHeadCell/index.js +2 -0
  230. package/lib/components/UNSAFE_Table/UNSAFE_TablePopMenuCell/UNSAFE_TablePopMenuCell.d.ts +8 -0
  231. package/lib/components/UNSAFE_Table/UNSAFE_TableRow/UNSAFE_TableRow.d.ts +20 -0
  232. package/lib/components/UNSAFE_Table/UNSAFE_TableRow/index.d.ts +3 -0
  233. package/lib/components/UNSAFE_Table/UNSAFE_TableRow/index.js +2 -0
  234. package/lib/components/UNSAFE_Table/constants.d.ts +29 -0
  235. package/lib/components/UNSAFE_Table/index.d.ts +19 -0
  236. package/lib/components/UNSAFE_Table/index.js +182 -0
  237. package/lib/components/UNSAFE_Table/index.js.map +1 -0
  238. package/lib/components/UNSAFE_Table/resourceHelper.d.ts +3 -0
  239. package/lib/components/UNSAFE_Table/styles.module.scss +621 -0
  240. package/lib/components/UNSAFE_Table/styles.module.scss.d.ts +62 -0
  241. package/lib/components/UNSAFE_Table/useTableExpandedRows.d.ts +12 -0
  242. package/lib/components/UNSAFE_Table/useTableShowMore.d.ts +25 -0
  243. package/lib/components/UNSAFE_Table/utils.d.ts +47 -0
  244. package/lib/components/Validation/index.js +2 -2
  245. package/lib/components/Validation/index.js.map +1 -1
  246. package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +0 -2
  247. package/lib/components/VisualCheckboxCloud/styles.module.scss +0 -1
  248. package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +0 -2
  249. package/lib/components/VisualCheckboxGroup/styles.module.scss +0 -1
  250. package/lib/components/VisualContentgroupWithImage/styles.module.scss +0 -1
  251. package/lib/components/VisualRadioCloud/Radio/index.js +1 -1
  252. package/lib/components/VisualRadioCloud/Radio/styles.module.scss +0 -2
  253. package/lib/components/VisualRadioCloud/index.js +1 -1
  254. package/lib/components/VisualRadioCloud/styles.module.scss +0 -1
  255. package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +0 -2
  256. package/lib/components/VisualRadioGroup/styles.module.scss +0 -1
  257. package/lib/constants.d.ts +2 -3
  258. package/lib/constants.js +2 -3
  259. package/lib/constants.js.map +1 -1
  260. package/lib/constants3.js +42 -0
  261. package/lib/constants3.js.map +1 -0
  262. package/lib/floating-ui.react.js +3 -460
  263. package/lib/floating-ui.react.js.map +1 -1
  264. package/lib/hooks/useDismissablePopover.d.ts +20 -0
  265. package/lib/hooks/useDismissablePopover.js +66 -0
  266. package/lib/hooks/useDismissablePopover.js.map +1 -0
  267. package/lib/hooks/useOutsideEvent.d.ts +3 -0
  268. package/lib/hooks/useOutsideEvent.js +24 -3
  269. package/lib/hooks/useOutsideEvent.js.map +1 -1
  270. package/lib/hooks/useReturnFocusOnClose.d.ts +7 -0
  271. package/lib/hooks/useReturnFocusOnClose.js +22 -0
  272. package/lib/hooks/useReturnFocusOnClose.js.map +1 -0
  273. package/lib/hooks/useSort.d.ts +88 -0
  274. package/lib/hooks/useSort.js +91 -0
  275. package/lib/hooks/useSort.js.map +1 -0
  276. package/lib/hooks/useSort.test.js +11739 -0
  277. package/lib/hooks/useSort.test.js.map +1 -0
  278. package/lib/hooks/useSynchronousResizeObserver.d.ts +11 -0
  279. package/lib/hooks/useSynchronousResizeObserver.js +29 -0
  280. package/lib/hooks/useSynchronousResizeObserver.js.map +1 -0
  281. package/lib/index.d.ts +2 -0
  282. package/lib/index.js +3 -1
  283. package/lib/resources/HN.Designsystem.Table.nb-NO.json.d.ts +9 -0
  284. package/lib/resources/Resources.d.ts +19 -0
  285. package/lib/rolldown-runtime.js +33 -0
  286. package/lib/scss/_font-mixins.scss +28 -1
  287. package/lib/scss/_visual-form.scss +47 -47
  288. package/lib/scss/helsenorge.scss +1 -0
  289. package/lib/scss/supernova/styles/colors.css +177 -122
  290. package/lib/scss/supernova/styles/typography.css +58 -51
  291. package/lib/scss/supernova-legacy/index.css +2 -0
  292. package/lib/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  293. package/lib/scss/typography.module.scss +8 -0
  294. package/lib/scss/typography.module.scss.d.ts +2 -0
  295. package/lib/scss/typography.stories.tsx +8 -0
  296. package/lib/utils/formSpacing.js +3 -3
  297. package/lib/utils/formSpacing.js.map +1 -1
  298. package/lib/utils/uuid.js +1 -12
  299. package/lib/utils/uuid.js.map +1 -1
  300. package/package.json +61 -15
  301. package/scss/_font-mixins.scss +28 -1
  302. package/scss/_visual-form.scss +47 -47
  303. package/scss/helsenorge.scss +1 -0
  304. package/scss/supernova/styles/colors.css +177 -122
  305. package/scss/supernova/styles/typography.css +58 -51
  306. package/scss/supernova-legacy/index.css +2 -0
  307. package/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  308. package/scss/typography.module.scss +8 -0
  309. package/scss/typography.module.scss.d.ts +2 -0
  310. package/scss/typography.stories.tsx +8 -0
  311. package/lib/DictionaryTrigger.js +0 -27
  312. package/lib/RadioButton.js +0 -84
  313. package/lib/RadioButton.js.map +0 -1
  314. package/lib/components/HelpTooltip/HelpTooltip.d.ts +0 -12
  315. package/lib/components/HelpTooltip/index.d.ts +0 -3
  316. package/lib/components/HelpTooltip/index.js +0 -48
  317. package/lib/components/HelpTooltip/index.js.map +0 -1
  318. package/lib/components/RadioButton/RadioButton.d.ts +0 -28
  319. package/lib/components/RadioButton/index.d.ts +0 -3
  320. package/lib/components/RadioButton/index.js +0 -7
  321. package/lib/components/RadioButton/index.js.map +0 -1
  322. package/lib/components/RadioButton/styles.module.scss.d.ts +0 -26
  323. package/lib/designsystem-react.css +0 -273
  324. /package/lib/components/{RadioButton → Radio}/RadioMarker/RadioMarker.d.ts +0 -0
  325. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss +0 -0
  326. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss.d.ts +0 -0
@@ -0,0 +1,62 @@
1
+ export type Styles = {
2
+ 'expandable-container': string;
3
+ table: string;
4
+ table__cell: string;
5
+ 'table__cell--behind-expander': string;
6
+ 'table__cell--center': string;
7
+ 'table__cell--compact': string;
8
+ 'table__cell--nowrap': string;
9
+ 'table__cell--right': string;
10
+ 'table__cell--stacked': string;
11
+ 'table__cell--transparent': string;
12
+ 'table__cell-content': string;
13
+ 'table__cell-expander': string;
14
+ 'table__cell-heading-text': string;
15
+ 'table__cell-pop-menu': string;
16
+ table__detail: string;
17
+ 'table__expanded-row': string;
18
+ 'table__expanded-row__cell': string;
19
+ 'table__expanded-row--expanded': string;
20
+ 'table__expanded-row--stack-only': string;
21
+ 'table__expanded-row-container': string;
22
+ 'table__expanded-row-container--open': string;
23
+ 'table__expanded-row-details': string;
24
+ 'table__expander-button': string;
25
+ 'table__expander-button__content': string;
26
+ 'table__expander-cell-mobile': string;
27
+ 'table__expander-cell-mobile--expanded': string;
28
+ 'table__expander-trigger': string;
29
+ 'table__expander-trigger__content': string;
30
+ table__head: string;
31
+ 'table__head-cell': string;
32
+ 'table__head-cell--compact': string;
33
+ 'table__head-cell--transparent': string;
34
+ 'table__pop-menu': string;
35
+ 'table__pop-menu__content': string;
36
+ 'table__pop-menu__trigger': string;
37
+ table__row: string;
38
+ 'table__row--expandable': string;
39
+ 'table__row--expanded': string;
40
+ 'table__row--transparent': string;
41
+ 'table--centeredoverflow-lg': string;
42
+ 'table--centeredoverflow-md': string;
43
+ 'table--centeredoverflow-sm': string;
44
+ 'table--centeredoverflow-xl': string;
45
+ 'table--centeredoverflow-xs': string;
46
+ 'table--centeredoverflow-xxs': string;
47
+ 'table--stack-lg': string;
48
+ 'table--stack-md': string;
49
+ 'table--stack-sm': string;
50
+ 'table--stack-xl': string;
51
+ 'table--stack-xs': string;
52
+ 'table--stack-xxs': string;
53
+ 'table-body': string;
54
+ 'table-body--zebra': string;
55
+ 'table-caption': string;
56
+ };
57
+
58
+ export type ClassNames = keyof Styles;
59
+
60
+ declare const styles: Styles;
61
+
62
+ export default styles;
@@ -0,0 +1,12 @@
1
+ export interface UseTableExpandedRowsReturn {
2
+ /** Current expanded state per row key */
3
+ expandedRows: Record<string, boolean>;
4
+ /** Whether a row is expanded */
5
+ isExpanded: (rowKey: string) => boolean;
6
+ /** Toggle the expanded state of a row */
7
+ toggleExpanded: (rowKey: string) => void;
8
+ /** Collapse all rows, e.g. when the table is re-sorted */
9
+ collapseAll: () => void;
10
+ }
11
+ /** Expanded state per row for tables with expandable rows (UNSAFE_TableRow expandedContent/hideBehindExpander). */
12
+ export declare const useTableExpandedRows: () => UseTableExpandedRowsReturn;
@@ -0,0 +1,25 @@
1
+ export interface UseTableShowMoreOptions<TData> {
2
+ /** All rows */
3
+ data: TData[];
4
+ /** Number of rows to show initially and to reveal per showMore(). Shows all rows when not set. */
5
+ pageSize?: number;
6
+ }
7
+ export interface UseTableShowMoreReturn<TData, TElement extends HTMLElement> {
8
+ /** The rows that are currently visible */
9
+ visibleData: TData[];
10
+ /** Whether there are more rows to show */
11
+ hasMore: boolean;
12
+ /** Reveal the next page of rows */
13
+ showMore: () => void;
14
+ /** Reset to the initial number of visible rows */
15
+ reset: () => void;
16
+ /** Index of the first row revealed by the last showMore() call */
17
+ newRowsStartIndex?: number;
18
+ /**
19
+ * Attach to a focusable element in the first newly revealed row (index === newRowsStartIndex).
20
+ * The element receives focus when the last page is revealed and the show more button disappears.
21
+ */
22
+ firstNewRowRef: React.RefObject<TElement | null>;
23
+ }
24
+ /** Progressive disclosure ("show more") of table rows, with focus management when the show more button disappears. */
25
+ export declare const useTableShowMore: <TData, TElement extends HTMLElement = HTMLElement>({ data, pageSize, }: UseTableShowMoreOptions<TData>) => UseTableShowMoreReturn<TData, TElement>;
@@ -0,0 +1,47 @@
1
+ import { default as React } from 'react';
2
+ import { BreakpointConfig } from './UNSAFE_Table';
3
+ import { Breakpoint } from '../../hooks/useBreakpoint';
4
+ /**
5
+ * Finn konfigurasjon for nåværende breakpoint og tabellbredde
6
+ * @param config Konfigurasjon for responsiv oppførsel
7
+ * @param breakpoint Nåværende breakpoint
8
+ * @param tableWidth Bredde på tabell i px
9
+ * @returns Konfigurasjon for responsiv oppførsel uten fallbackVariant
10
+ */
11
+ export declare const getCurrentConfig: (config: BreakpointConfig | BreakpointConfig[], breakpoint: Breakpoint, tableWidth: number, windowWidth: number) => Omit<BreakpointConfig, "fallbackVariant"> | undefined;
12
+ /**
13
+ * Finn bredden tabellen kan bruke. Innholdsbredden til nærmeste overordnede element merket med data-overflow-boundary,
14
+ * eller skjermbredden om ingen er merket.
15
+ * @param element Elementet det søkes fra, vanligvis tabellens overordnede element
16
+ * @returns Tilgjengelig bredde i px
17
+ */
18
+ export declare const getAvailableWidth: (element: HTMLElement) => number;
19
+ /**
20
+ * Finn klassenavn for responsiv oppførsel
21
+ * @param config Konfigurasjon for responsiv oppførsel
22
+ * @returns Klassenavn
23
+ */
24
+ export declare const getBreakpointClass: (config?: BreakpointConfig) => string | undefined;
25
+ /**
26
+ * Finn riktig posisjon for horisontal sentrering av tabell som skal vises "centeredoverflow"
27
+ * @param parentWidth Bredde på element som tabellen ligger i
28
+ * @param tableWidth Bredde på tabellen
29
+ * @returns Styling som posisjonerer tabellen riktig
30
+ */
31
+ export declare const getCenteredOverflowTableStyle: (parentWidth: number, tableWidth: number) => React.CSSProperties | undefined;
32
+ /**
33
+ * Create a shallow copy of an object with specific keys omitted.
34
+ */
35
+ export declare const omitProps: <T extends Record<PropertyKey, unknown>>(obj: T, keys: Array<keyof T>) => Partial<T>;
36
+ /**
37
+ * Finn indeksene til kolonnene som er markert med hideBehindExpander i første rad i UNSAFE_TableHead.
38
+ * @param children Innholdet i UNSAFE_Table
39
+ * @returns Kolonneindekser som skjules bak expander i stack-varianten
40
+ */
41
+ export declare const getHiddenColumns: (children: React.ReactNode) => number[];
42
+ /**
43
+ * Finn teksten i hver kolonne i første rad i UNSAFE_TableHead. Brukes som overskrift i cellene i stack-varianten.
44
+ * @param children Innholdet i UNSAFE_Table
45
+ * @returns Overskrift per kolonneindeks, tom streng for kolonner uten tekst
46
+ */
47
+ export declare const getColumnHeadingTexts: (children: React.ReactNode) => string[];
@@ -9,7 +9,7 @@ import { t as Textarea_default } from "../../Textarea.js";
9
9
  import { t as FormGroup } from "../../FormGroup.js";
10
10
  import Input_default from "../Input/index.js";
11
11
  import { t as List_default } from "../../List.js";
12
- import RadioButton_default from "../RadioButton/index.js";
12
+ import Radio_default from "../Radio/index.js";
13
13
  import classNames from "classnames";
14
14
  import React, { useId } from "react";
15
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -74,7 +74,7 @@ var Validation = (props) => {
74
74
  });
75
75
  };
76
76
  const renderChild = (child) => {
77
- if (isComponent(child, FormGroup) || isComponent(child, Checkbox_default) || isComponent(child, RadioButton_default) || isComponent(child, Textarea_default) || isComponent(child, Input_default) || isComponent(child, Select_default) || isComponent(child, Slider_default) || isComponentWithDisplayName(child, "DateTimePickerWrapper") || isComponentWithDisplayName(child, "DatePicker") || isComponentWithDisplayName(child, "DateTime")) return cloneFormElement(child);
77
+ if (isComponent(child, FormGroup) || isComponent(child, Checkbox_default) || isComponent(child, Radio_default) || isComponent(child, Textarea_default) || isComponent(child, Input_default) || isComponent(child, Select_default) || isComponent(child, Slider_default) || isComponentWithDisplayName(child, "DateTimePickerWrapper") || isComponentWithDisplayName(child, "DatePicker") || isComponentWithDisplayName(child, "DateTime")) return cloneFormElement(child);
78
78
  if (isComponent(child, React.Fragment)) return React.Children.map(child.props.children, (child) => {
79
79
  return renderChild(child);
80
80
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Validation/ErrorListItem.tsx","../../../src/components/Validation/ErrorList.tsx","../../../src/components/Validation/ValidationSummary.tsx","../../../src/components/Validation/Validation.tsx","../../../src/components/Validation/index.ts"],"sourcesContent":["import type { ErrorDetails, FocusableElement } from './types';\nimport type { AnchorLinkOnClickEvent } from '../AnchorLink';\n\nimport AnchorLink from '../AnchorLink';\n\ninterface ErrorElementProps {\n name: string;\n error: ErrorDetails;\n}\n\nconst ErrorListItem: React.FC<ErrorElementProps> = props => {\n const handleClick = (event?: AnchorLinkOnClickEvent, element?: FocusableElement): void => {\n event?.preventDefault();\n if (element?.focus) element?.focus();\n };\n\n if (props.error.ref) {\n return (\n <AnchorLink href={`#${props.name}`} onClick={(e): void => handleClick(e, props.error.ref)}>\n {props.error.message}\n </AnchorLink>\n );\n }\n\n return <>{props.error.message}</>;\n};\n\nexport default ErrorListItem;\n","import type { ValidationErrors } from './types';\n\nimport ErrorListItem from './ErrorListItem';\nimport List from '../List';\n\ninterface ErrorListProps {\n errors: ValidationErrors;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = props => (\n <List>\n {Object.entries(props.errors).map(([name, error]) => (\n <List.Item key={name}>\n <ErrorListItem name={name} error={error} />\n </List.Item>\n ))}\n </List>\n);\n\nexport default ErrorList;\n","import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ValidationErrors } from './types';\nimport type { TitleTags } from '../Title';\n\nimport ErrorList from './ErrorList';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationSummaryProps {\n /** Error summary title */\n errorTitle?: string;\n /** Error list */\n errors?: ValidationErrors;\n /** Markup props for error summary title. Default: h2 */\n errorTitleHtmlMarkup?: TitleTags;\n /** Will be shown last */\n children?: React.ReactNode;\n /** Hides the list visually - summary is still announced by screen readers */\n visuallyHidden?: boolean;\n}\n\nconst ValidationSummary: React.FC<ValidationSummaryProps> = props => {\n const { errorTitleHtmlMarkup = 'h2' } = props;\n const titleId = useId();\n\n const hasErrors = !!props.errors && Object.entries(props.errors).length > 0;\n const visuallyHidden = props.visuallyHidden;\n\n const summaryClasses = classNames(styles['validation__summary'], {\n [styles['validation__summary--visible']]: hasErrors && !visuallyHidden,\n [styles['validation__summary--sr-only']]: visuallyHidden,\n });\n\n return (\n <div\n role={'status'}\n aria-atomic={'true'}\n aria-live={'polite'}\n aria-relevant={'all'}\n aria-labelledby={hasErrors && props.errorTitle ? titleId : undefined}\n className={summaryClasses}\n >\n {hasErrors && (\n <>\n {props.errorTitle && (\n <Title appearance=\"title4\" id={titleId} htmlMarkup={errorTitleHtmlMarkup} margin={{ marginTop: 0, marginBottom: 1 }}>\n {props.errorTitle}\n </Title>\n )}\n <ErrorList errors={props.errors!} />\n </>\n )}\n {props.children}\n </div>\n );\n};\n\nexport default ValidationSummary;\n","import React from 'react';\n\nimport type { ValidationErrors } from './types';\nimport type { FormSize } from '../../constants';\nimport type { CheckboxProps } from '../Checkbox';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { FormGroupProps } from '../FormGroup/FormGroup';\nimport type { InputProps } from '../Input';\nimport type { RadioButtonProps } from '../RadioButton';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport ValidationSummary from './ValidationSummary';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent, isComponentWithDisplayName } from '../../utils/component';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport Input from '../Input';\nimport RadioButton from '../RadioButton';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationProps {\n /** Error summary title */\n errorTitle?: string;\n /** Validation errors. If errors include references to HTML elements, the errors will be rendered as links with an onClick handler to focus the element. */\n errors?: ValidationErrors;\n /** Items in the Validation compontent */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Hides the ValidationSummary list visually - summary is still announced by screen readers */\n visuallyHiddenSummary?: boolean;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const Validation: React.FC<ValidationProps> = (props: ValidationProps) => {\n const validationErrorClass = styles['validation__error-wrapper'];\n\n const cloneFormElement = <T extends ErrorWrapperClassNameProps>(child: React.ReactElement<T>): React.ReactElement<T> => {\n return React.cloneElement(child, {\n ...child.props,\n errorWrapperClassName: validationErrorClass,\n });\n };\n\n const renderChild = (child: React.ReactNode): React.ReactNode => {\n if (\n isComponent<FormGroupProps>(child, FormGroup) ||\n isComponent<CheckboxProps>(child, Checkbox) ||\n isComponent<RadioButtonProps>(child, RadioButton) ||\n isComponent<TextareaProps>(child, Textarea) ||\n isComponent<InputProps>(child, Input) ||\n isComponent<SelectProps>(child, Select) ||\n isComponent<SliderProps>(child, Slider) ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTimePickerWrapper') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DatePicker') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTime')\n ) {\n return cloneFormElement<ErrorWrapperClassNameProps>(child);\n }\n if (isComponent<React.FragmentProps>(child, React.Fragment)) {\n return React.Children.map(child.props.children, (child: React.ReactNode) => {\n return renderChild(child);\n });\n }\n\n return child;\n };\n\n return (\n <>\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.Validation} className={props.className} ref={props.ref}>\n {React.Children.map(props.children, (child: React.ReactNode) => renderChild(child))}\n </div>\n <ValidationSummary errorTitle={props.errorTitle} errors={props.errors} visuallyHidden={props.visuallyHiddenSummary} />\n </>\n );\n};\n\nValidation.displayName = 'Validation';\n\nexport default Validation;\n","import Validation from './Validation';\nexport * from './Validation';\nexport default Validation;\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,IAAM,iBAA6C,UAAS;CAC1D,MAAM,eAAe,OAAgC,YAAqC;EACxF,OAAO,eAAe;EACtB,IAAI,SAAS,OAAO,SAAS,MAAM;CACrC;CAEA,IAAI,MAAM,MAAM,KACd,OACE,oBAAC,oBAAD;EAAY,MAAM,IAAI,MAAM;EAAQ,UAAU,MAAY,YAAY,GAAG,MAAM,MAAM,GAAG;EACrF,UAAA,MAAM,MAAM;CACH,CAAA;CAIhB,OAAO,oBAAA,UAAA,EAAA,UAAG,MAAM,MAAM,QAAU,CAAA;AAClC;;;AChBA,IAAM,aAAsC,UAC1C,oBAAC,cAAD,EAAA,UACG,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,WACxC,oBAAC,aAAK,MAAN,EAAA,UACE,oBAAC,eAAD;CAAqB;CAAa;AAAQ,CAAA,EACjC,GAFK,IAEL,CACZ,EACG,CAAA;;;ACSR,IAAM,qBAAsD,UAAS;CACnE,MAAM,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MAAM,MAAM,WAAW,UAA2B;GAC1E,OAAO,YAAY,KAAK;EAC1B,CAAC;EAGH,OAAO;CACT;CAEA,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAD;EAAK,eAAa,MAAM;EAAQ,oBAAkB,YAAY;EAAY,WAAW,MAAM;EAAW,KAAK,MAAM;EAC9G,UAAA,MAAM,SAAS,IAAI,MAAM,WAAW,UAA2B,YAAY,KAAK,CAAC;CAC/E,CAAA,GACL,oBAAC,mBAAD;EAAmB,YAAY,MAAM;EAAY,QAAQ,MAAM;EAAQ,gBAAgB,MAAM;CAAwB,CAAA,CACrH,EAAA,CAAA;AAEN;AAEA,WAAW,cAAc;;;ACvFzB,IAAA,qBAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Validation/ErrorListItem.tsx","../../../src/components/Validation/ErrorList.tsx","../../../src/components/Validation/ValidationSummary.tsx","../../../src/components/Validation/Validation.tsx","../../../src/components/Validation/index.ts"],"sourcesContent":["import type { ErrorDetails, FocusableElement } from './types';\nimport type { AnchorLinkOnClickEvent } from '../AnchorLink';\n\nimport AnchorLink from '../AnchorLink';\n\ninterface ErrorElementProps {\n name: string;\n error: ErrorDetails;\n}\n\nconst ErrorListItem: React.FC<ErrorElementProps> = props => {\n const handleClick = (event?: AnchorLinkOnClickEvent, element?: FocusableElement): void => {\n event?.preventDefault();\n if (element?.focus) element?.focus();\n };\n\n if (props.error.ref) {\n return (\n <AnchorLink href={`#${props.name}`} onClick={(e): void => handleClick(e, props.error.ref)}>\n {props.error.message}\n </AnchorLink>\n );\n }\n\n return <>{props.error.message}</>;\n};\n\nexport default ErrorListItem;\n","import type { ValidationErrors } from './types';\n\nimport ErrorListItem from './ErrorListItem';\nimport List from '../List';\n\ninterface ErrorListProps {\n errors: ValidationErrors;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = props => (\n <List>\n {Object.entries(props.errors).map(([name, error]) => (\n <List.Item key={name}>\n <ErrorListItem name={name} error={error} />\n </List.Item>\n ))}\n </List>\n);\n\nexport default ErrorList;\n","import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ValidationErrors } from './types';\nimport type { TitleTags } from '../Title';\n\nimport ErrorList from './ErrorList';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationSummaryProps {\n /** Error summary title */\n errorTitle?: string;\n /** Error list */\n errors?: ValidationErrors;\n /** Markup props for error summary title. Default: h2 */\n errorTitleHtmlMarkup?: TitleTags;\n /** Will be shown last */\n children?: React.ReactNode;\n /** Hides the list visually - summary is still announced by screen readers */\n visuallyHidden?: boolean;\n}\n\nconst ValidationSummary: React.FC<ValidationSummaryProps> = props => {\n const { errorTitleHtmlMarkup = 'h2' } = props;\n const titleId = useId();\n\n const hasErrors = !!props.errors && Object.entries(props.errors).length > 0;\n const visuallyHidden = props.visuallyHidden;\n\n const summaryClasses = classNames(styles['validation__summary'], {\n [styles['validation__summary--visible']]: hasErrors && !visuallyHidden,\n [styles['validation__summary--sr-only']]: visuallyHidden,\n });\n\n return (\n <div\n role={'status'}\n aria-atomic={'true'}\n aria-live={'polite'}\n aria-relevant={'all'}\n aria-labelledby={hasErrors && props.errorTitle ? titleId : undefined}\n className={summaryClasses}\n >\n {hasErrors && (\n <>\n {props.errorTitle && (\n <Title appearance=\"title4\" id={titleId} htmlMarkup={errorTitleHtmlMarkup} margin={{ marginTop: 0, marginBottom: 1 }}>\n {props.errorTitle}\n </Title>\n )}\n <ErrorList errors={props.errors!} />\n </>\n )}\n {props.children}\n </div>\n );\n};\n\nexport default ValidationSummary;\n","import React from 'react';\n\nimport type { ValidationErrors } from './types';\nimport type { FormSize } from '../../constants';\nimport type { CheckboxProps } from '../Checkbox';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { FormGroupProps } from '../FormGroup/FormGroup';\nimport type { InputProps } from '../Input';\nimport type { RadioProps } from '../Radio';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport ValidationSummary from './ValidationSummary';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent, isComponentWithDisplayName } from '../../utils/component';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport Input from '../Input';\nimport Radio from '../Radio';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationProps {\n /** Error summary title */\n errorTitle?: string;\n /** Validation errors. If errors include references to HTML elements, the errors will be rendered as links with an onClick handler to focus the element. */\n errors?: ValidationErrors;\n /** Items in the Validation compontent */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Hides the ValidationSummary list visually - summary is still announced by screen readers */\n visuallyHiddenSummary?: boolean;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const Validation: React.FC<ValidationProps> = (props: ValidationProps) => {\n const validationErrorClass = styles['validation__error-wrapper'];\n\n const cloneFormElement = <T extends ErrorWrapperClassNameProps>(child: React.ReactElement<T>): React.ReactElement<T> => {\n return React.cloneElement(child, {\n ...child.props,\n errorWrapperClassName: validationErrorClass,\n });\n };\n\n const renderChild = (child: React.ReactNode): React.ReactNode => {\n if (\n isComponent<FormGroupProps>(child, FormGroup) ||\n isComponent<CheckboxProps>(child, Checkbox) ||\n isComponent<RadioProps>(child, Radio) ||\n isComponent<TextareaProps>(child, Textarea) ||\n isComponent<InputProps>(child, Input) ||\n isComponent<SelectProps>(child, Select) ||\n isComponent<SliderProps>(child, Slider) ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTimePickerWrapper') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DatePicker') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTime')\n ) {\n return cloneFormElement<ErrorWrapperClassNameProps>(child);\n }\n if (isComponent<React.FragmentProps>(child, React.Fragment)) {\n return React.Children.map(child.props.children, (child: React.ReactNode) => {\n return renderChild(child);\n });\n }\n\n return child;\n };\n\n return (\n <>\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.Validation} className={props.className} ref={props.ref}>\n {React.Children.map(props.children, (child: React.ReactNode) => renderChild(child))}\n </div>\n <ValidationSummary errorTitle={props.errorTitle} errors={props.errors} visuallyHidden={props.visuallyHiddenSummary} />\n </>\n );\n};\n\nValidation.displayName = 'Validation';\n\nexport default Validation;\n","import Validation from './Validation';\nexport * from './Validation';\nexport default Validation;\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,IAAM,iBAA6C,UAAS;CAC1D,MAAM,eAAe,OAAgC,YAAqC;EACxF,OAAO,eAAe;EACtB,IAAI,SAAS,OAAO,SAAS,MAAM;CACrC;CAEA,IAAI,MAAM,MAAM,KACd,OACE,oBAAC,oBAAD;EAAY,MAAM,IAAI,MAAM;EAAQ,UAAU,MAAY,YAAY,GAAG,MAAM,MAAM,GAAG;EACrF,UAAA,MAAM,MAAM;CACH,CAAA;CAIhB,OAAO,oBAAA,UAAA,EAAA,UAAG,MAAM,MAAM,QAAU,CAAA;AAClC;;;AChBA,IAAM,aAAsC,UAC1C,oBAAC,cAAD,EAAA,UACG,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,WACxC,oBAAC,aAAK,MAAN,EAAA,UACE,oBAAC,eAAD;CAAqB;CAAa;AAAQ,CAAA,EACjC,GAFK,IAEL,CACZ,EACG,CAAA;;;ACSR,IAAM,qBAAsD,UAAS;CACnE,MAAM,EAAE,uBAAuB,SAAS;CACxC,MAAM,UAAU,MAAM;CAEtB,MAAM,YAAY,CAAC,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,SAAS;CAC1E,MAAM,iBAAiB,MAAM;CAE7B,MAAM,iBAAiB,WAAW,OAAO,wBAAwB;G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,MAAM;EAC9G,UAAA,MAAM,SAAS,IAAI,MAAM,WAAW,UAA2B,YAAY,KAAK,CAAC;CAC/E,CAAA,GACL,oBAAC,mBAAD;EAAmB,YAAY,MAAM;EAAY,QAAQ,MAAM;EAAQ,gBAAgB,MAAM;CAAwB,CAAA,CACrH,EAAA,CAAA;AAEN;AAEA,WAAW,cAAc;;;ACvFzB,IAAA,qBAAe"}
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-checkbox {
6
4
  @include visual-form.visual-form-pill(
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-checkbox-cloud {
5
4
  @include visual-form.visual-form-cloud;
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-checkbox {
6
4
  @include visual-form.visual-form-card;
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-checkbox-group {
5
4
  @include visual-form.visual-form-group;
@@ -1,6 +1,5 @@
1
1
  @use 'sass:map';
2
2
  @use '../../scss/breakpoints' as breakpoints;
3
- @import '../../scss/supernova/styles/spacers.css';
4
3
 
5
4
  .visual-contentgroup-with-image {
6
5
  display: flex;
@@ -1,4 +1,4 @@
1
- import { t as Radio } from "../../../Radio.js";
1
+ import { t as Radio } from "../../../Radio2.js";
2
2
  //#region src/components/VisualRadioCloud/Radio/index.ts
3
3
  var Radio_default = Radio;
4
4
  //#endregion
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-radio {
6
4
  @include visual-form.visual-form-pill;
@@ -1,7 +1,7 @@
1
1
  import { isComponent } from "../../utils/component.js";
2
2
  import { useIdWithFallback } from "../../hooks/useIdWithFallback.js";
3
3
  import { t as ErrorWrapper_default } from "../../ErrorWrapper.js";
4
- import { t as Radio } from "../../Radio.js";
4
+ import { t as Radio } from "../../Radio2.js";
5
5
  import classNames from "classnames";
6
6
  import React, { useState } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-radio-cloud {
5
4
  @include visual-form.visual-form-cloud;
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-radio {
6
4
  @include visual-form.visual-form-card;
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-radio-group {
5
4
  @include visual-form.visual-form-group;
@@ -46,7 +46,7 @@ export declare enum FormOnColor {
46
46
  oninvalid = "oninvalid"
47
47
  }
48
48
  export declare enum FormSize {
49
- medium = "medium",
49
+ normal = "normal",
50
50
  large = "large"
51
51
  }
52
52
  export declare enum AnalyticsId {
@@ -77,7 +77,6 @@ export declare enum AnalyticsId {
77
77
  HelpDrawer = "help-drawer",
78
78
  HelpExpanderInline = "help-expander-inline",
79
79
  HelpExpanderStandalone = "help-expander-standalone",
80
- HelpTooltip = "help-tooltip",
81
80
  HelpTriggerIcon = "help-trigger-icon",
82
81
  HelpTriggerInline = "help-trigger-inline",
83
82
  HelpTriggerStandalone = "help-trigger-standalone",
@@ -100,7 +99,7 @@ export declare enum AnalyticsId {
100
99
  PopOver = "pop-over",
101
100
  Portal = "portal",
102
101
  PromoPanel = "promo-panel",
103
- RadioButton = "radio-button",
102
+ Radio = "radio-button",
104
103
  Select = "select",
105
104
  SharingStatus = "sharing-status",
106
105
  Slider = "slider",
package/lib/constants.js CHANGED
@@ -24,7 +24,7 @@ var FormOnColor = /* @__PURE__ */ function(FormOnColor) {
24
24
  return FormOnColor;
25
25
  }({});
26
26
  var FormSize = /* @__PURE__ */ function(FormSize) {
27
- FormSize["medium"] = "medium";
27
+ FormSize["normal"] = "normal";
28
28
  FormSize["large"] = "large";
29
29
  return FormSize;
30
30
  }({});
@@ -56,7 +56,6 @@ var AnalyticsId = /* @__PURE__ */ function(AnalyticsId) {
56
56
  AnalyticsId["HelpDrawer"] = "help-drawer";
57
57
  AnalyticsId["HelpExpanderInline"] = "help-expander-inline";
58
58
  AnalyticsId["HelpExpanderStandalone"] = "help-expander-standalone";
59
- AnalyticsId["HelpTooltip"] = "help-tooltip";
60
59
  AnalyticsId["HelpTriggerIcon"] = "help-trigger-icon";
61
60
  AnalyticsId["HelpTriggerInline"] = "help-trigger-inline";
62
61
  AnalyticsId["HelpTriggerStandalone"] = "help-trigger-standalone";
@@ -79,7 +78,7 @@ var AnalyticsId = /* @__PURE__ */ function(AnalyticsId) {
79
78
  AnalyticsId["PopOver"] = "pop-over";
80
79
  AnalyticsId["Portal"] = "portal";
81
80
  AnalyticsId["PromoPanel"] = "promo-panel";
82
- AnalyticsId["RadioButton"] = "radio-button";
81
+ AnalyticsId["Radio"] = "radio-button";
83
82
  AnalyticsId["Select"] = "select";
84
83
  AnalyticsId["SharingStatus"] = "sharing-status";
85
84
  AnalyticsId["Slider"] = "slider";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n OverlayScreen = 1300000,\n PopOver = 11000,\n LightBoxButtons = 1000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormOnColor {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormSize {\n medium = 'medium',\n large = 'large',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n ArticleTeaser = 'article-teaser',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Chip = 'chip',\n Close = 'close',\n DictionaryTrigger = 'dictionary-trigger',\n Drawer = 'Drawer',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n EmptyState = 'empty-state',\n Expander = 'expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n EyebrowHeader = 'eyebrow-header',\n FavoriteButton = 'favorite-button',\n FormFieldTag = 'form-field-tag',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HelpDrawer = 'help-drawer',\n HelpExpanderInline = 'help-expander-inline',\n HelpExpanderStandalone = 'help-expander-standalone',\n HelpTooltip = 'help-tooltip',\n HelpTriggerIcon = 'help-trigger-icon',\n HelpTriggerInline = 'help-trigger-inline',\n HelpTriggerStandalone = 'help-trigger-standalone',\n HighlightPanel = 'highlight-panel',\n Icon = 'icon',\n Illustration = 'Illustration',\n InfoTeaser = 'info-teaser',\n Input = 'input',\n Label = 'label',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n PanelOld = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n PromoPanel = 'promo-panel',\n RadioButton = 'radio-button',\n Select = 'select',\n SharingStatus = 'sharing-status',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Step = 'step',\n StepButtons = 'step-buttons',\n Stepper = 'stepper',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Toggle = 'toggle',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowRight = 'ArrowRight',\n ArrowLeft = 'ArrowLeft',\n Home = 'Home',\n End = 'End',\n Space = ' ',\n Tab = 'Tab',\n Backspace = 'Backspace',\n}\n\nexport enum LanguageLocales {\n NORWEGIAN = 'nb-NO',\n NORWEGIAN_NYNORSK = 'nn-NO',\n ENGLISH = 'en-GB',\n SAMI_NORTHERN = 'se-NO',\n}\n"],"mappings":";AAAA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,SAAA,aAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,S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YAAA,uBAAA;CACA,YAAA,cAAA;CACA,YAAA,eAAA;CACA,YAAA,aAAA;CACA,YAAA,aAAA;CACA,YAAA,YAAA;CACA,YAAA,gBAAA;CACA,YAAA,iBAAA;CACA,YAAA,YAAA;CACA,YAAA,mBAAA;CACA,YAAA,YAAA;CACA,YAAA,YAAA;CACA,YAAA,eAAA;CACA,YAAA,UAAA;CACA,YAAA,iBAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,WAAA;CACA,YAAA,SAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,UAAA;CACA,YAAA,WAAA;CACA,YAAA,YAAA;CACA,YAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,WAAA;CACA,iBAAA,YAAA;CACA,iBAAA,eAAA;CACA,iBAAA,aAAA;CACA,iBAAA,gBAAA;CACA,iBAAA,eAAA;CACA,iBAAA,UAAA;CACA,iBAAA,SAAA;CACA,iBAAA,WAAA;CACA,iBAAA,SAAA;CACA,iBAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,eAAA;CACA,gBAAA,uBAAA;CACA,gBAAA,aAAA;CACA,gBAAA,mBAAA;;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n OverlayScreen = 1300000,\n PopOver = 11000,\n LightBoxButtons = 1000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormOnColor {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormSize {\n normal = 'normal',\n large = 'large',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n ArticleTeaser = 'article-teaser',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Chip = 'chip',\n Close = 'close',\n DictionaryTrigger = 'dictionary-trigger',\n Drawer = 'Drawer',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n EmptyState = 'empty-state',\n Expander = 'expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n EyebrowHeader = 'eyebrow-header',\n FavoriteButton = 'favorite-button',\n FormFieldTag = 'form-field-tag',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HelpDrawer = 'help-drawer',\n HelpExpanderInline = 'help-expander-inline',\n HelpExpanderStandalone = 'help-expander-standalone',\n HelpTriggerIcon = 'help-trigger-icon',\n HelpTriggerInline = 'help-trigger-inline',\n HelpTriggerStandalone = 'help-trigger-standalone',\n HighlightPanel = 'highlight-panel',\n Icon = 'icon',\n Illustration = 'Illustration',\n InfoTeaser = 'info-teaser',\n Input = 'input',\n Label = 'label',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n PanelOld = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n PromoPanel = 'promo-panel',\n Radio = 'radio-button',\n Select = 'select',\n SharingStatus = 'sharing-status',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Step = 'step',\n StepButtons = 'step-buttons',\n Stepper = 'stepper',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Toggle = 'toggle',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowRight = 'ArrowRight',\n ArrowLeft = 'ArrowLeft',\n Home = 'Home',\n End = 'End',\n Space = ' ',\n Tab = 'Tab',\n Backspace = 'Backspace',\n}\n\nexport enum LanguageLocales {\n NORWEGIAN = 'nb-NO',\n NORWEGIAN_NYNORSK = 'nn-NO',\n ENGLISH = 'en-GB',\n SAMI_NORTHERN = 'se-NO',\n}\n"],"mappings":";AAAA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,SAAA,aAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,SAAL,yBAAA,QAAA;CACL,OAAA,OAAA,mBAAA,QAAA;CACA,OAAA,OAAA,aAAA,QAAA;CACA,OAAA,OAAA,qBAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAE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AAA;CACA,YAAA,UAAA;CACA,YAAA,iBAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,WAAA;CACA,YAAA,SAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,UAAA;CACA,YAAA,WAAA;CACA,YAAA,YAAA;CACA,YAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,WAAA;CACA,iBAAA,YAAA;CACA,iBAAA,eAAA;CACA,iBAAA,aAAA;CACA,iBAAA,gBAAA;CACA,iBAAA,eAAA;CACA,iBAAA,UAAA;CACA,iBAAA,SAAA;CACA,iBAAA,WAAA;CACA,iBAAA,SAAA;CACA,iBAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,eAAA;CACA,gBAAA,uBAAA;CACA,gBAAA,aAAA;CACA,gBAAA,mBAAA;;AACF,EAAA,CAAA,CAAA"}
@@ -0,0 +1,42 @@
1
+ //#region src/components/UNSAFE_Table/constants.ts
2
+ var SortDirection = /* @__PURE__ */ function(SortDirection) {
3
+ SortDirection["asc"] = "asc";
4
+ SortDirection["desc"] = "desc";
5
+ return SortDirection;
6
+ }({});
7
+ var TableColors = /* @__PURE__ */ function(TableColors) {
8
+ TableColors["normal"] = "normal";
9
+ TableColors["transparent"] = "transparent";
10
+ return TableColors;
11
+ }({});
12
+ var TextAlign = /* @__PURE__ */ function(TextAlign) {
13
+ TextAlign["left"] = "left";
14
+ TextAlign["center"] = "center";
15
+ TextAlign["right"] = "right";
16
+ return TextAlign;
17
+ }({});
18
+ var ResponsiveTableVariant = /* @__PURE__ */ function(ResponsiveTableVariant) {
19
+ /** Normal table grid */
20
+ ResponsiveTableVariant["normal"] = "normal";
21
+ /** Collapse to two columns. */
22
+ ResponsiveTableVariant["stack"] = "stack";
23
+ /** Overflow parent container to the left and right while remaining centered horizontally. */
24
+ ResponsiveTableVariant["centeredoverflow"] = "centeredoverflow";
25
+ /** Show horizontal scrollbar when table is too big for the screen. */
26
+ ResponsiveTableVariant["horizontalscroll"] = "horizontalscroll";
27
+ return ResponsiveTableVariant;
28
+ }({});
29
+ var TableSizes = /* @__PURE__ */ function(TableSizes) {
30
+ TableSizes["normal"] = "normal";
31
+ TableSizes["compact"] = "compact";
32
+ return TableSizes;
33
+ }({});
34
+ var defaultConfig = [{
35
+ breakpoint: "xl",
36
+ variant: "centeredoverflow",
37
+ fallbackVariant: "stack"
38
+ }];
39
+ //#endregion
40
+ export { TextAlign as a, TableSizes as i, SortDirection as n, defaultConfig as o, TableColors as r, ResponsiveTableVariant as t };
41
+
42
+ //# sourceMappingURL=constants3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants3.js","names":[],"sources":["../src/components/UNSAFE_Table/constants.ts"],"sourcesContent":["import type { BreakpointConfig } from './UNSAFE_Table';\n\nexport enum SortDirection {\n asc = 'asc',\n desc = 'desc',\n}\n\nexport enum TableColors {\n normal = 'normal',\n transparent = 'transparent',\n}\n\nexport enum TextAlign {\n left = 'left',\n center = 'center',\n right = 'right',\n}\n// normal\n// stack\n// centeredoverflow\n// horizontalscroll\nexport enum ResponsiveTableVariant {\n /** Normal table grid */\n normal = 'normal',\n /** Collapse to two columns. */\n stack = 'stack',\n /** Overflow parent container to the left and right while remaining centered horizontally. */\n centeredoverflow = 'centeredoverflow',\n /** Show horizontal scrollbar when table is too big for the screen. */\n horizontalscroll = 'horizontalscroll',\n}\nexport enum TableSizes {\n normal = 'normal',\n compact = 'compact',\n}\n\nexport const defaultConfig: BreakpointConfig[] = [\n {\n breakpoint: 'xl',\n variant: ResponsiveTableVariant.centeredoverflow,\n fallbackVariant: ResponsiveTableVariant.stack,\n },\n];\n"],"mappings":";AAEA,IAAY,gBAAL,yBAAA,eAAA;CACL,cAAA,SAAA;CACA,cAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,cAAL,yBAAA,aAAA;CACL,YAAA,YAAA;CACA,YAAA,iBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,YAAL,yBAAA,WAAA;CACL,UAAA,UAAA;CACA,UAAA,YAAA;CACA,UAAA,WAAA;;AACF,EAAA,CAAA,CAAA;AAKA,IAAY,yBAAL,yBAAA,wBAAA;;CAEL,uBAAA,YAAA;;CAEA,uBAAA,WAAA;;CAEA,uBAAA,sBAAA;;CAEA,uBAAA,sBAAA;;AACF,EAAA,CAAA,CAAA;AACA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,YAAA;CACA,WAAA,aAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,gBAAoC,CAC/C;CACE,YAAY;CACZ,SAAA;CACA,iBAAA;AACF,CACF"}