@norges-domstoler/dds-components 17.5.1 → 17.5.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.
- package/dist/index.css +2 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.js +596 -571
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +335 -308
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -532,6 +532,9 @@ function handleElementWithBackdropUnmount(container) {
|
|
|
532
532
|
window.scrollTo(0, scrollY * -1);
|
|
533
533
|
}
|
|
534
534
|
|
|
535
|
+
// src/components/helpers/Backdrop/Backdrop.tsx
|
|
536
|
+
var import_react2 = require("react");
|
|
537
|
+
|
|
535
538
|
// src/components/helpers/Backdrop/Backdrop.module.css
|
|
536
539
|
var Backdrop_default = {
|
|
537
540
|
backdrop: "Backdrop_backdrop",
|
|
@@ -756,16 +759,19 @@ function useElementHeight(element) {
|
|
|
756
759
|
|
|
757
760
|
// src/components/helpers/Backdrop/Backdrop.tsx
|
|
758
761
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
759
|
-
var Backdrop = (
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
}
|
|
762
|
+
var Backdrop = (0, import_react2.forwardRef)(
|
|
763
|
+
({ isMounted, ...props }, ref) => {
|
|
764
|
+
const isMountedCn = isMounted ? "visible" : "hidden";
|
|
765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
ref,
|
|
769
|
+
className: cn(Backdrop_default.backdrop, Backdrop_default[`backdrop--${isMountedCn}`]),
|
|
770
|
+
...props
|
|
771
|
+
}
|
|
772
|
+
);
|
|
773
|
+
}
|
|
774
|
+
);
|
|
769
775
|
Backdrop.displayName = "Backdrop";
|
|
770
776
|
|
|
771
777
|
// src/components/helpers/Chevron/Chevron.module.css
|
|
@@ -821,9 +827,9 @@ var AnimatedChevronUpDown = ({
|
|
|
821
827
|
};
|
|
822
828
|
|
|
823
829
|
// src/components/helpers/ElementAs/ElementAs.tsx
|
|
824
|
-
var
|
|
830
|
+
var import_react3 = require("react");
|
|
825
831
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
826
|
-
var ElementAs = (0,
|
|
832
|
+
var ElementAs = (0, import_react3.forwardRef)(
|
|
827
833
|
(props, ref) => {
|
|
828
834
|
const { as, children, ...rest } = props;
|
|
829
835
|
const As = as;
|
|
@@ -832,9 +838,9 @@ var ElementAs = (0, import_react2.forwardRef)(
|
|
|
832
838
|
);
|
|
833
839
|
|
|
834
840
|
// src/components/helpers/HiddenInput/HiddenInput.tsx
|
|
835
|
-
var
|
|
841
|
+
var import_react4 = require("react");
|
|
836
842
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
837
|
-
var HiddenInput = (0,
|
|
843
|
+
var HiddenInput = (0, import_react4.forwardRef)(
|
|
838
844
|
(props, ref) => {
|
|
839
845
|
const { className, ...rest } = props;
|
|
840
846
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -849,7 +855,7 @@ var HiddenInput = (0, import_react3.forwardRef)(
|
|
|
849
855
|
);
|
|
850
856
|
|
|
851
857
|
// src/components/helpers/Input/Input.tsx
|
|
852
|
-
var
|
|
858
|
+
var import_react21 = require("react");
|
|
853
859
|
|
|
854
860
|
// src/components/helpers/Input/Input.module.css
|
|
855
861
|
var Input_default = {
|
|
@@ -871,7 +877,7 @@ var Input_default = {
|
|
|
871
877
|
};
|
|
872
878
|
|
|
873
879
|
// src/components/Typography/Caption/Caption.tsx
|
|
874
|
-
var
|
|
880
|
+
var import_react6 = require("react");
|
|
875
881
|
|
|
876
882
|
// src/types/Density.tsx
|
|
877
883
|
function getDensityCn(value) {
|
|
@@ -941,7 +947,7 @@ function TextOverflowEllipsisInner({
|
|
|
941
947
|
}
|
|
942
948
|
|
|
943
949
|
// src/components/Typography/Typography/Typography.tsx
|
|
944
|
-
var
|
|
950
|
+
var import_react5 = require("react");
|
|
945
951
|
|
|
946
952
|
// src/components/Typography/Typography/Typography.module.css
|
|
947
953
|
var Typography_default = {
|
|
@@ -2407,7 +2413,7 @@ function HelpSimpleIcon(props) {
|
|
|
2407
2413
|
// src/components/Typography/Typography/Typography.tsx
|
|
2408
2414
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
2409
2415
|
var isAnchorProps = (props) => props.typographyType === "a";
|
|
2410
|
-
var Typography = (0,
|
|
2416
|
+
var Typography = (0, import_react5.forwardRef)(
|
|
2411
2417
|
(props, ref) => {
|
|
2412
2418
|
const {
|
|
2413
2419
|
typographyType = "bodySans02",
|
|
@@ -2482,7 +2488,7 @@ Typography.displayName = "Typography";
|
|
|
2482
2488
|
|
|
2483
2489
|
// src/components/Typography/Caption/Caption.tsx
|
|
2484
2490
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
2485
|
-
var Caption = (0,
|
|
2491
|
+
var Caption = (0, import_react6.forwardRef)(
|
|
2486
2492
|
(props, ref) => {
|
|
2487
2493
|
const { id, className, htmlProps, children, ...rest } = props;
|
|
2488
2494
|
return /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
|
|
@@ -2500,12 +2506,12 @@ var Caption = (0, import_react5.forwardRef)(
|
|
|
2500
2506
|
Caption.displayName = "Caption";
|
|
2501
2507
|
|
|
2502
2508
|
// src/components/Typography/Heading/Heading.tsx
|
|
2503
|
-
var
|
|
2509
|
+
var import_react16 = require("react");
|
|
2504
2510
|
|
|
2505
2511
|
// src/hooks/useCombinedRefs.tsx
|
|
2506
|
-
var
|
|
2512
|
+
var import_react7 = require("react");
|
|
2507
2513
|
function useCombinedRef(...refs) {
|
|
2508
|
-
return (0,
|
|
2514
|
+
return (0, import_react7.useCallback)((element) => {
|
|
2509
2515
|
refs.filter(Boolean).forEach((ref) => {
|
|
2510
2516
|
if (typeof ref === "function") ref(element);
|
|
2511
2517
|
else if (ref && typeof ref === "object")
|
|
@@ -2600,10 +2606,10 @@ function placementToArrowPlacement(placement) {
|
|
|
2600
2606
|
}
|
|
2601
2607
|
|
|
2602
2608
|
// src/hooks/useFocusTrap.tsx
|
|
2603
|
-
var
|
|
2609
|
+
var import_react8 = require("react");
|
|
2604
2610
|
function useFocusTrap(active, initialFocusRef = void 0) {
|
|
2605
|
-
const elementRef = (0,
|
|
2606
|
-
(0,
|
|
2611
|
+
const elementRef = (0, import_react8.useRef)(null);
|
|
2612
|
+
(0, import_react8.useEffect)(() => {
|
|
2607
2613
|
function handleFocus(e) {
|
|
2608
2614
|
if (e.key !== "Tab" || !active || !elementRef.current) return;
|
|
2609
2615
|
const focusableElements = getFocusableElements(elementRef);
|
|
@@ -2635,23 +2641,23 @@ function useFocusTrap(active, initialFocusRef = void 0) {
|
|
|
2635
2641
|
}
|
|
2636
2642
|
|
|
2637
2643
|
// src/hooks/useIsMounted.ts
|
|
2638
|
-
var
|
|
2644
|
+
var import_react9 = require("react");
|
|
2639
2645
|
var useIsMounted = () => {
|
|
2640
|
-
const isMounted = (0,
|
|
2641
|
-
(0,
|
|
2646
|
+
const isMounted = (0, import_react9.useRef)(false);
|
|
2647
|
+
(0, import_react9.useEffect)(() => {
|
|
2642
2648
|
isMounted.current = true;
|
|
2643
2649
|
return () => {
|
|
2644
2650
|
isMounted.current = false;
|
|
2645
2651
|
};
|
|
2646
2652
|
}, []);
|
|
2647
|
-
return (0,
|
|
2653
|
+
return (0, import_react9.useCallback)(() => isMounted.current, []);
|
|
2648
2654
|
};
|
|
2649
2655
|
|
|
2650
2656
|
// src/hooks/useMountTransition.tsx
|
|
2651
|
-
var
|
|
2657
|
+
var import_react10 = require("react");
|
|
2652
2658
|
var useMountTransition = (isMounted, unmountDelay) => {
|
|
2653
|
-
const [hasTransitionedIn, setHasTransitionedIn] = (0,
|
|
2654
|
-
(0,
|
|
2659
|
+
const [hasTransitionedIn, setHasTransitionedIn] = (0, import_react10.useState)(false);
|
|
2660
|
+
(0, import_react10.useEffect)(() => {
|
|
2655
2661
|
let timeoutId;
|
|
2656
2662
|
if (isMounted && !hasTransitionedIn) setHasTransitionedIn(true);
|
|
2657
2663
|
else if (!isMounted && hasTransitionedIn) {
|
|
@@ -2665,9 +2671,9 @@ var useMountTransition = (isMounted, unmountDelay) => {
|
|
|
2665
2671
|
};
|
|
2666
2672
|
|
|
2667
2673
|
// src/hooks/useOnClickOutside.tsx
|
|
2668
|
-
var
|
|
2674
|
+
var import_react11 = require("react");
|
|
2669
2675
|
function useOnClickOutside(element, handler) {
|
|
2670
|
-
(0,
|
|
2676
|
+
(0, import_react11.useEffect)(() => {
|
|
2671
2677
|
const listener = (event) => {
|
|
2672
2678
|
const elements = Array.isArray(element) ? element : [element];
|
|
2673
2679
|
const hasClickedInside = elements.some(
|
|
@@ -2689,9 +2695,9 @@ function useOnClickOutside(element, handler) {
|
|
|
2689
2695
|
}
|
|
2690
2696
|
|
|
2691
2697
|
// src/hooks/useOnKeyDown.tsx
|
|
2692
|
-
var
|
|
2698
|
+
var import_react12 = require("react");
|
|
2693
2699
|
var useOnKeyDown = (key, handler) => {
|
|
2694
|
-
(0,
|
|
2700
|
+
(0, import_react12.useEffect)(() => {
|
|
2695
2701
|
const listener = (event) => {
|
|
2696
2702
|
const keys = Array.isArray(key) ? key : [key];
|
|
2697
2703
|
if (keys.indexOf(event.key) !== -1) {
|
|
@@ -2706,10 +2712,10 @@ var useOnKeyDown = (key, handler) => {
|
|
|
2706
2712
|
};
|
|
2707
2713
|
|
|
2708
2714
|
// src/hooks/useReturnFocusOnBlur.ts
|
|
2709
|
-
var
|
|
2715
|
+
var import_react13 = require("react");
|
|
2710
2716
|
function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
2711
|
-
const elementRef = (0,
|
|
2712
|
-
(0,
|
|
2717
|
+
const elementRef = (0, import_react13.useRef)(null);
|
|
2718
|
+
(0, import_react13.useEffect)(() => {
|
|
2713
2719
|
function handleFocus(e) {
|
|
2714
2720
|
if (e.key !== "Tab" || !active || !elementRef.current || !triggerElement)
|
|
2715
2721
|
return;
|
|
@@ -2735,13 +2741,13 @@ function useReturnFocusOnBlur(active, onBlur, triggerElement) {
|
|
|
2735
2741
|
}
|
|
2736
2742
|
|
|
2737
2743
|
// src/hooks/useRoveFocus.tsx
|
|
2738
|
-
var
|
|
2744
|
+
var import_react14 = require("react");
|
|
2739
2745
|
var isKeyboardEvent = (e) => e.key !== void 0;
|
|
2740
2746
|
function useRoveFocus(size2, active, direction = "column") {
|
|
2741
|
-
const [currentFocusIndex, setCurrentFocusIndex] = (0,
|
|
2747
|
+
const [currentFocusIndex, setCurrentFocusIndex] = (0, import_react14.useState)(-1);
|
|
2742
2748
|
const nextKey = direction === "row" ? "ArrowRight" : "ArrowDown";
|
|
2743
2749
|
const previousKey = direction === "row" ? "ArrowLeft" : "ArrowUp";
|
|
2744
|
-
const handleKeyDown = (0,
|
|
2750
|
+
const handleKeyDown = (0, import_react14.useCallback)(
|
|
2745
2751
|
(e) => {
|
|
2746
2752
|
if (!size2 || !isKeyboardEvent(e)) return;
|
|
2747
2753
|
if (e.key === nextKey) {
|
|
@@ -2757,7 +2763,7 @@ function useRoveFocus(size2, active, direction = "column") {
|
|
|
2757
2763
|
},
|
|
2758
2764
|
[size2, setCurrentFocusIndex]
|
|
2759
2765
|
);
|
|
2760
|
-
(0,
|
|
2766
|
+
(0, import_react14.useEffect)(() => {
|
|
2761
2767
|
if (!active) {
|
|
2762
2768
|
setCurrentFocusIndex(-1);
|
|
2763
2769
|
return;
|
|
@@ -2772,7 +2778,7 @@ function useRoveFocus(size2, active, direction = "column") {
|
|
|
2772
2778
|
|
|
2773
2779
|
// src/hooks/useScreenSize.tsx
|
|
2774
2780
|
var import_dds_design_tokens4 = require("@norges-domstoler/dds-design-tokens");
|
|
2775
|
-
var
|
|
2781
|
+
var import_react15 = require("react");
|
|
2776
2782
|
var ScreenSize = /* @__PURE__ */ ((ScreenSize2) => {
|
|
2777
2783
|
ScreenSize2[ScreenSize2["XSmall"] = 0] = "XSmall";
|
|
2778
2784
|
ScreenSize2[ScreenSize2["Small"] = 1] = "Small";
|
|
@@ -2804,8 +2810,8 @@ var screenSizesAndMediaQueries = [
|
|
|
2804
2810
|
]
|
|
2805
2811
|
];
|
|
2806
2812
|
var useScreenSize = function() {
|
|
2807
|
-
const [screenSize, setScreenSize] = (0,
|
|
2808
|
-
(0,
|
|
2813
|
+
const [screenSize, setScreenSize] = (0, import_react15.useState)(3 /* Large */);
|
|
2814
|
+
(0, import_react15.useEffect)(() => {
|
|
2809
2815
|
function listener() {
|
|
2810
2816
|
for (const [screenSize2, mediaQuery] of screenSizesAndMediaQueries) {
|
|
2811
2817
|
if (window.matchMedia(mediaQuery).matches) {
|
|
@@ -2858,7 +2864,7 @@ var scaledTypographyType = (type) => {
|
|
|
2858
2864
|
return type;
|
|
2859
2865
|
}
|
|
2860
2866
|
};
|
|
2861
|
-
var Heading = (0,
|
|
2867
|
+
var Heading = (0, import_react16.forwardRef)(
|
|
2862
2868
|
(props, ref) => {
|
|
2863
2869
|
const {
|
|
2864
2870
|
id,
|
|
@@ -2885,7 +2891,7 @@ var Heading = (0, import_react15.forwardRef)(
|
|
|
2885
2891
|
Heading.displayName = "Heading";
|
|
2886
2892
|
|
|
2887
2893
|
// src/components/Typography/Label/Label.tsx
|
|
2888
|
-
var
|
|
2894
|
+
var import_react17 = require("react");
|
|
2889
2895
|
|
|
2890
2896
|
// src/components/Typography/Label/Label.module.css
|
|
2891
2897
|
var Label_default = {
|
|
@@ -2895,7 +2901,7 @@ var Label_default = {
|
|
|
2895
2901
|
|
|
2896
2902
|
// src/components/Typography/Label/Label.tsx
|
|
2897
2903
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
2898
|
-
var Label = (0,
|
|
2904
|
+
var Label = (0, import_react17.forwardRef)((props, ref) => {
|
|
2899
2905
|
const {
|
|
2900
2906
|
showRequiredStyling,
|
|
2901
2907
|
readOnly,
|
|
@@ -2934,9 +2940,9 @@ var Label = (0, import_react16.forwardRef)((props, ref) => {
|
|
|
2934
2940
|
Label.displayName = "Label";
|
|
2935
2941
|
|
|
2936
2942
|
// src/components/Typography/Legend/Legend.tsx
|
|
2937
|
-
var
|
|
2943
|
+
var import_react18 = require("react");
|
|
2938
2944
|
var import_jsx_runtime171 = require("react/jsx-runtime");
|
|
2939
|
-
var Legend = (0,
|
|
2945
|
+
var Legend = (0, import_react18.forwardRef)(
|
|
2940
2946
|
(props, ref) => {
|
|
2941
2947
|
const { id, className, htmlProps, children, ...rest } = props;
|
|
2942
2948
|
return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
|
|
@@ -2954,9 +2960,9 @@ var Legend = (0, import_react17.forwardRef)(
|
|
|
2954
2960
|
Legend.displayName = "Legend";
|
|
2955
2961
|
|
|
2956
2962
|
// src/components/Typography/Link/Link.tsx
|
|
2957
|
-
var
|
|
2963
|
+
var import_react19 = require("react");
|
|
2958
2964
|
var import_jsx_runtime172 = require("react/jsx-runtime");
|
|
2959
|
-
var Link = (0,
|
|
2965
|
+
var Link = (0, import_react19.forwardRef)((props, ref) => {
|
|
2960
2966
|
const {
|
|
2961
2967
|
id,
|
|
2962
2968
|
className,
|
|
@@ -3000,9 +3006,9 @@ var Link = (0, import_react18.forwardRef)((props, ref) => {
|
|
|
3000
3006
|
Link.displayName = "Link";
|
|
3001
3007
|
|
|
3002
3008
|
// src/components/Typography/Paragraph/Paragraph.tsx
|
|
3003
|
-
var
|
|
3009
|
+
var import_react20 = require("react");
|
|
3004
3010
|
var import_jsx_runtime173 = require("react/jsx-runtime");
|
|
3005
|
-
var Paragraph = (0,
|
|
3011
|
+
var Paragraph = (0, import_react20.forwardRef)(
|
|
3006
3012
|
(props, ref) => {
|
|
3007
3013
|
const {
|
|
3008
3014
|
id,
|
|
@@ -3032,7 +3038,7 @@ var inputTypographyTypes = {
|
|
|
3032
3038
|
small: "bodySans01",
|
|
3033
3039
|
tiny: "supportingStyleTiny01"
|
|
3034
3040
|
};
|
|
3035
|
-
var Input = (0,
|
|
3041
|
+
var Input = (0, import_react21.forwardRef)((props, ref) => {
|
|
3036
3042
|
const { className, ...rest } = props;
|
|
3037
3043
|
return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
3038
3044
|
"input",
|
|
@@ -3044,7 +3050,7 @@ var Input = (0, import_react20.forwardRef)((props, ref) => {
|
|
|
3044
3050
|
);
|
|
3045
3051
|
});
|
|
3046
3052
|
Input.displayName = "Input";
|
|
3047
|
-
var StatefulInput = (0,
|
|
3053
|
+
var StatefulInput = (0, import_react21.forwardRef)(
|
|
3048
3054
|
(props, ref) => {
|
|
3049
3055
|
const {
|
|
3050
3056
|
className,
|
|
@@ -3071,11 +3077,11 @@ var StatefulInput = (0, import_react20.forwardRef)(
|
|
|
3071
3077
|
StatefulInput.displayName = "StatefulInput";
|
|
3072
3078
|
|
|
3073
3079
|
// src/components/helpers/Input/CharCounter.tsx
|
|
3074
|
-
var
|
|
3080
|
+
var import_react22 = require("react");
|
|
3075
3081
|
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
3076
3082
|
function CharCounter(props) {
|
|
3077
3083
|
const { current, max, id, className, htmlProps, ...rest } = props;
|
|
3078
|
-
const generatedId = (0,
|
|
3084
|
+
const generatedId = (0, import_react22.useId)();
|
|
3079
3085
|
const uniqueId = id != null ? id : `${generatedId}-characterCounter`;
|
|
3080
3086
|
return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
|
|
3081
3087
|
Typography,
|
|
@@ -3114,7 +3120,7 @@ function getDefaultText(value, defaultValue) {
|
|
|
3114
3120
|
}
|
|
3115
3121
|
|
|
3116
3122
|
// src/components/helpers/Paper/Paper.tsx
|
|
3117
|
-
var
|
|
3123
|
+
var import_react23 = require("react");
|
|
3118
3124
|
|
|
3119
3125
|
// src/components/helpers/Paper/Paper.module.css
|
|
3120
3126
|
var Paper_default = {
|
|
@@ -3130,7 +3136,7 @@ var Paper_default = {
|
|
|
3130
3136
|
|
|
3131
3137
|
// src/components/helpers/Paper/Paper.tsx
|
|
3132
3138
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
3133
|
-
var Paper = (0,
|
|
3139
|
+
var Paper = (0, import_react23.forwardRef)((props, ref) => {
|
|
3134
3140
|
const { elevation, border, className, ...rest } = props;
|
|
3135
3141
|
const borderCn = border === "default" || border === "subtle" ? border : "on-inverse";
|
|
3136
3142
|
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
|
|
@@ -3319,7 +3325,7 @@ var isPropValid = /* @__PURE__ */ memoize(
|
|
|
3319
3325
|
);
|
|
3320
3326
|
|
|
3321
3327
|
// ../../node_modules/.pnpm/styled-components@6.1.13_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/styled-components/dist/styled-components.esm.js
|
|
3322
|
-
var
|
|
3328
|
+
var import_react24 = __toESM(require("react"));
|
|
3323
3329
|
var import_shallowequal = __toESM(require_shallowequal());
|
|
3324
3330
|
|
|
3325
3331
|
// ../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Enum.js
|
|
@@ -3999,7 +4005,7 @@ var P = function(t, n) {
|
|
|
3999
4005
|
console.error = function(t2) {
|
|
4000
4006
|
for (var n2 = [], r3 = 1; r3 < arguments.length; r3++) n2[r3 - 1] = arguments[r3];
|
|
4001
4007
|
E.test(t2) ? (a2 = false, N.delete(s2)) : i2.apply(void 0, __spreadArray([t2], n2, false));
|
|
4002
|
-
}, (0,
|
|
4008
|
+
}, (0, import_react24.useRef)(), a2 && !N.has(s2) && (console.warn(s2), N.add(s2));
|
|
4003
4009
|
} catch (e) {
|
|
4004
4010
|
E.test(e.message) && N.delete(s2);
|
|
4005
4011
|
} finally {
|
|
@@ -4337,26 +4343,26 @@ function Fe(e) {
|
|
|
4337
4343
|
}
|
|
4338
4344
|
var Me = new ke();
|
|
4339
4345
|
var ze = Fe();
|
|
4340
|
-
var $e =
|
|
4346
|
+
var $e = import_react24.default.createContext({ shouldForwardProp: void 0, styleSheet: Me, stylis: ze });
|
|
4341
4347
|
var Be = $e.Consumer;
|
|
4342
|
-
var Le =
|
|
4348
|
+
var Le = import_react24.default.createContext(void 0);
|
|
4343
4349
|
function Ge() {
|
|
4344
|
-
return (0,
|
|
4350
|
+
return (0, import_react24.useContext)($e);
|
|
4345
4351
|
}
|
|
4346
4352
|
function Ye(e) {
|
|
4347
|
-
var t = (0,
|
|
4353
|
+
var t = (0, import_react24.useState)(e.stylisPlugins), n = t[0], o2 = t[1], c2 = Ge().styleSheet, l2 = (0, import_react24.useMemo)(function() {
|
|
4348
4354
|
var t2 = c2;
|
|
4349
4355
|
return e.sheet ? t2 = e.sheet : e.target && (t2 = t2.reconstructWithOptions({ target: e.target }, false)), e.disableCSSOMInjection && (t2 = t2.reconstructWithOptions({ useCSSOMInjection: false })), t2;
|
|
4350
|
-
}, [e.disableCSSOMInjection, e.sheet, e.target, c2]), u2 = (0,
|
|
4356
|
+
}, [e.disableCSSOMInjection, e.sheet, e.target, c2]), u2 = (0, import_react24.useMemo)(function() {
|
|
4351
4357
|
return Fe({ options: { namespace: e.namespace, prefix: e.enableVendorPrefixes }, plugins: n });
|
|
4352
4358
|
}, [e.enableVendorPrefixes, e.namespace, n]);
|
|
4353
|
-
(0,
|
|
4359
|
+
(0, import_react24.useEffect)(function() {
|
|
4354
4360
|
(0, import_shallowequal.default)(n, e.stylisPlugins) || o2(e.stylisPlugins);
|
|
4355
4361
|
}, [e.stylisPlugins]);
|
|
4356
|
-
var d = (0,
|
|
4362
|
+
var d = (0, import_react24.useMemo)(function() {
|
|
4357
4363
|
return { shouldForwardProp: e.shouldForwardProp, styleSheet: l2, stylis: u2 };
|
|
4358
4364
|
}, [e.shouldForwardProp, l2, u2]);
|
|
4359
|
-
return
|
|
4365
|
+
return import_react24.default.createElement($e.Provider, { value: d }, import_react24.default.createElement(Le.Provider, { value: u2 }, e.children));
|
|
4360
4366
|
}
|
|
4361
4367
|
var qe = function() {
|
|
4362
4368
|
function e(e2, t) {
|
|
@@ -4448,7 +4454,7 @@ var Qe = function() {
|
|
|
4448
4454
|
return r2;
|
|
4449
4455
|
}, e;
|
|
4450
4456
|
}();
|
|
4451
|
-
var et =
|
|
4457
|
+
var et = import_react24.default.createContext(void 0);
|
|
4452
4458
|
var tt = et.Consumer;
|
|
4453
4459
|
var ot = {};
|
|
4454
4460
|
var st = /* @__PURE__ */ new Set();
|
|
@@ -4473,8 +4479,8 @@ function it(e, o2, s2) {
|
|
|
4473
4479
|
var N2 = new Qe(s2, g2, i2 ? a2.componentStyle : void 0);
|
|
4474
4480
|
function O2(e2, o3) {
|
|
4475
4481
|
return function(e3, o4, s3) {
|
|
4476
|
-
var i3 = e3.attrs, a3 = e3.componentStyle, c3 = e3.defaultProps, p3 = e3.foldedComponentIds, d2 = e3.styledComponentId, h2 = e3.target, f3 =
|
|
4477
|
-
"production" !== process.env.NODE_ENV && (0,
|
|
4482
|
+
var i3 = e3.attrs, a3 = e3.componentStyle, c3 = e3.defaultProps, p3 = e3.foldedComponentIds, d2 = e3.styledComponentId, h2 = e3.target, f3 = import_react24.default.useContext(et), m3 = Ge(), y3 = e3.shouldForwardProp || m3.shouldForwardProp;
|
|
4483
|
+
"production" !== process.env.NODE_ENV && (0, import_react24.useDebugValue)(d2);
|
|
4478
4484
|
var v2 = I(o4, f3, c3) || C, g3 = function(e4, n, r2) {
|
|
4479
4485
|
for (var o5, s4 = __assign(__assign({}, n), { className: void 0, theme: r2 }), i4 = 0; i4 < e4.length; i4 += 1) {
|
|
4480
4486
|
var a4 = oe(o5 = e4[i4]) ? o5(s4) : o5;
|
|
@@ -4485,15 +4491,15 @@ function it(e, o2, s2) {
|
|
|
4485
4491
|
for (var b2 in g3) void 0 === g3[b2] || "$" === b2[0] || "as" === b2 || "theme" === b2 && g3.theme === v2 || ("forwardedAs" === b2 ? w3.as = g3.forwardedAs : y3 && !y3(b2, S3) || (w3[b2] = g3[b2], y3 || "development" !== process.env.NODE_ENV || isPropValid(b2) || st.has(b2) || !A.has(S3) || (st.add(b2), console.warn('styled-components: it looks like an unknown prop "'.concat(b2, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
|
|
4486
4492
|
var E3 = function(e4, t) {
|
|
4487
4493
|
var n = Ge(), r2 = e4.generateAndInjectStyles(t, n.styleSheet, n.stylis);
|
|
4488
|
-
return "production" !== process.env.NODE_ENV && (0,
|
|
4494
|
+
return "production" !== process.env.NODE_ENV && (0, import_react24.useDebugValue)(r2), r2;
|
|
4489
4495
|
}(a3, g3);
|
|
4490
4496
|
"production" !== process.env.NODE_ENV && e3.warnTooManyClasses && e3.warnTooManyClasses(E3);
|
|
4491
4497
|
var N3 = ie(p3, d2);
|
|
4492
|
-
return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[L(S3) && !A.has(S3) ? "class" : "className"] = N3, w3.ref = s3, (0,
|
|
4498
|
+
return E3 && (N3 += " " + E3), g3.className && (N3 += " " + g3.className), w3[L(S3) && !A.has(S3) ? "class" : "className"] = N3, w3.ref = s3, (0, import_react24.createElement)(S3, w3);
|
|
4493
4499
|
}(D2, e2, o3);
|
|
4494
4500
|
}
|
|
4495
4501
|
O2.displayName = y2;
|
|
4496
|
-
var D2 =
|
|
4502
|
+
var D2 = import_react24.default.forwardRef(O2);
|
|
4497
4503
|
return D2.attrs = S2, D2.componentStyle = N2, D2.displayName = y2, D2.shouldForwardProp = w2, D2.foldedComponentIds = i2 ? ie(a2.foldedComponentIds, a2.styledComponentId) : "", D2.styledComponentId = g2, D2.target = i2 ? a2.target : e, Object.defineProperty(D2, "defaultProps", { get: function() {
|
|
4498
4504
|
return this._foldedDefaultProps;
|
|
4499
4505
|
}, set: function(e2) {
|
|
@@ -4577,14 +4583,14 @@ var gt = function() {
|
|
|
4577
4583
|
var o2 = e2.instance.toString();
|
|
4578
4584
|
if (!o2) return [];
|
|
4579
4585
|
var s2 = ((n = {})[f] = "", n[y] = v, n.dangerouslySetInnerHTML = { __html: o2 }, n), i2 = Ce();
|
|
4580
|
-
return i2 && (s2.nonce = i2), [
|
|
4586
|
+
return i2 && (s2.nonce = i2), [import_react24.default.createElement("style", __assign({}, s2, { key: "sc-0-0" }))];
|
|
4581
4587
|
}, this.seal = function() {
|
|
4582
4588
|
e2.sealed = true;
|
|
4583
4589
|
}, this.instance = new ke({ isServer: true }), this.sealed = false;
|
|
4584
4590
|
}
|
|
4585
4591
|
return e.prototype.collectStyles = function(e2) {
|
|
4586
4592
|
if (this.sealed) throw he(2);
|
|
4587
|
-
return
|
|
4593
|
+
return import_react24.default.createElement(Ye, { sheet: this.instance }, e2);
|
|
4588
4594
|
}, e.prototype.interleaveWithNodeStream = function(e2) {
|
|
4589
4595
|
if (S) throw he(3);
|
|
4590
4596
|
if (this.sealed) throw he(2);
|
|
@@ -4620,7 +4626,7 @@ var visibilityTransition = (open) => {
|
|
|
4620
4626
|
};
|
|
4621
4627
|
|
|
4622
4628
|
// src/components/Accordion/Accordion.tsx
|
|
4623
|
-
var
|
|
4629
|
+
var import_react27 = require("react");
|
|
4624
4630
|
|
|
4625
4631
|
// src/components/Accordion/Accordion.module.css
|
|
4626
4632
|
var Accordion_default = {
|
|
@@ -4632,7 +4638,7 @@ var Accordion_default = {
|
|
|
4632
4638
|
};
|
|
4633
4639
|
|
|
4634
4640
|
// src/components/helpers/AccordionBase/useAccordion.tsx
|
|
4635
|
-
var
|
|
4641
|
+
var import_react25 = require("react");
|
|
4636
4642
|
|
|
4637
4643
|
// src/components/helpers/AccordionBase/AccordionBase.module.css
|
|
4638
4644
|
var AccordionBase_default = {
|
|
@@ -4652,8 +4658,8 @@ var useAccordion = ({
|
|
|
4652
4658
|
id
|
|
4653
4659
|
}) => {
|
|
4654
4660
|
var _a;
|
|
4655
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
4656
|
-
const generatedId = (0,
|
|
4661
|
+
const [isExpanded, setIsExpanded] = (0, import_react25.useState)(initiallyExpanded);
|
|
4662
|
+
const generatedId = (0, import_react25.useId)();
|
|
4657
4663
|
const accordionId = id != null ? id : `${generatedId}-accordion`;
|
|
4658
4664
|
const openAccordion = () => {
|
|
4659
4665
|
setIsExpanded(true);
|
|
@@ -4661,10 +4667,10 @@ var useAccordion = ({
|
|
|
4661
4667
|
const closeAccordion = () => {
|
|
4662
4668
|
setIsExpanded(false);
|
|
4663
4669
|
};
|
|
4664
|
-
(0,
|
|
4670
|
+
(0, import_react25.useEffect)(() => {
|
|
4665
4671
|
setIsExpanded(isExpanded);
|
|
4666
4672
|
}, [isExpanded]);
|
|
4667
|
-
const toggleExpanded = (0,
|
|
4673
|
+
const toggleExpanded = (0, import_react25.useCallback)(() => {
|
|
4668
4674
|
setIsExpanded((prevExpanded) => {
|
|
4669
4675
|
const newExpanded = !prevExpanded;
|
|
4670
4676
|
if (onChange) {
|
|
@@ -4673,17 +4679,17 @@ var useAccordion = ({
|
|
|
4673
4679
|
return newExpanded;
|
|
4674
4680
|
});
|
|
4675
4681
|
}, [onChange]);
|
|
4676
|
-
const bodyContentRef = (0,
|
|
4677
|
-
const [animate, setAnimate] = (0,
|
|
4682
|
+
const bodyContentRef = (0, import_react25.useRef)(null);
|
|
4683
|
+
const [animate, setAnimate] = (0, import_react25.useState)(false);
|
|
4678
4684
|
const isMounted = useIsMounted();
|
|
4679
4685
|
const height = useElementHeight(bodyContentRef.current);
|
|
4680
|
-
const [initialExpandedHeight, setIntialExpandedHeight] = (0,
|
|
4681
|
-
(0,
|
|
4686
|
+
const [initialExpandedHeight, setIntialExpandedHeight] = (0, import_react25.useState)(null);
|
|
4687
|
+
(0, import_react25.useLayoutEffect)(() => {
|
|
4682
4688
|
if (bodyContentRef.current && isExpanded) {
|
|
4683
4689
|
setIntialExpandedHeight(bodyContentRef.current.scrollHeight);
|
|
4684
4690
|
}
|
|
4685
4691
|
}, []);
|
|
4686
|
-
(0,
|
|
4692
|
+
(0, import_react25.useEffect)(() => {
|
|
4687
4693
|
if (isMounted()) {
|
|
4688
4694
|
setAnimate(true);
|
|
4689
4695
|
}
|
|
@@ -4720,9 +4726,9 @@ var useAccordion = ({
|
|
|
4720
4726
|
};
|
|
4721
4727
|
|
|
4722
4728
|
// src/components/helpers/AccordionBase/AccordionContext.tsx
|
|
4723
|
-
var
|
|
4729
|
+
var import_react26 = require("react");
|
|
4724
4730
|
var import_jsx_runtime177 = require("react/jsx-runtime");
|
|
4725
|
-
var AccordionContext = (0,
|
|
4731
|
+
var AccordionContext = (0, import_react26.createContext)({});
|
|
4726
4732
|
var AccordionContextProvider = ({
|
|
4727
4733
|
children,
|
|
4728
4734
|
...values
|
|
@@ -4730,7 +4736,7 @@ var AccordionContextProvider = ({
|
|
|
4730
4736
|
return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(AccordionContext.Provider, { value: values, children });
|
|
4731
4737
|
};
|
|
4732
4738
|
var useAccordionContext = () => {
|
|
4733
|
-
const context = (0,
|
|
4739
|
+
const context = (0, import_react26.useContext)(AccordionContext);
|
|
4734
4740
|
if (!context) {
|
|
4735
4741
|
throw new Error(
|
|
4736
4742
|
"useAccordionContext must be used within a AccordionContextProvider. Have you wrapped <AccordionHeader> and <AccordionBody> inside a <Accordion>, or <CardAccordionHeader> and <CardAccordionBody> inside a <CardAccordion>?"
|
|
@@ -4741,7 +4747,7 @@ var useAccordionContext = () => {
|
|
|
4741
4747
|
|
|
4742
4748
|
// src/components/Accordion/Accordion.tsx
|
|
4743
4749
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
4744
|
-
var Accordion = (0,
|
|
4750
|
+
var Accordion = (0, import_react27.forwardRef)(
|
|
4745
4751
|
(props, ref) => {
|
|
4746
4752
|
const {
|
|
4747
4753
|
isExpanded = false,
|
|
@@ -4789,9 +4795,9 @@ Accordion.displayName = "Accordion";
|
|
|
4789
4795
|
|
|
4790
4796
|
// src/components/Accordion/AccordionHeader.tsx
|
|
4791
4797
|
var import_dds_design_tokens10 = require("@norges-domstoler/dds-design-tokens");
|
|
4792
|
-
var
|
|
4798
|
+
var import_react28 = require("react");
|
|
4793
4799
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
4794
|
-
var AccordionHeader = (0,
|
|
4800
|
+
var AccordionHeader = (0, import_react28.forwardRef)((props, ref) => {
|
|
4795
4801
|
const {
|
|
4796
4802
|
children,
|
|
4797
4803
|
className,
|
|
@@ -4850,9 +4856,9 @@ var AccordionHeader = (0, import_react27.forwardRef)((props, ref) => {
|
|
|
4850
4856
|
AccordionHeader.displayName = "AccordionHeader";
|
|
4851
4857
|
|
|
4852
4858
|
// src/components/Accordion/AccordionBody.tsx
|
|
4853
|
-
var
|
|
4859
|
+
var import_react29 = require("react");
|
|
4854
4860
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
4855
|
-
var AccordionBody = (0,
|
|
4861
|
+
var AccordionBody = (0, import_react29.forwardRef)(
|
|
4856
4862
|
(props, ref) => {
|
|
4857
4863
|
const { children, className, htmlProps, ...rest } = props;
|
|
4858
4864
|
const { bodyContentRef, bodyProps } = useAccordionContext();
|
|
@@ -4886,7 +4892,7 @@ var AccordionBody = (0, import_react28.forwardRef)(
|
|
|
4886
4892
|
AccordionBody.displayName = "AccordionBody";
|
|
4887
4893
|
|
|
4888
4894
|
// src/components/BackLink/BackLink.tsx
|
|
4889
|
-
var
|
|
4895
|
+
var import_react30 = require("react");
|
|
4890
4896
|
|
|
4891
4897
|
// src/components/BackLink/BackLink.module.css
|
|
4892
4898
|
var BackLink_default = {
|
|
@@ -4895,7 +4901,7 @@ var BackLink_default = {
|
|
|
4895
4901
|
|
|
4896
4902
|
// src/components/BackLink/BackLink.tsx
|
|
4897
4903
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
4898
|
-
var BackLink = (0,
|
|
4904
|
+
var BackLink = (0, import_react30.forwardRef)((props, ref) => {
|
|
4899
4905
|
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("nav", { ref, "aria-label": "g\xE5 tilbake", children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(Link, { href: props.href, children: [
|
|
4900
4906
|
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
4901
4907
|
Icon,
|
|
@@ -4911,12 +4917,12 @@ var BackLink = (0, import_react29.forwardRef)((props, ref) => {
|
|
|
4911
4917
|
BackLink.displayName = "BackLink";
|
|
4912
4918
|
|
|
4913
4919
|
// src/components/Breadcrumbs/Breadcrumb.tsx
|
|
4914
|
-
var
|
|
4920
|
+
var import_react31 = require("react");
|
|
4915
4921
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
4916
4922
|
var isAnchorTypographyProps = (props) => {
|
|
4917
4923
|
return props.href != void 0;
|
|
4918
4924
|
};
|
|
4919
|
-
var Breadcrumb = (0,
|
|
4925
|
+
var Breadcrumb = (0, import_react31.forwardRef)(
|
|
4920
4926
|
(props, ref) => {
|
|
4921
4927
|
const { children, ...rest } = props;
|
|
4922
4928
|
if (isAnchorTypographyProps(props)) {
|
|
@@ -4928,7 +4934,7 @@ var Breadcrumb = (0, import_react30.forwardRef)(
|
|
|
4928
4934
|
Breadcrumb.displayName = "Breadcrumb";
|
|
4929
4935
|
|
|
4930
4936
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4931
|
-
var
|
|
4937
|
+
var import_react44 = require("react");
|
|
4932
4938
|
|
|
4933
4939
|
// src/components/Breadcrumbs/Breadcrumbs.module.css
|
|
4934
4940
|
var Breadcrumbs_default = {
|
|
@@ -4951,7 +4957,7 @@ var Breadcrumbs_default = {
|
|
|
4951
4957
|
|
|
4952
4958
|
// src/components/Button/Button.tsx
|
|
4953
4959
|
var import_dds_design_tokens12 = require("@norges-domstoler/dds-design-tokens");
|
|
4954
|
-
var
|
|
4960
|
+
var import_react33 = require("react");
|
|
4955
4961
|
|
|
4956
4962
|
// src/components/Button/Button.module.css
|
|
4957
4963
|
var Button_default = {
|
|
@@ -4979,7 +4985,7 @@ var Button_default = {
|
|
|
4979
4985
|
|
|
4980
4986
|
// src/components/Spinner/Spinner.tsx
|
|
4981
4987
|
var import_dds_design_tokens11 = require("@norges-domstoler/dds-design-tokens");
|
|
4982
|
-
var
|
|
4988
|
+
var import_react32 = require("react");
|
|
4983
4989
|
|
|
4984
4990
|
// src/components/Spinner/Spinner.module.css
|
|
4985
4991
|
var Spinner_default = {
|
|
@@ -5001,10 +5007,10 @@ function Spinner(props) {
|
|
|
5001
5007
|
htmlProps,
|
|
5002
5008
|
...rest
|
|
5003
5009
|
} = props;
|
|
5004
|
-
const mountTime = (0,
|
|
5010
|
+
const mountTime = (0, import_react32.useRef)(Date.now());
|
|
5005
5011
|
const outerAnimationDelay = -(mountTime.current % 2e3);
|
|
5006
5012
|
const innerAnimationDelay = -(mountTime.current % 1500);
|
|
5007
|
-
const generatedId = (0,
|
|
5013
|
+
const generatedId = (0, import_react32.useId)();
|
|
5008
5014
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
5009
5015
|
return /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(
|
|
5010
5016
|
"svg",
|
|
@@ -5050,7 +5056,7 @@ var typographyTypes = {
|
|
|
5050
5056
|
small: "bodySans01",
|
|
5051
5057
|
tiny: "supportingStyleTiny01"
|
|
5052
5058
|
};
|
|
5053
|
-
var Button = (0,
|
|
5059
|
+
var Button = (0, import_react33.forwardRef)(
|
|
5054
5060
|
(props, ref) => {
|
|
5055
5061
|
const {
|
|
5056
5062
|
children,
|
|
@@ -5165,12 +5171,12 @@ Button.displayName = "Button";
|
|
|
5165
5171
|
|
|
5166
5172
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
5167
5173
|
var import_dds_design_tokens13 = require("@norges-domstoler/dds-design-tokens");
|
|
5168
|
-
var
|
|
5174
|
+
var import_react35 = require("react");
|
|
5169
5175
|
|
|
5170
5176
|
// src/components/OverflowMenu/OverflowMenu.context.tsx
|
|
5171
|
-
var
|
|
5177
|
+
var import_react34 = require("react");
|
|
5172
5178
|
var import_jsx_runtime185 = require("react/jsx-runtime");
|
|
5173
|
-
var OverflowMenuContext = (0,
|
|
5179
|
+
var OverflowMenuContext = (0, import_react34.createContext)({
|
|
5174
5180
|
isOpen: false,
|
|
5175
5181
|
registerItem: () => null,
|
|
5176
5182
|
unregisterItem: () => null
|
|
@@ -5181,9 +5187,9 @@ function OverflowMenuContextProvider({
|
|
|
5181
5187
|
onClose,
|
|
5182
5188
|
children
|
|
5183
5189
|
}) {
|
|
5184
|
-
const [items, setItems] = (0,
|
|
5190
|
+
const [items, setItems] = (0, import_react34.useState)([]);
|
|
5185
5191
|
const [focusIndex] = useRoveFocus(items.length, isOpen);
|
|
5186
|
-
(0,
|
|
5192
|
+
(0, import_react34.useEffect)(() => {
|
|
5187
5193
|
var _a, _b;
|
|
5188
5194
|
(_b = (_a = items[focusIndex]) == null ? void 0 : _a.current) == null ? void 0 : _b.focus();
|
|
5189
5195
|
}, [focusIndex]);
|
|
@@ -5203,7 +5209,7 @@ function OverflowMenuContextProvider({
|
|
|
5203
5209
|
);
|
|
5204
5210
|
}
|
|
5205
5211
|
var useOverflowMenu = () => {
|
|
5206
|
-
return (0,
|
|
5212
|
+
return (0, import_react34.useContext)(OverflowMenuContext);
|
|
5207
5213
|
};
|
|
5208
5214
|
|
|
5209
5215
|
// src/components/OverflowMenu/OverflowMenu.module.css
|
|
@@ -5219,7 +5225,7 @@ var OverflowMenu_default = {
|
|
|
5219
5225
|
|
|
5220
5226
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
5221
5227
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
5222
|
-
var OverflowMenu = (0,
|
|
5228
|
+
var OverflowMenu = (0, import_react35.forwardRef)(
|
|
5223
5229
|
(props, ref) => {
|
|
5224
5230
|
var _a, _b;
|
|
5225
5231
|
const {
|
|
@@ -5239,7 +5245,7 @@ var OverflowMenu = (0, import_react34.forwardRef)(
|
|
|
5239
5245
|
offset
|
|
5240
5246
|
});
|
|
5241
5247
|
const combinedRef = useCombinedRef(ref, refs.setFloating);
|
|
5242
|
-
(0,
|
|
5248
|
+
(0, import_react35.useEffect)(() => {
|
|
5243
5249
|
anchorRef ? refs.setReference(anchorRef.current) : refs.setReference(null);
|
|
5244
5250
|
}, [anchorRef]);
|
|
5245
5251
|
useOnClickOutside(
|
|
@@ -5266,7 +5272,7 @@ var OverflowMenu = (0, import_react34.forwardRef)(
|
|
|
5266
5272
|
}
|
|
5267
5273
|
});
|
|
5268
5274
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
5269
|
-
const generatedId = (0,
|
|
5275
|
+
const generatedId = (0, import_react35.useId)();
|
|
5270
5276
|
return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
|
|
5271
5277
|
Paper,
|
|
5272
5278
|
{
|
|
@@ -5304,14 +5310,14 @@ var OverflowMenu = (0, import_react34.forwardRef)(
|
|
|
5304
5310
|
OverflowMenu.displayName = "OverflowMenu";
|
|
5305
5311
|
|
|
5306
5312
|
// src/components/OverflowMenu/components/OverflowMenuButton.tsx
|
|
5307
|
-
var
|
|
5313
|
+
var import_react36 = require("react");
|
|
5308
5314
|
var import_jsx_runtime187 = require("react/jsx-runtime");
|
|
5309
|
-
var OverflowMenuButton = (0,
|
|
5315
|
+
var OverflowMenuButton = (0, import_react36.forwardRef)((props, ref) => {
|
|
5310
5316
|
const { id, icon, children, className, onClick, ...rest } = props;
|
|
5311
|
-
const itemRef = (0,
|
|
5317
|
+
const itemRef = (0, import_react36.useRef)(null);
|
|
5312
5318
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
5313
5319
|
const { onToggle, onClose, registerItem, unregisterItem, focusedRef } = useOverflowMenu();
|
|
5314
|
-
(0,
|
|
5320
|
+
(0, import_react36.useEffect)(() => {
|
|
5315
5321
|
registerItem(itemRef);
|
|
5316
5322
|
return () => unregisterItem(itemRef);
|
|
5317
5323
|
}, []);
|
|
@@ -5345,14 +5351,14 @@ var OverflowMenuButton = (0, import_react35.forwardRef)((props, ref) => {
|
|
|
5345
5351
|
OverflowMenuButton.displayName = "OverflowMenuButton";
|
|
5346
5352
|
|
|
5347
5353
|
// src/components/OverflowMenu/components/OverflowMenuLink.tsx
|
|
5348
|
-
var
|
|
5354
|
+
var import_react37 = require("react");
|
|
5349
5355
|
var import_jsx_runtime188 = require("react/jsx-runtime");
|
|
5350
|
-
var OverflowMenuLink = (0,
|
|
5356
|
+
var OverflowMenuLink = (0, import_react37.forwardRef)((props, ref) => {
|
|
5351
5357
|
const { id, href, icon, className, onClick, children, ...rest } = props;
|
|
5352
|
-
const itemRef = (0,
|
|
5358
|
+
const itemRef = (0, import_react37.useRef)(null);
|
|
5353
5359
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
5354
5360
|
const { onToggle, onClose, registerItem, unregisterItem, focusedRef } = useOverflowMenu();
|
|
5355
|
-
(0,
|
|
5361
|
+
(0, import_react37.useEffect)(() => {
|
|
5356
5362
|
registerItem(itemRef);
|
|
5357
5363
|
return () => unregisterItem(itemRef);
|
|
5358
5364
|
}, []);
|
|
@@ -5387,10 +5393,10 @@ var OverflowMenuLink = (0, import_react36.forwardRef)((props, ref) => {
|
|
|
5387
5393
|
OverflowMenuLink.displayName = "OverflowMenuLink";
|
|
5388
5394
|
|
|
5389
5395
|
// src/components/OverflowMenu/components/OverflowMenuDivider.tsx
|
|
5390
|
-
var
|
|
5396
|
+
var import_react39 = require("react");
|
|
5391
5397
|
|
|
5392
5398
|
// src/components/Divider/Divider.tsx
|
|
5393
|
-
var
|
|
5399
|
+
var import_react38 = require("react");
|
|
5394
5400
|
|
|
5395
5401
|
// src/components/Divider/Divider.module.css
|
|
5396
5402
|
var Divider_default = {
|
|
@@ -5402,7 +5408,7 @@ var Divider_default = {
|
|
|
5402
5408
|
|
|
5403
5409
|
// src/components/Divider/Divider.tsx
|
|
5404
5410
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
5405
|
-
var Divider = (0,
|
|
5411
|
+
var Divider = (0, import_react38.forwardRef)((props, ref) => {
|
|
5406
5412
|
const { color = "default", id, className, htmlProps, ...rest } = props;
|
|
5407
5413
|
const colorCn = color === "default" || color === "subtle" ? color : "on-inverse";
|
|
5408
5414
|
const lineProps = {
|
|
@@ -5420,7 +5426,7 @@ Divider.displayName = "Divider";
|
|
|
5420
5426
|
|
|
5421
5427
|
// src/components/OverflowMenu/components/OverflowMenuDivider.tsx
|
|
5422
5428
|
var import_jsx_runtime190 = require("react/jsx-runtime");
|
|
5423
|
-
var OverflowMenuDivider = (0,
|
|
5429
|
+
var OverflowMenuDivider = (0, import_react39.forwardRef)((props, ref) => {
|
|
5424
5430
|
const { className, ...rest } = props;
|
|
5425
5431
|
return /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
|
|
5426
5432
|
Divider,
|
|
@@ -5435,9 +5441,9 @@ var OverflowMenuDivider = (0, import_react38.forwardRef)((props, ref) => {
|
|
|
5435
5441
|
OverflowMenuDivider.displayName = "OverflowMenuDivider";
|
|
5436
5442
|
|
|
5437
5443
|
// src/components/OverflowMenu/components/OverflowMenuList.tsx
|
|
5438
|
-
var
|
|
5444
|
+
var import_react40 = require("react");
|
|
5439
5445
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
5440
|
-
var OverflowMenuList = (0,
|
|
5446
|
+
var OverflowMenuList = (0, import_react40.forwardRef)((props, ref) => {
|
|
5441
5447
|
return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
|
|
5442
5448
|
"ul",
|
|
5443
5449
|
{
|
|
@@ -5449,9 +5455,9 @@ var OverflowMenuList = (0, import_react39.forwardRef)((props, ref) => {
|
|
|
5449
5455
|
});
|
|
5450
5456
|
|
|
5451
5457
|
// src/components/OverflowMenu/components/OverflowMenuSpan.tsx
|
|
5452
|
-
var
|
|
5458
|
+
var import_react41 = require("react");
|
|
5453
5459
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
5454
|
-
var OverflowMenuSpan = (0,
|
|
5460
|
+
var OverflowMenuSpan = (0, import_react41.forwardRef)((props, ref) => {
|
|
5455
5461
|
const { icon, children, className, ...rest } = props;
|
|
5456
5462
|
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime192.jsxs)(
|
|
5457
5463
|
"span",
|
|
@@ -5473,9 +5479,9 @@ var OverflowMenuSpan = (0, import_react40.forwardRef)((props, ref) => {
|
|
|
5473
5479
|
OverflowMenuSpan.displayName = "OverflowMenuSpan";
|
|
5474
5480
|
|
|
5475
5481
|
// src/components/OverflowMenu/components/OverflowMenuListHeader.tsx
|
|
5476
|
-
var
|
|
5482
|
+
var import_react42 = require("react");
|
|
5477
5483
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
5478
|
-
var OverflowMenuListHeader = (0,
|
|
5484
|
+
var OverflowMenuListHeader = (0, import_react42.forwardRef)((props, ref) => {
|
|
5479
5485
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(
|
|
5480
5486
|
"h2",
|
|
5481
5487
|
{
|
|
@@ -5492,7 +5498,7 @@ var OverflowMenuListHeader = (0, import_react41.forwardRef)((props, ref) => {
|
|
|
5492
5498
|
OverflowMenuListHeader.displayName = "OverflowMenuListHeader";
|
|
5493
5499
|
|
|
5494
5500
|
// src/components/OverflowMenu/OverflowMenuGroup.tsx
|
|
5495
|
-
var
|
|
5501
|
+
var import_react43 = require("react");
|
|
5496
5502
|
var import_jsx_runtime194 = require("react/jsx-runtime");
|
|
5497
5503
|
var OverflowMenuGroup = ({
|
|
5498
5504
|
children,
|
|
@@ -5501,11 +5507,11 @@ var OverflowMenuGroup = ({
|
|
|
5501
5507
|
onOpen,
|
|
5502
5508
|
overflowMenuId
|
|
5503
5509
|
}) => {
|
|
5504
|
-
const [isOpen, setIsOpen] = (0,
|
|
5510
|
+
const [isOpen, setIsOpen] = (0, import_react43.useState)(false);
|
|
5505
5511
|
const toggle = () => setIsOpen(!isOpen);
|
|
5506
5512
|
const close = () => setIsOpen(false);
|
|
5507
|
-
const buttonRef = (0,
|
|
5508
|
-
const generatedId = (0,
|
|
5513
|
+
const buttonRef = (0, import_react43.useRef)(null);
|
|
5514
|
+
const generatedId = (0, import_react43.useId)();
|
|
5509
5515
|
const uniqueOverflowMenuId = overflowMenuId != null ? overflowMenuId : `${generatedId}-overflowMenu`;
|
|
5510
5516
|
const handleClose = () => {
|
|
5511
5517
|
onClose && onClose();
|
|
@@ -5517,14 +5523,14 @@ var OverflowMenuGroup = ({
|
|
|
5517
5523
|
onToggle && onToggle();
|
|
5518
5524
|
toggle();
|
|
5519
5525
|
};
|
|
5520
|
-
const Children8 =
|
|
5521
|
-
return (0,
|
|
5526
|
+
const Children8 = import_react43.Children.map(children, (child, childIndex) => {
|
|
5527
|
+
return (0, import_react43.isValidElement)(child) && (childIndex === 0 ? (0, import_react43.cloneElement)(child, {
|
|
5522
5528
|
"aria-haspopup": "menu",
|
|
5523
5529
|
"aria-controls": uniqueOverflowMenuId,
|
|
5524
5530
|
"aria-expanded": isOpen,
|
|
5525
5531
|
onClick: handleToggle,
|
|
5526
5532
|
ref: buttonRef
|
|
5527
|
-
}) : (0,
|
|
5533
|
+
}) : (0, import_react43.cloneElement)(child, {
|
|
5528
5534
|
isOpen,
|
|
5529
5535
|
id: uniqueOverflowMenuId,
|
|
5530
5536
|
onClose: handleClose,
|
|
@@ -5538,7 +5544,7 @@ OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
|
5538
5544
|
|
|
5539
5545
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
5540
5546
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
5541
|
-
var Breadcrumbs = (0,
|
|
5547
|
+
var Breadcrumbs = (0, import_react44.forwardRef)(
|
|
5542
5548
|
(props, ref) => {
|
|
5543
5549
|
const {
|
|
5544
5550
|
children,
|
|
@@ -5556,7 +5562,7 @@ var Breadcrumbs = (0, import_react43.forwardRef)(
|
|
|
5556
5562
|
icon: ChevronRightIcon
|
|
5557
5563
|
}
|
|
5558
5564
|
);
|
|
5559
|
-
const childrenArray =
|
|
5565
|
+
const childrenArray = import_react44.Children.toArray(children);
|
|
5560
5566
|
const breadcrumbChildren = childrenArray.map((item, index) => {
|
|
5561
5567
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsxs)(
|
|
5562
5568
|
"li",
|
|
@@ -5571,7 +5577,7 @@ var Breadcrumbs = (0, import_react43.forwardRef)(
|
|
|
5571
5577
|
);
|
|
5572
5578
|
});
|
|
5573
5579
|
const breadcrumbChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item) => {
|
|
5574
|
-
if ((0,
|
|
5580
|
+
if ((0, import_react44.isValidElement)(item)) {
|
|
5575
5581
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(OverflowMenuLink, { href: item.props.href, children: item.props.children });
|
|
5576
5582
|
}
|
|
5577
5583
|
}) : [];
|
|
@@ -5636,7 +5642,7 @@ var Breadcrumbs = (0, import_react43.forwardRef)(
|
|
|
5636
5642
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5637
5643
|
|
|
5638
5644
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
5639
|
-
var
|
|
5645
|
+
var import_react45 = require("react");
|
|
5640
5646
|
|
|
5641
5647
|
// src/components/ButtonGroup/ButtonGroup.module.css
|
|
5642
5648
|
var ButtonGroup_default = {
|
|
@@ -5647,7 +5653,7 @@ var ButtonGroup_default = {
|
|
|
5647
5653
|
|
|
5648
5654
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
5649
5655
|
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
5650
|
-
var ButtonGroup = (0,
|
|
5656
|
+
var ButtonGroup = (0, import_react45.forwardRef)(
|
|
5651
5657
|
(props, ref) => {
|
|
5652
5658
|
const {
|
|
5653
5659
|
children,
|
|
@@ -5659,8 +5665,8 @@ var ButtonGroup = (0, import_react44.forwardRef)(
|
|
|
5659
5665
|
role = "group",
|
|
5660
5666
|
...rest
|
|
5661
5667
|
} = props;
|
|
5662
|
-
const Children8 =
|
|
5663
|
-
return (0,
|
|
5668
|
+
const Children8 = import_react45.Children.map(children, (child) => {
|
|
5669
|
+
return (0, import_react45.isValidElement)(child) && (0, import_react45.cloneElement)(child, {
|
|
5664
5670
|
purpose: "secondary",
|
|
5665
5671
|
size: buttonSize
|
|
5666
5672
|
});
|
|
@@ -5733,7 +5739,7 @@ var Card = (props) => {
|
|
|
5733
5739
|
Card.displayName = "Card";
|
|
5734
5740
|
|
|
5735
5741
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5736
|
-
var
|
|
5742
|
+
var import_react46 = require("react");
|
|
5737
5743
|
|
|
5738
5744
|
// src/components/Card/CardAccordion/CardAccordion.module.css
|
|
5739
5745
|
var CardAccordion_default = {
|
|
@@ -5746,7 +5752,7 @@ var CardAccordion_default = {
|
|
|
5746
5752
|
|
|
5747
5753
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5748
5754
|
var import_jsx_runtime198 = require("react/jsx-runtime");
|
|
5749
|
-
var CardAccordion = (0,
|
|
5755
|
+
var CardAccordion = (0, import_react46.forwardRef)(
|
|
5750
5756
|
(props, ref) => {
|
|
5751
5757
|
const {
|
|
5752
5758
|
isExpanded = false,
|
|
@@ -5794,9 +5800,9 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
5794
5800
|
|
|
5795
5801
|
// src/components/Card/CardAccordion/CardAccordionHeader.tsx
|
|
5796
5802
|
var import_dds_design_tokens14 = require("@norges-domstoler/dds-design-tokens");
|
|
5797
|
-
var
|
|
5803
|
+
var import_react47 = require("react");
|
|
5798
5804
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
5799
|
-
var CardAccordionHeader = (0,
|
|
5805
|
+
var CardAccordionHeader = (0, import_react47.forwardRef)((props, ref) => {
|
|
5800
5806
|
const {
|
|
5801
5807
|
children,
|
|
5802
5808
|
className,
|
|
@@ -5860,9 +5866,9 @@ var CardAccordionHeader = (0, import_react46.forwardRef)((props, ref) => {
|
|
|
5860
5866
|
CardAccordionHeader.displayName = "CardAccordionHeader";
|
|
5861
5867
|
|
|
5862
5868
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
5863
|
-
var
|
|
5869
|
+
var import_react48 = require("react");
|
|
5864
5870
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
5865
|
-
var CardAccordionBody = (0,
|
|
5871
|
+
var CardAccordionBody = (0, import_react48.forwardRef)((props, ref) => {
|
|
5866
5872
|
const { children, className, htmlProps, padding, ...rest } = props;
|
|
5867
5873
|
const { bodyContentRef, bodyProps } = useAccordionContext();
|
|
5868
5874
|
const { className: bodyContextCn, id, height, ...restBodyProps } = bodyProps;
|
|
@@ -5907,7 +5913,7 @@ var CardAccordionBody = (0, import_react47.forwardRef)((props, ref) => {
|
|
|
5907
5913
|
CardAccordionBody.displayName = "CardAccordionBody";
|
|
5908
5914
|
|
|
5909
5915
|
// src/components/Chip/Chip.tsx
|
|
5910
|
-
var
|
|
5916
|
+
var import_react49 = require("react");
|
|
5911
5917
|
|
|
5912
5918
|
// src/components/Chip/Chip.module.css
|
|
5913
5919
|
var Chip_default = {
|
|
@@ -5917,10 +5923,10 @@ var Chip_default = {
|
|
|
5917
5923
|
|
|
5918
5924
|
// src/components/Chip/Chip.tsx
|
|
5919
5925
|
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
5920
|
-
var Chip = (0,
|
|
5926
|
+
var Chip = (0, import_react49.forwardRef)((props, ref) => {
|
|
5921
5927
|
const { text, onClose, id, className, htmlProps = {}, ...rest } = props;
|
|
5922
5928
|
const { "aria-label": ariaLabel, ...restHTMLprops } = htmlProps;
|
|
5923
|
-
const [isOpen, setIsOpen] = (0,
|
|
5929
|
+
const [isOpen, setIsOpen] = (0, import_react49.useState)(true);
|
|
5924
5930
|
const onClick = () => {
|
|
5925
5931
|
setIsOpen(false);
|
|
5926
5932
|
onClose && onClose();
|
|
@@ -5960,11 +5966,11 @@ var Chip = (0, import_react48.forwardRef)((props, ref) => {
|
|
|
5960
5966
|
Chip.displayName = "Chip";
|
|
5961
5967
|
|
|
5962
5968
|
// src/components/Chip/ChipGroup.tsx
|
|
5963
|
-
var
|
|
5969
|
+
var import_react50 = require("react");
|
|
5964
5970
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
5965
|
-
var ChipGroup = (0,
|
|
5971
|
+
var ChipGroup = (0, import_react50.forwardRef)(
|
|
5966
5972
|
({ children, className, ...rest }, ref) => {
|
|
5967
|
-
const childrenArray =
|
|
5973
|
+
const childrenArray = import_react50.Children.toArray(children);
|
|
5968
5974
|
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
5969
5975
|
"ul",
|
|
5970
5976
|
{
|
|
@@ -5983,7 +5989,7 @@ var ChipGroup = (0, import_react49.forwardRef)(
|
|
|
5983
5989
|
ChipGroup.displayName = "ChipGroup";
|
|
5984
5990
|
|
|
5985
5991
|
// src/components/Contrast/Contrast.tsx
|
|
5986
|
-
var
|
|
5992
|
+
var import_react51 = require("react");
|
|
5987
5993
|
|
|
5988
5994
|
// src/components/Contrast/Contrast.module.css
|
|
5989
5995
|
var Contrast_default = {
|
|
@@ -5992,7 +5998,7 @@ var Contrast_default = {
|
|
|
5992
5998
|
|
|
5993
5999
|
// src/components/Contrast/Contrast.tsx
|
|
5994
6000
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
5995
|
-
var Contrast = (0,
|
|
6001
|
+
var Contrast = (0, import_react51.forwardRef)((props, ref) => {
|
|
5996
6002
|
const { className, as = "div", ...rest } = props;
|
|
5997
6003
|
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
5998
6004
|
ElementAs,
|
|
@@ -6010,7 +6016,7 @@ var import_date4 = require("@internationalized/date");
|
|
|
6010
6016
|
var import_calendar3 = require("@react-aria/calendar");
|
|
6011
6017
|
var import_i18n2 = require("@react-aria/i18n");
|
|
6012
6018
|
var import_calendar4 = require("@react-stately/calendar");
|
|
6013
|
-
var
|
|
6019
|
+
var import_react54 = require("react");
|
|
6014
6020
|
|
|
6015
6021
|
// src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
|
|
6016
6022
|
var import_date3 = require("@internationalized/date");
|
|
@@ -6020,7 +6026,7 @@ var import_i18n = require("@react-aria/i18n");
|
|
|
6020
6026
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
6021
6027
|
var import_date = require("@internationalized/date");
|
|
6022
6028
|
var import_calendar = require("@react-aria/calendar");
|
|
6023
|
-
var
|
|
6029
|
+
var import_react53 = require("react");
|
|
6024
6030
|
|
|
6025
6031
|
// src/components/date-inputs/common/DateInput.module.css
|
|
6026
6032
|
var DateInput_default = {
|
|
@@ -6055,9 +6061,9 @@ var DateInput_default = {
|
|
|
6055
6061
|
};
|
|
6056
6062
|
|
|
6057
6063
|
// src/components/date-inputs/DatePicker/CalendarPopover.tsx
|
|
6058
|
-
var
|
|
6064
|
+
var import_react52 = require("react");
|
|
6059
6065
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
6060
|
-
var CalendarPopoverContext = (0,
|
|
6066
|
+
var CalendarPopoverContext = (0, import_react52.createContext)({
|
|
6061
6067
|
anchorRef: null,
|
|
6062
6068
|
isOpen: false,
|
|
6063
6069
|
onClose: () => null
|
|
@@ -6067,27 +6073,27 @@ var CalendarPopover = ({
|
|
|
6067
6073
|
isOpen,
|
|
6068
6074
|
onClose
|
|
6069
6075
|
}) => {
|
|
6070
|
-
const anchorRef = (0,
|
|
6076
|
+
const anchorRef = (0, import_react52.useRef)(null);
|
|
6071
6077
|
useOnKeyDown("Escape", onClose);
|
|
6072
6078
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(CalendarPopoverContext.Provider, { value: { anchorRef, isOpen, onClose }, children });
|
|
6073
6079
|
};
|
|
6074
6080
|
var CalendarPopoverAnchor = ({
|
|
6075
6081
|
children
|
|
6076
6082
|
}) => {
|
|
6077
|
-
const { anchorRef } = (0,
|
|
6083
|
+
const { anchorRef } = (0, import_react52.useContext)(CalendarPopoverContext);
|
|
6078
6084
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)("div", { ref: anchorRef != null ? anchorRef : void 0, children });
|
|
6079
6085
|
};
|
|
6080
6086
|
var CalendarPopoverContent = ({
|
|
6081
6087
|
children
|
|
6082
6088
|
}) => {
|
|
6083
|
-
const ref = (0,
|
|
6089
|
+
const ref = (0, import_react52.useRef)(null);
|
|
6084
6090
|
const { refs, styles: floatingStyles } = useFloatPosition(null, {
|
|
6085
6091
|
placement: "bottom-start"
|
|
6086
6092
|
});
|
|
6087
|
-
const { isOpen, onClose, anchorRef } = (0,
|
|
6093
|
+
const { isOpen, onClose, anchorRef } = (0, import_react52.useContext)(CalendarPopoverContext);
|
|
6088
6094
|
const combinedRef = useCombinedRef(refs.setFloating, ref);
|
|
6089
6095
|
useOnClickOutside(ref.current, onClose);
|
|
6090
|
-
(0,
|
|
6096
|
+
(0, import_react52.useEffect)(() => {
|
|
6091
6097
|
var _a;
|
|
6092
6098
|
refs.setReference((_a = anchorRef == null ? void 0 : anchorRef.current) != null ? _a : null);
|
|
6093
6099
|
}, []);
|
|
@@ -6110,7 +6116,7 @@ var timezone = "Europe/Oslo";
|
|
|
6110
6116
|
// src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
|
|
6111
6117
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
6112
6118
|
function CalendarCell({ date, state }) {
|
|
6113
|
-
const ref = (0,
|
|
6119
|
+
const ref = (0, import_react53.useRef)(null);
|
|
6114
6120
|
const {
|
|
6115
6121
|
buttonProps,
|
|
6116
6122
|
cellProps,
|
|
@@ -6123,7 +6129,7 @@ function CalendarCell({ date, state }) {
|
|
|
6123
6129
|
if (isDisabled) {
|
|
6124
6130
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)("td", { ...cellProps });
|
|
6125
6131
|
}
|
|
6126
|
-
const { onClose } = (0,
|
|
6132
|
+
const { onClose } = (0, import_react53.useContext)(CalendarPopoverContext);
|
|
6127
6133
|
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
6128
6134
|
const closeOnKeyboardBlurForward = (event) => {
|
|
6129
6135
|
if (event.key === "Tab" && event.shiftKey === false) {
|
|
@@ -6262,7 +6268,7 @@ function Calendar(props) {
|
|
|
6262
6268
|
nextButtonProps: { onPress: onNext, "aria-label": nextAriaLabel },
|
|
6263
6269
|
title
|
|
6264
6270
|
} = (0, import_calendar3.useCalendar)(props, state);
|
|
6265
|
-
const { onClose } = (0,
|
|
6271
|
+
const { onClose } = (0, import_react54.useContext)(CalendarPopoverContext);
|
|
6266
6272
|
const closeOnKeyboardBlurBack = (event) => {
|
|
6267
6273
|
if (event.key === "Tab" && event.shiftKey === true) {
|
|
6268
6274
|
onClose();
|
|
@@ -6314,25 +6320,25 @@ Calendar.displayName = "Calendar";
|
|
|
6314
6320
|
var import_datepicker4 = require("@react-aria/datepicker");
|
|
6315
6321
|
var import_i18n4 = require("@react-aria/i18n");
|
|
6316
6322
|
var import_datepicker5 = require("@react-stately/datepicker");
|
|
6317
|
-
var
|
|
6323
|
+
var import_react61 = require("react");
|
|
6318
6324
|
|
|
6319
6325
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
6320
6326
|
var import_date5 = require("@internationalized/date");
|
|
6321
6327
|
var import_datepicker2 = require("@react-aria/datepicker");
|
|
6322
6328
|
var import_i18n3 = require("@react-aria/i18n");
|
|
6323
6329
|
var import_datepicker3 = require("@react-stately/datepicker");
|
|
6324
|
-
var
|
|
6330
|
+
var import_react59 = require("react");
|
|
6325
6331
|
|
|
6326
6332
|
// src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
|
|
6327
6333
|
var import_button = require("@react-aria/button");
|
|
6328
|
-
var
|
|
6334
|
+
var import_react55 = require("react");
|
|
6329
6335
|
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
6330
6336
|
function CalendarButton({
|
|
6331
6337
|
componentSize,
|
|
6332
6338
|
isReadOnly,
|
|
6333
6339
|
...props
|
|
6334
6340
|
}) {
|
|
6335
|
-
const ref = (0,
|
|
6341
|
+
const ref = (0, import_react55.useRef)(null);
|
|
6336
6342
|
const { buttonProps } = (0, import_button.useButton)(props, ref);
|
|
6337
6343
|
const size2 = componentSize === "tiny" ? "small" : "medium";
|
|
6338
6344
|
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
@@ -6363,7 +6369,7 @@ function CalendarButton({
|
|
|
6363
6369
|
|
|
6364
6370
|
// src/components/date-inputs/DatePicker/DateField/DateSegment.tsx
|
|
6365
6371
|
var import_datepicker = require("@react-aria/datepicker");
|
|
6366
|
-
var
|
|
6372
|
+
var import_react56 = require("react");
|
|
6367
6373
|
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
6368
6374
|
var typographyTypes2 = {
|
|
6369
6375
|
medium: "bodySans02",
|
|
@@ -6381,7 +6387,7 @@ function DateSegment({
|
|
|
6381
6387
|
componentSize
|
|
6382
6388
|
}) {
|
|
6383
6389
|
var _a;
|
|
6384
|
-
const ref = (0,
|
|
6390
|
+
const ref = (0, import_react56.useRef)(null);
|
|
6385
6391
|
const { segmentProps } = (0, import_datepicker.useDateSegment)(segment, state, ref);
|
|
6386
6392
|
return /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(
|
|
6387
6393
|
"div",
|
|
@@ -6418,10 +6424,10 @@ function DateSegment({
|
|
|
6418
6424
|
DateSegment.displayName = "DateSegment";
|
|
6419
6425
|
|
|
6420
6426
|
// src/components/date-inputs/common/DateInput.tsx
|
|
6421
|
-
var
|
|
6427
|
+
var import_react58 = require("react");
|
|
6422
6428
|
|
|
6423
6429
|
// src/components/InputMessage/InputMessage.tsx
|
|
6424
|
-
var
|
|
6430
|
+
var import_react57 = require("react");
|
|
6425
6431
|
|
|
6426
6432
|
// src/components/InputMessage/InputMessage.module.css
|
|
6427
6433
|
var InputMessage_default = {
|
|
@@ -6432,7 +6438,7 @@ var InputMessage_default = {
|
|
|
6432
6438
|
|
|
6433
6439
|
// src/components/InputMessage/InputMessage.tsx
|
|
6434
6440
|
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
6435
|
-
var InputMessage = (0,
|
|
6441
|
+
var InputMessage = (0, import_react57.forwardRef)(
|
|
6436
6442
|
(props, ref) => {
|
|
6437
6443
|
const { message, messageType, id, className, htmlProps, ...rest } = props;
|
|
6438
6444
|
const isError = messageType === "error";
|
|
@@ -6504,7 +6510,7 @@ function _DateInput({
|
|
|
6504
6510
|
const hasTip = !!tip;
|
|
6505
6511
|
const hasLabel = props.label != null;
|
|
6506
6512
|
const hasMessage = hasErrorMessage || hasTip;
|
|
6507
|
-
const { isOpen } = (0,
|
|
6513
|
+
const { isOpen } = (0, import_react58.useContext)(CalendarPopoverContext);
|
|
6508
6514
|
const styleVariables = {
|
|
6509
6515
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6510
6516
|
["--dds-date-input-width"]: width ? width : componentSize === "small" ? "148px" : componentSize === "tiny" ? "125px" : "160px"
|
|
@@ -6565,7 +6571,7 @@ function _DateInput({
|
|
|
6565
6571
|
}
|
|
6566
6572
|
);
|
|
6567
6573
|
}
|
|
6568
|
-
var DateInput = (0,
|
|
6574
|
+
var DateInput = (0, import_react58.forwardRef)(_DateInput);
|
|
6569
6575
|
DateInput.displayName = "DateInput";
|
|
6570
6576
|
|
|
6571
6577
|
// src/components/date-inputs/DatePicker/DateField/DateField.tsx
|
|
@@ -6582,7 +6588,7 @@ function _DateField({
|
|
|
6582
6588
|
locale: locale2,
|
|
6583
6589
|
createCalendar: import_date5.createCalendar
|
|
6584
6590
|
});
|
|
6585
|
-
const ref = (0,
|
|
6591
|
+
const ref = (0, import_react59.useRef)(null);
|
|
6586
6592
|
const { labelProps, fieldProps } = (0, import_datepicker2.useDateField)(props, state, ref);
|
|
6587
6593
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
6588
6594
|
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
@@ -6621,15 +6627,15 @@ function _DateField({
|
|
|
6621
6627
|
}
|
|
6622
6628
|
);
|
|
6623
6629
|
}
|
|
6624
|
-
var DateField = (0,
|
|
6630
|
+
var DateField = (0, import_react59.forwardRef)(_DateField);
|
|
6625
6631
|
DateField.displayName = "DateField";
|
|
6626
6632
|
|
|
6627
6633
|
// src/components/date-inputs/utils/useFocusManagerRef.ts
|
|
6628
6634
|
var import_focus13 = require("@react-aria/focus");
|
|
6629
|
-
var
|
|
6635
|
+
var import_react60 = require("react");
|
|
6630
6636
|
function useFocusManagerRef(ref) {
|
|
6631
|
-
const domRef = (0,
|
|
6632
|
-
(0,
|
|
6637
|
+
const domRef = (0, import_react60.useRef)(null);
|
|
6638
|
+
(0, import_react60.useImperativeHandle)(ref, () => ({
|
|
6633
6639
|
...createDOMRef(domRef),
|
|
6634
6640
|
focus() {
|
|
6635
6641
|
(0, import_focus13.createFocusManager)(domRef).focusFirst({ tabbable: true });
|
|
@@ -6653,9 +6659,9 @@ var refIsFocusable = (ref) => {
|
|
|
6653
6659
|
function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props }, forwardedRef) {
|
|
6654
6660
|
const state = (0, import_datepicker5.useDatePickerState)(props);
|
|
6655
6661
|
const domRef = useFocusManagerRef(
|
|
6656
|
-
refIsFocusable(
|
|
6662
|
+
refIsFocusable(import_react61.forwardRef) ? forwardedRef : null
|
|
6657
6663
|
);
|
|
6658
|
-
const ref = (0,
|
|
6664
|
+
const ref = (0, import_react61.useRef)(null);
|
|
6659
6665
|
const combinedRef = useCombinedRef(ref, domRef);
|
|
6660
6666
|
const { buttonProps, calendarProps, fieldProps, groupProps } = (0, import_datepicker4.useDatePicker)(
|
|
6661
6667
|
{ ...props, granularity: "day" },
|
|
@@ -6682,16 +6688,16 @@ function _DatePicker({ errorMessage, componentSize, tip, style, width, ...props
|
|
|
6682
6688
|
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(CalendarPopoverContent, { children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Calendar, { ...calendarProps }) })
|
|
6683
6689
|
] }) });
|
|
6684
6690
|
}
|
|
6685
|
-
var DatePicker = (0,
|
|
6691
|
+
var DatePicker = (0, import_react61.forwardRef)(_DatePicker);
|
|
6686
6692
|
DatePicker.displayName = "DatePicker";
|
|
6687
6693
|
|
|
6688
6694
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
6689
6695
|
var import_datepicker6 = require("@react-aria/datepicker");
|
|
6690
6696
|
var import_datepicker7 = require("@react-stately/datepicker");
|
|
6691
|
-
var
|
|
6697
|
+
var import_react62 = require("react");
|
|
6692
6698
|
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
6693
6699
|
function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef) {
|
|
6694
|
-
const ref = (0,
|
|
6700
|
+
const ref = (0, import_react62.useRef)(null);
|
|
6695
6701
|
const state = (0, import_datepicker7.useTimeFieldState)({
|
|
6696
6702
|
...props,
|
|
6697
6703
|
locale
|
|
@@ -6740,7 +6746,7 @@ function _TimePicker({ componentSize = "medium", width, ...props }, forwardedRef
|
|
|
6740
6746
|
}
|
|
6741
6747
|
);
|
|
6742
6748
|
}
|
|
6743
|
-
var TimePicker = (0,
|
|
6749
|
+
var TimePicker = (0, import_react62.forwardRef)(_TimePicker);
|
|
6744
6750
|
TimePicker.displayName = "TimePicker";
|
|
6745
6751
|
|
|
6746
6752
|
// src/components/date-inputs/utils/transform.ts
|
|
@@ -6773,7 +6779,7 @@ function calendarDateToNativeDate(date, time = new import_date6.Time(12, 0, 0, 0
|
|
|
6773
6779
|
}
|
|
6774
6780
|
|
|
6775
6781
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
6776
|
-
var
|
|
6782
|
+
var import_react63 = require("react");
|
|
6777
6783
|
|
|
6778
6784
|
// src/components/DescriptionList/DescriptionList.module.css
|
|
6779
6785
|
var DescriptionList_default = {
|
|
@@ -6788,7 +6794,7 @@ var DescriptionList_default = {
|
|
|
6788
6794
|
|
|
6789
6795
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
6790
6796
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
6791
|
-
var DescriptionList = (0,
|
|
6797
|
+
var DescriptionList = (0, import_react63.forwardRef)((props, ref) => {
|
|
6792
6798
|
const {
|
|
6793
6799
|
appearance = "default",
|
|
6794
6800
|
direction = "column",
|
|
@@ -6820,17 +6826,17 @@ var DescriptionList = (0, import_react62.forwardRef)((props, ref) => {
|
|
|
6820
6826
|
DescriptionList.displayName = "DescriptionList";
|
|
6821
6827
|
|
|
6822
6828
|
// src/components/DescriptionList/DescriptionListTerm.tsx
|
|
6823
|
-
var
|
|
6829
|
+
var import_react64 = require("react");
|
|
6824
6830
|
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
6825
|
-
var DescriptionListTerm = (0,
|
|
6831
|
+
var DescriptionListTerm = (0, import_react64.forwardRef)(({ ...rest }, ref) => {
|
|
6826
6832
|
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("dt", { ref, ...rest });
|
|
6827
6833
|
});
|
|
6828
6834
|
DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
6829
6835
|
|
|
6830
6836
|
// src/components/DescriptionList/DescriptionListDesc.tsx
|
|
6831
|
-
var
|
|
6837
|
+
var import_react65 = require("react");
|
|
6832
6838
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
6833
|
-
var DescriptionListDesc = (0,
|
|
6839
|
+
var DescriptionListDesc = (0, import_react65.forwardRef)((props, ref) => {
|
|
6834
6840
|
const { children, icon, id, className, htmlProps, ...rest } = props;
|
|
6835
6841
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
6836
6842
|
"dd",
|
|
@@ -6848,9 +6854,9 @@ var DescriptionListDesc = (0, import_react64.forwardRef)((props, ref) => {
|
|
|
6848
6854
|
DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
6849
6855
|
|
|
6850
6856
|
// src/components/DescriptionList/DescriptionListGroup.tsx
|
|
6851
|
-
var
|
|
6857
|
+
var import_react66 = require("react");
|
|
6852
6858
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
6853
|
-
var DescriptionListGroup = (0,
|
|
6859
|
+
var DescriptionListGroup = (0, import_react66.forwardRef)((props, ref) => {
|
|
6854
6860
|
const {
|
|
6855
6861
|
children,
|
|
6856
6862
|
margin,
|
|
@@ -6874,7 +6880,7 @@ var DescriptionListGroup = (0, import_react65.forwardRef)((props, ref) => {
|
|
|
6874
6880
|
DescriptionListGroup.displayName = "DescriptionListGroup";
|
|
6875
6881
|
|
|
6876
6882
|
// src/components/DetailList/DetailList.tsx
|
|
6877
|
-
var
|
|
6883
|
+
var import_react67 = require("react");
|
|
6878
6884
|
|
|
6879
6885
|
// src/components/DetailList/DetailList.module.css
|
|
6880
6886
|
var DetailList_default = {
|
|
@@ -6891,7 +6897,7 @@ var DetailList_default = {
|
|
|
6891
6897
|
|
|
6892
6898
|
// src/components/DetailList/DetailList.tsx
|
|
6893
6899
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
6894
|
-
var DetailList = (0,
|
|
6900
|
+
var DetailList = (0, import_react67.forwardRef)(
|
|
6895
6901
|
(props, ref) => {
|
|
6896
6902
|
const {
|
|
6897
6903
|
id,
|
|
@@ -6925,9 +6931,9 @@ var DetailList = (0, import_react66.forwardRef)(
|
|
|
6925
6931
|
DetailList.displayName = "DetailList";
|
|
6926
6932
|
|
|
6927
6933
|
// src/components/DetailList/DetailListDesc.tsx
|
|
6928
|
-
var
|
|
6934
|
+
var import_react68 = require("react");
|
|
6929
6935
|
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
6930
|
-
var DetailListDesc = (0,
|
|
6936
|
+
var DetailListDesc = (0, import_react68.forwardRef)(
|
|
6931
6937
|
({ className, ...rest }, ref) => {
|
|
6932
6938
|
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("dd", { ref, className: cn(className, DetailList_default.cell), ...rest });
|
|
6933
6939
|
}
|
|
@@ -6935,9 +6941,9 @@ var DetailListDesc = (0, import_react67.forwardRef)(
|
|
|
6935
6941
|
DetailListDesc.displayName = "DetailListDesc";
|
|
6936
6942
|
|
|
6937
6943
|
// src/components/DetailList/DetailListRow.tsx
|
|
6938
|
-
var
|
|
6944
|
+
var import_react69 = require("react");
|
|
6939
6945
|
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
6940
|
-
var DetailListRow = (0,
|
|
6946
|
+
var DetailListRow = (0, import_react69.forwardRef)(
|
|
6941
6947
|
({ className, ...rest }, ref) => {
|
|
6942
6948
|
return /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", { ref, className: cn(className, DetailList_default.row), ...rest });
|
|
6943
6949
|
}
|
|
@@ -6945,9 +6951,9 @@ var DetailListRow = (0, import_react68.forwardRef)(
|
|
|
6945
6951
|
DetailListRow.displayName = "DetailListRow";
|
|
6946
6952
|
|
|
6947
6953
|
// src/components/DetailList/DetailListTerm.tsx
|
|
6948
|
-
var
|
|
6954
|
+
var import_react70 = require("react");
|
|
6949
6955
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
6950
|
-
var DetailListTerm = (0,
|
|
6956
|
+
var DetailListTerm = (0, import_react70.forwardRef)(
|
|
6951
6957
|
({ className, ...rest }, ref) => {
|
|
6952
6958
|
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
6953
6959
|
"dt",
|
|
@@ -6962,7 +6968,7 @@ var DetailListTerm = (0, import_react69.forwardRef)(
|
|
|
6962
6968
|
DetailListTerm.displayName = "DetailListTerm";
|
|
6963
6969
|
|
|
6964
6970
|
// src/components/Drawer/Drawer.tsx
|
|
6965
|
-
var
|
|
6971
|
+
var import_react71 = require("react");
|
|
6966
6972
|
var import_react_dom2 = require("react-dom");
|
|
6967
6973
|
|
|
6968
6974
|
// src/components/Drawer/Drawer.module.css
|
|
@@ -6983,7 +6989,7 @@ var Drawer_default = {
|
|
|
6983
6989
|
|
|
6984
6990
|
// src/components/Drawer/Drawer.tsx
|
|
6985
6991
|
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
6986
|
-
var Drawer = (0,
|
|
6992
|
+
var Drawer = (0, import_react71.forwardRef)((props, ref) => {
|
|
6987
6993
|
const {
|
|
6988
6994
|
children,
|
|
6989
6995
|
onClose,
|
|
@@ -7000,7 +7006,7 @@ var Drawer = (0, import_react70.forwardRef)((props, ref) => {
|
|
|
7000
7006
|
withBackdrop,
|
|
7001
7007
|
...rest
|
|
7002
7008
|
} = props;
|
|
7003
|
-
const generatedId = (0,
|
|
7009
|
+
const generatedId = (0, import_react71.useId)();
|
|
7004
7010
|
const uniqueId = id != null ? id : `${generatedId}-drawer`;
|
|
7005
7011
|
const hasHeader = !!header;
|
|
7006
7012
|
const headerId = hasHeader ? `${uniqueId}-header` : void 0;
|
|
@@ -7013,7 +7019,7 @@ var Drawer = (0, import_react70.forwardRef)((props, ref) => {
|
|
|
7013
7019
|
onClose && onClose();
|
|
7014
7020
|
}
|
|
7015
7021
|
});
|
|
7016
|
-
(0,
|
|
7022
|
+
(0, import_react71.useEffect)(() => {
|
|
7017
7023
|
if (withBackdrop) {
|
|
7018
7024
|
if (isOpen) {
|
|
7019
7025
|
handleElementWithBackdropMount(document.body);
|
|
@@ -7028,10 +7034,16 @@ var Drawer = (0, import_react70.forwardRef)((props, ref) => {
|
|
|
7028
7034
|
];
|
|
7029
7035
|
if (triggerRef) elements.push(triggerRef.current);
|
|
7030
7036
|
useOnClickOutside(elements, () => {
|
|
7031
|
-
if (isOpen) {
|
|
7037
|
+
if (isOpen && !withBackdrop) {
|
|
7032
7038
|
onClose == null ? void 0 : onClose();
|
|
7033
7039
|
}
|
|
7034
7040
|
});
|
|
7041
|
+
const backdropRef = (0, import_react71.useRef)(null);
|
|
7042
|
+
const onBackdropClick = (event) => {
|
|
7043
|
+
if (event.target === backdropRef.current && isOpen && withBackdrop) {
|
|
7044
|
+
onClose == null ? void 0 : onClose();
|
|
7045
|
+
}
|
|
7046
|
+
};
|
|
7035
7047
|
const hasTransitionedIn = useMountTransition(isOpen, 500);
|
|
7036
7048
|
const isMounted = hasTransitionedIn && isOpen;
|
|
7037
7049
|
const isOpenCn = isMounted ? "opened" : "closed";
|
|
@@ -7087,13 +7099,13 @@ var Drawer = (0, import_react70.forwardRef)((props, ref) => {
|
|
|
7087
7099
|
]
|
|
7088
7100
|
}
|
|
7089
7101
|
);
|
|
7090
|
-
const component = withBackdrop ? /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Backdrop, { isMounted, children: drawer }) : drawer;
|
|
7102
|
+
const component = withBackdrop ? /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(Backdrop, { isMounted, ref: backdropRef, onClick: onBackdropClick, children: drawer }) : drawer;
|
|
7091
7103
|
return isOpen || hasTransitionedIn ? (0, import_react_dom2.createPortal)(component, parentElement) : null;
|
|
7092
7104
|
});
|
|
7093
7105
|
Drawer.displayName = "Drawer";
|
|
7094
7106
|
|
|
7095
7107
|
// src/components/Drawer/DrawerGroup.tsx
|
|
7096
|
-
var
|
|
7108
|
+
var import_react72 = require("react");
|
|
7097
7109
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
7098
7110
|
var DrawerGroup = ({
|
|
7099
7111
|
children,
|
|
@@ -7101,10 +7113,10 @@ var DrawerGroup = ({
|
|
|
7101
7113
|
onOpen,
|
|
7102
7114
|
onClose
|
|
7103
7115
|
}) => {
|
|
7104
|
-
const generatedId = (0,
|
|
7116
|
+
const generatedId = (0, import_react72.useId)();
|
|
7105
7117
|
const uniqueDrawerId = drawerId != null ? drawerId : `${generatedId}-drawer`;
|
|
7106
|
-
const buttonRef = (0,
|
|
7107
|
-
const [closed, setClosed] = (0,
|
|
7118
|
+
const buttonRef = (0, import_react72.useRef)(null);
|
|
7119
|
+
const [closed, setClosed] = (0, import_react72.useState)(true);
|
|
7108
7120
|
const open = () => setClosed(false);
|
|
7109
7121
|
const close = () => setClosed(true);
|
|
7110
7122
|
const handleOpen = () => {
|
|
@@ -7115,14 +7127,14 @@ var DrawerGroup = ({
|
|
|
7115
7127
|
close();
|
|
7116
7128
|
onClose && onClose();
|
|
7117
7129
|
};
|
|
7118
|
-
const Children8 =
|
|
7119
|
-
return (0,
|
|
7130
|
+
const Children8 = import_react72.Children.map(children, (child, childIndex) => {
|
|
7131
|
+
return (0, import_react72.isValidElement)(child) && (childIndex === 0 ? (0, import_react72.cloneElement)(child, {
|
|
7120
7132
|
"aria-haspopup": "dialog",
|
|
7121
7133
|
"aria-controls": uniqueDrawerId,
|
|
7122
7134
|
"aria-expanded": !closed,
|
|
7123
7135
|
ref: buttonRef,
|
|
7124
7136
|
onClick: handleOpen
|
|
7125
|
-
}) : (0,
|
|
7137
|
+
}) : (0, import_react72.cloneElement)(child, {
|
|
7126
7138
|
id: uniqueDrawerId,
|
|
7127
7139
|
triggerRef: buttonRef,
|
|
7128
7140
|
isOpen: !closed,
|
|
@@ -7161,7 +7173,7 @@ function EmptyContent({
|
|
|
7161
7173
|
EmptyContent.displayName = "EmptyContent";
|
|
7162
7174
|
|
|
7163
7175
|
// src/components/FavStar/FavStar.tsx
|
|
7164
|
-
var
|
|
7176
|
+
var import_react75 = require("react");
|
|
7165
7177
|
|
|
7166
7178
|
// src/components/FavStar/FavStar.module.css
|
|
7167
7179
|
var FavStar_default = {
|
|
@@ -7173,16 +7185,16 @@ var FavStar_default = {
|
|
|
7173
7185
|
};
|
|
7174
7186
|
|
|
7175
7187
|
// src/hooks/useControllableState.ts
|
|
7176
|
-
var
|
|
7188
|
+
var import_react74 = require("react");
|
|
7177
7189
|
|
|
7178
7190
|
// src/hooks/useCallbackRef.ts
|
|
7179
|
-
var
|
|
7191
|
+
var import_react73 = require("react");
|
|
7180
7192
|
function useCallbackRef(callback, deps = []) {
|
|
7181
|
-
const callbackRef = (0,
|
|
7182
|
-
(0,
|
|
7193
|
+
const callbackRef = (0, import_react73.useRef)(callback);
|
|
7194
|
+
(0, import_react73.useEffect)(() => {
|
|
7183
7195
|
callbackRef.current = callback;
|
|
7184
7196
|
});
|
|
7185
|
-
return (0,
|
|
7197
|
+
return (0, import_react73.useCallback)((...args) => {
|
|
7186
7198
|
var _a;
|
|
7187
7199
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
7188
7200
|
}, deps);
|
|
@@ -7192,7 +7204,7 @@ function useCallbackRef(callback, deps = []) {
|
|
|
7192
7204
|
function useControllableState(props) {
|
|
7193
7205
|
const { value: valueProp, defaultValue, onChange } = props;
|
|
7194
7206
|
const onChangeProp = useCallbackRef(onChange);
|
|
7195
|
-
const [uncontrolledState, setUncontrolledState] = (0,
|
|
7207
|
+
const [uncontrolledState, setUncontrolledState] = (0, import_react74.useState)(defaultValue);
|
|
7196
7208
|
const controlled = valueProp !== void 0;
|
|
7197
7209
|
const value = controlled ? valueProp : uncontrolledState;
|
|
7198
7210
|
const setValue = useCallbackRef(
|
|
@@ -7211,7 +7223,7 @@ function useControllableState(props) {
|
|
|
7211
7223
|
|
|
7212
7224
|
// src/components/FavStar/FavStar.tsx
|
|
7213
7225
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
7214
|
-
var FavStar = (0,
|
|
7226
|
+
var FavStar = (0, import_react75.forwardRef)(
|
|
7215
7227
|
({
|
|
7216
7228
|
id,
|
|
7217
7229
|
className,
|
|
@@ -7229,7 +7241,7 @@ var FavStar = (0, import_react74.forwardRef)(
|
|
|
7229
7241
|
htmlProps,
|
|
7230
7242
|
rest
|
|
7231
7243
|
);
|
|
7232
|
-
const generatedId = (0,
|
|
7244
|
+
const generatedId = (0, import_react75.useId)();
|
|
7233
7245
|
const [checked, setChecked] = useControllableState({
|
|
7234
7246
|
value: checkedProp,
|
|
7235
7247
|
defaultValue: defaultChecked != null ? defaultChecked : false,
|
|
@@ -7277,7 +7289,7 @@ var FavStar = (0, import_react74.forwardRef)(
|
|
|
7277
7289
|
FavStar.displayName = "FavStar";
|
|
7278
7290
|
|
|
7279
7291
|
// src/components/Feedback/Feedback.tsx
|
|
7280
|
-
var
|
|
7292
|
+
var import_react79 = require("react");
|
|
7281
7293
|
|
|
7282
7294
|
// src/components/Feedback/Feedback.module.css
|
|
7283
7295
|
var Feedback_default = {
|
|
@@ -7291,7 +7303,7 @@ var Feedback_default = {
|
|
|
7291
7303
|
};
|
|
7292
7304
|
|
|
7293
7305
|
// src/components/Stack/Stack.tsx
|
|
7294
|
-
var
|
|
7306
|
+
var import_react76 = require("react");
|
|
7295
7307
|
|
|
7296
7308
|
// src/components/Stack/Stack.module.css
|
|
7297
7309
|
var Stack_default = {
|
|
@@ -7328,7 +7340,7 @@ var Stack_default = {
|
|
|
7328
7340
|
|
|
7329
7341
|
// src/components/Stack/Stack.tsx
|
|
7330
7342
|
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
7331
|
-
var HStack = (0,
|
|
7343
|
+
var HStack = (0, import_react76.forwardRef)(
|
|
7332
7344
|
({
|
|
7333
7345
|
id,
|
|
7334
7346
|
className,
|
|
@@ -7367,7 +7379,7 @@ var HStack = (0, import_react75.forwardRef)(
|
|
|
7367
7379
|
}
|
|
7368
7380
|
);
|
|
7369
7381
|
HStack.displayName = "HStack";
|
|
7370
|
-
var VStack = (0,
|
|
7382
|
+
var VStack = (0, import_react76.forwardRef)(
|
|
7371
7383
|
({
|
|
7372
7384
|
id,
|
|
7373
7385
|
className,
|
|
@@ -7411,7 +7423,7 @@ function spacingPropToCn(value) {
|
|
|
7411
7423
|
}
|
|
7412
7424
|
|
|
7413
7425
|
// src/components/TextArea/TextArea.tsx
|
|
7414
|
-
var
|
|
7426
|
+
var import_react77 = require("react");
|
|
7415
7427
|
|
|
7416
7428
|
// src/components/TextArea/TextArea.module.css
|
|
7417
7429
|
var TextArea_default = {
|
|
@@ -7421,7 +7433,7 @@ var TextArea_default = {
|
|
|
7421
7433
|
|
|
7422
7434
|
// src/components/TextArea/TextArea.tsx
|
|
7423
7435
|
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
7424
|
-
var TextArea = (0,
|
|
7436
|
+
var TextArea = (0, import_react77.forwardRef)(
|
|
7425
7437
|
(props, ref) => {
|
|
7426
7438
|
const {
|
|
7427
7439
|
id,
|
|
@@ -7442,14 +7454,14 @@ var TextArea = (0, import_react76.forwardRef)(
|
|
|
7442
7454
|
width,
|
|
7443
7455
|
...rest
|
|
7444
7456
|
} = props;
|
|
7445
|
-
const generatedId = (0,
|
|
7457
|
+
const generatedId = (0, import_react77.useId)();
|
|
7446
7458
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
7447
|
-
const textAreaRef = (0,
|
|
7459
|
+
const textAreaRef = (0, import_react77.useRef)(null);
|
|
7448
7460
|
const multiRef = useCombinedRef(ref, textAreaRef);
|
|
7449
|
-
const [text, setText] = (0,
|
|
7461
|
+
const [text, setText] = (0, import_react77.useState)(
|
|
7450
7462
|
getDefaultText(value, defaultValue)
|
|
7451
7463
|
);
|
|
7452
|
-
(0,
|
|
7464
|
+
(0, import_react77.useEffect)(() => {
|
|
7453
7465
|
if (textAreaRef == null ? void 0 : textAreaRef.current) {
|
|
7454
7466
|
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight + 2}px`;
|
|
7455
7467
|
}
|
|
@@ -7587,7 +7599,7 @@ var CommentComponent = ({
|
|
|
7587
7599
|
};
|
|
7588
7600
|
|
|
7589
7601
|
// src/components/Tooltip/Tooltip.tsx
|
|
7590
|
-
var
|
|
7602
|
+
var import_react78 = require("react");
|
|
7591
7603
|
|
|
7592
7604
|
// src/components/Tooltip/Tooltip.module.css
|
|
7593
7605
|
var Tooltip_default = {
|
|
@@ -7599,7 +7611,7 @@ var Tooltip_default = {
|
|
|
7599
7611
|
|
|
7600
7612
|
// src/components/Tooltip/Tooltip.tsx
|
|
7601
7613
|
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
7602
|
-
var Tooltip = (0,
|
|
7614
|
+
var Tooltip = (0, import_react78.forwardRef)(
|
|
7603
7615
|
(props, ref) => {
|
|
7604
7616
|
const {
|
|
7605
7617
|
text,
|
|
@@ -7615,21 +7627,21 @@ var Tooltip = (0, import_react77.forwardRef)(
|
|
|
7615
7627
|
htmlProps,
|
|
7616
7628
|
...rest
|
|
7617
7629
|
} = props;
|
|
7618
|
-
const generatedId = (0,
|
|
7630
|
+
const generatedId = (0, import_react78.useId)();
|
|
7619
7631
|
const uniqueTooltipId = tooltipId != null ? tooltipId : `${generatedId}-tooltip`;
|
|
7620
|
-
const [open, setOpen] = (0,
|
|
7621
|
-
const [inView, setInView] = (0,
|
|
7622
|
-
const [arrowElement, setArrowElement] = (0,
|
|
7632
|
+
const [open, setOpen] = (0, import_react78.useState)(false);
|
|
7633
|
+
const [inView, setInView] = (0, import_react78.useState)(false);
|
|
7634
|
+
const [arrowElement, setArrowElement] = (0, import_react78.useState)(null);
|
|
7623
7635
|
const { refs, styles: positionStyles } = useFloatPosition(arrowElement, {
|
|
7624
7636
|
placement
|
|
7625
7637
|
});
|
|
7626
|
-
const tooltipRef = (0,
|
|
7638
|
+
const tooltipRef = (0, import_react78.useRef)(null);
|
|
7627
7639
|
const combinedRef = useCombinedRef(ref, refs.setFloating, tooltipRef);
|
|
7628
7640
|
const closeWhenNotInView = (entries) => {
|
|
7629
7641
|
const [entry] = entries;
|
|
7630
7642
|
entry.isIntersecting ? setInView(true) : setInView(false);
|
|
7631
7643
|
};
|
|
7632
|
-
(0,
|
|
7644
|
+
(0, import_react78.useEffect)(() => {
|
|
7633
7645
|
const options = {
|
|
7634
7646
|
root: null,
|
|
7635
7647
|
rootMargin: "0px"
|
|
@@ -7641,7 +7653,7 @@ var Tooltip = (0, import_react77.forwardRef)(
|
|
|
7641
7653
|
if (ref2) observer.unobserve(ref2);
|
|
7642
7654
|
};
|
|
7643
7655
|
}, [tooltipRef]);
|
|
7644
|
-
(0,
|
|
7656
|
+
(0, import_react78.useEffect)(() => {
|
|
7645
7657
|
if (tooltipRef.current) {
|
|
7646
7658
|
window.addEventListener("scroll", () => {
|
|
7647
7659
|
closeTooltip();
|
|
@@ -7654,7 +7666,7 @@ var Tooltip = (0, import_react77.forwardRef)(
|
|
|
7654
7666
|
};
|
|
7655
7667
|
}, []);
|
|
7656
7668
|
let timer;
|
|
7657
|
-
(0,
|
|
7669
|
+
(0, import_react78.useEffect)(() => {
|
|
7658
7670
|
return () => {
|
|
7659
7671
|
clearTimeout(timer);
|
|
7660
7672
|
};
|
|
@@ -7673,8 +7685,8 @@ var Tooltip = (0, import_react77.forwardRef)(
|
|
|
7673
7685
|
}
|
|
7674
7686
|
};
|
|
7675
7687
|
const anchorProps = children.props;
|
|
7676
|
-
const anchorElement =
|
|
7677
|
-
(0,
|
|
7688
|
+
const anchorElement = import_react78.Children.only(
|
|
7689
|
+
(0, import_react78.isValidElement)(children) && (0, import_react78.cloneElement)(children, {
|
|
7678
7690
|
ref: refs.setReference,
|
|
7679
7691
|
onFocus: combineHandlers(openTooltip, anchorProps.onFocus),
|
|
7680
7692
|
onBlur: combineHandlers(closeTooltip, anchorProps.onBlur),
|
|
@@ -7808,16 +7820,16 @@ var Feedback = ({
|
|
|
7808
7820
|
onFeedbackTextChange,
|
|
7809
7821
|
onSubmit
|
|
7810
7822
|
}) => {
|
|
7811
|
-
const [rating, setRating] = (0,
|
|
7812
|
-
const [feedbackText, setFeedbackText] = (0,
|
|
7813
|
-
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0,
|
|
7814
|
-
(0,
|
|
7823
|
+
const [rating, setRating] = (0, import_react79.useState)(null);
|
|
7824
|
+
const [feedbackText, setFeedbackText] = (0, import_react79.useState)();
|
|
7825
|
+
const [isFeedbackSubmitted, setIsFeedbackSubmitted] = (0, import_react79.useState)(false);
|
|
7826
|
+
(0, import_react79.useEffect)(() => {
|
|
7815
7827
|
ratingProp !== void 0 && setRating(ratingProp);
|
|
7816
7828
|
}, [ratingProp]);
|
|
7817
|
-
(0,
|
|
7829
|
+
(0, import_react79.useEffect)(() => {
|
|
7818
7830
|
feedbackTextProp !== void 0 && setFeedbackText(feedbackTextProp);
|
|
7819
7831
|
}, [feedbackTextProp]);
|
|
7820
|
-
(0,
|
|
7832
|
+
(0, import_react79.useEffect)(() => {
|
|
7821
7833
|
isSubmittedProp !== void 0 && setIsFeedbackSubmitted(isSubmittedProp);
|
|
7822
7834
|
}, [isSubmittedProp]);
|
|
7823
7835
|
const handleRatingChange = (newRating) => {
|
|
@@ -7866,7 +7878,7 @@ var Feedback = ({
|
|
|
7866
7878
|
};
|
|
7867
7879
|
|
|
7868
7880
|
// src/components/Fieldset/Fieldset.tsx
|
|
7869
|
-
var
|
|
7881
|
+
var import_react80 = require("react");
|
|
7870
7882
|
|
|
7871
7883
|
// src/components/Fieldset/Fieldset.module.css
|
|
7872
7884
|
var Fieldset_default = {
|
|
@@ -7875,7 +7887,7 @@ var Fieldset_default = {
|
|
|
7875
7887
|
|
|
7876
7888
|
// src/components/Fieldset/Fieldset.tsx
|
|
7877
7889
|
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
7878
|
-
var Fieldset = (0,
|
|
7890
|
+
var Fieldset = (0, import_react80.forwardRef)(
|
|
7879
7891
|
(props, ref) => {
|
|
7880
7892
|
const { id, className, htmlProps, ...rest } = props;
|
|
7881
7893
|
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
@@ -7894,7 +7906,7 @@ var Fieldset = (0, import_react79.forwardRef)(
|
|
|
7894
7906
|
);
|
|
7895
7907
|
|
|
7896
7908
|
// src/components/FileUploader/FileUploader.tsx
|
|
7897
|
-
var
|
|
7909
|
+
var import_react82 = require("react");
|
|
7898
7910
|
|
|
7899
7911
|
// src/components/FileUploader/ErrorList.tsx
|
|
7900
7912
|
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
@@ -7989,7 +8001,7 @@ var File = (props) => {
|
|
|
7989
8001
|
|
|
7990
8002
|
// src/components/FileUploader/useFileUploader.ts
|
|
7991
8003
|
var import_file_selector = require("file-selector");
|
|
7992
|
-
var
|
|
8004
|
+
var import_react81 = require("react");
|
|
7993
8005
|
|
|
7994
8006
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
7995
8007
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -8088,18 +8100,18 @@ var useFileUploader = (props) => {
|
|
|
8088
8100
|
disabled,
|
|
8089
8101
|
errorMessage
|
|
8090
8102
|
} = props;
|
|
8091
|
-
const rootRef = (0,
|
|
8092
|
-
const inputRef = (0,
|
|
8093
|
-
const buttonRef = (0,
|
|
8103
|
+
const rootRef = (0, import_react81.useRef)(null);
|
|
8104
|
+
const inputRef = (0, import_react81.useRef)(null);
|
|
8105
|
+
const buttonRef = (0, import_react81.useRef)(null);
|
|
8094
8106
|
const isControlled = !!value;
|
|
8095
|
-
const initialFileUploaderFiles = (0,
|
|
8107
|
+
const initialFileUploaderFiles = (0, import_react81.useMemo)(
|
|
8096
8108
|
() => (initialFiles != null ? initialFiles : []).map((f2) => ({
|
|
8097
8109
|
file: f2,
|
|
8098
8110
|
errors: []
|
|
8099
8111
|
})),
|
|
8100
8112
|
[initialFiles]
|
|
8101
8113
|
);
|
|
8102
|
-
const [state, dispatch] = (0,
|
|
8114
|
+
const [state, dispatch] = (0, import_react81.useReducer)(fileUploaderReducer, {
|
|
8103
8115
|
files: initialFileUploaderFiles,
|
|
8104
8116
|
isFocused: false,
|
|
8105
8117
|
isFileDialogActive: false,
|
|
@@ -8111,7 +8123,7 @@ var useFileUploader = (props) => {
|
|
|
8111
8123
|
)
|
|
8112
8124
|
});
|
|
8113
8125
|
const { files: stateFiles } = state;
|
|
8114
|
-
(0,
|
|
8126
|
+
(0, import_react81.useEffect)(() => {
|
|
8115
8127
|
if (isControlled) {
|
|
8116
8128
|
const files = value.map((file) => {
|
|
8117
8129
|
const accepted = isFileAccepted(file, accept);
|
|
@@ -8126,18 +8138,18 @@ var useFileUploader = (props) => {
|
|
|
8126
8138
|
});
|
|
8127
8139
|
}
|
|
8128
8140
|
}, [value, isControlled, accept, dispatch]);
|
|
8129
|
-
(0,
|
|
8141
|
+
(0, import_react81.useEffect)(() => {
|
|
8130
8142
|
dispatch({
|
|
8131
8143
|
type: "setRootErrors",
|
|
8132
8144
|
payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
|
|
8133
8145
|
});
|
|
8134
8146
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
8135
|
-
const onRootFocus = (0,
|
|
8147
|
+
const onRootFocus = (0, import_react81.useCallback)(
|
|
8136
8148
|
() => dispatch({ type: "focus" }),
|
|
8137
8149
|
[dispatch]
|
|
8138
8150
|
);
|
|
8139
|
-
const onRootBlur = (0,
|
|
8140
|
-
const onRootDragEnter = (0,
|
|
8151
|
+
const onRootBlur = (0, import_react81.useCallback)(() => dispatch({ type: "blur" }), [dispatch]);
|
|
8152
|
+
const onRootDragEnter = (0, import_react81.useCallback)(
|
|
8141
8153
|
async (evt) => {
|
|
8142
8154
|
preventDefaults(evt);
|
|
8143
8155
|
if (isEventWithFiles(evt)) {
|
|
@@ -8149,7 +8161,7 @@ var useFileUploader = (props) => {
|
|
|
8149
8161
|
},
|
|
8150
8162
|
[dispatch, accept, maxFiles]
|
|
8151
8163
|
);
|
|
8152
|
-
const onRootDragOver = (0,
|
|
8164
|
+
const onRootDragOver = (0, import_react81.useCallback)((evt) => {
|
|
8153
8165
|
preventDefaults(evt);
|
|
8154
8166
|
const hasFiles = isEventWithFiles(evt);
|
|
8155
8167
|
if (hasFiles && evt.dataTransfer) {
|
|
@@ -8159,7 +8171,7 @@ var useFileUploader = (props) => {
|
|
|
8159
8171
|
}
|
|
8160
8172
|
}
|
|
8161
8173
|
}, []);
|
|
8162
|
-
const onRootDragLeave = (0,
|
|
8174
|
+
const onRootDragLeave = (0, import_react81.useCallback)(
|
|
8163
8175
|
(evt) => {
|
|
8164
8176
|
preventDefaults(evt);
|
|
8165
8177
|
if (evt.currentTarget.contains(evt.relatedTarget)) return;
|
|
@@ -8167,7 +8179,7 @@ var useFileUploader = (props) => {
|
|
|
8167
8179
|
},
|
|
8168
8180
|
[dispatch]
|
|
8169
8181
|
);
|
|
8170
|
-
const setFiles = (0,
|
|
8182
|
+
const setFiles = (0, import_react81.useCallback)(
|
|
8171
8183
|
async (evt) => {
|
|
8172
8184
|
evt.preventDefault();
|
|
8173
8185
|
if (isEventWithFiles(evt)) {
|
|
@@ -8201,13 +8213,13 @@ var useFileUploader = (props) => {
|
|
|
8201
8213
|
dispatch
|
|
8202
8214
|
]
|
|
8203
8215
|
);
|
|
8204
|
-
const openFileDialog = (0,
|
|
8216
|
+
const openFileDialog = (0, import_react81.useCallback)(() => {
|
|
8205
8217
|
if (inputRef.current) {
|
|
8206
8218
|
inputRef.current.value = "";
|
|
8207
8219
|
inputRef.current.click();
|
|
8208
8220
|
}
|
|
8209
8221
|
}, [inputRef]);
|
|
8210
|
-
const removeFile = (0,
|
|
8222
|
+
const removeFile = (0, import_react81.useCallback)(
|
|
8211
8223
|
(file) => {
|
|
8212
8224
|
const newFiles = [...stateFiles];
|
|
8213
8225
|
newFiles.splice(stateFiles.indexOf(file), 1);
|
|
@@ -8221,7 +8233,7 @@ var useFileUploader = (props) => {
|
|
|
8221
8233
|
},
|
|
8222
8234
|
[stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
|
|
8223
8235
|
);
|
|
8224
|
-
const getRootProps = (0,
|
|
8236
|
+
const getRootProps = (0, import_react81.useCallback)(
|
|
8225
8237
|
() => ({
|
|
8226
8238
|
onBlur: onRootBlur,
|
|
8227
8239
|
onFocus: onRootFocus,
|
|
@@ -8243,14 +8255,14 @@ var useFileUploader = (props) => {
|
|
|
8243
8255
|
disabled
|
|
8244
8256
|
]
|
|
8245
8257
|
);
|
|
8246
|
-
const getButtonProps = (0,
|
|
8258
|
+
const getButtonProps = (0, import_react81.useCallback)(
|
|
8247
8259
|
() => ({
|
|
8248
8260
|
onClick: openFileDialog,
|
|
8249
8261
|
ref: buttonRef
|
|
8250
8262
|
}),
|
|
8251
8263
|
[openFileDialog, buttonRef]
|
|
8252
8264
|
);
|
|
8253
|
-
const getInputProps = (0,
|
|
8265
|
+
const getInputProps = (0, import_react81.useCallback)(
|
|
8254
8266
|
() => ({
|
|
8255
8267
|
type: "file",
|
|
8256
8268
|
style: { display: "none" },
|
|
@@ -8308,7 +8320,7 @@ var FileUploader = (props) => {
|
|
|
8308
8320
|
className,
|
|
8309
8321
|
...rest
|
|
8310
8322
|
} = props;
|
|
8311
|
-
const generatedId = (0,
|
|
8323
|
+
const generatedId = (0, import_react82.useId)();
|
|
8312
8324
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
8313
8325
|
const {
|
|
8314
8326
|
state: { files: stateFiles, isDragActive, rootErrors },
|
|
@@ -8419,7 +8431,7 @@ var FileUploader = (props) => {
|
|
|
8419
8431
|
FileUploader.displayName = "FileUploader";
|
|
8420
8432
|
|
|
8421
8433
|
// src/components/Footer/Footer.tsx
|
|
8422
|
-
var
|
|
8434
|
+
var import_react83 = require("react");
|
|
8423
8435
|
|
|
8424
8436
|
// src/components/Footer/Footer.module.css
|
|
8425
8437
|
var Footer_default = {
|
|
@@ -8436,7 +8448,7 @@ var Footer_default = {
|
|
|
8436
8448
|
|
|
8437
8449
|
// src/components/Footer/Footer.tsx
|
|
8438
8450
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
8439
|
-
var Footer = (0,
|
|
8451
|
+
var Footer = (0, import_react83.forwardRef)((props, ref) => {
|
|
8440
8452
|
const { className, ...rest } = props;
|
|
8441
8453
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
8442
8454
|
Contrast,
|
|
@@ -8450,21 +8462,21 @@ var Footer = (0, import_react82.forwardRef)((props, ref) => {
|
|
|
8450
8462
|
});
|
|
8451
8463
|
|
|
8452
8464
|
// src/components/Footer/FooterListHeader.tsx
|
|
8453
|
-
var
|
|
8465
|
+
var import_react84 = require("react");
|
|
8454
8466
|
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
8455
|
-
var FooterListHeader = (0,
|
|
8467
|
+
var FooterListHeader = (0, import_react84.forwardRef)((props, ref) => {
|
|
8456
8468
|
return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Heading, { level: 2, typographyType: "headingSans02", ref, ...props });
|
|
8457
8469
|
});
|
|
8458
8470
|
|
|
8459
8471
|
// src/components/Footer/FooterLogo.tsx
|
|
8460
|
-
var
|
|
8472
|
+
var import_react85 = require("react");
|
|
8461
8473
|
|
|
8462
8474
|
// src/components/Footer/norges_domstoler_logo.svg
|
|
8463
8475
|
var norges_domstoler_logo_default = 'data:image/svg+xml,<svg width="151" height="80" viewBox="0 0 151 80" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<g id="Logo" clip-path="url(%23clip0_18254_1882)">%0A<path id="Vector" d="M0 19.5721V0.38501H3.50998L9.51314 13.2128C10.169 14.6541 10.6734 16.1596 11.0182 17.7051H11.1848C10.9502 16.2655 10.8311 14.8093 10.8287 13.3507V0.38501H13.0174V19.5721H9.51314L3.50998 6.77306C2.84978 5.3389 2.34334 3.83883 1.99914 2.29798H1.83829C2.07013 3.73991 2.18921 5.19772 2.19446 6.65817V19.5721H0Z" fill="white"/>%0A<path id="Vector_2" d="M19.2848 17.4063C17.9942 15.7059 17.3489 13.2299 17.3489 9.97846C17.3489 6.72699 17.9942 4.25104 19.2848 2.55062C20.5716 0.850208 22.4118 0 24.8054 0C27.199 0 29.0488 0.844463 30.3548 2.53339C31.6416 4.25679 32.2907 6.70401 32.2907 10.0014C32.2907 13.2989 31.6416 15.7461 30.3548 17.4695C29.068 19.1929 27.2182 20.0029 24.8054 20.0029C22.3927 20.0029 20.5716 19.101 19.2848 17.4063ZM21.3357 4.05572C20.6003 5.31955 20.2308 7.29379 20.2269 9.97846C20.2231 12.6631 20.5927 14.6355 21.3357 15.8954C21.6776 16.4998 22.1813 16.9969 22.7902 17.3307C23.3991 17.6646 24.089 17.8221 24.7825 17.7854C25.4832 17.8288 26.182 17.6747 26.7994 17.3406C27.4169 17.0064 27.9282 16.5058 28.2752 15.8954C29.0143 14.6355 29.3858 12.6631 29.3897 9.97846C29.3935 7.29379 29.0297 5.31955 28.2982 4.05572C27.9502 3.44633 27.4387 2.9464 26.8215 2.61242C26.2042 2.27844 25.5059 2.12372 24.8054 2.16573C24.1083 2.12541 23.4138 2.28107 22.8006 2.6151C22.1874 2.94912 21.6799 3.44817 21.3357 4.05572Z" fill="white"/>%0A<path id="Vector_3" d="M48.594 15.5968C48.8111 16.9446 49.1318 18.2737 49.5534 19.5721H46.5317C46.4288 19.2619 46.3463 18.9453 46.2847 18.6243C46.21 18.2681 46.1238 17.7856 46.0376 17.1709C45.9515 16.5562 45.8825 16.1254 45.8423 15.8668C45.5513 13.9903 45.1415 12.7207 44.613 12.0581C44.0845 11.3956 43.2151 11.0681 42.0049 11.0758H39.1326V19.5721H36.4556V0.38501H43.0045C44.7968 0.38501 46.1813 0.815859 47.1693 1.6833C47.6677 2.13766 48.0592 2.69689 48.3154 3.32072C48.5717 3.94454 48.6865 4.61743 48.6515 5.29094C48.6898 5.93617 48.5867 6.58197 48.3496 7.18326C48.1125 7.78455 47.7469 8.32682 47.2785 8.7722C46.2192 9.64565 44.8691 10.0868 43.4985 10.0073H42.7287V10.1681L43.5272 10.1969C44.1017 10.2313 44.4866 10.2658 44.7566 10.2945C45.102 10.3329 45.4427 10.4061 45.7734 10.5128C46.1234 10.601 46.4442 10.7792 46.704 11.0298C46.968 11.3147 47.2064 11.6223 47.4164 11.949C47.7076 12.4082 47.9301 12.9075 48.077 13.4311C48.2551 14.0343 48.4332 14.7581 48.594 15.5968ZM39.167 9.09964H42.43C42.8862 9.13106 43.3441 9.06822 43.775 8.91503C44.2059 8.76184 44.6006 8.52159 44.9347 8.20922C45.241 7.86617 45.4755 7.4653 45.6245 7.03021C45.7734 6.59512 45.8338 6.13462 45.8021 5.67583C45.8021 3.48138 44.6781 2.38415 42.43 2.38415H39.167V9.09964Z" fill="white"/>%0A<path id="Vector_4" d="M63.8634 6.27892C63.8374 5.16647 63.448 4.0931 62.7547 3.22277C62.4351 2.8708 62.0419 2.59361 61.6031 2.41091C61.1642 2.22821 60.6904 2.14451 60.2155 2.16575C59.518 2.12433 58.8231 2.28288 58.2125 2.62276C57.6019 2.96264 57.1011 3.46974 56.7688 4.08447C56.0334 5.36744 55.6658 7.33211 55.6658 9.97848C55.6658 12.6248 56.0315 14.5933 56.763 15.884C57.0847 16.4915 57.5726 16.995 58.1697 17.3358C58.7668 17.6765 59.4484 17.8404 60.1351 17.8084C62.8581 17.8084 64.2196 15.974 64.2196 12.3051V11.6214H59.9168V9.64529H66.7415V19.572H64.5757V17.6246C64.5824 16.3521 64.6552 15.0808 64.794 13.8159H64.6274C64.4283 15.9338 63.9132 17.4867 63.0821 18.4748C62.2491 19.4629 61.0198 19.9512 59.3941 19.9512C58.4312 19.9882 57.4753 19.7741 56.6202 19.3299C55.7651 18.8857 55.0403 18.2268 54.5169 17.4178C53.3679 15.7289 52.7935 13.2759 52.7935 10.0589C52.7935 6.77296 53.4292 4.28361 54.7007 2.59086C55.9722 0.898101 57.8009 0.0344883 60.1868 2.04411e-05C61.7689 -0.0690547 63.3242 0.425623 64.5757 1.39597C65.1677 1.92295 65.6473 2.56392 65.9859 3.28052C66.3244 3.99712 66.515 4.77464 66.5461 5.56659L63.8634 6.27892Z" fill="white"/>%0A<path id="Vector_5" d="M74.824 17.5673H82.8034V19.5721H72.1125V0.38501H82.6368V2.38415H74.824V8.66305H82.0048V10.6622H74.824V17.5673Z" fill="white"/>%0A<path id="Vector_6" d="M93.0633 19.9512C90.9953 19.9512 89.3695 19.4342 88.1804 18.3887C87.5786 17.8382 87.1032 17.164 86.7869 16.4123C86.4705 15.6606 86.3207 14.8493 86.3478 14.0342L89.0421 13.2645C89.1876 16.3283 90.5491 17.8602 93.1265 17.8602C94.0518 17.9146 94.9669 17.6422 95.7116 17.0904C96.0388 16.8086 96.2951 16.4538 96.4598 16.0546C96.6245 15.6554 96.6929 15.2231 96.6595 14.7925C96.6595 13.3334 95.838 12.284 94.195 11.6445L91.0699 10.3806C88.4159 9.32362 87.0908 7.55236 87.0947 5.06684C87.054 4.35555 87.1815 3.64468 87.467 2.99192C87.7524 2.33915 88.1878 1.76287 88.7376 1.30984C90.0484 0.449859 91.5818 -0.00830078 93.1495 -0.00830078C94.7172 -0.00830078 96.2507 0.449859 97.5614 1.30984C98.139 1.77201 98.6034 2.36008 98.919 3.02914C99.2346 3.6982 99.3931 4.43055 99.3825 5.17024L96.7801 5.9113C96.6155 3.36451 95.4014 2.09302 93.138 2.09685C92.2848 2.02806 91.4347 2.26195 90.7368 2.75749C90.4435 3.00371 90.2126 3.31574 90.0629 3.66814C89.9131 4.02055 89.8488 4.40335 89.8751 4.78535C89.835 5.48253 90.0539 6.16994 90.4897 6.71555C91.0398 7.27423 91.7096 7.70051 92.4487 7.96214L95.3612 9.15703C98.042 10.2294 99.3825 12.0006 99.3825 14.4708C99.4281 15.2308 99.2996 15.9911 99.0069 16.694C98.7143 17.3968 98.2651 18.0236 97.6935 18.5266C96.602 19.4802 95.051 19.9512 93.0633 19.9512Z" fill="white"/>%0A<path id="Vector_7" d="M5.2104 35.4617C7.95251 35.4617 9.98037 36.308 11.294 38.0008C12.6076 39.6936 13.2644 42.045 13.2644 45.0552C13.2644 48.0884 12.6076 50.4456 11.294 52.1269C9.98037 53.8082 7.95251 54.6488 5.2104 54.6488H0V35.4617H5.2104ZM4.96338 52.6497C6.97401 52.6497 8.3757 52.0063 9.17995 50.7195C9.9842 49.4327 10.3863 47.5427 10.3863 45.0552C10.3863 42.5678 9.9842 40.6836 9.17995 39.3968C8.3757 38.11 6.97401 37.4666 4.96338 37.4666H2.71148V52.6497H4.96338Z" fill="white"/>%0A<path id="Vector_8" d="M18.5954 52.4831C17.3047 50.7903 16.6594 48.3144 16.6594 45.0552C16.6594 41.7961 17.3047 39.3202 18.5954 37.6274C19.8898 35.9308 21.732 35.0825 24.1217 35.0825C26.5115 35.0825 28.3613 35.927 29.6711 37.6159C30.954 39.3048 31.5955 41.7846 31.5955 45.0552C31.5955 48.3259 30.9521 50.8152 29.6653 52.5233C28.3823 54.1969 26.5364 55.0337 24.1275 55.0337C21.7185 55.0337 19.8745 54.1835 18.5954 52.4831ZM20.6807 39.1382C19.9147 40.3944 19.5317 42.3667 19.5317 45.0552C19.5317 47.7437 19.9147 49.718 20.6807 50.978C21.0254 51.5787 21.5302 52.0719 22.1388 52.4025C22.7474 52.7332 23.4359 52.8884 24.1275 52.8507C24.8279 52.8921 25.5259 52.7371 26.143 52.4031C26.7601 52.0692 27.2717 51.5697 27.6202 50.9607C28.3555 49.7084 28.7232 47.7399 28.7232 45.0552C28.7232 42.3706 28.3536 40.3982 27.6145 39.1382C27.2674 38.5293 26.7569 38.0296 26.1407 37.6956C25.5245 37.3616 24.8271 37.2067 24.1275 37.2483C23.434 37.2116 22.7441 37.3691 22.1352 37.703C21.5264 38.0368 21.0226 38.5339 20.6807 39.1382Z" fill="white"/>%0A<path id="Vector_9" d="M35.7661 54.6488V35.4617H39.7414L42.8148 46.1237C43.5024 48.2936 43.9079 50.5429 44.0212 52.8163H44.2337C44.2993 50.5424 44.6861 48.2893 45.3827 46.1237L48.5939 35.4617H52.2762V54.6488H49.6911V43.7684C49.6911 41.5223 49.7773 39.414 49.9382 37.4493H49.7486C49.4555 39.2625 49.0527 41.0562 48.5422 42.8206L45.0954 54.6603H42.6827L39.121 42.5965C38.6304 40.9144 38.2467 39.2029 37.9721 37.4723H37.7767C37.9261 39.2417 38.0008 41.2638 38.0008 43.5272V54.6488H35.7661Z" fill="white"/>%0A<path id="Vector_10" d="M63.2314 55.0338C61.171 55.0338 59.5452 54.513 58.3542 53.4713C57.7505 52.9221 57.2734 52.2482 56.9559 51.4963C56.6385 50.7444 56.4884 49.9325 56.5159 49.1168L59.1699 48.3471C59.3155 51.4109 60.6769 52.9428 63.2544 52.9428C64.1809 52.9928 65.0963 52.7208 65.8452 52.173C66.1703 51.8898 66.4248 51.5346 66.5883 51.1356C66.7519 50.7367 66.82 50.3051 66.7873 49.8751C66.7873 48.416 65.9659 47.3647 64.3229 46.7213L61.1978 45.4632C58.5476 44.3986 57.2225 42.6254 57.2225 40.1437C57.1827 39.4334 57.3107 38.7236 57.5962 38.0719C57.8816 37.4202 58.3164 36.8449 58.8655 36.3924C60.1497 35.4549 61.7185 34.9902 63.3061 35.0769C64.8757 35.0068 66.4227 35.4705 67.695 36.3924C68.2714 36.8566 68.7344 37.4461 69.0489 38.116C69.3635 38.7859 69.5213 39.5186 69.5103 40.2586L66.9022 40.9997C66.7414 38.4605 65.5273 37.1909 63.2601 37.1909C62.4071 37.1241 61.5576 37.3578 60.8589 37.8516C60.5656 38.0978 60.3347 38.4098 60.185 38.7622C60.0352 39.1146 59.9709 39.4974 59.9972 39.8794C59.9571 40.5766 60.176 41.264 60.6118 41.8096C61.1632 42.3762 61.8346 42.812 62.5765 43.085L65.535 44.2339C68.2158 45.3139 69.5563 47.0871 69.5563 49.5534C69.6008 50.3128 69.4725 51.0723 69.181 51.7748C68.8894 52.4773 68.4422 53.1045 67.8731 53.6092C66.7529 54.5743 65.2076 55.0338 63.2314 55.0338Z" fill="white"/>%0A<path id="Vector_11" d="M85.8997 35.4617V37.6274H80.6376V54.6488H77.9491V37.6274H72.687V35.4617H85.8997Z" fill="white"/>%0A<path id="Vector_12" d="M90.4092 52.4831C89.1148 50.7903 88.4675 48.3144 88.4675 45.0552C88.4675 41.7961 89.1128 39.3202 90.4035 37.6274C91.6903 35.9308 93.5305 35.0825 95.9241 35.0825C98.3177 35.0825 100.167 35.927 101.473 37.6159C102.76 39.3048 103.404 41.7942 103.404 45.084C103.404 48.3737 102.76 50.8631 101.473 52.552C100.19 54.2065 98.3445 55.0337 95.9356 55.0337C93.5267 55.0337 91.6845 54.1835 90.4092 52.4831ZM92.4888 39.1382C91.7228 40.3944 91.3399 42.3667 91.3399 45.0552C91.3399 47.7437 91.7228 49.718 92.4888 50.978C92.866 51.5576 93.382 52.034 93.9899 52.3637C94.5978 52.6934 95.2785 52.8661 95.97 52.8661C96.6616 52.8661 97.3423 52.6934 97.9502 52.3637C98.5581 52.034 99.0741 51.5576 99.4513 50.978C100.171 49.7141 100.531 47.7399 100.531 45.0552C100.531 42.3706 100.162 40.3982 99.4226 39.1382C99.0454 38.5586 98.5294 38.0823 97.9215 37.7525C97.3136 37.4228 96.6329 37.2501 95.9413 37.2501C95.2497 37.2501 94.5691 37.4228 93.9612 37.7525C93.3532 38.0823 92.8373 38.5586 92.4601 39.1382H92.4888Z" fill="white"/>%0A<path id="Vector_13" d="M107.58 35.4617H110.297V52.4831H117.915V54.6488H107.574L107.58 35.4617Z" fill="white"/>%0A<path id="Vector_14" d="M124.544 52.6497H132.518V54.6488H121.833V35.4617H132.357V37.4666H124.544V43.7397H131.725V45.7446H124.544V52.6497Z" fill="white"/>%0A<path id="Vector_15" d="M149.321 50.6735C149.534 52.022 149.855 53.3513 150.28 54.6488H147.264C147.163 54.3399 147.081 54.0253 147.017 53.7067C146.942 53.3505 146.862 52.8622 146.77 52.2533C146.678 51.6444 146.615 51.2078 146.581 50.9493C146.289 49.0688 145.878 47.7993 145.345 47.1405C144.817 46.4857 143.949 46.1525 142.743 46.1525H139.871V54.6488H137.154V35.4617H143.731C145.52 35.4617 146.908 35.8963 147.896 36.7657C148.392 37.2209 148.781 37.7807 149.034 38.4047C149.288 39.0286 149.399 39.701 149.361 40.3733C149.394 41.0129 149.289 41.6521 149.052 42.247C148.815 42.8419 148.452 43.3786 147.988 43.8201C146.93 44.6951 145.579 45.1365 144.208 45.0552H143.438V45.2218H144.231C144.805 45.2563 145.19 45.285 145.466 45.3137C145.811 45.3579 146.151 45.4309 146.483 45.532C146.833 45.6236 147.153 45.8036 147.413 46.0548C147.676 46.3411 147.914 46.6485 148.126 46.9739C148.422 47.451 148.645 47.97 148.786 48.5135C148.982 49.1167 149.154 49.8348 149.321 50.6735ZM139.894 44.1821H143.151C143.608 44.2136 144.067 44.1508 144.499 43.9976C144.931 43.8445 145.326 43.6042 145.661 43.2916C146.273 42.5923 146.583 41.6795 146.523 40.7525C146.523 38.5638 145.403 37.4666 143.151 37.4666H139.894V44.1821Z" fill="white"/>%0A<path id="Vector_16" d="M150.389 75.0137H0V80H150.389V75.0137Z" fill="white"/>%0A</g>%0A<defs>%0A<clipPath id="clip0_18254_1882">%0A<rect width="150.389" height="80" fill="white"/>%0A</clipPath>%0A</defs>%0A</svg>%0A';
|
|
8464
8476
|
|
|
8465
8477
|
// src/components/Footer/FooterLogo.tsx
|
|
8466
8478
|
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
8467
|
-
var FooterLogo = (0,
|
|
8479
|
+
var FooterLogo = (0, import_react85.forwardRef)(
|
|
8468
8480
|
(props, ref) => {
|
|
8469
8481
|
const { className, hideBreakpoint, ...rest } = props;
|
|
8470
8482
|
return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
@@ -8486,9 +8498,9 @@ var FooterLogo = (0, import_react84.forwardRef)(
|
|
|
8486
8498
|
);
|
|
8487
8499
|
|
|
8488
8500
|
// src/components/Footer/FooterList.tsx
|
|
8489
|
-
var
|
|
8501
|
+
var import_react86 = require("react");
|
|
8490
8502
|
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
8491
|
-
var FooterList = (0,
|
|
8503
|
+
var FooterList = (0, import_react86.forwardRef)(
|
|
8492
8504
|
(props, ref) => {
|
|
8493
8505
|
const { className, ...rest } = props;
|
|
8494
8506
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
@@ -8507,9 +8519,9 @@ var FooterList = (0, import_react85.forwardRef)(
|
|
|
8507
8519
|
);
|
|
8508
8520
|
|
|
8509
8521
|
// src/components/Footer/FooterSocialsList.tsx
|
|
8510
|
-
var
|
|
8522
|
+
var import_react87 = require("react");
|
|
8511
8523
|
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
8512
|
-
var FooterSocialsList = (0,
|
|
8524
|
+
var FooterSocialsList = (0, import_react87.forwardRef)((props, ref) => {
|
|
8513
8525
|
const { className, ...rest } = props;
|
|
8514
8526
|
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
8515
8527
|
"ul",
|
|
@@ -8526,9 +8538,9 @@ var FooterSocialsList = (0, import_react86.forwardRef)((props, ref) => {
|
|
|
8526
8538
|
});
|
|
8527
8539
|
|
|
8528
8540
|
// src/components/Footer/FooterSocialsGroup.tsx
|
|
8529
|
-
var
|
|
8541
|
+
var import_react88 = require("react");
|
|
8530
8542
|
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
8531
|
-
var FooterSocialsGroup = (0,
|
|
8543
|
+
var FooterSocialsGroup = (0, import_react88.forwardRef)((props, ref) => {
|
|
8532
8544
|
const { className, ...rest } = props;
|
|
8533
8545
|
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
8534
8546
|
"div",
|
|
@@ -8541,9 +8553,9 @@ var FooterSocialsGroup = (0, import_react87.forwardRef)((props, ref) => {
|
|
|
8541
8553
|
});
|
|
8542
8554
|
|
|
8543
8555
|
// src/components/Footer/FooterListGroup.tsx
|
|
8544
|
-
var
|
|
8556
|
+
var import_react89 = require("react");
|
|
8545
8557
|
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
8546
|
-
var FooterListGroup = (0,
|
|
8558
|
+
var FooterListGroup = (0, import_react89.forwardRef)(
|
|
8547
8559
|
(props, ref) => {
|
|
8548
8560
|
const { className, ...rest } = props;
|
|
8549
8561
|
return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
@@ -8558,9 +8570,9 @@ var FooterListGroup = (0, import_react88.forwardRef)(
|
|
|
8558
8570
|
);
|
|
8559
8571
|
|
|
8560
8572
|
// src/components/Footer/FooterLeft.tsx
|
|
8561
|
-
var
|
|
8573
|
+
var import_react90 = require("react");
|
|
8562
8574
|
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
8563
|
-
var FooterLeft = (0,
|
|
8575
|
+
var FooterLeft = (0, import_react90.forwardRef)(
|
|
8564
8576
|
(props, ref) => {
|
|
8565
8577
|
const { className, ...rest } = props;
|
|
8566
8578
|
return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)("div", { ref, className: cn(className, Footer_default["left"]), ...rest });
|
|
@@ -8568,7 +8580,7 @@ var FooterLeft = (0, import_react89.forwardRef)(
|
|
|
8568
8580
|
);
|
|
8569
8581
|
|
|
8570
8582
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8571
|
-
var
|
|
8583
|
+
var import_react91 = require("react");
|
|
8572
8584
|
|
|
8573
8585
|
// src/components/GlobalMessage/GlobalMessage.module.css
|
|
8574
8586
|
var GlobalMessage_default = {
|
|
@@ -8588,7 +8600,7 @@ var icons = {
|
|
|
8588
8600
|
danger: ErrorIcon,
|
|
8589
8601
|
warning: WarningIcon
|
|
8590
8602
|
};
|
|
8591
|
-
var GlobalMessage = (0,
|
|
8603
|
+
var GlobalMessage = (0, import_react91.forwardRef)(
|
|
8592
8604
|
(props, ref) => {
|
|
8593
8605
|
const {
|
|
8594
8606
|
message,
|
|
@@ -8601,7 +8613,7 @@ var GlobalMessage = (0, import_react90.forwardRef)(
|
|
|
8601
8613
|
htmlProps,
|
|
8602
8614
|
...rest
|
|
8603
8615
|
} = props;
|
|
8604
|
-
const [isClosed, setClosed] = (0,
|
|
8616
|
+
const [isClosed, setClosed] = (0, import_react91.useState)(false);
|
|
8605
8617
|
return !isClosed ? /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
8606
8618
|
"div",
|
|
8607
8619
|
{
|
|
@@ -8795,7 +8807,7 @@ var GridChild = (props) => {
|
|
|
8795
8807
|
GridChild.displayName = "GridChild";
|
|
8796
8808
|
|
|
8797
8809
|
// src/components/InlineButton/InlineButton.tsx
|
|
8798
|
-
var
|
|
8810
|
+
var import_react92 = require("react");
|
|
8799
8811
|
|
|
8800
8812
|
// src/components/InlineButton/InlineButton.module.css
|
|
8801
8813
|
var InlineButton_default = {
|
|
@@ -8804,7 +8816,7 @@ var InlineButton_default = {
|
|
|
8804
8816
|
|
|
8805
8817
|
// src/components/InlineButton/InlineButton.tsx
|
|
8806
8818
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
8807
|
-
var InlineButton = (0,
|
|
8819
|
+
var InlineButton = (0, import_react92.forwardRef)(
|
|
8808
8820
|
(props, ref) => {
|
|
8809
8821
|
const { className, ...rest } = props;
|
|
8810
8822
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
@@ -8826,10 +8838,10 @@ var InlineButton = (0, import_react91.forwardRef)(
|
|
|
8826
8838
|
);
|
|
8827
8839
|
|
|
8828
8840
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
8829
|
-
var
|
|
8841
|
+
var import_react95 = require("react");
|
|
8830
8842
|
|
|
8831
8843
|
// src/components/InlineEdit/InlineEdit.tsx
|
|
8832
|
-
var
|
|
8844
|
+
var import_react93 = require("react");
|
|
8833
8845
|
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
8834
8846
|
var InlineEdit = (props) => {
|
|
8835
8847
|
const {
|
|
@@ -8842,8 +8854,8 @@ var InlineEdit = (props) => {
|
|
|
8842
8854
|
inputRef,
|
|
8843
8855
|
children
|
|
8844
8856
|
} = props;
|
|
8845
|
-
const [editingValue, setEditingValue] = (0,
|
|
8846
|
-
const [isEditing, setIsEditing] = (0,
|
|
8857
|
+
const [editingValue, setEditingValue] = (0, import_react93.useState)(value != null ? value : "");
|
|
8858
|
+
const [isEditing, setIsEditing] = (0, import_react93.useState)(false);
|
|
8847
8859
|
const onChangeHandler = (e) => {
|
|
8848
8860
|
setEditingValue(e.target.value);
|
|
8849
8861
|
onChange && onChange();
|
|
@@ -8870,8 +8882,8 @@ var InlineEdit = (props) => {
|
|
|
8870
8882
|
useOnKeyDown(["Enter"], () => onExitHandler());
|
|
8871
8883
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
8872
8884
|
useOnClickOutside(inputRef.current, () => onExitHandler());
|
|
8873
|
-
const inputChild =
|
|
8874
|
-
(0,
|
|
8885
|
+
const inputChild = import_react93.Children.only(
|
|
8886
|
+
(0, import_react93.isValidElement)(children) && (0, import_react93.cloneElement)(children, {
|
|
8875
8887
|
onChange: onChangeHandler,
|
|
8876
8888
|
onBlur: onBlurHandler,
|
|
8877
8889
|
onFocus: onFocusHandler,
|
|
@@ -8885,7 +8897,7 @@ var InlineEdit = (props) => {
|
|
|
8885
8897
|
InlineEdit.displayName = "InlineEdit";
|
|
8886
8898
|
|
|
8887
8899
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
8888
|
-
var
|
|
8900
|
+
var import_react94 = require("react");
|
|
8889
8901
|
|
|
8890
8902
|
// src/components/InlineEdit/InlineEdit.module.css
|
|
8891
8903
|
var InlineEdit_default = {
|
|
@@ -8907,7 +8919,7 @@ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ (0, import_jsx
|
|
|
8907
8919
|
|
|
8908
8920
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
8909
8921
|
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
8910
|
-
var InlineTextArea = (0,
|
|
8922
|
+
var InlineTextArea = (0, import_react94.forwardRef)((props, ref) => {
|
|
8911
8923
|
const {
|
|
8912
8924
|
id,
|
|
8913
8925
|
error,
|
|
@@ -8919,14 +8931,14 @@ var InlineTextArea = (0, import_react93.forwardRef)((props, ref) => {
|
|
|
8919
8931
|
hideIcon,
|
|
8920
8932
|
...rest
|
|
8921
8933
|
} = props;
|
|
8922
|
-
const genereatedId = (0,
|
|
8934
|
+
const genereatedId = (0, import_react94.useId)();
|
|
8923
8935
|
const uniqueId = id != null ? id : `${genereatedId}-InlineTextArea`;
|
|
8924
8936
|
const hasErrorMessage = !!errorMessage;
|
|
8925
8937
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
8926
8938
|
const hasError = !!error;
|
|
8927
8939
|
const hasErrorState = hasError || hasErrorMessage;
|
|
8928
8940
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
8929
|
-
const inputRef = (0,
|
|
8941
|
+
const inputRef = (0, import_react94.useRef)(null);
|
|
8930
8942
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
8931
8943
|
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
8932
8944
|
/* @__PURE__ */ (0, import_jsx_runtime252.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -8974,9 +8986,9 @@ InlineTextArea.displayName = "InlineTextArea";
|
|
|
8974
8986
|
|
|
8975
8987
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
8976
8988
|
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
8977
|
-
var InlineEditTextArea = (0,
|
|
8989
|
+
var InlineEditTextArea = (0, import_react95.forwardRef)((props, ref) => {
|
|
8978
8990
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
8979
|
-
const textareaRef = (0,
|
|
8991
|
+
const textareaRef = (0, import_react95.useRef)(null);
|
|
8980
8992
|
const combinedRef = useCombinedRef(ref, textareaRef);
|
|
8981
8993
|
return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
8982
8994
|
InlineEdit,
|
|
@@ -8994,12 +9006,12 @@ var InlineEditTextArea = (0, import_react94.forwardRef)((props, ref) => {
|
|
|
8994
9006
|
});
|
|
8995
9007
|
|
|
8996
9008
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
8997
|
-
var
|
|
9009
|
+
var import_react97 = require("react");
|
|
8998
9010
|
|
|
8999
9011
|
// src/components/InlineEdit/InlineInput.tsx
|
|
9000
|
-
var
|
|
9012
|
+
var import_react96 = require("react");
|
|
9001
9013
|
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
9002
|
-
var InlineInput = (0,
|
|
9014
|
+
var InlineInput = (0, import_react96.forwardRef)(
|
|
9003
9015
|
(props, ref) => {
|
|
9004
9016
|
const {
|
|
9005
9017
|
id,
|
|
@@ -9012,14 +9024,14 @@ var InlineInput = (0, import_react95.forwardRef)(
|
|
|
9012
9024
|
hideIcon,
|
|
9013
9025
|
...rest
|
|
9014
9026
|
} = props;
|
|
9015
|
-
const genereatedId = (0,
|
|
9027
|
+
const genereatedId = (0, import_react96.useId)();
|
|
9016
9028
|
const uniqueId = id != null ? id : `${genereatedId}-InlineInput`;
|
|
9017
9029
|
const hasErrorMessage = !!errorMessage;
|
|
9018
9030
|
const hasError = !!error;
|
|
9019
9031
|
const hasErrorState = hasError || hasErrorMessage;
|
|
9020
9032
|
const errorMessageId = derivativeIdGenerator(uniqueId, "errorMessage");
|
|
9021
9033
|
const descId = derivativeIdGenerator(uniqueId, "desc");
|
|
9022
|
-
const inputRef = (0,
|
|
9034
|
+
const inputRef = (0, import_react96.useRef)(null);
|
|
9023
9035
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9024
9036
|
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("div", { className: InlineEdit_default.container, style: { width }, children: [
|
|
9025
9037
|
/* @__PURE__ */ (0, import_jsx_runtime254.jsxs)("div", { className: Input_default["input-group"], children: [
|
|
@@ -9066,9 +9078,9 @@ InlineInput.displayName = "InlineInput";
|
|
|
9066
9078
|
|
|
9067
9079
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
9068
9080
|
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
9069
|
-
var InlineEditInput = (0,
|
|
9081
|
+
var InlineEditInput = (0, import_react97.forwardRef)((props, ref) => {
|
|
9070
9082
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
9071
|
-
const inputRef = (0,
|
|
9083
|
+
const inputRef = (0, import_react97.useRef)(null);
|
|
9072
9084
|
const combinedRef = useCombinedRef(ref, inputRef);
|
|
9073
9085
|
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
9074
9086
|
InlineEdit,
|
|
@@ -9086,7 +9098,7 @@ var InlineEditInput = (0, import_react96.forwardRef)((props, ref) => {
|
|
|
9086
9098
|
});
|
|
9087
9099
|
|
|
9088
9100
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
9089
|
-
var
|
|
9101
|
+
var import_react99 = require("react");
|
|
9090
9102
|
|
|
9091
9103
|
// src/components/InternalHeader/InternalHeader.module.css
|
|
9092
9104
|
var InternalHeader_default = {
|
|
@@ -9142,9 +9154,9 @@ var InternalHeader_default = {
|
|
|
9142
9154
|
};
|
|
9143
9155
|
|
|
9144
9156
|
// src/components/InternalHeader/NavigationItem.tsx
|
|
9145
|
-
var
|
|
9157
|
+
var import_react98 = require("react");
|
|
9146
9158
|
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
9147
|
-
var NavigationItem = (0,
|
|
9159
|
+
var NavigationItem = (0, import_react98.forwardRef)(({ isCurrent, ...rest }, ref) => {
|
|
9148
9160
|
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
9149
9161
|
"a",
|
|
9150
9162
|
{
|
|
@@ -9179,11 +9191,11 @@ var InternalHeader = (props) => {
|
|
|
9179
9191
|
htmlProps,
|
|
9180
9192
|
...rest
|
|
9181
9193
|
} = props;
|
|
9182
|
-
const [contextMenuIsClosed, setContextMenuIsClosed] = (0,
|
|
9183
|
-
const [currentPage, setCurrentPage] = (0,
|
|
9194
|
+
const [contextMenuIsClosed, setContextMenuIsClosed] = (0, import_react99.useState)(true);
|
|
9195
|
+
const [currentPage, setCurrentPage] = (0, import_react99.useState)(
|
|
9184
9196
|
currentPageHref
|
|
9185
9197
|
);
|
|
9186
|
-
const buttonRef = (0,
|
|
9198
|
+
const buttonRef = (0, import_react99.useRef)(null);
|
|
9187
9199
|
const handleCurrentPageChange = (href) => {
|
|
9188
9200
|
setCurrentPage(href);
|
|
9189
9201
|
onCurrentPageChange && onCurrentPageChange();
|
|
@@ -9319,7 +9331,7 @@ var InternalHeader = (props) => {
|
|
|
9319
9331
|
InternalHeader.displayName = "InternalHeader";
|
|
9320
9332
|
|
|
9321
9333
|
// src/components/List/List.tsx
|
|
9322
|
-
var
|
|
9334
|
+
var import_react100 = require("react");
|
|
9323
9335
|
|
|
9324
9336
|
// src/components/List/List.module.css
|
|
9325
9337
|
var List_default = {
|
|
@@ -9332,7 +9344,7 @@ var List_default = {
|
|
|
9332
9344
|
|
|
9333
9345
|
// src/components/List/List.tsx
|
|
9334
9346
|
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
9335
|
-
var List = (0,
|
|
9347
|
+
var List = (0, import_react100.forwardRef)((props, ref) => {
|
|
9336
9348
|
const {
|
|
9337
9349
|
listType = "unordered",
|
|
9338
9350
|
typographyType = "inherit",
|
|
@@ -9360,9 +9372,9 @@ var List = (0, import_react99.forwardRef)((props, ref) => {
|
|
|
9360
9372
|
List.displayName = "List";
|
|
9361
9373
|
|
|
9362
9374
|
// src/components/List/ListItem.tsx
|
|
9363
|
-
var
|
|
9375
|
+
var import_react101 = require("react");
|
|
9364
9376
|
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
9365
|
-
var ListItem = (0,
|
|
9377
|
+
var ListItem = (0, import_react101.forwardRef)(
|
|
9366
9378
|
({ className, ...rest }, ref) => {
|
|
9367
9379
|
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)("li", { ref, ...rest, className: cn(className, List_default.li) });
|
|
9368
9380
|
}
|
|
@@ -9370,7 +9382,7 @@ var ListItem = (0, import_react100.forwardRef)(
|
|
|
9370
9382
|
ListItem.displayName = "ListItem";
|
|
9371
9383
|
|
|
9372
9384
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9373
|
-
var
|
|
9385
|
+
var import_react102 = require("react");
|
|
9374
9386
|
|
|
9375
9387
|
// src/components/LocalMessage/LocalMessage.module.css
|
|
9376
9388
|
var LocalMessage_default = {
|
|
@@ -9399,7 +9411,7 @@ var icons2 = {
|
|
|
9399
9411
|
success: CheckCircledIcon,
|
|
9400
9412
|
tips: TipIcon
|
|
9401
9413
|
};
|
|
9402
|
-
var LocalMessage = (0,
|
|
9414
|
+
var LocalMessage = (0, import_react102.forwardRef)(
|
|
9403
9415
|
(props, ref) => {
|
|
9404
9416
|
const {
|
|
9405
9417
|
message,
|
|
@@ -9414,7 +9426,7 @@ var LocalMessage = (0, import_react101.forwardRef)(
|
|
|
9414
9426
|
htmlProps,
|
|
9415
9427
|
...rest
|
|
9416
9428
|
} = props;
|
|
9417
|
-
const [isClosed, setClosed] = (0,
|
|
9429
|
+
const [isClosed, setClosed] = (0, import_react102.useState)(false);
|
|
9418
9430
|
if (isClosed) {
|
|
9419
9431
|
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(import_jsx_runtime260.Fragment, {});
|
|
9420
9432
|
}
|
|
@@ -9467,7 +9479,7 @@ var LocalMessage = (0, import_react101.forwardRef)(
|
|
|
9467
9479
|
LocalMessage.displayName = "LocalMessage";
|
|
9468
9480
|
|
|
9469
9481
|
// src/components/Modal/Modal.tsx
|
|
9470
|
-
var
|
|
9482
|
+
var import_react103 = require("react");
|
|
9471
9483
|
var import_react_dom3 = require("react-dom");
|
|
9472
9484
|
|
|
9473
9485
|
// src/components/Modal/Modal.module.css
|
|
@@ -9482,7 +9494,7 @@ var Modal_default = {
|
|
|
9482
9494
|
|
|
9483
9495
|
// src/components/Modal/Modal.tsx
|
|
9484
9496
|
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
9485
|
-
var Modal = (0,
|
|
9497
|
+
var Modal = (0, import_react103.forwardRef)((props, ref) => {
|
|
9486
9498
|
const {
|
|
9487
9499
|
isOpen = false,
|
|
9488
9500
|
parentElement = document.body,
|
|
@@ -9496,7 +9508,7 @@ var Modal = (0, import_react102.forwardRef)((props, ref) => {
|
|
|
9496
9508
|
htmlProps,
|
|
9497
9509
|
...rest
|
|
9498
9510
|
} = props;
|
|
9499
|
-
const generatedId = (0,
|
|
9511
|
+
const generatedId = (0, import_react103.useId)();
|
|
9500
9512
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
9501
9513
|
const headerId = `${modalId}-header`;
|
|
9502
9514
|
const modalRef = useFocusTrap(isOpen, initialFocusRef);
|
|
@@ -9508,7 +9520,7 @@ var Modal = (0, import_react102.forwardRef)((props, ref) => {
|
|
|
9508
9520
|
onClose();
|
|
9509
9521
|
}
|
|
9510
9522
|
};
|
|
9511
|
-
(0,
|
|
9523
|
+
(0, import_react103.useEffect)(() => {
|
|
9512
9524
|
if (isOpen) {
|
|
9513
9525
|
handleElementWithBackdropMount(document.body);
|
|
9514
9526
|
} else {
|
|
@@ -9516,55 +9528,68 @@ var Modal = (0, import_react102.forwardRef)((props, ref) => {
|
|
|
9516
9528
|
}
|
|
9517
9529
|
return () => handleElementWithBackdropUnmount(document.body);
|
|
9518
9530
|
}, [isOpen]);
|
|
9519
|
-
|
|
9531
|
+
const backdropRef = (0, import_react103.useRef)(null);
|
|
9532
|
+
const onBackdropClick = (event) => {
|
|
9533
|
+
if (event.target === backdropRef.current && isOpen) {
|
|
9534
|
+
handleClose();
|
|
9535
|
+
}
|
|
9536
|
+
};
|
|
9520
9537
|
useOnKeyDown(["Escape", "Esc"], () => handleClose());
|
|
9521
9538
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
9522
9539
|
return isOpen || hasTransitionedIn ? (0, import_react_dom3.createPortal)(
|
|
9523
|
-
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
9524
|
-
|
|
9540
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
9541
|
+
Backdrop,
|
|
9525
9542
|
{
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9543
|
+
isMounted: isOpen && hasTransitionedIn,
|
|
9544
|
+
ref: backdropRef,
|
|
9545
|
+
onClick: onBackdropClick,
|
|
9546
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
9547
|
+
Paper,
|
|
9548
|
+
{
|
|
9549
|
+
...getBaseHTMLProps(
|
|
9550
|
+
id,
|
|
9551
|
+
cn(className, Modal_default.container, focusable),
|
|
9552
|
+
htmlProps,
|
|
9553
|
+
rest
|
|
9554
|
+
),
|
|
9555
|
+
ref: combinedRef,
|
|
9556
|
+
role: "dialog",
|
|
9557
|
+
"aria-modal": true,
|
|
9558
|
+
"aria-hidden": !isOpen,
|
|
9559
|
+
tabIndex: -1,
|
|
9560
|
+
"aria-labelledby": headerId,
|
|
9561
|
+
id: modalId,
|
|
9562
|
+
elevation: 4,
|
|
9563
|
+
children: [
|
|
9564
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)("div", { className: Modal_default.content, children: [
|
|
9565
|
+
!!header && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { id: headerId, className: Modal_default.header, children: typeof header === "string" ? /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(Heading, { level: 2, typographyType: "headingSans03", children: header }) : header }),
|
|
9566
|
+
children
|
|
9567
|
+
] }),
|
|
9568
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
9569
|
+
Button,
|
|
9570
|
+
{
|
|
9571
|
+
size: "small",
|
|
9572
|
+
purpose: "tertiary",
|
|
9573
|
+
icon: CloseIcon,
|
|
9574
|
+
onClick: handleClose,
|
|
9575
|
+
"aria-label": "Lukk dialog",
|
|
9576
|
+
className: Modal_default["close-button"]
|
|
9577
|
+
}
|
|
9578
|
+
)
|
|
9579
|
+
]
|
|
9580
|
+
}
|
|
9581
|
+
)
|
|
9557
9582
|
}
|
|
9558
|
-
)
|
|
9583
|
+
),
|
|
9559
9584
|
parentElement
|
|
9560
9585
|
) : null;
|
|
9561
9586
|
});
|
|
9562
9587
|
Modal.displayName = "Modal";
|
|
9563
9588
|
|
|
9564
9589
|
// src/components/Modal/ModalBody.tsx
|
|
9565
|
-
var
|
|
9590
|
+
var import_react104 = require("react");
|
|
9566
9591
|
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
9567
|
-
var ModalBody = (0,
|
|
9592
|
+
var ModalBody = (0, import_react104.forwardRef)(
|
|
9568
9593
|
(props, ref) => {
|
|
9569
9594
|
const { children, id, className, scrollable, htmlProps, height, ...rest } = props;
|
|
9570
9595
|
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
@@ -9591,9 +9616,9 @@ var ModalBody = (0, import_react103.forwardRef)(
|
|
|
9591
9616
|
ModalBody.displayName = "ModalBody";
|
|
9592
9617
|
|
|
9593
9618
|
// src/components/Modal/ModalActions.tsx
|
|
9594
|
-
var
|
|
9619
|
+
var import_react105 = require("react");
|
|
9595
9620
|
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
9596
|
-
var ModalActions = (0,
|
|
9621
|
+
var ModalActions = (0, import_react105.forwardRef)(
|
|
9597
9622
|
({ className, ...rest }, ref) => {
|
|
9598
9623
|
return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("div", { ref, ...rest, className: cn(className, Modal_default.actions) });
|
|
9599
9624
|
}
|
|
@@ -9601,7 +9626,7 @@ var ModalActions = (0, import_react104.forwardRef)(
|
|
|
9601
9626
|
ModalActions.displayName = "ModalActions";
|
|
9602
9627
|
|
|
9603
9628
|
// src/components/Pagination/Pagination.tsx
|
|
9604
|
-
var
|
|
9629
|
+
var import_react108 = require("react");
|
|
9605
9630
|
|
|
9606
9631
|
// src/components/Pagination/Pagination.module.css
|
|
9607
9632
|
var Pagination_default = {
|
|
@@ -9664,7 +9689,7 @@ function PaginationGenerator(pagesAmount, activePage) {
|
|
|
9664
9689
|
}
|
|
9665
9690
|
|
|
9666
9691
|
// src/components/Select/Select.tsx
|
|
9667
|
-
var
|
|
9692
|
+
var import_react106 = require("react");
|
|
9668
9693
|
var import_react_select2 = __toESM(require("react-select"));
|
|
9669
9694
|
|
|
9670
9695
|
// src/components/Select/Select.module.css
|
|
@@ -10074,7 +10099,7 @@ function SelectInner(props, ref) {
|
|
|
10074
10099
|
"data-testid": dataTestId,
|
|
10075
10100
|
...rest
|
|
10076
10101
|
} = props;
|
|
10077
|
-
const generatedId = (0,
|
|
10102
|
+
const generatedId = (0, import_react106.useId)();
|
|
10078
10103
|
const uniqueId = id != null ? id : `${generatedId}-select`;
|
|
10079
10104
|
const singleValueId = !isMulti ? `${uniqueId}-singleValue` : void 0;
|
|
10080
10105
|
const hasLabel = !!label;
|
|
@@ -10161,11 +10186,11 @@ function SelectInner(props, ref) {
|
|
|
10161
10186
|
}
|
|
10162
10187
|
);
|
|
10163
10188
|
}
|
|
10164
|
-
var Select = (0,
|
|
10189
|
+
var Select = (0, import_react106.forwardRef)(SelectInner);
|
|
10165
10190
|
Select.displayName = "Select";
|
|
10166
10191
|
|
|
10167
10192
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10168
|
-
var
|
|
10193
|
+
var import_react107 = require("react");
|
|
10169
10194
|
|
|
10170
10195
|
// src/components/Select/NativeSelect/NativeSelect.module.css
|
|
10171
10196
|
var NativeSelect_default = {
|
|
@@ -10181,7 +10206,7 @@ var NativeSelect_default = {
|
|
|
10181
10206
|
|
|
10182
10207
|
// src/components/Select/NativeSelect/NativeSelect.tsx
|
|
10183
10208
|
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
10184
|
-
var NativeSelect = (0,
|
|
10209
|
+
var NativeSelect = (0, import_react107.forwardRef)(
|
|
10185
10210
|
(props, ref) => {
|
|
10186
10211
|
const {
|
|
10187
10212
|
id,
|
|
@@ -10200,7 +10225,7 @@ var NativeSelect = (0, import_react106.forwardRef)(
|
|
|
10200
10225
|
style,
|
|
10201
10226
|
...rest
|
|
10202
10227
|
} = props;
|
|
10203
|
-
const generatedId = (0,
|
|
10228
|
+
const generatedId = (0, import_react107.useId)();
|
|
10204
10229
|
const uniqueId = id != null ? id : `${generatedId}-native-select`;
|
|
10205
10230
|
const hasErrorMessage = !!errorMessage;
|
|
10206
10231
|
const hasTip = !!tip;
|
|
@@ -10275,7 +10300,7 @@ var NativeSelect = (0, import_react106.forwardRef)(
|
|
|
10275
10300
|
] });
|
|
10276
10301
|
}
|
|
10277
10302
|
);
|
|
10278
|
-
var NativeSelectPlaceholder = (0,
|
|
10303
|
+
var NativeSelectPlaceholder = (0, import_react107.forwardRef)((props, ref) => {
|
|
10279
10304
|
const { children = "-- Velg fra listen --", value, ...rest } = props;
|
|
10280
10305
|
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("option", { ref, value: value != null ? value : "", selected: true, ...rest, children });
|
|
10281
10306
|
});
|
|
@@ -10286,7 +10311,7 @@ var createSelectOptions = (...args) => args.map((v2) => ({ label: v2, value: v2
|
|
|
10286
10311
|
|
|
10287
10312
|
// src/components/Pagination/Pagination.tsx
|
|
10288
10313
|
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
10289
|
-
var Pagination = (0,
|
|
10314
|
+
var Pagination = (0, import_react108.forwardRef)(
|
|
10290
10315
|
(props, ref) => {
|
|
10291
10316
|
const {
|
|
10292
10317
|
itemsAmount,
|
|
@@ -10309,8 +10334,8 @@ var Pagination = (0, import_react107.forwardRef)(
|
|
|
10309
10334
|
htmlProps,
|
|
10310
10335
|
...rest
|
|
10311
10336
|
} = props;
|
|
10312
|
-
const [activePage, setActivePage] = (0,
|
|
10313
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
10337
|
+
const [activePage, setActivePage] = (0, import_react108.useState)(defaultActivePage);
|
|
10338
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react108.useState)(defaultItemsPerPage);
|
|
10314
10339
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
10315
10340
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
10316
10341
|
const onPageChange = (event, page) => {
|
|
@@ -10544,7 +10569,7 @@ Pagination.displayName = "Pagination";
|
|
|
10544
10569
|
|
|
10545
10570
|
// src/components/PhoneInput/PhoneInput.tsx
|
|
10546
10571
|
var import_dds_design_tokens15 = require("@norges-domstoler/dds-design-tokens");
|
|
10547
|
-
var
|
|
10572
|
+
var import_react109 = require("react");
|
|
10548
10573
|
|
|
10549
10574
|
// src/components/PhoneInput/constants.ts
|
|
10550
10575
|
var COUNTRIES = {
|
|
@@ -11269,7 +11294,7 @@ var countryOptions = [
|
|
|
11269
11294
|
...prioritizedCountryOptions,
|
|
11270
11295
|
...sortedCountryOptions
|
|
11271
11296
|
];
|
|
11272
|
-
var PhoneInput = (0,
|
|
11297
|
+
var PhoneInput = (0, import_react109.forwardRef)(
|
|
11273
11298
|
({
|
|
11274
11299
|
label,
|
|
11275
11300
|
readOnly,
|
|
@@ -11292,7 +11317,7 @@ var PhoneInput = (0, import_react108.forwardRef)(
|
|
|
11292
11317
|
...props
|
|
11293
11318
|
}, ref) => {
|
|
11294
11319
|
var _a;
|
|
11295
|
-
const generatedId = (0,
|
|
11320
|
+
const generatedId = (0, import_react109.useId)();
|
|
11296
11321
|
const uniqueId = (_a = props.id) != null ? _a : generatedId;
|
|
11297
11322
|
const phoneInputId = `${uniqueId}-phone-input`;
|
|
11298
11323
|
const phoneNumberId = `${uniqueId}-phone-number`;
|
|
@@ -11303,18 +11328,18 @@ var PhoneInput = (0, import_react108.forwardRef)(
|
|
|
11303
11328
|
const hasMessage = hasErrorMessage || hasTip;
|
|
11304
11329
|
const tipId = derivativeIdGenerator(phoneInputId, "tip");
|
|
11305
11330
|
const errorMessageId = derivativeIdGenerator(phoneInputId, "errorMessage");
|
|
11306
|
-
const [callingCode, setCallingCode] = (0,
|
|
11307
|
-
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0,
|
|
11308
|
-
const [internalValue, setInternalValue] = (0,
|
|
11331
|
+
const [callingCode, setCallingCode] = (0, import_react109.useState)("");
|
|
11332
|
+
const [selectedCountryCodeText, setSelectedCountryCodeText] = (0, import_react109.useState)("");
|
|
11333
|
+
const [internalValue, setInternalValue] = (0, import_react109.useState)(
|
|
11309
11334
|
defaultValue != null ? defaultValue : {
|
|
11310
11335
|
countryCode: "",
|
|
11311
11336
|
phoneNumber: ""
|
|
11312
11337
|
}
|
|
11313
11338
|
);
|
|
11314
11339
|
const isControlled = value !== void 0;
|
|
11315
|
-
const [callingCodeWidth, setCallingCodeWidth] = (0,
|
|
11316
|
-
const callingCodeRef = (0,
|
|
11317
|
-
(0,
|
|
11340
|
+
const [callingCodeWidth, setCallingCodeWidth] = (0, import_react109.useState)(0);
|
|
11341
|
+
const callingCodeRef = (0, import_react109.useRef)(null);
|
|
11342
|
+
(0, import_react109.useLayoutEffect)(() => {
|
|
11318
11343
|
if (callingCodeRef.current) {
|
|
11319
11344
|
setCallingCodeWidth(callingCodeRef.current.offsetWidth);
|
|
11320
11345
|
}
|
|
@@ -11324,10 +11349,10 @@ var PhoneInput = (0, import_react108.forwardRef)(
|
|
|
11324
11349
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11325
11350
|
["--dds-phone-input-width"]: width ? width : componentSize === "tiny" ? "131px" : "194px"
|
|
11326
11351
|
};
|
|
11327
|
-
const internalSelectRef = (0,
|
|
11352
|
+
const internalSelectRef = (0, import_react109.useRef)(null);
|
|
11328
11353
|
const combinedSelectRef = useCombinedRef(selectRef, internalSelectRef);
|
|
11329
11354
|
const displayedValue = isControlled ? value : internalValue;
|
|
11330
|
-
(0,
|
|
11355
|
+
(0, import_react109.useEffect)(() => {
|
|
11331
11356
|
const selectEl = internalSelectRef.current;
|
|
11332
11357
|
if (selectEl && selectEl.value) {
|
|
11333
11358
|
const { options, selectedIndex } = selectEl;
|
|
@@ -11470,7 +11495,7 @@ var getCallingCode = (s2) => {
|
|
|
11470
11495
|
|
|
11471
11496
|
// src/components/Popover/Popover.tsx
|
|
11472
11497
|
var import_dds_design_tokens16 = require("@norges-domstoler/dds-design-tokens");
|
|
11473
|
-
var
|
|
11498
|
+
var import_react110 = require("react");
|
|
11474
11499
|
|
|
11475
11500
|
// src/components/Popover/Popover.module.css
|
|
11476
11501
|
var Popover_default = {
|
|
@@ -11482,7 +11507,7 @@ var Popover_default = {
|
|
|
11482
11507
|
|
|
11483
11508
|
// src/components/Popover/Popover.tsx
|
|
11484
11509
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
11485
|
-
var Popover = (0,
|
|
11510
|
+
var Popover = (0, import_react110.forwardRef)(
|
|
11486
11511
|
(props, ref) => {
|
|
11487
11512
|
const {
|
|
11488
11513
|
title,
|
|
@@ -11571,7 +11596,7 @@ var Popover = (0, import_react109.forwardRef)(
|
|
|
11571
11596
|
Popover.displayName = "Popover";
|
|
11572
11597
|
|
|
11573
11598
|
// src/components/Popover/PopoverGroup.tsx
|
|
11574
|
-
var
|
|
11599
|
+
var import_react111 = require("react");
|
|
11575
11600
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
11576
11601
|
var PopoverGroup = ({
|
|
11577
11602
|
isOpen = false,
|
|
@@ -11580,8 +11605,8 @@ var PopoverGroup = ({
|
|
|
11580
11605
|
children,
|
|
11581
11606
|
popoverId
|
|
11582
11607
|
}) => {
|
|
11583
|
-
const [open, setOpen] = (0,
|
|
11584
|
-
const generatedId = (0,
|
|
11608
|
+
const [open, setOpen] = (0, import_react111.useState)(isOpen);
|
|
11609
|
+
const generatedId = (0, import_react111.useId)();
|
|
11585
11610
|
const uniquePopoverId = popoverId != null ? popoverId : `${generatedId}-popover`;
|
|
11586
11611
|
const handleOnCloseButtonClick = () => {
|
|
11587
11612
|
setOpen(false);
|
|
@@ -11591,8 +11616,8 @@ var PopoverGroup = ({
|
|
|
11591
11616
|
setOpen(!open);
|
|
11592
11617
|
onTriggerClick && onTriggerClick();
|
|
11593
11618
|
};
|
|
11594
|
-
const buttonRef = (0,
|
|
11595
|
-
const popoverRef = (0,
|
|
11619
|
+
const buttonRef = (0, import_react111.useRef)(null);
|
|
11620
|
+
const popoverRef = (0, import_react111.useRef)(null);
|
|
11596
11621
|
useOnKeyDown(["Esc", "Escape"], () => {
|
|
11597
11622
|
var _a;
|
|
11598
11623
|
if (open) {
|
|
@@ -11601,14 +11626,14 @@ var PopoverGroup = ({
|
|
|
11601
11626
|
}
|
|
11602
11627
|
});
|
|
11603
11628
|
const handleClose = () => setOpen(false);
|
|
11604
|
-
const Children8 =
|
|
11605
|
-
return (0,
|
|
11629
|
+
const Children8 = import_react111.Children.map(children, (child, childIndex) => {
|
|
11630
|
+
return (0, import_react111.isValidElement)(child) && (childIndex === 0 ? (0, import_react111.cloneElement)(child, {
|
|
11606
11631
|
"aria-haspopup": "dialog",
|
|
11607
11632
|
"aria-controls": uniquePopoverId,
|
|
11608
11633
|
"aria-expanded": open,
|
|
11609
11634
|
onClick: handleOnTriggerClick,
|
|
11610
11635
|
ref: buttonRef
|
|
11611
|
-
}) : (0,
|
|
11636
|
+
}) : (0, import_react111.cloneElement)(child, {
|
|
11612
11637
|
isOpen: open,
|
|
11613
11638
|
"aria-hidden": !open,
|
|
11614
11639
|
id: uniquePopoverId,
|
|
@@ -11623,16 +11648,16 @@ var PopoverGroup = ({
|
|
|
11623
11648
|
PopoverGroup.displayName = "PopoverGroup";
|
|
11624
11649
|
|
|
11625
11650
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
11626
|
-
var
|
|
11651
|
+
var import_react114 = require("react");
|
|
11627
11652
|
|
|
11628
11653
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
11629
|
-
var
|
|
11630
|
-
var ProgressTrackerContext = (0,
|
|
11654
|
+
var import_react112 = require("react");
|
|
11655
|
+
var ProgressTrackerContext = (0, import_react112.createContext)(
|
|
11631
11656
|
{
|
|
11632
11657
|
activeStep: 0
|
|
11633
11658
|
}
|
|
11634
11659
|
);
|
|
11635
|
-
var useProgressTrackerContext = () => (0,
|
|
11660
|
+
var useProgressTrackerContext = () => (0, import_react112.useContext)(ProgressTrackerContext);
|
|
11636
11661
|
|
|
11637
11662
|
// src/components/ProgressTracker/ProgressTracker.module.css
|
|
11638
11663
|
var ProgressTracker_default = {
|
|
@@ -11656,7 +11681,7 @@ var ProgressTracker_default = {
|
|
|
11656
11681
|
};
|
|
11657
11682
|
|
|
11658
11683
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
11659
|
-
var
|
|
11684
|
+
var import_react113 = require("react");
|
|
11660
11685
|
var import_jsx_runtime271 = require("react/jsx-runtime");
|
|
11661
11686
|
var toItemState = (active, completed, disabled) => {
|
|
11662
11687
|
if (disabled) {
|
|
@@ -11698,7 +11723,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11698
11723
|
handleStepChange && handleStepChange(index);
|
|
11699
11724
|
}
|
|
11700
11725
|
};
|
|
11701
|
-
const stepNumberContent = (0,
|
|
11726
|
+
const stepNumberContent = (0, import_react113.useMemo)(() => {
|
|
11702
11727
|
if (completed) {
|
|
11703
11728
|
return /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(Icon, { icon: CheckIcon, iconSize: "small" });
|
|
11704
11729
|
}
|
|
@@ -11766,7 +11791,7 @@ ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
|
11766
11791
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
11767
11792
|
var import_jsx_runtime272 = require("react/jsx-runtime");
|
|
11768
11793
|
var ProgressTracker = (() => {
|
|
11769
|
-
const Res = (0,
|
|
11794
|
+
const Res = (0, import_react114.forwardRef)((props, ref) => {
|
|
11770
11795
|
const {
|
|
11771
11796
|
id,
|
|
11772
11797
|
activeStep = 0,
|
|
@@ -11776,12 +11801,12 @@ var ProgressTracker = (() => {
|
|
|
11776
11801
|
htmlProps,
|
|
11777
11802
|
...rest
|
|
11778
11803
|
} = props;
|
|
11779
|
-
const [thisActiveStep, setActiveStep] = (0,
|
|
11804
|
+
const [thisActiveStep, setActiveStep] = (0, import_react114.useState)(activeStep);
|
|
11780
11805
|
const handleChange = (step) => {
|
|
11781
11806
|
setActiveStep(step);
|
|
11782
11807
|
onStepChange && onStepChange(step);
|
|
11783
11808
|
};
|
|
11784
|
-
(0,
|
|
11809
|
+
(0, import_react114.useEffect)(() => {
|
|
11785
11810
|
if (activeStep !== void 0 && activeStep != thisActiveStep) {
|
|
11786
11811
|
setActiveStep(activeStep);
|
|
11787
11812
|
}
|
|
@@ -11790,7 +11815,7 @@ var ProgressTracker = (() => {
|
|
|
11790
11815
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
11791
11816
|
ref
|
|
11792
11817
|
};
|
|
11793
|
-
const steps = (0,
|
|
11818
|
+
const steps = (0, import_react114.useMemo)(() => {
|
|
11794
11819
|
const validChildren = removeInvalidChildren(children);
|
|
11795
11820
|
const itemsWithIndex = passIndexPropToProgressTrackerItem(validChildren);
|
|
11796
11821
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
@@ -11812,29 +11837,29 @@ var ProgressTracker = (() => {
|
|
|
11812
11837
|
return Res;
|
|
11813
11838
|
})();
|
|
11814
11839
|
function removeInvalidChildren(children) {
|
|
11815
|
-
return
|
|
11840
|
+
return import_react114.Children.toArray(children).filter(import_react114.isValidElement);
|
|
11816
11841
|
}
|
|
11817
11842
|
function passIndexPropToProgressTrackerItem(children) {
|
|
11818
|
-
return
|
|
11843
|
+
return import_react114.Children.map(
|
|
11819
11844
|
children,
|
|
11820
|
-
(item, index) => (0,
|
|
11845
|
+
(item, index) => (0, import_react114.cloneElement)(item, {
|
|
11821
11846
|
...item.props,
|
|
11822
11847
|
index
|
|
11823
11848
|
})
|
|
11824
11849
|
);
|
|
11825
11850
|
}
|
|
11826
|
-
var intersperseItemsWithConnector = (children) =>
|
|
11851
|
+
var intersperseItemsWithConnector = (children) => import_react114.Children.map(children, (child, index) => {
|
|
11827
11852
|
if (index === 0) {
|
|
11828
11853
|
return child;
|
|
11829
11854
|
}
|
|
11830
|
-
return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(
|
|
11855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime272.jsxs)(import_react114.Fragment, { children: [
|
|
11831
11856
|
/* @__PURE__ */ (0, import_jsx_runtime272.jsx)("div", { "aria-hidden": true, className: ProgressTracker_default.connector }),
|
|
11832
11857
|
child
|
|
11833
11858
|
] }, index);
|
|
11834
11859
|
});
|
|
11835
11860
|
|
|
11836
11861
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
11837
|
-
var
|
|
11862
|
+
var import_react115 = require("react");
|
|
11838
11863
|
|
|
11839
11864
|
// src/components/ProgressBar/ProgressBar.module.css
|
|
11840
11865
|
var ProgressBar_default = {
|
|
@@ -11851,7 +11876,7 @@ var ProgressBar_default = {
|
|
|
11851
11876
|
|
|
11852
11877
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
11853
11878
|
var import_jsx_runtime273 = require("react/jsx-runtime");
|
|
11854
|
-
var ProgressBar = (0,
|
|
11879
|
+
var ProgressBar = (0, import_react115.forwardRef)(
|
|
11855
11880
|
(props, ref) => {
|
|
11856
11881
|
const {
|
|
11857
11882
|
label,
|
|
@@ -11867,7 +11892,7 @@ var ProgressBar = (0, import_react114.forwardRef)(
|
|
|
11867
11892
|
style,
|
|
11868
11893
|
...rest
|
|
11869
11894
|
} = props;
|
|
11870
|
-
const generatedId = (0,
|
|
11895
|
+
const generatedId = (0, import_react115.useId)();
|
|
11871
11896
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
11872
11897
|
const hasErrorMessage = !!errorMessage;
|
|
11873
11898
|
const hasTip = !!tip;
|
|
@@ -11930,13 +11955,13 @@ var ProgressBar = (0, import_react114.forwardRef)(
|
|
|
11930
11955
|
ProgressBar.displayName = "ProgressBar";
|
|
11931
11956
|
|
|
11932
11957
|
// src/components/Search/Search.tsx
|
|
11933
|
-
var
|
|
11958
|
+
var import_react119 = require("react");
|
|
11934
11959
|
|
|
11935
11960
|
// src/components/Search/AutocompleteSearch.context.tsx
|
|
11936
|
-
var
|
|
11937
|
-
var AutocompleteSearchContext = (0,
|
|
11961
|
+
var import_react116 = require("react");
|
|
11962
|
+
var AutocompleteSearchContext = (0, import_react116.createContext)({});
|
|
11938
11963
|
var useAutocompleteSearch = () => {
|
|
11939
|
-
return (0,
|
|
11964
|
+
return (0, import_react116.useContext)(AutocompleteSearchContext);
|
|
11940
11965
|
};
|
|
11941
11966
|
|
|
11942
11967
|
// src/components/Search/Search.module.css
|
|
@@ -11986,16 +12011,16 @@ function createEmptyChangeEvent(inputElementId) {
|
|
|
11986
12011
|
}
|
|
11987
12012
|
|
|
11988
12013
|
// src/components/Search/SearchSuggestions.tsx
|
|
11989
|
-
var
|
|
12014
|
+
var import_react118 = require("react");
|
|
11990
12015
|
|
|
11991
12016
|
// src/components/Search/SearchSuggestionItem.tsx
|
|
11992
|
-
var
|
|
12017
|
+
var import_react117 = require("react");
|
|
11993
12018
|
var import_jsx_runtime274 = require("react/jsx-runtime");
|
|
11994
|
-
var SearchSuggestionItem = (0,
|
|
12019
|
+
var SearchSuggestionItem = (0, import_react117.forwardRef)((props, ref) => {
|
|
11995
12020
|
const { focus, className, ...rest } = props;
|
|
11996
|
-
const itemRef = (0,
|
|
12021
|
+
const itemRef = (0, import_react117.useRef)(null);
|
|
11997
12022
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
11998
|
-
(0,
|
|
12023
|
+
(0, import_react117.useEffect)(() => {
|
|
11999
12024
|
var _a;
|
|
12000
12025
|
if (focus) {
|
|
12001
12026
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
@@ -12021,7 +12046,7 @@ SearchSuggestionItem.displayName = "SearchSuggestionItem";
|
|
|
12021
12046
|
|
|
12022
12047
|
// src/components/Search/SearchSuggestions.tsx
|
|
12023
12048
|
var import_jsx_runtime275 = require("react/jsx-runtime");
|
|
12024
|
-
var SearchSuggestions = (0,
|
|
12049
|
+
var SearchSuggestions = (0, import_react118.forwardRef)((props, ref) => {
|
|
12025
12050
|
const {
|
|
12026
12051
|
id,
|
|
12027
12052
|
searchId,
|
|
@@ -12111,7 +12136,7 @@ var getIconSize = (size2) => {
|
|
|
12111
12136
|
return "small";
|
|
12112
12137
|
}
|
|
12113
12138
|
};
|
|
12114
|
-
var Search = (0,
|
|
12139
|
+
var Search = (0, import_react119.forwardRef)(
|
|
12115
12140
|
({
|
|
12116
12141
|
componentSize = "medium",
|
|
12117
12142
|
buttonProps,
|
|
@@ -12127,7 +12152,7 @@ var Search = (0, import_react118.forwardRef)(
|
|
|
12127
12152
|
...rest
|
|
12128
12153
|
}, ref) => {
|
|
12129
12154
|
var _a;
|
|
12130
|
-
const generatedId = (0,
|
|
12155
|
+
const generatedId = (0, import_react119.useId)();
|
|
12131
12156
|
const uniqueId = id != null ? id : `${generatedId}-searchInput`;
|
|
12132
12157
|
const hasLabel = !!label;
|
|
12133
12158
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
@@ -12136,7 +12161,7 @@ var Search = (0, import_react118.forwardRef)(
|
|
|
12136
12161
|
uniqueId,
|
|
12137
12162
|
"suggestions-description"
|
|
12138
12163
|
);
|
|
12139
|
-
const [hasValue, setHasValue] = (0,
|
|
12164
|
+
const [hasValue, setHasValue] = (0, import_react119.useState)(!!value);
|
|
12140
12165
|
const context = useAutocompleteSearch();
|
|
12141
12166
|
const combinedRef = context.inputRef ? useCombinedRef(context.inputRef, ref) : ref;
|
|
12142
12167
|
const handleChange = (e) => {
|
|
@@ -12253,7 +12278,7 @@ var Search = (0, import_react118.forwardRef)(
|
|
|
12253
12278
|
Search.displayName = "Search";
|
|
12254
12279
|
|
|
12255
12280
|
// src/components/Search/SearchAutocompleteWrapper.tsx
|
|
12256
|
-
var
|
|
12281
|
+
var import_react120 = require("react");
|
|
12257
12282
|
var import_jsx_runtime277 = require("react/jsx-runtime");
|
|
12258
12283
|
var SearchAutocompleteWrapper = (props) => {
|
|
12259
12284
|
const {
|
|
@@ -12265,12 +12290,12 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12265
12290
|
onSuggestionSelection,
|
|
12266
12291
|
children
|
|
12267
12292
|
} = props;
|
|
12268
|
-
const [inputValue, setInputValue] = (0,
|
|
12269
|
-
const [suggestions, setSuggestions] = (0,
|
|
12270
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
12293
|
+
const [inputValue, setInputValue] = (0, import_react120.useState)(value != null ? value : "");
|
|
12294
|
+
const [suggestions, setSuggestions] = (0, import_react120.useState)([]);
|
|
12295
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react120.useState)(false);
|
|
12271
12296
|
const closeSuggestions = () => showSuggestions === true && setShowSuggestions(false);
|
|
12272
12297
|
const openSuggestions = () => showSuggestions === false && setShowSuggestions(true);
|
|
12273
|
-
(0,
|
|
12298
|
+
(0, import_react120.useEffect)(() => {
|
|
12274
12299
|
if (suggestions.length > 0) {
|
|
12275
12300
|
openSuggestions();
|
|
12276
12301
|
} else {
|
|
@@ -12315,8 +12340,8 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
12315
12340
|
const handleSetInputValue = (value2) => {
|
|
12316
12341
|
setInputValue(value2 != null ? value2 : "");
|
|
12317
12342
|
};
|
|
12318
|
-
const inputRef = (0,
|
|
12319
|
-
const suggestionsRef = (0,
|
|
12343
|
+
const inputRef = (0, import_react120.useRef)(null);
|
|
12344
|
+
const suggestionsRef = (0, import_react120.useRef)(null);
|
|
12320
12345
|
useOnClickOutside([inputRef.current, suggestionsRef.current], () => {
|
|
12321
12346
|
closeSuggestions();
|
|
12322
12347
|
});
|
|
@@ -12340,17 +12365,17 @@ Search2.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
|
12340
12365
|
Search2.Suggestions = SearchSuggestions;
|
|
12341
12366
|
|
|
12342
12367
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
12343
|
-
var
|
|
12368
|
+
var import_react123 = require("react");
|
|
12344
12369
|
|
|
12345
12370
|
// src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
|
|
12346
|
-
var
|
|
12347
|
-
var CheckboxGroupContext = (0,
|
|
12371
|
+
var import_react121 = require("react");
|
|
12372
|
+
var CheckboxGroupContext = (0, import_react121.createContext)(null);
|
|
12348
12373
|
var useCheckboxGroup = () => {
|
|
12349
|
-
return (0,
|
|
12374
|
+
return (0, import_react121.useContext)(CheckboxGroupContext);
|
|
12350
12375
|
};
|
|
12351
12376
|
|
|
12352
12377
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
12353
|
-
var
|
|
12378
|
+
var import_react122 = require("react");
|
|
12354
12379
|
|
|
12355
12380
|
// src/components/SelectionControl/SelectionControl.module.css
|
|
12356
12381
|
var SelectionControl_default = {
|
|
@@ -12371,7 +12396,7 @@ var SelectionControl_default = {
|
|
|
12371
12396
|
|
|
12372
12397
|
// src/components/SelectionControl/SelectionControl.styles.tsx
|
|
12373
12398
|
var import_jsx_runtime278 = require("react/jsx-runtime");
|
|
12374
|
-
var SelectionControl = (0,
|
|
12399
|
+
var SelectionControl = (0, import_react122.forwardRef)((props, ref) => {
|
|
12375
12400
|
const { controlType, className, ...rest } = props;
|
|
12376
12401
|
return /* @__PURE__ */ (0, import_jsx_runtime278.jsx)(
|
|
12377
12402
|
"span",
|
|
@@ -12386,7 +12411,7 @@ var SelectionControl = (0, import_react121.forwardRef)((props, ref) => {
|
|
|
12386
12411
|
}
|
|
12387
12412
|
);
|
|
12388
12413
|
});
|
|
12389
|
-
var Label2 = (0,
|
|
12414
|
+
var Label2 = (0, import_react122.forwardRef)(
|
|
12390
12415
|
(props, ref) => {
|
|
12391
12416
|
const {
|
|
12392
12417
|
disabled,
|
|
@@ -12429,7 +12454,7 @@ var selectionControlTypographyProps = {
|
|
|
12429
12454
|
|
|
12430
12455
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
12431
12456
|
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
12432
|
-
var Checkbox = (0,
|
|
12457
|
+
var Checkbox = (0, import_react123.forwardRef)(
|
|
12433
12458
|
(props, ref) => {
|
|
12434
12459
|
const {
|
|
12435
12460
|
id,
|
|
@@ -12444,7 +12469,7 @@ var Checkbox = (0, import_react122.forwardRef)(
|
|
|
12444
12469
|
htmlProps = {},
|
|
12445
12470
|
...rest
|
|
12446
12471
|
} = props;
|
|
12447
|
-
const generatedId = (0,
|
|
12472
|
+
const generatedId = (0, import_react123.useId)();
|
|
12448
12473
|
const uniqueId = id != null ? id : `${generatedId}-checkbox`;
|
|
12449
12474
|
const checkboxGroup = useCheckboxGroup();
|
|
12450
12475
|
const hasLabel = !!label;
|
|
@@ -12514,7 +12539,7 @@ var Checkbox = (0, import_react122.forwardRef)(
|
|
|
12514
12539
|
Checkbox.displayName = "Checkbox";
|
|
12515
12540
|
|
|
12516
12541
|
// src/components/SelectionControl/Checkbox/CheckboxGroup.tsx
|
|
12517
|
-
var
|
|
12542
|
+
var import_react124 = require("react");
|
|
12518
12543
|
var import_jsx_runtime280 = require("react/jsx-runtime");
|
|
12519
12544
|
var CheckboxGroup = (props) => {
|
|
12520
12545
|
const {
|
|
@@ -12533,7 +12558,7 @@ var CheckboxGroup = (props) => {
|
|
|
12533
12558
|
...rest
|
|
12534
12559
|
} = props;
|
|
12535
12560
|
const { "aria-required": ariaRequired } = htmlProps;
|
|
12536
|
-
const generatedId = (0,
|
|
12561
|
+
const generatedId = (0, import_react124.useId)();
|
|
12537
12562
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-checkboxGroup`;
|
|
12538
12563
|
const hasErrorMessage = !!errorMessage;
|
|
12539
12564
|
const showRequiredMarker = required || ariaRequired;
|
|
@@ -12591,13 +12616,13 @@ var CheckboxGroup = (props) => {
|
|
|
12591
12616
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
12592
12617
|
|
|
12593
12618
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
12594
|
-
var
|
|
12619
|
+
var import_react126 = require("react");
|
|
12595
12620
|
|
|
12596
12621
|
// src/components/SelectionControl/RadioButton/RadioButtonGroupContext.tsx
|
|
12597
|
-
var
|
|
12598
|
-
var RadioButtonGroupContext = (0,
|
|
12622
|
+
var import_react125 = require("react");
|
|
12623
|
+
var RadioButtonGroupContext = (0, import_react125.createContext)(null);
|
|
12599
12624
|
var useRadioButtonGroup = () => {
|
|
12600
|
-
return (0,
|
|
12625
|
+
return (0, import_react125.useContext)(RadioButtonGroupContext);
|
|
12601
12626
|
};
|
|
12602
12627
|
|
|
12603
12628
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
@@ -12611,7 +12636,7 @@ var isValueEqualToGroupValueOrFalsy = (value, group) => {
|
|
|
12611
12636
|
}
|
|
12612
12637
|
return !!value;
|
|
12613
12638
|
};
|
|
12614
|
-
var RadioButton = (0,
|
|
12639
|
+
var RadioButton = (0, import_react126.forwardRef)(
|
|
12615
12640
|
(props, ref) => {
|
|
12616
12641
|
const {
|
|
12617
12642
|
id,
|
|
@@ -12635,7 +12660,7 @@ var RadioButton = (0, import_react125.forwardRef)(
|
|
|
12635
12660
|
style,
|
|
12636
12661
|
...restHtmlProps
|
|
12637
12662
|
} = htmlProps;
|
|
12638
|
-
const generatedId = (0,
|
|
12663
|
+
const generatedId = (0, import_react126.useId)();
|
|
12639
12664
|
const uniqueId = id != null ? id : `${generatedId}-radioButton`;
|
|
12640
12665
|
const hasLabel = !!label;
|
|
12641
12666
|
const radioButtonGroup = useRadioButtonGroup();
|
|
@@ -12704,7 +12729,7 @@ var RadioButton = (0, import_react125.forwardRef)(
|
|
|
12704
12729
|
RadioButton.displayName = "RadioButton";
|
|
12705
12730
|
|
|
12706
12731
|
// src/components/SelectionControl/RadioButton/RadioButtonGroup.tsx
|
|
12707
|
-
var
|
|
12732
|
+
var import_react127 = require("react");
|
|
12708
12733
|
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
12709
12734
|
var RadioButtonGroupInner = (props, ref) => {
|
|
12710
12735
|
const {
|
|
@@ -12726,8 +12751,8 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
12726
12751
|
...rest
|
|
12727
12752
|
} = props;
|
|
12728
12753
|
const { "aria-required": ariaRequired = false } = htmlProps;
|
|
12729
|
-
const [groupValue, setGroupValue] = (0,
|
|
12730
|
-
const generatedId = (0,
|
|
12754
|
+
const [groupValue, setGroupValue] = (0, import_react127.useState)(value);
|
|
12755
|
+
const generatedId = (0, import_react127.useId)();
|
|
12731
12756
|
const uniqueGroupId = groupId != null ? groupId : `${generatedId}-radioButtonGroup`;
|
|
12732
12757
|
const handleChange = combineHandlers(
|
|
12733
12758
|
(e) => setGroupValue(e.target.value),
|
|
@@ -12790,11 +12815,11 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
12790
12815
|
}
|
|
12791
12816
|
);
|
|
12792
12817
|
};
|
|
12793
|
-
var RadioButtonGroup = (0,
|
|
12818
|
+
var RadioButtonGroup = (0, import_react127.forwardRef)(RadioButtonGroupInner);
|
|
12794
12819
|
RadioButtonGroup.displayName = "RadioButtonGroup";
|
|
12795
12820
|
|
|
12796
12821
|
// src/components/Skeleton/Skeleton.tsx
|
|
12797
|
-
var
|
|
12822
|
+
var import_react128 = require("react");
|
|
12798
12823
|
|
|
12799
12824
|
// src/components/Skeleton/Skeleton.module.css
|
|
12800
12825
|
var Skeleton_default = {
|
|
@@ -12804,7 +12829,7 @@ var Skeleton_default = {
|
|
|
12804
12829
|
|
|
12805
12830
|
// src/components/Skeleton/Skeleton.tsx
|
|
12806
12831
|
var import_jsx_runtime283 = require("react/jsx-runtime");
|
|
12807
|
-
var Skeleton = (0,
|
|
12832
|
+
var Skeleton = (0, import_react128.forwardRef)(
|
|
12808
12833
|
(props, ref) => {
|
|
12809
12834
|
const {
|
|
12810
12835
|
width,
|
|
@@ -12828,7 +12853,7 @@ var Skeleton = (0, import_react127.forwardRef)(
|
|
|
12828
12853
|
Skeleton.displayName = "Skeleton";
|
|
12829
12854
|
|
|
12830
12855
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12831
|
-
var
|
|
12856
|
+
var import_react129 = require("react");
|
|
12832
12857
|
|
|
12833
12858
|
// src/components/SkipToContent/SkipToContent.module.css
|
|
12834
12859
|
var SkipToContent_default = {
|
|
@@ -12837,7 +12862,7 @@ var SkipToContent_default = {
|
|
|
12837
12862
|
|
|
12838
12863
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12839
12864
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
12840
|
-
var SkipToContent = (0,
|
|
12865
|
+
var SkipToContent = (0, import_react129.forwardRef)(
|
|
12841
12866
|
(props, ref) => {
|
|
12842
12867
|
const {
|
|
12843
12868
|
text = "Til hovedinnhold",
|
|
@@ -12865,7 +12890,7 @@ var SkipToContent = (0, import_react128.forwardRef)(
|
|
|
12865
12890
|
SkipToContent.displayName = "SkipToContent";
|
|
12866
12891
|
|
|
12867
12892
|
// src/components/SplitButton/SplitButton.tsx
|
|
12868
|
-
var
|
|
12893
|
+
var import_react130 = require("react");
|
|
12869
12894
|
|
|
12870
12895
|
// src/components/SplitButton/SplitButton.module.css
|
|
12871
12896
|
var SplitButton_default = {
|
|
@@ -12877,7 +12902,7 @@ var SplitButton_default = {
|
|
|
12877
12902
|
|
|
12878
12903
|
// src/components/SplitButton/SplitButton.tsx
|
|
12879
12904
|
var import_jsx_runtime285 = require("react/jsx-runtime");
|
|
12880
|
-
var SplitButton = (0,
|
|
12905
|
+
var SplitButton = (0, import_react130.forwardRef)(
|
|
12881
12906
|
(props, ref) => {
|
|
12882
12907
|
const {
|
|
12883
12908
|
size: size2,
|
|
@@ -12887,7 +12912,7 @@ var SplitButton = (0, import_react129.forwardRef)(
|
|
|
12887
12912
|
className,
|
|
12888
12913
|
...rest
|
|
12889
12914
|
} = props;
|
|
12890
|
-
const [isOpen, setIsOpen] = (0,
|
|
12915
|
+
const [isOpen, setIsOpen] = (0, import_react130.useState)(false);
|
|
12891
12916
|
const buttonStyleProps = {
|
|
12892
12917
|
purpose,
|
|
12893
12918
|
size: size2
|
|
@@ -12924,20 +12949,20 @@ var SplitButton = (0, import_react129.forwardRef)(
|
|
|
12924
12949
|
SplitButton.displayName = "SplitButton";
|
|
12925
12950
|
|
|
12926
12951
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12927
|
-
var
|
|
12952
|
+
var import_react140 = require("react");
|
|
12928
12953
|
|
|
12929
12954
|
// src/components/Table/collapsible/Table.context.tsx
|
|
12930
|
-
var
|
|
12931
|
-
var CollapsibleTableContext = (0,
|
|
12955
|
+
var import_react131 = require("react");
|
|
12956
|
+
var CollapsibleTableContext = (0, import_react131.createContext)({
|
|
12932
12957
|
headerValues: [],
|
|
12933
12958
|
definingColumnIndex: [0]
|
|
12934
12959
|
});
|
|
12935
|
-
var useCollapsibleTableContext = () => (0,
|
|
12960
|
+
var useCollapsibleTableContext = () => (0, import_react131.useContext)(CollapsibleTableContext);
|
|
12936
12961
|
|
|
12937
12962
|
// src/components/Table/normal/Body.tsx
|
|
12938
|
-
var
|
|
12963
|
+
var import_react132 = require("react");
|
|
12939
12964
|
var import_jsx_runtime286 = require("react/jsx-runtime");
|
|
12940
|
-
var Body = (0,
|
|
12965
|
+
var Body = (0, import_react132.forwardRef)(
|
|
12941
12966
|
(props, ref) => {
|
|
12942
12967
|
return /* @__PURE__ */ (0, import_jsx_runtime286.jsx)("tbody", { ref, ...props });
|
|
12943
12968
|
}
|
|
@@ -12945,20 +12970,20 @@ var Body = (0, import_react131.forwardRef)(
|
|
|
12945
12970
|
Body.displayName = "Table.Body";
|
|
12946
12971
|
|
|
12947
12972
|
// src/components/Table/normal/Cell.tsx
|
|
12948
|
-
var
|
|
12973
|
+
var import_react134 = require("react");
|
|
12949
12974
|
|
|
12950
12975
|
// src/components/Table/normal/Head.tsx
|
|
12951
|
-
var
|
|
12976
|
+
var import_react133 = require("react");
|
|
12952
12977
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
12953
|
-
var Head = (0,
|
|
12978
|
+
var Head = (0, import_react133.forwardRef)(
|
|
12954
12979
|
({ children, ...rest }, ref) => {
|
|
12955
12980
|
return /* @__PURE__ */ (0, import_jsx_runtime287.jsx)("thead", { ref, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime287.jsx)(HeadContext.Provider, { value: true, children }) });
|
|
12956
12981
|
}
|
|
12957
12982
|
);
|
|
12958
12983
|
Head.displayName = "Table.Head";
|
|
12959
|
-
var HeadContext = (0,
|
|
12984
|
+
var HeadContext = (0, import_react133.createContext)(false);
|
|
12960
12985
|
function useIsInTableHead() {
|
|
12961
|
-
const isInTableHead = (0,
|
|
12986
|
+
const isInTableHead = (0, import_react133.useContext)(HeadContext);
|
|
12962
12987
|
return isInTableHead;
|
|
12963
12988
|
}
|
|
12964
12989
|
|
|
@@ -12989,7 +13014,7 @@ var Table_default = {
|
|
|
12989
13014
|
|
|
12990
13015
|
// src/components/Table/normal/Cell.tsx
|
|
12991
13016
|
var import_jsx_runtime288 = require("react/jsx-runtime");
|
|
12992
|
-
var Cell = (0,
|
|
13017
|
+
var Cell = (0, import_react134.forwardRef)(
|
|
12993
13018
|
({
|
|
12994
13019
|
children,
|
|
12995
13020
|
type: _type,
|
|
@@ -13028,9 +13053,9 @@ var Cell = (0, import_react133.forwardRef)(
|
|
|
13028
13053
|
Cell.displayName = "Table.Cell";
|
|
13029
13054
|
|
|
13030
13055
|
// src/components/Table/normal/Foot.tsx
|
|
13031
|
-
var
|
|
13056
|
+
var import_react135 = require("react");
|
|
13032
13057
|
var import_jsx_runtime289 = require("react/jsx-runtime");
|
|
13033
|
-
var Foot = (0,
|
|
13058
|
+
var Foot = (0, import_react135.forwardRef)(
|
|
13034
13059
|
(props, ref) => {
|
|
13035
13060
|
return /* @__PURE__ */ (0, import_jsx_runtime289.jsx)("tfoot", { ref, ...props });
|
|
13036
13061
|
}
|
|
@@ -13038,9 +13063,9 @@ var Foot = (0, import_react134.forwardRef)(
|
|
|
13038
13063
|
Foot.displayName = "Table.Foot";
|
|
13039
13064
|
|
|
13040
13065
|
// src/components/Table/normal/Row.tsx
|
|
13041
|
-
var
|
|
13066
|
+
var import_react136 = require("react");
|
|
13042
13067
|
var import_jsx_runtime290 = require("react/jsx-runtime");
|
|
13043
|
-
var Row = (0,
|
|
13068
|
+
var Row = (0, import_react136.forwardRef)(
|
|
13044
13069
|
({ type: _type, mode = "normal", hoverable, selected, className, ...rest }, ref) => {
|
|
13045
13070
|
const isInHeader = useIsInTableHead();
|
|
13046
13071
|
const type = _type != null ? _type : isInHeader ? "head" : "body";
|
|
@@ -13067,7 +13092,7 @@ var Row = (0, import_react135.forwardRef)(
|
|
|
13067
13092
|
Row.displayName = "Table.Row";
|
|
13068
13093
|
|
|
13069
13094
|
// src/components/Table/normal/SortCell.tsx
|
|
13070
|
-
var
|
|
13095
|
+
var import_react137 = require("react");
|
|
13071
13096
|
var import_jsx_runtime291 = require("react/jsx-runtime");
|
|
13072
13097
|
var makeSortIcon = (isSorted, sortOrder) => {
|
|
13073
13098
|
if (!isSorted || !sortOrder) {
|
|
@@ -13075,7 +13100,7 @@ var makeSortIcon = (isSorted, sortOrder) => {
|
|
|
13075
13100
|
}
|
|
13076
13101
|
return sortOrder === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Icon, { icon: ChevronDownIcon, iconSize: "inherit" }) : /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(Icon, { icon: ChevronUpIcon, iconSize: "inherit" });
|
|
13077
13102
|
};
|
|
13078
|
-
var SortCell = (0,
|
|
13103
|
+
var SortCell = (0, import_react137.forwardRef)(
|
|
13079
13104
|
({ isSorted, sortOrder, onClick, children, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime291.jsx)(
|
|
13080
13105
|
Cell,
|
|
13081
13106
|
{
|
|
@@ -13107,7 +13132,7 @@ var SortCell = (0, import_react136.forwardRef)(
|
|
|
13107
13132
|
SortCell.displayName = "Table.SortCell";
|
|
13108
13133
|
|
|
13109
13134
|
// src/components/Table/normal/Table.tsx
|
|
13110
|
-
var
|
|
13135
|
+
var import_react138 = require("react");
|
|
13111
13136
|
var import_jsx_runtime292 = require("react/jsx-runtime");
|
|
13112
13137
|
function getDensityCn2(value) {
|
|
13113
13138
|
switch (value) {
|
|
@@ -13118,7 +13143,7 @@ function getDensityCn2(value) {
|
|
|
13118
13143
|
return "extra-compact";
|
|
13119
13144
|
}
|
|
13120
13145
|
}
|
|
13121
|
-
var Table = (0,
|
|
13146
|
+
var Table = (0, import_react138.forwardRef)(
|
|
13122
13147
|
({
|
|
13123
13148
|
density = "normal",
|
|
13124
13149
|
stickyHeader,
|
|
@@ -13148,23 +13173,23 @@ var Table = (0, import_react137.forwardRef)(
|
|
|
13148
13173
|
Table.displayName = "Table";
|
|
13149
13174
|
|
|
13150
13175
|
// src/components/Table/normal/TableWrapper.tsx
|
|
13151
|
-
var
|
|
13176
|
+
var import_react139 = require("react");
|
|
13152
13177
|
var import_jsx_runtime293 = require("react/jsx-runtime");
|
|
13153
13178
|
var TableWrapper = ({ className, ...rest }) => {
|
|
13154
|
-
const [overflowX, setOverflowX] = (0,
|
|
13155
|
-
const [windowWidth, setWindowWidth] = (0,
|
|
13179
|
+
const [overflowX, setOverflowX] = (0, import_react139.useState)(false);
|
|
13180
|
+
const [windowWidth, setWindowWidth] = (0, import_react139.useState)(window.innerWidth);
|
|
13156
13181
|
function isOverflowingX(event) {
|
|
13157
13182
|
return event.offsetWidth < event.scrollWidth;
|
|
13158
13183
|
}
|
|
13159
|
-
const wrapperRef = (0,
|
|
13160
|
-
(0,
|
|
13184
|
+
const wrapperRef = (0, import_react139.useRef)(null);
|
|
13185
|
+
(0, import_react139.useEffect)(() => {
|
|
13161
13186
|
if ((wrapperRef == null ? void 0 : wrapperRef.current) && isOverflowingX(wrapperRef.current)) {
|
|
13162
13187
|
setOverflowX(true);
|
|
13163
13188
|
return;
|
|
13164
13189
|
}
|
|
13165
13190
|
setOverflowX(false);
|
|
13166
13191
|
}, [windowWidth]);
|
|
13167
|
-
(0,
|
|
13192
|
+
(0, import_react139.useEffect)(() => {
|
|
13168
13193
|
function handleResize() {
|
|
13169
13194
|
setWindowWidth(window.innerWidth);
|
|
13170
13195
|
}
|
|
@@ -13199,7 +13224,7 @@ Table2.Foot = Foot;
|
|
|
13199
13224
|
|
|
13200
13225
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
13201
13226
|
var import_jsx_runtime294 = require("react/jsx-runtime");
|
|
13202
|
-
var CollapsibleRow = (0,
|
|
13227
|
+
var CollapsibleRow = (0, import_react140.forwardRef)(
|
|
13203
13228
|
({
|
|
13204
13229
|
type: _type,
|
|
13205
13230
|
className,
|
|
@@ -13212,8 +13237,8 @@ var CollapsibleRow = (0, import_react139.forwardRef)(
|
|
|
13212
13237
|
const isInHead = useIsInTableHead();
|
|
13213
13238
|
const type = _type != null ? _type : isInHead ? "head" : "body";
|
|
13214
13239
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
13215
|
-
const [childrenCollapsed, setChildrenCollapsed] = (0,
|
|
13216
|
-
(0,
|
|
13240
|
+
const [childrenCollapsed, setChildrenCollapsed] = (0, import_react140.useState)(true);
|
|
13241
|
+
(0, import_react140.useEffect)(() => {
|
|
13217
13242
|
!isCollapsed && setChildrenCollapsed(true);
|
|
13218
13243
|
}, [isCollapsed]);
|
|
13219
13244
|
const rowProps = (isOpenCollapsibleHeader) => {
|
|
@@ -13231,7 +13256,7 @@ var CollapsibleRow = (0, import_react139.forwardRef)(
|
|
|
13231
13256
|
const collapsedHeaderValues = headerValues.filter(
|
|
13232
13257
|
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
13233
13258
|
);
|
|
13234
|
-
const childrenArray =
|
|
13259
|
+
const childrenArray = import_react140.Children.toArray(children);
|
|
13235
13260
|
const collapsedChildren = childrenArray.filter(
|
|
13236
13261
|
(column2, index) => definingColumnIndex.indexOf(index) === -1
|
|
13237
13262
|
);
|
|
@@ -13240,9 +13265,9 @@ var CollapsibleRow = (0, import_react139.forwardRef)(
|
|
|
13240
13265
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
13241
13266
|
const id = derivativeIdGenerator(prefix3, index.toString());
|
|
13242
13267
|
collapsibleIds.push(id);
|
|
13243
|
-
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
|
|
13268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_react140.Fragment, { children: [
|
|
13244
13269
|
/* @__PURE__ */ (0, import_jsx_runtime294.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
13245
|
-
(0,
|
|
13270
|
+
(0, import_react140.isValidElement)(child) && (0, import_react140.cloneElement)(child, {
|
|
13246
13271
|
collapsibleProps: { isCollapsibleChild: true }
|
|
13247
13272
|
})
|
|
13248
13273
|
] }, `DL-${index}`);
|
|
@@ -13302,9 +13327,9 @@ var CollapsibleRow = (0, import_react139.forwardRef)(
|
|
|
13302
13327
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
13303
13328
|
|
|
13304
13329
|
// src/components/Table/collapsible/CollapsibleTable.tsx
|
|
13305
|
-
var
|
|
13330
|
+
var import_react141 = require("react");
|
|
13306
13331
|
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
13307
|
-
var CollapsibleTable = (0,
|
|
13332
|
+
var CollapsibleTable = (0, import_react141.forwardRef)((props, ref) => {
|
|
13308
13333
|
const {
|
|
13309
13334
|
isCollapsed,
|
|
13310
13335
|
headerValues,
|
|
@@ -13330,11 +13355,11 @@ var CollapsibleTable2 = CollapsibleTable;
|
|
|
13330
13355
|
CollapsibleTable2.Row = CollapsibleRow;
|
|
13331
13356
|
|
|
13332
13357
|
// src/components/Tabs/Tabs.tsx
|
|
13333
|
-
var
|
|
13358
|
+
var import_react143 = require("react");
|
|
13334
13359
|
|
|
13335
13360
|
// src/components/Tabs/Tabs.context.tsx
|
|
13336
|
-
var
|
|
13337
|
-
var TabsContext = (0,
|
|
13361
|
+
var import_react142 = require("react");
|
|
13362
|
+
var TabsContext = (0, import_react142.createContext)({
|
|
13338
13363
|
activeTab: 0,
|
|
13339
13364
|
tabsId: "",
|
|
13340
13365
|
handleTabChange: () => null,
|
|
@@ -13344,7 +13369,7 @@ var TabsContext = (0, import_react141.createContext)({
|
|
|
13344
13369
|
setHasTabFocus: () => null,
|
|
13345
13370
|
tabContentDirection: "row"
|
|
13346
13371
|
});
|
|
13347
|
-
var useTabsContext = () => (0,
|
|
13372
|
+
var useTabsContext = () => (0, import_react142.useContext)(TabsContext);
|
|
13348
13373
|
|
|
13349
13374
|
// src/components/Tabs/Tabs.module.css
|
|
13350
13375
|
var Tabs_default = {
|
|
@@ -13361,7 +13386,7 @@ var Tabs_default = {
|
|
|
13361
13386
|
|
|
13362
13387
|
// src/components/Tabs/Tabs.tsx
|
|
13363
13388
|
var import_jsx_runtime296 = require("react/jsx-runtime");
|
|
13364
|
-
var Tabs = (0,
|
|
13389
|
+
var Tabs = (0, import_react143.forwardRef)((props, ref) => {
|
|
13365
13390
|
const {
|
|
13366
13391
|
id,
|
|
13367
13392
|
activeTab,
|
|
@@ -13373,17 +13398,17 @@ var Tabs = (0, import_react142.forwardRef)((props, ref) => {
|
|
|
13373
13398
|
htmlProps,
|
|
13374
13399
|
...rest
|
|
13375
13400
|
} = props;
|
|
13376
|
-
const generatedId = (0,
|
|
13401
|
+
const generatedId = (0, import_react143.useId)();
|
|
13377
13402
|
const uniqueId = id != null ? id : `${generatedId}-tabs`;
|
|
13378
|
-
const [thisActiveTab, setActiveTab] = (0,
|
|
13379
|
-
const [hasTabFocus, setHasTabFocus] = (0,
|
|
13380
|
-
const tabListRef = (0,
|
|
13381
|
-
const tabPanelsRef = (0,
|
|
13403
|
+
const [thisActiveTab, setActiveTab] = (0, import_react143.useState)(activeTab != null ? activeTab : 0);
|
|
13404
|
+
const [hasTabFocus, setHasTabFocus] = (0, import_react143.useState)(false);
|
|
13405
|
+
const tabListRef = (0, import_react143.useRef)(null);
|
|
13406
|
+
const tabPanelsRef = (0, import_react143.useRef)(null);
|
|
13382
13407
|
const handleTabChange = (index) => {
|
|
13383
13408
|
setActiveTab(index);
|
|
13384
13409
|
onChange && onChange(index);
|
|
13385
13410
|
};
|
|
13386
|
-
(0,
|
|
13411
|
+
(0, import_react143.useEffect)(() => {
|
|
13387
13412
|
if (activeTab !== void 0 && activeTab !== thisActiveTab) {
|
|
13388
13413
|
setActiveTab(activeTab);
|
|
13389
13414
|
}
|
|
@@ -13425,12 +13450,12 @@ var Tabs = (0, import_react142.forwardRef)((props, ref) => {
|
|
|
13425
13450
|
Tabs.displayName = "Tabs";
|
|
13426
13451
|
|
|
13427
13452
|
// src/components/Tabs/Tab.tsx
|
|
13428
|
-
var
|
|
13453
|
+
var import_react145 = require("react");
|
|
13429
13454
|
|
|
13430
13455
|
// src/components/Tabs/TabWidthContext.tsx
|
|
13431
|
-
var
|
|
13456
|
+
var import_react144 = require("react");
|
|
13432
13457
|
var import_jsx_runtime297 = require("react/jsx-runtime");
|
|
13433
|
-
var TabContext = (0,
|
|
13458
|
+
var TabContext = (0, import_react144.createContext)(null);
|
|
13434
13459
|
function TabWidthContextProvider({
|
|
13435
13460
|
children,
|
|
13436
13461
|
onChangeWidths
|
|
@@ -13459,8 +13484,8 @@ function TabWidthContextProvider({
|
|
|
13459
13484
|
);
|
|
13460
13485
|
}
|
|
13461
13486
|
function useSetTabWidth(index, width) {
|
|
13462
|
-
const context = (0,
|
|
13463
|
-
(0,
|
|
13487
|
+
const context = (0, import_react144.useContext)(TabContext);
|
|
13488
|
+
(0, import_react144.useLayoutEffect)(() => {
|
|
13464
13489
|
context == null ? void 0 : context.updateWidth(index, width);
|
|
13465
13490
|
return () => context == null ? void 0 : context.removeTab(index);
|
|
13466
13491
|
}, [index, width]);
|
|
@@ -13468,7 +13493,7 @@ function useSetTabWidth(index, width) {
|
|
|
13468
13493
|
|
|
13469
13494
|
// src/components/Tabs/Tab.tsx
|
|
13470
13495
|
var import_jsx_runtime298 = require("react/jsx-runtime");
|
|
13471
|
-
var Tab = (0,
|
|
13496
|
+
var Tab = (0, import_react145.forwardRef)((props, ref) => {
|
|
13472
13497
|
const {
|
|
13473
13498
|
active = false,
|
|
13474
13499
|
icon,
|
|
@@ -13485,16 +13510,16 @@ var Tab = (0, import_react144.forwardRef)((props, ref) => {
|
|
|
13485
13510
|
...rest
|
|
13486
13511
|
} = props;
|
|
13487
13512
|
useSetTabWidth(index, width);
|
|
13488
|
-
const itemRef = (0,
|
|
13513
|
+
const itemRef = (0, import_react145.useRef)(null);
|
|
13489
13514
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13490
13515
|
const { tabContentDirection } = useTabsContext();
|
|
13491
|
-
(0,
|
|
13516
|
+
(0, import_react145.useEffect)(() => {
|
|
13492
13517
|
var _a;
|
|
13493
13518
|
if (focus) {
|
|
13494
13519
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
13495
13520
|
}
|
|
13496
13521
|
}, [focus]);
|
|
13497
|
-
const handleSelect = (0,
|
|
13522
|
+
const handleSelect = (0, import_react145.useCallback)(() => {
|
|
13498
13523
|
if (setFocus && index) {
|
|
13499
13524
|
setFocus(index);
|
|
13500
13525
|
}
|
|
@@ -13539,9 +13564,9 @@ var Tab = (0, import_react144.forwardRef)((props, ref) => {
|
|
|
13539
13564
|
Tab.displayName = "Tab";
|
|
13540
13565
|
|
|
13541
13566
|
// src/components/Tabs/TabList.tsx
|
|
13542
|
-
var
|
|
13567
|
+
var import_react146 = require("react");
|
|
13543
13568
|
var import_jsx_runtime299 = require("react/jsx-runtime");
|
|
13544
|
-
var TabList = (0,
|
|
13569
|
+
var TabList = (0, import_react146.forwardRef)(
|
|
13545
13570
|
({ children, id, style, onFocus, ...rest }, ref) => {
|
|
13546
13571
|
const {
|
|
13547
13572
|
activeTab,
|
|
@@ -13552,11 +13577,11 @@ var TabList = (0, import_react145.forwardRef)(
|
|
|
13552
13577
|
setHasTabFocus
|
|
13553
13578
|
} = useTabsContext();
|
|
13554
13579
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
13555
|
-
const childrenArray =
|
|
13580
|
+
const childrenArray = import_react146.Children.toArray(children).length;
|
|
13556
13581
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
13557
13582
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
13558
|
-
const tabListChildren =
|
|
13559
|
-
return (0,
|
|
13583
|
+
const tabListChildren = import_react146.Children.map(children, (child, index) => {
|
|
13584
|
+
return (0, import_react146.isValidElement)(child) && (0, import_react146.cloneElement)(child, {
|
|
13560
13585
|
id: `${tabsId}-tab-${index}`,
|
|
13561
13586
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
13562
13587
|
active: activeTab === index,
|
|
@@ -13566,7 +13591,7 @@ var TabList = (0, import_react145.forwardRef)(
|
|
|
13566
13591
|
onClick: () => handleTabChange(index)
|
|
13567
13592
|
});
|
|
13568
13593
|
});
|
|
13569
|
-
const [widths, setWidths] = (0,
|
|
13594
|
+
const [widths, setWidths] = (0, import_react146.useState)([]);
|
|
13570
13595
|
const handleOnFocus = (event) => {
|
|
13571
13596
|
setHasTabFocus(true);
|
|
13572
13597
|
onFocus && onFocus(event);
|
|
@@ -13610,9 +13635,9 @@ var TabList = (0, import_react145.forwardRef)(
|
|
|
13610
13635
|
TabList.displayName = "TabList";
|
|
13611
13636
|
|
|
13612
13637
|
// src/components/Tabs/TabPanel.tsx
|
|
13613
|
-
var
|
|
13638
|
+
var import_react147 = require("react");
|
|
13614
13639
|
var import_jsx_runtime300 = require("react/jsx-runtime");
|
|
13615
|
-
var TabPanel = (0,
|
|
13640
|
+
var TabPanel = (0, import_react147.forwardRef)(
|
|
13616
13641
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
13617
13642
|
return /* @__PURE__ */ (0, import_jsx_runtime300.jsx)(
|
|
13618
13643
|
"div",
|
|
@@ -13635,15 +13660,15 @@ var TabPanel = (0, import_react146.forwardRef)(
|
|
|
13635
13660
|
TabPanel.displayName = "TabPanel";
|
|
13636
13661
|
|
|
13637
13662
|
// src/components/Tabs/TabPanels.tsx
|
|
13638
|
-
var
|
|
13663
|
+
var import_react148 = require("react");
|
|
13639
13664
|
var import_jsx_runtime301 = require("react/jsx-runtime");
|
|
13640
|
-
var TabPanels = (0,
|
|
13665
|
+
var TabPanels = (0, import_react148.forwardRef)(
|
|
13641
13666
|
({ children, ...rest }, ref) => {
|
|
13642
13667
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
13643
13668
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
13644
|
-
const panelChildren =
|
|
13669
|
+
const panelChildren = import_react148.Children.map(children, (child, index) => {
|
|
13645
13670
|
const active = index === activeTab;
|
|
13646
|
-
return (0,
|
|
13671
|
+
return (0, import_react148.isValidElement)(child) && (0, import_react148.cloneElement)(child, {
|
|
13647
13672
|
id: `${tabsId}-panel-${index}`,
|
|
13648
13673
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
13649
13674
|
active,
|
|
@@ -13656,7 +13681,7 @@ var TabPanels = (0, import_react147.forwardRef)(
|
|
|
13656
13681
|
TabPanels.displayName = "TabPanels";
|
|
13657
13682
|
|
|
13658
13683
|
// src/components/Tag/Tag.tsx
|
|
13659
|
-
var
|
|
13684
|
+
var import_react149 = require("react");
|
|
13660
13685
|
|
|
13661
13686
|
// src/components/Tag/Tag.module.css
|
|
13662
13687
|
var Tag_default = {
|
|
@@ -13683,7 +13708,7 @@ var icons3 = {
|
|
|
13683
13708
|
success: CheckCircledIcon,
|
|
13684
13709
|
default: void 0
|
|
13685
13710
|
};
|
|
13686
|
-
var Tag = (0,
|
|
13711
|
+
var Tag = (0, import_react149.forwardRef)((props, ref) => {
|
|
13687
13712
|
const {
|
|
13688
13713
|
text,
|
|
13689
13714
|
purpose = "default",
|
|
@@ -13723,7 +13748,7 @@ Tag.displayName = "Tag";
|
|
|
13723
13748
|
|
|
13724
13749
|
// src/components/TextInput/TextInput.tsx
|
|
13725
13750
|
var import_dds_design_tokens17 = require("@norges-domstoler/dds-design-tokens");
|
|
13726
|
-
var
|
|
13751
|
+
var import_react150 = require("react");
|
|
13727
13752
|
|
|
13728
13753
|
// src/components/TextInput/TextInput.module.css
|
|
13729
13754
|
var TextInput_default = {
|
|
@@ -13751,7 +13776,7 @@ var TextInput_default = {
|
|
|
13751
13776
|
|
|
13752
13777
|
// src/components/TextInput/TextInput.tsx
|
|
13753
13778
|
var import_jsx_runtime303 = require("react/jsx-runtime");
|
|
13754
|
-
var TextInput = (0,
|
|
13779
|
+
var TextInput = (0, import_react150.forwardRef)(
|
|
13755
13780
|
({
|
|
13756
13781
|
label,
|
|
13757
13782
|
disabled,
|
|
@@ -13777,14 +13802,14 @@ var TextInput = (0, import_react149.forwardRef)(
|
|
|
13777
13802
|
suffix,
|
|
13778
13803
|
...rest
|
|
13779
13804
|
}, ref) => {
|
|
13780
|
-
const [text, setText] = (0,
|
|
13805
|
+
const [text, setText] = (0, import_react150.useState)(
|
|
13781
13806
|
getDefaultText(value, defaultValue)
|
|
13782
13807
|
);
|
|
13783
|
-
const prefixRef = (0,
|
|
13784
|
-
const suffixRef = (0,
|
|
13785
|
-
const [prefixLength, setPrefixLength] = (0,
|
|
13786
|
-
const [suffixLength, setSuffixLength] = (0,
|
|
13787
|
-
(0,
|
|
13808
|
+
const prefixRef = (0, import_react150.useRef)(null);
|
|
13809
|
+
const suffixRef = (0, import_react150.useRef)(null);
|
|
13810
|
+
const [prefixLength, setPrefixLength] = (0, import_react150.useState)(0);
|
|
13811
|
+
const [suffixLength, setSuffixLength] = (0, import_react150.useState)(0);
|
|
13812
|
+
(0, import_react150.useLayoutEffect)(() => {
|
|
13788
13813
|
if (prefixRef.current) {
|
|
13789
13814
|
setPrefixLength(prefixRef.current.offsetWidth);
|
|
13790
13815
|
}
|
|
@@ -13798,7 +13823,7 @@ var TextInput = (0, import_react149.forwardRef)(
|
|
|
13798
13823
|
onChange(event);
|
|
13799
13824
|
}
|
|
13800
13825
|
};
|
|
13801
|
-
const generatedId = (0,
|
|
13826
|
+
const generatedId = (0, import_react150.useId)();
|
|
13802
13827
|
const uniqueId = id != null ? id : `${generatedId}-textInput`;
|
|
13803
13828
|
const hasErrorMessage = !!errorMessage;
|
|
13804
13829
|
const hasTip = !!tip;
|
|
@@ -13978,14 +14003,14 @@ var TextInput = (0, import_react149.forwardRef)(
|
|
|
13978
14003
|
TextInput.displayName = "TextInput";
|
|
13979
14004
|
|
|
13980
14005
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
13981
|
-
var
|
|
14006
|
+
var import_react152 = require("react");
|
|
13982
14007
|
|
|
13983
14008
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
13984
|
-
var
|
|
13985
|
-
var ToggleBarContext = (0,
|
|
14009
|
+
var import_react151 = require("react");
|
|
14010
|
+
var ToggleBarContext = (0, import_react151.createContext)({
|
|
13986
14011
|
size: "medium"
|
|
13987
14012
|
});
|
|
13988
|
-
var useToggleBarContext = () => (0,
|
|
14013
|
+
var useToggleBarContext = () => (0, import_react151.useContext)(ToggleBarContext);
|
|
13989
14014
|
|
|
13990
14015
|
// src/components/ToggleBar/ToggleBar.module.css
|
|
13991
14016
|
var ToggleBar_default = {
|
|
@@ -14019,9 +14044,9 @@ var ToggleBar = (props) => {
|
|
|
14019
14044
|
id,
|
|
14020
14045
|
...rest
|
|
14021
14046
|
} = props;
|
|
14022
|
-
const generatedId = (0,
|
|
14047
|
+
const generatedId = (0, import_react152.useId)();
|
|
14023
14048
|
const uniqueId = id != null ? id : `${generatedId}-ToggleBar`;
|
|
14024
|
-
const [groupValue, setGroupValue] = (0,
|
|
14049
|
+
const [groupValue, setGroupValue] = (0, import_react152.useState)(value);
|
|
14025
14050
|
const handleChange = combineHandlers(
|
|
14026
14051
|
(e) => setGroupValue(e.target.value),
|
|
14027
14052
|
(e) => onChange && onChange(e, e.target.value)
|
|
@@ -14060,7 +14085,7 @@ var ToggleBar = (props) => {
|
|
|
14060
14085
|
ToggleBar.displayName = "ToggleBar";
|
|
14061
14086
|
|
|
14062
14087
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
14063
|
-
var
|
|
14088
|
+
var import_react153 = require("react");
|
|
14064
14089
|
var import_jsx_runtime305 = require("react/jsx-runtime");
|
|
14065
14090
|
var typographyTypes4 = {
|
|
14066
14091
|
large: "bodySans04",
|
|
@@ -14078,7 +14103,7 @@ var calculateChecked = (value, group, checked) => {
|
|
|
14078
14103
|
}
|
|
14079
14104
|
return !!value;
|
|
14080
14105
|
};
|
|
14081
|
-
var ToggleRadio = (0,
|
|
14106
|
+
var ToggleRadio = (0, import_react153.forwardRef)(
|
|
14082
14107
|
(props, ref) => {
|
|
14083
14108
|
const {
|
|
14084
14109
|
value,
|
|
@@ -14094,7 +14119,7 @@ var ToggleRadio = (0, import_react152.forwardRef)(
|
|
|
14094
14119
|
id,
|
|
14095
14120
|
...rest
|
|
14096
14121
|
} = props;
|
|
14097
|
-
const generatedId = (0,
|
|
14122
|
+
const generatedId = (0, import_react153.useId)();
|
|
14098
14123
|
const uniqueId = id != null ? id : `${generatedId}-ToggleRadio`;
|
|
14099
14124
|
const group = useToggleBarContext();
|
|
14100
14125
|
const handleChange = (event) => {
|
|
@@ -14148,7 +14173,7 @@ var ToggleRadio = (0, import_react152.forwardRef)(
|
|
|
14148
14173
|
ToggleRadio.displayName = "ToggleRadio";
|
|
14149
14174
|
|
|
14150
14175
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14151
|
-
var
|
|
14176
|
+
var import_react154 = require("react");
|
|
14152
14177
|
|
|
14153
14178
|
// src/components/ToggleButton/ToggleButton.module.css
|
|
14154
14179
|
var ToggleButton_default = {
|
|
@@ -14163,9 +14188,9 @@ var ToggleButton_default = {
|
|
|
14163
14188
|
|
|
14164
14189
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
14165
14190
|
var import_jsx_runtime306 = require("react/jsx-runtime");
|
|
14166
|
-
var ToggleButton = (0,
|
|
14191
|
+
var ToggleButton = (0, import_react154.forwardRef)(
|
|
14167
14192
|
({ id, label, icon, className, htmlProps, ...rest }, ref) => {
|
|
14168
|
-
const generatedId = (0,
|
|
14193
|
+
const generatedId = (0, import_react154.useId)();
|
|
14169
14194
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14170
14195
|
const hasIcon = !!icon;
|
|
14171
14196
|
return /* @__PURE__ */ (0, import_jsx_runtime306.jsxs)("label", { htmlFor: uniqueId, className: ToggleButton_default.container, children: [
|
|
@@ -14208,7 +14233,7 @@ var ToggleButton = (0, import_react153.forwardRef)(
|
|
|
14208
14233
|
ToggleButton.displayName = "ToggleButton";
|
|
14209
14234
|
|
|
14210
14235
|
// src/components/ToggleButton/ToggleButtonGroup.tsx
|
|
14211
|
-
var
|
|
14236
|
+
var import_react155 = require("react");
|
|
14212
14237
|
var import_jsx_runtime307 = require("react/jsx-runtime");
|
|
14213
14238
|
var ToggleButtonGroup = (props) => {
|
|
14214
14239
|
const {
|
|
@@ -14221,7 +14246,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
14221
14246
|
htmlProps,
|
|
14222
14247
|
...rest
|
|
14223
14248
|
} = props;
|
|
14224
|
-
const generatedId = (0,
|
|
14249
|
+
const generatedId = (0, import_react155.useId)();
|
|
14225
14250
|
const uniqueLabelId = labelId != null ? labelId : `${generatedId}-ToggleButtonGroupLabel`;
|
|
14226
14251
|
return /* @__PURE__ */ (0, import_jsx_runtime307.jsxs)(
|
|
14227
14252
|
"div",
|