@paubox/ui 1.4.0 → 1.5.1
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.
- package/index.esm.js +85 -64
- package/package.json +1 -1
- package/src/lib/Inputs/Select.d.ts +4 -2
- package/src/lib/Table/Table.d.ts +3 -2
package/index.esm.js
CHANGED
|
@@ -2313,7 +2313,7 @@ var BaseButton = styled.button(_templateObject$r(), function(props) {
|
|
|
2313
2313
|
return props.size === 'large' ? '12px 16px' : '10px 12px';
|
|
2314
2314
|
}, function(param) {
|
|
2315
2315
|
var color = param.color, variant = param.variant;
|
|
2316
|
-
return variant === 'outlined' ? "1px solid ".concat(color === 'secondary' ? neutral400 : getColor(color, 600)) : '
|
|
2316
|
+
return variant === 'outlined' ? "1px solid ".concat(color === 'secondary' ? neutral400 : getColor(color, 600)) : '1px solid transparent';
|
|
2317
2317
|
}, function(param) {
|
|
2318
2318
|
var round = param.round;
|
|
2319
2319
|
return round ? '50%' : "".concat(spacing(1), "px");
|
|
@@ -13413,7 +13413,7 @@ function _array_like_to_array$n(arr, len) {
|
|
|
13413
13413
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
13414
13414
|
return arr2;
|
|
13415
13415
|
}
|
|
13416
|
-
function _array_without_holes$
|
|
13416
|
+
function _array_without_holes$c(arr) {
|
|
13417
13417
|
if (Array.isArray(arr)) return _array_like_to_array$n(arr);
|
|
13418
13418
|
}
|
|
13419
13419
|
function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -13458,10 +13458,10 @@ function _define_property$A(obj, key, value) {
|
|
|
13458
13458
|
}
|
|
13459
13459
|
return obj;
|
|
13460
13460
|
}
|
|
13461
|
-
function _iterable_to_array$
|
|
13461
|
+
function _iterable_to_array$c(iter) {
|
|
13462
13462
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
13463
13463
|
}
|
|
13464
|
-
function _non_iterable_spread$
|
|
13464
|
+
function _non_iterable_spread$c() {
|
|
13465
13465
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13466
13466
|
}
|
|
13467
13467
|
function _object_spread$A(target) {
|
|
@@ -13525,8 +13525,8 @@ function _object_without_properties_loose$l(source, excluded) {
|
|
|
13525
13525
|
}
|
|
13526
13526
|
return target;
|
|
13527
13527
|
}
|
|
13528
|
-
function _to_consumable_array$
|
|
13529
|
-
return _array_without_holes$
|
|
13528
|
+
function _to_consumable_array$c(arr) {
|
|
13529
|
+
return _array_without_holes$c(arr) || _iterable_to_array$c(arr) || _unsupported_iterable_to_array$n(arr) || _non_iterable_spread$c();
|
|
13530
13530
|
}
|
|
13531
13531
|
function _type_of$4(obj) {
|
|
13532
13532
|
"@swc/helpers - typeof";
|
|
@@ -14117,11 +14117,11 @@ function _detectOverflow() {
|
|
|
14117
14117
|
] : getExpandedPlacements(initialPlacement));
|
|
14118
14118
|
hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
14119
14119
|
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
14120
|
-
(_fallbackPlacements = fallbackPlacements).push.apply(_fallbackPlacements, _to_consumable_array$
|
|
14120
|
+
(_fallbackPlacements = fallbackPlacements).push.apply(_fallbackPlacements, _to_consumable_array$c(getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)));
|
|
14121
14121
|
}
|
|
14122
14122
|
placements = [
|
|
14123
14123
|
initialPlacement
|
|
14124
|
-
].concat(_to_consumable_array$
|
|
14124
|
+
].concat(_to_consumable_array$c(fallbackPlacements));
|
|
14125
14125
|
return [
|
|
14126
14126
|
4,
|
|
14127
14127
|
detectOverflow(state, detectOverflowOptions)
|
|
@@ -14137,7 +14137,7 @@ function _detectOverflow() {
|
|
|
14137
14137
|
sides = getAlignmentSides(placement, rects, rtl);
|
|
14138
14138
|
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
14139
14139
|
}
|
|
14140
|
-
overflowsData = _to_consumable_array$
|
|
14140
|
+
overflowsData = _to_consumable_array$c(overflowsData).concat([
|
|
14141
14141
|
{
|
|
14142
14142
|
placement: placement,
|
|
14143
14143
|
overflows: overflows
|
|
@@ -14341,7 +14341,7 @@ function _array_like_to_array$m(arr, len) {
|
|
|
14341
14341
|
function _array_with_holes$j(arr) {
|
|
14342
14342
|
if (Array.isArray(arr)) return arr;
|
|
14343
14343
|
}
|
|
14344
|
-
function _array_without_holes$
|
|
14344
|
+
function _array_without_holes$b(arr) {
|
|
14345
14345
|
if (Array.isArray(arr)) return _array_like_to_array$m(arr);
|
|
14346
14346
|
}
|
|
14347
14347
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -14386,7 +14386,7 @@ function _define_property$z(obj, key, value) {
|
|
|
14386
14386
|
}
|
|
14387
14387
|
return obj;
|
|
14388
14388
|
}
|
|
14389
|
-
function _iterable_to_array$
|
|
14389
|
+
function _iterable_to_array$b(iter) {
|
|
14390
14390
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
14391
14391
|
}
|
|
14392
14392
|
function _iterable_to_array_limit$j(arr, i) {
|
|
@@ -14416,7 +14416,7 @@ function _iterable_to_array_limit$j(arr, i) {
|
|
|
14416
14416
|
function _non_iterable_rest$j() {
|
|
14417
14417
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14418
14418
|
}
|
|
14419
|
-
function _non_iterable_spread$
|
|
14419
|
+
function _non_iterable_spread$b() {
|
|
14420
14420
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14421
14421
|
}
|
|
14422
14422
|
function _object_spread$z(target) {
|
|
@@ -14456,8 +14456,8 @@ function _object_spread_props$t(target, source) {
|
|
|
14456
14456
|
function _sliced_to_array$j(arr, i) {
|
|
14457
14457
|
return _array_with_holes$j(arr) || _iterable_to_array_limit$j(arr, i) || _unsupported_iterable_to_array$m(arr, i) || _non_iterable_rest$j();
|
|
14458
14458
|
}
|
|
14459
|
-
function _to_consumable_array$
|
|
14460
|
-
return _array_without_holes$
|
|
14459
|
+
function _to_consumable_array$b(arr) {
|
|
14460
|
+
return _array_without_holes$b(arr) || _iterable_to_array$b(arr) || _unsupported_iterable_to_array$m(arr) || _non_iterable_spread$b();
|
|
14461
14461
|
}
|
|
14462
14462
|
function _unsupported_iterable_to_array$m(o, minLen) {
|
|
14463
14463
|
if (!o) return;
|
|
@@ -14852,7 +14852,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
14852
14852
|
function getClippingRect(_ref) {
|
|
14853
14853
|
var element = _ref.element, boundary = _ref.boundary, rootBoundary = _ref.rootBoundary, strategy = _ref.strategy;
|
|
14854
14854
|
var elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
14855
|
-
var clippingAncestors = _to_consumable_array$
|
|
14855
|
+
var clippingAncestors = _to_consumable_array$b(elementClippingAncestors).concat([
|
|
14856
14856
|
rootBoundary
|
|
14857
14857
|
]);
|
|
14858
14858
|
var firstClippingAncestor = clippingAncestors[0];
|
|
@@ -15104,7 +15104,7 @@ function observeMove(element, onMove) {
|
|
|
15104
15104
|
}
|
|
15105
15105
|
var _options_ancestorScroll = options.ancestorScroll, ancestorScroll = _options_ancestorScroll === void 0 ? true : _options_ancestorScroll, _options_ancestorResize = options.ancestorResize, ancestorResize = _options_ancestorResize === void 0 ? true : _options_ancestorResize, _options_elementResize = options.elementResize, elementResize = _options_elementResize === void 0 ? typeof ResizeObserver === 'function' : _options_elementResize, _options_layoutShift = options.layoutShift, layoutShift = _options_layoutShift === void 0 ? typeof IntersectionObserver === 'function' : _options_layoutShift, _options_animationFrame = options.animationFrame, animationFrame = _options_animationFrame === void 0 ? false : _options_animationFrame;
|
|
15106
15106
|
var referenceEl = unwrapElement(reference);
|
|
15107
|
-
var ancestors = ancestorScroll || ancestorResize ? _to_consumable_array$
|
|
15107
|
+
var ancestors = ancestorScroll || ancestorResize ? _to_consumable_array$b(referenceEl ? getOverflowAncestors(referenceEl) : []).concat(_to_consumable_array$b(getOverflowAncestors(floating))) : [];
|
|
15108
15108
|
ancestors.forEach(function(ancestor) {
|
|
15109
15109
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
15110
15110
|
passive: true
|
|
@@ -15623,7 +15623,7 @@ function _array_like_to_array$k(arr, len) {
|
|
|
15623
15623
|
function _array_with_holes$h(arr) {
|
|
15624
15624
|
if (Array.isArray(arr)) return arr;
|
|
15625
15625
|
}
|
|
15626
|
-
function _array_without_holes$
|
|
15626
|
+
function _array_without_holes$a(arr) {
|
|
15627
15627
|
if (Array.isArray(arr)) return _array_like_to_array$k(arr);
|
|
15628
15628
|
}
|
|
15629
15629
|
function _define_property$x(obj, key, value) {
|
|
@@ -15639,7 +15639,7 @@ function _define_property$x(obj, key, value) {
|
|
|
15639
15639
|
}
|
|
15640
15640
|
return obj;
|
|
15641
15641
|
}
|
|
15642
|
-
function _iterable_to_array$
|
|
15642
|
+
function _iterable_to_array$a(iter) {
|
|
15643
15643
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
15644
15644
|
}
|
|
15645
15645
|
function _iterable_to_array_limit$h(arr, i) {
|
|
@@ -15669,7 +15669,7 @@ function _iterable_to_array_limit$h(arr, i) {
|
|
|
15669
15669
|
function _non_iterable_rest$h() {
|
|
15670
15670
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
15671
15671
|
}
|
|
15672
|
-
function _non_iterable_spread$
|
|
15672
|
+
function _non_iterable_spread$a() {
|
|
15673
15673
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
15674
15674
|
}
|
|
15675
15675
|
function _object_spread$x(target) {
|
|
@@ -15736,8 +15736,8 @@ function _object_without_properties_loose$k(source, excluded) {
|
|
|
15736
15736
|
function _sliced_to_array$h(arr, i) {
|
|
15737
15737
|
return _array_with_holes$h(arr) || _iterable_to_array_limit$h(arr, i) || _unsupported_iterable_to_array$k(arr, i) || _non_iterable_rest$h();
|
|
15738
15738
|
}
|
|
15739
|
-
function _to_consumable_array$
|
|
15740
|
-
return _array_without_holes$
|
|
15739
|
+
function _to_consumable_array$a(arr) {
|
|
15740
|
+
return _array_without_holes$a(arr) || _iterable_to_array$a(arr) || _unsupported_iterable_to_array$k(arr) || _non_iterable_spread$a();
|
|
15741
15741
|
}
|
|
15742
15742
|
function _unsupported_iterable_to_array$k(o, minLen) {
|
|
15743
15743
|
if (!o) return;
|
|
@@ -15767,7 +15767,7 @@ function useEffectEvent(callback) {
|
|
|
15767
15767
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
15768
15768
|
args[_key] = arguments[_key];
|
|
15769
15769
|
}
|
|
15770
|
-
return ref.current == null ? void 0 : (_ref = ref).current.apply(_ref, _to_consumable_array$
|
|
15770
|
+
return ref.current == null ? void 0 : (_ref = ref).current.apply(_ref, _to_consumable_array$a(args));
|
|
15771
15771
|
}, []);
|
|
15772
15772
|
}
|
|
15773
15773
|
var ARROW_UP = 'ArrowUp';
|
|
@@ -15783,7 +15783,7 @@ var verticalKeys = [
|
|
|
15783
15783
|
ARROW_UP,
|
|
15784
15784
|
ARROW_DOWN
|
|
15785
15785
|
];
|
|
15786
|
-
_to_consumable_array$
|
|
15786
|
+
_to_consumable_array$a(horizontalKeys).concat(_to_consumable_array$a(verticalKeys));
|
|
15787
15787
|
function _extends() {
|
|
15788
15788
|
_extends = Object.assign ? Object.assign.bind() : function _extends(target) {
|
|
15789
15789
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -15962,7 +15962,7 @@ function createPubSub() {
|
|
|
15962
15962
|
});
|
|
15963
15963
|
},
|
|
15964
15964
|
on: function on(event, listener) {
|
|
15965
|
-
map.set(event, _to_consumable_array$
|
|
15965
|
+
map.set(event, _to_consumable_array$a(map.get(event) || []).concat([
|
|
15966
15966
|
listener
|
|
15967
15967
|
]));
|
|
15968
15968
|
},
|
|
@@ -21987,6 +21987,7 @@ var Checkbox = function(_param) {
|
|
|
21987
21987
|
type: "checkbox",
|
|
21988
21988
|
checked: checked,
|
|
21989
21989
|
onChange: onChange,
|
|
21990
|
+
disabled: disabled,
|
|
21990
21991
|
style: {
|
|
21991
21992
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
21992
21993
|
}
|
|
@@ -22046,7 +22047,7 @@ function _array_like_to_array$j(arr, len) {
|
|
|
22046
22047
|
function _array_with_holes$g(arr) {
|
|
22047
22048
|
if (Array.isArray(arr)) return arr;
|
|
22048
22049
|
}
|
|
22049
|
-
function _array_without_holes$
|
|
22050
|
+
function _array_without_holes$9(arr) {
|
|
22050
22051
|
if (Array.isArray(arr)) return _array_like_to_array$j(arr);
|
|
22051
22052
|
}
|
|
22052
22053
|
function _define_property$t(obj, key, value) {
|
|
@@ -22062,7 +22063,7 @@ function _define_property$t(obj, key, value) {
|
|
|
22062
22063
|
}
|
|
22063
22064
|
return obj;
|
|
22064
22065
|
}
|
|
22065
|
-
function _iterable_to_array$
|
|
22066
|
+
function _iterable_to_array$9(iter) {
|
|
22066
22067
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
22067
22068
|
}
|
|
22068
22069
|
function _iterable_to_array_limit$g(arr, i) {
|
|
@@ -22092,7 +22093,7 @@ function _iterable_to_array_limit$g(arr, i) {
|
|
|
22092
22093
|
function _non_iterable_rest$g() {
|
|
22093
22094
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22094
22095
|
}
|
|
22095
|
-
function _non_iterable_spread$
|
|
22096
|
+
function _non_iterable_spread$9() {
|
|
22096
22097
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22097
22098
|
}
|
|
22098
22099
|
function _object_spread$t(target) {
|
|
@@ -22123,8 +22124,8 @@ function _tagged_template_literal$m(strings, raw) {
|
|
|
22123
22124
|
}
|
|
22124
22125
|
}));
|
|
22125
22126
|
}
|
|
22126
|
-
function _to_consumable_array$
|
|
22127
|
-
return _array_without_holes$
|
|
22127
|
+
function _to_consumable_array$9(arr) {
|
|
22128
|
+
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$j(arr) || _non_iterable_spread$9();
|
|
22128
22129
|
}
|
|
22129
22130
|
function _unsupported_iterable_to_array$j(o, minLen) {
|
|
22130
22131
|
if (!o) return;
|
|
@@ -22212,7 +22213,7 @@ var Popper = function(param) {
|
|
|
22212
22213
|
useClickOutside(childContainerRefs ? [
|
|
22213
22214
|
anchorRef,
|
|
22214
22215
|
containerRef
|
|
22215
|
-
].concat(_to_consumable_array$
|
|
22216
|
+
].concat(_to_consumable_array$9(childContainerRefs)) : [
|
|
22216
22217
|
anchorRef,
|
|
22217
22218
|
containerRef
|
|
22218
22219
|
], onClose, open);
|
|
@@ -22913,7 +22914,7 @@ function _array_like_to_array$f(arr, len) {
|
|
|
22913
22914
|
function _array_with_holes$c(arr) {
|
|
22914
22915
|
if (Array.isArray(arr)) return arr;
|
|
22915
22916
|
}
|
|
22916
|
-
function _array_without_holes$
|
|
22917
|
+
function _array_without_holes$8(arr) {
|
|
22917
22918
|
if (Array.isArray(arr)) return _array_like_to_array$f(arr);
|
|
22918
22919
|
}
|
|
22919
22920
|
function _define_property$q(obj, key, value) {
|
|
@@ -22929,7 +22930,7 @@ function _define_property$q(obj, key, value) {
|
|
|
22929
22930
|
}
|
|
22930
22931
|
return obj;
|
|
22931
22932
|
}
|
|
22932
|
-
function _iterable_to_array$
|
|
22933
|
+
function _iterable_to_array$8(iter) {
|
|
22933
22934
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
22934
22935
|
}
|
|
22935
22936
|
function _iterable_to_array_limit$c(arr, i) {
|
|
@@ -22959,7 +22960,7 @@ function _iterable_to_array_limit$c(arr, i) {
|
|
|
22959
22960
|
function _non_iterable_rest$c() {
|
|
22960
22961
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22961
22962
|
}
|
|
22962
|
-
function _non_iterable_spread$
|
|
22963
|
+
function _non_iterable_spread$8() {
|
|
22963
22964
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22964
22965
|
}
|
|
22965
22966
|
function _object_spread$q(target) {
|
|
@@ -22990,8 +22991,8 @@ function _tagged_template_literal$i(strings, raw) {
|
|
|
22990
22991
|
}
|
|
22991
22992
|
}));
|
|
22992
22993
|
}
|
|
22993
|
-
function _to_consumable_array$
|
|
22994
|
-
return _array_without_holes$
|
|
22994
|
+
function _to_consumable_array$8(arr) {
|
|
22995
|
+
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$f(arr) || _non_iterable_spread$8();
|
|
22995
22996
|
}
|
|
22996
22997
|
function _unsupported_iterable_to_array$f(o, minLen) {
|
|
22997
22998
|
if (!o) return;
|
|
@@ -23086,7 +23087,7 @@ var FilterForm = function(param) {
|
|
|
23086
23087
|
var handleAddFilterRow = function(filterKey) {
|
|
23087
23088
|
var _Math;
|
|
23088
23089
|
var currentFilter = values.filters[filterKey];
|
|
23089
|
-
var newIndex = (_Math = Math).max.apply(_Math, _to_consumable_array$
|
|
23090
|
+
var newIndex = (_Math = Math).max.apply(_Math, _to_consumable_array$8(Object.keys(currentFilter).map(Number)).concat([
|
|
23090
23091
|
-1
|
|
23091
23092
|
])) + 1;
|
|
23092
23093
|
onChange("filters.".concat(filterKey, ".").concat(newIndex), {
|
|
@@ -23103,7 +23104,7 @@ var FilterForm = function(param) {
|
|
|
23103
23104
|
var handleAddFilter = function() {
|
|
23104
23105
|
var _Math;
|
|
23105
23106
|
var currentFilters = values.filters;
|
|
23106
|
-
var newFilterKey = (_Math = Math).max.apply(_Math, _to_consumable_array$
|
|
23107
|
+
var newFilterKey = (_Math = Math).max.apply(_Math, _to_consumable_array$8(Object.keys(currentFilters).map(Number)).concat([
|
|
23107
23108
|
-1
|
|
23108
23109
|
])) + 1;
|
|
23109
23110
|
onChange("filters.".concat(newFilterKey), {
|
|
@@ -23527,7 +23528,7 @@ function _array_like_to_array$e(arr, len) {
|
|
|
23527
23528
|
function _array_with_holes$b(arr) {
|
|
23528
23529
|
if (Array.isArray(arr)) return arr;
|
|
23529
23530
|
}
|
|
23530
|
-
function _array_without_holes$
|
|
23531
|
+
function _array_without_holes$7(arr) {
|
|
23531
23532
|
if (Array.isArray(arr)) return _array_like_to_array$e(arr);
|
|
23532
23533
|
}
|
|
23533
23534
|
function _define_property$n(obj, key, value) {
|
|
@@ -23543,7 +23544,7 @@ function _define_property$n(obj, key, value) {
|
|
|
23543
23544
|
}
|
|
23544
23545
|
return obj;
|
|
23545
23546
|
}
|
|
23546
|
-
function _iterable_to_array$
|
|
23547
|
+
function _iterable_to_array$7(iter) {
|
|
23547
23548
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
23548
23549
|
}
|
|
23549
23550
|
function _iterable_to_array_limit$b(arr, i) {
|
|
@@ -23573,7 +23574,7 @@ function _iterable_to_array_limit$b(arr, i) {
|
|
|
23573
23574
|
function _non_iterable_rest$b() {
|
|
23574
23575
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23575
23576
|
}
|
|
23576
|
-
function _non_iterable_spread$
|
|
23577
|
+
function _non_iterable_spread$7() {
|
|
23577
23578
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
23578
23579
|
}
|
|
23579
23580
|
function _object_spread$n(target) {
|
|
@@ -23650,8 +23651,8 @@ function _tagged_template_literal$g(strings, raw) {
|
|
|
23650
23651
|
}
|
|
23651
23652
|
}));
|
|
23652
23653
|
}
|
|
23653
|
-
function _to_consumable_array$
|
|
23654
|
-
return _array_without_holes$
|
|
23654
|
+
function _to_consumable_array$7(arr) {
|
|
23655
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$e(arr) || _non_iterable_spread$7();
|
|
23655
23656
|
}
|
|
23656
23657
|
function _unsupported_iterable_to_array$e(o, minLen) {
|
|
23657
23658
|
if (!o) return;
|
|
@@ -23834,7 +23835,7 @@ var MultiSelect = function(_param) {
|
|
|
23834
23835
|
return val === option.value;
|
|
23835
23836
|
}) ? values.filter(function(val) {
|
|
23836
23837
|
return val !== option.value;
|
|
23837
|
-
}) : _to_consumable_array$
|
|
23838
|
+
}) : _to_consumable_array$7(values).concat([
|
|
23838
23839
|
option.value
|
|
23839
23840
|
]), option);
|
|
23840
23841
|
};
|
|
@@ -24103,7 +24104,7 @@ function _array_like_to_array$c(arr, len) {
|
|
|
24103
24104
|
function _array_with_holes$9(arr) {
|
|
24104
24105
|
if (Array.isArray(arr)) return arr;
|
|
24105
24106
|
}
|
|
24106
|
-
function _array_without_holes$
|
|
24107
|
+
function _array_without_holes$6(arr) {
|
|
24107
24108
|
if (Array.isArray(arr)) return _array_like_to_array$c(arr);
|
|
24108
24109
|
}
|
|
24109
24110
|
function _define_property$l(obj, key, value) {
|
|
@@ -24119,7 +24120,7 @@ function _define_property$l(obj, key, value) {
|
|
|
24119
24120
|
}
|
|
24120
24121
|
return obj;
|
|
24121
24122
|
}
|
|
24122
|
-
function _iterable_to_array$
|
|
24123
|
+
function _iterable_to_array$6(iter) {
|
|
24123
24124
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24124
24125
|
}
|
|
24125
24126
|
function _iterable_to_array_limit$9(arr, i) {
|
|
@@ -24149,7 +24150,7 @@ function _iterable_to_array_limit$9(arr, i) {
|
|
|
24149
24150
|
function _non_iterable_rest$9() {
|
|
24150
24151
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24151
24152
|
}
|
|
24152
|
-
function _non_iterable_spread$
|
|
24153
|
+
function _non_iterable_spread$6() {
|
|
24153
24154
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24154
24155
|
}
|
|
24155
24156
|
function _object_spread$l(target) {
|
|
@@ -24226,8 +24227,8 @@ function _tagged_template_literal$e(strings, raw) {
|
|
|
24226
24227
|
}
|
|
24227
24228
|
}));
|
|
24228
24229
|
}
|
|
24229
|
-
function _to_consumable_array$
|
|
24230
|
-
return _array_without_holes$
|
|
24230
|
+
function _to_consumable_array$6(arr) {
|
|
24231
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$c(arr) || _non_iterable_spread$6();
|
|
24231
24232
|
}
|
|
24232
24233
|
function _unsupported_iterable_to_array$c(o, minLen) {
|
|
24233
24234
|
if (!o) return;
|
|
@@ -24344,7 +24345,7 @@ var MultiInput = function(_param) {
|
|
|
24344
24345
|
if (e.key === 'Enter' && inputValue.trim()) {
|
|
24345
24346
|
e.preventDefault();
|
|
24346
24347
|
if (!(values === null || values === void 0 ? void 0 : values.includes(inputValue.trim()))) {
|
|
24347
|
-
setValues === null || setValues === void 0 ? void 0 : setValues(_to_consumable_array$
|
|
24348
|
+
setValues === null || setValues === void 0 ? void 0 : setValues(_to_consumable_array$6(values || []).concat([
|
|
24348
24349
|
inputValue.trim()
|
|
24349
24350
|
]));
|
|
24350
24351
|
}
|
|
@@ -24352,7 +24353,7 @@ var MultiInput = function(_param) {
|
|
|
24352
24353
|
}
|
|
24353
24354
|
};
|
|
24354
24355
|
var removeValue = function(index) {
|
|
24355
|
-
var newValues = _to_consumable_array$
|
|
24356
|
+
var newValues = _to_consumable_array$6(values || []);
|
|
24356
24357
|
newValues.splice(index, 1);
|
|
24357
24358
|
setValues === null || setValues === void 0 ? void 0 : setValues(newValues);
|
|
24358
24359
|
};
|
|
@@ -24428,6 +24429,9 @@ function _array_like_to_array$b(arr, len) {
|
|
|
24428
24429
|
function _array_with_holes$8(arr) {
|
|
24429
24430
|
if (Array.isArray(arr)) return arr;
|
|
24430
24431
|
}
|
|
24432
|
+
function _array_without_holes$5(arr) {
|
|
24433
|
+
if (Array.isArray(arr)) return _array_like_to_array$b(arr);
|
|
24434
|
+
}
|
|
24431
24435
|
function _define_property$k(obj, key, value) {
|
|
24432
24436
|
if (key in obj) {
|
|
24433
24437
|
Object.defineProperty(obj, key, {
|
|
@@ -24441,6 +24445,9 @@ function _define_property$k(obj, key, value) {
|
|
|
24441
24445
|
}
|
|
24442
24446
|
return obj;
|
|
24443
24447
|
}
|
|
24448
|
+
function _iterable_to_array$5(iter) {
|
|
24449
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24450
|
+
}
|
|
24444
24451
|
function _iterable_to_array_limit$8(arr, i) {
|
|
24445
24452
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24446
24453
|
if (_i == null) return;
|
|
@@ -24468,6 +24475,9 @@ function _iterable_to_array_limit$8(arr, i) {
|
|
|
24468
24475
|
function _non_iterable_rest$8() {
|
|
24469
24476
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24470
24477
|
}
|
|
24478
|
+
function _non_iterable_spread$5() {
|
|
24479
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
24480
|
+
}
|
|
24471
24481
|
function _object_spread$k(target) {
|
|
24472
24482
|
for(var i = 1; i < arguments.length; i++){
|
|
24473
24483
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -24542,6 +24552,9 @@ function _tagged_template_literal$d(strings, raw) {
|
|
|
24542
24552
|
}
|
|
24543
24553
|
}));
|
|
24544
24554
|
}
|
|
24555
|
+
function _to_consumable_array$5(arr) {
|
|
24556
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$5();
|
|
24557
|
+
}
|
|
24545
24558
|
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
24546
24559
|
if (!o) return;
|
|
24547
24560
|
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
@@ -24648,7 +24661,7 @@ var IconWrapper$1 = styled.div(_templateObject3$6(), function(param) {
|
|
|
24648
24661
|
});
|
|
24649
24662
|
var SelectOption = styled.option(_templateObject4$4(), $paragraph100Semibold, textPrimary);
|
|
24650
24663
|
var Select = function(_param) {
|
|
24651
|
-
var _param_sz = _param.sz, sz = _param_sz === void 0 ? 'sm' : _param_sz, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, _param_options = _param.options, options = _param_options === void 0 ? [] : _param_options; _param.checkbox; var
|
|
24664
|
+
var _param_sz = _param.sz, sz = _param_sz === void 0 ? 'sm' : _param_sz, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, _param_options = _param.options, options = _param_options === void 0 ? [] : _param_options; _param.checkbox; var _param_placeholder = _param.placeholder, placeholder = _param_placeholder === void 0 ? 'Please select...' : _param_placeholder, value = _param.value, setValue = _param.setValue; _param.initialValue; var _param_type = _param.type, type = _param_type === void 0 ? 'primary' : _param_type, style = _param.style, _param_maxHeight = _param.maxHeight, maxHeight = _param_maxHeight === void 0 ? '14rem' : _param_maxHeight, _param_disabled = _param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_addClearOption = _param.addClearOption, addClearOption = _param_addClearOption === void 0 ? false : _param_addClearOption, _param_clearOptionLabel = _param.clearOptionLabel, clearOptionLabel = _param_clearOptionLabel === void 0 ? 'Clear' : _param_clearOptionLabel, props = _object_without_properties$b(_param, [
|
|
24652
24665
|
"sz",
|
|
24653
24666
|
"error",
|
|
24654
24667
|
"options",
|
|
@@ -24660,7 +24673,9 @@ var Select = function(_param) {
|
|
|
24660
24673
|
"type",
|
|
24661
24674
|
"style",
|
|
24662
24675
|
"maxHeight",
|
|
24663
|
-
"disabled"
|
|
24676
|
+
"disabled",
|
|
24677
|
+
"addClearOption",
|
|
24678
|
+
"clearOptionLabel"
|
|
24664
24679
|
]);
|
|
24665
24680
|
var _options_find;
|
|
24666
24681
|
var _useState = _sliced_to_array$8(useState(false), 2), open = _useState[0], setOpen = _useState[1];
|
|
@@ -24669,6 +24684,12 @@ var Select = function(_param) {
|
|
|
24669
24684
|
setValue(option.value);
|
|
24670
24685
|
setOpen(false);
|
|
24671
24686
|
};
|
|
24687
|
+
var displayOptions = value !== '' && value !== null && value !== undefined && addClearOption ? [
|
|
24688
|
+
{
|
|
24689
|
+
value: null,
|
|
24690
|
+
label: clearOptionLabel
|
|
24691
|
+
}
|
|
24692
|
+
].concat(_to_consumable_array$5(options)) : options;
|
|
24672
24693
|
return /*#__PURE__*/ jsxs(SelectWrapper, {
|
|
24673
24694
|
ref: selectRef,
|
|
24674
24695
|
disabled: disabled,
|
|
@@ -24696,7 +24717,7 @@ var Select = function(_param) {
|
|
|
24696
24717
|
disabled: true,
|
|
24697
24718
|
hidden: true,
|
|
24698
24719
|
selected: true,
|
|
24699
|
-
children:
|
|
24720
|
+
children: placeholder
|
|
24700
24721
|
}) : /*#__PURE__*/ jsx(SelectOption, {
|
|
24701
24722
|
value: value,
|
|
24702
24723
|
selected: true,
|
|
@@ -24727,7 +24748,7 @@ var Select = function(_param) {
|
|
|
24727
24748
|
overflowY: 'scroll',
|
|
24728
24749
|
zIndex: 2
|
|
24729
24750
|
},
|
|
24730
|
-
children:
|
|
24751
|
+
children: displayOptions.map(function(option) {
|
|
24731
24752
|
return /*#__PURE__*/ jsx(MenuItem, _object_spread_props$h(_object_spread$k({
|
|
24732
24753
|
selected: value === option.value
|
|
24733
24754
|
}, option), {
|
|
@@ -28839,7 +28860,7 @@ function _tagged_template_literal$9(strings, raw) {
|
|
|
28839
28860
|
}
|
|
28840
28861
|
function _templateObject$9() {
|
|
28841
28862
|
var data = _tagged_template_literal$9([
|
|
28842
|
-
"\n position: absolute;\n
|
|
28863
|
+
"\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(0, 0, 0, 0.2);\n font-size: 32px;\n"
|
|
28843
28864
|
]);
|
|
28844
28865
|
_templateObject$9 = function _templateObject() {
|
|
28845
28866
|
return data;
|
|
@@ -29005,7 +29026,6 @@ var Modal = function(param) {
|
|
|
29005
29026
|
children: /*#__PURE__*/ jsxs(ModalContent, {
|
|
29006
29027
|
style: style,
|
|
29007
29028
|
children: [
|
|
29008
|
-
loading && /*#__PURE__*/ jsx(LoadingOverlay, {}),
|
|
29009
29029
|
/*#__PURE__*/ jsxs(ModalHeader, {
|
|
29010
29030
|
children: [
|
|
29011
29031
|
/*#__PURE__*/ jsx(Typography, {
|
|
@@ -29049,7 +29069,8 @@ var Modal = function(param) {
|
|
|
29049
29069
|
children: label
|
|
29050
29070
|
}));
|
|
29051
29071
|
})
|
|
29052
|
-
})
|
|
29072
|
+
}),
|
|
29073
|
+
loading && /*#__PURE__*/ jsx(LoadingOverlay, {})
|
|
29053
29074
|
]
|
|
29054
29075
|
})
|
|
29055
29076
|
});
|
|
@@ -33645,7 +33666,7 @@ function _tagged_template_literal$4(strings, raw) {
|
|
|
33645
33666
|
}
|
|
33646
33667
|
function _templateObject$4() {
|
|
33647
33668
|
var data = _tagged_template_literal$4([
|
|
33648
|
-
"\n position: sticky;\n top: 0;\n
|
|
33669
|
+
"\n position: sticky;\n top: 0;\n"
|
|
33649
33670
|
]);
|
|
33650
33671
|
_templateObject$4 = function _templateObject() {
|
|
33651
33672
|
return data;
|
|
@@ -34015,7 +34036,7 @@ function _unsupported_iterable_to_array$1(o, minLen) {
|
|
|
34015
34036
|
}
|
|
34016
34037
|
function _templateObject$2() {
|
|
34017
34038
|
var data = _tagged_template_literal$2([
|
|
34018
|
-
"\n position: relative;\n display: flex;\n flex-direction: column;\n min-height: 400px;\n
|
|
34039
|
+
"\n position: relative;\n display: flex;\n flex-direction: column;\n min-height: 400px;\n border: 1px solid ",
|
|
34019
34040
|
";\n border-radius: ",
|
|
34020
34041
|
"px;\n overflow: scroll;\n"
|
|
34021
34042
|
]);
|
|
@@ -34051,7 +34072,7 @@ var TableContainer = styled(/*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
34051
34072
|
var TableWrapper = styled.table(_templateObject1$2());
|
|
34052
34073
|
var ContextMenuButton = styled(Button)(_templateObject2$2(), spacing(0.5));
|
|
34053
34074
|
var Table = function(param) {
|
|
34054
|
-
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_paginationMode = param.paginationMode, paginationMode = _param_paginationMode === void 0 ? 'page' : _param_paginationMode, pageInfo = param.pageInfo, subText = param.subText, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, getRowDisabled = param.getRowDisabled, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, error = param.error, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
34075
|
+
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_paginationMode = param.paginationMode, paginationMode = _param_paginationMode === void 0 ? 'page' : _param_paginationMode, pageInfo = param.pageInfo, subText = param.subText, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, getRowDisabled = param.getRowDisabled, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, containerStyle = param.containerStyle, error = param.error, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
34055
34076
|
var containerRef = useRef(null);
|
|
34056
34077
|
var ctxMenuAnchorRef = useRef(null);
|
|
34057
34078
|
var _useState = _sliced_to_array$1(useState({}), 2), columnSizing = _useState[0], setColumnSizing = _useState[1];
|
|
@@ -34233,11 +34254,10 @@ var Table = function(param) {
|
|
|
34233
34254
|
overflow: 'hidden'
|
|
34234
34255
|
},
|
|
34235
34256
|
children: [
|
|
34236
|
-
isLoading && /*#__PURE__*/ jsx(LoadingOverlay, {}),
|
|
34237
34257
|
/*#__PURE__*/ jsxs(TableContainer, {
|
|
34238
|
-
style: {
|
|
34258
|
+
style: _object_spread$2({
|
|
34239
34259
|
height: height
|
|
34240
|
-
},
|
|
34260
|
+
}, containerStyle),
|
|
34241
34261
|
ref: containerRef,
|
|
34242
34262
|
children: [
|
|
34243
34263
|
Boolean(!isLoading && (!(data === null || data === void 0 ? void 0 : data.length) || error)) && /*#__PURE__*/ jsx(Typography, {
|
|
@@ -34272,7 +34292,8 @@ var Table = function(param) {
|
|
|
34272
34292
|
]
|
|
34273
34293
|
})
|
|
34274
34294
|
]
|
|
34275
|
-
})
|
|
34295
|
+
}),
|
|
34296
|
+
isLoading && /*#__PURE__*/ jsx(LoadingOverlay, {})
|
|
34276
34297
|
]
|
|
34277
34298
|
}),
|
|
34278
34299
|
onPageSizeChange && onPageChange && pageInfo && (paginationMode === 'page' && 'currentPage' in pageInfo ? /*#__PURE__*/ jsx(Pagination, {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface SelectOption {
|
|
2
|
-
value: string;
|
|
2
|
+
value: string | null;
|
|
3
3
|
label: string;
|
|
4
4
|
}
|
|
5
5
|
export interface BaseSelectProps extends React.InputHTMLAttributes<HTMLSelectElement> {
|
|
@@ -12,9 +12,11 @@ export interface BaseSelectProps extends React.InputHTMLAttributes<HTMLSelectEle
|
|
|
12
12
|
checkbox?: boolean;
|
|
13
13
|
initialValue?: SelectOption;
|
|
14
14
|
type?: 'primary' | 'secondary';
|
|
15
|
+
addClearOption?: boolean;
|
|
16
|
+
clearOptionLabel?: string;
|
|
15
17
|
}
|
|
16
18
|
export interface SelectProps extends BaseSelectProps {
|
|
17
19
|
value: any;
|
|
18
20
|
setValue: (value: string) => void;
|
|
19
21
|
}
|
|
20
|
-
export declare const Select: ({ sz, error, options, checkbox, placeholder, value, setValue, initialValue, type, style, maxHeight, disabled, ...props }: SelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Select: ({ sz, error, options, checkbox, placeholder, value, setValue, initialValue, type, style, maxHeight, disabled, addClearOption, clearOptionLabel, ...props }: SelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
package/src/lib/Table/Table.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLProps } from 'react';
|
|
1
|
+
import { CSSProperties, HTMLProps } from 'react';
|
|
2
2
|
import { ColumnDef, OnChangeFn, Row } from '@tanstack/react-table';
|
|
3
3
|
import { PageInfoPageBased, PageInfoCursorBased } from '../Pagination/Pagination';
|
|
4
4
|
export declare const TableContainer: import("@emotion/styled").StyledComponent<Omit<HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
@@ -32,6 +32,7 @@ export interface RowAction<T> {
|
|
|
32
32
|
interface TableStyleProps {
|
|
33
33
|
dense?: boolean;
|
|
34
34
|
height?: number;
|
|
35
|
+
containerStyle?: CSSProperties;
|
|
35
36
|
}
|
|
36
37
|
interface TableRowProps<T> {
|
|
37
38
|
enableRowSelection?: boolean;
|
|
@@ -61,5 +62,5 @@ interface TableDataProps<T> {
|
|
|
61
62
|
}
|
|
62
63
|
export interface TableProps<T extends object> extends TableStyleProps, TableRowProps<T>, TableDataProps<T>, PaginationProps {
|
|
63
64
|
}
|
|
64
|
-
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, paginationMode, pageInfo, subText, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, getRowDisabled, onRowClick, contextMenuActions, dense, height, error, testId, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, paginationMode, pageInfo, subText, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, getRowDisabled, onRowClick, contextMenuActions, dense, height, containerStyle, error, testId, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
65
66
|
export {};
|