@norges-domstoler/dds-components 9.3.0 → 9.4.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 (316) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +2 -27
  2. package/dist/cjs/components/InlineEdit/InlineEdit.d.ts +2 -0
  3. package/dist/cjs/components/InlineEdit/InlineEdit.stories.d.ts +33 -0
  4. package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +4 -0
  5. package/dist/cjs/components/InlineEdit/InlineEdit.tokens.d.ts +25 -0
  6. package/dist/cjs/components/InlineEdit/InlineEdit.types.d.ts +33 -0
  7. package/dist/cjs/components/InlineEdit/InlineEdit.utils.d.ts +1 -0
  8. package/dist/cjs/components/InlineEdit/InlineEditInput.d.ts +1 -0
  9. package/dist/cjs/components/InlineEdit/InlineEditInput.stories.d.ts +36 -0
  10. package/dist/cjs/components/InlineEdit/InlineEditTextArea.d.ts +1 -0
  11. package/dist/cjs/components/InlineEdit/InlineEditTextArea.stories.d.ts +36 -0
  12. package/dist/cjs/components/InlineEdit/InlineInput.d.ts +4 -0
  13. package/dist/cjs/components/InlineEdit/InlineTextArea.d.ts +4 -0
  14. package/dist/cjs/components/InlineEdit/index.d.ts +3 -0
  15. package/dist/cjs/components/SplitButton/SplitButton.d.ts +2 -1
  16. package/dist/cjs/helpers/Input/Input.styles.d.ts +1 -1
  17. package/dist/cjs/index.d.ts +1 -0
  18. package/dist/cjs/index.js +1932 -2253
  19. package/dist/cjs/types/index.d.ts +1 -0
  20. package/dist/cjs/types/utils.d.ts +7 -0
  21. package/dist/components/Breadcrumbs/Breadcrumb.js +1 -4
  22. package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +1 -1
  23. package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -8
  24. package/dist/components/Button/Button.js +24 -27
  25. package/dist/components/Button/Button.styles.js +15 -19
  26. package/dist/components/Button/Button.tokens.js +5 -5
  27. package/dist/components/Card/Card.js +9 -11
  28. package/dist/components/Card/Card.tokens.js +1 -1
  29. package/dist/components/Card/CardAccordion/CardAccordion.js +10 -13
  30. package/dist/components/Card/CardAccordion/CardAccordion.tokens.js +2 -2
  31. package/dist/components/Card/CardAccordion/CardAccordionBody.js +12 -16
  32. package/dist/components/Card/CardAccordion/CardAccordionHeader.js +9 -11
  33. package/dist/components/Checkbox/Checkbox.js +13 -16
  34. package/dist/components/Checkbox/CheckboxGroup.js +12 -13
  35. package/dist/components/Chip/Chip.js +10 -14
  36. package/dist/components/Chip/Chip.tokens.js +2 -2
  37. package/dist/components/Chip/ChipGroup.js +1 -2
  38. package/dist/components/Datepicker/Datepicker.js +19 -25
  39. package/dist/components/Datepicker/Datepicker.tokens.js +2 -2
  40. package/dist/components/DescriptionList/DescriptionList.js +8 -9
  41. package/dist/components/DescriptionList/DescriptionList.tokens.js +1 -1
  42. package/dist/components/DescriptionList/DescriptionListDesc.js +5 -6
  43. package/dist/components/DescriptionList/DescriptionListGroup.js +5 -6
  44. package/dist/components/DescriptionList/DescriptionListTerm.js +1 -2
  45. package/dist/components/Divider/Divider.js +5 -6
  46. package/dist/components/Divider/Divider.tokens.js +1 -1
  47. package/dist/components/Drawer/Drawer.js +17 -21
  48. package/dist/components/Drawer/DrawerGroup.js +6 -12
  49. package/dist/components/GlobalMessage/GlobalMessage.js +14 -16
  50. package/dist/components/GlobalMessage/GlobalMessage.tokens.js +1 -1
  51. package/dist/components/Grid/Grid.js +7 -9
  52. package/dist/components/Grid/Grid.tokens.js +1 -1
  53. package/dist/components/Grid/Grid.utils.js +0 -4
  54. package/dist/components/Grid/GridChild.js +6 -8
  55. package/dist/components/Icon/Icon.js +11 -17
  56. package/dist/components/InlineEdit/InlineEdit.d.ts +2 -0
  57. package/dist/components/InlineEdit/InlineEdit.js +72 -0
  58. package/dist/components/InlineEdit/InlineEdit.stories.d.ts +33 -0
  59. package/dist/components/InlineEdit/InlineEdit.styles.d.ts +4 -0
  60. package/dist/components/InlineEdit/InlineEdit.styles.js +15 -0
  61. package/dist/components/InlineEdit/InlineEdit.tokens.d.ts +25 -0
  62. package/dist/components/InlineEdit/InlineEdit.tokens.js +27 -0
  63. package/dist/components/InlineEdit/InlineEdit.types.d.ts +33 -0
  64. package/dist/components/InlineEdit/InlineEdit.utils.d.ts +1 -0
  65. package/dist/components/InlineEdit/InlineEdit.utils.js +13 -0
  66. package/dist/components/InlineEdit/InlineEditInput.d.ts +1 -0
  67. package/dist/components/InlineEdit/InlineEditInput.js +36 -0
  68. package/dist/components/InlineEdit/InlineEditInput.stories.d.ts +36 -0
  69. package/dist/components/InlineEdit/InlineEditTextArea.d.ts +1 -0
  70. package/dist/components/InlineEdit/InlineEditTextArea.js +36 -0
  71. package/dist/components/InlineEdit/InlineEditTextArea.stories.d.ts +36 -0
  72. package/dist/components/InlineEdit/InlineInput.d.ts +4 -0
  73. package/dist/components/InlineEdit/InlineInput.js +66 -0
  74. package/dist/components/InlineEdit/InlineTextArea.d.ts +4 -0
  75. package/dist/components/InlineEdit/InlineTextArea.js +67 -0
  76. package/dist/components/InlineEdit/index.d.ts +3 -0
  77. package/dist/components/InputMessage/InputMessage.js +5 -6
  78. package/dist/components/InputMessage/InputMessage.tokens.js +1 -1
  79. package/dist/components/InternalHeader/InternalHeader.js +18 -26
  80. package/dist/components/InternalHeader/InternalHeader.styles.js +5 -5
  81. package/dist/components/InternalHeader/InternalHeader.tokens.js +2 -2
  82. package/dist/components/InternalHeader/InternalHeaderListItem.js +1 -2
  83. package/dist/components/InternalHeader/NavigationItem.js +2 -3
  84. package/dist/components/List/List.js +10 -11
  85. package/dist/components/List/ListItem.js +1 -2
  86. package/dist/components/LocalMessage/LocalMessage.js +18 -24
  87. package/dist/components/LocalMessage/LocalMessage.tokens.js +4 -4
  88. package/dist/components/Modal/Modal.js +12 -16
  89. package/dist/components/Modal/ModalActions.js +1 -2
  90. package/dist/components/Modal/ModalBody.js +6 -7
  91. package/dist/components/OverflowMenu/OverflowMenu.js +31 -42
  92. package/dist/components/OverflowMenu/OverflowMenu.tokens.js +4 -4
  93. package/dist/components/OverflowMenu/OverflowMenuGroup.js +7 -14
  94. package/dist/components/OverflowMenu/OverflowMenuItem.js +10 -24
  95. package/dist/components/Pagination/Pagination.js +38 -49
  96. package/dist/components/Pagination/Pagination.tokens.js +1 -1
  97. package/dist/components/Pagination/paginationGenerator.js +0 -5
  98. package/dist/components/Popover/Popover.js +29 -32
  99. package/dist/components/Popover/PopoverGroup.js +8 -16
  100. package/dist/components/ProgressTracker/ProgressTracker.js +9 -15
  101. package/dist/components/ProgressTracker/ProgressTracker.tokens.js +2 -2
  102. package/dist/components/ProgressTracker/ProgressTrackerItem.js +12 -29
  103. package/dist/components/RadioButton/RadioButton.js +17 -24
  104. package/dist/components/RadioButton/RadioButtonGroup.js +20 -24
  105. package/dist/components/ScrollableContainer/ScrollableContainer.js +8 -9
  106. package/dist/components/ScrollableContainer/ScrollableContainer.tokens.js +1 -1
  107. package/dist/components/ScrollableContainer/Scrollbar.js +29 -42
  108. package/dist/components/ScrollableContainer/scrollbarStyling.js +1 -5
  109. package/dist/components/Search/Search.js +16 -23
  110. package/dist/components/Search/Search.tokens.js +1 -1
  111. package/dist/components/Select/Select.js +32 -48
  112. package/dist/components/Select/Select.styles.js +16 -16
  113. package/dist/components/Select/Select.tokens.js +6 -6
  114. package/dist/components/SkipToContent/SkipToContent.js +11 -13
  115. package/dist/components/SkipToContent/SkipToContent.tokens.js +1 -1
  116. package/dist/components/Spinner/Spinner.js +7 -8
  117. package/dist/components/SplitButton/SplitButton.d.ts +2 -1
  118. package/dist/components/SplitButton/SplitButton.js +7 -9
  119. package/dist/components/Table/Body.js +1 -2
  120. package/dist/components/Table/Cell.js +5 -14
  121. package/dist/components/Table/Foot.js +1 -2
  122. package/dist/components/Table/Head.js +1 -2
  123. package/dist/components/Table/Row.js +8 -11
  124. package/dist/components/Table/SortCell.js +4 -8
  125. package/dist/components/Table/Table.js +4 -5
  126. package/dist/components/Table/Table.tokens.js +2 -2
  127. package/dist/components/Table/TableWrapper.js +7 -13
  128. package/dist/components/Tabs/Tab.js +15 -23
  129. package/dist/components/Tabs/TabList.js +13 -20
  130. package/dist/components/Tabs/TabPanel.js +6 -7
  131. package/dist/components/Tabs/TabPanels.js +4 -6
  132. package/dist/components/Tabs/Tabs.js +15 -21
  133. package/dist/components/Tabs/Tabs.tokens.js +2 -2
  134. package/dist/components/Tag/Tag.js +6 -7
  135. package/dist/components/Tag/Tag.tokens.js +2 -2
  136. package/dist/components/TextArea/TextArea.js +18 -24
  137. package/dist/components/TextInput/CharCounter.js +5 -7
  138. package/dist/components/TextInput/TextInput.js +26 -34
  139. package/dist/components/TextInput/TextInput.styles.js +3 -3
  140. package/dist/components/TextInput/TextInput.tokens.js +2 -2
  141. package/dist/components/ToggleBar/ToggleBar.js +14 -17
  142. package/dist/components/ToggleBar/ToggleBar.tokens.js +4 -4
  143. package/dist/components/ToggleBar/ToggleRadio.js +9 -17
  144. package/dist/components/ToggleBar/ToggleRadio.styles.js +2 -2
  145. package/dist/components/ToggleButton/ToggleButton.js +5 -6
  146. package/dist/components/ToggleButton/ToggleButton.tokens.js +1 -1
  147. package/dist/components/ToggleButton/ToggleButtonGroup.js +8 -9
  148. package/dist/components/Tooltip/Tooltip.js +28 -34
  149. package/dist/components/Tooltip/Tooltip.tokens.js +1 -1
  150. package/dist/components/Typography/Caption/Caption.js +4 -5
  151. package/dist/components/Typography/Heading/Heading.js +6 -15
  152. package/dist/components/Typography/Label/Label.js +5 -6
  153. package/dist/components/Typography/Legend/Legend.js +4 -5
  154. package/dist/components/Typography/Link/Link.js +9 -10
  155. package/dist/components/Typography/Paragraph/Paragraph.js +6 -7
  156. package/dist/components/Typography/Typography/Typography.js +17 -24
  157. package/dist/components/Typography/Typography.tokens.js +2 -2
  158. package/dist/components/Typography/Typography.utils.js +0 -8
  159. package/dist/components/VisuallyHidden/VisuallyHidden.js +5 -7
  160. package/dist/helpers/Backdrop/Backdrop.utils.js +0 -1
  161. package/dist/helpers/Chevron/AnimatedChevronUpDown.js +4 -4
  162. package/dist/helpers/Input/Input.styles.d.ts +1 -1
  163. package/dist/helpers/Input/Input.styles.js +1 -2
  164. package/dist/helpers/Input/Input.tokens.js +2 -2
  165. package/dist/helpers/Input/Input.utils.js +0 -4
  166. package/dist/helpers/Paper/Paper.js +1 -8
  167. package/dist/helpers/Paper/Paper.tokens.js +2 -2
  168. package/dist/helpers/SelectionControl/SelectionControl.styles.js +4 -4
  169. package/dist/helpers/SelectionControl/SelectionControl.tokens.js +2 -2
  170. package/dist/helpers/styling/focusVisible.js +2 -2
  171. package/dist/helpers/styling/hover.js +1 -1
  172. package/dist/hooks/useCombinedRefs.js +0 -2
  173. package/dist/hooks/useFloatPosition.js +21 -30
  174. package/dist/hooks/useFocusTrap.js +0 -6
  175. package/dist/hooks/useMountTransition.js +3 -5
  176. package/dist/hooks/useOnClickOutside.js +0 -5
  177. package/dist/hooks/useOnKeyDown.js +0 -3
  178. package/dist/hooks/useReturnFocusOnBlur.js +0 -5
  179. package/dist/hooks/useRoveFocus.js +3 -8
  180. package/dist/hooks/useScreenSize.js +6 -13
  181. package/dist/icons/tsx/apps.js +1 -2
  182. package/dist/icons/tsx/archive.js +1 -2
  183. package/dist/icons/tsx/arrowDown.js +1 -2
  184. package/dist/icons/tsx/arrowLeft.js +1 -2
  185. package/dist/icons/tsx/arrowRight.js +1 -2
  186. package/dist/icons/tsx/arrowUp.js +1 -2
  187. package/dist/icons/tsx/attachment.js +1 -2
  188. package/dist/icons/tsx/block.js +1 -2
  189. package/dist/icons/tsx/book.js +1 -2
  190. package/dist/icons/tsx/build.js +1 -2
  191. package/dist/icons/tsx/buildCircled.js +1 -2
  192. package/dist/icons/tsx/calendar.js +1 -2
  193. package/dist/icons/tsx/calendarMonth.js +1 -2
  194. package/dist/icons/tsx/calendarViewDay.js +1 -2
  195. package/dist/icons/tsx/calendarViewMonth.js +1 -2
  196. package/dist/icons/tsx/calendarViewWeek.js +1 -2
  197. package/dist/icons/tsx/call.js +1 -2
  198. package/dist/icons/tsx/chat.js +1 -2
  199. package/dist/icons/tsx/check.js +1 -2
  200. package/dist/icons/tsx/checkCircled.js +1 -2
  201. package/dist/icons/tsx/checklist.js +1 -2
  202. package/dist/icons/tsx/chevronDown.js +1 -2
  203. package/dist/icons/tsx/chevronFirst.js +1 -2
  204. package/dist/icons/tsx/chevronLargeLeft.js +1 -2
  205. package/dist/icons/tsx/chevronLargeRight.js +1 -2
  206. package/dist/icons/tsx/chevronLast.js +1 -2
  207. package/dist/icons/tsx/chevronLeft.js +1 -2
  208. package/dist/icons/tsx/chevronRight.js +1 -2
  209. package/dist/icons/tsx/chevronUp.js +1 -2
  210. package/dist/icons/tsx/close.js +1 -2
  211. package/dist/icons/tsx/closeCircled.js +1 -2
  212. package/dist/icons/tsx/closeSmall.js +1 -2
  213. package/dist/icons/tsx/cloud.js +1 -2
  214. package/dist/icons/tsx/collapse.js +1 -2
  215. package/dist/icons/tsx/comment.js +1 -2
  216. package/dist/icons/tsx/copy.js +1 -2
  217. package/dist/icons/tsx/court.js +1 -2
  218. package/dist/icons/tsx/dateRange.js +1 -2
  219. package/dist/icons/tsx/deaths.js +1 -2
  220. package/dist/icons/tsx/download.js +1 -2
  221. package/dist/icons/tsx/downloadDone.js +1 -2
  222. package/dist/icons/tsx/dragHandle.js +1 -2
  223. package/dist/icons/tsx/edit.js +1 -2
  224. package/dist/icons/tsx/error.js +1 -2
  225. package/dist/icons/tsx/exclaim.js +1 -2
  226. package/dist/icons/tsx/expand.js +1 -2
  227. package/dist/icons/tsx/facebook.js +1 -2
  228. package/dist/icons/tsx/family.js +1 -2
  229. package/dist/icons/tsx/feedback.js +1 -2
  230. package/dist/icons/tsx/file.js +1 -2
  231. package/dist/icons/tsx/fileAdd.js +1 -2
  232. package/dist/icons/tsx/fileText.js +1 -2
  233. package/dist/icons/tsx/filter.js +1 -2
  234. package/dist/icons/tsx/filterList.js +1 -2
  235. package/dist/icons/tsx/filterListOff.js +1 -2
  236. package/dist/icons/tsx/filterOff.js +1 -2
  237. package/dist/icons/tsx/findInPage.js +1 -2
  238. package/dist/icons/tsx/folder.js +1 -2
  239. package/dist/icons/tsx/folderAdd.js +1 -2
  240. package/dist/icons/tsx/fullsceenExit.js +1 -2
  241. package/dist/icons/tsx/fullscreen.js +1 -2
  242. package/dist/icons/tsx/gavel.js +1 -2
  243. package/dist/icons/tsx/help.js +1 -2
  244. package/dist/icons/tsx/helpFilled.js +1 -2
  245. package/dist/icons/tsx/home.js +1 -2
  246. package/dist/icons/tsx/image.js +1 -2
  247. package/dist/icons/tsx/info.js +1 -2
  248. package/dist/icons/tsx/instagram.js +1 -2
  249. package/dist/icons/tsx/jordskifterett.js +1 -2
  250. package/dist/icons/tsx/key.js +1 -2
  251. package/dist/icons/tsx/lagmannsrett.js +1 -2
  252. package/dist/icons/tsx/language.js +1 -2
  253. package/dist/icons/tsx/link.js +1 -2
  254. package/dist/icons/tsx/linkOff.js +1 -2
  255. package/dist/icons/tsx/linkedIn.js +1 -2
  256. package/dist/icons/tsx/list.js +1 -2
  257. package/dist/icons/tsx/listAlt.js +1 -2
  258. package/dist/icons/tsx/location.js +1 -2
  259. package/dist/icons/tsx/lock.js +1 -2
  260. package/dist/icons/tsx/lockOpen.js +1 -2
  261. package/dist/icons/tsx/login.js +1 -2
  262. package/dist/icons/tsx/logout.js +1 -2
  263. package/dist/icons/tsx/mail.js +1 -2
  264. package/dist/icons/tsx/mailOpen.js +1 -2
  265. package/dist/icons/tsx/menu.js +1 -2
  266. package/dist/icons/tsx/minus.js +1 -2
  267. package/dist/icons/tsx/minusCircled.js +1 -2
  268. package/dist/icons/tsx/moreHorizontal.js +1 -2
  269. package/dist/icons/tsx/moreVertical.js +1 -2
  270. package/dist/icons/tsx/notarial.js +1 -2
  271. package/dist/icons/tsx/notifications.js +1 -2
  272. package/dist/icons/tsx/notificationsOff.js +1 -2
  273. package/dist/icons/tsx/onlineMeeting.js +1 -2
  274. package/dist/icons/tsx/openExternal.js +1 -2
  275. package/dist/icons/tsx/pdf.js +1 -2
  276. package/dist/icons/tsx/person.js +1 -2
  277. package/dist/icons/tsx/personAdd.js +1 -2
  278. package/dist/icons/tsx/pin.js +1 -2
  279. package/dist/icons/tsx/plus.js +1 -2
  280. package/dist/icons/tsx/plusCircled.js +1 -2
  281. package/dist/icons/tsx/print.js +1 -2
  282. package/dist/icons/tsx/property.js +1 -2
  283. package/dist/icons/tsx/publish.js +1 -2
  284. package/dist/icons/tsx/questionAnswer.js +1 -2
  285. package/dist/icons/tsx/receipt.js +1 -2
  286. package/dist/icons/tsx/redo.js +1 -2
  287. package/dist/icons/tsx/refresh.js +1 -2
  288. package/dist/icons/tsx/replay.js +1 -2
  289. package/dist/icons/tsx/search.js +1 -2
  290. package/dist/icons/tsx/settings.js +1 -2
  291. package/dist/icons/tsx/sms.js +1 -2
  292. package/dist/icons/tsx/star.js +1 -2
  293. package/dist/icons/tsx/starFilled.js +1 -2
  294. package/dist/icons/tsx/sync.js +1 -2
  295. package/dist/icons/tsx/time.js +1 -2
  296. package/dist/icons/tsx/tingrett.js +1 -2
  297. package/dist/icons/tsx/tip.js +1 -2
  298. package/dist/icons/tsx/trash.js +1 -2
  299. package/dist/icons/tsx/twitter.js +1 -2
  300. package/dist/icons/tsx/undo.js +1 -2
  301. package/dist/icons/tsx/unfoldLess.js +1 -2
  302. package/dist/icons/tsx/unfoldMore.js +1 -2
  303. package/dist/icons/tsx/upload.js +1 -2
  304. package/dist/icons/tsx/visibilityOff.js +1 -2
  305. package/dist/icons/tsx/visibilityOn.js +1 -2
  306. package/dist/icons/tsx/warning.js +1 -2
  307. package/dist/icons/tsx/zoomIn.js +1 -2
  308. package/dist/icons/tsx/zoomOut.js +1 -2
  309. package/dist/index.d.ts +1 -0
  310. package/dist/index.js +2 -0
  311. package/dist/types/BaseComponentProps.js +6 -12
  312. package/dist/types/index.d.ts +1 -0
  313. package/dist/types/utils.d.ts +7 -0
  314. package/dist/utils/color.js +0 -1
  315. package/dist/utils/combineHandlers.js +0 -1
  316. package/package.json +1 -1
