@ntbjs/react-components 2.0.0-rc.11 → 2.0.0-rc.13

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 (183) hide show
  1. package/cjs/components/data/Alert/Alert.js +8 -10
  2. package/cjs/components/data/Alert/Alert.styled.js +17 -10
  3. package/cjs/components/data/Badge/Badge.js +13 -13
  4. package/cjs/components/data/Badge/Badge.styled.js +37 -26
  5. package/cjs/components/data/Popover/Popover.js +4 -2
  6. package/cjs/components/data/Tab/Tab.styled.js +6 -1
  7. package/cjs/components/data/Tabs/Tabs.js +22 -12
  8. package/cjs/components/data/Tabs/Tabs.styled.js +29 -16
  9. package/cjs/components/data/Tooltip/Tooltip.js +3 -1
  10. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
  11. package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
  12. package/cjs/components/inputs/ActionButton/ActionButton.js +5 -3
  13. package/cjs/components/inputs/ActionButton/ActionButton.styled.js +17 -8
  14. package/cjs/components/inputs/Button/Button.js +45 -38
  15. package/cjs/components/inputs/Button/Button.styled.js +84 -38
  16. package/cjs/components/inputs/Checkbox/Checkbox.js +1 -1
  17. package/cjs/components/inputs/Checkbox/Checkbox.styled.js +23 -8
  18. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +2 -2
  19. package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
  20. package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
  21. package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
  22. package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
  23. package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
  24. package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
  25. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
  26. package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
  27. package/cjs/components/inputs/MultiSelect/MultiSelect.js +5 -48
  28. package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +27 -31
  29. package/cjs/components/inputs/Radio/Radio.styled.js +9 -2
  30. package/cjs/components/inputs/Switch/Switch.js +1 -1
  31. package/cjs/components/inputs/Switch/Switch.styled.js +22 -7
  32. package/cjs/components/inputs/TextArea/TextArea.js +10 -20
  33. package/cjs/components/inputs/TextArea/TextArea.styled.js +208 -133
  34. package/cjs/components/inputs/TextInput/TextInput.js +21 -22
  35. package/cjs/components/inputs/TextInput/TextInput.styled.js +58 -45
  36. package/cjs/components/layout/InputGroup/InputGroup.styled.js +6 -1
  37. package/cjs/components/layout/SectionSeparator/SectionSeparator.js +7 -7
  38. package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
  39. package/cjs/components/widgets/AssetAction/AssetAction.js +1 -1
  40. package/cjs/components/widgets/AssetAction/AssetAction.styled.js +16 -5
  41. package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
  42. package/cjs/components/widgets/AssetGallery/AssetGallery.js +5 -1
  43. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
  44. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
  45. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
  46. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
  47. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
  48. package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
  49. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
  50. package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
  51. package/cjs/components/widgets/ContextMenu/ContextMenu.js +2 -1
  52. package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
  53. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
  54. package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
  55. package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
  56. package/cjs/components/widgets/InfoCard/InfoCard.js +17 -9
  57. package/cjs/components/widgets/InfoCard/InfoCard.styled.js +40 -13
  58. package/cjs/components/widgets/ProgressBar/ProgressBar.js +43 -22
  59. package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +78 -22
  60. package/cjs/components/widgets/SummaryCard/SummaryCard.js +9 -8
  61. package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
  62. package/cjs/components/widgets/widgets/index.js +0 -2
  63. package/cjs/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
  64. package/cjs/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +54 -12
  65. package/cjs/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +10 -7
  66. package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
  67. package/cjs/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
  68. package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
  69. package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
  70. package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +1 -1
  71. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
  72. package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
  73. package/cjs/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
  74. package/cjs/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
  75. package/cjs/node_modules/react/cjs/react.development.js +125 -82
  76. package/cjs/node_modules/react/cjs/react.production.js +88 -92
  77. package/cjs/node_modules/react-dom/cjs/react-dom.development.js +1 -1
  78. package/cjs/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  79. package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +5 -5
  80. package/cjs/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +23 -17
  81. package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +47 -47
  82. package/cjs/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +3 -3
  83. package/cjs/node_modules/use-isomorphic-layout-effect/dist/{use-isomorphic-layout-effect.browser.esm.js → use-isomorphic-layout-effect.esm.js} +4 -1
  84. package/cjs/styles/utils/colors-export.js +41 -0
  85. package/cjs/utils/defaultTheme.js +28 -5
  86. package/esm/components/data/Alert/Alert.js +8 -10
  87. package/esm/components/data/Alert/Alert.styled.js +17 -10
  88. package/esm/components/data/Badge/Badge.js +13 -13
  89. package/esm/components/data/Badge/Badge.styled.js +37 -26
  90. package/esm/components/data/Popover/Popover.js +4 -2
  91. package/esm/components/data/Tab/Tab.styled.js +6 -1
  92. package/esm/components/data/Tabs/Tabs.js +23 -13
  93. package/esm/components/data/Tabs/Tabs.styled.js +29 -16
  94. package/esm/components/data/Tooltip/Tooltip.js +3 -1
  95. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
  96. package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
  97. package/esm/components/inputs/ActionButton/ActionButton.js +5 -3
  98. package/esm/components/inputs/ActionButton/ActionButton.styled.js +17 -8
  99. package/esm/components/inputs/Button/Button.js +45 -38
  100. package/esm/components/inputs/Button/Button.styled.js +84 -38
  101. package/esm/components/inputs/Checkbox/Checkbox.js +1 -1
  102. package/esm/components/inputs/Checkbox/Checkbox.styled.js +23 -8
  103. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +4 -4
  104. package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
  105. package/esm/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
  106. package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
  107. package/esm/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
  108. package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
  109. package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
  110. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
  111. package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
  112. package/esm/components/inputs/MultiSelect/MultiSelect.js +6 -49
  113. package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +28 -28
  114. package/esm/components/inputs/Radio/Radio.styled.js +9 -2
  115. package/esm/components/inputs/Switch/Switch.js +1 -1
  116. package/esm/components/inputs/Switch/Switch.styled.js +22 -7
  117. package/esm/components/inputs/TextArea/TextArea.js +10 -20
  118. package/esm/components/inputs/TextArea/TextArea.styled.js +208 -133
  119. package/esm/components/inputs/TextInput/TextInput.js +21 -22
  120. package/esm/components/inputs/TextInput/TextInput.styled.js +58 -45
  121. package/esm/components/layout/InputGroup/InputGroup.styled.js +6 -1
  122. package/esm/components/layout/SectionSeparator/SectionSeparator.js +7 -7
  123. package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
  124. package/esm/components/widgets/AssetAction/AssetAction.js +1 -1
  125. package/esm/components/widgets/AssetAction/AssetAction.styled.js +16 -5
  126. package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
  127. package/esm/components/widgets/AssetGallery/AssetGallery.js +5 -1
  128. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
  129. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
  130. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
  131. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
  132. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
  133. package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
  134. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
  135. package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
  136. package/esm/components/widgets/ContextMenu/ContextMenu.js +2 -1
  137. package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
  138. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
  139. package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
  140. package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
  141. package/esm/components/widgets/InfoCard/InfoCard.js +10 -2
  142. package/esm/components/widgets/InfoCard/InfoCard.styled.js +40 -13
  143. package/esm/components/widgets/ProgressBar/ProgressBar.js +31 -10
  144. package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +77 -23
  145. package/esm/components/widgets/SummaryCard/SummaryCard.js +9 -8
  146. package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
  147. package/esm/components/widgets/widgets/index.js +0 -1
  148. package/esm/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
  149. package/esm/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +47 -5
  150. package/esm/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +3 -3
  151. package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
  152. package/esm/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
  153. package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
  154. package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
  155. package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +4 -4
  156. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
  157. package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
  158. package/esm/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
  159. package/esm/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
  160. package/esm/node_modules/react/cjs/react.development.js +125 -82
  161. package/esm/node_modules/react/cjs/react.production.js +88 -92
  162. package/esm/node_modules/react-dom/cjs/react-dom.development.js +1 -1
  163. package/esm/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  164. package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +3 -3
  165. package/esm/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +12 -6
  166. package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +2 -2
  167. package/esm/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +1 -1
  168. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +9 -0
  169. package/esm/styles/utils/colors-export.js +37 -0
  170. package/esm/utils/defaultTheme.js +28 -5
  171. package/package.json +16 -22
  172. package/styles/utils/colors-export.js +35 -0
  173. package/cjs/components/widgets/Instructions/Instructions.js +0 -217
  174. package/cjs/components/widgets/Instructions/Instructions.styled.js +0 -47
  175. package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +0 -9
  176. package/cjs/styles/utils/colors.scss.js +0 -11
  177. package/esm/components/widgets/Instructions/Instructions.js +0 -213
  178. package/esm/components/widgets/Instructions/Instructions.styled.js +0 -36
  179. package/esm/components/widgets/Instructions/widgets/Instructions/index.js +0 -1
  180. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -6
  181. package/esm/styles/utils/colors.scss.js +0 -7
  182. package/styles/config.scss +0 -37
  183. /package/styles/utils/{colors.scss → .colors.scss} +0 -0
