@danske/sapphire-react-lab 0.87.1 → 0.87.3

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.
@@ -91,7 +91,7 @@ var __spreadValues$I = (a, b) => {
91
91
  return a;
92
92
  };
93
93
  var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
94
- var __objRest$u = (source, exclude) => {
94
+ var __objRest$v = (source, exclude) => {
95
95
  var target = {};
96
96
  for (var prop in source)
97
97
  if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -108,7 +108,7 @@ const ToggleButton = React__default["default"].forwardRef(function Button(_a, re
108
108
  iconAlign = "left",
109
109
  icon,
110
110
  size = "medium"
111
- } = _b, otherProps = __objRest$u(_b, [
111
+ } = _b, otherProps = __objRest$v(_b, [
112
112
  "iconAlign",
113
113
  "icon",
114
114
  "size"
@@ -222,7 +222,7 @@ var __spreadValues$H = (a, b) => {
222
222
  return a;
223
223
  };
224
224
  var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
225
- var __objRest$t = (source, exclude) => {
225
+ var __objRest$u = (source, exclude) => {
226
226
  var target = {};
227
227
  for (var prop in source)
228
228
  if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -242,7 +242,7 @@ const CalendarButton = React__default["default"].forwardRef(function SapphireCal
242
242
  isDisabled,
243
243
  isInGridCell,
244
244
  hasCurrentIndicator
245
- } = _b, otherProps = __objRest$t(_b, [
245
+ } = _b, otherProps = __objRest$u(_b, [
246
246
  "children",
247
247
  "className",
248
248
  "isSelected",
@@ -272,7 +272,7 @@ const CalendarDayButton = React__default["default"].forwardRef(function Sapphire
272
272
  var _d = _c, {
273
273
  isOutsideVisibleRange,
274
274
  rangeHighlight
275
- } = _d, props = __objRest$t(_d, [
275
+ } = _d, props = __objRest$u(_d, [
276
276
  "isOutsideVisibleRange",
277
277
  "rangeHighlight"
278
278
  ]);
@@ -319,7 +319,7 @@ var __spreadValues$G = (a, b) => {
319
319
  return a;
320
320
  };
321
321
  var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
322
- var __objRest$s = (source, exclude) => {
322
+ var __objRest$t = (source, exclude) => {
323
323
  var target = {};
324
324
  for (var prop in source)
325
325
  if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -336,7 +336,7 @@ function CalendarDaysGrid(_a) {
336
336
  state,
337
337
  startDate = state.visibleRange.start,
338
338
  showWeekNumbers
339
- } = _b, props = __objRest$s(_b, [
339
+ } = _b, props = __objRest$t(_b, [
340
340
  "state",
341
341
  "startDate",
342
342
  "showWeekNumbers"
@@ -688,7 +688,7 @@ var __spreadValues$C = (a, b) => {
688
688
  return a;
689
689
  };
690
690
  var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
691
- var __objRest$r = (source, exclude) => {
691
+ var __objRest$s = (source, exclude) => {
692
692
  var target = {};
693
693
  for (var prop in source)
694
694
  if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -716,7 +716,7 @@ function useSapphireCalendarState(_a) {
716
716
  view: viewProp,
717
717
  defaultView = "days",
718
718
  onViewChange
719
- } = _b, otherOptions = __objRest$r(_b, [
719
+ } = _b, otherOptions = __objRest$s(_b, [
720
720
  "view",
721
721
  "defaultView",
722
722
  "onViewChange"
@@ -879,7 +879,7 @@ var __spreadValues$z = (a, b) => {
879
879
  return a;
880
880
  };
881
881
  var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
882
- var __objRest$q = (source, exclude) => {
882
+ var __objRest$r = (source, exclude) => {
883
883
  var target = {};
884
884
  for (var prop in source)
885
885
  if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -894,7 +894,7 @@ var __objRest$q = (source, exclude) => {
894
894
  const Calendar = (_a) => {
895
895
  var _b = _a, {
896
896
  showWeekNumbers
897
- } = _b, props = __objRest$q(_b, [
897
+ } = _b, props = __objRest$r(_b, [
898
898
  "showWeekNumbers"
899
899
  ]);
900
900
  sapphireReact.useThemeCheck();
@@ -981,7 +981,7 @@ var __spreadValues$y = (a, b) => {
981
981
  return a;
982
982
  };
983
983
  var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
984
- var __objRest$p = (source, exclude) => {
984
+ var __objRest$q = (source, exclude) => {
985
985
  var target = {};
986
986
  for (var prop in source)
987
987
  if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -996,7 +996,7 @@ var __objRest$p = (source, exclude) => {
996
996
  const useRangeCalendarState = (_a) => {
997
997
  var _b = _a, {
998
998
  onChange
999
- } = _b, options = __objRest$p(_b, [
999
+ } = _b, options = __objRest$q(_b, [
1000
1000
  "onChange"
1001
1001
  ]);
1002
1002
  const lastPredefinedRange = React.useRef(void 0);
@@ -1033,7 +1033,7 @@ var __spreadValues$x = (a, b) => {
1033
1033
  return a;
1034
1034
  };
1035
1035
  var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
1036
- var __objRest$o = (source, exclude) => {
1036
+ var __objRest$p = (source, exclude) => {
1037
1037
  var target = {};
1038
1038
  for (var prop in source)
1039
1039
  if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1051,7 +1051,7 @@ const _RangeCalendar = function RangeCalendar2(_a, forwardedRef) {
1051
1051
  showTwoMonths = false,
1052
1052
  allowUnavailableDatesWithinRange = false,
1053
1053
  predefinedRanges
1054
- } = _b, props = __objRest$o(_b, [
1054
+ } = _b, props = __objRest$p(_b, [
1055
1055
  "showWeekNumbers",
1056
1056
  "showTwoMonths",
1057
1057
  "allowUnavailableDatesWithinRange",
@@ -1136,7 +1136,7 @@ var __spreadValues$w = (a, b) => {
1136
1136
  return a;
1137
1137
  };
1138
1138
  var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
1139
- var __objRest$n = (source, exclude) => {
1139
+ var __objRest$o = (source, exclude) => {
1140
1140
  var target = {};
1141
1141
  for (var prop in source)
1142
1142
  if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1158,7 +1158,7 @@ const NotificationBadge = (props) => {
1158
1158
  variant = "primary",
1159
1159
  size = "medium",
1160
1160
  show = true
1161
- } = _a, otherProps = __objRest$n(_a, [
1161
+ } = _a, otherProps = __objRest$o(_a, [
1162
1162
  "animate",
1163
1163
  "children",
1164
1164
  "count",
@@ -1506,7 +1506,7 @@ var __spreadValues$s = (a, b) => {
1506
1506
  return a;
1507
1507
  };
1508
1508
  var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
1509
- var __objRest$m = (source, exclude) => {
1509
+ var __objRest$n = (source, exclude) => {
1510
1510
  var target = {};
1511
1511
  for (var prop in source)
1512
1512
  if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1522,7 +1522,7 @@ function DateInput(_a) {
1522
1522
  var _b = _a, {
1523
1523
  noClearButton = false,
1524
1524
  size = "large"
1525
- } = _b, props = __objRest$m(_b, [
1525
+ } = _b, props = __objRest$n(_b, [
1526
1526
  "noClearButton",
1527
1527
  "size"
1528
1528
  ]);
@@ -1572,7 +1572,7 @@ var __spreadValues$r = (a, b) => {
1572
1572
  return a;
1573
1573
  };
1574
1574
  var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
1575
- var __objRest$l = (source, exclude) => {
1575
+ var __objRest$m = (source, exclude) => {
1576
1576
  var target = {};
1577
1577
  for (var prop in source)
1578
1578
  if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1594,7 +1594,7 @@ function _DateField(_a, ref) {
1594
1594
  size = "large",
1595
1595
  labelPlacement = "above",
1596
1596
  necessityIndicator = false
1597
- } = _b, otherProps = __objRest$l(_b, [
1597
+ } = _b, otherProps = __objRest$m(_b, [
1598
1598
  "error",
1599
1599
  "note",
1600
1600
  "contextualHelp",
@@ -1683,7 +1683,7 @@ var __spreadValues$q = (a, b) => {
1683
1683
  return a;
1684
1684
  };
1685
1685
  var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
1686
- var __objRest$k = (source, exclude) => {
1686
+ var __objRest$l = (source, exclude) => {
1687
1687
  var target = {};
1688
1688
  for (var prop in source)
1689
1689
  if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1698,7 +1698,7 @@ var __objRest$k = (source, exclude) => {
1698
1698
  const useDateRangePickerState = (_a) => {
1699
1699
  var _b = _a, {
1700
1700
  onChange
1701
- } = _b, options = __objRest$k(_b, [
1701
+ } = _b, options = __objRest$l(_b, [
1702
1702
  "onChange"
1703
1703
  ]);
1704
1704
  const lastPredefinedRange = React.useRef(void 0);
@@ -1810,7 +1810,7 @@ var __spreadValues$o = (a, b) => {
1810
1810
  return a;
1811
1811
  };
1812
1812
  var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
1813
- var __objRest$j = (source, exclude) => {
1813
+ var __objRest$k = (source, exclude) => {
1814
1814
  var target = {};
1815
1815
  for (var prop in source)
1816
1816
  if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1836,7 +1836,7 @@ function _DateRangeField(_a, ref) {
1836
1836
  size = "large",
1837
1837
  labelPlacement = "above",
1838
1838
  necessityIndicator = false
1839
- } = _b, otherProps = __objRest$j(_b, [
1839
+ } = _b, otherProps = __objRest$k(_b, [
1840
1840
  "error",
1841
1841
  "note",
1842
1842
  "contextualHelp",
@@ -1952,7 +1952,7 @@ var __spreadValues$n = (a, b) => {
1952
1952
  return a;
1953
1953
  };
1954
1954
  var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1955
- var __objRest$i = (source, exclude) => {
1955
+ var __objRest$j = (source, exclude) => {
1956
1956
  var target = {};
1957
1957
  for (var prop in source)
1958
1958
  if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1982,7 +1982,7 @@ const Avatar = (_a) => {
1982
1982
  icon,
1983
1983
  color = "informative",
1984
1984
  size = "medium"
1985
- } = _b, props = __objRest$i(_b, [
1985
+ } = _b, props = __objRest$j(_b, [
1986
1986
  "monogram",
1987
1987
  "icon",
1988
1988
  "color",
@@ -2005,7 +2005,7 @@ const Avatar = (_a) => {
2005
2005
  var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
2006
2006
  var __hasOwnProp$n = Object.prototype.hasOwnProperty;
2007
2007
  var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
2008
- var __objRest$h = (source, exclude) => {
2008
+ var __objRest$i = (source, exclude) => {
2009
2009
  var target = {};
2010
2010
  for (var prop in source)
2011
2011
  if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -2053,7 +2053,7 @@ const FeedbackMessage = (_a) => {
2053
2053
  actions,
2054
2054
  variant = "neutral",
2055
2055
  icon
2056
- } = _b, otherProps = __objRest$h(_b, [
2056
+ } = _b, otherProps = __objRest$i(_b, [
2057
2057
  "heading",
2058
2058
  "body",
2059
2059
  "actions",
@@ -2137,9 +2137,22 @@ var __spreadValues$l = (a, b) => {
2137
2137
  return a;
2138
2138
  };
2139
2139
  var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
2140
- const SearchField = React__default["default"].forwardRef(function SearchField2(props, forwardedRef) {
2141
- var _a;
2140
+ var __objRest$h = (source, exclude) => {
2141
+ var target = {};
2142
+ for (var prop in source)
2143
+ if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
2144
+ target[prop] = source[prop];
2145
+ if (source != null && __getOwnPropSymbols$l)
2146
+ for (var prop of __getOwnPropSymbols$l(source)) {
2147
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
2148
+ target[prop] = source[prop];
2149
+ }
2150
+ return target;
2151
+ };
2152
+ function SearchField(propsAndRef) {
2153
+ var _b;
2142
2154
  sapphireReact.useThemeCheck();
2155
+ const _a = propsAndRef, { loadingState, loadingSkeletonRowsCount, forwardedRef } = _a, props = __objRest$h(_a, ["loadingState", "loadingSkeletonRowsCount", "forwardedRef"]);
2143
2156
  const inputRef = utils$1.useObjectRef(forwardedRef);
2144
2157
  const buttonRef = React.useRef(null);
2145
2158
  const listBoxRef = utils.useFocusableRef(null);
@@ -2212,12 +2225,14 @@ const SearchField = React__default["default"].forwardRef(function SearchField2(p
2212
2225
  popoverRef,
2213
2226
  listBoxRef,
2214
2227
  listBoxProps,
2215
- selectWidth: ((_a = triggerRef.current) == null ? void 0 : _a.offsetWidth) || 0,
2228
+ loadingState,
2229
+ loadingSkeletonRowsCount,
2230
+ selectWidth: ((_b = triggerRef.current) == null ? void 0 : _b.offsetWidth) || 0,
2216
2231
  size: props.size,
2217
2232
  disableSelectedStyles: true,
2218
2233
  isNonModal: true
2219
2234
  }, props.children || []));
2220
- });
2235
+ }
2221
2236
 
2222
2237
  var __defProp$k = Object.defineProperty;
2223
2238
  var __defProps$i = Object.defineProperties;
@@ -2642,13 +2657,12 @@ const Heading = React.forwardRef(function Heading2(props, ref) {
2642
2657
  const domProps = utils$1.filterDOMProps(props);
2643
2658
  const _a = props, { children, level, elementType } = _a, otherProps = __objRest$b(_a, ["children", "level", "elementType"]);
2644
2659
  const { styleProps } = sapphireReact.useTextStyleProps(otherProps);
2645
- const domRef = utils.useDOMRef(ref);
2646
2660
  const HeadingTag = elementType ? elementType : `h${level}`;
2647
2661
  return /* @__PURE__ */ React__default["default"].createElement(HeadingTag, __spreadProps$b(__spreadValues$d(__spreadValues$d({}, domProps), styleProps), {
2648
2662
  className: clsx__default["default"](styles__default$9["default"]["sapphire-text"], styles__default$9["default"][`sapphire-text--heading-${level}`], styleProps.className, {
2649
2663
  [styles__default$9["default"]["sapphire-text--heading-alternative"]]: props.fontVariant === "alternative"
2650
2664
  }),
2651
- ref: domRef
2665
+ ref
2652
2666
  }), children);
2653
2667
  });
2654
2668