@@ -7,7 +7,6 @@ function _typeof(obj) {
7
7
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8
8
  }, _typeof(obj);
9
9
  }
10
-
11
10
  function _defineProperty(obj, key, value) {
12
11
  if (key in obj) {
13
12
  Object.defineProperty(obj, key, {
@@ -19,44 +18,33 @@ function _defineProperty(obj, key, value) {
19
18
  } else {
20
19
  obj[key] = value;
21
20
  }
22
-
23
21
  return obj;
24
22
  }
25
-
26
23
  function _slicedToArray(arr, i) {
27
24
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
28
25
  }
29
-
30
26
  function _toConsumableArray(arr) {
31
27
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
32
28
  }
33
-
34
29
  function _arrayWithoutHoles(arr) {
35
30
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
36
31
  }
37
-
38
32
  function _arrayWithHoles(arr) {
39
33
  if (Array.isArray(arr)) return arr;
40
34
  }
41
-
42
35
  function _iterableToArray(iter) {
43
36
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
44
37
  }
45
-
46
38
  function _iterableToArrayLimit(arr, i) {
47
39
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
48
-
49
40
  if (_i == null) return;
50
41
  var _arr = [];
51
42
  var _n = true;
52
43
  var _d = false;
53
-
54
44
  var _s, _e;
55
-
56
45
  try {
57
46
  for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
58
47
  _arr.push(_s.value);
59
-
60
48
  if (i && _arr.length === i) break;
61
49
  }
62
50
  } catch (err) {
@@ -69,10 +57,8 @@ function _iterableToArrayLimit(arr, i) {
69
57
  if (_d) throw _e;
70
58
  }
71
59
  }
72
-
73
60
  return _arr;
74
61
  }
75
-
76
62
  function _unsupportedIterableToArray(o, minLen) {
77
63
  if (!o) return;
78
64
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -81,33 +67,24 @@ function _unsupportedIterableToArray(o, minLen) {
81
67
  if (n === "Map" || n === "Set") return Array.from(o);
82
68
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
83
69
  }
84
-
85
70
  function _arrayLikeToArray(arr, len) {
86
71
  if (len == null || len > arr.length) len = arr.length;
87
-
88
72
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
89
-
90
73
  return arr2;
91
74
  }
92
-
93
75
  function _nonIterableSpread() {
94
76
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
95
77
  }
96
-
97
78
  function _nonIterableRest() {
98
79
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
99
80
  }
100
-
101
81
  function _createForOfIteratorHelper(o, allowArrayLike) {
102
82
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
103
-
104
83
  if (!it) {
105
84
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
106
85
  if (it) o = it;
107
86
  var i = 0;
108
-
109
87
  var F = function () {};
110
-
111
88
  return {
112
89
  s: F,
113
90
  n: function () {
@@ -125,13 +102,11 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
125
102
  f: F
126
103
  };
127
104
  }
128
-
129
105
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
130
106
  }
131
-
132
107
  var normalCompletion = true,
133
- didErr = false,
134
- err;
108
+ didErr = false,
109
+ err;
135
110
  return {
136
111
  s: function () {
137
112
  it = it.call(o);
@@ -0,0 +1,2 @@
1
+ import { InlineEditProps } from './InlineEdit.types';
2
+ export declare const InlineEdit: (props: InlineEditProps) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
4
+ argTypes: {
5
+ emptiable: {
6
+ control: {
7
+ type: string;
8
+ };
9
+ };
10
+ error: {
11
+ control: {
12
+ type: string;
13
+ };
14
+ };
15
+ errorMessage: {
16
+ control: {
17
+ type: string;
18
+ };
19
+ };
20
+ width: {
21
+ control: {
22
+ type: string;
23
+ };
24
+ };
25
+ };
26
+ parameters: {
27
+ controls: {
28
+ exclude: string[];
29
+ };
30
+ };
31
+ };
32
+ export default _default;
33
+ export declare const OverviewInputTypes: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Property } from 'csstype';
2
+ export declare const defaultWidth: Property.Width;
3
+ export declare const getInlineEditInputStyling: (isEditing?: boolean) => import("styled-components").FlattenSimpleInterpolation;
4
+ export declare const IconWrapper: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -0,0 +1,25 @@
1
+ export declare const inlineEditTokens: {
2
+ inlineEdit: {
3
+ padding: string;
4
+ paddingLeft: string;
5
+ font: {
6
+ lineHeight: any;
7
+ fontSize: string;
8
+ letterSpacing: any;
9
+ fontFamily: any;
10
+ fontWeight: any;
11
+ fontStyle: any;
12
+ };
13
+ backgroundColor: string;
14
+ hover: {
15
+ backgroundColor: string;
16
+ };
17
+ focus: {
18
+ backgroundColor: string;
19
+ };
20
+ };
21
+ iconWrapper: {
22
+ top: string;
23
+ left: string;
24
+ };
25
+ };
@@ -0,0 +1,33 @@
1
+ import { Property } from 'csstype';
2
+ import { InputHTMLAttributes, ReactNode, RefObject, TextareaHTMLAttributes } from 'react';
3
+ export declare type BaseInlineInputProps = {
4
+ /**Spesifiserer error state. Hvis `errorMessage` ikke brukes må inputfeltet knyttes med ARIA til en feilmelding som vises andre steder i applikasjonen. */
5
+ error?: boolean;
6
+ /**Feilmelding. Setter også error state. */
7
+ errorMessage?: string;
8
+ /** Bredde på komponenten. */
9
+ width?: Property.Width;
10
+ /** **OBS!** settes automatisk av forelder. Spesifiserer om brukeren kan tømme inputfeltet. */
11
+ emptiable?: boolean;
12
+ /** **OBS!** settes automatisk av forelder. Spesifiserer om komponenten er i redigeringsmodus. */
13
+ isEditing?: boolean;
14
+ };
15
+ export declare type InlineEditProps = {
16
+ /**Callback for når verdien blir lagret. */
17
+ onSetValue?: (value: string) => void;
18
+ /** Ref til barnet. */
19
+ inputRef: RefObject<HTMLElement>;
20
+ /** Barn (inputelementet). */
21
+ children: ReactNode;
22
+ /**Spesifiserer om brukeren kan tømme inputfeltet. */
23
+ emptiable?: boolean;
24
+ /**Ekstra callback ved `onChange`-event. */
25
+ onChange?: () => void;
26
+ /**Ekstra callback ved `onFocus`-event. */
27
+ onFocus?: () => void;
28
+ /**Ekstra callback ved `onBlur`-event. */
29
+ onBlur?: () => void;
30
+ } & Pick<InputHTMLAttributes<HTMLInputElement>, 'value'>;
31
+ export declare type CommonInlineEditWrapperProps = Pick<InlineEditProps, 'onSetValue' | 'emptiable' | 'onBlur' | 'onFocus' | 'onChange'> & Pick<BaseInlineInputProps, 'error' | 'errorMessage' | 'width'>;
32
+ export declare type InlineEditTextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onFocus' | 'onBlur'> & CommonInlineEditWrapperProps;
33
+ export declare type InlineEditInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'width' | 'onChange' | 'onFocus' | 'onBlur'> & CommonInlineEditWrapperProps;
@@ -0,0 +1 @@
1
+ export declare const inlineEditVisuallyHidden: (id: string, emptiable?: boolean) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const InlineEditInput: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "width" | "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,36 @@
1
+ import { InlineEditInputProps } from './InlineEdit.types';
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onFocus" | "onBlur" | "onChange" | "width"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
5
+ argTypes: {
6
+ emptiable: {
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ error: {
12
+ control: {
13
+ type: string;
14
+ };
15
+ };
16
+ errorMessage: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ };
21
+ width: {
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ };
27
+ parameters: {
28
+ controls: {
29
+ exclude: string[];
30
+ };
31
+ };
32
+ };
33
+ export default _default;
34
+ export declare const Overview: (args: InlineEditInputProps) => JSX.Element;
35
+ export declare const Default: (args: InlineEditInputProps) => JSX.Element;
36
+ export declare const InTable: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const InlineEditTextArea: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "onFocus" | "onBlur"> & Pick<import("./InlineEdit.types").InlineEditProps, "onChange" | "onFocus" | "onBlur" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "error" | "errorMessage" | "width"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,36 @@
1
+ import { InlineEditTextAreaProps } from './InlineEdit.types';
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onFocus" | "onBlur" | "onChange"> & Pick<import("./InlineEdit.types").InlineEditProps, "onFocus" | "onBlur" | "onChange" | "onSetValue" | "emptiable"> & Pick<import("./InlineEdit.types").BaseInlineInputProps, "width" | "error" | "errorMessage"> & import("react").RefAttributes<HTMLTextAreaElement>>;
5
+ argTypes: {
6
+ emptiable: {
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ error: {
12
+ control: {
13
+ type: string;
14
+ };
15
+ };
16
+ errorMessage: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ };
21
+ width: {
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ };
27
+ parameters: {
28
+ controls: {
29
+ exclude: string[];
30
+ };
31
+ };
32
+ };
33
+ export default _default;
34
+ export declare const Overview: (args: InlineEditTextAreaProps) => JSX.Element;
35
+ export declare const Default: (args: InlineEditTextAreaProps) => JSX.Element;
36
+ export declare const InTable: () => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ import { BaseInlineInputProps } from './InlineEdit.types';
3
+ export declare type InlineInputProps = BaseInlineInputProps & InputHTMLAttributes<HTMLInputElement>;
4
+ export declare const InlineInput: import("react").ForwardRefExoticComponent<BaseInlineInputProps & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,4 @@
1
+ import { TextareaHTMLAttributes } from 'react';
2
+ import { BaseInlineInputProps } from './InlineEdit.types';
3
+ export declare type InlineTextAreaProps = BaseInlineInputProps & TextareaHTMLAttributes<HTMLTextAreaElement>;
4
+ export declare const InlineTextArea: import("react").ForwardRefExoticComponent<BaseInlineInputProps & TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -0,0 +1,3 @@
1
+ export * from './InlineEditTextArea';
2
+ export * from './InlineEditInput';
3
+ export type { InlineEditTextAreaProps, InlineEditInputProps, } from './InlineEdit.types';
@@ -1,6 +1,7 @@
1
+ import { ExtractStrict } from '../../types';
1
2
  import { ButtonProps, ButtonPurpose, ButtonSize } from '../Button';
2
3
  import { OverflowMenuButtonItem } from '../OverflowMenu';
3
- export declare type SplitButtonPurpose = Extract<ButtonPurpose, 'primary' | 'secondary'>;
4
+ export declare type SplitButtonPurpose = ExtractStrict<ButtonPurpose, 'primary' | 'secondary'>;
4
5
  export declare type SplitButtonProps = {
5
6
  /**Størrelse på komponenten. */
6
7
  size?: ButtonSize;
@@ -4,7 +4,7 @@ export declare const StatefulInput: import("styled-components").StyledComponent<
4
4
  hasErrorMessage: boolean;
5
5
  } & Pick<import("./Input.types").InputProps, "componentSize">, never>;
6
6
  declare type OuterInputContainerProps = {
7
- width?: Property.Width<string>;
7
+ width?: Property.Width;
8
8
  };
9
9
  export declare const OuterInputContainer: import("styled-components").StyledComponent<"div", any, OuterInputContainerProps, never>;
10
10
  /**Brukes som container til input og ikon for posisjonering. */
@@ -39,5 +39,6 @@ export * from './components/ToggleBar';
39
39
  export * from './components/Grid';
40
40
  export * from './components/ProgressTracker';
41
41
  export * from './hooks';
42
+ export * from './components/InlineEdit';
42
43
  export * from './components/TextArea';
43
44
  export * from './components/SplitButton';