@@ -21,6 +21,7 @@ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
21
21
  REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
22
22
  REACT_MEMO_TYPE = Symbol.for("react.memo"),
23
23
  REACT_LAZY_TYPE = Symbol.for("react.lazy"),
24
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
24
25
  MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
25
26
  function getIteratorFn(maybeIterable) {
26
27
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
@@ -72,28 +73,22 @@ var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
72
73
  pureComponentPrototype.constructor = PureComponent;
73
74
  assign(pureComponentPrototype, Component.prototype);
74
75
  pureComponentPrototype.isPureReactComponent = !0;
75
- var isArrayImpl = Array.isArray,
76
- ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null },
76
+ var isArrayImpl = Array.isArray;
77
+ function noop() {}
78
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null },
77
79
  hasOwnProperty = Object.prototype.hasOwnProperty;
78
- function ReactElement(type, key, self, source, owner, props) {
79
- self = props.ref;
80
+ function ReactElement(type, key, props) {
81
+ var refProp = props.ref;
80
82
  return {
81
83
  $$typeof: REACT_ELEMENT_TYPE,
82
84
  type: type,
83
85
  key: key,
84
- ref: void 0 !== self ? self : null,
86
+ ref: void 0 !== refProp ? refProp : null,
85
87
  props: props
86
88
  };
87
89
  }
88
90
  function cloneAndReplaceKey(oldElement, newKey) {
89
- return ReactElement(
90
- oldElement.type,
91
- newKey,
92
- void 0,
93
- void 0,
94
- void 0,
95
- oldElement.props
96
- );
91
+ return ReactElement(oldElement.type, newKey, oldElement.props);
97
92
  }
98
93
  function isValidElement(object) {
99
94
  return (
@@ -117,7 +112,6 @@ function getElementKey(element, index) {
117
112
  ? escape("" + element.key)
118
113
  : index.toString(36);
119
114
  }
120
- function noop$1() {}
121
115
  function resolveThenable(thenable) {
122
116
  switch (thenable.status) {
123
117
  case "fulfilled":
@@ -127,7 +121,7 @@ function resolveThenable(thenable) {
127
121
  default:
128
122
  switch (
129
123
  ("string" === typeof thenable.status
130
- ? thenable.then(noop$1, noop$1)
124
+ ? thenable.then(noop, noop)
131
125
  : ((thenable.status = "pending"),
132
126
  thenable.then(
133
127
  function (fulfilledValue) {
@@ -288,68 +282,69 @@ function lazyInitializer(payload) {
288
282
  throw payload._result;
289
283
  }
290
284
  var reportGlobalError =
291
- "function" === typeof reportError
292
- ? reportError
293
- : function (error) {
294
- if (
295
- "object" === typeof window &&
296
- "function" === typeof window.ErrorEvent
297
- ) {
298
- var event = new window.ErrorEvent("error", {
299
- bubbles: !0,
300
- cancelable: !0,
301
- message:
302
- "object" === typeof error &&
303
- null !== error &&
304
- "string" === typeof error.message
305
- ? String(error.message)
306
- : String(error),
307
- error: error
308
- });
309
- if (!window.dispatchEvent(event)) return;
310
- } else if (
311
- "object" === typeof process &&
312
- "function" === typeof process.emit
313
- ) {
314
- process.emit("uncaughtException", error);
315
- return;
316
- }
317
- console.error(error);
318
- };
319
- function noop() {}
320
- react_production.Children = {
321
- map: mapChildren,
322
- forEach: function (children, forEachFunc, forEachContext) {
323
- mapChildren(
324
- children,
325
- function () {
326
- forEachFunc.apply(this, arguments);
327
- },
328
- forEachContext
329
- );
330
- },
331
- count: function (children) {
332
- var n = 0;
333
- mapChildren(children, function () {
334
- n++;
335
- });
336
- return n;
337
- },
338
- toArray: function (children) {
339
- return (
340
- mapChildren(children, function (child) {
341
- return child;
342
- }) || []
343
- );
344
- },
345
- only: function (children) {
346
- if (!isValidElement(children))
347
- throw Error(
348
- "React.Children.only expected to receive a single React element child."
285
+ "function" === typeof reportError
286
+ ? reportError
287
+ : function (error) {
288
+ if (
289
+ "object" === typeof window &&
290
+ "function" === typeof window.ErrorEvent
291
+ ) {
292
+ var event = new window.ErrorEvent("error", {
293
+ bubbles: !0,
294
+ cancelable: !0,
295
+ message:
296
+ "object" === typeof error &&
297
+ null !== error &&
298
+ "string" === typeof error.message
299
+ ? String(error.message)
300
+ : String(error),
301
+ error: error
302
+ });
303
+ if (!window.dispatchEvent(event)) return;
304
+ } else if (
305
+ "object" === typeof process &&
306
+ "function" === typeof process.emit
307
+ ) {
308
+ process.emit("uncaughtException", error);
309
+ return;
310
+ }
311
+ console.error(error);
312
+ },
313
+ Children = {
314
+ map: mapChildren,
315
+ forEach: function (children, forEachFunc, forEachContext) {
316
+ mapChildren(
317
+ children,
318
+ function () {
319
+ forEachFunc.apply(this, arguments);
320
+ },
321
+ forEachContext
349
322
  );
350
- return children;
351
- }
352
- };
323
+ },
324
+ count: function (children) {
325
+ var n = 0;
326
+ mapChildren(children, function () {
327
+ n++;
328
+ });
329
+ return n;
330
+ },
331
+ toArray: function (children) {
332
+ return (
333
+ mapChildren(children, function (child) {
334
+ return child;
335
+ }) || []
336
+ );
337
+ },
338
+ only: function (children) {
339
+ if (!isValidElement(children))
340
+ throw Error(
341
+ "React.Children.only expected to receive a single React element child."
342
+ );
343
+ return children;
344
+ }
345
+ };
346
+ react_production.Activity = REACT_ACTIVITY_TYPE;
347
+ react_production.Children = Children;
353
348
  react_production.Component = Component;
354
349
  react_production.Fragment = REACT_FRAGMENT_TYPE;
355
350
  react_production.Profiler = REACT_PROFILER_TYPE;
@@ -369,18 +364,18 @@ react_production.cache = function (fn) {
369
364
  return fn.apply(null, arguments);
370
365
  };
371
366
  };
367
+ react_production.cacheSignal = function () {
368
+ return null;
369
+ };
372
370
  react_production.cloneElement = function (element, config, children) {
373
371
  if (null === element || void 0 === element)
374
372
  throw Error(
375
373
  "The argument must be a React element, but you passed " + element + "."
376
374
  );
377
375
  var props = assign({}, element.props),
378
- key = element.key,
379
- owner = void 0;
376
+ key = element.key;
380
377
  if (null != config)
381
- for (propName in (void 0 !== config.ref && (owner = void 0),
382
- void 0 !== config.key && (key = "" + config.key),
383
- config))
378
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
384
379
  !hasOwnProperty.call(config, propName) ||
385
380
  "key" === propName ||
386
381
  "__self" === propName ||
@@ -394,7 +389,7 @@ react_production.cloneElement = function (element, config, children) {
394
389
  childArray[i] = arguments[i + 2];
395
390
  props.children = childArray;
396
391
  }
397
- return ReactElement(element.type, key, void 0, void 0, owner, props);
392
+ return ReactElement(element.type, key, props);
398
393
  };
399
394
  react_production.createContext = function (defaultValue) {
400
395
  defaultValue = {
@@ -434,7 +429,7 @@ react_production.createElement = function (type, config, children) {
434
429
  for (propName in ((childrenLength = type.defaultProps), childrenLength))
435
430
  void 0 === props[propName] &&
436
431
  (props[propName] = childrenLength[propName]);
437
- return ReactElement(type, key, void 0, void 0, null, props);
432
+ return ReactElement(type, key, props);
438
433
  };
439
434
  react_production.createRef = function () {
440
435
  return { current: null };
@@ -473,7 +468,10 @@ react_production.startTransition = function (scope) {
473
468
  } catch (error) {
474
469
  reportGlobalError(error);
475
470
  } finally {
476
- ReactSharedInternals.T = prevTransition;
471
+ null !== prevTransition &&
472
+ null !== currentTransition.types &&
473
+ (prevTransition.types = currentTransition.types),
474
+ (ReactSharedInternals.T = prevTransition);
477
475
  }
478
476
  };
479
477
  react_production.unstable_useCacheRefresh = function () {
@@ -495,13 +493,11 @@ react_production.useDebugValue = function () {};
495
493
  react_production.useDeferredValue = function (value, initialValue) {
496
494
  return ReactSharedInternals.H.useDeferredValue(value, initialValue);
497
495
  };
498
- react_production.useEffect = function (create, createDeps, update) {
499
- var dispatcher = ReactSharedInternals.H;
500
- if ("function" === typeof update)
501
- throw Error(
502
- "useEffect CRUD overload is not enabled in this build of React."
503
- );
504
- return dispatcher.useEffect(create, createDeps);
496
+ react_production.useEffect = function (create, deps) {
497
+ return ReactSharedInternals.H.useEffect(create, deps);
498
+ };
499
+ react_production.useEffectEvent = function (callback) {
500
+ return ReactSharedInternals.H.useEffectEvent(callback);
505
501
  };
506
502
  react_production.useId = function () {
507
503
  return ReactSharedInternals.H.useId();
@@ -544,4 +540,4 @@ react_production.useSyncExternalStore = function (
544
540
  react_production.useTransition = function () {
545
541
  return ReactSharedInternals.H.useTransition();
546
542
  };
547
- react_production.version = "19.1.0";
543
+ react_production.version = "19.2.0";
@@ -419,7 +419,7 @@ import { r as react } from '../../../_virtual/index.js';
419
419
  reactDom_development.useFormStatus = function () {
420
420
  return resolveDispatcher().useHostTransitionStatus();
421
421
  };
422
- reactDom_development.version = "19.1.0";
422
+ reactDom_development.version = "19.2.0";
423
423
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
424
424
  "function" ===
425
425
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -210,4 +210,4 @@ reactDom_production.useFormState = function (action, initialState, permalink) {
210
210
  reactDom_production.useFormStatus = function () {
211
211
  return ReactSharedInternals.H.useHostTransitionStatus();
212
212
  };
213
- reactDom_production.version = "19.1.0";
213
+ reactDom_production.version = "19.2.0";
@@ -1,9 +1,9 @@
1
1
  import _extends from '../../../@babel/runtime/helpers/esm/extends.js';
2
2
  import '../../../react/index.js';
3
- import { S as Select } from '../../dist/Select-aab027f3.esm.js';
3
+ import { S as Select } from '../../dist/Select-ef7c0426.esm.js';
4
4
  import { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';
5
- import { u as useCreatable } from '../../dist/useCreatable-84008237.esm.js';
6
- export { u as useCreatable } from '../../dist/useCreatable-84008237.esm.js';
5
+ import { u as useCreatable } from '../../dist/useCreatable-09aaeb9a.esm.js';
6
+ export { u as useCreatable } from '../../dist/useCreatable-09aaeb9a.esm.js';
7
7
  import '../../../react-dom/index.js';
8
8
  import { r as react } from '../../../../_virtual/index.js';
9
9
 
@@ -7,7 +7,7 @@ import _createSuper from '../../@babel/runtime/helpers/esm/createSuper.js';
7
7
  import _toConsumableArray from '../../@babel/runtime/helpers/esm/toConsumableArray.js';
8
8
  import '../../react/index.js';
9
9
  import { z as isTouchCapable, A as isMobileDevice, B as multiValueAsValue, C as singleValueAsValue, D as valueTernary, E as classNames, F as defaultComponents, G as isDocumentElement, H as cleanValue, I as scrollIntoView, J as noop, M as MenuPlacer, r as removeProps, a as clearIndicatorCSS, b as containerCSS, d as css$1, e as dropdownIndicatorCSS, g as groupCSS, f as groupHeadingCSS, i as indicatorsContainerCSS, h as indicatorSeparatorCSS, j as inputCSS, l as loadingIndicatorCSS, k as loadingMessageCSS, m as menuCSS, n as menuListCSS, o as menuPortalCSS, p as multiValueCSS, q as multiValueLabelCSS, t as multiValueRemoveCSS, u as noOptionsMessageCSS, v as optionCSS, w as placeholderCSS, x as css$2, y as valueContainerCSS, K as notNullish, s as supportsPassiveEvents } from './index-641ee5b8.esm.js';
10
- import { createElement as jsx, css } from '../../@emotion/react/dist/emotion-react.browser.esm.js';
10
+ import { createElement as jsx, css } from '../../@emotion/react/dist/emotion-react.esm.js';
11
11
  import memoizeOne from '../../memoize-one/dist/memoize-one.esm.js';
12
12
  import _objectWithoutProperties from '../../@babel/runtime/helpers/esm/objectWithoutProperties.js';
13
13
  import { r as react } from '../../../_virtual/index.js';
@@ -1180,7 +1180,8 @@ var Select = /*#__PURE__*/function (_Component) {
1180
1180
  prevWasFocused: false,
1181
1181
  inputIsHiddenAfterUpdate: undefined,
1182
1182
  prevProps: undefined,
1183
- instancePrefix: ''
1183
+ instancePrefix: '',
1184
+ isAppleDevice: false
1184
1185
  };
1185
1186
  _this.blockOptionHover = false;
1186
1187
  _this.isComposing = false;
@@ -1190,7 +1191,6 @@ var Select = /*#__PURE__*/function (_Component) {
1190
1191
  _this.openAfterFocus = false;
1191
1192
  _this.scrollToFocusedOptionOnUpdate = false;
1192
1193
  _this.userIsDragging = void 0;
1193
- _this.isAppleDevice = isAppleDevice();
1194
1194
  _this.controlRef = null;
1195
1195
  _this.getControlRef = function (ref) {
1196
1196
  _this.controlRef = ref;
@@ -1727,6 +1727,12 @@ var Select = /*#__PURE__*/function (_Component) {
1727
1727
  if (this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef) {
1728
1728
  scrollIntoView(this.menuListRef, this.focusedOptionRef);
1729
1729
  }
1730
+ if (isAppleDevice()) {
1731
+ // eslint-disable-next-line react/no-did-mount-set-state
1732
+ this.setState({
1733
+ isAppleDevice: true
1734
+ });
1735
+ }
1730
1736
  }
1731
1737
  }, {
1732
1738
  key: "componentDidUpdate",
@@ -2106,7 +2112,7 @@ var Select = /*#__PURE__*/function (_Component) {
2106
2112
  'aria-labelledby': this.props['aria-labelledby'],
2107
2113
  'aria-required': required,
2108
2114
  role: 'combobox',
2109
- 'aria-activedescendant': this.isAppleDevice ? undefined : this.state.focusedOptionId || ''
2115
+ 'aria-activedescendant': this.state.isAppleDevice ? undefined : this.state.focusedOptionId || ''
2110
2116
  }, menuIsOpen && {
2111
2117
  'aria-controls': this.getElementId('listbox')
2112
2118
  }), !isSearchable && {
@@ -2355,7 +2361,7 @@ var Select = /*#__PURE__*/function (_Component) {
2355
2361
  onMouseOver: onHover,
2356
2362
  tabIndex: -1,
2357
2363
  role: 'option',
2358
- 'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
2364
+ 'aria-selected': _this4.state.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
2359
2365
  };
2360
2366
 
2361
2367
  return /*#__PURE__*/react.exports.createElement(Option, _extends({}, commonProps, {
@@ -2534,7 +2540,7 @@ var Select = /*#__PURE__*/function (_Component) {
2534
2540
  isFocused: isFocused,
2535
2541
  selectValue: selectValue,
2536
2542
  focusableOptions: focusableOptions,
2537
- isAppleDevice: this.isAppleDevice
2543
+ isAppleDevice: this.state.isAppleDevice
2538
2544
  }));
2539
2545
  }
2540
2546
  }, {
@@ -1,6 +1,6 @@
1
1
  import _objectSpread2 from '../../@babel/runtime/helpers/esm/objectSpread2.js';
2
2
  import _extends from '../../@babel/runtime/helpers/esm/extends.js';
3
- import { keyframes, createElement as jsx, css as css$2 } from '../../@emotion/react/dist/emotion-react.browser.esm.js';
3
+ import { keyframes, createElement as jsx, css as css$2 } from '../../@emotion/react/dist/emotion-react.esm.js';
4
4
  import _slicedToArray from '../../@babel/runtime/helpers/esm/slicedToArray.js';
5
5
  import _objectWithoutProperties from '../../@babel/runtime/helpers/esm/objectWithoutProperties.js';
6
6
  import _typeof from '../../@babel/runtime/helpers/esm/typeof.js';
@@ -9,7 +9,7 @@ import _defineProperty from '../../@babel/runtime/helpers/esm/defineProperty.js'
9
9
  import '../../react/index.js';
10
10
  import '../../react-dom/index.js';
11
11
  import { autoUpdate } from '../../@floating-ui/dom/dist/floating-ui.dom.mjs.js';
12
- import index from '../../use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js';
12
+ import index from '../../use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js';
13
13
  import { r as react } from '../../../_virtual/index.js';
14
14
  import { r as reactDom } from '../../../_virtual/index4.js';
15
15
 
@@ -3,7 +3,7 @@ import _toConsumableArray from '../../@babel/runtime/helpers/esm/toConsumableArr
3
3
  import _objectWithoutProperties from '../../@babel/runtime/helpers/esm/objectWithoutProperties.js';
4
4
  import '../../react/index.js';
5
5
  import { H as cleanValue, D as valueTernary } from './index-641ee5b8.esm.js';
6
- import { g as getOptionValue$1, b as getOptionLabel$1 } from './Select-aab027f3.esm.js';
6
+ import { g as getOptionValue$1, b as getOptionLabel$1 } from './Select-ef7c0426.esm.js';
7
7
  import { r as react } from '../../../_virtual/index.js';
8
8
 
9
9
  var _excluded = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"];
@@ -0,0 +1,9 @@
1
+ import '../../react/index.js';
2
+ import { r as react } from '../../../_virtual/index.js';
3
+
4
+ var isClient = typeof document !== 'undefined';
5
+
6
+ var noop = function noop() {};
7
+ var index = isClient ? react.exports.useLayoutEffect : noop;
8
+
9
+ export { index as default };
@@ -0,0 +1,37 @@
1
+ const colors = {
2
+ 'orange-600': '#634e01',
3
+ 'orange-500': '#ff9900',
4
+ 'orange-400': '#ffcb7e',
5
+ 'emerald-600': '#296c58',
6
+ 'emerald-500': '#30826a',
7
+ 'emerald-400': '#64b49d',
8
+ 'emerald-300': '#bfe0d5',
9
+ 'emerald-200': '#f3f9f7',
10
+ 'gray-900': '#141313',
11
+ 'gray-800': '#272727',
12
+ 'gray-700': '#323232',
13
+ 'gray-600': '#505050',
14
+ 'gray-500': '#767676',
15
+ 'gray-400': '#b0b6b9',
16
+ 'gray-300': '#d9dce0',
17
+ 'gray-200': '#eff1f4',
18
+ 'gray-100': '#f7f8f9',
19
+ 'gray-50': '#f4f4f5',
20
+ 'cercise-500': '#5f1031',
21
+ 'cercise-400': '#854962',
22
+ 'cercise-300': '#d099b0',
23
+ 'cercise-200': '#fecaca',
24
+ 'cercise-100': '#f9f3f5',
25
+ 'red-600': '#7f1b1b',
26
+ 'red-500': '#d83000',
27
+ 'red-200': '#fbeae6',
28
+ 'brown-500': '#634e01',
29
+ 'signal-yellow-500': '#f4e21e',
30
+ 'signal-yellow-400': '#fff36c',
31
+ 'signal-green-500': '#00bd98',
32
+ 'signal-green-400': '#a3ffe0',
33
+ 'black': '#202435',
34
+ 'white': '#ffffff'
35
+ };
36
+
37
+ export { colors };
@@ -1,5 +1,5 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
2
- import importedColors from '../styles/utils/colors.scss.js';
2
+ import { colors } from '../styles/utils/colors-export.js';
3
3
  import { css } from 'styled-components';
4
4
 
5
5
  const _excluded = ["theme"];
@@ -7,15 +7,38 @@ let _ = t => t,
7
7
  _t;
8
8
  const defaultTheme = {
9
9
  getColor: name => {
10
- if (!importedColors[name]) throw Error(`The color "${name}" is not registered.`);
11
- return importedColors[name];
10
+ if (!colors[name]) throw Error(`The color "${name}" is not registered.`);
11
+ return colors[name];
12
12
  },
13
13
  primaryFontFamily: "'Roboto', sans-serif",
14
14
  secondaryFontFamily: "'Overpass', sans-serif",
15
- themeProp
15
+ themeProp,
16
+ spacing: {
17
+ baseUnit: 4,
18
+ controlHeight: 38,
19
+ menuGutter: 8
20
+ },
21
+ colors: {
22
+ primary: colors['emerald-500'],
23
+ primary75: colors['emerald-400'],
24
+ primary50: colors['emerald-300'],
25
+ primary25: colors['emerald-200'],
26
+ danger: colors['red-500'],
27
+ neutral0: colors['white'],
28
+ neutral5: colors['gray-50'],
29
+ neutral10: colors['gray-100'],
30
+ neutral20: colors['gray-300'],
31
+ neutral30: colors['gray-400'],
32
+ neutral40: colors['gray-500'],
33
+ neutral50: colors['gray-600'],
34
+ neutral60: colors['gray-700'],
35
+ neutral70: colors['gray-800'],
36
+ neutral80: colors['gray-900'],
37
+ neutral90: colors['black']
38
+ }
16
39
  };
17
40
  function themeProp(property, darkMode, lightMode, specificity = 2) {
18
- const specificityString = Array(specificity).fill("&").join("");
41
+ const specificityString = Array(specificity).fill('&').join('');
19
42
  return css(_t || (_t = _`
20
43
  body.dark-theme ${0} {
21
44
  ${0}: ${0};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntbjs/react-components",
3
- "version": "2.0.0-rc.11",
3
+ "version": "2.0.0-rc.13",
4
4
  "description": "NTBs common front-end design utilities and React components.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -56,30 +56,24 @@
56
56
  },
57
57
  "homepage": "https://bitbucket.org/NTB-NO/react-components/src/master/",
58
58
  "engines": {
59
- "node": ">=22.0.0",
59
+ "node": ">=24.0.0",
60
60
  "npm": ">=10.0.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@babel/core": "^7.13.16",
63
+ "@babel/core": "^7.28.5",
64
64
  "@babel/eslint-parser": "^7.13.14",
65
65
  "@babel/plugin-proposal-class-properties": "^7.13.0",
66
66
  "@babel/plugin-proposal-optional-chaining": "^7.13.12",
67
67
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
68
68
  "@babel/preset-react": "^7.13.13",
69
- "@chromatic-com/storybook": "^3.2.6",
69
+ "@chromatic-com/storybook": "^4.1.3",
70
70
  "@rollup/plugin-babel": "^5.3.0",
71
71
  "@rollup/plugin-commonjs": "^19.0.0",
72
72
  "@rollup/plugin-node-resolve": "^13.0.0",
73
- "@storybook/addon-actions": "^8.6.12",
74
- "@storybook/addon-docs": "^8.6.12",
75
- "@storybook/addon-essentials": "^8.6.12",
76
- "@storybook/addon-links": "^8.6.12",
77
- "@storybook/addon-mdx-gfm": "^8.6.12",
78
- "@storybook/addon-themes": "^8.6.12",
79
- "@storybook/blocks": "^8.6.12",
80
- "@storybook/react": "^8.6.12",
81
- "@storybook/react-webpack5": "^8.6.12",
82
- "@storybook/test": "^8.6.12",
73
+ "@storybook/addon-docs": "^10.0.8",
74
+ "@storybook/addon-links": "^10.0.8",
75
+ "@storybook/addon-themes": "^10.0.8",
76
+ "@storybook/react-webpack5": "^10.0.8",
83
77
  "@svgr/rollup": "^5.5.0",
84
78
  "@svgr/webpack": "^5.5.0",
85
79
  "@testing-library/jest-dom": "^5.12.0",
@@ -105,23 +99,23 @@
105
99
  "rollup-plugin-url": "^3.0.1",
106
100
  "sass": "^1.86.3",
107
101
  "sass-loader": "^16.0.5",
108
- "storybook": "^8.6.12",
102
+ "storybook": "^10.0.8",
109
103
  "url-loader": "^4.1.1"
110
104
  },
111
105
  "dependencies": {
112
- "@floating-ui/react": "^0.26.24",
113
- "@restart/hooks": "^0.3.26",
114
- "@storybook/theming": "^8.6.12",
106
+ "@floating-ui/react": "^0.26.28",
107
+ "@restart/hooks": "^0.6.2",
108
+ "@storybook/cli": "^10.0.8",
115
109
  "@tippyjs/react": "^4.2.6",
116
110
  "lodash": "^4.17.21",
117
111
  "nanoid": "^3.3.8",
118
112
  "polished": "^4.1.3",
119
113
  "popper-max-size-modifier": "^0.2.0",
120
114
  "react-lazy-load-image-component": "^1.5.1",
121
- "react-select": "^5.7.7",
122
- "react-select-async-paginate": "^0.7.3",
123
- "react-spinners": "^0.13.8",
115
+ "react-select": "^5.10.2",
116
+ "react-select-async-paginate": "^0.7.11",
117
+ "react-spinners": "^0.17.0",
124
118
  "resize-observer-polyfill": "^1.5.1",
125
- "styled-components": "^5.3.7"
119
+ "styled-components": "^6.1.19"
126
120
  }
127
121
  }
@@ -0,0 +1,35 @@
1
+ export const colors = {
2
+ 'orange-600': '#634e01',
3
+ 'orange-500': '#ff9900',
4
+ 'orange-400': '#ffcb7e',
5
+ 'emerald-600': '#296c58',
6
+ 'emerald-500': '#30826a',
7
+ 'emerald-400': '#64b49d',
8
+ 'emerald-300': '#bfe0d5',
9
+ 'emerald-200': '#f3f9f7',
10
+ 'gray-900': '#141313',
11
+ 'gray-800': '#272727',
12
+ 'gray-700': '#323232',
13
+ 'gray-600': '#505050',
14
+ 'gray-500': '#767676',
15
+ 'gray-400': '#b0b6b9',
16
+ 'gray-300': '#d9dce0',
17
+ 'gray-200': '#eff1f4',
18
+ 'gray-100': '#f7f8f9',
19
+ 'gray-50': '#f4f4f5',
20
+ 'cercise-500': '#5f1031',
21
+ 'cercise-400': '#854962',
22
+ 'cercise-300': '#d099b0',
23
+ 'cercise-200': '#fecaca',
24
+ 'cercise-100': '#f9f3f5',
25
+ 'red-600': '#7f1b1b',
26
+ 'red-500': '#d83000',
27
+ 'red-200': '#fbeae6',
28
+ 'brown-500': '#634e01',
29
+ 'signal-yellow-500': '#f4e21e',
30
+ 'signal-yellow-400': '#fff36c',
31
+ 'signal-green-500': '#00bd98',
32
+ 'signal-green-400': '#a3ffe0',
33
+ 'black': '#202435',
34
+ 'white': '#ffffff'
35
+ };