@onewelcome/react-lib-components 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts +4 -1
- package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +1 -1
- package/dist/DataGrid/datagrid.interfaces.d.ts +4 -4
- package/dist/Form/FormControl/FormControl.d.ts +1 -1
- package/dist/Form/Input/Input.d.ts +1 -1
- package/dist/Form/Select/Select.d.ts +1 -1
- package/dist/Form/Select/Select.interfaces.d.ts +1 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Link/Link.d.ts +1 -1
- package/dist/Notifications/Snackbar/interfaces.d.ts +2 -2
- package/dist/Pagination/Pagination.d.ts +3 -3
- package/dist/Popover/Popover.d.ts +3 -1
- package/dist/Typography/Typography.d.ts +2 -2
- package/dist/Wizard/Wizard.d.ts +1 -1
- package/dist/Wizard/wizardStateReducer.d.ts +2 -2
- package/dist/_BaseStyling_/BaseStyling.d.ts +2 -0
- package/dist/hooks/usePosition.d.ts +6 -5
- package/dist/hooks/useSpacing.d.ts +3 -3
- package/dist/interfaces.d.ts +1 -1
- package/dist/react-lib-components.cjs.development.js +78 -56
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +79 -57
- package/dist/react-lib-components.esm.js.map +1 -1
- package/dist/util/helper.d.ts +1 -1
- package/package.json +36 -35
- package/src/ContextMenu/ContextMenu.tsx +18 -7
- package/src/Form/Input/Input.test.tsx +12 -0
- package/src/Form/Input/Input.tsx +1 -0
- package/src/Popover/Popover.test.tsx +4 -1
- package/src/Popover/Popover.tsx +40 -8
- package/src/Tooltip/Tooltip.test.tsx +5 -5
- package/src/_BaseStyling_/BaseStyling.tsx +4 -0
- package/src/hooks/usePosition.test.tsx +85 -85
- package/src/hooks/usePosition.ts +6 -3
- package/src/mixins.module.scss +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect, Fragment, useRef, createRef, useLayoutEffect, createContext, useContext,
|
|
1
|
+
import React, { useState, useEffect, Fragment, useRef, useCallback, createRef, useLayoutEffect, createContext, useContext, useReducer, useMemo } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
|
|
4
4
|
function _extends() {
|
|
@@ -53,6 +53,8 @@ var BaseStyling = function BaseStyling(_ref) {
|
|
|
53
53
|
modalShadowColor: "rgba(0, 0, 0, 0.16)",
|
|
54
54
|
modalBackgroundColor: "#f5f8f8",
|
|
55
55
|
modalHeaderBackgroundColor: "var(--light)",
|
|
56
|
+
skeletonBackgroundColor: "var(--disabled)",
|
|
57
|
+
skeletonAnimationColorRgb: "255, 255, 255",
|
|
56
58
|
snackbarTextColor: "var(--light)",
|
|
57
59
|
snackbarInfoBackgroundColor: "#003b5e",
|
|
58
60
|
snackbarSuccessBackgroundColor: "#008a28",
|
|
@@ -378,6 +380,37 @@ var BreadcrumbsComponent = function BreadcrumbsComponent(_ref, ref) {
|
|
|
378
380
|
};
|
|
379
381
|
var Breadcrumbs = /*#__PURE__*/React.forwardRef(BreadcrumbsComponent);
|
|
380
382
|
|
|
383
|
+
/*
|
|
384
|
+
* Copyright 2022 OneWelcome B.V.
|
|
385
|
+
*
|
|
386
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
387
|
+
* you may not use this file except in compliance with the License.
|
|
388
|
+
* You may obtain a copy of the License at
|
|
389
|
+
*
|
|
390
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
391
|
+
*
|
|
392
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
393
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
394
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
395
|
+
* See the License for the specific language governing permissions and
|
|
396
|
+
* limitations under the License.
|
|
397
|
+
*/
|
|
398
|
+
var useDebouncedCallback = function useDebouncedCallback(callback, delay, dependencies) {
|
|
399
|
+
var timeout = React.useRef();
|
|
400
|
+
var comboDeps = dependencies ? [callback, delay].concat(dependencies) : [callback, delay];
|
|
401
|
+
return React.useCallback(function () {
|
|
402
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
403
|
+
args[_key] = arguments[_key];
|
|
404
|
+
}
|
|
405
|
+
if (timeout.current != null) {
|
|
406
|
+
clearTimeout(timeout.current);
|
|
407
|
+
}
|
|
408
|
+
timeout.current = setTimeout(function () {
|
|
409
|
+
callback.apply(void 0, args);
|
|
410
|
+
}, delay);
|
|
411
|
+
}, comboDeps);
|
|
412
|
+
};
|
|
413
|
+
|
|
381
414
|
var defaultConfigObject = {
|
|
382
415
|
relativeElement: undefined,
|
|
383
416
|
elementToBePositioned: undefined,
|
|
@@ -394,7 +427,8 @@ var defaultConfigObject = {
|
|
|
394
427
|
right: 0,
|
|
395
428
|
bottom: 0,
|
|
396
429
|
left: 0
|
|
397
|
-
}
|
|
430
|
+
},
|
|
431
|
+
debounceAmount: 20
|
|
398
432
|
};
|
|
399
433
|
var usePosition = function usePosition(providedConfigObject) {
|
|
400
434
|
if (providedConfigObject === void 0) {
|
|
@@ -516,7 +550,7 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
516
550
|
return _extends({}, prevState, (_extends2 = {}, _extends2[direction] = placementValue, _extends2[oppositeDirection] = "initial", _extends2));
|
|
517
551
|
});
|
|
518
552
|
};
|
|
519
|
-
var calculatePosition = function
|
|
553
|
+
var calculatePosition = useDebouncedCallback(function () {
|
|
520
554
|
var _configObject$relativ;
|
|
521
555
|
if (!((_configObject$relativ = configObject.relativeElement) != null && _configObject$relativ.current)) return;
|
|
522
556
|
var relativeElRect = configObject.relativeElement.current.getBoundingClientRect();
|
|
@@ -539,7 +573,7 @@ var usePosition = function usePosition(providedConfigObject) {
|
|
|
539
573
|
};
|
|
540
574
|
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "horizontal");
|
|
541
575
|
_calculatePlacement(clonedRelEl, elementToBePositionedDimensions, "vertical");
|
|
542
|
-
};
|
|
576
|
+
}, configObject.debounceAmount || 20);
|
|
543
577
|
return {
|
|
544
578
|
top: position.top,
|
|
545
579
|
bottom: position.bottom,
|
|
@@ -553,26 +587,26 @@ var css$S = ".Popover_module_srOnly__516f452a{clip:rect(0,0,0,0);border:0;height
|
|
|
553
587
|
var modules_ef8f756f = {"sr-only":"Popover_module_srOnly__516f452a","hidden":"Popover_module_hidden__516f452a","slide-in":"Popover_module_slideIn__516f452a","slide-out":"Popover_module_slideOut__516f452a","popover":"Popover_module_popover__516f452a","show":"Popover_module_show__516f452a"};
|
|
554
588
|
n(css$S,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
555
589
|
|
|
556
|
-
var _excluded$U = ["children", "className", "show", "placement", "offset", "transformOrigin", "anchorEl"];
|
|
590
|
+
var _excluded$U = ["children", "className", "show", "placement", "offset", "debounceAmount", "transformOrigin", "anchorEl", "onAnchorOutOfView"];
|
|
557
591
|
var PopoverComponent = function PopoverComponent(_ref, ref) {
|
|
558
592
|
var children = _ref.children,
|
|
559
593
|
className = _ref.className,
|
|
560
594
|
show = _ref.show,
|
|
561
595
|
placement = _ref.placement,
|
|
562
596
|
offset = _ref.offset,
|
|
597
|
+
debounceAmount = _ref.debounceAmount,
|
|
563
598
|
transformOrigin = _ref.transformOrigin,
|
|
564
599
|
anchorEl = _ref.anchorEl,
|
|
600
|
+
onAnchorOutOfView = _ref.onAnchorOutOfView,
|
|
565
601
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$U);
|
|
566
602
|
var elToBePositioned = useRef(null);
|
|
567
|
-
if (show === undefined) {
|
|
568
|
-
throw new Error('Please make sure to define the "show" property on your Popover component');
|
|
569
|
-
}
|
|
570
603
|
var _usePosition = usePosition({
|
|
571
604
|
elementToBePositioned: elToBePositioned,
|
|
572
605
|
relativeElement: anchorEl,
|
|
573
606
|
offset: offset,
|
|
574
607
|
placement: placement,
|
|
575
|
-
transformOrigin: transformOrigin
|
|
608
|
+
transformOrigin: transformOrigin,
|
|
609
|
+
debounceAmount: debounceAmount || undefined
|
|
576
610
|
}),
|
|
577
611
|
top = _usePosition.top,
|
|
578
612
|
left = _usePosition.left,
|
|
@@ -580,14 +614,25 @@ var PopoverComponent = function PopoverComponent(_ref, ref) {
|
|
|
580
614
|
bottom = _usePosition.bottom,
|
|
581
615
|
calculatePosition = _usePosition.calculatePosition;
|
|
582
616
|
useEffect(function () {
|
|
617
|
+
if (!show) {
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
583
620
|
window.addEventListener("resize", calculatePosition);
|
|
621
|
+
window.addEventListener("scroll", calculatePosition);
|
|
584
622
|
return function () {
|
|
585
|
-
|
|
623
|
+
window.removeEventListener("resize", calculatePosition);
|
|
624
|
+
window.removeEventListener("scroll", calculatePosition);
|
|
586
625
|
};
|
|
587
|
-
}, []);
|
|
626
|
+
}, [show]);
|
|
588
627
|
useEffect(function () {
|
|
589
628
|
calculatePosition();
|
|
590
629
|
}, [show]);
|
|
630
|
+
useEffect(function () {
|
|
631
|
+
var isAnchorOffscreen = show && (top === 0 || left === 0 || right === 0 || bottom === 0 || window.innerHeight - elToBePositioned.current.offsetHeight === top);
|
|
632
|
+
if (isAnchorOffscreen) {
|
|
633
|
+
onAnchorOutOfView && onAnchorOutOfView();
|
|
634
|
+
}
|
|
635
|
+
}, [top, left, right, bottom]);
|
|
591
636
|
return React.createElement("div", _extends({
|
|
592
637
|
ref: ref
|
|
593
638
|
}, rest), React.createElement("div", {
|
|
@@ -621,7 +666,7 @@ var useBodyClick = function useBodyClick(checkFunction, callbackFunction, depend
|
|
|
621
666
|
}, [dependingStateVariable]);
|
|
622
667
|
};
|
|
623
668
|
|
|
624
|
-
var _excluded$T = ["trigger", "children", "decorativeElement", "id", "show", "onShow", "onClose", "placement", "offset", "transformOrigin", "domRoot"];
|
|
669
|
+
var _excluded$T = ["trigger", "children", "decorativeElement", "id", "show", "onShow", "onClose", "placement", "offset", "transformOrigin", "debounceAmount", "domRoot", "popoverProps"];
|
|
625
670
|
var ContextMenuComponent = function ContextMenuComponent(_ref, ref) {
|
|
626
671
|
var trigger = _ref.trigger,
|
|
627
672
|
children = _ref.children,
|
|
@@ -648,8 +693,10 @@ var ContextMenuComponent = function ContextMenuComponent(_ref, ref) {
|
|
|
648
693
|
horizontal: "left",
|
|
649
694
|
vertical: "top"
|
|
650
695
|
} : _ref$transformOrigin,
|
|
696
|
+
debounceAmount = _ref.debounceAmount,
|
|
651
697
|
_ref$domRoot = _ref.domRoot,
|
|
652
698
|
domRoot = _ref$domRoot === void 0 ? document.body : _ref$domRoot,
|
|
699
|
+
popoverProps = _ref.popoverProps,
|
|
653
700
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$T);
|
|
654
701
|
var anchorEl = useRef(null);
|
|
655
702
|
var _useState = useState(show),
|
|
@@ -763,17 +810,22 @@ var ContextMenuComponent = function ContextMenuComponent(_ref, ref) {
|
|
|
763
810
|
});
|
|
764
811
|
});
|
|
765
812
|
};
|
|
813
|
+
var onOutOfViewHandler = useCallback(function () {
|
|
814
|
+
setShowContextMenu(false);
|
|
815
|
+
}, []);
|
|
766
816
|
return React.createElement("div", _extends({}, rest, {
|
|
767
817
|
ref: ref,
|
|
768
818
|
onKeyDown: onArrowNavigation,
|
|
769
819
|
className: modules_846e6042["context-menu"]
|
|
770
|
-
}), renderTrigger(), createPortal(React.createElement(Popover, {
|
|
820
|
+
}), renderTrigger(), createPortal(React.createElement(Popover, _extends({}, popoverProps, {
|
|
771
821
|
placement: placement,
|
|
772
822
|
transformOrigin: transformOrigin,
|
|
773
823
|
offset: offset,
|
|
774
824
|
anchorEl: anchorEl,
|
|
775
|
-
|
|
776
|
-
|
|
825
|
+
debounceAmount: debounceAmount,
|
|
826
|
+
show: showContextMenu,
|
|
827
|
+
onAnchorOutOfView: onOutOfViewHandler
|
|
828
|
+
}), decorativeElement && React.createElement("div", {
|
|
777
829
|
className: modules_846e6042["decorative-element"]
|
|
778
830
|
}, decorativeElement), React.createElement("ul", {
|
|
779
831
|
className: modules_846e6042["menu"] + " " + (decorativeElement ? modules_846e6042["no-margin-top"] : ""),
|
|
@@ -1145,8 +1197,8 @@ var TextEllipsisComponent = function TextEllipsisComponent(_ref, ref) {
|
|
|
1145
1197
|
};
|
|
1146
1198
|
var TextEllipsis = /*#__PURE__*/React.forwardRef(TextEllipsisComponent);
|
|
1147
1199
|
|
|
1148
|
-
var css$I = ".
|
|
1149
|
-
var modules_5f01ab30 = {"sr-only":"
|
|
1200
|
+
var css$I = ".Tile_module_srOnly__c570d3e3{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.Tile_module_hidden__c570d3e3{display:none}.Tile_module_slideIn__c570d3e3{animation:Tile_module_slideIn__c570d3e3 .5s forwards}@media (prefers-reduced-motion:reduce){.Tile_module_slideIn__c570d3e3{animation-duration:.1ms}}.Tile_module_slideOut__c570d3e3{animation:Tile_module_slideOut__c570d3e3 .5s forwards}@media (prefers-reduced-motion:reduce){.Tile_module_slideOut__c570d3e3{animation-duration:.1ms}}@keyframes Tile_module_slideIn__c570d3e3{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Tile_module_slideOut__c570d3e3{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.Tile_module_tile__c570d3e3{background-color:var(--light);border:1px solid var(--light-grey-border);border-radius:8px;box-sizing:border-box;font-family:var(--font-family);padding:0 0 2rem;transition-duration:.2s;transition-property:box-shadow;transition-timing-function:ease-in-out}@media (prefers-reduced-motion:reduce){.Tile_module_tile__c570d3e3{transition-duration:.1ms}}.Tile_module_tile__c570d3e3:hover{box-shadow:0 3px 6px rgba(0,0,0,.29)}.Tile_module_tile__c570d3e3 header{align-items:center;display:flex}.Tile_module_tile__c570d3e3 header .Tile_module_icon__c570d3e3{padding:0 1rem}.Tile_module_tile__c570d3e3 figure{height:3rem;margin:0 0 1rem}.Tile_module_tile__c570d3e3 figure img{height:3rem;vertical-align:top;width:auto}.Tile_module_tile__c570d3e3 .Tile_module_placeholder__c570d3e3{color:var(--greyed-out);font-size:3rem;margin:0 0 1rem}.Tile_module_tile__c570d3e3 .Tile_module_content__c570d3e3{align-items:center;cursor:default;display:flex;flex-direction:column;justify-content:center;padding:0 1rem}.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 header{display:none}.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_image__c570d3e3{background-color:var(--skeleton-background-color);border-radius:.5rem;height:3rem;margin-top:2.5rem;overflow:hidden;position:relative;width:3rem}.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_image__c570d3e3:after{animation:Tile_module_shimmer__c570d3e3 2s infinite;background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%)}@media (prefers-reduced-motion:reduce){.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_image__c570d3e3:after{animation:none}}.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_title__c570d3e3{background-color:var(--skeleton-background-color);border-radius:.5rem;color:transparent;display:inline-block;overflow:hidden;position:relative;width:70%}.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_title__c570d3e3:after{animation:Tile_module_shimmer__c570d3e3 2s infinite;background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%)}@media (prefers-reduced-motion:reduce){.Tile_module_tile__c570d3e3.Tile_module_loading__c570d3e3 .Tile_module_title__c570d3e3:after{animation:none}}@keyframes Tile_module_shimmer__c570d3e3{to{transform:translateX(100%)}}";
|
|
1201
|
+
var modules_5f01ab30 = {"sr-only":"Tile_module_srOnly__c570d3e3","hidden":"Tile_module_hidden__c570d3e3","slide-in":"Tile_module_slideIn__c570d3e3","slide-out":"Tile_module_slideOut__c570d3e3","tile":"Tile_module_tile__c570d3e3","icon":"Tile_module_icon__c570d3e3","placeholder":"Tile_module_placeholder__c570d3e3","content":"Tile_module_content__c570d3e3","loading":"Tile_module_loading__c570d3e3","image":"Tile_module_image__c570d3e3","shimmer":"Tile_module_shimmer__c570d3e3","title":"Tile_module_title__c570d3e3"};
|
|
1150
1202
|
n(css$I,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1151
1203
|
|
|
1152
1204
|
/*
|
|
@@ -1476,8 +1528,8 @@ var ProgressBarComponent = function ProgressBarComponent(_ref, ref) {
|
|
|
1476
1528
|
};
|
|
1477
1529
|
var ProgressBar = /*#__PURE__*/React.forwardRef(ProgressBarComponent);
|
|
1478
1530
|
|
|
1479
|
-
var css$E = ".
|
|
1480
|
-
var modules_1fe82d8f = {"sr-only":"
|
|
1531
|
+
var css$E = ".Skeleton_module_srOnly__162f2f27{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.Skeleton_module_hidden__162f2f27{display:none}.Skeleton_module_slideIn__162f2f27{animation:Skeleton_module_slideIn__162f2f27 .5s forwards}@media (prefers-reduced-motion:reduce){.Skeleton_module_slideIn__162f2f27{animation-duration:.1ms}}.Skeleton_module_slideOut__162f2f27{animation:Skeleton_module_slideOut__162f2f27 .5s forwards}@media (prefers-reduced-motion:reduce){.Skeleton_module_slideOut__162f2f27{animation-duration:.1ms}}@keyframes Skeleton_module_slideIn__162f2f27{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Skeleton_module_slideOut__162f2f27{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.Skeleton_module_skeleton__162f2f27{background-color:var(--skeleton-background-color);display:block;height:auto;overflow:hidden;position:relative}.Skeleton_module_skeleton__162f2f27:after{animation:Skeleton_module_shimmer__162f2f27 2s infinite;background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%)}@media (prefers-reduced-motion:reduce){.Skeleton_module_skeleton__162f2f27:after{animation:none}}@keyframes Skeleton_module_shimmer__162f2f27{to{transform:translateX(100%)}}.Skeleton_module_noHeight__162f2f27:before{content:\" \";white-space:pre-wrap}.Skeleton_module_text__162f2f27{border-radius:.5rem}.Skeleton_module_circular__162f2f27{border-radius:50%}";
|
|
1532
|
+
var modules_1fe82d8f = {"sr-only":"Skeleton_module_srOnly__162f2f27","hidden":"Skeleton_module_hidden__162f2f27","slide-in":"Skeleton_module_slideIn__162f2f27","slide-out":"Skeleton_module_slideOut__162f2f27","skeleton":"Skeleton_module_skeleton__162f2f27","shimmer":"Skeleton_module_shimmer__162f2f27","no-height":"Skeleton_module_noHeight__162f2f27","text":"Skeleton_module_text__162f2f27","circular":"Skeleton_module_circular__162f2f27"};
|
|
1481
1533
|
n(css$E,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1482
1534
|
|
|
1483
1535
|
var _excluded$H = ["variant", "height", "width", "className", "style"];
|
|
@@ -1534,12 +1586,12 @@ var StatusIndicatorComponent = function StatusIndicatorComponent(_ref, ref) {
|
|
|
1534
1586
|
};
|
|
1535
1587
|
var StatusIndicator = /*#__PURE__*/React.forwardRef(StatusIndicatorComponent);
|
|
1536
1588
|
|
|
1537
|
-
var css$C = ".
|
|
1538
|
-
var modules_e3c5bce1 = {"pagination-wrapper":"
|
|
1589
|
+
var css$C = ".Pagination_module_paginationWrapper__33412d71{color:var(--greyed-out);display:flex;flex-direction:column;font-family:var(--font-family);font-size:var(--font-size)}.Pagination_module_paginationWrapper__33412d71 label{margin-bottom:0}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_formElement__33412d71{height:2.5rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_formElement__33412d71 button{min-height:2.5rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_total__33412d71{align-items:center;display:flex;flex:1 0 auto;justify-content:center}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_total__33412d71 span>span{font-family:var(--font-family);font-size:var(--font-size);font-weight:700;margin-left:.25rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71{align-items:center;display:flex;flex:1 0 auto;justify-content:center;margin-top:1rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_next__33412d71,.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_previous__33412d71{align-items:center;display:flex}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_next__33412d71 button,.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_previous__33412d71 button{margin:.25rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_next__33412d71 button span:before,.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_previous__33412d71 button span:before{font-size:.75rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_perPage__33412d71{align-items:center;display:none}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_page__33412d71{align-items:center;display:flex;flex-basis:min-content}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pageSizeSelect__33412d71{border-color:var(--light);margin:0 .25rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pageSizeSelect__33412d71 button{min-width:3.4375rem;padding:0}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pageSizeSelect__33412d71 button div[data-display]{left:.5rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pageSizeSelect__33412d71 button div:not([data-display]){right:.5rem}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_currentValueInput__33412d71{height:auto;margin:0 .25rem 0 0;padding:0}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_currentValueInput__33412d71 input{border-radius:var(--input-border-radius);padding:0 1rem;text-align:center;width:auto}@media screen and (min-width:30em){.Pagination_module_paginationWrapper__33412d71{flex-direction:row}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_total__33412d71{justify-content:flex-start}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71{justify-content:flex-end;margin-top:0}.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_next__33412d71 button,.Pagination_module_paginationWrapper__33412d71 .Pagination_module_pagination__33412d71 .Pagination_module_previous__33412d71 button{margin:0 .5rem}}@media screen and (min-width:48em){.Pagination_module_paginationWrapper__33412d71 .Pagination_module_perPage__33412d71{display:flex;margin-right:.5rem}}";
|
|
1590
|
+
var modules_e3c5bce1 = {"pagination-wrapper":"Pagination_module_paginationWrapper__33412d71","form-element":"Pagination_module_formElement__33412d71","total":"Pagination_module_total__33412d71","pagination":"Pagination_module_pagination__33412d71","previous":"Pagination_module_previous__33412d71","next":"Pagination_module_next__33412d71","per-page":"Pagination_module_perPage__33412d71","page":"Pagination_module_page__33412d71","page-size-select":"Pagination_module_pageSizeSelect__33412d71","current-value-input":"Pagination_module_currentValueInput__33412d71"};
|
|
1539
1591
|
n(css$C,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1540
1592
|
|
|
1541
|
-
var css$B = ".
|
|
1542
|
-
var modules_23691de0 = {"sr-only":"
|
|
1593
|
+
var css$B = ".Input_module_srOnly__7be90f8b{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.Input_module_hidden__7be90f8b{display:none}.Input_module_slideIn__7be90f8b{animation:Input_module_slideIn__7be90f8b .5s forwards}@media (prefers-reduced-motion:reduce){.Input_module_slideIn__7be90f8b{animation-duration:.1ms}}.Input_module_slideOut__7be90f8b{animation:Input_module_slideOut__7be90f8b .5s forwards}@media (prefers-reduced-motion:reduce){.Input_module_slideOut__7be90f8b{animation-duration:.1ms}}@keyframes Input_module_slideIn__7be90f8b{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Input_module_slideOut__7be90f8b{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.Input_module_inputWrapper__7be90f8b{align-items:center;background-color:var(--input-background-color);border:0;border-radius:var(--input-border-radius);display:flex;height:4rem;padding:0 1.25rem;position:relative;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in-out}@media (prefers-reduced-motion:reduce){.Input_module_inputWrapper__7be90f8b{transition-duration:.1ms}}.Input_module_inputWrapper__7be90f8b input:-webkit-autofill,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:active,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:focus,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:hover{transition:background-color 5000s ease-in-out 0s!important}.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:active~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:focus~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:hover~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill~.Input_module_outline__7be90f8b:after{border-radius:var(--input-border-radius);content:\"\";display:block;height:100%;position:absolute;width:100%}@media (-webkit-min-device-pixel-ratio:0) and (min-resolution:0.001dpcm){.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:active~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:focus~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:hover~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill~.Input_module_outline__7be90f8b:after{background-color:#e8f0fe}}@media not all and (min-resolution:0.001dpcm){.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:active~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:focus~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill:hover~.Input_module_outline__7be90f8b:after,.Input_module_inputWrapper__7be90f8b input:-webkit-autofill~.Input_module_outline__7be90f8b:after{background-color:#faffbd}}.Input_module_inputWrapper__7be90f8b:hover .Input_module_outline__7be90f8b{border-color:var(--default)}.Input_module_inputWrapper__7be90f8b .Input_module_outline__7be90f8b.Input_module_disabled__7be90f8b{border-color:var(--light)}.Input_module_inputWrapper__7be90f8b .Input_module_outline__7be90f8b.Input_module_error__7be90f8b{border-color:var(--error)}.Input_module_inputWrapper__7be90f8b .Input_module_outline__7be90f8b.Input_module_focus__7be90f8b{border-width:var(--input-border-width-focus)}.Input_module_inputWrapper__7be90f8b .Input_module_outline__7be90f8b.Input_module_focus__7be90f8b:not(.Input_module_error__7be90f8b){border-color:var(--color-focus)}.Input_module_input__7be90f8b{background-color:transparent;border:0;border-radius:var(--input-border-radius);box-sizing:border-box;color:var(--greyed-out);font-family:var(--font-family);font-size:var(--font-size);height:4rem;padding:0;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in-out;z-index:1}@media (prefers-reduced-motion:reduce){.Input_module_input__7be90f8b{transition-duration:.1ms}}.Input_module_input__7be90f8b:not(.Input_module_shrinkWidthForDateIcon__7be90f8b){width:100%}.Input_module_input__7be90f8b:disabled{background-color:var(--disabled);cursor:not-allowed}.Input_module_input__7be90f8b.Input_module_shrinkWidthForDateIcon__7be90f8b{width:auto}.Input_module_input__7be90f8b:focus:not(:disabled){outline:none}.Input_module_outline__7be90f8b{border-color:var(--light-grey-border);border-radius:var(--input-border-radius);border-style:var(--input-border-style);border-width:var(--input-border-width);inset:0;margin:0;padding:0;pointer-events:none;position:absolute;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in-out}@media (prefers-reduced-motion:reduce){.Input_module_outline__7be90f8b{transition-duration:.1ms}}.Input_module_error__7be90f8b input{color:var(--error);padding-right:3.5rem}.Input_module_error__7be90f8b input.Input_module_removeExtraIndent__7be90f8b{padding-right:0}.Input_module_warning__7be90f8b{align-items:center;color:var(--error);display:flex;font-size:1.125rem;height:100%;justify-content:center;position:absolute;right:1.25rem;top:0;width:1.25rem;z-index:2}.Input_module_warning__7be90f8b:before{height:1.3125rem}.Input_module_inputWrapper__7be90f8b [data-prefix],.Input_module_inputWrapper__7be90f8b [data-suffix]{display:block;transition-duration:.2s;transition-property:all;transition-timing-function:ease-in-out;z-index:1}@media (prefers-reduced-motion:reduce){.Input_module_inputWrapper__7be90f8b [data-prefix],.Input_module_inputWrapper__7be90f8b [data-suffix]{transition-duration:.1ms}}";
|
|
1594
|
+
var modules_23691de0 = {"sr-only":"Input_module_srOnly__7be90f8b","hidden":"Input_module_hidden__7be90f8b","slide-in":"Input_module_slideIn__7be90f8b","slide-out":"Input_module_slideOut__7be90f8b","input-wrapper":"Input_module_inputWrapper__7be90f8b","outline":"Input_module_outline__7be90f8b","disabled":"Input_module_disabled__7be90f8b","error":"Input_module_error__7be90f8b","focus":"Input_module_focus__7be90f8b","input":"Input_module_input__7be90f8b","shrink-width-for-date-icon":"Input_module_shrinkWidthForDateIcon__7be90f8b","remove-extra-indent":"Input_module_removeExtraIndent__7be90f8b","warning":"Input_module_warning__7be90f8b"};
|
|
1543
1595
|
n(css$B,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
1544
1596
|
|
|
1545
1597
|
var _excluded$F = ["error", "className", "name", "style", "wrapperProps", "type", "labeledBy", "prefix", "suffix", "disabled", "onFocus", "onBlur"];
|
|
@@ -1605,7 +1657,8 @@ var InputComponent = function InputComponent(_ref, ref) {
|
|
|
1605
1657
|
type: type,
|
|
1606
1658
|
name: name,
|
|
1607
1659
|
disabled: disabled,
|
|
1608
|
-
className: inputClassNames.join(" ")
|
|
1660
|
+
className: inputClassNames.join(" "),
|
|
1661
|
+
spellCheck: rest.spellCheck || false
|
|
1609
1662
|
})), suffix && React.createElement("div", {
|
|
1610
1663
|
ref: suffixRef,
|
|
1611
1664
|
"data-suffix": true,
|
|
@@ -2256,37 +2309,6 @@ var useRepeater = function useRepeater(_ref) {
|
|
|
2256
2309
|
};
|
|
2257
2310
|
};
|
|
2258
2311
|
|
|
2259
|
-
/*
|
|
2260
|
-
* Copyright 2022 OneWelcome B.V.
|
|
2261
|
-
*
|
|
2262
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2263
|
-
* you may not use this file except in compliance with the License.
|
|
2264
|
-
* You may obtain a copy of the License at
|
|
2265
|
-
*
|
|
2266
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2267
|
-
*
|
|
2268
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2269
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2270
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2271
|
-
* See the License for the specific language governing permissions and
|
|
2272
|
-
* limitations under the License.
|
|
2273
|
-
*/
|
|
2274
|
-
var useDebouncedCallback = function useDebouncedCallback(callback, delay, dependencies) {
|
|
2275
|
-
var timeout = React.useRef();
|
|
2276
|
-
var comboDeps = dependencies ? [callback, delay].concat(dependencies) : [callback, delay];
|
|
2277
|
-
return React.useCallback(function () {
|
|
2278
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2279
|
-
args[_key] = arguments[_key];
|
|
2280
|
-
}
|
|
2281
|
-
if (timeout.current != null) {
|
|
2282
|
-
clearTimeout(timeout.current);
|
|
2283
|
-
}
|
|
2284
|
-
timeout.current = setTimeout(function () {
|
|
2285
|
-
callback.apply(void 0, args);
|
|
2286
|
-
}, delay);
|
|
2287
|
-
}, comboDeps);
|
|
2288
|
-
};
|
|
2289
|
-
|
|
2290
2312
|
var css$y = ".BaseModal_module_srOnly__6d413cba{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.BaseModal_module_hidden__6d413cba{display:none}.BaseModal_module_slideIn__6d413cba{animation:BaseModal_module_slideIn__6d413cba .5s forwards}@media (prefers-reduced-motion:reduce){.BaseModal_module_slideIn__6d413cba{animation-duration:.1ms}}.BaseModal_module_slideOut__6d413cba{animation:BaseModal_module_slideOut__6d413cba .5s forwards}@media (prefers-reduced-motion:reduce){.BaseModal_module_slideOut__6d413cba{animation-duration:.1ms}}@keyframes BaseModal_module_slideIn__6d413cba{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes BaseModal_module_slideOut__6d413cba{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.BaseModal_module_modal__6d413cba{align-items:flex-start;display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;visibility:hidden;width:100vw;z-index:10}.BaseModal_module_modal__6d413cba .BaseModal_module_backdrop__6d413cba{background-color:transparent;content:\"\";height:100%;left:0;position:absolute;top:0;transition-duration:.5s;transition-property:background-color;transition-timing-function:ease;width:100%}@media (prefers-reduced-motion:reduce){.BaseModal_module_modal__6d413cba .BaseModal_module_backdrop__6d413cba{transition-duration:.1ms}}.BaseModal_module_modal__6d413cba.BaseModal_module_visible__6d413cba{visibility:visible}.BaseModal_module_modal__6d413cba.BaseModal_module_visible__6d413cba .BaseModal_module_backdrop__6d413cba{background-color:var(--default);opacity:.75}.BaseModal_module_container__6d413cba{background-color:var(--modal-background-color);display:flex;flex-direction:column;height:100%;width:100%;z-index:11}@media only screen and (min-width:50em){.BaseModal_module_container__6d413cba{border-radius:8px;box-shadow:0 30px 50px var(--modal-shadow-color);height:auto;margin-top:3.125rem;max-height:calc(90% - 3.125rem);width:50rem}}";
|
|
2291
2313
|
var modules_cf1b230e = {"sr-only":"BaseModal_module_srOnly__6d413cba","hidden":"BaseModal_module_hidden__6d413cba","slide-in":"BaseModal_module_slideIn__6d413cba","slide-out":"BaseModal_module_slideOut__6d413cba","modal":"BaseModal_module_modal__6d413cba","backdrop":"BaseModal_module_backdrop__6d413cba","visible":"BaseModal_module_visible__6d413cba","container":"BaseModal_module_container__6d413cba"};
|
|
2292
2314
|
n(css$y,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
@@ -4624,8 +4646,8 @@ var DataGridActionsComponent = function DataGridActionsComponent(_ref, ref) {
|
|
|
4624
4646
|
};
|
|
4625
4647
|
var DataGridActions = /*#__PURE__*/React.forwardRef(DataGridActionsComponent);
|
|
4626
4648
|
|
|
4627
|
-
var css$2 = ".
|
|
4628
|
-
var modules_e636700c = {"sr-only":"
|
|
4649
|
+
var css$2 = ".DataGridCell_module_srOnly__6229566a{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DataGridCell_module_hidden__6229566a{display:none}.DataGridCell_module_slideIn__6229566a{animation:DataGridCell_module_slideIn__6229566a .5s forwards}@media (prefers-reduced-motion:reduce){.DataGridCell_module_slideIn__6229566a{animation-duration:.1ms}}.DataGridCell_module_slideOut__6229566a{animation:DataGridCell_module_slideOut__6229566a .5s forwards}@media (prefers-reduced-motion:reduce){.DataGridCell_module_slideOut__6229566a{animation-duration:.1ms}}@keyframes DataGridCell_module_slideIn__6229566a{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes DataGridCell_module_slideOut__6229566a{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.DataGridCell_module_cell__6229566a{min-height:3.5rem;padding:.5rem .625rem}.DataGridCell_module_cell__6229566a:first-child{padding-left:1rem}.DataGridCell_module_cell__6229566a:last-child{padding-right:1rem}.DataGridCell_module_cell__6229566a .DataGridCell_module_loading__6229566a{background-color:var(--skeleton-background-color);border-radius:.5rem;height:1.25rem;margin:.625rem 0;overflow:hidden;position:relative}.DataGridCell_module_cell__6229566a .DataGridCell_module_loading__6229566a:after{animation:DataGridCell_module_shimmer__6229566a 2s infinite;background-image:linear-gradient(90deg,rgba(var(--skeleton-animation-color-rgb),0) 0,rgba(var(--skeleton-animation-color-rgb),.2) 20%,rgba(var(--skeleton-animation-color-rgb),.5) 60%,rgba(var(--skeleton-animation-color-rgb),0));bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;transform:translateX(-100%)}@media (prefers-reduced-motion:reduce){.DataGridCell_module_cell__6229566a .DataGridCell_module_loading__6229566a:after{animation:none}}@keyframes DataGridCell_module_shimmer__6229566a{to{transform:translateX(100%)}}@media only screen and (min-width:50em){.DataGridCell_module_cell__6229566a:first-child{padding-left:1.25rem}.DataGridCell_module_cell__6229566a:last-child{padding-right:1.25rem}}";
|
|
4650
|
+
var modules_e636700c = {"sr-only":"DataGridCell_module_srOnly__6229566a","hidden":"DataGridCell_module_hidden__6229566a","slide-in":"DataGridCell_module_slideIn__6229566a","slide-out":"DataGridCell_module_slideOut__6229566a","cell":"DataGridCell_module_cell__6229566a","loading":"DataGridCell_module_loading__6229566a","shimmer":"DataGridCell_module_shimmer__6229566a"};
|
|
4629
4651
|
n(css$2,{"attributes":{"nonce":"DsPHCoJqXm4vKCqFrm03y1"}});
|
|
4630
4652
|
|
|
4631
4653
|
var _excluded$3 = ["children", "className", "isLoading", "spacing", "cellIndex", "columnLength", "disableContextMenuColumn"];
|